From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, 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: 

Queue data sharing between multiple LabVIEW Executables

Solved!
Go to solution

I have 2 LabVIEW Executables(Exe) where one Exe produces data and other one consumes the same. Is there anyway I can use a single queue reference for the same ? First Exe obtains the queue reference number and stores the reference number in V.I.G where as the second Exe read this reference number from this V.I.G. The error from the second VI dequeue was invalid queue reference.

Is there anyway I can share the same data between different exes with the functionality of a queue ?.





0 Kudos
Message 1 of 7
(6,776 Views)
Solution
Accepted by topic author manumohannair

Each exe is mapped into its own memory space so refs to resource in one context will not work in another but...

 

If you exposed an Action Engine in one instance to be used via VI server Invoke Node from the other, the AE (Note: it will be running in the server context) could queue the data in behalf of the client.

 

Plese note:

 

If the server porcess goes idle all of its resource will be invalidated (including the queue) but a ref to the AE will still be valid. In this case the enqueue op will fail so you have to code to account for this situation. (been there done that Smiley Surprised )

 

This smae approach will work in any network architecture where VI serve can be used. I used this approach about 10 years ago (minus the queue) to allow control of a factory floor from a laptop with a internet connection.

 

Ben

Retired Senior Automation Systems Architect with Data Science Automation LabVIEW Champion Knight of NI and Prepper LinkedIn Profile YouTube Channel
Message 2 of 7
(6,765 Views)

For one-one transfers I have used network shared variables with buffering.  In LV2010 you now have network streams which are guaranteed to be lossless.

Message 3 of 7
(6,755 Views)

 


@Ben wrote:

Each exe is mapped into its own memory space so refs to resource in one context will not work in another but...

 

If you exposed an Action Engine in one instance to be used via VI server Invoke Node from the other, the AE (Note: it will be running in the server context) could queue the data in behalf of the client.

 

Plese note:

 

If the server porcess goes idle all of its resource will be invalidated (including the queue) but a ref to the AE will still be valid. In this case the enqueue op will fail so you have to code to account for this situation. (been there done that Smiley Surprised )

 

This smae approach will work in any network architecture where VI serve can be used. I used this approach about 10 years ago (minus the queue) to allow control of a factory floor from a laptop with a internet connection.

 

Ben


 

Do you think the same must work with following scenario:

1. LabVIEW Exe calling a data acquisitio thread dynamically(VI Server) and enqueue the data into a Queue with reference in VIG.

2. Same Exe calling a TestStand Engine and one sequence inside that calling the same queue to dequeue the data.

3. Remember that the LabVIEW adapter I use with TestStand is LabVIEW Run-Time Engine(Not development system)





0 Kudos
Message 4 of 7
(6,736 Views)

If your two executables are on the same machine, you can launch them into the same process.  To make what you would like work, you will also need a shared codebase.  However, it will certainly work.  Check out this post for how to launch two LabVIEW executables into the same process.  If you need more info, let us know.

0 Kudos
Message 5 of 7
(6,707 Views)

I would be interrested to know how to run multiple LV exes in the same process. Would it be possible to explain it in this thread or redirect me to a thread that discusses it ?

0 Kudos
Message 6 of 7
(5,902 Views)

My previous post has a link to a thread which discusses this technique and includes sample code.  The blue link color is probably not that obvious.

0 Kudos
Message 7 of 7
(5,873 Views)