05-28-2008 11:40 AM
muganga wrote:
I have two sensors, temperature and pressure. After press a button in a specific VI, both sensores start working and start registering the temperature and pressure. Independent of time. I mean, just if pressure or temperature change I will have another point plotted in the graph.
05-28-2008 11:57 AM
Using an Event Structure and a state machine in a producer / consumer loop arrangement comes to mind.
Look at the template under File > New >VI from Template> look for Event Structure with Data (I think... no LV here.. so I'm guessing at the title)
It will have two loops with a Queue. Notifiers would be fine in this case. The idea is that you'd want the Event Structure to handle operator interface events (pressing buttons) and the state machine to take care of acquisition and updating display.. Make sure you have a small pause state to give time to the CPU to handle OS tasks.
You could do it in a single loop, but it would be easier for me to do an example than to explain the concept. 😉
RayR