12-13-2011 12:31 PM
@Casemo wrote:
So I have transferred my programming into a state machine.
The one question I have is:
1) My original program has my obtain values from my DAQ and graph them. These items go inside of the while loop, but outside of the the first case structure, correct?
Do you want to continuously acquire data from the DAQ or just collect it during certain states?
If you want it running the entire time the program is running put it in its own loop outside as the states will hold up reading from the Daq device and could cause a buffer overflow.
12-13-2011 12:42 PM - edited 12-13-2011 12:43 PM
@Casemo wrote:
Almost there.
I have added all my input information, and test ran it on my system. Works great.
There is a small issue with a lag during the pressurization process. It takes about 5 seconds for the device to start pressurizing, and it cycles repeatedly in a uniform fashion until it reaches the pressure. I am wondering if this is because of the working voltage resolution of the air pressure valve only changes when > 0.05 V is supplied, or if it is a timing delay issue during the system run.
Will continue working on the system in the morning. Any ideas?
I see you have a 1/3s delay in your state machine so depending on your step size for pressurization. To be sure you would have to do some timing tests to see if it is that or write to file output. Try removing the delay if its not necessary.
Your code is coming along nicely though.