From 04:00 PM CDT – 08:00 PM CDT (09:00 PM UTC – 01:00 AM UTC) Tuesday, April 16, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Collecting data from multiple stand-alone LV programs

I have multiple stand-alone LV vi's. (example: LV program for controlling a DC Power Supply, a LV program for controlling an Electronic Load, a LV program for controlling an Oscilloscope, and a LV program for a DMM).....you get the idea.  Each of these programs can run independently as needed.  I have also made a LV program that calls an instance of each of these programs as needed, depending on a particular projects needs. The "central" program that calls each of these LV programs is also responsible for collecting and compiling Data produced by the independent program.  Currently, I am using Shared Variables to pass the data to the Data collector.  I was wondering if there was a better way to pass data between independently running VIs.  The Shared Variable Engine occassionlly gives me errors if the program has been running for long periods.  I've thought about using FGVs, but not sure how well that would work.  Any suggestions?

0 Kudos
Message 1 of 6
(3,152 Views)

FGV do not work between different applications (EXE).

If you stick to the multi-EXE approach, you should either

a) Implement a proper TCP interface to pass data - or -

b) Use a database

Norbert
----------------------------------------------------------------------------------------------------
CEO: What exactly is stopping us from doing this?
Expert: Geometry
Marketing Manager: Just ignore it.
0 Kudos
Message 2 of 6
(3,138 Views)

@Norbert_B wrote:

FGV do not work between different applications (EXE).

If you stick to the multi-EXE approach, you should either

a) Implement a proper TCP interface to pass data - or -

b) Use a database


 

If they are served via VI Server, they do work... even across network connections.

 

Ben

Retired Senior Automation Systems Architect with Data Science Automation LabVIEW Champion Knight of NI and Prepper LinkedIn Profile YouTube Channel
0 Kudos
Message 3 of 6
(3,132 Views)

I'm not acually using the stand-alones in .EXE form. The VI's are contained within a single project.

0 Kudos
Message 4 of 6
(3,107 Views)

The recommended way to transfer data inside a single application (multiple concurrent running VIs) are queues.

Norbert
----------------------------------------------------------------------------------------------------
CEO: What exactly is stopping us from doing this?
Expert: Geometry
Marketing Manager: Just ignore it.
0 Kudos
Message 5 of 6
(3,102 Views)

I'm a little confused.  You have a program that can run Stand-Alone that does something and produces data.  What does the Stand-Alone program do with the data?  Does it save it to disk?

 

Now you want another, Controller, program to run the Stand-Alone program (which, when run by itself, does something with its data), and you want the Controller program to (also?) get the data.  See the confusion?  Who's In Charge?

 

Now, you could set up your Stand-Alone program to "Have your Cake and Eat It, Too".  When it starts, it could check and see if anyone was trying to establish a Network Stream with it.  If so, it would "save" its data to the Network Stream, and if not, it would save to disk.  Your Controller, sneaky as it is, would say "I'm going to call the Stand-Alone Program (probably via a System Call to run an Executable), but first I'll start a loop asking it to establish a Network Stream with me so that I get the data".  So if Stand-Alone is started by Controller, who is asking for a Network Stream, it "sees" the Network Stream request and sends the data to Controller.  If, however, the Human starts Stand-Alone, Controller is not running, noone is asking for a Network Stream, so Stand-Alone happily writes to disk.  [I just thought up this hare-brained scheme ...].

 

Bob Schor

 

P.S. -- I really like Network Streams for inter-program communication, can you tell?

Message 6 of 6
(3,061 Views)