10-25-2014 06:31 AM
Hi,
I'm trying to share data between two different while loops so I need to send data from one while loop to the other. Currently I when I send data it doesn't change (update) so if I send a variable, which is changing in one of the loops it won't change in the other so is there a way to share data and I can use this data in both while loops. In the file attached I have two leds called (left and right) in the big while loop. So what I need to do is that if one of the leds turns on I delay one of the channels in the other loop. So basically I'm trying to check everytime one of the leds go high I change something in the other (smaller) while loop which is to delay one of the channels of the headphones. The smaller loops outputs two different sine waves to the headphones, but I want delay add a delay when the appropriate led turns on I delay the same channel of the headphones.I know how to delay the channels, I just what to share the chaning value (boolean) of the leds in the smaller while loop.
Is this possible or do I need to move the smaller while loop inside the bigger one, when I tried DAQ assistant stopped working. Is there an another of doing this? If you need to ask anything else, please do, Any suggestions would be greatly appreciated.
Kg21
10-25-2014
11:59 AM
- last edited on
07-02-2024
06:47 PM
by
Content Cleaner
First I would recommend you to re-structure your code using a proper design pattern. If you do that your problem would be solved, come back if you face any problem.
10-25-2014
12:02 PM
- last edited on
07-02-2024
06:47 PM
by
Content Cleaner
If you don't know why the 2nd while loop is not running as long as your first while loop is running, you need to take some LabVIEW tutorials and learn about dataflow.
I would recommend looking at the online LabVIEW tutorials
LabVIEW Introduction Course - Three Hours
LabVIEW Introduction Course - Six Hours