Page 1 of 1

HELP - 4x DigitalOutput - BeginSetDutyCycle()

Posted: Fri Jul 16, 2021 4:02 pm
by Sam Bhanji
Hello,

Please bear with my questions as I am new to Phidgets.

I am trying to use the 4x Digital Output Phidget to control a servo motor that has built-in driver with the ability to accept Step/Dir pulses (like a stepper motor).

Due to the built-in driver, I am not able to use the Stepper Motor Phidget, so I am limited to using the DigitalOutput Phidget to generate the STEP and DIR pules which I have been successful in developing. What I am struggling with is how to precisely command the motor to move a certain amount of STEPS?

The motor is configured for 200 steps/revolution, and I am trying to set the DigitalOutput (ch 1) to send 2000 pulses to rotate the shaft 10 revolutions. I currently use DutyCycle=0.5, and Frequency=2000 which sets the motor's speed to turn about 10 revolutions/second. But how do I command it to stop after turning the shaft 10 revolutions???

I see that there is a BeginDutyCycle() that accepts a deligate but not sure of this can be used as I may not fully understand the design correctly.

Any assistance is greatly appreciated?

Thanks,
Sam.

Re: HELP - 4x DigitalOutput - BeginSetDutyCycle()

Posted: Mon Jul 19, 2021 10:36 am
by Patrick
You can't precisely control the number of pulses on a PWM digital output. Does your driver accept any other types of control input?

-Patrick