03-26-2012 03:58 PM
Hi, I am having trouble building a counting vi. I want to count how many times a digital input changes state, I have tried to use the Daq assistant instead of a Boolean but keep getting errors. Any help would be much appreciated.
03-26-2012 04:19 PM
Your VI is not complete. What is event case [2] supposed to be connected to? In other words, what front panel control/indicator triggers it? Did you intent to put this in the Timeout case?
Can you provide more details on exactly what it is that you're trying to count? You said "count how many times a digital input changes state". Does this mean low->high, high->low, or both? Your VI name implies that this might be for a relay. If so, are you accounting for bouncing, or is this what you are trying to measure?
Also, are you aware that the 6008 already has a counter built into the hardware? I would suggest using that. Take a look at the examples that ship with DAQmx on how to set up a counter.
03-26-2012 04:44 PM
What I am trying to do is count the pulses from a flow meter which will pulse every time a liter passes through it. I would like to use a normally open volt free contact to count on a numeric indicator. I have tried to to using the counter on the 6008 but just can't get it to work.