LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

"Newbie" Unable to run two actions at the same time please help

Hello
I'm a newbie (2 weeks) on Labview, so I hope my problem will sound easy for some of you.

I want to read a file and at the same time get the reading from my sensors (4 sensors).
My program is working when I do each thing in a different program but when I add them the program only read the text file and stop reading the sensor signals...I attach the program file.

The goal is with the text file to add an exact time for each sensor signal I record.
Is there any other possibilities to include a time with the sensors signals recorded ? I need to do this to synchronize the sensors values with CAM program.

Thanks

/Xavier

Ps I used a scan rate of 12000/s but I try 1000/s
and the sensor acquisition is still not working
Download All
0 Kudos
Message 1 of 2
(2,507 Views)
from a glance at your code, it appears that you have nested a loop to read your file, inside a loop to read your sensors. this means the nested loop to read your file must finish before the outside loop to read your sensors can run through another iteration. what you want to do is separate the two loops to run independently of each other (in parallel). use a global variable to know when to stop the loop (if they need to stop at the same time) and if you need to pass data between the loops use a queue (easiest) or you can also use globals with semaphores.
0 Kudos
Message 2 of 2
(2,507 Views)