Multifunction DAQ

cancel
Showing results for 
Search instead for 
Did you mean: 

PWM measurement on multiple channels, Don't wait for edge change!

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

0 Kudos
Message 1 of 3
(3,115 Views)

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 

0 Kudos
Message 2 of 3
(3,086 Views)
0 Kudos
Message 3 of 3
(3,071 Views)