NI TestStand

cancel
Showing results for 
Search instead for 
Did you mean: 

DisplayName of Execution

Is there a way to influence the DisplayName of an Execution?

 

Background: I assume that the (read-only) DisplayName of the Execution is what the Execution list (left side of the Operator Interfaces) shows. In our setup, several parallel executions are running with the same main sequence, so they all get the same DisplayName (something like "MainSequence - Base.seq"). The main sequences call different sub sequences for the actual tests, but the user does not have an indication in the Operator Interface which is which.

 

Best regards

 

Peter

0 Kudos
Message 1 of 7
(4,930 Views)

Peter,

 

are the execution started by a single process model?

Please note that the GUI uses a "DisplayExpression" to label executions. The expression in the Simple UI (LV) is the following:

"%CurrentExecution%\n" + ("%UUTSerialNumber%" == "" ? "" : (ResStr("TSUI_OI_MAIN_PANEL", "SERIAL_NUMBER") + " %UUTSerialNumber%\n")) + ("%TestSocketIndex%" == "" ? "" : ResStr("TSUI_OI_MAIN_PANEL", "SOCKET_NUMBER") + " %TestSocketIndex%\n") + "%ModelState%"

 

You can change it to your needs to have a unique name per execution.

 

Norbert

Norbert
----------------------------------------------------------------------------------------------------
CEO: What exactly is stopping us from doing this?
Expert: Geometry
Marketing Manager: Just ignore it.
Message 2 of 7
(4,897 Views)

Thank you, Norbert;

 

I found that string in the C# UI code, it is the same. But I cannot quite match it to what I am seeing in the UI.

 

In our application, the list is

 

SinglePass - OMSStart.seq[3]
Testing
_TECMain - OMSStart.seq[4]
Running
_TECMain - OMSStart.seq[5]
Running
SinglePass - Test Socket Entry Point - OMSStart.seq[6]
Testing

Testing / Running verstehe ich, das ist der %ModelState%. Die laufenden Sequenzen stammen auch alle aus OMSStart.seq, das ist richtig, aber den Sequenznamen sehe ich gar nicht in dem Displaystring und der Index dort ist der TestSocketIndex und der müsste hier überall gleich sein, weil nur ein Socket läuft (aber mehrere parallele Executions von dort gestartet werden).

 

Peter

0 Kudos
Message 3 of 7
(4,882 Views)

Peter,

 

nice mix between German and English 🙂

 

The number you are seeing in the brackets ([]) is the number of the execution, not the socket. If there are several sockets, the displayed name would add "Socket: <socketnumber>".

 

After digging a little deeper, it currently seems to me that the display name has a static content: <ExecutionEntryPointName> - <SequenceFileName>.

Everything which follows is defined by the "DisplayExpression".

 

What is your goal for the complete expression to look like?

 

Norbert

Norbert
----------------------------------------------------------------------------------------------------
CEO: What exactly is stopping us from doing this?
Expert: Geometry
Marketing Manager: Just ignore it.
0 Kudos
Message 4 of 7
(4,877 Views)

Hm, too late for EDIT... so it is an ADDON.

 

I reviewed the documentation for "CaptionSources" and it is that '%CurrentExecution%' is the macro for <ExecutionEntryPoint> - <SequenceFileName> and the execution number.


I think you will find the chapter "CaptionSources Enumeration" a very useful source of information in order to adopt the display name to your needs.

 

Norbert

Norbert
----------------------------------------------------------------------------------------------------
CEO: What exactly is stopping us from doing this?
Expert: Geometry
Marketing Manager: Just ignore it.
0 Kudos
Message 5 of 7
(4,873 Views)

Thanks again and sorry for the English/German mix; it was somehow complete in my mind in German.

 

I have the following situation: most executions run the same Command/State-Loop which is in a sequence inside our core sequence file. Upon specific commands, this sequence calls back into other sequence files - and these are different for each execution. So for example, on a start command, I will have something like

 

  • Execution 1 -> SequenceCall into AcquireData.seq
  • Execution 2 -> SequenceCall into EvaluateData.seq
  • Execution 3 -> SequenceCall into ReportData.seq

The difference for the user is the sequence called into, so this is what I would like to have displayed. Unfortunately this is no property of the original sequence or sequence file, it is read from a configuration at startup.

 

I see a possible way using the CaptionSource_CurrentSequenceFileComment which I guess can be set through the PropertyObjectFile API. Unfortunately this one is not available in the Macro Expression. Would there be a better way?

 

In another vein: might it be helpful if we cast that command and state structure into a process model of our own (so far we have only used callbacks to customize NI process models)?

 

Best regards

 

Peter

 

 

0 Kudos
Message 6 of 7
(4,850 Views)

Peter,

 

OK, this is honestly not very intuitive. But i think i figured it out 😉

 

Connecting Captions to visible controls using Macros has one important "feature":

Macros do not update the visible caption automatically!

There has to be a specific situation in order for the visible control to update the new caption. Essentially, we are talking about UIMsgs.

 

Two Examples:

1. UUT SerialNumber:

If you want to display the SerialNumber in the caption, you would stick to the Macro %UUTSerialNumber% (or the extended version in the default "DisplayExpression" of the UI). But if you include a step in your sequence which modifies the UUTSerialNumber, it will not update the Caption!

Reading the documentation of the CaptionSource_<> connections, you will finde the following sentence for CaptionSource_UUTSerialNumber: A process model sends the UUT serial number through the UIMsg_ModelState_Identified UIMessageCode.

So adding an expression RunState.Thread.PostUIMessageEx(UIMsg_ModelState_Identified,0,RunState.Root.Locals.UUT.Serialnumber,Nothing,True) in/after the step which modified the serial number, the Caption will update!

2. Current Sequence:

Adding the Macro %CurrentSequence% in the DisplayExpression will auto-update the Caption as each time, the execution changes the active sequence, the engine will send appropriate UIMsgs to reflect that. I assume that the UIMsg used for this is "Trace" as disabling tracing also disables the update of %CurrentSequence%.

 

I think these two examples should be sufficient to point out where you have to look.

 

Norbert

Norbert
----------------------------------------------------------------------------------------------------
CEO: What exactly is stopping us from doing this?
Expert: Geometry
Marketing Manager: Just ignore it.
Message 7 of 7
(4,846 Views)