03-24-2009 08:23 AM
Issue is that the instrument readings from RoomMonitor.vi are all 0 until the measurements from DrawtestStateMachine.vi are complete. Both are accessing the NI9211 in the CompacDAQ system. RoomMonitor.vi also accesses the NI9225 and the NI9205. Each VI works correctly when executed alone.
Room Monitor.vi - takes readings from thermocouples and voltage inputs once every minute to monitor room conditions. Data displayed on waveform chart and stored into an Excel spreadsheet.
DrawtestStateMachine.vi - Based on user input, turns on a relay for X secs, turns off the relay, takes a temperature measurement, then waits X secs before going to next relay. Data displayed on waveform chart and stored in Excel spreadsheet. Temperature measurement compared to temperature limit if Control is true and will flash failure indicator and stop test once over temperature drink limit reached.
Originally code was flat but I realized that I only wanted Room Monitor to run in parallel with the valve control portion of DrawtestStateMachine.vi, I put the code in a stacked sequence. Sequence 3 is where the parallel loops are located - it is a while loop in parallel with a state machine.
03-25-2009 05:24 PM
Hi Carol:
When you say that it doesn't update until the measurements from DrawtestStateMachine.vi are complete, are you talking about the temperature measurement taken in ValveCtrl.vi?
In general, you should avoid a program that reads values from the same device simultaneously and I'm a little surprised you didn't receive an error along those lines. Is there a way you can modify your program to read from the 9211 in just one place and pass the value as needed?
03-26-2009 07:30 AM