LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Adding a Run/start button Inside VI

Hello All,

 

Possibly a simple but silly question. I developed three applications to control three different kind of instruments. Where my Application 2 needs to be run again as I enter different states and Press Run, and the command is entered into the hardware.

 

Every application is running perfectly in its own. However, now I need to make them usable in one interface. When I put the Block Diagrams of all three of them in there(see attached), the applications seems to run fine but I need to put a separate Run button/switch for Application 2(laser system) as it needs to be given different instructions every now and then and needs to be Run after the value is entered.

Please advice.

Snippet is attached. Will be glad to answer questions or if I am not very clear.

Thanks

0 Kudos
Message 1 of 6
(3,146 Views)

1. There is never really a need to enter values before code is run.

2. Your code is so messy, I can't stand to look at it.

"If you weren't supposed to push it, it wouldn't be a button."
0 Kudos
Message 2 of 6
(3,129 Views)

Hi Paul,

 

The second Sequential Stacked Structure in the middle is the only one I need assistant with which is controlling my Application 2. Everything else in structure 1 and 3 is fine and running in parallel.

 

The only reason I need a start or sort of Run button of structure in middle is because the program is taking different values at different registers of the hardware and needs to be sent separately and individually.

If you will simply copy the middle structure into a .vi you will understand what I am trying to say and do.

Rest, thank you for your time.

0 Kudos
Message 3 of 6
(3,106 Views)

You need flow control.

 

Each of these works well on its own, but now you have three independent paths where control and data to these instruments is being interwoven.  Control an instrument, wait for response, control another, wait for response,...  Either that or control each individually and configure them to await a trigger where they can all operate somewhat independently, then extract data from each afterwards.

Help the Community (and future reviewers) by marking posts as follows:
If it helped - KUDOS
If it answers the issue - SOLUTION
0 Kudos
Message 4 of 6
(3,105 Views)

@Nitai wrote:

Hello All,

 

Possibly a simple but silly question. I developed three applications to control three different kind of instruments. Where my Application 2 needs to be run again as I enter different states and Press Run, and the command is entered into the hardware.

 

Every application is running perfectly in its own. However, now I need to make them usable in one interface. When I put the Block Diagrams of all three of them in there(see attached), the applications seems to run fine but I need to put a separate Run button/switch for Application 2(laser system) as it needs to be given different instructions every now and then and needs to be Run after the value is entered.

Please advice.

Snippet is attached. Will be glad to answer questions or if I am not very clear.

Thanks


Even just your middle structure is a mess.  I'm not going to try to decipher your spaghetti.  Furthermore, you've just posted a picture, not the actual code.  I stand by my initial point: There is never really a need to enter values before code is run.

"If you weren't supposed to push it, it wouldn't be a button."
0 Kudos
Message 5 of 6
(3,055 Views)

Probably you didn't understand my point of not entering the values before it runs but taking the values while it runs. Anyway, no use of explanation. Thanks for your time though.

 

Although I figured it out by myself and believe me the dish smells nice.

0 Kudos
Message 6 of 6
(3,052 Views)