02-18-2008 10:35 AM
johnsold wrote:
3. The DAQ routine would also be in parallel and feed the data to the six state machines via an action engine. You would have several options for separating the data. I do not know how the data is currently configured, so I cannot offer a suggestion on the format.
02-18-2008 12:39 PM
02-18-2008 01:27 PM
johnsold wrote:
Universal stop. The action engine can help here. When the Stop button is pressed, the DAQ loop reads it and sets the boolean value of the Stop Action Engine VI to True. All loops read this AE on every iteration. If True, the loop goes to the shutdown state(s). A simple AE VI is attached. The simple AE is a VI with a while loop which executes one iteration each time the VI is called. It has an uninitialized shift register which stores the data. The Action input selects one of several cases inside the while loop to perform the action requested on the data.
02-18-2008 02:00 PM
02-19-2008 06:04 AM
johnsold wrote:
Here is where things start to get confusing (to me). If some units go to Dialog2 and others go to Fuse Check, what happens? First, Step gets "Slide system switch to HEAT mode" from some units and "Check the fuse" from others. Most likely this will happen as fast as each subVI can gain access to the control reference. One of the messages will display very briefly (maybe not long enough to be seen by the user) before being overwritten by the other. The Fuse Check state has 30 seconds of wait and Dialog2 has 33, so the loop iteration will take at least 33 seconds. The user may never have seen one of the messages. How does the user know which unit has sent the message which is seen?
johnsold wrote:
After the Heat Mode state another branching is possible. Now the system could have subVIs in at least three different states and conflicting messages and undesired timing may continue to occur.
02-19-2008 09:46 AM
02-19-2008 11:27 AM
02-19-2008 11:54 AM
02-19-2008 02:36 PM
02-20-2008 07:45 AM
Lynn,
Thank you so much for your help. I took a look at the files you sent.
johnsold wrote:
In the attached files you will find a mux_try_demo.vi which is based on mux_try8_subvi.vi and a Tstat_demo.vi. I replaced all of the DAQmx stuff with "nothing" for the writes and random values for the reads. I reduced the delays to a few seconds rather than minutes. The StateMachineState.ctl is a reconstruction of your typedef because I did not find a copy of yours.
johnsold wrote:
Note that you need to push the Stop Button (simulating the hardware stop) after the Loop Done light comes on. I did not put anything in to automatically stop the loop which monitors the stop button.
johnsold wrote:
Are the Heat_Read, Fan_Read,... arrays supposed to go off after that part of the code has executed?
Lynn
johnsold wrote:
Run it several times and watch the front panel. Note that it does not always execute the units in the same order. Notice also that all the delays run sequentially.
johnsold wrote:
You should be able to see how the Stop Button drives the AE and how the AE stops the main loop. In your system the loop with the stop button would have the Dev1/port0/line6 Digital Read VI in place of the button. (I think that is the one monitoring the hardware switch.)