NI TestStand

cancel
Showing results for 
Search instead for 
Did you mean: 

Event CallBack in TestStand - Labview OI

Hi everyone,

 

i am using the simple interface for labview of teststand, i have modified the interface what i like, now what i want to do is when the user press the control button to execute a sequence the system ask the user for something and depending of it answer execute or not the sequence, for this i have create a new event callback, modifying the configure event callback.vi, what i introduce in the Reg Event Callback is that when StartExecution event starts it run the callback vi that contains the question to the user.

 

It works well because when the user press the run sequence control button or the restart contorl button, the system ask the user. But the problem is when the user press the exit control button, the system ask too.

 

Why occurs this, and how can i fix it??

 

Thank you in advance

0 Kudos
Message 1 of 2
(3,595 Views)

Hi Marith,

 

This behavior is occurring because the Application Manager automatically executes the FrontEndCallbacks sequence file when the Operator interface starts, and again as part of the shutdown.  To prevent this from occurring, we'll need to check that the execution is not the FrontendCallbacks execution before launching the dialog (the other case is "FrontEndCallbacks.Seq"):

 

1.png

 

You also may want to consider a couple alternative implementations:

 

  1. use the UImessage event to run the code when the UIMsg_ModelState_Initializing message is posted (when the process model begins executing)
  2. putting this code in the process model rather than the User interface - in this case we could just add a step in the setup of the model, and terminate the execution if the user chooses.
Al B.
Staff Software Engineer - TestStand
CTA/CLD
0 Kudos
Message 2 of 2
(3,425 Views)