PLC Programming Languages:
The term PLC programming languages refers to the method by which the user communicates information to the PLC. The two most common language structures are ladder diagram language and Boolean language.
Ladder diagram language is by far the most commonly used PLC Programming Languages.Figure. 21,53, shows a comparsion of the ladder diagram language and the Boolean language programming.
Figure 21.53(a) shows the original relay ladder diagram drawn as it were to be hard-wired. Figure 21.53 (b) shows the equivalent logic ladder diagram that is programmed into the controller. The addressing format shown for input and output devices is generic in nature and varies for different PLC models. Figure 21.53(c) shows a typical set of generic Boolean statements that could also be used to program the original circuit. This statement refers to the basic AND, OR and NOT logic gate functions.
Relay Type Instructions
The ladder diagram language is basically a symbolic set of instructions used to create the controller program. These ladder instruction symbols are arranged to obtain the desired control logic that is to be entered into the memory of the PLC Programming Languages. Because the instruction set is composed of contact symbols ladder diagram is also referred to as contact symbology.
The main function of the logic ladder diagram program is to control outputs based on input conditions. This control is obtained through the use of what is referred as a ladder rung. In general, rung consists of a set of input conditions, represented by contact, instructions and an output instruction at the end of the rung represents by the coil symbol as shown in Fig. 21.54.
Each contact or coil symbol is referenced with an address number that identifies what is being evaluated and what is being controlled. The same contact instruction can be used throughout the program whenever the conditions need to be evaluated. For an output to be activated or energized at least one left to right path of contacts most be closed. A complete closed path is referred to as having logic continuity. When logic continuity exists in at least one path, the rung condition is said to be true. The rung condition is false, if no path has continuity.
To complete the entry of relay type instruction, an address number must be assigned to it. The number will indicate which PLC input is connected to which input device and which PLC output will drive which output device.
The addressing of real inputs and outputs, as well as internals, depends upon the PLC model used. These addresses can be represented in decimal, octal or hexadecimal number depending upon the number system used by the PLC.
Figure 21.55 shows a typical addressing format. Again, the programming manual of the PLC Programming Languages being used should be consulted to determine the specific format used, as this can vary from model to model, as well as from manufacturer to manufacturer.
The address identifies the function of an instruction and links it to a particular status bit in the data table portion of the memory. Figure 21.56 shows the structure of a 16 bit word and its assigned bit values. The breakdown of the word and its addressing are in the decimal numbering system.