Page 63

Petruzella_ProgrammableLogicControllers__5e

Motor_Stop <Local:1:I.Data.0> Motor_Start <Local:1:I.Data.1> Internal_Relay_CR Standby_PL Standby_PL <Local:2:O.Data.0> Run_PL <Local:2:O.Data.1> Motor <Local:2:O.Data.2> Run_PL Motor Inputs Motor_Stop Figure 15-40  Pilot light motor control circuit implemented using an RSLogix controller. • When CR is energized, the red run pilot light turns ON, the green standby pilot light turns OFF, and motor M starts operating. Figure 15-40 shows the pilot light motor control circuit implemented using an RSLogix controller. The control relay CR is represented by tag Internal_Relay_CR. Note that Internal_Relay_CR doesn’t have an address and as such is not accessible at the I/O rack. Latch and Unlatch Instructions The output latch (OTL) instruction is a retentive output instruction that is used to maintain, or latch, an output. If this output is turned on, it will stay on even if the status of the input logic that caused the output to energize becomes false. The OTL instruction will Inputs Ladder logic program Output ON OFF Tag Name Value Style Data Type Fan_ON_Button 0 Decimal BOOL Fan_OFF_Button 0 Decimal BOOL Vent_Fan 1 Decimal BOOL L1 Fan_ON_Button Fan_OFF_Button 352 Part 2  Bit-Level Programming G remain in a latched on condition until an unlatch instruction (OTU) with the same referenced tag is energized. The OTL instruction is often used in programs where the value of a variable must be maintained in instances where there is a shutdown due to a power failure or system fault. Retentive memory permits the system to be restarted with memory locations holding the values that were present when the program execution was halted. Figure 15-41 shows a ControlLogix program that uses an output latch and unlatch instruction pair to implement the control of a vent fan motor. The operation of the program can be summarized as follows: • The OTL instruction will write a 1 to its address when true. Vent_Fan <Local:2:O.Data.4> L Vent_Fan <Local:2:O.Data.4> Fan_ON_Button <Local:1:I.Data.2> Fan_OFF_Button <Local:1:I.Data.3> U Monitor Tags Window M L2 Vent_Fan Figure 15-41  Output latch and unlatch instructions used to control a vent fan motor. R L2 Ladder logic program Outputs Internal_Relay_CR Motor_Start L1 Internal_Relay_CR Internal_Relay_CR Internal_Relay_CR Stop Start


Petruzella_ProgrammableLogicControllers__5e
To see the actual publication please follow the link above