NI TestStand

cancel
Showing results for 
Search instead for 
Did you mean: 

Easiest way to implement a network wide lock/semaphore

Solved!
Go to solution

I was trying to think of a way to implement a network wide lock/semaphore. The application is that there are two computers on a network running TestStand. There is a common resource that only one of them can use at a time. What's the best way to keep them "aware of each other".

 

I was thinking maybe a small custom TCP/IP routine that negotiates that resource or a shared variable in LabVIEW. I've also thought about using remote sequence execution in TestStand. Anyone done something like this before?

 

Example code/sequences are always appreciated. 

Message Edited by InfiniteNothing on 11-24-2009 11:17 AM
CLED (2016)
0 Kudos
Message 1 of 5
(3,924 Views)

Is this a VISA device? You might be able to use remote VISA sessions and VISA Lock Async to control simultaneous access.

 

Remote Instrument Control with NI-VISA

 

VISA Lock Async

 

 


Now is the right time to use %^<%Y-%m-%dT%H:%M:%S%3uZ>T
If you don't hate time zones, you're not a real programmer.

"You are what you don't automate"
Inplaceness is synonymous with insidiousness

0 Kudos
Message 2 of 5
(3,914 Views)
Solution
Accepted by topic author InfiniteNothing

You can use a TestStand Lock (or any synchronization operation) across the network by prefixing the lock name with \\MachineName\.

 

Use the same MachineName for both machines and they will both operate on the same Lock, which will reside on MachineName.

 

Also, check out Setting Up TestStand for Accessing Synchronization Objects Remotely in Appendix B of the Reference Manual.

Message 3 of 5
(3,907 Views)
That sounds like what I was looking for! I'll try it now.
Message Edited by InfiniteNothing on 11-24-2009 12:53 PM
CLED (2016)
0 Kudos
Message 4 of 5
(3,902 Views)

I know this thread is kinda old but I still feel like the remote synchronization is not documented well enough.

 

I already set up DCOM and Firewall, now I am trying to test Lock in local network.

By "MachineName" you mean the name of the PC?

What is the exact naming convention?

What "Lock Operation Lifetime" to select?

How do I know if it is going to work?

 

KrzysztofKrypczyk_0-1683884651435.png

 

 

0 Kudos
Message 5 of 5
(696 Views)