Chapter 6 Applied Instructions If S 2 =2, the instruction does NOT clear the status and the parameters (such as SFC/STEP/ACTION/TRANSITION) for the SFC and the system starts executing from where it paused. S 3 designates where to start (which step) in the SFC program in S 1 . 4. The range of S 2 is between 0–2. If it is out of range, it is evaluated as 0. 5. When the state of the SFC POU is RUN, executing this instruction is invalid. Example Set up one LD (ladder) POU and specify its POU name as “Main”, and then set up two SFC POUs with the names of “TestSFC1” and “TestSFC2”. 1.
When the PLC executes the Main program (RUN), TestSFC1 and TestSFC2 execute the SFCSTP instruction (API 2502), and the two SFC POUs stop executing. 2. When M0 switches from OFF to ON, TestSFC1/ TestSFC2 POU execute the SFCRUN* instruction. See below for the contents of the TestSFC1 and TestSFC2 for execution details. When S 2 =0, the SFC status and parameters are cleared and begin to execute from STEP 1. When S 2 =1, the SFC status and parameters are cleared and begin to execute from the designated STEP in S 3 . 3. When M1 switches from OFF to ON, TestSFC1 POU pauses. When S 2 =1, all the SFC executing actions and outputs are cleared, and the system runs the final scan. 6_ 4.
When M2 switches from OFF to ON, TestSFC1 POU executes. When S 2 =1, the SFT status and parameters are cleared, and the system begins to execute from STEP 2. 5. When M3 switches from OFF to ON, TestSFC2 POU pauses. When S 2 =0, all the SFC executing actions and outputs are kept, and the system does not run the final scan. 6. When M4 switches from OFF to ON, TestSFC1 POU executes. When S 2 =2, the SFC status and parameters are and the SFC begins to execute from where it paused. *SFCRUN activates the SPC POU at the next scan. 6-755