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/Labview application

hello everyone, I am a beginner in teststand and i have trouble to synchronize between teststand and labview.

I have created a labview GUI wuith buttons and indicators, I have also created many sequences and I want to get following tasks

-> the operators push on 'start the test' , the sequence number 1 will be in mode Run and in parallel he get the information that the sequence is running, and when the sequence is finished , he get the pass or fail test . the test will be running several times ( every time we have another card to test in the first tab )and for every cards the operators push on 'start the test'. at the end of the test of the first tab , the operators push on the next tab and the test will be similar to the first but with another sequence .  I want the GUI be in run mode during the executing of the sequences . i have read all the manual teststand but i need more information .

i will appreciate your comments and suggestions.

thank you.

0 Kudos
Message 1 of 5
(3,991 Views)

If you want the execution of the sequence to interact with the operator interface, there are a couple of things you might find useful:

 

1) UIMessages (call RunState.Thread.PostUIMessageEx from the process model or your own sequences, handle the ApplicationMgr.UIMessageEvent).

2) TestStand synchronization step types such as notifications, locks, and queues. TestStand synchronization objects can be accessed both via the step types and programmatically via an API. To use the API start with Engine.GetSyncManager() API (see the API help for more details).

 

You could also potentially use labview synchronization if both the steps in your sequences and your UI are running in the same instance of the labview runtime. Basically you could call into labview using steps in your model or sequences.

 

Hope this helps,

-Doug

0 Kudos
Message 2 of 5
(3,943 Views)

Hi Doug,

Thank you for your answer even if i have a trouble to understand it . So I decided to run the GUI ( the monitor ) in another thread and than comunicate the other sub sequences and the GUI using a UI message.

please tell me with UI message can we set and get the variable during the execution of the sequence ??

 

0 Kudos
Message 3 of 5
(3,910 Views)

@EE_kholita wrote:

Hi Doug,

Thank you for your answer even if i have a trouble to understand it . So I decided to run the GUI ( the monitor ) in another thread and than comunicate the other sub sequences and the GUI using a UI message.

please tell me with UI message can we set and get the variable during the execution of the sequence ??

 


When you post a UI message you can pass almost anything for the activex data parameter, such as Locals.MyVar, Locals, or ThisContext itself. You can then access that object from the UI which handles the message. You should almost always post the message synchronously (a boolean parameter to the postuimessage API) because then the thread of the execution will be paused while the UI is handling the UImessage effectively synchronizing the operation to avoid race conditions. In order to use UI messages though you will need to customize one of the source code examples for the UIs that ship with TestStand, or write your own from scratch. If you want to instead show a UI in a new TestStand thread that is separate from the main UI application, you should use something like TestStand or LabVIEW queues for communication instead.

 

-Doug

0 Kudos
Message 4 of 5
(3,898 Views)

Hi Doug,

 

I am very sorry,  i didn't understand this part .If you want to instead show a UI in a new TestStand thread that is separate from the main UI application ??

i have just one UI and i run it in sub sequence in new thread and i call it in the mainsequence.

thank you

0 Kudos
Message 5 of 5
(3,891 Views)