Maximum sampling rate with Encoder Phidgets

Supporting 2.7 and 3.2+
Post Reply
Wolfpack34
Fresh meat
Posts: 4
Joined: Thu Mar 17, 2022 3:20 pm
Contact:

Maximum sampling rate with Encoder Phidgets

Post by Wolfpack34 »

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?

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
Attachments
encoder_feedback.PNG
(146.8 KiB) Not downloaded yet
User avatar
Patrick
Lead Developer
Posts: 3399
Joined: Mon Jun 20, 2005 8:46 am
Location: Canada
Contact:

Re: Maximum sampling rate with Encoder Phidgets

Post by Patrick »

1057/1047 offer our fastest encoder update rate (125Hz)

Depending on what kind of voltage you're measuring, you can get up to 1000Hz (VINT Hub ports in Voltage Input mode). Voltage VINT Devices will have slower data rates.

-Patrick
Post Reply

Who is online

Users browsing this forum: No registered users and 4 guests