LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Event structure in a subVI

I know this problem has been posted, but I've already am passing everything by reference. I can't get my subVI to respond to my top layer VI. It runs fine as a stand alone, but when I ask it to monitor events from a reference, it won't do anything. I've attached what my sub VI looks like. My goal is to have the the event structure respond when a new file path is sent, stop button pressed, or a enum is changed. The subVI is called Read Track shown in the top VI with all the references passed.



Top VI




Message Edited by d1sturbanc3 on 02-27-2008 12:30 PM

Message Edited by d1sturbanc3 on 02-27-2008 12:31 PM
Download All
0 Kudos
Message 1 of 7
(3,339 Views)
You should use dynamic events.
Your SubVI with the event structure should run in parallel with your main code.
What you currently have will never work.

Here's an idea of how the subVI should look like:

Try to use the Code Capture Tool to get images of your code...

Good luck,
Ton


Message Edited by TonP on 02-27-2008 07:45 PM
Free Code Capture Tool! Version 2.1.3 with comments, web-upload, back-save and snippets!
Nederlandse LabVIEW user groep www.lvug.nl
My LabVIEW Ideas

LabVIEW, programming like it should be!
0 Kudos
Message 2 of 7
(3,329 Views)
Thanks... but should the even occur on the value change of Path Refnum? When the user changes watch, would that refnum change and cause the triggeR?
0 Kudos
Message 3 of 7
(3,319 Views)
havn't tried the code capture.. but I will.

I did this and it's the same issue.





Message Edited by d1sturbanc3 on 02-27-2008 01:12 PM

Message Edited by d1sturbanc3 on 02-27-2008 01:17 PM
0 Kudos
Message 4 of 7
(3,312 Views)
No, the refnum won't change.

You register for a value change event of the control referenced by the refnum!

So you are directly linked to the control on your main VI.

What do you mean by:

When the user changes watch

Ton
Free Code Capture Tool! Version 2.1.3 with comments, web-upload, back-save and snippets!
Nederlandse LabVIEW user groep www.lvug.nl
My LabVIEW Ideas

LabVIEW, programming like it should be!
0 Kudos
Message 5 of 7
(3,309 Views)
The path will change, but the refnum pointing to the control will not change.
0 Kudos
Message 6 of 7
(3,309 Views)
Err sorry.. that's what I get for typing and talking at the same time. I just want to make sure the event triggers when the values is changed by the user.
0 Kudos
Message 7 of 7
(3,307 Views)