NI TestStand

cancel
Showing results for 
Search instead for 
Did you mean: 

Must load DAQ VI dynamically & unload after step

I'm using a PCIDIO96 DAQ card to measure a digital pulse.  I wrote a simple VI using DAQ Assistant to take the measurement.  The VI runs fine by itself.   When I use more than 1 occurance of this simple VI in a Teststand sequence I can only get one valid measurement.  The 1st instance works, but subsequent instances fail to read the signal at the IO port.  I found that if I load the VI dynamically and unload the VI at the end of the step, the measurement at each instance gives valid results.  Does anyone know why the VI will only work once unless I load/unload the VI dynamically?
 
Bill
0 Kudos
Message 1 of 6
(3,658 Views)
Hi Bill,

When you say that subsequent steps fail, does this mean that you receive an error message?  If so, what does the message state?  If you are receiving invalid values, what type of values are you receiving?
0 Kudos
Message 2 of 6
(3,646 Views)
Terry,
I do not get an error message.  The signal I'm reading is a pulse train or square wave.  The VI determines the number of hi-to-low/low-to-hi transistions, compares this number to a constant, and returns a boolean pass/fail indication.  When the "failure" occurs, the VI shows 0 or 1 transistion, but the actual signal on the pin is a 500Hz square wave (I sample the DIO channel for about 1 second, so the number of transistions should be about 1000).  As I stated previously, This only happens when I put the VI in a teststand sequence.
Bill
0 Kudos
Message 3 of 6
(3,641 Views)
Hi Bill,

Can you post the VI that you are using, so I can test it out?  I have been trying to duplicate this behavior, but have been unsuccessful, so far.
0 Kudos
Message 4 of 6
(3,621 Views)

Terry,

here is the VI

0 Kudos
Message 5 of 6
(3,610 Views)
Hi Bill,

The problem appears to be with the Elapsed Timer.vi.  If you do not dynamically load and unload the VI and have tracing enabled in TestStand, each step was taking longer to execute than .75 seconds.  Because of this, after the first step, the VI thought that the timed had already passed and didn't execute the loop.  I amended your VI, which should fix this problem.  Test it out and let me know if it works or if you have any questions.
0 Kudos
Message 6 of 6
(3,589 Views)