LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Sub VI triggering problem

Hi, I hope that you can help, as a complete novie to LabVIEW this may be be a simple one to fix but I cant seem to get it to work 😞
 
My aim is to detect when (and which) sensor has been broken, and if the breakage is for a greater time than the minimum specifield this triggers a TTL signal to be sent (using USB-6501) to a valve which delivers a reward. Ultimately it will only be specified sensors broken that result in a reward being delivered although that isnt the main concern for now. The problem is triggering a subVI in the main VI I am using. The main VI (flowers) and subVI's (einzel blute & ventil2 (valve)) work fine on their own, and everything apart from the 'ventil' subVI works when the main VI is running (sensor breakage is detected etc). However the 'ventil' subVI only seems to execut once a stopp button corresponding to a while loop is pressed on the front panel. Is there a way to trigger this? Am I missing something really obvious?
 
Any help will be greatly appreciated
 
Thanks 
George 
Download All
0 Kudos
Message 1 of 2
(2,317 Views)
Nothing is going to execute until the inner while loop stops. That's just basic programming. If you want to call a subVI based on conditions created inside the while loop, put the logic and subVI inside the loop. You could also have an entirely separate while loop with no dataflow connection. You could pass data to the second loop via a queue. Look at the design patterns that ship with LabVIEW (File>New...). Either the Master/Slave or Producer/Consumer could apply.
0 Kudos
Message 2 of 2
(2,315 Views)