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.
05-22-2012 02:04 AM
Hello,
Is this the best way??
When I have to catch the control of many instruments to do a test.
I create a NEW thread for instrument (This sequence is a state machine.... StationGlobal.Enable for activate the instruction).
In the mainsequence when i have to use an instrument -->StationGlobal.Enable = True ,.... and now i have to wait to the end of the instruction.
To do this, I use in my mainsequence a WHILE StationGlobal.Enable = True .... Wait........... Is this the best way to syncronize my sequences ????
Thxs !
Solved! Go to Solution.
05-22-2012 10:51 AM
I would recommend taking a look at the Synchronization examples in TestStand.
C:\Documents and Settings\All Users\Documents\National Instruments\TestStand 2010\Examples\Synchronization
05-22-2012 12:10 PM
The TestStand queue and/or notification steps types would probably be a better way to do this.
-Doug
05-22-2012 02:09 PM
Many thxs for the answers !
I used the same system with labview. Only one aplication (Exe) with one event machine, and 1 state machine for each instrument.. The control of state machines is by queues.
In teststand i think that is the best way,.... But now i have the control of instruments in diferents threads... And i need know when 1 instrument ended his instruction to continue with the main aplication.
Which is the way to say at mainsequence that can continue with next step !
05-24-2012 06:43 AM
Hi,
StationGlobals are not the best way to do this.
You may use a FIFO, just send from your instrument thread a message in a queue/notifier that the required action has been completed!
Regards,
05-30-2012 01:30 AM
Hey ,
Result with Queue /Notification is a good way.
Now I have a new problem using this !! The control of threads are a state machines... 1 while with a Dequeue expresion... The value of the queue is the instruction to do in the state machine.... At the end of the while there are a StationGlobal.Stop... If the variable is True now the thread stops.
The StationGlobal.Stop changes the value when a user push the stop button in the user interface (LabVIEW) !
How can I say at the state machin /Dequeue Thread that exist a stop event???
Thxs !
05-30-2012 01:50 AM
To do this in dequeue expresion, I've activate the Timeout. Is this the correct way?
05-30-2012 02:23 AM
The best way would be to enqueue a stop message (you can use the timeout to check if a variable is set to a particular value too but it's not the best practice (since it works you can use this))