Programming of a programmable logic controller (PLC) is done via personal computer (PC) using ladder logic. This is how hardwired inputs are connected to hardwired outputs. Most programs are customarily created to a specific application, such as a home lighting control. Once the custom program is finished, to make any changes requires the program to be revised with a PC. This is not always desirable because in most cases it requires the person who did the original program to make the changes. Now if the ladder logic was developed using variable codes, which were stored in a table, making changes to the program would not be necessary, just revising the variable codes would be required.
Somfy Automated Shading Solutions
To see how a typical variable code program would function, let the PLC have 8 inputs and 6 outputs. The eight inputs will have eight registers reserved in the program, which will make up the table.
Each variable code will consist of 4 digits. The variable code will give the program the information of what output to operate when the respective input turns on. Since the variable code has four digits, let the first three digits be the function and the last digit the output number. If the first three digits are â€˜000′- no function, â€˜001′- toggle function and â€˜002′- pulse function.
The table above shows codes programmed for each of the eight momentary inputs (X0 thru X7). When the momentary input â€˜X0′ comes in, the output â€˜Y4â€ will turn on. When the momentary input â€˜X0′ comes in again, â€˜Y0′ will turn off, thus the toggle function. This is because the variable code â€˜0014′ was entered into register â€˜V1210′. When momentary input â€˜X1′ comes in, the output â€˜Y6′ will turn on for a brief duration (pulse). This is because the variable code â€˜0026′ was entered into register V1211.
Entering these variable codes could be done via a desk or laptop PC, but a more convenient way is via a LCD display panel. In the April 2003 issue of HomeToys Emagazine, there is a PLC article on a typical LCD display panel. In the commissioning of a home lighting control system, a LCD display panel makes programming an ease.