04-22-2010 02:59 AM
Hi,
I tried PWM measurement with the predefined tasks from the DAQmx.
It works, but I have a problem with it. The task starts to measure on channel 1, then goes to channel 2 and so on...
So if on channel 1 is a PWM with a very low frequency -> the task has to wait all the time till it gets a edge change and then jumps to measure channel 2. But on channel 2 can be a signal with a very high frequency. While finishing PWM measurement on channel 1, I'll loose information from channel 2,3,4...
I was thinking of just reading the channels whether they are high or low in a timed loop and start a calculation with comparing it to the previous measured value, in a formular node. But this is not really working.
Any idea how I can measure all channels without loosing information?
Thanks
04-26-2010 12:33 AM
Any idea on this? I am still stuck on this. Well I would just need to measure on every xµs or xms on the digital port (actually only 4 inpt channels) whether it is high or low, then I would run a C-Code, which compares the previous values with the new one -> then I know whether it is a rising edge, low edge, still on low, still on high and can calculate from the time stamps (xµs, xms) the apropriate duty cycle and frequency (PWM) on every channel.
But how can I make sure that I have on every measurement the same time gap to know my step width for calculations. Is the formula node + global variables the best way to perfom this calculations?
Thanks
04-27-2010 07:17 AM
Duplicated post, please see other thread:
http://forums.ni.com/ni/board/message?board.id=250&message.id=57066#M57066