Maximum sampling rate with Encoder Phidgets
Posted: Mon Jun 05, 2023 2:06 pm
The end goal is that I want to be able capture data as quickly as possible with the encoder and voltage phidgets. I'm setting a stepper motor to run about 50 revolutions at 500RPM and collecting voltage data and the encoder position. Moving the stepper motor accurately to positions seems to work fine and the encoder phidget seems to pick up the pulses without a beat.
However, the output data from the encoder phidget seems to be fairly course. I'm only able to capture a handful of positions per revolution.
I'm using the ENC1000_0 quadrature encoder phidget and was able to get much better results by setting the data rate to max (50).
It does look like the 1057_3B PhidgetEncoder HighSpeed may be able to get data out faster as the maximum data rate is 125 Hz vs 50 Hz.
Are there any other knobs I can turn? Or is my best bet to go with the 1057_3B phidget over the ENC1000_0?
However, the output data from the encoder phidget seems to be fairly course. I'm only able to capture a handful of positions per revolution.
I'm using the ENC1000_0 quadrature encoder phidget and was able to get much better results by setting the data rate to max (50).
It does look like the 1057_3B PhidgetEncoder HighSpeed may be able to get data out faster as the maximum data rate is 125 Hz vs 50 Hz.
Are there any other knobs I can turn? Or is my best bet to go with the 1057_3B phidget over the ENC1000_0?
Code: Select all
stepper0.setTargetPosition(target)
stepper0.setEngaged(True)
while stepper0.getIsMoving():
sample_array.append(sample_counter)
elapsed_array.append(toc2())
position_array.append(encoder0.getPosition())
voltage_array.append(voltageInput0.getVoltage())
sample_counter = sample_counter + 1