NI TestStand

cancel
Showing results for 
Search instead for 
Did you mean: 

Description field can't be updated in BatchModel in TestStand

I would like to see the test socket number in description field of interface in batch model in TS, I have done a StepType in attachment and the description expression what I set is:
 
RunState.TestSockets.MyIndex ==0 ? "TestSocket 0" : "TestSocket1"
 
But when I run it in batch model, the TestSock1 can't be update however ( it displays "TestSocket0").
 
Any help would be highly appreciated.
Thanks.
 
 
0 Kudos
Message 1 of 4
(3,097 Views)
Couple things Steven,
 
1)- Your expression step in the ModelOptions callback has a double ==.  It won't set your testsockets to 2 like you want it to.  It will just evaluate it and say if it's true or not but not do anything about it.
 
2)- I tried "TestSocket " + Str(RunState.TestSockets.MyIndex)  and that didn't work either.  However, when you do "TestSocket " + Locals.MyDescription and then as a preexpression of the step set Locals.MyDescription = Str(RunState.TestSockets.MyIndex)  then it works.  Weird that it will grab the Locals and they'll work but won't evaluate the Runstate Properties. 
 
Seems kinda hokie.
 
Later,
Jiggawax
0 Kudos
Message 2 of 4
(3,088 Views)

Hi,

You probably needed to use the Evaluate function

ie Evaluate("TestSocket " + Str(RunState.TestSockets.MyIndex) )

Regards

Ray

Regards
Ray Farmer
0 Kudos
Message 3 of 4
(3,050 Views)

 

Seem like "RunState.TestSockets.Myindex" is not available in "Description expression" of StepType, I tried it like Jiggawax described that put "RunState.TestSockets.Myindex" to a variable first in the pre-expression of a step, then use this variable instead of "RunState.TestSockets.Myindex" to evaluation is ok.

Is this a Bug?smileywink:

Ray and Jiggawax, Thanks for your help.

 

0 Kudos
Message 4 of 4
(3,045 Views)