Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

This tutorial assumes that you have completed the exercises of tutorials 1 and 2 successfully. In this particular tutorial, we will focus on the order of rules and states in Process Controller. The subsequent tutorial will focus on interfacing pumps, valves and sensors with states in Process Controller.

...

The next step is to add two new states: "Add Chemical" and "Settle." First, click add new state and name the state "Add Chemical." For this state, we need a rule. There are many rules we could create, but for simplicity's sake, let's say that if the time in the Add Chemical state exceeds 1000 s that we should switch to "Settle."

...

You can see that in the figure above that the next state to proceed to is set to OFF. Set this instead to "Settle".

Step Four: Create Set Point for Rule

Next we need to create a set point so that the computer has a value for the 1000 s time interval which it will spend in the Add Chemical State. Click on set points and click "Add Set Point" after the last set point you just added. Title the set point "Time for Add Chemical" and enter a value of 1000 (as the time in Process Controller is measured in seconds).

As a quick exercise, make a rule for the "Settle" state that if the time exceeds 30 seconds then switch back to the "Add Chemical" state.

Step Five: Edit State to Correspond with Stamp Box Controls

In the Rules and States tab, click on States. Look under "output settings." You will see a blank sheet and all output settings should be set to Off. Slightly to the left of output settings, you will see a column of numbers 0-12. This column of numbers corresponds to the connection number in the stamp box. For example, if you wish a valve to be controlled from row 0, plug in the cable to position 0 in the stamp box, and in Process Controller set the appropriate value in each state of whether you want that valve to be OFF, ON, or somewhere in between.

For this specific example, we wish row 0 to control the valve that allows the passage of chemical. Click on the output description tab and type "Add Chemical Valve." On row 1, name that output "Drain Valve."

Next, click on the set point "Add Chemical" and set the "Add Chemical Valve" to ON since we wish the valve to allow the flow of chemical into the tank. We wish to set the "Drain Valve" to OFF since during this state, we do not wish to drain the chemical tank.

We also wish to control the pump speed of adding chemical. In the "Add Chemical" state, we wish to set the pump speed to the pump speed that we set in a previous tutorial. Under pump 0, name the pump "Chemical Pump" and under "pump on/off" set it to ON. Then under "pump speed" drag down until you find the set point "Mixing Pump Speed." Below is a figure of how your edited "Add Chemical" state should look like.

Image Removed

For the "Settle" state, we wish to turn off the pump and turn off the valve that releases chemical, and we wish to keep "Drain Valve" OFF. Do this and then confirm that your edited state looks like the one in the figure below.

Image Added

Step Six: Check the Stamp Box

If you have not already done so, plug in the appropriate valves and pump to the appropriate location in the stamp box. Remember to check that the stamp box is communicating with the computer and that your code makes logical sense for what you are going to run.

Exercise for Completion

We're not done yet! Your next task is to add another state "Drain" to drain the experiment. Set the time for the drain state not to exceed 100 s. You should then set the order of processes to be "Add Chemical" state switching to the "Settle" state switching to the "Drain" state. The "Drain" state should then switch back to "Add Chemical" state. In this sense, we are creating a cyclical process that could run indefinitely. In the "Drain" state set the "Drain Valve" to ON.

Click here to see if you have set up the process appropriately.