04-30-2015 03:09 PM
I have three pieces of gear (temp-humidity chamber, power distribution unit, and variable load) I need to control for a test I am doing. Could someone please give me an overview of how to best work out the timing on the profile or point me to an article or something. I've searched around but I can't seem to find any info on what I need. To be clear, the program will likely read an XML file with instructions like:
Step 1: Set chamber to 50C/10%RH; power switch 1 on, 2 off; load at 50% for 20 minutes,
Step 2: Chamber to 50C/90%RH, both switches on, load at 100% for 1 minute
etc.
I'm comfortable with XML and commanding the equipment. And I've seen timed loops, but the variability is throwing me off. A few years ago I created a chamber simulation for my senior project that used message queues and producer consumer architecture, but the timing was never right. So if anyone could whip something, point me in the right direction, or give me the correct search term it would really help.
Thanks,
Simon
04-30-2015 03:29 PM
04-30-2015 03:30 PM
The State Machine is your friend here. You will want a state for Initialization, Read Profile, Get Test Step, Set Chamber, Set Power Switches, Set Load, Idle, Check Time, and Close. You may need more, but these are the ones I am recommending. Create a diagram showing how you would want to change from state to state. The idea for the "for X minutes" is to bounce back and forth between the Check Time and Idle states. The Idle state is just to check for user commands (like Abort). In the Check Time, you just use the Elapsed Time to check to see if your time limit has passed. Once your time has elapsed, go to the next step.