The programming of PLC is based on the input devices logic commands and the programs realized are primarily log. The majority of the programmed operations run on a simple two-state on or off basis and these interchange possibilities match to logical form of true or false and binary form of 1 or 0, respectively. Therefore, PLCs recommend a flexible programmable choice to the relay-based control systems of electrical circuit developed by analog devices.
The method of programming utilized is the method of ladder diagram. The system of PLC offers a design environment in the software tools form running on a terminal of host computer which enables ladder diagrams to be built, established, diagnosed, and tested. The program of high-level is written in ladder diagrams. After that, the ladder diagram is transformed into codes of binary instruction so that they can be saved in RAM or EPROM. Every succeeding instruction is executed and decoded by the CPU. The CPU function is to control the memory operation and devices of I/O and to process data depend on the program. Each connection point of input and output on a PLC has an address applied to recognize the bit of I/O. The direct representation method of data connected with the memory, inputs, and outputs is depend on the fact that the memory of PLC is controlled into three regions: internal memory (M), input image memory (I), and output image memory (Q).
The program of PLC uses a cyclic scan in the key program loop such that intervallic verifications are made to the variables input. The program loop creates by scanning the inputs to the system and saving their conditions in permanent memory locations. The ladder program is accomplished rung-by-rung. Solving the logic ands the program of the various ladder rungs decides the output states. The states of updated output are saved in fixed memory locations.
The values of output held in memory are next utilized to reset and set the physical PLC outputs o concurrently finally of the program scan. The system of development includes a host computer linked through a port of RS232 to the target PLC. The host computer gives the software environment to carry out file storage, editing, printing, and monitoring of program operation. The developing process of the program to operate on the PLC contains of: using an editor to depict the source of ladder program, transferring the program source to binary code of object which will work on the PLC’s microprocessor and downloading the code of object from the PC to the system of PLC through the port of serial communication.