Creating a Sequential Function Chart > Creating the SFC module

Create a step action in the SFC

  1. In the Diagram View, select the step box named S1.
  2. Click the name, S1, and change it to STOP_AND_WAIT.
  3. In the Action View area of Control Studio, right-click anywhere and select Add.

    The Properties dialog appears.

  4. Enter Stop and Wait for the Description.
  5. For the Type, select Assignment. (This type assigns the result of an expression to a destination. This action assigns the value of 'SFCCTRL:IDLE' to SP.)
  6. For the Qualifier, select P Pulse.

    An action with the P Pulse qualifier is active only on the first scan when the step goes active. Thus, the assignment statement is evaluated and the assignment made on the first scan through the step actions when the step goes active. After the first scan, the assignment destination retains the assigned value; it is not rewritten for each scan.

  7. To set the setpoint to the IDLE state, type the following in the Action expression field:

    'SP':='SFCCTRL:IDLE'; (remember: named sets are case-sensitive).

    Alternatively, you can click the Expression Assistant button and use the Expression Assistant to define the Action expression. (You used the Expression Assistant earlier to define the interlock conditions for the motor control module.) Click the Insert Named State button in the Expression Assistant and follow the prompts to define the Action expression.

  8. Click OK in the Properties dialog. Make any necessary corrections, and then click OK.
  9. Select the step action (A1) in the Step Action View, right-click, select Rename, and then change the name to SET_TO_IDLE.

    Giving the step actions meaningful names instead of A1, A2, etc., helps you identify a particular action you may later want to modify.