Tag Archives: plc training

Application and characteristics of PLC in control system

What is the meaning of the programmable controller:

Acronym PLC programmable controller or PC, is evolved from the early relay logic control system, which constantly absorbing function of the microcomputer technology to growing gradually for complex control tasks.

Since 1836 relay came, people began to use it skillfully wire connected with the switching device, constitute use different logic control or sequential control. So far, the PLC Ladder programming language can also see the shadow of these wires. Until the late 1960s and early 1970s, the advent of programmable controllers, with the rapid development of microelectronics technology, computer technology and data communications technology, as well as the emergence of the microprocessor, PLC products towards small and ultra-small aspects of a leap , and finally to the early PLC from the initial logic control, sequential control, it has developed into a modern PLC logic, timing, counting, memory and arithmetic operations, data processing, communications and networking functions such as PID loop controller.

PLC viable reason is that it is more suitable for industrial field and the requirements of the market: high reliability and easy ability against various disturbances, programming installation, low price and long life. Than the microcontroller, its input and output closer to the field devices, without adding too many intermediate member or need more interfaces, which saves users time and money. PLC lower end (input) for the relay, transistor and thyristor control means and the upper end is generally user-oriented microcomputer. When people use it, you can not carry out specialized training in computers, programmable controllers can be operated and programmed. Used to perform a variety of different complexity industrial control tasks.
First, the main function of the programmable controller

PLC application is very broad, very rapid development of industrial automation equipment, factory automation (FA) and computer integrated manufacturing system (CIMS) in the important role. Today’s PLC function, far not only replace the traditional relay logic.
PLC system is generally constituted by the following basic functions: a variety of control functions. Data collection, storage and processing capabilities. Communications networking. Input / output interface conditioning. HMI function.

Programming, debugging features:
1, the control function logic control: PLC has the AND, OR, NOT, XOR logical operations and other functions, and triggers can replace relay switch control.
Time control: It provides users with a number of electronic timer, users can set their own: on-delay, off delay and timing pulses and other means.
Count Control: pulse control can add, subtract counting mode, you can connect encoder for position detection.
Sequence control: the first after the procedure is completed, it is transferred to the next process, so that a PLC can use as a multi-step controller.
Data collection, storage and processing math functions:
Basic arithmetic: add, subtract, multiply and divide.
Extended arithmetic: square roots, trigonometric functions and floating point arithmetic.
Compare: greater than, less than and equal to.
Data processing: Select, organize, normalize, move, and first in first out.
Analog data processing: PID, integral and filtering.
2, the input / output interface conditioning functions having A / D, D / A conversion, complete analogue control and regulation through the I / O modules. Median and accuracy can be selected according to user requirements.
3. Has the temperature measurement interface, direct connection to a variety of resistance or galvanic.
4, communications, networking have adopted most modern PLC communication, network technology, RS232 or RS485 interface for remote I / O control, more than one PLC to one another networking, communications, external devices and one or more between the programmable controller signal processing unit, program memory and data exchange, such as the transfer of the program, data file transfer, monitoring and diagnostics.

The communication interface or communication processor hardware interface standard or proprietary communication protocols and data transfer process is completed. Such as the Siemens S7-200 Profibus fieldbus port, the communication speed may reach 12Mbps.
When the system is constituted by a computer with multiple PLC constitute centralized management, decentralized control of distributed control network to complete large-scale complex control. Commonly referred to as SCADA systems, on-site and remote terminal PLC terminal can also be used for live machine. 5, man-machine interface function provides the operator to monitor machine / process work necessary information. Allows the operator and PC systems interacting with their applications, in order to make decisions and adjustments.

Means to achieve human-machine interface functions: from the grassroots operator screen text display, the stand-alone CRT display and keyboard operation and decentralized communication processor, a dedicated processor, a personal computer, industrial computers, and centralized operation and monitoring system. Use 6 different complexity, programming, debugging and other hand-held, portable and desktop programmer, and operator workstation screen, programming, debugging, monitoring, testing and records, and printing out the program files.

Second, the main features of the programmable controller
1, high reliability PLC’s MTBF is generally 40000 ~ 50000h above, Siemens, ABB, Panasonic and other micro PLC of up to 100,000 h or more, and have a sound self-diagnostic function to determine the fault quickly and easy to maintain. 2, the modular combination of flexible programmable controller series products, the module structure commonly used to accomplish different tasks combinations. I / O from 8 to 8192 points, there are a variety of models, a variety of function modules can be flexibly combined, structure is also diverse. 3, powerful PLC application of microelectronics and micro-computer, simply type have logic, timing, counting sequence control. The basic types plus analog I / O, the basic arithmetic operations, communications and so on. In addition to the basic types of complex types of functions, but also has a scalable computing power, multi-level terminal mechanism, intelligent I / O, PID regulation, process monitoring, network communications, remote I / O, multiple processors and high-speed data processing capability . 4, convenient programming PLC control suitable for industrial ladder, function block diagram, instruction list and sequential function chart (SFC) programming, without much knowledge of computer programming. The new programming workstation with a comprehensive software toolkit, and on any PC-compatible programming. 5, to adapt to the technical conditions of the industrial environment PLC can work under the general high temperature, vibration, shock and dust and other harsh environment, can work reliably under strong electromagnetic interference environment. This is the market value of existence PLC products. 6, installation and maintenance is simple compared with the computer system, PLC installation does not require special rooms and rigorous screening. When you use as long as connectivity to various devices is correct, the system can work with operating and fault indication means on each module, easy to find fault, most of the modules can be hot plug, the module can be replaced, so that users can in the shortest isolated time fault, and exclude, to maximize compression downtime, rapid recovery of production. Then repair fault module, which is particularly suitable for large-scale production situations.
Some PLC housing is made of an alloy that can operate under poor working conditions, with the simple structure, with a heat sink above, at high temperatures, unlike the housing plastic deformation, as also anti-radio frequency (RF high frequency) electromagnetic interference, fire and so on. 7, fast with microprocessor applications, so that the speed of the PLC faster, make it more in line with the processing speed of complex control tasks, the difference between it and the microcomputer is not very obvious. 8, the low weight of the total price of the PLC, volume, power, and hardware prices have been reduced, although the proportion of total software price has increased, but the manufacturers to compete also a corresponding reduction in prices. In addition, the use of PLC can also greatly shorten the design, programming and commissioning period, bringing the total price is further reduced.
PLC systems and industrial computer bus and DCS system of mutual penetration, mutual learn, compete and development. Promoting the progress of industry.
PLC fieldbus products face development, innovation will once again meet the higher needs of the industrial and civilian control. Third, communications and networking PLC communication between the PLC, including PLC, the communication between PLC and host computer and PLC and other intelligent devices. PLC system can be a general purpose computer or via the communication processing unit, a communication adapter connected directly to form a network to achieve the exchange of information and may constitute centralized management, decentralized control of distributed control system to meet factory automation (FA) systems development needs of each PLC or remote I / O module according to the functions of each place at the production site decentralized control, then using a distributed network system connected to form a network of centralized management.
Siemens company SIMATICNET example, in the Totally Integrated Automation (TIA) system concept proposed in its core content which includes integration and integrated communication configuration and programming of integrated data management. Communication networks are important, the key components of this system to provide inter-network components and improve the industrial communication.

SIMATICNET contains three main levels:
International standard AS-I network sensors and actuators communication scan time 5ms, the transmission medium is twisted pair, unshielded line length of 300m, a maximum of 31 slaves.
PROFIBUS industrial field bus, the international standard for the workshop and field level, the maximum transmission rate of 12m / s, the transmission medium is shielded two-wire cable (up to 9.6km) or cable (up to 90km), can connect up to 127 from station.
International standard industrial Ethernet networking for regional and unit, the network size of up to 1024 stations 1.5km (electrical network) or 200km (optical network).

In this network system, it is particularly worth mentioning is the PROFIBUS fieldbus, PROFIBUS field bus is one of the most successful, have been widely used. It is not dependent on the manufacturer, open field bus, a wide range of automation devices can exchange information through the same interface. A large number of manufacturers to provide high-quality products PROFIBUS, the user can freely choose the most suitable product. PROFIBUS has become the national standard DIN19245 German and European standards prEN50170, and in the world has the largest number of users. Four, PLC and industrial control computer (IPC) to compare and distributed control systems (DCS) 1, the origin of their computer technology to meet the rapid development of large amounts of data processing equipment required. Hardware structure, high degree of standardization of the bus, compatibility, rich software resources, especially the support of real-time operating system, so the requirements of fast, real-time control and computation model complex workload industrial objects advantage.

Distributed system development from the industrial automation instrumentation control systems to industrial control computer as the center of the distribution system, so its processing in the analog loop adjustment has certain advantages, mainly used in the initial stage continuous process control, focusing loop control functions.
PLC is evolved by the relay logic system, mainly used in discrete manufacturing, process control, instead of the initial main relay control system, switch the order of emphasis on control.

With the development of microelectronics technology, large scale integrated circuit technology, computer technology and communication technology, etc., PLC happened leap in technology and functionality. On the basis of the initial logic operation, an increase of numerical computation, loop adjustment and other functions, and adds analog PID control function modules; computing speed, CPU capacity to catch up with industrial control computer; enhance communications capabilities developed more species and local bus network (LAN), and thus can also be configured as a distributed system. Especially personal computer can also be absorbed into the PLC system.

PLC ladder programming rules

Although the ladder and relay circuit is similar in structure, elements, symbols and logic control functions and other aspects of phase, but they have many differences, the ladder program has its own rules.

1) Each logical line is always to the left from the bus, and then the contact is connected, the final termination of the coil or the right bus (right bus can not draw). Note: The bus between the left and the coil must be contacts between the coil and the right bus but you can not have any contact.

2) The ladder can contact any series or in parallel, but only in parallel to the relay coil and not in series.

3) the use of contacts unlimited number of times.

4) In general, the same coil can appear only once in the ladder. If in the program, the same coil is used twice or more times, known as “dual-coil output.” For the “dual-coil output”, some PLC treats it as a syntax error, and definitely not; some will be in front of the PLC output as invalid, only the last valid output; and some PLC, containing a jump or step ladder instruction allowed dual coil output.

5) For non-programmable ladder must be equivalent transformation into programmable ladder.
6) when there are several series circuit in parallel, the circuit with many serial contacts should be on the top, as shown in Figure 5-2a. There are several in parallel circuit in series, the circuit should be parallel contacts on the left, as shown in Figure 5-2b. Such a program compiled concise, less statements.

In addition, the input of the relay contacts in the design of the ladder according to the best state of all the input device is normally open to design more appropriate, less error-prone. Is recommended as an input device open with a constant contact with the PLC input terminal, the signal can only be used if some normally closed input, press input device is normally open to design, and then the ladder corresponding input relay contacts point negated (normally open into a normally closed, normally open normally closed change).

how to Learn Mitsubishi PLC ladder programming

Beginner PLC ladder programming should be to follow certain rules, and develop good habits. In this paper, Mitsubishi FX series PLC, for example, briefly explain the Mitsubishi PLC ladder programming rules to be followed, allowing users to better understand how to learn to see the Mitsubishi PLC ladder programming, we want to help. One thing to note is that although this article Mitsubishi PLC, for example, but these rules when other PLC program must also be observed.

1, PLC ladder ladder are starting left bus, and finally the right bus (usually can be omitted without painting, painting only left bus). The left side of each line is a combination of contacts, it represents the logical drive coil conditions, and represents the result of logic coil can only be connected on the right bus. Contact can not appear in the right side of the coil. The following figure (a) should read (b):

2, the contact should be plotted on the horizontal line, vertical line should be drawn on the relationship as shown in (a) contacts and other contacts between the X005 does not recognize. For such a bridge circuit should be from left to right, top to bottom, the principle of one-way, single draw all the way. FIG. (B) below:

3, parallel block series should contact many of the path on the ladder to the left (left and right light-weight principle); parallel blocks in series, parallel path should be more contacts on the top of the ladder (top heavy the rules). To do so, the program is simple, thus reducing scan time directive, which is particularly important for some large programs. As shown below:

4, not to use double-coil output. If the same ladder, more than two coils of the same component or twice, then known as the reuse or dual-coil output coil. Usually one of the dual-coil output ladder for beginners easy to commit wrong. In the double-coil output, only the last coil to be effective, and front coil is invalid. This is caused by the PLC scan feature of the decision.
PLC uses the CPU work cycle scan. Generally consists of five phases (as shown): internal diagnostics and treatment, and communication peripherals, input sample, the user program execution and output refresh. When the mode switch is in STOP, before performing only two phases: internal diagnostics and treatment, and communications peripherals.

1, the input sampling stage
PLC sequential reads the state of each input, and the input image is stored in the register we call the internal unit. When entering the program execution stage, such as the input changes state corresponding cell information input image area does not change with it, only the next input sampling phase of the scan cycle, the input image area corresponding to the cell information will change. Therefore, PLC will be overlooked pulse variation is less than the amount of the scan cycle switch input.
2, program execution stage
PLC from the program step 0, beginning with the first following the first left and right sequence scans the user program and logical operations. PLC input image by content area for logical operations, and the result is written to the output image area, rather than directly to the output terminals.
3, the output refresh period
PLC output terminal changes depending on the content of the output image area. This is the actual output of the PLC.
Above brief description of the working principle of PLC, the following examples explain why we then to write ladder program should not be repeated using a coil. As shown below, when the reset input is sampled input image area X001 = ON, X002 = OFF, Y003-ON, Y004 = ON is actually written to the output image area. But to continue down, because X002 = OFF, so Y003 = OFF, this is after the result has been written to the output image area, change the original state of Y003. Therefore, the output refresh period, the actual external output Y003 = OFF, Y004 = ON. Many newcomers to come across such a problem, why X001 has been closed, and no output Y003 it? Logic is wrong. In fact, because the use of double coil caused.

Note: we are talking about is not (should not) use dual-coil, double coils are not absolutely prohibited, in some special occasions can also use double-coil, then you will need a more extensive programming the experience and skills. Let’s talk about this. But still do not risk it for beginners. In fact, it can be seen from the above examples, the reason will result in Reuse coil output Y003 confusion is due to the reason the program is executed sequentially from top to bottom caused. But if we can change the order of program execution, at any time to ensure that the two coils is only one logical drive occurs, you can use double-coil. The most common method is to use a jump instruction

Program Analysis: M0 closed, the program jumps to at P0 (no X001 statement), M0 normally closed off, CJ P1 does not occur, the next statement. In this case, Y003 to X002 state drive. State M0 disconnected, according to the order of execution of T003 X001 is driven M0 NC closed skip P1 state by X003 to drive on Y004, which skips the X002 drive Y003 statements. Visible at the same time, Y003 drive only one can occur. In this case, the use of double-coil is possible.
But in ladder programming, we still have to try to avoid the use of dual-coil, and the introduction of auxiliary relay is a commonly used method. As shown below:

Figure (b),, X001 and X002 contact control auxiliary relay M000, X003 ~ X005 contact control auxiliary relay M001, and then by two relays M000, M001 parallel combination of contacts to control the coil Y000. Such logic has not changed, yet the double coil into a single coil.

if you find mitsubishi plc cable can click here

The difference between Siemens PLC and Mitsubishi PLC

PLC dealing with for so many years, often met with some beginners asked about the difference between PLC Siemens PLC and Mitsubishi PLC, there are many novice distress to choose which brand to learn, share this article the difference between Siemens PLC and Mitsubishi PLC to everyone.
First, the concept of different programming

    Mitsubishi plc is a Japanese brand, intuitive programming, it would be relatively easy to learn, but more instruction. Siemens plc is a German brand, more abstract instruction, learning more difficult, but less instruction, so learning and learning Mitsubishi Siemens cycle is the same.
Personally I think Mitsubishi (high-end Japanese brand) PLC Siemens software behind at least more than five years, and medium-sized Leaving aside, took advantage of the comparative Mitsubishi FX series minicomputers and Siemens S7-200 series, compared with the following Siemens Advantage:
1, Mitsubishi programming software from the early FXGPWIN to recent GX8.0 (I know the latest), and all the Japanese brands, the software programming ideas a single vertical structure from top to bottom, and Siemens MicroWIN it is both vertical and horizontal structures, and subroutines support local variables, the same functions can be programmed once the program can greatly reduce development effort and time.
2, S7-200 has been the strong support floating-point operations, programming software directly supports decimal input and output, and until recent years, Mitsubishi FX3U series introduced only this function, the previous FX2N series of floating-point capabilities are false.
3, S7-200 analog input and output process is very simple, AD, DA values ​​can be programmed without direct access, and former Mitsubishi FX2N series requires very cumbersome FROM TO instruction. FX3U down now support this feature, but a full five years or more late.

    4, of course, Mitsubishi FX2N series has its own advantages, one high-speed counter instruction convenient than S7-200, the second is more than 422 Siemens PPI port rugged (200 series because of non-PPI port optically isolated, non-standard operation and generic programming cable may cause damage to the serial port).
The above comparison merely minicomputer, as the Siemens 300 and 400 series and the larger TDC series, needless to say up here.
Learn PLC, Mitsubishi is very easy to use, because the simple idea to go straight, but from the perspective of learning, Siemens is definitely better.
Second, different chips
This is mainly reflected in the capacity and speed of operation. Siemens CPU226 program capacity 20K, the data capacity of 14K; Mitsubishi FX2N a total of only 8K, later 3U actually improved.
Siemens CPU226 and CPU224XP standard configuration that is 2 485 PPI port, the maximum communication speed of 187.5K; and Mitsubishi all series FX3U is a 422 before, but the speed is 9.6K. If you need even a smart meter what you must purchase another FX2N0-485BD other special modules. And two communication ports can be a link to download the data cable connected to a touch screen debugger, or you will disconnect the touch screen cable to connect a touch screen and then the data line, back and forth adjustment process is very cumbersome.
Third, the control of the different strengths
Siemens strengths are process control and communication control, Siemens analog modules are inexpensive, simple procedures, and Mitsubishi analog modules are expensive, complicated procedures, Siemens Communications is also easy to do, simple procedures, Mitsubishi in this function is weak. (Today’s signal is forwarded: ITVID Warranty: half replacement, 5-year warranty and lifetime maintenance)

    Mitsubishi has the advantage of discrete control and motion control, Mitsubishi’s instruction rich, special positioning instructions, control servo and stepper easy to implement some complex motion control is the strengths of Mitsubishi, Siemens will in this weak no special instructions, do not servo or stepper positioning control can not be achieved, but the complexity of the procedure, the control accuracy is not high.

    For example, a device just some motion control, such as a robot, you can choose Mitsubishi PLC, a device for a servo or stepper positioning control, also selected Mitsubishi PLC. Like central air conditioning, sewage treatment, temperature control and other such election will have a lot of Siemens PLC analog to deal with more appropriate to use a data communications equipment on the site have a lot of instruments for the collection, choose a good control of Siemens.
So for different devices in different control methods, we want a reasonable selection of PLC, with their strengths and avoid their weaknesses.

OYES PLC applied using a small wave soldering machine design

I. Overview
Usually large wave soldering machines, production lines, but some customers such as laboratories, schools, small factories need a small lead-free wave soldering machine. Certain electronic equipment factory developed this product, using the Austrian letter OYES series PLC and touch screen. The device requires three temperature control, a total of three PID, the Austrian letter OYES series PLC to achieve 8-channel PID, to meet the equipment requirements. Matched on the touch screen with a high price.
II. Process Description
Dual-wave soldering machine is first necessary to solder temperature, preheat temperature, preheat temperature compensation temperature value added to a total of three temperature settings. When the condition is satisfied, the machine can be produced. The PCB board placed on the track, press the start button, the transmission motor running, start the pump, spray flux, PCB board flux coating is completed, the delay pump stops. When the PCB board to the left after the preheat zone, the transport motor is stopped, parked in the PCB board preheat zone, preheat countdown, after the time to transfer the motor starts, the right to run the PCB, tin pump motor start HAL, PCB board after preheat temperature compensation zone into the HAL area, after HAL zone, tin pump stops when the PCB to the right, the motor stops transmission, cold start the motor. Such a complete cycle is over.
III. Hardware Configuration
Input: detection switch, the operating switch.
Switch detection are: the right point switch, left switch point.
Switch operation are: start switch, emergency stop switch.
Output point: heating solid state relay three regions, the transmission motors, two motors tin pump, exhaust motors, pump motors, motor cooling, the power to protect themselves point.
Analog inputs: three zones of temperature detection.
Motor transport and tin pump motor speed is required, using a frequency converter, the speed required communication settings.
Hardware Configuration:
Model Number Function
FBS-32MA 1 master controller, AC 220V input, relay output
FBS-16EYT 1 8x24V, transistor output module
FBS-6TC 1 4-channel thermocouple input module
Panelvisa PV057TST 1 Touchscreen HMI
IV. Programming
Including programming PLC program and touch screen program includes four major functions: Device parameters, manual debugging, production screen, alarm queries.
The following are some of the features: each movement device can be done manually debug screen is very useful when you start debugging and maintenance of equipment.
Device parameters can be set from the touch screen, including temperature, time, PID coefficients.
Alarm query, you can quickly find the cause of the malfunction.
Production data display screen is used in the production, buttons are placed in this picture, and user-friendly in this screen monitors three temperature zones, process instructions and operating in these images.
Transmission speed motor and pump motor tin set is set to the touch screen PLC, and then passed by the PLC via PORT1 each motor drive. Function uses the PLC MODBUS master station, very convenient.

PLC conduction delay timer instruction (TON)

When the limit switch 1 is set, the indicator 2 ON 180ms (timer clocked). When the accumulated value of the timer 1 (.ACC) reaches 180, 2 lights off, the indicator 3 is turned on, and remains on until the TON instruction is disabled. If you disconnect the timer is timing the limit switch 1, then turn off light 2.

Ladder Diagram

The Way of PLC memory Access to data

1. Bit, byte, Word and double word

1-bit binary number (bit) value of 0 and 12 different, can be used to switch (or digital) of two different States, such as the contacts open and close coils powerup and powerdown. If the bit is 1, it means that the ladder diagram programming elements in coils electricity, normally open, normally closed contact closed fracture, later called the programming elements 1 status, or ON the programming elements. Reverse is also against.
8-bit binary number 1 byte (Byte), No. 0 is the lowest bit (LSB), the 7th highest bit (MSB). 1 two byte Word (Word), two words 1 double word.

2. How to access the data
(1) , access: the address of the memory cell formed by byte address and address, such as I3.2, which regional identifiers I indicates an input (Input), the byte address 3, address 2. As shown in Figure:
This access method is called byte addressing modes.

(2) byte access: IB3 input bytes (Byte) by I3.0~I3.7 the 8 bits.
(3) the word access: adjacent bytes in a Word, a two byte characters in the address must be continuous, and the low byte in a word it should be 8-bit, high byte in a word should be the lower 8 bits. IB14 and IB15 IW14 made of 1 Word, IW14 I region in identifier, w (Word), 14 as the starting byte address. IW14 IB14 should be 8-bit, IB15 should be the lower 8 bits.
(4) double word access: the next four bytes represents a double word, fourbyte addresses must be continuous. Lowest bytes in a double word it should be up to 8-bit. ID12 consists of IB12~IB15 double words, I as a regional identifier, d represents access to double word (Double Word), 12 as the starting byte address. ID12 IB12 should be up to 8-bit, IB15 should be the lowest 8 bits.

As shown in Figure:

Such as: the electric 0231, 0232, 40 students in one class, each class is divided into 5 groups, each group of 8 people.
The position: first set electric 0231 class 1th class
Bytes: electrical 0231 group
The word mode: electrical 0231
Double-word mode: electric 023

PLC Siemens series power requirements and calculations

S7-200 CPU module 5VDC 24VDC power supply:

CPU when there are extension modules via the I/O bus to provide 5V power supply, 5V power consumption of all the extension modules and cannot exceed the power rating of the CPU to provide. If an external 5V power supply won’t be enough. Each CPU has a 24VDC sensor supply, it entered for the native entry point and extension modules and extension module 24VDC relay coil. CPU module power supply if power requirements exceed the fixed, you can add an external 24VDC power supply provided to the expansion module.
The so-called power calculation is to use the available power capacity of the CPU, less power consumption required for each module.

Note: EM277 module itself does not require a 24VDC power supply the power supply for the communication port used. 24VDC power supply demand depends on the load on the communications port.

The communication port on the CPU, and TD 200 can connect PC/PPI cable and power supply for them, the power consumption is no longer included in the calculation.

Siemens S200 PLC stores local variables (L)

       Local variable storage variable storage is very similar, the main difference is that the local variable storage is partially valid, variable storage is global. Global refers to the same memory can be any program (such as the main program, interrupted procedures or subroutines) access, partially valid is stored and associated with specific programs. Local variable memory used as a temporary data storage transfer function or subroutine. Can be bit, byte, Word or double word to access the data stored in the local variable.


L[bytes address].       [Address]     L0. 5

Byte, Word or double word:][L[length a starting byte address] LB34      LW20       LD4

Siemens PLC counter (c)

S7-200 CPU, counter to be accrued from the input port or the number of pulses sent by internal components. It has additional counters, counter and increase/decrease the counter 3 types. Due to the counter frequency scan cycle limitations, when you need to use high frequency to high frequency signal count counter (HSC).

Counter has the following two kinds of address form.

Current value of addressing: a 16-bit signed integer, stored cumulative number of pulses.

Counter address: based on the current value and preset values of the result set or reset. As with the timer, two addressing modes use the same format, the C+ counter number. For example: C0

Siemens PLC store (m)

       In logical operations usually require some intermediate information element, they are not directly drive external load, intermediate staging effects, similar to a relay contact relay in the system. In the S7-200 series PLC, memory can be used as control relays to store the intermediate operational state and control information. General bits of the use.

Store 4 addressing modes that can be bit, byte, Word or double word to access the data in the memory.

position   : m (bytes address]. [Address]: M0.3
Byte, Word or double word: m length][the starting byte address]: MB4 MW10 MD4

S7-200 PLC input relay

Enter a relay used to accept signals from external sensors or switches are special registers of the input image. It can only be driven by external signal driver. At the beginning of each scan cycle, CPU total physical input is sampled and sampled values written to the input register. Enter the relays generally used an octal number, a Terminal occupies a point. It has 4 addressing modes that can be bit, byte, Word or double word to access the input process image data in the registers.

section : I (bytes address]. [Address) such as: I0.1

Byte, Word or double word:][I[length a starting byte address] such as IB3 IW4 ID0

S7-200 PLC Byte addressing, Addressing and Double word address

1) byteaddressed (8 bit)
Byte addressable by the store identifier, identifier, a byte address combination of bytes. As VB100, its byte addressing mode as shown in the figure.
Byte addressing format: [region ID] [identifier].[byte address]
2) addressing (16 bit)
Addressed by the store identifier, identifier and byte the starting address combination. VW100, addressing mode as shown in the figure.
Address format: [region ID] [start address identifier].[bytes]
3) double word address (32 bit)
Double-word addressed by the store identifier starting address, two-character identifier and byte combinations. VD100, its double-word addressed, as shown in the figure.
Double word address format: [region ID] [two-character identifier starting address].[bytes]
For ease of use and the unification of data and memory cell length, S7-200 series, general storage unit has addressed, byteaddressable, addressing and Gemini addressed 4 addressing modes. When addressing, different ways of addressing cases use the same byte address as the start address, it indicates that the address space is different.
In S7-200, some special storage unit for storing data-bit addressing mode is not supported, mainly analog input/output, accumulators, timers, and the current value of the counter memory. Regardless of what mode of addressing and accumulator, will use 32-bit, analog unit addresses are even signs. In addition, timers, memory and the memory with the current value of the counter, belong to the same marking of device memory using the same address.

S7-200 PLC Data area

A) digital input and output image area

1. Enter mapping registers (digital input image areas) (I)

Digital input image is S7-200CPU for the input signal state opened up a store. Register identifier for the input image I, at the beginning of each scan cycle, CPU to sample the input points and registers the sample values in the input image.

Enter image register is the digital signals of PLC receives external input window.

Can be bit, byte, Word, double word four ways to access.

(1) press the bits: from I0.0~I15.7, a total of 128 points

(2) press the bytes: from IB0~IB15, a total of 16 bytes

(3) press character: from IW0~IW14, a total of 8 characters

(4) press the double-word: from ID0~ID12, a total of 4 double word

2. The output image register (Q)

Digital output image area is the S7-200CPU for the signal at the output state of a storage area. Register the output image‘s identifier is Q (from Q0.0~Q15.7, a total of 128 points), at the end of each scan cycle, CPU registers of the output image data to output module, which then drive the external load.

Can be bit, byte, Word, double word four ways to access.

(1) press the bits: from Q0.0~I15.7, a total of 128 points

(2) press the bytes: from QB0~QB15, a total of 16 bytes

(3) press character: from QW0~QW14, a total of 8 characters

(4) press the double-word: from QD0~QD12, a total of 4 double word

Note: practically no use of input and output image area of the storage unit can be used as relay.

(B) analog input images and output image area

1. Analog input image areas (AI)

Analog input image area is the S7-200CPU analog input signal opens a store. S7-200 measurement of analog (such as temperature and pressure) into a 1length (2 bytes) of digital, analog input registers with the image identifier (AI), the length of the data (w) and the bytes of the start address.

From AIW0~AIW30, a total of 16 characters, a total of 16 analog input is allowed.

Description: analog input values for readonly data.

2. Analog output image area (AQ)

Analog output image area is the S7-200CPU analog output signal to open a store. S7-200 1Word (2 byte, 16-bit) converts the digital proportional current or voltage. Analog output registers with the image identifier (AQ), the length of the data (w) and the bytes of the start address.

From AQW0~AQW30, a total of 16 characters, allowed a total of 16 analog outputs.

(C) the memory variable (v) (the equivalent of auxiliary relays)

PLC program execution process, there will be some intermediate results of the control process, these intermediate also need memory to save the data. Variable storage is designed according to the actual requirements. Variable storage is one of the S7-200CPU set up to save the intermediate variable data stores, represented by v.

Can be bit, byte, Word, double word four ways to access.

(1) press the bits: from V0.0~I5119.7, a total of 40,960 points. CPU221, CPU222, memory only 2048 bytes of the variable, its variable store only to V2047.7.

(2) press the bytes: from VB0~VB5119, a total of 5,120 bytes

(3) press character: from VW0~VW5118, a total of 2,560 words

(4) press the double-word: from VD0~VD5116, a total of 1280 double word

(D) information technology(m)

PLC program execution process, some flags may be used, which also use memory to storage. Memory is designed according to the requirements. Memory is one of the S7-200CPU set up to keep flag data store represented by m. Although the area is called memory, but the data can not only be, but also can be a byte, Word or double word.

(1) press the bits: from M0.0~M31.7, a total of 256 points.

(2) press the bytes: from MB0~MB31, a total of 32 bytes

(3) press character: from MW0~MW30, a total of 16 characters

(4) press the double-word: from MD0~MD28, a total of 8 double word

(E) the control relays in the order (s)

PLC program execution process, the sequence may be used. Sequence control relays are designed according to the characteristics of sequential control and. Control relay is S7-200CPU in order to control relays in the order established a store of data, denoted by s. Control process in order for the organization step process control.

Can be bit, byte, Word, double word four ways to access.

(1) press the bits: from S0.0~S31.7, a total of 256 points.

(2) press the bytes: from SB0~SB31, a total of 32 bytes

(3) press character: from SW0~SW30, a total of 16 characters

(4) press the double-word: from SD0~SD28, a total of 8 double word

(F) local storage area (l) (the equivalent of auxiliary relays)

S7-200PLC 64 bytes of local storage, which can be used as a temporary store for the 60 and passing parameters to the subroutine.

Local and variable storage is very similar, the main difference is that the variable memory is of global and local storage is partially valid. Global refers to the same memory can be accessed by any program (for example, the main program, subroutine, or interrupt). Local guide memory areas associated with specific programs.

Several programs between visits.

Local storage area is a store set up S7-200CPU as a local variable data, represented by l. Data in the region can be bit, byte, Word, double word four ways to access.

(1) press the bits: from L0.0~L63.7, a total of 512 points.

(2) press the bytes: from LB0~LB63, a total of 64 bytes

(3) press character: from LW0~LW62, a total of 32 characters

(4) press the double-word: from LD0~LD60, a total of 16 doubleword

(G) the timer memory area (t)

PLC at work and ultimately need timing, the timer is the realization of PLC timer function of timing equipment. Timer number:


S7-200 has 256 timers.

(VIII) counter memory area (c)

PLC at work sometimes requires not only time count may also be required. Counter is counting device of PLC with counting function.

Counter ID:


(H) high speed counter (HSC)

Today high speed counter is used to scan faster than CPU events. S7-200 high speed counters not only count the frequency of up to 30kHz.

S7-200 high speed counter there is a 32-bit signed integer to the current value of the counter. To access high-speed counter values, you must give high speed counter address, namely, high speed counter number.

High speed counter number: HSC0, HSC1, … …, HSC5.

S7-200 6 high-speed counters. Where CPU221 and CPU222 only have 4 high-speed counters (HSC0, HSC3, HSC4, HSC5)

(I) the accumulator (AC)

Accumulators can be read/write device like a memory. For example, you can use the accumulator parameters passed to a subroutine, or return from the subroutine parameters and is used to store intermediate data are calculated.

S7-200CPU provides 4 32-bit accumulator (AC0, AC1, AC2, AC3).

Can be byte, Word or double word accumulator to access data in the data. However, as bytes when reading/writing data in the accumulator, read/write only the lowest 8 bits of the accumulator in the 32-bit data data. If it is read/write in Word forms the accumulator data can only read/write in 32-bit accumulator data the low 16 bits of data. Only take the form of double words when reading/writing data in the accumulator, can read and write all 32 bits of data at once.

Because operation of PLC function is separated from the accumulator. Not as occupied as the other memory accumulators.

(J) special storage areas (SM)

Special memory is S7-200PLC the media for passing information between the CPU and the user program. They can reflect the CPU running the various status information, users can use this information to determine the machine‘s operating status, to determine the user what to do, what not to do. These special information storage to storage. Special memory is designed according to the requirements.

1. Special storage areas

It is S7-200PLC to save its State data and established a store, SM said. Special memory data is read write, some are readonly. Special memory data can be a bit or a byte, Word or double word.

(1) press the bits: from SM0.0~SM179.7, a total of 1440 points.

(2) press the bytes: from SM0~SM179, a total of 180 bytes

(3) press character: from SMW0~SMW178, a total of 90 characters

(4) press the double-word: from SMD0~SMD176, a total of 45 double word

Description: special the first 30 bytes of the memory area is readonly.

2. Commonly used special relay and its function

Special storage for CPU and the exchange of information between users, for example, SM0.0 has been the 1 State, SM0.1 only the first scan of the execution of the userprocess cycle for the 1 State. SM0.4 and SM0.5 provide a period of 1min and 1s of the clock pulse. SM1.0, SM1.1 and SM1.2 respectively zero flag, overflow flag and negative signs.