05-24-2011 02:44 PM
Hello,
My coworker has a problem and I'm tyring to help him.
We have a functional test written by an outside company, using TestStand 4.1
He has a LabView Vi with an Thermotron driver that monitors a chamber temp and outputs an INTERVAL number ( 1 intervel every x minutes)
That interval number is written to text file.
We would like to loop the Main function of the TestStand sequence based on that Interval number, but I'm unsure how to read that variable from within Test Stand.
I can either pull interval numbers from the text file, or set up logic in the VI to make a true / false flag based on interval numbers
i.e. interval 30 - 60 run the test....61 to 75 pause (dont run test)....76 to 125 run test...etc
Can you tell me how I might pull that interval into TestStand ?
Is there a way without incorporating the stand alone VI in question into the Test Seq ?
Thank you for any advice in advance !
Solved! Go to Solution.
05-25-2011 02:49 AM
You can acces TestStand variable using the VI called get property value located in the TestStand palette. you'll need to retrieve the sequenceContext first, maybe by sending it from the sequence using activeX methods, or using methods from within LabVIEW on the application manager (get sequence etc...)
You also have to wire a constant as the lookup string (constante=variable name e.g locals.MyVariable)
05-25-2011 06:20 AM
Hi,
Are you saying that you want to read this value stored in your text file and use this value to set the number if iteration of your test sequence loop.
You will need a piece of software that will obtain the value from your file and then pass this back into TestStand to store in a teststand variable, probably a local. TestStand doesn't have the built in function to directly read the data from your file.
Therefore you will need a code module attached to say an Action Step Type. The code module can be written in any one of the supported language, as you mentioned LabVIEW then maybe this is your perferred language. So your VI need to obtain the data from your file and return the value back to TestStand and you do this by sending your data out of your VI via its connector pane and then in teststand assigning a Teststand variable to your output connection of your VI.
I am assuming you have the basic knowledge of setting up a Step in TestStand.
05-25-2011 07:16 AM
Thank you for the replies.
Ray,
You are correct in your assumptions.
As I understand it, you are saying I'd have to write a vi to grab that data from a text file, which I can do.
However, are you saying that the VI needs to be inserted into the existing test sequence ?
The VI which is monitoring the Chamber is running in the background.
The TestStand main sequence consists of about 5 VI's which perform a series of tests on the module inside the oven.
I believe the only way to do what I need to do is to modify that main sequence, such that the variable is pulled into a VI which
is added to the main sequence, and controls the process by a while loop ( for instance).
In the past I've done some debug of other TestStand sequences,but I've not created a sequence, so passing the data from
the new VI ( Get Interval Number) to the next VI's in the exisiting sequence is what I'm unclear about.
I will sit down with the program as time permits and, hopefully, figure it out.
Thanks
05-25-2011 08:46 AM
Alan,
Check out Chapter 2 and 3 of Using LabVIEW and LabWindows/CVI with TestStand
You can find the relevant manual on the NI website if you dont have a hard copy.
05-25-2011 12:22 PM
Thanks, Ray !
That manual will be very useful.
I spent the last few hours working through the issue on test stand and I think I've got it.
It needs to be validated with all the hardware attached, but the While and If loops appear to be reading the interval
and reacting accordingly.
Hopefully a few tweaks and it's ready to go.
Thanks again.