NI TestStand

cancel
Showing results for 
Search instead for 
Did you mean: 

Run a VI continuously in Teststand

Solved!
Go to solution

Hi!

 

I'm trying to run a VI continuously in Teststand. This VI (constant DC voltage example from NI-DCpower) is a simple power supply setup with constant DC voltage and measuring back U and I. My problem is that, when I call this VI in Teststand it will only turn on my PXIe-4139 SMU for a sec and when the sequence goes to the next step it will turn off. What I want to achive is that, to turn on the SMU for the DUT for the whole test and turn it off at the end. Is it possible to run a VI that way or I have to modify the VI? If yes then how? Are there examples calling VI's continuously? Thank you, I think I'm missing something very basic here.

0 Kudos
Message 1 of 7
(1,514 Views)
Solution
Accepted by topic author tamas_guruczi

You would need to split up the VI into actionable items:

 

1. Initialization.vi (Setups up the NI-DCPower, and passes out the reference to TestStand)

2. Read U and I.vi (Does a read of U/I) (You can loop on this to make it "Continuous")

3. Close.vi (Shutdowns the NI-DCPower)

 

The example is doing those three things already. The difference is just splitting it apart so the session is not closed.

Message 2 of 7
(1,502 Views)

Thanks for the fast response! By split up You mean delete the parts from the Vi that I don't want and save them to new files? If I delete the shutdown part it will run until I call the shutdown part only?

0 Kudos
Message 3 of 7
(1,494 Views)
Solution
Accepted by topic author tamas_guruczi

Exactly! The important part is initialize passes out the reference for the DCPower session. Since that is an input to all the DCPower vi's you will want to hold onto it and pass it around. So you end up with 3 vi's, that when put together do exactly what the 1 did. But now that they are separate you can call them at different times, and loop on the measurement one.

Message 4 of 7
(1,487 Views)

I made this simple VI but its again only supply power for a sec. I also created an other one with while loop, it worked permanently but in Teststand the sequence stopped at this step because of the never ending while loop. I'm kinda lost now at what to do now. My other problem with split up that if I start the power supply session in a VI, and I want to reach the measurement data from an other VI, then first I have to close the previous session and open a new one. Then the power supply wont operate again because I just closed it. If I don't close it then the measurement.vi won't run because no session is opened for it. Am I right?

0 Kudos
Message 5 of 7
(1,264 Views)

update: Its working I just made a simple mistake. With this VI I can supply power continuously. What I can't do is to shut it down in an other vi or make measurement in an other vi because of the already openned session and controlling on the instrument

0 Kudos
Message 6 of 7
(1,248 Views)

You need to use the Connector Pane of the VI, to pass out the Instrument Handle from the methods. This then needs to get passed into your other VI's so they use the same session.

ShockHouse_0-1697639513198.png

ShockHouse_1-1697639531953.png

 

Message 7 of 7
(1,233 Views)