Tag Archives: plc

PLC (Programmable Logic Controller) introduced

PLC late 60 in the United States, comes first, and was called the programmable logic controller PLC (Programmable Logic Controller), aims to replace the relay, to perform a logical sequence control functions such as judgment, timer and counter. PLC‘s basic design idea is to computer functions, flexible, general advantages and relay control system easy to combine, the advantages of convenient operation, low price, the hardware is standard and universal. According to the actual application, software writes controllers will control the content within the user program memory. Controller and control easy connection.
Semiconductor technology, especially the development of the microprocessor and microcomputer technology, after the middle of the 70 ‘s, PLC has been widely used microprocessor CPU, input/output modules and peripheral circuits are used in medium and large scale or even super large-scale integrated circuits, PLC logic is no longer functional, but also with data processing, PID control and data communication functions.
Programmable controller is a digital operation of the electronic system, specifically designed for application in industrial environments. It features a programmable memory, internal memory which you used to perform logical operations, sequence control, timing, calculations and operations such as arithmetic instructions, and digital and analog inputs and outputs, and control various types of machinery or production processes. PLC is computer technology combined with traditional relaycontact control technology product, it overcomes the mechanical contact relay contact controlling system terminal complex, high reliability and low power consumption, disadvantage of universality and flexibility, making full use of advantages of microprocessor.
Programmable controller for users, is a contactless device, changes to the program can be changed in the production process, so can be used in the preliminary design stage using programmable controller, then determine the process during the implementation phase. The other hand, from the perspective of manufacturing production manufacturers of programmable controller in the manufacturing stage not required according to the orders of specially designed controllers, suitable for mass production. Because of these characteristics, soon after the advent of programmable controller was welcomed by the industrial sector, and rapid development. At present, the PLC has become a powerful tool for factory automation, has been widely used.

Difference between Panasonic PLC and Siemens PLC

Siemens and Japan have different input and output Panasonic, Japan Panasonic enter only x, output only y.

In fact, language is the same, that is different, both can be converted.

1. the programming of the software differences

Siemens SIMATIC PLC series offers a variety of programming software, mainly STEPMICRO/DOS and STEPMICRO/WIN; STEPmini standard package STEP7.

S7 PLC programming language is very rich, includes LAD, and STL, SCL, GRAPH, HIGRAPH, CFC etc. Users can select a language, if required, can also be mixed using several programming languages.

2. program structure

Program structure is used with the S7-3000 and S7-400, he has a linear programming, step by step programming and structured programming 3 programming methods.

FPI series programmable controller is Japan Matsushita Electric Company of small PLC products.

FPI programming software and instruction system

1. programmatically

NPST-GR offers 3 ways to programmatically: ladder diagram; statement table expressions and statements.

2. annotations

NPST-GR to I/O output relays and added comments, allow users to relay the corresponding device and relays use at a glance.

3. procedures for checks

NPST-GR can find syntax errors in the program and program verification

4. the monitor

NPST-GR can monitor the user program, and run the test. Users can check the status relay, PLC and registers, convenient for debugging and modification.

5. the system register settings

NPST-GR N0.0-N0.418 system register contents can be set, depending on the screen to select or enter the prompted information, simple and convenient.

Assigned 6.I/O and remote I/O

NPST-GR can be used for expansion board assigned to each slot on the host I/O and remote I/O address

7. data management

Data management is the ability to program or data files, for data backups, or before the PLC passed the staging data, both in the programming of applications as well as Siemens is a single bus, while Japan is Panasonic dual-bus;

Detailed steps for PLC system design and commissioning

(A) analysis of controlled objects control requirements and
Detailed analysis of control processes and characteristics about control of interaction between mechanical, electrical, fluid, made the control requires control of PLC control system, identification of programmes, development proposal.
(B) determine the input/output devices
According to the system requirements, and determine all of the required input devices (such as push button, position switches, switches and sensors, and so on) and output devices (such as contactors, solenoid valves, signal lights, and other devices, and so on) to determine the associated with the PLC input/output devices, to determine the PLC I/O points.
(C) select PLC
PLC selection including the PLC model, capacity, I/O modules, power supplies and other options, as described in section II of this chapter.
(D) allocation of design PLC I/O and peripheral hardware lines
1. allocation of I/O points
Draw the PLC I/O points corresponding to the connection diagram input/output devices, or relational tables, which can be carried out in the 2nd step.
2. PLC peripheral hardware circuit design
Draw the electrical wiring diagram for other parts of the system, including the main circuit and do not enter the PLC control circuit and so on.
By the PLC I/O connection diagrams and PLC peripheral electrical wiring diagram the electrical schematics of the system. End system hardware circuit has been identified.
(E) programming
1. program design
According to the system requirements, using appropriate design methods to design the PLC program. Procedures to control to meet the system requirements as the main line, write the control functions or tasks one by one program, gradually improved the system to the specified function. In addition, programs should also include the following:
1) initialization program. PLC poweron, are generally required to do some initialization operations, to start the necessary preparations to avoid malfunction of the system. Initializes the main elements of the program are: to clear certain data, counters and other, to restore some data requirements data, to set or reset certain relays, to display certain initial state, and so on.
2) detection and trouble diagnosis and display program. These programs are relatively independent, generally when the program is completed, adding.
3) protection and linkage programs. Protection and chain are indispensable parts of the program, must be seriously considered. It can avoid the control logic confused due to illegal actions.
2. program debugging
Program the basic idea of staging is to facilitate simulations in the form of actual state, to run programs to create the necessary conditions. According to the signal in different ways, staging a hardware simulation and software simulations in two forms.
1) hardware simulation method is to use a hardware device (such as a PLC or other input device, and so on) simulate signals, and these signals to hard wire connected to the input of the PLC system, its effectiveness is stronger.
2) software in PLC, the modeling method is writing a simulation program, analog provide local signals, its simple, but time is not easy to ensure. In the staging process, methods that can be used to debug and program monitoring function.
(F) the hardware implementation
Hardware implementation is mainly to control cabinet (set), such as hardware design and field construction. Main content:
1) designing control cabinets and floor plan and console and other parts of the electrical installation wiring diagram.
2) design the electrical interconnection between the different parts of the system.
3) according to the construction drawings for field wiring, and to conduct an examination.
Due to programming and hardware implementation may simultaneously carry on, so can shorten the design cycle of PLC control system.
(VII) debugging
Debugging is to further online tracking through the staging process. Debugging process should be gradual, from the PLC connected input device, and then connect the output device, and then connect to the actual load step by step debugging. If you do not meet the requirements, then adjust hardware and programs. Often only part of the program.
After the full commissioning, delivery operation. After a period of time, if working properly, the program does not need to be modified, procedures should be cured in the EPROM, in case the program is missing.
(H) the collation and preparation of technical documents
Technical documentation including design specifications, hardware schematics, wiring diagrams, electrical components, PLC program, and use the schedule description

Difference between conventional PLC and safety PLC

Safety programmable logic controller (PLC) is designed for specialpurpose machines and equipment used for critical control and safety applications. These controllers are usually the safety instrumented system (SIS) as part of use in detecting potentially dangerous processes in industrial environments. If danger is detected, SIS applications automatically, switch to the process safety. Here, the user may have a series of problems: conventional PLC has been used successfully for so many years, what‘s the difference compared with a safety PLC? Why critical control and safety applications, you cannot use the conventional PLC?
First, review
A secure PLC using a special designed to achieve two important goals:
1. System does not expire (redundant), even if the component failure is inevitable;
2. Failure is in the context of a predictable, once spent, the system into safe mode.
When designing a safety PLC, to take into account a number of factors, requires a lot of special designs. Like: a Taiwan security PLC more stressed internal diagnosis, combined hardware and software, can let equipment at any time detection itself work State of does not apply; a Taiwan security PLC has of software, to using series of special technology, can ensure software of reliability; a Taiwan security PLC has redundant function, even part failure, also can maintained system run; a Taiwan security PLC also has plus of security mechanism, not allows through digital communication interface casually read and write internal of data.
Safety PLC with conventional PLC is also different: safety PLC requires thirdparty safety certification for professional bodies to meet demanding international standards for security and reliability. Systems must be thoroughly, to design and test the safety PLC. Germany TUV expert and United States FM expert will provide safety PLC design and testing process, a third party independent verification and validation,
A special electronic circuit, careful analysis of diagnostic software, together with all possible failure to test the integrity of the design, ensures a safe PLC more than determination of 99% of potentially dangerous failure of internal components. A failure mode, effects and diagnostic analysis (FMEDA) method to guide the design, which will show how each component is causing the system to fail, and tell you how the system should detect this failure. TUV engineers will personally perform failure test, take it as part of their certification process.
Strict international standards software applications in a safe PLC. These standards require special techniques to avoid complexity. Further analysis and testing, meticulous examination of the tasks of the operating system interaction. This test includes real-time interaction, such as multitasking (when used), and interrupts. Also requires a special diagnosis, referred to as program flow control and data verification. Flow checks to ensure that the basic functionality of the program can be executed in the correct order, the data confirm that all critical data in memory, redundant storage and effectiveness testing before use. In the software development process, a safe PLC requires additional software testing techniques. In order to verify the data integrity checking, you must perform a series of software fault injection test, that is, human vandalism of procedures, to check if the response from the PLC to run in a secure way is expected. Software design and testing with detailed documentation, so thirdparty inspectors to understand PLC works, most software development does not use the standard operating procedures, this also shows why so many spam has so many bugs that cannot be found appears.
Second, for example
Following through Schneider Electric Company a safe PLC, to a more specific description of the safety PLC and the difference between conventional PLC.
2. 1 security with conventional PLC PLC CPU difference
Conventional PLC CPU number has one or more, or is their role: perform I/O scan user programs, and system diagnosis. But the user program is usually one at a time, multiple CPU‘s function is to program logic, arithmetic, communications functions such as sharing implementation, or collaborate.
CPU with at least two or more of the safety PLC, two CPU features are: respectively with one user program execution time and then compare the two results together, if the results are consistent, and will output the results, if it is inconsistent, select security outcomes. Thus, the safety PLC is the biggest difference with conventional PLC: redundant + more.
2. 2 structure of the safety PLC internal CPU
Safety PLC with 2 processors, each processor in its own storage area, implement their own safety logic, and then at the end of each cycle and compare each other‘s results, each processor has its own independent shut down channels, if test results or failure of components, it can implement the system shut down, cut to a safe state. This dual structure is called a choice within the structure.
Following figure represent the internal structure of the safety PLC:
Safety PLC usually have two processors, and decode and execute. These differences provide a failure detection of the following benefits:
Two executable code generated alone, when the differences in the code generated by the compiler, and easy to detect system failure.
Two generated code by different processors perform, therefore, when the CPU can execute code, random failure detected systems and PLC.
Two separate storage areas for the two processors, so CPU is able to detect RAM random failure, and that all the RAM in each scan cycle checking, not logging out.
Here we are then led to safety with conventional PLC PLC the second biggest difference: + step by step diagnosis and testing at any time. This either through one‘s own information, referred to as self-test; others by testing each other‘s information, known as interoperability. We will say more testing later.
2.3 of the safety PLC CPU detection
Clock measurements: the processor circuit, there are two different oscillator crosscheck their behavior, a clock to check whether another run for each processor. If over a certain period, to detect each other is not running, CPU into a safe state. The firmware will check the accuracy of the two oscillators per second.
Watchdog timer: a watchdog timer hardware and firmware check the PLC‘s activities and the implementation of the execution time for user logic. This and conventional PLC systems are the same.
Sequence checking: monitor CPU sequence checking implementation of the different parts of the operating system.
Memory check: all the static storage area, including Flash memory and RAM, using a cyclic redundancy code (CRC) to detect, and double-code implementation. Dynamic memory area protected by the double code, periodically for testing. When the cold starts, these tests be reinitialized.
From the above analysis we can see that safety PLC Diagnostics and testing than conventional PLC a lot more, so relatively speaking, more complex hardware and software design. Of course, the detection and diagnosis of the scope is broader, more nuanced.
2. 4 security PLC I/O diagnosis overview
Above we have the safety PLC‘s CPU was a simple analysis, we‘ll see security below the input/output module.
All safety I/O module to do both of the following Diagnostics:
Additional systemlevel diagnosis, including: RAM, ROM test, as well as
According to the different module types, fieldlevel diagnosis,
The following table lists the field diagnosis of safety I/O module:
Also, safety PLC communication between security CPU and I/O diagnosis, such as using a CRC checksum. Therefore, not only to check the data sent is equal to the received data and to check the data changes. In order to solve the disturbance, such as EMC‘s influence, which could instantly damage your data, so you need to each module, configure a very large contiguous CRC error diagnostic.
When you power on Diagnostics: when in power, I/O module perform the extended self test, if an error occurs, the module is considered unhealthy, all input and output set to 0.
Runtime diagnostic: while the system is running, I/O module perform the self test, input module verifies that data can be read from the sensor to the entire range, output module performs pulse tests on their switches, cycles of less than 1ms, digital input and digital output module, poweron self test failure and when there is no external 24V power supply of the module, the module does not work.
Diagnosis: electronic components, theoretically, the supply voltage exceeds the maximum value, they should not be working, so the I/O module from the backplane power supply voltage has to be monitored.
The following table describes the supply voltage monitoring:
2. 5 safety the safety PLC analog input module
Earth break detection: safe analogue input modules with monitor ground failure (leakage current) function. Outside the terminal end is usually connected to the neutral, earthing terminal with a shunt resistor can be connected between the neutral (250 ohm), analog input leakage current through the resistor voltage detected.
Internal diagnostics: site includes up to 8 separate independent input channels, each input with 2 same circuits, each circuit of the microprocessor through its analogdigital converters, then through the isolators are input values. In addition, when a diagnosis is, microprocessor driving the digitalanalog converter and put it into a highimpedance (non-interference) or low impedance, forced to work for the analogdigital converter input.
Analog input modules:
Short self test. Using a regular, periodic difference detection, determine whether the internal failure.
Long post. Use the health status of each channel to verify whether internal failure.
Power supply monitor: no power monitor, the function by the analogdigital converter testing periods, analogdigital converters and digitalanalog converter provides values based on their power supply voltage is to be achieved.
2. Secure digital input module 6 safety PLC
Internal diagnostics: a common input for each input channel circuit and 2 independent access link, each a digital microprocessordriven input serializer (DIS) to enter information on sampling. In addition, a digital microprocessordriven input reducer (DID), and then diagnose drive diagnostic function blocks realized restoring data synchronization with the input data.
Input channel error detection: digital input monitor power supply, use of external connection for leakage current detection, minimal leakage current of 1mA, if there is no leakage current, on behalf of open circuit failure on the external circuit, in the case of dry contact, contact a 10K pullup resistors in parallel, for the external line break detection. Each input circuit configured switches periodically to a 1 or 0, for the detection circuit is healthy. Each input circuit for independent testing, if problems are found in the diagnosis of position 1, declare channel is in a healthy state.
2. 7 safety PLC digital output module
Internal diagnostics: in order to check that the switch is open and closed, in the output module (module internal circuit, insert a diagnosis of periodic cycle) is a pulse test.
Diagnostic sequences include:
Change the switching command, this time is very short, and does not affect actuator, Max less than 1ms;
Verification of test results, and
Restore the correct switch command.
Power supply monitor: each output circuit consists of two tandem switch, there are two control processors respectively. First microprocessor with digital output reducer (DOD) drive switch, driven by the second processor after you restore it on and off. In each cycle, two microprocessor system of neutral-point voltage is compared with a threshold, and then exchange them if, midpoint assessment of status, diagnose the switching State. If an error has been detected in a channel, then immediately shut down, and set up Diagnostics, notify the CPU.
Summary of the third,
Through the introduction of the first two chapters and understand basic differences of the safety PLC and General PLC, have, in fact, like: external sensor connection of different, internal functional blocks of your operating system, software settings and software programming of the different requirements, as well as secure communications protocol specification, and so on, have the opportunity to interact with your readers.
Certainly, security PLC and General PLC also has many similar of at, like said: both are has implementation logic and counts calculation of capacity; both are has typical of entered and output (I/O) module, provides explained from process sensor signal and implementation control to eventually components of capacity; both are is used scan entered, then for calculation, last wrote to output; both are has typical of digital communication interface. General PLC not based on fault-tolerant and fail-safe design, this is the most fundamental difference between them.
Because many users find conventional PLC cannot be used for protection in critical applications, resulting in a demand for safety PLC. Safety PLC in design, manufacturing and installation standards are very high. If the project facilities, ignore these standards, or by the method implementation below these standards, from the perspective of occupational and social, is deceptive and irresponsible.

Basic structure of the modular PLC

S7-300/S7-400 belongs to the modular PLC, main frame, power supply module, CPU module, signal modules, modules, interface module, communications processors, equipment and programming, a variety of module is installed in a rack. Through communication interface in the CPU module or module, on the PLC are connected to the communications network, you can communicate with other computers, PLC or other device.
, The distribution of memory
S7-300 CPU memory is divided into four areas: loading memory, working memory (RAM), system memory and keep the memory area. S7-400 CPU memory can be divided into three areas: loading memory, working memory (RAM), system memory area.
Second, mounted memories
Mounted memories is a programmable module, it can be integrated in RAM or micro memory cards (MMC). S7-400, memory card (RAM or Flash EPROM) can extend the integrated load storage. Because the integrated load storage capacity is limited and requires that you have a memory card. Load memory save program is the role of the instruction block and block of data and system data (configuration, connections, and module parameters, and so on), you can also project the entire configuration data (including symbols and notes) saved in the MMC.
Four, the system storage (RAM)
Store integrated on the CPU of the system, and cannot be extended. It consists of the following memory areas:
Process mapping the input and output tables (PII, PIQ) memory (m) timer (t) counter (c) local stack (l).
Five, the process image I/O input/output table:
In memory of the PLC, setting up an area used to store the State of the input signal and the output signal, they are called the input and output process image process image. PLC ladder diagrams of other programming element also corresponds to the image store. Recycling process, the CPU does not directly access the input and output addresses in I/O modules, but access to the CPU internal process image. Write output stage, CPU to transfer the State of the output process image to the output modules.
Read input stage, PLC input circuits connect/disconnect all external reading input process image. A programming element corresponds to 1 State process image, called the programming element ON, bit is 0 the image State, called the programming element OFF.
Program execution stage, even if the external input signal status changes, enter the status of the process image is not changed, changed the status of the input signal can only be read in the next scan cycle input stages are read.
the advantages of process image
Compared with direct I/O access, provides a consistent image access can process signals image, for circulating the CPU program execution. If the signal on the input module program execution status changes, signals in the process image remains the same until the next cycle when the image was refreshed again. In addition, because the process image is saved in the system storage CPU, access speeds than direct access to the signal module significantly faster.
process image Refresh
Operating system can periodically refresh image.
Six, local data
Local data including: temporary variables, instructions to block startup information, routing parameters, tissue intermediate results
Seven, a temporary variable
When you build the block, you can declare a temporary variable (TEMP). The temporary variable is valid only at the time the block is executed, and then was covered. These local data in fixed length block of each organization. Before starting a read operation, they must be initialized. Each organization requires 20 bytes of local data, for its startup information. Access to local data more quickly than the data access to a data block.
CPU installation can save a temporary variable for the current execution block (partial data) of memory. The size of this storage area depends on the CPU. It is divided into the same amount of space allocated to each priority level, and each level has its own local data area.
Eight, keeping memories
Keep the memory in the S7-300, it is the non-volatile RAM, even if no backup battery is installed, the data will not be lost. Keep the memory effect is: keep the CPU property is set keep the memory option specified inmemory, timers, counters, and block of data.
Nine, memory cards and data retention
When RAM memory card is used, the system must be equipped with a battery. Once the power can rely on batteries to keep the memory card and the internal contents of the RAM. When using the FEPROM (Flash EPROM) memory card, the CPU can be run from the backup battery. User programs stored in the FEPROM in, there is a power failure can be safely kept.
When you remove or insert the memory card, the CPU requires memory reset. When you insert a RAM card, must be programmed by the user program loaded, when inserted into the FEPROM card, executable programs from the memory card (with load memory function) to the working memory. When the program execution memory card must be inserted in the CPU module.
When you modify a program block, modified block stored in the working memory. When uploaded to the block when the programmer, from working memory to the programmer. When a power failure (does not feature a battery), the working memory (RAM) is cleared. To keep a modified block, you need to: 1. When no EPROM memory card, save to your hard drive, 2. As with EPROM memory card, save to your hard drive or memory card. Via the SIMATIC Manager upload memory card blocks (inserted into programming), or PLC-> Download the use menu to write EPROM Memory Card directly on CPU to memory on the CPU card. Memory card must first erase. Individual blocks can be reloaded, but it cannot be deleted or overwritten.

Basic instruction of PLC and characteristics

PLC programming languages and computer languages, have distinctive features, which is different from a high-level language, and with the General Assembly, it is both easier to write, and to meet the requirement to debug. At present, there is no programming language to the manufacturers of products are compatible. If Mitsubishi products has its own programming language, OMRON products also has its own language. But no matter what type of PLC, its programming language has the following characteristics:

1. the graphical command structure: the program consists of graphic expression, instruction by a different graphic symbols, easy to understand and remember. System software developer has required independent operations in industrial control function into symbolic figure, users combine these graphics to suit your needs, and enter the appropriate parameters. In part of the logical operations, almost all manufacturers use similar to the ladder diagram of relay control circuit, it is easy to accept. Such as Siemens control system flowcharts to express, which use graphical symbols for binary logic elements to express the relation is very intuitive and easy to understand. More complex arithmetic, time counts, and so on, generally refer to the ladder or logic elements, although symbolic logic than computation, the popular

2. clear variable constants: graphic breaks equivalent opcode, providing functions, the operand is filled by the user, such as: K400,T120. PLC variables and constants, and their values defined, determined by the model, available in the product brochure.

3. the simplified procedure structure: PLC programs are usually very simple, typical for block-type structure, different blocks perform different functions, are able to program the entire process control functions and has a clear concept of the control order.

Simplifies software build process using assembly language and high-level programming language, to complete the editing,

1. the process of compiling and linking the three, and used programming languages, only need to edit a process, and the rest done automatically by the system software, the whole editing process is conducted in a conversation, without requiring users to have advanced software design skills.

2. the enhanced debugging methods: either assembler, or advanced language program, have posed a headache for editors, and PLC program debugging provides perfect conditions, use the programmer, programmer and PLC on the keypad, display and editing, debugging, monitoring, and support of the software, diagnostic and debugging operations are very simple.