07-19-2010 03:06 AM
Hi Brian,
If I develop a LXI instrument, what would happen if two persons want to control it at the same/similar time?
Thank you in advance.
07-19-2010 10:09 PM
That's a great question. When I first got involved with LXI in 2005, we held a plugfest to study this question, and we've been discussing what to do about this ever since.
First of all, LXI doesn't try to address malicious attacks on your test system. It's assumed that you will use network firewalls for stuff like that.
So really, it's just a matter of preventing accidental attempts to access devices from more than one place.
VXI-11, the network protocol commonly used for LXI devices, defines a locking scheme when you use VISA to talk to the devices. As long as everybody uses viLock() and viUnlock() (in LabVIEW, they're called VISA Lock and VISA Unlock), then only one connection is allowed to proceed at a time.
There are, however, a few issues with that...
* There's nothing to enforce the use of the locking function calls. So if somebody forgets, you can interrupt other operations in progress.
* If someone has the lock when someone else is just trying to discover what instruments are on the network, the discovery might timeout/fail.
* Some instruments don't support more than one VXI-11 connection at a time anyway. (Those that don't have enough RAM/processing power to support it.)
* Some instruments don't fully implement VXI-11 for communications... just enough for discovery.
* All LXI devices have other ways to access them. For example, all LXI devices have builtin web servers. If someone has a VXI-11 lock, should it lock the web page? Or only allow read-only access? Some instruments support VXI-11, plus straight socket connections, too, and you have to lock across multiple interfaces. In general, the philosophy is to only allow one "write" access at a time, but it's unclear what the various implementations from vendors actually do.
Good news...
* mDNS, which is the new discovery mechanism for LXI, doesn't require locking to work.
* HiSLIP, a new networking protocol which replaces VXI-11, supports locking, and may be required for future LXI instruments.
So as the LXI standard evolves, you will see some of the issues with locking go away. I'm unable to comment on when that will be.
07-20-2010 02:03 AM
I am now starting trial implementation of HiSLIP to our existing LXI/VXI-11 device, so I am glad if I can try the test version of NI-VISA supporting the new protocol.
07-20-2010 07:42 AM
That's good news. Please send an email to support@ni.com to make the request. Ask that the message be forwarded to the "VISA PSE" (product support engineer).
If you run into any roadblocks, let me know. I do not know if they are ready for external testing, but it doesn't hurt to ask, and get your name on their list of testers.
Good luck.
Brian