01-04-2008 12:34 PM
01-04-2008 01:01 PM
It may be worthwhile instead of having 6 case structures inside a single loop to have 1 case structure inside of each of 6 parallel loops. As you have it now, the overall program will only run as fast as the the slowest active case of the 6 case structures.
With the DAQmx functions, I have found that sometimes you can create multiple tasks each with its own channel without problems. And sometimes you have to put all the channels into a single task. I don't know what are the criteria for having to do it the second way. If it doesn't have to be done the second way, then your current architecture should work. If it has to be done the second way, then I'd recommend creating a separate parallel loop with a producer consumer architecture and queues. That loop would handle all of the daq functions. Each of the other loops of the parallel tests would queue up a daq command when necessary. The DAQ loop keep track of the current DAQ output state, read the queue, change whatever is required, and rewrite the new DAQ output for all channels.
01-04-2008 01:11 PM
Thats how I had the loops initially but then a coupke of NI applications engineers said that that will npot work correctly. It might give race conditions or something.
If you see I could habdle te daqmx read vis by using subset arays but I cannot even do that for the writes. I cannot think of anything else.
what are producer-consumer archtectures and queues and how are they implemented.
Whoever said Labview isn't difficult. This code is supposed to be for a very simple thermostat... It's taken forever
01-04-2008 01:25 PM
01-04-2008 01:35 PM
01-04-2008 01:38 PM
01-04-2008 01:47 PM - edited 01-04-2008 01:49 PM
01-04-2008 02:08 PM
You encapsulate all of that in a subVI and anything that is different becomes a control of the subVI (for channel input, statemachine enum value) or an indicator of the subVI (for different indicators.). So you feed the different values into the connectors of the SubVI. The outputs (such as Heat Read, Pass/Fail) would come out of the sub VI and go to the appropriate frontpanel indicator based on what which thermostat structure you are on.
Also I didn't really follow the Action Engine part.
01-04-2008 02:38 PM
01-04-2008 02:52 PM