04-23-2014 10:14 AM
Hello Friends,
I have a little problem, would be great if someone can help me.
I am using the counter inputs on my Data Acq. Harware to measure the pulse width of my input sigal.
Since the hardware has only 4 counter inputs I can connect 4 channels, but I want to measure pulse width for 6 channels.
Is there a way to use the available 4 counters and measure all of the 6 channels?
Thank you
Regards,
Raj
Solved! Go to Solution.
04-23-2014 12:12 PM
If it meets your requirements you could just connect all 6 channels but only read from (up to) 4 at a time. Here is an example using just 1 counter:
If the measurements actually need to be taken simultaneously then you'll need to either use a digital input task or get new hardware.
Best Regards,
04-24-2014 02:39 AM
Hi John,
Thank you for your reply.
I am trying to measure the pulse width continously from my 6 inputs. And the signal on my 6 inputs gets high once in every 10 sec and the pulse width is between (2ms-10ms).
But all the signals are out of phase, meaning that at a moment only one signal is high.
In the example VI from you, if the signal on my first input is zero then all the other inputs are also zero, even if there is a signals on the other.
Can you maybe help if there is a way to measure 6 input pulse width continously, and the VI gives me the data from that pulse which is high at a moment. (Since they are coming out of phase always - 1 input high and 5 low at a time).
Thank you,
Kind Regards,
Raj
04-25-2014 03:54 PM
In my (very basic) example, you could just increase the timeout to ~10+ seconds to ensure you acquire the pulse. If it's possible that the pulse isn't present within the ~10+ second timeout you would also need to handle the timeout error so it doesn't wrap back around through the shift register and prevent the future reads from executing.
The downside to this of course is that it could take up to ~60+ seconds to acquire from all 6 channels in the worst case scenario. The example was really just intended to show how one might use a single counter to acquire from multiple channels in succession.
The better way to do it with counters would be to run (up to) 4 counter tasks in parallel. The first 2 tasks to finish with their original acquisition should then measure a second channel. This could still take ~20 seconds if none of the signals are connected however.
If you want to trade a lower measurement resolution (and more memory usage) for a lower upper-bound on measurement time you could instead acquire a 10 second window of time using clocked digital inputs and use software to determine the pulse duration by parsing the acquired array.
Best Regards,