Python example for duty cycle measurement | LabJack
 

Python example for duty cycle measurement

2 posts / 0 new
Last post
Kyler Laird
kylerlaird's picture
Python example for duty cycle measurement

I use U3-HVs for controlling autonomous tractors.  My current project is a Caterpillar tractor with many controls that (I believe) use PWM.  I want to measure what the manual controls are outputting so that I can emulate them.  It looks like timer mode 4 should do the job but I haven't been able to make it work.  Is there a Python example of reading duty cycle?

Thank you.

--kyler

LabJack Support
labjack support's picture
I'm not a Python guy myself,

I'm not a Python guy myself, but a couple initial suggestions:

1. Use LJStreamM to acquire the signals on analog inputs or digital inputs.  I would start with analog inputs so you can at least see the voltage level of the signals and get an idea of the shapes.

2.  Use the test panel in LJControlPanel to try out quadrature inputs.