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.
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.
10-19-2010 08:21 AM
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 ?.
Solved! Go to Solution.
10-19-2010 08:46 AM
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 )
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
10-19-2010 10:07 AM
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.
10-19-2010 12:06 PM
@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 )
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)
10-20-2010 07:32 AM
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.
08-29-2011 09:05 AM
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 ?
08-30-2011 08:20 AM
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.