By John Lokanis
I am running into an issue where my VI Server connection goes stale after a few hours. Looking for a fast way to detect this and recover.
Currently here is what I am doing:
On first call, open the application reference and then open the VI reference. Cache both of these. Use the VI reference to call the remote VI. On subsequent calls, test the cached references to verify they are still valid and then call the remote VI. What appears to be happening is the references still appear to be valid in the caller but the connection is broken so the remote call fails. Then I detect this and reopen the app and VI refs and can again call the remote VI.
The issues are:
The failing remote call takes a long time to timeout and I do not see how to control this timeout. The test of the refs does not actually test to see of the network connection is still good. The result is it takes a long time to recover and this is upsetting the user since it appears the system is locked up.
What I need is a way to control the timeout of the 'call by reference' node or a way to quickly test the references to verify the network connection is still good before I attempt the remote call.
By Gan Uesli Starling
Attached is my VI for writing a tiny HTML file to a intranet network directory. This is on Windows for writing to a file path like \\foo\bar\wtf.html (fictional!). But when the network is slow (quite often) the file write will fail.
I've got a patch in there so survive the error and just wait till next time. But what really I need is a way to tell the write to hang in there longer and not give up just because there's no reply yet.
My temporary work-around is to open a Windows file browser to that path, the twiddle my thumbs until the file list populates. Then, the path being established, I may safely start the parent VI of which this VI is a sub.
I'm wondering whether there is a way to monitor the SVE (or single processes/variables) on a per-client basis. The purpose of this would be network diagnostics or access control. I know the DSC module allows logging of data and events for shared variables, such as the very handy "value changed" event, but they contain no client-related information (to my knowledge), such as the client name or IP address. Are there any other shared variable events besides the value changed notification (e.g. "variable accessed"), which I have missed?
Anyway, the SVE seems to be aware of clients, because it allows some access control through the DSC module (and with a bit of hacking even programmatically). You can define access control lists based on computer name or IP address, which is very buggy, but it works somewhat. Is it possible to somehow access this client information (number of clients, names/addresses and activities) from the SVE? I don't see any tools for that, but maybe there is an underlying API through DLL calls or whatever?
Submitted: 27 Aug 2011
Category: Remote Control, Monitoring and the Internet
LabVIEW Version: 2009License Type: Other (included with download)
Transport.lvlib is a LabView API to simplify and accelerate networked communication development.
It simplifies development by abstracting TCPIP, UDP and Bluetooth and TLS interfaces
into a single polymorphic vi which is a thin wrapper around the conventional
open, read, write, close and listener VIs for all the network interfaces.
Supports TCP/IP, Bluetooth, UDP (p2p, broadcast and multicast) and TLS.
Supports symetric encryption (blowfish).
Supports compression (zlib).
Run the supplied installer and follow the instructions.
Click here to download this file
By John Lokanis
I need to find a transport for message objects that allows two way communication without polling but is limited to server side connections only. So, the client can connect to the server but the server cannot connect to the client.
First some context: My application communicates over the network using VI Server. My client app (the UI) opens a ref to a VI in my server app (the engine) and sends a message object containing the client app’s machine name and VI server port. The server app then opens a ref to a VI in my client and sends a message object with the reply data. I now have a two way communication channel via VI server and can pass any message object back and forth without polling.
I learned today that our IT department plans to block all incoming connections to all non-server machines in the future. So, my client would still be able to connect to the server app within the network, but the server would not be able to connect to the client app because of this rule. This will completely break my networked messaging system. I do not know a way for LabVIEW to setup VI Server so only one end can connect to the other but allow two way communication without polling.
Does anyone use a message system that would work in my situation? I would prefer to continue to use VI Server but I am willing to look at other solutions, as long as they were very robust and had low latency.
thanks in advance for you help.