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.
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?
"Write INI Cluster__ogtk.vi" is rounding numbers in several 1D arrays buried in my super cluster. I am using Producer-Consumer with Supercluster archtecture, so my SC is somewhat deep. The numbers being affected are doubles within arrays within a cluster within a cluster within an array within the Supercluster. I created a work-around in the attached vi with standard NI config file libs.
My desire was to have Scientific notation with 7 significant digits. The number was 2.002252E-3. The JKI routine converted this into 0.002002 and dropped 3 digits that were significant parts of a calibration polynomial. The anomoly occurred for only in numbers with "E-3" values. E+n, E-6, E-9 values were not affected although the system would change the exponent and shift the decimal sporatically. The standard LabVIEW NI_LVConfig.lvlib:Write Key.vi does not have this problem as you will see in the work-around but does also have the habit of changing the Sci notation around to something other than n.nnnnnnE-n. It hasn't cause any loss in precision but had done things like changing -1.78569E-5 into -17.856900E-6. I guess it prefers the standard 3, 6, 9 format for exponents.
This utility happens to be my number one library for saving all system settings of interest between runs. Designed to work with a SC. Went thru much gnashing of teeth to fidure out what is acceptable items to put in the cluster. Dynamic variables like DAQmx Task references will just cause "Write INI Cluster__ogtk.vi" to fail. Since I don't need dynamics, this is fine. Every time the user edits a GUI cluster (system settings), I kick off an even that pushes all settings of interest out to the config.INI file.
Hope This Helps and Enjoy,
Stanley Black & Decker
JKI INI File Save - Number Precision issue.zip
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