LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

exicuting sub vi from a main vi

My main VI is based on a producer consumer pattern. In the main program I have the option on calling another VI that was created using the producer consumer pattern as well. I have a case structure with a Boolean switch on the front panel that selects the sub VI.

When it is selected, it start running the sub VI but it waits for and event queue from the sub VI front panel before it actually executes.

 

How can I have this start automatically, programmatically?

0 Kudos
Message 1 of 16
(3,403 Views)
If I understand you correctly, if you use named queues in your subvi, then you can fill up the queue with commands in the main vi even before starting the subvi.  queues are great like that (I have an app that I am controlling that way)
0 Kudos
Message 2 of 16
(3,401 Views)

Hi AAronJHan...,

can you please explain what you make or upload your vi or a picture of it? I don´t fully understand what you try.

Mike

0 Kudos
Message 3 of 16
(3,398 Views)
I am new to this, and I don't fully understand some of it.  here is my program.
I want to select the line regulation test and have it execute.
 
How would I do that?
 
 
 
0 Kudos
Message 4 of 16
(3,395 Views)
any ideas?
0 Kudos
Message 5 of 16
(3,385 Views)
Attach the other VI's used in this design, or they can't fully view what you are trying to do.
0 Kudos
Message 6 of 16
(3,376 Views)

I decided to make 1 big program. Instead of calling the sub vi, I just wrote it in to the main VI.

 

So thanks for all the help.

 

Aaron

0 Kudos
Message 7 of 16
(3,366 Views)

You should have posted all the vi's..

Wow.. you appear to love using those Local Variables.  You (or someone) will have fun debugging the code in the future.

Combining more code to your main one would not be recommended as it will make it more difficult to read the code.

Typical code size should not be bigger than one single screen.

To learn more about LabVIEW, I suggest you try looking at some of these tutorials.

R

0 Kudos
Message 8 of 16
(3,357 Views)

Typical code size should not be bigger than one single screen.


You didnt mean it did you joe?
0 Kudos
Message 9 of 16
(3,349 Views)
Oh, yes he did. Smiley Wink

In fact, it's in the LabVIEW Style Guide:

Front Panel
Configure the front panel to fit on the screens of most users.

Details

Front panels need to fit on a monitor that is the standard resolution for most intended users. Make the window as small as possible without crowding controls or sacrificing a clear layout. If the VIs are for in-house use and everyone is using high-resolution display settings, you can design large front panels. If you are doing commercial development, keep in mind that some displays have a limited resolution, especially LCD displays and touchscreens.

Front panels should open in the upper-left corner of the screen for the convenience of users with small screens. Place sets of VIs that are often opened together so the user can see at least a small part of each. Place front panels that open automatically in the center of the screen. Centering the front panels makes the VI easier to read for users on monitors of various sizes. Use the VI Properties dialog box to customize the window appearance and size.

Block Diagram
Avoid creating extremely large block diagrams. Limit the scrolling necessary to see the entire block diagram to one direction.

Details

The size of the block diagram window can affect how readable LabVIEW code is to others. Make the block diagram window no larger than the screen size. Code that is larger than the window is hard to read because it forces users to scroll through the window. If the code is too large to fit on one screen, make sure the user has to scroll only in one direction to view the rest of the code. If the block diagram requires scrolling, consider using subVIs.

0 Kudos
Message 10 of 16
(3,337 Views)