P ROGRAMMING N O R M A L LY C LOSED T RANSITIONS

P ROGRAMMING N O R M A L LY C LOSED T RANSITIONS

As explained in the previous chapter, a normally closed input device should

be programmed as normally open in a PLC for it to operate as a normally closed device. The reason for this is safety. When programmed as normally open, the device will lose continuity and turn OFF if its connection to the input module is cut. This provides fail-safe operation. This same criteria

Industrial Text & Video Company 1-800-752-8398

www.industrialtext.com

S ECTION PLC The IEC 1131 Standard and C HAPTER 3 Programming

Programming Language 10

applies for a normally closed device in a PLC using IEC 1131-3 program- ming—all normally closed devices should be programmed as normally open, regardless of the language used.

Normally closed devices must also be programmed carefully when used as triggering variables in an SFC transition. If the normally closed device is not actuated (e.g., a normally closed limit switch is closed), the transition from one step to the next one will be in one scan. Let’s take a closer look. Figure 10-40a illustrates a part of a simple chart in which the normally closed limit switch LS_1 is used to trigger the transition from step 10 to step 11. Note that the timing diagram, which represents the Boolean activity, indicates that LS_1 is ON when not activated. Thus, the transition from step 10 to 11 will occur as soon as step 10 is active (one scan). To trigger the transition from step 10 to step 11 upon the activation of LS_1 (normally closed LS_1 opening), the transition must be programmed as NOT LS_1. This way, if LS_1 opens, the NOT LS_1 instruction will trigger the transition. Note that in Figure 10-40b, the limit switch opened momentarily to trigger the transition to step 11. It is a good idea to study timing diagrams when programming a normally closed device to observe the required behavior of the transition.

One Scan

10 NOT LS_1

Y10

11 1 X11

Figure 10-40. The transition from step 10 to step 11 will (a) occur in one scan unless (b) transition 10 is programmed as NOT LS_1.

Industrial Text & Video Company 1-800-752-8398

www.industrialtext.com

S ECTION PLC The IEC 1131 Standard and C HAPTER 3 Programming

Programming Language 10

Figure 10-41 illustrates a simple start/stop hardwired motor circuit and its timing diagram. When the momentary normally open start push button is pressed and the normally closed stop push button is not pressed, the motor will

be ON and its motor contacts M1-1 will seal the start push button, meaning that the motor will remain ON until the stop PB is pressed. When the stop PB is pressed, the circuit will lose continuity and the motor will turn OFF. Logically speaking, as shown in the timing diagram in Figure 10-41, the motor will be ON if both the start PB (wired as normally open) and the stop PB (wired as normally closed) are ON (1), in other words, start is ON (Start=1) and stop is NOT OFF (Stop=1). Therefore, the logic expression that will turn M1 ON is M1=Start AND Stop.

Start PB

Stop PB

Figure 10-41.

A hardwired start/stop motor circuit and its timing diagram.

This logic expression indicates that M1 will be ON if the start PB is pushed and the stop PB is not pushed (normally closed). However, the logic expression does not provide latching capabilities, meaning that if the start PB is pushed once and released, the motor M1 will not stay ON. As we will explain shortly, in the SFC implementation of this M1 logic expression, the latching or interlocking of the M1 logic expression is not required.

Figure 10-42 illustrates the SFC implementation of the hardwired circuit in Figure 10-41, along with its timing diagram. In the SFC, the logic expression that triggers transition 1 (Start_ AND _Stop) is the same logic expression that turns motor M1 ON in the hardwired circuit, but without interlock. The program does not require interlocking between the push buttons because it does not need to remember that the start PB was pressed to keep the motor ON. Once the momentary start PB is pressed, step 1 (no action) transitions to step 2, where the action turns ON the motor and keeps it in that state. The program will turn the motor OFF as soon as transition Y2 is triggered, meaning that the NOT_Stop condition occurred. As soon as the stop push button is pressed (see the timing diagram in Figure 10-42), transition Y2 will

be satisfied and the control token will be transferred from step X2 (motor ON) to step X1, turning off the action in X2 and, consequently, motor M1.

Industrial Text & Video Company 1-800-752-8398

www.industrialtext.com

S ECTION PLC The IEC 1131 Standard and C HAPTER 3 Programming

Programming Language 10

AND _Stop

Y1

2 Motor:=True

1 X2 0

2 NOT_Stop

1 Motor 0

Y2

Figure 10-42. SFC implementation of the hardwired circuit in Figure 10-41.

E X AM PLE 1 0 -5

Figure 10-43 illustrates a block diagram of PLC input devices used to control the ON/OFF state of two motors, Motor_1 and Motor_2. Assume that the pair of start/stop push buttons used with Motor_1 has a normally open start and a normally closed stop, while the start/ stop push buttons used with Motor_2 are both normally open (for illustration purposes). Using SFCs, implement two independent pro- grams in the PLC system that will control the start/stop sequence of the two motors.

Stop 2 N.O.

Figure 10-43. Block diagram of a program controlling two motors.

S OLU T I ON

Figure 10-44 shows the SFC charts for the two push button stations, while Figure 10-45 shows the corresponding timing diagrams. Note that the logic for the transitions that turn the motors ON is different. For

Industrial Text & Video Company 1-800-752-8398

www.industrialtext.com

S ECTION PLC The IEC 1131 Standard and C HAPTER 3 Programming

Programming Language 10

Motor_1, the logic takes into consideration that the normally closed stop push button is wired as normally closed. For Motor_2, the logic shows that the stop push button is a normally open push button wired as open to an input module.

I Chart 1 O

Start 1

N.O.

1 Start_1 AND Stop_1

Stop 1 N.C.

2 t Motor_1:=True

2 Not_Stop_1

3 Start_2 AND NOT Stop_2

4 Stop 2 p Motor_2:=True

Figure 10-44. SFC charts for Motor_1 and Motor_2.

0 X2=Start_1 AND Stop_1

0 X4=Start_2

Figure 10-45. Timing diagrams for (a) Motor_1 and (b) Motor_2.

Industrial Text & Video Company 1-800-752-8398

www.industrialtext.com

S ECTION PLC The IEC 1131 Standard and C HAPTER 3 Programming

Programming Language 10

As illustrated in Example 10-5, the programming of an input field device depends on how it is wired to the input interface. A timing diagram can provide tremendous help in determining the appropriate logic for a required transition. Note that the same type of fail-safe circuit that is required in ladder diagrams must also be incorporated when programming SFCs. A fail-safe start/stop circuit can be implemented using ladder diagrams in an action, as illustrated in Figure 10-46.

9 10 (Motor M_1)

Stop_1 Start_1 Motor_1

M1-1

Figure 10-46. Fail-safe circuit implemented in an SFC using ladder diagrams.