Hello, I'm currently a student working on a senior project and I'm trying to do a state machine that will turn off and turn on a compressor depending on time and coprocessor failure.
In the run state, wich is #1 on the case structure box I placed the DAQ assist. Which takes in data from an accelerometer. If the accelerometer's value is above the limit four times it will end the loop or if the time runs out it will end the loop.
The problem I am having is that i need to run four compressors. I was thinking about having four case structures all within the outside loop, but I can only have the DAQ assist in one location. This means that I now have to move the DAQ assist out of the run loop or run all four compressors in the one case structure. If i remove the DAQ assist. I can only get it take in data once when the loop starts and never again. I understand why, but is there a way to dynamically pass data froma DAQ assist. into a running loop?
Also on a side note, i can't find a tutorial on how to really create a state machine using Enums. Does any one know where to find this.
I have attached my curent program.
Thank you for your help,
Ryan