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.

NI TestStand

cancel
Showing results for 
Search instead for 
Did you mean: 

Teststand simple UI

Solved!
Go to solution

Hello

 

I want to use the simple UI (CSharp) from the Teststand 2013 tutorials as a starting point for a new UI. In this new UI i want to sent messages (button press) from the UI to the running sequence and i want to change Fileglobals. How do i do this ?

I menaged to update the UI from my running sequence using message but now i want the other way around. From UI to sequence

 

Thanks in advance

0 Kudos
Message 1 of 5
(2,339 Views)
Solution
Accepted by topic author Tonnie

Hello,

 

A very simple way of doing this is using StationGloblas. You can access the StationGlobals from the UI using the Engine reference (Globals Property), and programmatically access to property contained in StationGlobals. Drawback, there is no event link between UI and sequences, you have to pool on variables expecting a change, or something like that.

 

Much less simple, it is also possible to trigger a TestStand Notifier from the UI, using the SyncManager to call the GetNotification method. You can this way get a reference to a named Notification, created in your sequence for instance, wait for this notification in the sequence, and use the SetEx method to trigger an action in the sequence (with optional arguments). This implies to handle timeout, error handling, and others stuffs... 

 

There is something to think about with this kind of mecanism, is how the sequence behave in development mode, i.e. using the NI Sequence Editor (SeqEdit) if you implement mecanisms specific to your user interface.

 

Hope this helps...

0 Kudos
Message 2 of 5
(2,291 Views)

Hello Mathue

 

Sorry for the late replay.

It helped me a lot thanks

Message 3 of 5
(2,250 Views)

You're welcome.


In the end, wich mecanism did you use ? StationGlobals or Notifiers ?


Best regards,

0 Kudos
Message 4 of 5
(2,234 Views)

I use notifiers

 

Thanks a lot

 

with kind regards

Tonnie

0 Kudos
Message 5 of 5
(2,167 Views)