LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

shared variables between client server

I have a Server (of sorts) that is always running.  The clients, however, are going to come and go.  What I mean is that I plan to kick off the server (from TestStand) in its own thread- server is basically a producer/consumer.  Then TestStand will call test VIs one by one.  Each (when running) will be the client - there is only ever one client at any one time.  The client determines pass/fail and tells TestStand, then stops executing.  TS then calls the next (client) test and we repeat the above sequence.   The client will send a command to the server by putting data into the shared variable.  At the server (if this will work), I plan on setting up an event that triggers on “Value Changed” of the shared variable.  The server performs the client request and replies to the client, most likely through a different shared variable. 

I’m trying to find the best way to share data between two VIs – actually just one that works and that I understand.  I’ve looked into Network Queues, but I’m not completely following the example I found in a different thread.  All the shared variables will be on the same PC, but different VIs (of course) contained in different labview projects.  Thoughts?

0 Kudos
Message 1 of 2
(3,015 Views)

Hi mrbean,

 

I think that shared variables will be the  easiest method for you. You need to bind the shared variables together.  You can then deploy both libraries and the data will get passed from one project to another.  The link below discusses sharing variables between two PC's, but the same principle can be applied to two projects on the same computer.  Also take a look at the link at the bottom which provides a detailed introduction to shared variables.

 

How Do I Set Up Shared Variables to Communicate Between Two PCs?

http://digital.ni.com/public.nsf/allkb/7815BCE435DCC432862575DA006FEBF8?OpenDocument

 

 

Nick Keel 

Applications Engineering 

National Instruments

Nick Keel
Product Manager - NI VeriStand and Model Interface Toolkit
National Instruments
0 Kudos
Message 2 of 2
(2,989 Views)