The relay-type instructions are the most basic of programmable controller instructions. They provide the same capabilities as hardwired relay logic, but with greater flexibility. These instructions have the ability to examine the ON/OFF status of a specific bit addressed in memory and to control the state of an internal or external output bit. The following relay-type instructions are the most commonly available in any controller that has a ladder diagram instruction set.
The normally open contact is programmed when the presence of the input signal is needed to turn an output ON. When evaluated, the referenced address is examined for an ON (1) condition. The reference address may contains the status of an external input, external output, or internal output. During the examination, if the reference address is ON, then the normal open contact will close and permit logic continuity (power flow). If it is OFF (0), then the normally open contact will assume its normally programmed state (open), thus breaking logic continuity.
The normally closed contact is working as opposite to the normally open contact. It is programmed when the absence of the referenced signal is needed to turn an output ON (1). The reference address is examined for an OFF (0) condition. If the address is OFF, then the normally closed contact will remain closed, allowing logic continuity. When it is ON, the contact will open and break logic continuity.
The branch start instruction begins each parallel logic branch of a rung. It is the first instruction programmed if a parallel branch or logical OR function is needed in a logic rung.
The branch end instruction finishes a set of parallel branches. This instruction is used after the last instruction of the last branch to complete a set of parallel branches.
The energize coil instruction is programmed to control either an output connected to the controller, or an internal output bit. If any rung path has logic continuity, the referenced output is turned ON. The output is turned OFF if logic continuity is lost. When the output is ON, a normally opened contact of the same address will close, and a normally closed contact will open. If the output goes OFF, any normally opened set of contacts will then open, and normally closed contacts will close. An example is shown (figure 3) to illustrate the rung relay-type instructions. Either of the input is true, the output will be true.
The latch coil instruction is programmed, for an output to remain energised (if necessary) even though the status of the input bits that caused the output to energize may change. If any rung path has logic continuity, the output is turned ON and retained ON even if logic continuity or system power is lost. The latched output will remain latched ON until it is unlatched by an output instruction of the same reference address. The unlatch instruction is the only automatic (programmed) means of resetting the latched output. Although most controllers allow latching of internal or external outputs, some are restricted to latching internal outputs only.