Ch a pt er 5 Un d erst a n d in g Com m on D e v ic e s5 - 55_ Behavior of non-latched and latched devicesDevice typePLC action Non-latched Latched Output relayPower: OFF→ON Cleared Retained ClearedSTOP↓RUNThe output relay is cleared. Retained Retained ClearedThe state of the output relay is retained. Retained Retained RetainedThe state of the output relay returns tothat before the PLC’s stopping. Retained RetainedThe state of theoutput relayreturns to thatbefore the PLC’sstopping.The non-latched devices are cleared. Cleared Retained ClearedThe state of latched devices is retained. Retained Retained RetainedRUN→STOP Retained Retained RetainedSM204 is ON.(All non-latched devices are cleared.) Cleared Retained ClearedSM205 is ON.(All latched devices are cleared.) Retained Cleared RetainedDefault value 0 0 05.2.4. Input Relays (X) The function of the inputThe input is connected to the input device (e.g. external devices such as button switches, rotary switches, numberswitches, and etc.), and the input signal is read into the PLC. Besides, contact A or contact B of the input can be usedseveral times in the program, and the ON/OFF state of the input varies with the ON/OFF state of the input device. The input number (the decimal number)For the PLC, the input numbers start from X0.0. The number of inputs varies with the number of inputs on the digitalinput/output modules, and the inputs are numbered according to the order in which the digital input/output modules areconnected to the CPU module. The maximum number of inputs on the PLC can reach up to 8192, and the range isbetween X0.0 and X511.15. The input typeThe inputs are classified into two types.1. Regenerated input: Before the program is executed, the data is fed into the PLC according to the states of theinputs which are regenerated. For example, LD X0.0.2. Direct input: During the execution of the instructions, the data is fed into the PLC according to the states of theinputs. For example, LD DX0.0.5.2.5. Output Relays (Y) The function of the outputThe task of the output is sending the ON/OFF signal to drive the load connected to the output. The load can be anexternal signal lamp, a digital display, or an electromagnetic valve. There are three types of outputs. They are relays,