05-04-2013 05:26 PM
I have successfully downloaded and executed this: http://www.ni.com/white-paper/2991/en
and I know it works because I can see the pulse train on channel #1 on my osciloscope.
I have modified the sample code from the website to use pulse width and frequency knobs that may change dynamically:
What I would like to do is toggle the "Dev1/ctr1" to "Dev1/ctr0" every 10 seconds. I have investigated into the "Elapsed Time" express vi and I am able to successfully count the number of times the time has elapsed, however when 10 seconds have gone by I cannot simply update toggle input to "CO Pulse Freq" with a different counter input because it has already past that object and is busy running in the loop above. How can I reset the pulse to execute with a different counter input?
In short, the Elapsed Time express VI works perfectly by itself, but when the time has elapsed how do I force restarting the pulse train with "Dev1/ctr0"?
Solved! Go to Solution.
05-04-2013 05:30 PM
I have attached my VI in case anyone wants to see it. I'm using labview 11.
05-06-2013 02:32 PM
Are you trying to toggle the physical channel?
05-06-2013 04:05 PM - edited 05-06-2013 04:15 PM
assuming you want to toggle control from 1 to 0 and back every ten secs and zeroing out the other channel...index the array to write values to one or the other channel.
note: if needed...use shift registers to hold onto the last freq/pulse width values for the last channel when toggling to the other. use 'n channel' for multiple counters, concatenate multiple channels on your counter constant