I am trying to generate a CompTable with an analog distance sensor I have mounted to my gantry.
My goal is to command a continuous move along one axis, then get readings from my analog distance sensor at set distances along that move (say every 20mm). Ideally I would like to put these readings directly into the CompTable array (after some transformations to convert raw sensor readings to motor counts).
I currently have a PLC that simply loops, looks at current position, and records the sensor value when current position is equal to desired position.
Is there a simpler or more automated way to accomplish this?