07-10-2013 09:38 PM
Hi folks,
I am using the NI9411 DI module on a cRIO 9074 to measure a 1 kHz PWM signal.
I created an empty project, set the mode of the module to "counter" "pulse width measurement" "High pulse" and "disabled" input filter.
For taking a first look at the measured values i used the NI distributed system manager.
At the beginning the measured values seem right, they are somehow multiplied with 10 but i can easily correct that with a normal division by ten.
The problem is, if i pull the plug which connects the NI9411 to the pwm generator, the duty cycle never goes to zero but stays somewhere between.
For example if the duty cycle is 510 (that is supposed to be 51) and i pull the plug it goes to 230 and stays there. If i repeat the step of plug-in and out, the duty cycle sometimes drops to 1.25 and sometimes to 70.
The values seem random and the counter stays at this value the whole time until i plug it back in.
For my application the module has to see the "missing" pwm if the plug is removed.
How can this be and how can i solve this problem?
Thanks
06-07-2016 09:58 AM
Sorry for the zombie thread, but I recently purchased the NI 9411 module, and when reading a PWM signal, I am having the same problem: When a signal is abruptly removed from the measuremnt channel, the reading does not return to zero. Rather, it remains constant at the last value before the signal was lost. When the signal is not present, I need the card to read 0. Please advise.
06-08-2016 04:54 AM
Hi b3nton,
Could you provide the VI so that I can further understand the problem that you've encountered?
Thank you.
Regards,
Ong Ee Lim
06-08-2016 09:26 AM
I've attached my VIs. My program is running on a cRIO, and the data is passed to a host computer, which then logs the data. Let me know if you have further questions.
06-08-2016 09:19 PM
Hi b3nton,
Thank you for proviing the code. Unfortunately, there isn't much information that I can find or relate to the PWM measurement.
May I know if its possible for you to provide the own LabVIEW project with the VIs (Place into one zip file).
Also, by looking at the code, there are some confusions on how PWM measurement is done and how it is calculated.
Could you help explained which variables and which part of the code are used for PWM calculation?
Thank you.
Regards,
Ong Ee Lim
06-09-2016 10:49 AM
PWM measurement is taken using the NI 9411 card in PWM read mode. I've attached my project, including all VIs and controls.
06-10-2016 04:07 AM - edited 06-10-2016 04:08 AM
Hi b3nton,
Thank you for sending the code.
I've tried reproducing the code, and it seems that it is expected behavior that the last value of the pulse width measurement will be retained if the signal is being removed from NI-9411.
If you want to reset to 0 if the signal is removed from NI-9411, one way is to check if the pulse width value remains constant for a given timeout.
Let me know if you're okay with this approach.
Thank you.
Regards,
Ong Ee Lim
06-10-2016 09:44 AM
Thank you for looking at this with me, I greatly appreciate it ! I have considered your approach to pull the PWM signal to 0 programmatically, but there are instances where my PWM signals are constant when the signal is actually present. It might be difficult to separate a true constant PWM signal from a false constant PWM signal.