NI TestStand

cancel
Showing results for 
Search instead for 
Did you mean: 

passing data from one labview exe to another

Hi,
 
I think it should be simple, but right now, I am in fix.
 
All I want to do is pass some data from one labview exe to the other labview exe. I need to trigger some event to an already running exe by running another exe.
 
I want to use TestStand for the same.
 
Plz tell me how to do it.
 
i.e. I want to call the first labview exe in step - 1 of TestStand
then keeping the front panel of the first application running I want to invoke the second lv exe.
Then I want to pass some data from the second lv exe to the first lv exe.
 
Regards
Sreedhar
0 Kudos
Message 1 of 15
(6,252 Views)

Well, if you have LabVIEW 8, you can use the shared variable to pass data from one exe to another. You can also use ActiveX. There are the methods Get Control Value[Variant] and Set Control Value[Variant]. There are other ways such as TCP/IP, Datasocket, reading/writing to shared files, etc.

Also, why does it have to be LabVIEW exe files? You can do it but keeping them as VIs makes some of the options a bit simpler.

0 Kudos
Message 2 of 15
(6,250 Views)

Well, I don't have LV8. May be I can try out ActiveX/Variant. Would be helpful if you post any link or code demonstrating the same. No issue to use only lv instead of lv exe.

Already achieved it thru sharing files, but I want it in a different way. Datasocket/TCP/IP examples were tried, I took the server-client example, and configured in TS. but once opened, step one (server appln) is not returning so unable to execute step two (client appln).

Regards

Sreedhar

0 Kudos
Message 3 of 15
(6,228 Views)

that brings me to this version: If I have two exe running and both call with vi-server the same (LV2-Global) vi you should be able to share information. Without race conditions Smiley Wink

 

Greetings from Germany
Henrik

LV since v3.1

“ground” is a convenient fantasy

'˙˙˙˙uıɐƃɐ lɐıp puɐ °06 ǝuoɥd ɹnoʎ uɹnʇ ǝsɐǝld 'ʎɹɐuıƃɐɯı sı pǝlɐıp ǝʌɐɥ noʎ ɹǝqɯnu ǝɥʇ'


0 Kudos
Message 4 of 15
(6,225 Views)

Here is a very simple example that uses the methods I mentioned for a second VI to get/set values from another. I haven't really done much tan a small experiment, but you can also invoke the methods in TestStand with the ActiveX Automation Adapter. You can search the forum for examples of this.

If your first VI is not returning, then you haven't called it correctly. One way do it is to put it in it's own sequence and in TestStand, when you deine the sequence call, have it run in a new thread.

Download All
0 Kudos
Message 5 of 15
(6,211 Views)
That was really helpful of you Dennis!!! Thanks.
0 Kudos
Message 6 of 15
(6,192 Views)

Hi,

The example is working fine as long as it is run on labview. But now the problem is if I convert both (first and second vi) to a .exe, then they are not passing data between each other. Can you tell me if that is possible or not? or am I doing something wrong. The reason that I want to convert it into .exe is I do not have labview installed on the client machine. It only has the runtime installed.

Regards

0 Kudos
Message 7 of 15
(6,175 Views)

Hi,

If you are using the runtime engine or activeX system on you target sysem, then they still should work.

What are you using on the target system for you labview steps?

Regards

Ray Farmer

Regards
Ray Farmer
0 Kudos
Message 8 of 15
(6,173 Views)

HI,

Right now, I am trying to execute both the VIs on my machine only. The only thing that is changed is that both the VIs are converted to .exe files.

A small doubt, will the path given in the second vi make any difference. As such, I m assigning the path of first VI in the second.

Thanks.

0 Kudos
Message 9 of 15
(6,171 Views)

Hi

The paths have to be spot on, dont forget when an exe the path of the vi will be ...\someexe.exe\myVI.vi, therefore you will have to allow for this.

Regards

Ray Farmer

Regards
Ray Farmer
0 Kudos
Message 10 of 15
(6,169 Views)