05-09-2006 02:17 AM
05-09-2006 05:45 PM - edited 05-09-2006 05:45 PM
Hello,
Clients subscribe to the published variable on the server - the terminology often used with shared variables is simply subscribers and publishers. There is actually a good document discussing requirements and pitfalls when attempting to do this, but it isn't live on the web yet. I have also included a couple links below, one of which is to a tutorial which is quite descriptive about the NI-PSP protocol from a high level. Here's an excerpt from it, followed by the relevant contents of the document which isn't yet live on the web:
Excerpt from the "Using the LabVIEW Shared Variable" tutorial also linked below:
"In order to use network-published shared variables, an SVE must be running on at least one of the nodes in the distributed system. Any node on the network can read or write to shared variables that the SVE publishes. As shown in Table 1, nodes can reference a variable without having the SVE installed. You also might have multiple SVEs installed on multiple systems simultaneously if you need to deploy shared variables in different locations based on application requirements."
Document Contents Not On-line Yet:
How do I Communicate Between Multiple LabVIEW Executables using Shared Variables?
Problem: I have developed two Executables and need to pass data between the two, how is this done using Shared Variables?
Solution: In order to communicate between multiple executable applications using the shared variables it is important to use one LabVIEW Project that contains all of the Build Specifications for each Executable that is to be built.
In order to use Shared Variables they must be deployed, and when using them with Executables, it is important to explicitly do this as it cannot be automatically achieved as it normally can within the LabVIEW Environment.
This is best achieved programmatically using VI Server and is fully documented in the following document:
How Do I Deploy Network Shared Variables From a Compiled Executable?
One common pitfall is including the Project Library that hosts the Shared Variable(s) within the Executable itself as this is the default destination. Whilst configuring the Build Specifications settings, remember to change the Library's Destination to the Support Directory or another Pre-defined Directory.
An example project is attached to this document and can be used to demonstrate the behaviour. Remember to check through all of the Build Specification Settings in order to resolve any file paths to suit the local machine.
See also these resources:
1. Troubleshooting Network-Published Shared Variables
2. Using the LabVIEW Shared Variable
If you find these resources insufficient or you have other questions, definitely repost here!
Best Regards,
JLS
Message Edited by JLS on 05-09-2006 05:46 PM
05-09-2006 08:15 PM
05-10-2006 10:16 AM
05-11-2006 03:46 AM
05-11-2006 04:05 AM
I forgot to mention about something else. How effective would network share variables be used for publishing data from acquisition devices? I have tried publishing 1 Channel of acquisition data sampled at 200kHz using network shared variables without buffering and with the subscriber program running on the same computer and was losing same data on my subscriber program. I have switched to using the basic TCP/IP protocol instead and everything works well without any problems. Does it mean that the network shared variable method is inferior to TCP/IP method? I thought it was mentioned on the internet that network shared variables can be use with real time targets from remote acquisition and monitoring?
Anyone has any experience to share on how they have used network shared variables for this kind of work and what was the size of the data being transferred.
Cheers,
KP
05-12-2006 12:55 PM
11-19-2007 10:20 AM
11-20-2007 09:05 PM
11-24-2007 04:17 AM