Duty cycle measurement with U3 through Python | LabJack
 

Duty cycle measurement with U3 through Python

3 posts / 0 new
Last post
robin.cooper
robin.cooper's picture
Duty cycle measurement with U3 through Python

Hello,

I'm trying to configure a U3-HV to measure duty cycle with Timer0.  I am able to enable the duty cycle mode however I am unable to set the correct TimerClockFrequency.  These are the two methods I have attempted:

Method 1:  d.writeRegister(7000, 3)   # set clock to 1 MHz/Div

Method 2:  d.configTimerClock(TimerClockBase=3, TimerClockDivisor=1)   # set clock to 1 MHz/Div and Division to 1

Both of these approaches generate an error that indicates the TimerClockBase is a read only property.

Is there a recommended way of setting the TimerClockBase through Python?

LabJack Support
labjack support's picture
Both methods should work, and

Both methods should work, and tried both to confirm they are working.

First, try power cycling your U3 and see if that helps.

Second, make sure you are using the latest firmware. You can check with a call like:

print(d.configU3()["FirmwareVersion"])

Current version is 1.46. If needed go here for information on upgrading firmware and for firmware files.

https://labjack.com/support/firmware

It that doesn't help resolve the issue, what is the exact error message you are getting? Also, please provide all the U3 related calls before you get the error.

robin.cooper
robin.cooper's picture
Thanks for the reply.

Thanks for the reply.

As you have suggested power cycling the U3 has resolved the issue.

Thank you for your help.