FieldPoint Family

cancel
Showing results for 
Search instead for 
Did you mean: 

cFP-PWM-520 initial and final cycle control?

Is every cycle produced by the [c]FP-PWM output modules correct? Specifically, if we start with 0%, change to 50% and then back to 0% will every cycle produced be 50% including the first and last? If not, is there any way to force the unit to produce exactly correct pulses for the first and last? Thanks.

Matt
Message 1 of 4
(3,760 Views)
Matt,

My memory of this is several years old, but if I recall the embedded code correctly, the first cycle will always be accurate. The last cycle may or may not be accurate depending upon the conditions (as follows). The cycle will be accurate if the new width is written during the low period of the cycle. If the pulse is active (Hi) when the new width is written, and the new pulse width is longer than the old width, the cycle will be accurate to the new width. If the new width is shorter than the old width and the new width time has not yet elapsed, the cycle time will be accurate to the new width time. If the new width is shorter than the old width, and the new width time has already elapsed in this cycle, the signal will deactivated giving a single pulse width that is between the old width and new width.

This should be fairly easy to verify with a FP-PWM-520 and an oscilliscope. Set the period to a relatively long time, (e.g. 10 seconds), and watch the response as you change the settings. With a 50% duty cycle on a 10 second period, it should be pretty easy to send the change during both the Hi and Lo periods.

Regards,
Aaron
LabVIEW Champion, CLA, CPI
Message 2 of 4
(3,756 Views)
Hello Matt,

Thank you for contacting National Instruments.

The PWM-520 should always output the correct duty cycle, even as you change it on the fly.

Regards,

Sean C.
Applications Engineer
National Instruments
0 Kudos
Message 3 of 4
(3,754 Views)
Thanks Aaron and Sean. Looks like the final cycle will be short if the change is sent during the high period, confirmed with the scope as Aaron suggested. Next question is how do I time my changes so that they only take place during the low period? I don't care about having the low too long, just can't have a short final pulse. Period will be around 20 mS in normal use. Is it possible to read back the current state of the pin? Thanks.

Matt
0 Kudos
Message 4 of 4
(3,739 Views)