====== Step Control ====== S Registers are used for step control. Step control arguments must follow the following format. {{ :cubloc:stepset_stepout:stepcontrol.png?nolink |}} Step control can be performed in two ways: "Normal Step" and "Reverse Step". STEPSET is used for "Normal Step". ===== STEPSET ===== STEPSET turns ON the current step, but only if the previous step is ON. STEPSET is processed one step at a time, in sequence, according to the step number. For example, in the ladder above, when P1 turns ON, S0:2 is turned ON, but only if S0:1 is ON. {{ :cubloc:stepset_stepout:stepset1.png?nolink |}} After S0:2 turns ON, S0:1 is turns OFF. When P2 turns ON, S0:0 is turned ON and all other steps are turned OFF. S0:0, or step 0, is used to reset. All other steps are processed in order. {{ :cubloc:stepset_stepout:stepset2.png?nolink |}} ===== STEPOUT ===== STEPOUT differs from STEPSET in two ways. First, it is not evaluated in sequence, and second, when a step is turned ON, it remains in that state regardless of its input condition. When using STEP OUT and a step is turned ON, all other steps are turned OFF, so only one step is ON at any given time. {{ :cubloc:stepset_stepout:stepout.png?nolink |}} In the ladder above, when P1 turns ON, S0:2 will turn ON. When P0 turns on S0:1 turns ON, and S0:2 turns OFF and S0:1 turns ON. When PO turns OFF, S0:1 is unchanged as each step, when turned ON, remains ON regardless of its input condition. Finally when P2 turns ON, S0:0 turns ON and S0:1 turns OFF. {{ :cubloc:stepset_stepout:stepout2.png?nolink |}} [[cubloc:index#Ladder_Logic:|Go CUBLOC Ladder Logic home]]