NI TestStand

cancel
Showing results for 
Search instead for 
Did you mean: 

BatchModel execution customization

Hi all,
 
How to get the socket number of the currently displayed sequence in the BatchModel execution. What event is generated when the selection in the combobox is changed. How to modify the display expression in the combo box? Is there any specific syntax for it. I would like to display only the Sequence name along with the UUT Serial Number in the combobox.
 
How to dynamically assign every socket a specific serial number?
 
Thanks and Regards,
MadhuSri
 
0 Kudos
Message 1 of 10
(4,040 Views)

Hi MadhuSri,

I need to get some more information to be able to help you out.  Are you using the Operator Interface or the Sequence Editor for TestStand?  Also, when you say combo box, specifically which combo box are you referring to?

0 Kudos
Message 2 of 10
(4,015 Views)

Hi Sims,

Here am referring to the Operator interface and not the sequence editor. I am referring to the executin comboBox (i.e) the combox box which contains the list of the various executions or sequences.

Thanks,

MadhuSri

0 Kudos
Message 3 of 10
(4,009 Views)

Hi Sims,

Here is the sample expression given to specify what information to display in each execution list combobox entry in the OI using C# interface:

axExecutionViewMgr.ConnectExecutionList(axComboBox1).DisplayExpression = @"""%CurrentExecution% - "" + (""%UUTSerialNumber%"" == """" ? """" : (ResStr(""TSUI_OI_MAIN_PANEL"",""SERIAL_NUMBER"") + "" %UUTSerialNumber% - "")) + (""%TestSocketIndex%"" == """" ? """" : (ResStr(""TSUI_OI_MAIN_PANEL"",""SOCKET_NUMBER"") + "" %TestSocketIndex% - "")) + ""%ModelState%""";

I have to modify this expression so that it indicates only the UUT Serial Number and Socket Index.

Please help me out with this as early as possible.......

Thanks,

MadhuSri

0 Kudos
Message 4 of 10
(3,994 Views)

Hi MadhuSri,

Try using this expression in your code. 

 

axExecutionViewMgr.ConnectExecutionList(axExecutionsComboBox).DisplayExpression = @"(""%UUTSerialNumber%"" == """" ? """" : (ResStr(""TSUI_OI_MAIN_PANEL"",""SERIAL_NUMBER"") + "" %UUTSerialNumber% - "")) + (""%TestSocketIndex%"" == """" ? """" : (ResStr(""TSUI_OI_MAIN_PANEL"",""SOCKET_NUMBER"") + "" %TestSocketIndex%""))";

0 Kudos
Message 5 of 10
(3,987 Views)

Hi Sims,

Thanks for the suggestion. It worked out the way expected. I would also like to know how to customize the Expression to display user-defined string along with the Serial Number (say: 'UUT Name followed by the Serial Number' Eg. 'Pump - UUT00001').

Thanks,

MadhuSri

0 Kudos
Message 6 of 10
(3,973 Views)

Hi MadhuSri,

There isn’t a TestStand property for the UUT Name.  There is only the UUT Serial Number.  You can manually add a string to the beginning of the expression.  Here is an example that adds UUT Name to the beginning:

axExecutionViewMgr.ConnectExecutionList(axExecutionsComboBox).DisplayExpression = @"(""UUT Name - "") + (""%UUTSerialNumber%"" == """" ? """" : (ResStr(""TSUI_OI_MAIN_PANEL"",""SERIAL_NUMBER"") + ""%UUTSerialNumber%""))";

0 Kudos
Message 7 of 10
(3,952 Views)

HI Tesmis,

Can you please explain the the display expression?

I would like to know what is the exepression ResStr(""TSUI_OI_MAIN_PANEL"",""SERIAL_NUMBER"") and from does it fetch the serial number......

Thanks and Regards

MadhuSri

0 Kudos
Message 8 of 10
(3,931 Views)
Hi,
 
In the ini file (UIControlOperatorInterfaceStrings.ini) a search for the Item SERIAL_NUMBER will be carried out in the section TSUI_OI_MAIN_PANEL and if found will return the string associated with SERIAL_NUMBER
eg
[TSUI_OI_MAIN_PANEL]
SERIAL_NUMBER ="Serial Number:"
 
If you want the actual serial number you would have to look at the property that is holding the this value
which would be %UUTSerialNumber% in MadhuSri repsonse.
 
Hope this is clear.
Regards
Ray Farmer
Regards
Ray Farmer
0 Kudos
Message 9 of 10
(3,927 Views)

Hi Farmer,

Thanks for your response. That makes me clear in understanding the expression.

On customizing the OI(in C#) i set the serial number for the batch UUTs at run time in the following path "RunState.Root.Parameters.TestSocket.UUT.SerialNumber". But after assigning i fine that %UutSerialNumber% is still empty. But in the reports generated, the set serial numbers are being displayed.

Now how am i to modify the display expression to display the UUT Serial Number.

Thank and Regards,

MadhuSri

0 Kudos
Message 10 of 10
(3,888 Views)