From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.
We appreciate your patience as we improve our online experience.
From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.
We appreciate your patience as we improve our online experience.
02-26-2016 05:52 AM
(Sequential Model + Simple Operator Interface)
Is it possible to Automaticaly close each execution after the sequence and reporting is done ?
Can someone give an example of how to set the "ApplicationMgr.SetAutoCloseExecution" if that is the relevant thing to do .....
02-26-2016 05:57 AM
@NikolajEgeskovOstergaard wrote:
[...]Can someone give an example of how to set the "ApplicationMgr.SetAutoCloseExecution" if that is the relevant thing to do .....
Add this to the Config AppMgr VI in your UI.
Norbert
02-26-2016 08:06 AM
hi
so that would not be something to set in the sequence ?
Can you elaborate on how to implement that in the "simple operator interface" (attached)
thanks
02-26-2016 08:26 AM
The Application Manager is something which is present in UIs. You should not implement code in a sequence depending on specific UIs!
You will add this in the LoadForm before you call AppMgr.Start.
Norbert
02-29-2016 04:13 AM
Below is my mainform _load code.
axApplicationMgr.SetAutoCloseExecution( ????, true);
What do i need as "reference" to the execution ?
private void MainForm_Load(object sender, System.EventArgs e) { try { // If this UI is running in a CLR other than the one TestStand uses, // then it needs its own GCTimer for that version of the CLR. If it's running in the // same CLR as TestStand then the engine's gctimer enabled by the ApplicationMgr // is sufficient. See the API help for Engine.DotNetGarbageCollectionInterval for more details. if (System.Environment.Version.ToString() != axApplicationMgr.GetEngine().DotNetCLRVersion) this.GCTimer.Enabled = true; // connect TestStand comboboxes axSequenceFileViewMgr.ConnectSequenceFileList(axFilesComboBox, true); axSequenceFileViewMgr.ConnectSequenceList(axSequencesComboBox); // specify what information to display in each execution list combobox entry (the expression string looks extra complicated here because we have to escape the quotes for the C# compiler.) axExecutionViewMgr.ConnectExecutionList(axExecutionsComboBox).DisplayExpression = @"""%CurrentExecution% - "" + (""%UUTSerialNumber%"" == """" ? """" : (ResStr(""TSUI_OI_MAIN_PANEL"",""SERIAL_NUMBER"") + "" %UUTSerialNumber% - "")) + (""%TestSocketIndex%"" == """" ? """" : (ResStr(""TSUI_OI_MAIN_PANEL"",""SOCKET_NUMBER"") + "" %TestSocketIndex% - "")) + ""%ModelState%"""; // connect sequence view to execution view manager axExecutionViewMgr.ConnectExecutionView(axSequenceView, ExecutionViewOptions.ExecutionViewConnection_NoOptions); // connect report view to execution view manager axExecutionViewMgr.ConnectReportView(axReportView); // connect TestStand buttons to commands axExecutionViewMgr.ConnectCommand(axCloseExecutionButton, CommandKinds.CommandKind_Close, 0, CommandConnectionOptions.CommandConnection_EnableImage); axApplicationMgr.ConnectCommand(axTerminateAllButton, CommandKinds.CommandKind_TerminateAll, 0, CommandConnectionOptions.CommandConnection_EnableImage); //axApplicationMgr.ConnectCommand(axLoginLogoutButton, CommandKinds.CommandKind_LoginLogout, 0, CommandConnectionOptions.CommandConnection_EnableImage); axApplicationMgr.ConnectCommand(axExitButton, CommandKinds.CommandKind_Exit, 0, CommandConnectionOptions.CommandConnection_EnableImage); axSequenceFileViewMgr.ConnectCommand(axOpenFileButton, CommandKinds.CommandKind_OpenSequenceFiles, 0, CommandConnectionOptions.CommandConnection_EnableImage); axSequenceFileViewMgr.ConnectCommand(axCloseFileButton, CommandKinds.CommandKind_Close, 0, CommandConnectionOptions.CommandConnection_EnableImage); //axSequenceFileViewMgr.ConnectCommand(axEntryPoint1Button, CommandKinds.CommandKind_ExecutionEntryPoints_Set, 0, CommandConnectionOptions.CommandConnection_EnableImage); axSequenceFileViewMgr.ConnectCommand(axEntryPoint2Button, CommandKinds.CommandKind_ExecutionEntryPoints_Set, 1, CommandConnectionOptions.CommandConnection_EnableImage); //axSequenceFileViewMgr.ConnectCommand(axRunSelectedButton, CommandKinds.CommandKind_RunCurrentSequence, 0, CommandConnectionOptions.CommandConnection_EnableImage); //axExecutionViewMgr.ConnectCommand(axBreakResumeButton, CommandKinds.CommandKind_BreakResume, 0, CommandConnectionOptions.CommandConnection_EnableImage); //axExecutionViewMgr.ConnectCommand(axTerminateRestartButton, CommandKinds.CommandKind_TerminateRestart, 0, CommandConnectionOptions.CommandConnection_EnableImage); // show all step groups at once in the sequence view axExecutionViewMgr.StepGroupMode = StepGroupModes.StepGroupMode_AllGroups; axApplicationMgr.SetAutoCloseExecution( ????, true); axApplicationMgr.Start(); // start up the TestStand User Interface Components. this also logs in the user }
02-29-2016 04:51 AM
Ah, ok, sorry that i messed that one up.
As you require a specific execution as parameter, the position is the code i stated before is not correct.
I hope you are familiar with UI Messages. You can use as example the UIMsg StartExecution to configure this. You have to pass the AppMgr to the callback in such case as user parameter.
Norbert