LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How to use a SubVI as a trigger for main VI?

I'm working on my main program now, which calls the two SubVI's (x and y galvo). The program is essential a data acquistion program that acts as an oscilloscope that saves multiple records of data. I have been triggering off of a function generator (Tek AFG), so I just had to select that channel in the program. However, now I am replacing the function generator that triggered the Tek AFG with the PCIe-6321. Is there a way I could trigger off the SubVI(s) that control the 6321? I attached the program. Thank you, Ryan
0 Kudos
Message 1 of 14
(3,364 Views)
0 Kudos
Message 2 of 14
(3,354 Views)

Is this a picture of yoru main VI or sub-VI?  It would be easier if you could attach the actual code instead of a picture (LV8.2 or lower).

-----------------------------------------------------------------------------------------
Reese, (former CLAD, future CLD)

Some people call me the Space Cowboy!
Some call me the gangster of love.
Some people call me MoReese!
...I'm right here baby, right here, right here, right here at home
0 Kudos
Message 3 of 14
(3,337 Views)

That's a picture of the main VI, actual code as in the front panel?

0 Kudos
Message 4 of 14
(3,333 Views)

Actual code as in your block diagram.

 

Edit: .VI

-----------------------------------------------------------------------------------------
Reese, (former CLAD, future CLD)

Some people call me the Space Cowboy!
Some call me the gangster of love.
Some people call me MoReese!
...I'm right here baby, right here, right here, right here at home
0 Kudos
Message 5 of 14
(3,329 Views)

Sorry about that, here it is:

0 Kudos
Message 6 of 14
(3,323 Views)

File>>Save for Previous Version>>8.2.  I don't have LV11.

-----------------------------------------------------------------------------------------
Reese, (former CLAD, future CLD)

Some people call me the Space Cowboy!
Some call me the gangster of love.
Some people call me MoReese!
...I'm right here baby, right here, right here, right here at home
0 Kudos
Message 7 of 14
(3,293 Views)

Hopefully this works

0 Kudos
Message 8 of 14
(3,276 Views)

I would use a Producer-Consumer archetecture.  If the fp is something that will be accessed frequently, consider using an Event structure; otherwise, use your sub-VI to trigger the event you wish to start.  Yes, you can use your sub-VI to trigger an event in your main program (P-C data or event type).  There are many ways to do it.  What type of signal are you trying to measure?  Do you want it to trigger on a certain condition/measurement?

-----------------------------------------------------------------------------------------
Reese, (former CLAD, future CLD)

Some people call me the Space Cowboy!
Some call me the gangster of love.
Some people call me MoReese!
...I'm right here baby, right here, right here, right here at home
0 Kudos
Message 9 of 14
(3,268 Views)

I am basically trying to replace a function generator with the PCIe-6321, and replace that trigger button on the function generator with the run button on LabVIEW. Attached is a picture of the setup I am trying to achieve.

0 Kudos
Message 10 of 14
(3,254 Views)