01-18-2021 02:19 PM - edited 01-18-2021 02:20 PM
Hi all, i have a program vi (A) that i compile to run as exe, it has a chart, event structure ,variabile ec.... Now im developing another Application (B) and i want integrate A in B. I would like to integrate the app and interact with it to get a chart value, variabile value and send the event. What is the best method to do this?
01-18-2021 02:35 PM
Hi loopin,
@Loopin3 wrote:
I would like to integrate the app and interact with it to get a chart value, variabile value and send the event. What is the best method to do this?
Use VI A as subVI of VI B...
01-18-2021 02:44 PM
this is what I do with simple vi's which don't have while loops and which I can run synchronously. In this case the VI A has while loops and more and I would like to run it asynchronously and interact with it.
01-18-2021 02:50 PM
01-18-2021 02:55 PM
@Loopin3 wrote:
Hi all, i have a program vi (A) that i compile to run as exe, it has a chart, event structure ,variabile ec.... Now im developing another Application (B) and i want integrate A in B. I would like to integrate the app and interact with it to get a chart value, variabile value and send the event. What is the best method to do this?
Where does program A get it's inputs? If it has an event structure, I assume it has controls that are operated by the user. Especially since you built it in an executable, it looks like a toplevel program.
There are many very vague statements.
What is "Integrate"? For example do you want to call VI A from B to run independently? Do you want to call the exe built from A? Do you want A in a sub-panel of B?
What is a "variable"? (just a control or indicator? Local variable? Global variable? Shared variable?)
If the user interacts with the front panel of A and VI B interacts with it too at the same time, who should "win"?
I think it would be better if you take a step back and tell us "what" you want to do, not "how" you want to do it. How should it behave from a user perspective? Maybe there are much better ways to do whatever you are trying to do.
At least explain what the programs do, maybe even attach some simplified code.
01-19-2021 02:06 AM
@altenbach ha scritto:
@Loopin3 wrote:
Hi all, i have a program vi (A) that i compile to run as exe, it has a chart, event structure ,variabile ec.... Now im developing another Application (B) and i want integrate A in B. I would like to integrate the app and interact with it to get a chart value, variabile value and send the event. What is the best method to do this?
Where does program A get it's inputs? If it has an event structure, I assume it has controls that are operated by the user. Especially since you built it in an executable, it looks like a toplevel program.
There are many very vague statements.
What is "Integrate"? For example do you want to call VI A from B to run independently? Do you want to call the exe built from A? Do you want A in a sub-panel of B?
What is a "variable"? (just a control or indicator? Local variable? Global variable? Shared variable?)
If the user interacts with the front panel of A and VI B interacts with it too at the same time, who should "win"?
I think it would be better if you take a step back and tell us "what" you want to do, not "how" you want to do it. How should it behave from a user perspective? Maybe there are much better ways to do whatever you are trying to do.
At least explain what the programs do, maybe even attach some simplified code.
the application A is a toplevel application, the user can interact with it. I want use it and show the panel in other top level application, get the value of local variable, send a signal to stop, get a chart value.
Using the subpanels i can reuse application and run it independently but i dont know how i can send a signal to stop it, get a value of local variable...
01-19-2021 02:19 AM
Hi Loopin,
@Loopin3 wrote:
the application A is a toplevel application, the user can interact with it. I want use it and show the panel in other top level application, get the value of local variable, send a signal to stop, get a chart value.
Using the subpanels i can reuse application and run it independently but i dont know how i can send a signal to stop it, get a value of local variable...
A local variable is local to a VI, you cannot read it from another VI. Did you take the basic LabVIEW training?
You need to implement some communication between your VIs A and B, like using queues…