An experimental comparative analyse between three low capacity PLCs

PLCs are used increasingly more often in industrial applications and beyond. PLCs from different companies involved different programming languages. Some of the PLCs can be programmed in all languages, while others do not. For three types of PLCs was made an application for a traffic light with priority. PLCs usually have a general and a special set of instructions that only some of these are found from a PLC to another. Programs were made with specific instruction set of respectively PLC. The programs were carried out in three languages. For a case study, it makes a comparative analysis between three programming languages.

. Typical program scan cycle for a PLC PLCs can be programmed with specific programming languages ( Figure 2). There are textual and graphical languages languages. Basically, graphical languages are easier than textual languages. Instruction List language (IL) has similar language with assembler language using specific mnemonics of PLC. Structured Text language (ST) is high level language, and is similar with C or Pascal languages.
Graphic languages are easier to use, especially for non-specialists in informatics. Ladder Diagram (LAD or LD) is similar with control circuit diagrams of various installations, but are rotated with 90 0 . Programming in this language lends to those who worked in electrical installations (electricians). LAD used the so-called networks. Function Block Diagram (FBD) closely resembles the layout of the control electronic circuits and them interconnection. It is easy to use by those who have worked with electronic devices (electronics).

Figure 2. Types of PLC programming languages
Perhaps, most simple graphic language used in PLCs is Sequential Function Chart (SFC) which is similar to a flow chart that can be written by anyone. An SFC is composed with steps-actions and transitions-receptivity ( Figure 3) [1]. Not all PLCs can be programmed in all languages; some may accept only one programming language (eg. IL by PS3 PLC from Klöckner Moeller).

Comparative analyses between three PLCs. A case study
At comparative study were used three small capacity PLCs.
The first PLC from Klöckner-Moeller is PS3. It is an old PLC (constructed in three variants) that allows programming in IL on programmable console (PRG 3S). There use specific mnemonics for programming. It has 16 digital inputs, 8 digital outputs -relays (other variant has 16 digital outputstransistors), 4 analogue inputs and 1 analogue outputs. At programming can be used 32 on-delay timers, 32 counters, clocks, comparators, etc. It does not support extension modules, but they can be connected into network with multiple PLCs.
The second PLC is S7 214 Siemens (there are designed four variants). There are two families: CPU210 (oldest) and CPU 220 (newer). S7 214 can program the PLC in three different languages (IL, LAD or FBD, with the possibility of automatic conversion from one to another) using a RS232 to RS 485 converter. The PLC supports general functions and special functions (on-delay timers, off-delay timers, with retention timers, comparators, up-down counter, comparators, clocks, etc.). It has 10 digital inputs and 8 digital outputs. It does not have analogue inputs/outputs (which can be a major drawback in some applications). It supports extension modules (with digital or analogue inputs and outputs, with specialized modules to connect the temperature sensor module, for controlling stepper motors, communications, etc.). S7 214 can connect to industrial networks through specialized modules.
The third type of PLC is LOGO! Siemens (designed in several variants). General supports functions and special functions (on-delay timers, off-delay timers, pulses, comparators, trigger, RS flip-flop, counters, etc.). It has 12 digital inputs and 8 digital outputs. It does not have analogue inputs /outputs, but can connect with various extension modules. Programming can be done on PC or with built console (in FBD).
To make comparative analysis is considered an application with traffic lights, with the primary road and secondary road, with priority for pedestrians crossing the main path.
An intersection has two paths, a primary road and a secondary road ( Figure 4). Traffic lights at the corners of the intersection have three lights: red, yellow, and green. Traffic lights are synchronized, so that if the primary road is the green light, there is red light on secondary road and vice versa. The transition from green to red is both ways via the yellow warning light. The transition from red to green is without passing through intermediate yellow light. Since the primary road passing many cars, light green on the primary road stays on for longer time than the green light on the secondary road. To eliminate the disadvantage that pedestrians wishing to cross the main road staying too long, was installed at every traffic lights a switch (normally open contact) that allows those who wish to cross the main road, to request, after some time, passing red light on the main road. Pressing the switch (S p ) has the effect of shortening the waiting time to a value that is equal to the secondary road. The four switches generate a single signal, connected to one input of PLC, which is 1 if the switch is pressed and 0 otherwise.   In Figure 5 are timing diagrams for this application. The significance of the output is shown in Table 1. It was considered: 0-t 1 =3 min.; t 1 '-t 1 =10 s; t 1 -t 2 =10 s; t 2 -t 3 =1 min.; t 3 -t 4 =10 s. The application starts at 0. t 1 ' is the time when push the S p switch on traffic lights by pedestrians; t 1 '[0-t 1 ]. The graph of Figure 6 is implemented in the control unit. The left branch is typically traveled for traffic lights. If a pedestrian push the switch from one of the traffic lights, when green light is on the primary road, the program no longer made on the left branch and the right branch will go. The application has two inputs (one input for turning traffic lights with normally open contact with mechanical locking; at another input of PLC is connected four normally open contact switches, parallel connections) and six outputs (corresponding red, yellow, green lights for the primary and secondary roads). Each PLC's output has a normally open contact switch that is connected in series with the lamps of the traffic lights.

Using of PLC PS3 from Klöckner-Moeller
The input I0.0 is used to turning on the traffic lights. I0.1 connects the four switches on the four traffic lights. Table 2 shows output variables used for PS3 PLC. Program listing is given in Figure 7. Implementing programs in IL requires dexterity and experience. PLC programming is done the hardest in this language. Programming was done by a programmable console (PRG3S), which made it difficult to troubleshoot program. Significant limitations on program PLC in IL, arise of using one type of timer (on-delay timer, with time base of 100 ms). It used intermediate memory M1.0, M1.4, M1.5, M1.6, and M1.7 for setting two groups of lamps for traffic lights (via primary and secondary roads) according to the timing diagrams from Figure 5.

Using PLC S7 214 Siemens
The inputs I0.0 and I0.1 have the same meaning as the previous application. The output variables are presented in Table 3. The program was carried out in the LAD. Program listing is given in Figure 8. Programming was done more easily than when using PLC PS3. PLC programming on PC's, and then transfer the program through cable greatly relieved debugging the program. Network programming is intuitive, allowing the sharing of more complex issue in simple problems to be solved. Although it can use several types of timers (on-delay timer, on-delay timer with retention, off-delay timer) were embedded in the application only on-delay timer with time base of 100 ms (there are others timers with resolution of 10 ms and 1 ms).  The program was divided into program areas, each with a well-established operation ( Figure 5). It has used the technique of activation, deactivation of steps ( Figure 6). For timers were used: T38 for 0t 1 =3 min.; T39 for t 1 '-t 1 =10 s; T40 for t 1 -t 2 =10 s; T41 for t 2 -t 3 =1 min.; T42 for t 3 -t 4 =10 s.

Using PLC LOGO! Siemens
The input I1 has significance of I0.0, I2 has significance of I0.1 in the previous application. Output variables are shown in Table 4. The program was carried out in the FBD. Program listing is given in Figure 9. The easiest programming (and most intuitive) is performed in FBD. The plurality of blocks, especially special ones, enables easy program. It used AND logic blocks with detection on rising and falling edge for inputs and memories, even when moving from one steps to another. At the same time, it was used memory (M1-M5) for setting and resetting the steps. Programming was done relatively easily and is intuitive in view of the timing diagram from Figure 5. It uses timers that perform offdelay time. For timers were used: B01 for 0-t 1 =3 min.; B05 for t 1 '-t 1 =10 s; B07 for t 1 -t 2 =10 s; B13 for t 2 -t 3 =1 min.; B15 for t 3 -t 4 =10 s.

Conclusion
From comparative analysis of the three types of PLCs (PS3 from Klöckner-Moeller, S7 214 Siemens and LOGO! Siemens) results: -PLCs are flexible in development of applications; -It is easier to program in the language that was used more; -Programming is made easier in graphic languages (LAD/FBD); -Are useful PLCs that can be programmed in any language (eg. S7-200); -PC programming (eg. for S7-200 and LOGO!) is more elegant than the one on programmable console (eg. PS 3).