LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Accessing certain parts of an build application thru VIs?

Hi,

 

I know its possible to build a labview executable without compiling all of its VIs into the EXE itself. If I decide to leave them out then those VIs will go to the Support folder. The question I have, is that if it is possible to build the EXE with some of the VIs stored in the data folder and then interact with the EXE by using those VIs from labview?


I tried couple things but so far I couldn't find a way to control the exe from outside. (Communication thru (text) files would be possible but that is something I'd consider very unreliable, so that I consider as not an option. Also about 10 years ago I figured that with ActiveX I can get/set data, but that was pretty convoluted and interacted with front panels, while this time I'd like to call functions, FGVs etc).

 

Thanks.

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

0 Kudos
Message 1 of 17
(1,642 Views)

Hi 1984,

 


@1984 wrote:

I know its possible to build a labview executable without compiling all of its VIs into the EXE itself. If I decide to leave them out then those VIs will go to the Support folder.


As long as the VIs (in the support folder) contain their compiled code you can call them from within the executable.

(Don't turn on the "separate compiled code" checkmark…)

 


@1984 wrote:

if it is possible to build the EXE with some of the VIs stored in the data folder and then interact with the EXE by using those VIs from labview?


What exactly do you want to do?

  • Do you want to change those VIs before starting the exectuable?
  • Do you want to change those VIs while running the executable?
  • Do you want to open some dialogs from within those VIs to allow for user interaction?

How do you want to "interact with the EXE" using those VIs?

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 2 of 17
(1,607 Views)


What exactly do you want to do?


Mostly I'd like to call DQMH requests on demand.

0 Kudos
Message 3 of 17
(1,573 Views)

Hi 1984,

 


@1984 wrote:


What exactly do you want to do?


Mostly I'd like to call DQMH requests on demand.


I repeat my question:

What exactly do you want to do?

  • Do you want to change those VIs before starting the exectuable?
  • Do you want to change those VIs while running the executable?
  • Do you want to open some dialogs from within those VIs to allow for user interaction?

How do you want to "interact with the EXE" using those VIs?


Please answer the "HOW"…

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 4 of 17
(1,563 Views)

Hi 1984,

 


@GerdW wrote:

Mostly I'd like to call DQMH requests on demand.


I repeat my question:

  • Do you want to open some dialogs from within those VIs to allow for user interaction?

How do you want to "interact with the EXE" using those VIs?


Please answer the "HOW"…


  1. So you call the subVI from your executable.
  2. The subVI opens its frontpanel and waits for user input.
  3. The user (or "you") can input whatever you need to input and then press an OK button.
  4. The subVI now "calls a DQMH request" with your inputs.

Is this what you want to implement?

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 5 of 17
(1,559 Views)

The particular subvi's would not get called from the exe, they would be dedicated to be called from the outside. Thats not true for the calls they would make the the DQMH modules, those are called from the exe as well. The idea is that I can get access to internal functions of the EXE on demand. For example reading values. Of course there are other ways to display values on demand, but right now I'm interested it doing it in this way. (Btw, TCP listeners would most likely work as well as network streams, so I can "send in" commands and I can get a response. I'm wondering though if there is an easier way to do it)

0 Kudos
Message 6 of 17
(1,554 Views)

You probably want TCP VI server which is a high level LabVIEW-native application layer that lets you run VIs in another application.

 

Here are some examples I created that use this feature:

https://forums.ni.com/t5/LabVIEW/Enqueue-in-another-VI-using-Application-VI-Referencing/m-p/4476178/...
https://forums.ni.com/t5/LabVIEW/How-to-use-User-Events-and-Queues-between-Executables/m-p/4395217/h...

Message 7 of 17
(1,527 Views)

@avogadro5 wrote:

You probably want TCP VI server which is a high level LabVIEW-native application layer that lets you run VIs in another application.

I've checked your first example and found these:

- If I run the server.exe and client.exe they work fine, messages from the client show in the server

- If I run the server.vi and the client.vi then its also fine, messages from the client show in the server

- however if I run the server.exe and the the client.vi the the cilent.vi throws the error message attached

 

To achieve what I need to do I need the client.vi to communicate with the server.exe

 

Did I do something wrong with your example, or is it not supposed to work like that?

 

Thanks.

 

1984_1-1785308148622.png

 

 

0 Kudos
Message 8 of 17
(1,498 Views)

Actually I modified your vi slightly to increase readability. 

 

1984_1-1785312097896.png

 

 

When the server is compiled to an exe it returns Error code:60, Property node (arg 3) in server.vi

 

Could be something trivial that I'm not familiar with. Any ideas about that?

 

0 Kudos
Message 9 of 17
(1,488 Views)

Hi 1984,

 


@1984 wrote:
Did I do something wrong with your example, or is it not

1984_1-1785308148622.png


Did you read my message #2 with the comment on "separate compiled code"?

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 10 of 17
(1,482 Views)