LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Thread philosphy

What is the most sensible approach to the following scenario?
I'm currently using multiple while loops, which is working, but doesn't seem the best route in the long run.
 
Scenario.
 
Lab environment.
Some real data, some simulated data.
Looking at fault insertion and simulation of environmental and power conditions.
Multiple computers expecting various types of input data in fixed message format.
Supplying both real and simualated data to the computers with a host PC running LabVIEW 8.2 and using Compact Field Point I/O and serial.
 
Have capability to switch between live and simulated data for various measurements using a blend of some real and some simulated at any given time.
 
Example1, using live temperature readings and switch to simulated.
Example2, using live power readings and switch to simulated.
 
Current method:
 
While loop1 controls the GUI.  The user can see the data both real and simulated.  The user can switch between the two and input simulated data.
While loop2 controls formation of the data messages combining real/sim data and the serial write of messages to sensor computers.
While loop3 controls the serial read of messages from the sensor computers, decoding and sending the data to the GUI.
 
I have all the necessary hardware and simulation software, I'm just trying to determine the best approach so as not to shoot myself in the foot later on.
 
Not able to go into great detail regarding usage.
 
 
0 Kudos
Message 1 of 3
(2,801 Views)

Hi,

It seems you are on the right track. You can also consider using the producer/consumer architecture to pass data among the loops.

Tunde

0 Kudos
Message 2 of 3
(2,741 Views)

Yes, the loops are working perfectly.

I'll definitely look into producer/consumer architecture.

One can always improve.

Thanks.

0 Kudos
Message 3 of 3
(2,727 Views)