NI TestStand

cancel
Showing results for 
Search instead for 
Did you mean: 

teststand-set property value.vi does not change the value of the local variable

Hello,
I am using TS3 with Labview 7.1 to change the value of a numeric array local variable via TestStand-Set Property Value.vi. The seq test step runs without any error, but the value of the array does not change. I have the simple seq file and the vi attached. Please advise. Thank you.

Valen
0 Kudos
Message 1 of 8
(4,320 Views)
Your vi did not contain any code to modify anything. I did not see any SetPropertyValue, perhaps you posted the wrong vi. Also, with TestStand 3 and later, you do not have to use the sequence context and TestData structures. You can use the connector pane to pass variables.
- tbob

Inventor of the WORM Global
0 Kudos
Message 2 of 8
(4,318 Views)
Hello Bob,
Thank you for your advice. I am a new teststand user. Please bear with me if my questions sound too simple. I did set the values in the connector pane, and I was expecting the teststand-set property value.vi to pass the set values to "Locals.ModelConfigTest". Without using teststand-set property value.vi and Sequence Context, how do I pass data to local variables via the connector pane in TS3? Where can I find some sample VIs? Thank you.

Valen
0 Kudos
Message 3 of 8
(4,301 Views)
First of all, in your vi, delete the sequence context and the TestData structure. You don't need them anymore. Make sure that the values you want to pass are connected to a connector pane terminal. Now in TestStand, right click on the step and select Specify Module. Navigate to the vi. When a vi is selected, you will see the vi icon with connector pane terminal names in the middle of the screen. Just below that is a box that allows you to associate TestStand variables with each connector pane terminal. For example, Error Out in the left column will map to the TestStand container Step.Result.Error. To choose which TestStand variable to map to, click on the f(x) button on the right side. Navigate to the TestStand variable you wish to choose. Select it and the association is done. Another example for a numeric limit test: The desired numeric result produced by the vi might be a numeric indicator labeled something like NumericOut. Connect this indicator to a connector pane terminal. In TestStand, you may have to click the Reload Prototype button if you just made some vi changes. The NumericOut terminal should be displayed on the Edit LabVIEW VI Call window, and NumericOut should be one of the entries in the table just below. On the same row as NumericOut, go to the far right and click the f(x) button. Navigate to Step.Result.Numeric and select it. Now the right hand column of the same row should display Step.Result.Numeric, indicating that this TestStand variable will get its result from the NumericOut terminal of the vi. Same thing for passing inputs from TestStand to a vi. In my opinion, this is much easier than using the TestStand functions, Get and Set..., inside the vi. Also, the vi can now run standalone. No reference to TestStand sequence context, so it will run on its own without having to have TestStand running. I hope this is clear.
- tbob

Inventor of the WORM Global
Message 4 of 8
(4,287 Views)
Hello Valen,

If you are in the Specify Module Window, you should see the connector pane of your VI and below that you will see the names of all the controls and indicators. Then for each control or indicator you will see a field called value. Entering a TestStand variable into this value field will allow you to pass data to and from a VI. Also, TestStand has a large number of examples that it ships with. One good example which shows a lot of different features of integrating LabVIEW and TestStand is C:\Program Files\National Instruments\TestStand 3.0\Exmples\Demo\LabVIEW\Computer Motherboard Test\ Computer Motherboard Test Sequence.seq. If you look at this example you will see how parameters are passed into and out of TestStand. I hope this information is helpful.

Regards,
Kevin Leonard
Applications Engineer
National Instruments
0 Kudos
Message 5 of 8
(4,284 Views)
Bob/Kelvin,
Thank you so much for the info. I have tried Bob's suggestion and modified the VI: Pass data from "ModelConfig" cluster to numeric array "ModelConfigArray"; the data to pass is specified in the connector pane, and "ModelConfigArray" is also passed to "Locals.ModelConfigTest"; but I am still not seeing the local with the data change.

I have to user cluster to pass the data instead of array since I will have to pass more than 50 different numeric parameters. Please advice what I have done incorrectly. Thank you.
0 Kudos
Message 6 of 8
(4,279 Views)
The local is changing. Place a Message Popup step after the vi step. Edit the message to be like this:
"Array elements:" + chr(0x0A) +
str(Locals.ModelConfigTest[0]) + chr(0x0A) +
str(Locals.ModelConfigTest[1]) + chr(0x0A) +
str(Locals.ModelConfigTest[2]) + chr(0x0A) +
str(Locals.ModelConfigTest[3]) + chr(0x0A) +
str(Locals.ModelConfigTest[4]) + chr(0x0A) +
Execute the sequence. The popup will display the data that is defined in the vi, proving that the vi data did get passed to TestStand.
Another way to see the new values is to put a breakpoint at the new message popup step. Run the sequence. When the breakpoint is reached, a popup will appear. Select the Context tab. Open the Locals tree (click on the + sign), then click on ModelConfigTest. On the right side of the screen you will see all the array elements and their modified values. Note that you will not see the changes in the original Locals tab of the sequence editor. This is for the default value of the locals, and will not be changed programatically.
- tbob

Inventor of the WORM Global
Message 7 of 8
(4,276 Views)
Thank you very much for your help,Bob!
Everything is working perfectly fine now.
0 Kudos
Message 8 of 8
(4,253 Views)