Tag Archives: plc training

RS232 serial interface basics

Now more commonly used RS232 serial 9pin d-shaped serial [DB9] and 25pin d-shaped serial [DB25], the maximum communication distance of up to [15m]. The short distance between two devices close, 232 of them with 232 cable directly connected to the serial port if distant, via modem (MODEM) connected.
RS232 interface
Negative logicthe output is represented by +5V~+15V [0],-5V~-15V said the logic [logic 1].
Single drivethrough the data sender [TD] output driver circuit, and signal GND as reference points.
Receivingby the data receiver [RD] enter the receiving level and to signal GND as the reference point.
RS232 wire
To achieve [point-to-point bi-directional communication] requires 3 communication cable, host the data sender [TD] with data from the receiver [RD] connected to host the data receiver [RD] with data from the transmitter [TD] connect two signal ground [GND] is directly connected to.
RS232 notice
RS232 serial ports cannot be directly connected to the RS485 serial portbecause they have the same electrical standards; serial converters available on the market, must pass through the converter to connect. Also, do not plug, and plug when there is at least one end is powered down, or easily damaged serial port.

CNC machine tools PLC hardware electrical interface

CNC machine tools PLC consists of two types of interface information, namely electrical interfaces of the hardware information and register the software interface information.
1. the signal flow including input and output interfaces
2.From the signal amplitude characteristics including analog and switch interfaces
Input signal: composed of machine transfer signals to the PLC or CNC external device known as the input signal.
Output signal: from PLC to machine or CNC external devices such as transmitting signals known as output signal.
PLC common electrical interface switching input interface, switch outputs and analogue output interface 3.

PROFIBUS fieldbus

PROFIBUS is the abbreviation of Process Field Bus, 1989 by Siemens-led 13 companies and 5 research institutions in the standardization norms established in a joint development project. 1996 PROFIBUS as Germany national standard DIN19245, is also a European standard EN50170. PROFIBUS achievement in practical applications, in many bus top, widely used in a variety of industries, is one of the most competitive field bus.

Current PROFIBUS 3 series: PROFIBUS-FMS and PROFIBUS-DP, and PROFIBUS-PA. PROFIBUS-DP has a maximum transmission rate of 12Mbps, applied to the field level, fast, cheap form of transport suitable for automatic control system with real-time communications between field devices. PROFIBUS-FMS workshop level, that is, lower required object-oriented, provide a large amount of data communication services, it has a tendency to be replaced by Ethernet. PROFIBUS-PA specifically designed for process automation, it uses IEC1157-2 technology can be used in potentially explosive environments. PROFIBUS-DP and PROFIBUS-FMS use the same transmission technology and bus access protocol, they can operate on the same cable, and PROFIBUS-PA device via segment Coupler can also be easily integrated into the PROFIBUS-DP network.

PROFIBUS has 3 kinds of transport types: PROFIBUS-DP and PROFIBUS-FMS RS-485 (H2), PROFIBUS-PA IEC1157-2 (H1), fiber optic (FO).

PROFIBUS reference model follows the ISO/OSI model, like FF, it also omits (3~6), adds a user layer. PROFIBUS-DP 1th, 2nd layer and user interface. PROFIBUS-FMS 1, 2, and 7 are defined PROFIBUS-PA data transmission using PROFIBUS-DP Protocol, just upper describes the PA field device behavior rules. Its bus access ways: master station communication between token ring, between the master and the slave master/slave mode. PROFIBUS bus type, tree, Star network topology, you can hook up on the bus 127 sites. PROFIBUS rules developed for the following PROFIBUS protocols laid the Foundation for interoperability between devices. Through the process of equipment specified in accordance with regulations of PROFIBUS parameters, parameters, manufacturerspecific parameters, you can achieve interoperability between devices.

CAN be the abbreviation for controller area network

CAN be controller area network (Controller Area NetWork) for short. It is Germany developed by Bosch company and several other semiconductor manufacturers, was initially designed specifically for the automotive industry, the workload of aimed to save on wiring, because of its features were later widely used in all walks of life. Its chip production by Motorola, Intel and other companies. International CAN manufacturers and users of (the CIA) was established in 1993 in Europe, which is mainly to solve the practical problems in the application of CAN bus, provides CAN products and development tools, promote the application of CAN bus. At present CAN have technical Committee for approval as an international standard by ISO TC22, field bus, it was approved by the International Organization for Standardization is the only field bus.

CAN also follow the ISO/OSI reference model, the physical layer, data link layer and application layer. CAN use multi master works, regardless of their master/slave between the nodes, node between priority points, flexible communications, point to point, point to multipoint and radio transmission of data, no scheduling. Are nondestructive bus arbitration technology CAN, sent by priority, you can greatly save bus arbitration conflicts between, shows good performance under heavy load. CAN use short frame transmission, effective bytes per frame for 8, short transmission time, low probability of interference. Each frame has a CRC Checksum error detection measures, ensuring data error rate extremely low. When a serious error, with automatic closing function so that other nodes on the bus are not affected, so CAN be the most reliable of all buses. CAN bus twisted pair, coaxial cable or optical fiber can be used as the transport medium. Direct communication distance up to it 10km, communication speed up to 1M bps (range 40m), to hang the device on the bus to be mainly depends on the bus driver, up to a maximum of 110. But CAN be used in explosion-proof areas.

Structure and application of CC-link fieldbus

Integration of fieldbus control and information processing CC-Link (Control and Communication Link) is a province of wiring and information networks, it is not only highly real-time, distributed control, with smart device communications, RAS features, and rely on strong links with many equipment manufacturers, provide an open environment. Q Series PLC modules CC-Link QJ61BTll, in the A/QnA series of skills at the same time, also used the remote handy features such as device initialization.

In order to use a variety of equipment directly connected to the CC-Link on, with numerous equipment manufacturers at home and abroad to establish a partnership, enables the user to easily select a field device, an open network. In October 2000, Woodhead, and Contec, Digital, NEC, and Panasonic Electric, Mitsubishi, 6 Executive member companies launch, Japan has set up an independent nonprofit institution CC-Link Association (CC-Link Partner Association, referred to as CLPA), aimed at the effective promotion and popularization of CC-Link technology on a global scale. In December 2001, members of the CLPA amount to more than 230 companies, with more than 360 compatible products.

1. CC-Link composition

CC-Link system at least 1 main station, you can connect remote I/O, remote equipment stands, a local station, the main station, intelligent equipment total 64 stations. CC-Link station type as shown in table 7-5.

Table 7-5 CC-Link station type


Type of station

Master station
All stations on the control CC-Link, and set the parameters. Each system must have a 1master. Such as the A/QnA/Q Series PLC

Local station
CPU module can communicate with the main station and the other local stations.

Such as the A/QnA/Q Series PLC

Standby master station
If a failure occurs at the primary site, replaced as the primary station, and as a station master to continue the data link.

Such as the A/QnA/Q Series PLC

Remote I/O stations
Can only deal with one bit of information, such as remote I/O modules, solenoid valves, etc

Remote device
To deal with information and information station, such as a/d and d/a conversion modules, inverters and other

Smart devices
To deal with information and information, but also complete data transfer station on a regular basis, such as the A/QnA/Q Series PLC, HMI, etc

CC-Link systems can be equipped with multiple repeaters, in case of not reducing the communication speed, extended range, maximum of 13.2km. For example, you can use the optical Repeater, in maintaining the speed of 10Mbps case, extended the total distance to 4300m. In addition, tRepeater to complete tconnection, more suitable for connection requests.

2. CC-link communication mode

(1) circulating communications CC-Link broadcasting loop communication. In the CC-Link system, main station, local station data area with remote I/O stations, remote device stations, correspond to the smart device, and remote remote input and output data register will be automatically refreshed. Also, because the main station to the remote I/O stations, remote device, smart device station information will be transferred to other local stations, so local stations can also learn about remote stations.

(2) CC-Link the link element per CC-Link system for a total of 4,096 points, plus totals of 512 words cycle of data communication via these linked elements to complete the remote I/O, analog modules, interface, inverter and other FA (industrial automation) equipment products for high-speed communications.

CC-Link remote input link element (RX), remote output (RY), remote registers (RWw) and remote registers (RWr) four, as shown in table 7-6. Remote entered (RX) is from remote station to main station entered of open/shut signal (bit data); remote output (RY) is from main station to remote station output of open/shut signal (bit data); remote left-device (RWw) is from main station to remote station output of digital data (Word data); remote left-device (RWr) is from remote station to main station entered of digital data (Word data).

Table 7-6 link components list


The CC-Link system

Maximum number of links
Remote inputs (RX)
At 2048 o ‘ clock

Remote output (RY)
At 2048 o ‘ clock

Remote registers (RWw)
At 256 o ‘ clock

Remote registers (RWr)
At 256 o ‘ clock

Each site link points
Remote inputs (RX)
At 32 o ‘ clock

Remote output (RY)
At 32 o ‘ clock

Remote registers (RWw)
At 4 o ‘ clock

Remote registers (RWr)
At 4 o ‘ clock

Note: each station according to its station in the CC-Link type, defined as 1, 2, 3 or 4 stations, namely traffic for the table 3-35 in the links to each station number 1 to 4 times.

(3) the instantaneous transmission in communication CC-Link, in addition to autorefresh loop communications, you can also use the instantaneous transfer, as a way of sending and receiving information on a regular basis. Instantaneous can deliver traffic from the main station, local stations, smart device, you can make the following:

L) a PLC standing data read and write another soft PLC station components.

2) master PLC for smart devices to read and write data.

3) GX Developer software to another PLC program can be read/write or monitoring.

4) host PC devices such as read and write a soft component data from PLC station.

3. Features of CC-Link

(1) communication communication speed CC-Link to achieve the industry‘s highest speed (10Mbps), ensures that required high speed response of the sensor input and largecapacity data communications between intelligent devices. Can select the most suitable for a system of communication and total distance shown in table 7-7.

Table relationships 7-7 CC-Link communication speed and distance

Communication speed

Communication distance

Note: through a Repeater to extend the communication distance

(2) high-speed link scanning in only the main station and the remote I/O systems, by setting for remote I/O network mode method, link scanning time can be shortened.

System remote I/O stations on the table 7-8 to all the remote I/O network mode and there are various types of systems used by the remote network mode (normal mode) link to comparison of scanning time.

Comparison of table 7-8 link scan time (communication speed is 10Mbps)

Station number
Link scan time/Ms

Remote I/O network mode
Remote network mode (normal mode)

1. 02
1. 57

1. 77
2. 32

3. 26
3. 81

(3) the alternate main function when using an alternate main function, when the main station when an exception occurs, standby master station over as the primary station, data link network continues. And during operation at the main station, the original master is restored, you will serve as an alternate host to return to the data link. In this case, if you run the main station when an exception occurs, the standby master station data link also will take over as the primary station to continue.

(4) automatic start function in CC-Link only the primary station and remote I/O systems, set network parameters if you do not, when powered up, or automatically start data link. Default parameters for 64 remote I/O stations.

(5) the remote device initialization functions using GX Developer software without writing sequential control program, you can complete the handshake signals control, set of initialization parameters initialize the remote device.

(6) that interrupts program start (interrupt) when receiving data from the network, setting when the condition is true, you can start interrupt programs of the CPU module. Therefore, you can meet the requirements of high-speed processing system. Breaks starting condition of the program, you can set up 16.

(7) operated remotely by connecting a PLC in the CC-Link station on the GX Developer software to other PLC remote programming on the network. Also available through specialized peripheral devices connection module (as a smart device) to complete the programming.

PROFIBUS Protocol and network

1, PROFIBUS Protocol has three main parts:

PROFIBUS DP (Distributed I/Os): between the master and the slave uses roundrobin method of communication, mainly used in manufacturing unit-level and field-level communication in automation systems.

PROFIBUS PA (Process Automation): power transmission and communications data across the bus, mainly used in process automation system oriented unit-level and field-level communications.

PROFIBUS FMS (Fieldbus Message Specification): define a communication model between the main station and the main station, mainly for automated systems process data exchange system and workplace level.

2, PROFIBUS networks from the main station, from the station, consisting of network components:

Main station is also referred to as the active node. Includes SIMATIC PLC,SIMATICWinAC controller, support the main features of communication processors, IE/PB link module and ET200S/ET200X module

Typical slave for sensors, actuators and the inverter. From the station does not have bus access authorization.

PROFIBUS transmission speed for 9.6/19.2/93.75/187.5/500/1500Kbit/s and 3/6/12Mbit/s.

Maximum number of nodes is 127 (address 0-126).

S7-300 PROFIBUS DP system configuration

PROFIBUS DP system configuration can be classified as DP master station system, CP Communications template main station system and intelligent slave DP systems. Three take DP master station system in the DP, CP Communications template main station system is basically the same hardware configuration.

1. the PROFIBUS DP systems: master/slave with DP systems

Take DP master/slave system design is very flexible, it allows the use of different data regions in the CPU to store the DP process data. Selection depends on the type of CPU and application of a data region. Process image, memory, and data blocks are available for DP input and output data.

Process image is the standard data distribution. CPU in the process image shall have sufficient space for the DP to keep a continuous input range and a continuous output of the area. This process may be affected by the central configuration image size and limit to the number of the signal module.

Memory with the same process image, the region for DP signal global storage. For example, if the space available to process images (the space not occupied by central signal module) isn’t enough, you can use the store.

Data blocks can also be used to store the DP signals. Best DP data relating to the area used a program called only this store.

F establishment of S7-300 PLC main station hardware configuration (DP): double-click the X2/DP” or CP342-5 column in the dialog box, select DP-Master

F add ET-200 at the PROFIBUS bus station:

Master/slave I/O addresses can not be duplicated, which is assigned by the system software. If a user needs to modify the address, you can reset the template properties dialog box.

2. PROFIBUS DP systems II: master station system with CP Communications template.

Communication templates CP master/slave system, master/slave I/O addresses can be repeated, because the PLC system is analogous to two CPU. Users can use the template properties dialog box to set I/O address, just within the master or the slave I/O addresses can not be duplicated.

When configuring when CP, you must set the operating mode. (Operating Mode)

CP342-5 DP DP-SEND and DP-RECV is always required. These chunks via the backplane bus transferring data between the CPU and CP.

Data CP342-5 is always a continuous transmission. Master the maximum data length is 240 bytes, maximum length is 86 bytes of data.

DP-SEND (send) specified in the CPU sends data to the PROFIBUS DP data area of CP‘s send buffer, for transmission to the DP Slave station; DP-RECV (receive) reads data from the DP Slave, PROFIBUSCP data into the CPU of the receive buffer specifies the DP in the data area.

DP-SEND (send) and DP-RECV (incoming) structures

DP-RECV (receive) the type and function of the Terminal parameters

DP-SEND (send) the type and function of the Terminal parameters

3. the PROFIBUS DP systems III: DP system with intelligent slave.

Intelligence from the station‘s main features are: DPmaster input/output data directly from the real input/output port, but from the preCPU.

S7-300 industrial Ethernet

Communications processors are used for SIMATIC CP 343-1 S7-300 communications processor. Shared CPU communications tasks and allows other connections.

S7-300 by CP 343-1 and programmer, computer, human interface device, other SIMATICS7 system and the SIMATIC S5 programmable controller to communicate:

CP 343-1 communication processors installing in S7-300 DIN standard rail, can also be installed on the extension frame, via the bus connector is connected with the adjacent modules, no slots rules.

15pin dsocket is used to connect Ethernet; 4pin terminal block for connecting external 24 VDC power supply of industrial Ethernet RJ45 socket for fast connections.

Handle data communication in industrial Ethernet CP 343-1. The module has its own processor. Using ISO Transport Protocol TCP protocol, UDP transport protocols. Multiple agreements and PG/OP communications, S5compatible communications and other communications services. Transmitted through the ISO data communication interface can transport a maximum of 8,000 bytes of data.

STEP7 system network under different forms:

1 1 subnet (subnet)1 project (project)

2 SIMATIC S5 with other stations within one subnet

3 2 or more subnets (subnet)1 project (project)

4 1 subnet (subnet)multiple projects (project)

More than 5 more than one subnet (subnet)multiple projects (project)

6 subnet (subnet) connections (ISO-on-TCP)

CP-SEND (send) and CP-RECV (incoming) structures

CP-RECV (receive) the type and function of the Terminal parameters

CP-SEND (send) the type and function of the Terminal parameters

Siemens PLC basic classification

1. S7 series: traditional PLC product, S7-200 is for the low performance requirements
Small PLC. S7-300 is a modular-type small and medium PLC, up to 32 modules can be extended.
S7-400 is a large PLC can be expanded more than 300 modules. S7-300/400 form
MPI, PROFIBUS or industrial Ethernet, etc.
2. M7-300/400: the S7-300/400 the same structure, it can be used as a CPU
Or function module to use. Has the function of ATcompatible computer, you can use C,C++ or
Programming languages such as CFC.
3. C7 S7-300 PLC,HMI (humanmachine interface) Control Panel, I/O, communication and
Process monitoring system.
4. WinAC and standard Windows interface (ActiveX,OPC) that provides soft
PLC PLC or slot.

S7-200 programs instructions cannot be used

S7-200 programs, there are those that do not can be used? I did a lot of subroutines, subroutine repeatedly calls without any problems, but there is a subroutine is invoked, each loop inside the first command that calls the subroutine works, while the second call is null and void. If this subroutine and then recopy it, is also a subroutine, which is completely different, just different subprograms, the two calls are normal. Because subroutines using the EU command? R or s is used should not be a problem.
S7-200 PLC 2009 Chinese version of the system manual 204 page says: when the subroutine is called multiple times in the same period, you cannot use the rising edge, falling edge, timers, and counters command.
S7-300/400 number of timers, counters can be set to block input parameter, specifies a different number at each call, timer and counter argument. S7-200 you do not have this feature, use a fixed timer number only in the subroutine. If more than one control object calls the subroutine, different control objects use the same timer counter will produce disastrous results.
Whether there is a rising and falling edge, must go through two scan cycle to determine, before a scan cycle read triggers, and stored to an address within the trigger signal with the scanning cycle compared with the State.
S7-300/400 rising edge, falling edge, directives need to be specified before saving a bit address of the scanning cycle. S7-200 rising edge, falling edge, instructions of the previous status of the scan cycle is saves the operating system. But since only a variant of the previous status of the scanning cycle, so when the program is called multiple times in the same period, you cannot use the rising edge, falling edge, instructions.

PLC sequential control design method

Sequential control design method is the basic idea of the system connected to the order of a working cycle is divided into several stages, these stages are known as step (Step). Sequential function chart (SFC) is mainly composed of steps, to the connections, transformations, transitions, conditions and actions.
Figure 1 is a diagram on how to take control of transport and the input and output waveforms, pressed the starting button I0.0 started 1th, belt, delay automatic start after the 6s 2nd transport zone. Press the stop button I0.1, stop 2nd transport zone, automatically stops after 5s, 1th conveyors. Figure 2 is S7-300 S7-Graph draw sequential function chart language.
Transport work was natural Division of 6s delay start running, 5s down, twin delay these 3 steps (see Figure 2 for S2~S4), and also set a initial step S1 waiting to start, the initial step in double wire frame representation.
When the system is in the stage where a step, said the step was activities. Green in the monitoring activities.
Each step is in the box to the right of the step to complete the action. R, s for the Q4.0 in the action reset and set, S2 d delays, but not use the timer to delay. The 6s delay when M0.3 becomes 1.
S3 Q4.1 n in steps for nonstorage, S3 is the active step Q4.1 1 status, Q4.1 is 0 when the inactive state.
Next step to the line. Used to line and directed perpendicular to the line of dashes to indicate.
That system by the current steps into the next signal might be called transition conditions, such as the Start button I0.0 is converted from the initial step to convert the starting delay step condition. S7-Graph ladder diagram and function block diagrams to indicate conditions.

N indicates the action type is stored, 0, 1 State and the State of the same.
Handbook of instruction can be seen in the action of S7-Graph

Introduction to PLC programming

Early programmable logic controller referred to as programmable logic controllers (Programmable Logic Controller,PLC), it is mainly used to replace relay logic control. With the development of technology, which uses microcomputer technology of industrial control equipment is already far exceeds the scope of logic control, therefore, such devices are called programmable controller, referred to as PC. But in order to avoid personal computer (Personal Computer) referred to as mixed, programmable logic controller is referred to as PLC,plc since the 1966 United States DEC (DEC) development occurs, the current United States, Japan, Germany quality of programmable controllers, powerful. 2, PLC basic structures

PLC is in essence a designed for industrial control computer, the hardware structure is basically the same as microcomputers, constitute:

A, power supply

PLC power supply plays an important role in the whole system. If you do not have a good, reliable power supply system is not working properly, so the PLC manufacturer attaches great importance to design and manufacture of power supplies. AC voltage fluctuations in +10% (+15%) range, you can take other steps while the PLC is connected directly to the AC power

B. central processing unit (CPU)

The central processing unit (CPU) is the Centre of PLC control. Procedural functions conferred by it according to the PLC system receives and stores from the programmer typed user programs and data, check power supply, memory, I/O, and the alert status of the timer, and the diagnosis of user program for syntax errors. When PLC inputs at run time, it first receives the input device to scan the status and data, and into the I/O mapping, and then one by one to read the user program from the user program memory, after a command interpreter, as provided for in Directive performs a logical or arithmetic operation result into images of I/O or data register. After the completion of all user programs, such as, finally, I/O mapping of the output or output registers of data sent to the output device, and so to run until it stops running.

In order to further improve the reliability of PLC, in recent years, large PLC also uses dual redundant system CPU, or three CPUvote system is adopted. This way, even if one CPU fails, the whole system is still working.

C, storage

Storage system software memory known as the system of program memory.

Memory storage application software known as user program memory.

D, input/output interface circuit

1, live input interface circuit consists of the optical coupling circuits and computer input interface circuit functions are controlled by PLC with field interface input channel.

2, output interface circuit of the output data registers, gated and interrupt request circuit integration and PLC through component output interface circuit to the scene output of control signals.

E, function module

Counting, positioning modules

F, communication module

Such as Ethernet, RS485, PROFIBUS-DP communication module

PLC, the structure and principles of learning

Programmable controllers (Programmable Controller) should be referred to as PC, PC PC in order to distinguish, so referred to as programmable controller PLC (Programmable Logic Controller), but does not mean that PLC can control logic signal. Application and design of PLC is specifically designed for industrial environments, comes with an intuitive, simple and easy to learn programming language environment for industrial control devices. A, PLC basic composition

PLC basic components including the central processing unit (CPU), memory, input/output interface (abbreviated as I/O, including input and output interfaces, external device interface, extension, etc), external programming device and the power supply module, as shown in Figure 1. Between various units within the PLC through power bus and connected to the data bus, address bus, control bus, others based on the actual control object to configure the appropriate device and control device for PLC control system.

1. central processing unit

The central processing unit (CPU) consists of the controller, operations and registers and integrated on a chip. CPU bus via data bus, address bus, control bus, and power bus and memory, input/output interfaces, programmer, and is connected to the power supply.
Small PLC of CPU used 8 bit or 16 bit microprocessor or single tablets machine, as 8031, and M68000,, this class chip price is low; medium PLC of CPU used 16 bit or 32 bit microprocessor or single tablets machine, as 8086, and 96 series single tablets machine,, this class chip main features is integration high, and operation speed fast and reliability high; and large PLC is needed used high-speed bit tablets type microprocessor.
Procedural functions conferred by the CPU according to the PLC system command PLC control system to complete various tasks.
2. memory

Memory to store system in the PLC program, user programs and data, and so on.
1) system memory
PLC PLC program the basic functions of the system, that part of the procedure by PLC manufacturers prepared and cured in the program memory of the system, there are systems management, user instructions explain procedures and functions of program and system calls, and so on.
Running System Manager main control PLC, PLC, in the right order; interpreter PLC user instructions user instructions into machine language instructions, transport within the CPU performs functional program and system calls are responsible for different functions called subroutines and its management procedures.
System procedures are needed for long-term preservation of important data, so its memory ROM or EPROM. ROM is read only memory, the memory can be read out, unable to write content, ROM is non-volatile, after disconnecting the power could still save the stored content.
EPEROM for electrically erasable programmable read only memory, ultraviolet irradiation on chip lens window must be used to erase the writing and EEPROM electrically erasable programmable readonly memory E2PROM, FLASH, etc.
2) user program memory
User program memory is used to store the PLC application user load, load the initial user program due to the need to modify and debug, called the user debug programs, stored in random access memory RAM for random read and write operations to facilitate the users to modify and debug.
By modifying the program with Debug program called user, because you do not need revision and debugging, so user programs are intrinsic to long-term use in the EPROM.
3) data memory
PLC run process in the needed generated or calls Middle results data (as entered/output components of State data, and timer, and counter of pre reset value and current value,) and group State data (as entered output group State, and set entered filter, and pulse capture, and output table configuration, and defined storage district keep range, and simulation potentiometer set, and high-speed counter configuration, and high-speed pulse output configuration, and communications group State,), this class data store in work data memory in the, due to work data and group State data constantly changes, and not need long-term save So random access memory RAM.
RAM is a high density, low power consumption semiconductor memory, available lithium-ion batteries as a backup power supply, once the power would be powered by lithium-ion batteries, keep the contents of the RAM.
3. the interface

Input/output interface is the PLC and industrial control interface circuit or sensor and actuator connections. PLC inputs with DC input and AC input, AC and DC input type; output connector output transistor, thyristor output and relay output type. Output transistors and thyristors is contactless output transistors, transistor output type used in high frequency small power load, thyristor output types for high frequency and high power load; contact output relay output circuit for low frequency loading.
Control or component input to the PLC control signal is detected, such as limit switches, buttons, selector switches and other sensors such as switching or analog output, through an input interface circuit converts these signals into CPU capable of receiving and processing of signals. Output interface circuit CPU weak control signal sent out into the field need strong electric output signal to drive solenoid valves, contactors, actuators of the controlled device.
1) input interface
Input interface for receiving and collecting two types of input signals, one button, switch, limit switch, relay contact first class switching input signals; the other is by potentiometers, speed generators and converters provide a continuous change of the analog input signal.
DC input interface circuit as shown in Figure 2 for example, R1 is the cut-off current and voltage divider resistors, R2 and c constitutes a filter circuit, filter the input signal by optical coupler t coupled to the internal circuit. SB when input button is switched on, the optical coupler t-pass DC input signal is converted to a PLC can accommodate a standard 5V signal levels (abbreviated TTL), LED input indicator lights, signal is connected. Micro-computer input interface circuit by the register, gated and interrupt request logic circuits, the circuit integrated on a chip. AC input with AC and DC input interface circuit similar to the DCinput interface circuit.

Filter to eliminate jitter of the input contact, opto-coupled circuit prevents the scene of strong electrical interference into the PLC. Because the input signal using optical signal coupling between PLC internal circuit and, therefore, the two electrically isolated so that interfaces with anti-jamming capability. Input signal passes through optically converted to 5V TTL after entering data into registers, and then by bus to the CPU.
2) output interface
Output interface circuit to control a variety of output control signal actuator. Commonly used actuator contactors, solenoid valves, control valves (analog), speed control devices (analog), lights, alarms and digital display device. Output interface circuit usually consists of micro-computer output interface circuit and power amplifier circuit, similar to the input interface circuit internal circuit of photoelectric coupler between the output circuit and electrical isolation of interference.
Micro-computer output interface circuit usually consists of output data registers, gated and interrupt request logic integrated circuits on a chip, CPU data bus output signals to the output data registers, the power amplifier is designed to adapt to the requirements of industrial control, microcomputer output signal amplification.
3) other interfaces
If the number of host I/O is not enough, through I/O interconnect cables and I/O expansion unit (without the CPU) to expand. PLC and configuration to connect various peripheral interfaces, through serial communication cable, EPROM writing function.
4. programmer

Programmer is designed to download userwritten program to the PLC user program memory and programmers inspect, modify, and debug user programs, monitor user program execution process, shows the PLC status, internal components and system parameters.
Programmer simple programming and graphics programming in two ways. Simple programming, the volume is small, easy to carry, but can only be used online in the form of programming, programming and debugging for small PLC. Graphics programmer available programming statement form, and ladder diagram programming, as well as offline programming.
PLC manufacturer is currently developing a computeraided support software PLC programming, when the PC after you install the PLC programming software, can be used as a graphics programmer, user program editing, modifying, and through implementation of the communication between PC and PLC interface the user program bi-directional transmission, monitoring PLC operation status.
5. power supply

PLC power supply to convert external AC supply for CPU, memory and other required direct current, is the PLC power supply center. PLC with high quality stability, strong anti-jamming ability of a switching power supply, many PLC power supply can be provided to the external DC 24V power supply, used to access electrical components to the input connector on the power supply, so as to simplify the peripheral configuration.
Second, the PLC working principle 1. PLC internal and external circuit

1) external circuit wiring

Figure 3 is a fullvoltage starting control of the motor contactor electrical control circuits, control logic from AC contactor coil KM, led HL1, HL2, thermal relay normally closed contact FR SB2, start button, stop button SB1 and normally open auxiliary contact of contactor KM through the wire connections.
QS and press the Start button on SB1, coil KM power and lock, switch on led HL1 branch of the auxiliary contact KM and the main contact in the primary circuit, HL1, motor m starting; press the stop button the SB2, coil KM power LEDs HL1 off, m stalled.
Figure 4 using a SIEMENS S7 PLC to realize fullvoltage starting control of the motor wiring diagram. Main circuit remains the same, the thermal relay normally closed contact FR, the stop button the SB2, start buttons SB1, as input to the PLC on the devices connected to the inputs of the PLC and AC contactor coil KM, led HL1, HL2, etc as the output of the PLC output interface on the device connected to the PLC. Business logic through the implementation according to the full voltage of the motor control requested and stored in the program memory in the user program.
2) internal I/O image area
I/O image store was opened in the PLC memory for storage I/O signal States, registers are called the input images and output image register, in addition to PLC programming elements also have corresponding image memory, called element image register.
I/O image district of size by PLC of system program determine, for system of each a entered points total has a entered image district of a one and of phase corresponds to, for system of each a output points also are has output image district of a one and of phase corresponds to, and system of entered output points of series site, and I/O image district of image registers address, also corresponds to.
PLC work Shi, will collection to of entered signal state store in entered image district corresponds to of bit Shang, operation results store to output image district corresponds to of bit Shang, PLC in implementation user program Shi by needed description entered following electrical of equivalent touch head or output following electrical of equivalent touch head, and equivalent coil State of data take for I/O image district, and not directly and external equipment sex.
When the establishment of the PLC I/O image memory about the status of the stored address, location and relationship data, and output only to the memory of an address unit set a State data. This will not only accelerate the speed of program execution, and separated from the control system to the outside world, improve the system anti-interference ability.
3) internal equivalent circuit
Figure 5 is PLC of internal equivalent circuit, to which of up moving button SB1 for cases, its access interface I0.0 and entered image district of a triggers I0.0 connected received, dang SB1 connected Shi, triggers I0.0 on was triggered for “1” State, and this “1” State can was user program directly reference for I0.0 touch head of State, at I0.0 touch head and SB1 of pass broken state same, is SB1 connected, I0.0 touch head State for “1”, instead SB1 disconnect, I0.0 contact status to 0, I0.0 trigger functionality identical to the relay coil and no hard connection line I0.0 trigger equivalent to a I0.0 soft PLC internal relay coils directly I0.0 I0.0 coil State contact is equivalent to a normally open contact I0.0 coil control (or contacts).

Similarly, stop button SB2 and PLC internal of a soft following electrical coil I0.1 connected received, SB2 closed, I0.1 coil of State for “1”, instead for “0”, and following electrical coil I0.1 of State was user program take anti-Hou reference for I0.1 touch head of State, so I0.1 equivalent for a by I0.1 coil control of often closed touch head (or said moving broken touch head). Contact output Q0.0, Q0.1 is the PLC internal relay normally open contact of physics, once closed, KM of external coils, LEDs HL1 will be switched on. Public interfaces for PLC output power at the output port COM.
2. PLC control system

Using PLC to realize full voltage starting of the motor electrical control system, its main circuit remained unchanged, and replaced by a PLC electrical control circuits.
1) PLC control system
Input circuits are used to enter into the PLC control signal, input device buttons SB1, SB2, and FR normally closed contacts. External input to the PLC control signal input corresponds to a relay, enter any number of normally open relay offers head and normally closed contacts, programming for PLC control circuit use.
Output circuit
Output circuits are used to output of the PLC control signal converted to KM loop and HL1 led signal. Many of PLC control circuit output relays, each addition to providing programming within the PLC control circuit output relay normally open and normally closed contacts, but also provide output circuit with a normally open contact connected to the output port, the contact is called internal hard contacts, normally open contact is an internal physics. Through the contactdriven KM of external coils and HL1 led load, KM KM loop through the main circuit the main contacts to control the motor m starting and stopping. Drive load the power provided by the Ministry of electric power, PLC output port and output power COM public side.
The internal control circuit
Internal control circuits in accordance with controlled motor control request form by the user program, which is logical relationship in accordance with user program, perform calculations on input and output signals of the status, treatment and judgement, and then obtain the corresponding output control signals through the control signal output device: electric motor m, led the HL1.
User program through a personal computer or programming input or any other means of communication, all written to the PLC program statements in the user program memory. Modifications by the user program by simply programming devices such as changing some statements in memory will not change the internal wiring of the controller, for controlled flexibility.
2) ladder diagram of PLC control
Ladder diagram is a PLC internal equivalent to many within the relay coil, normally open contact, normally closed contact or equivalent circuit consisting of the function block. Figure 7 is the equivalent control unit of PLC ladder diagram symbols.
Ladder diagram of PLC control of the full voltage of the motor starting, by FR normally closed contact, SB2, close buttons, KM normally open auxiliary contact with SB1 normally open button in parallel unit, KM part corresponds to the equivalent control component symbols such as coil in series. Fullvoltage starting control of the motor trapezoidal in form similar to the contactor control circuit diagram, there are many differences but also with the electrical control circuit diagram.

Ladder diagram relay electric different components of the physical structure in electrical components
PLC ladder diagram of the coil, contact is only functional equivalent of coil and contact with the electrical components. Ladder diagram of the coil, contact only in a physical sense inputs, outputs, stored in memory, to control different components of the physical structure.
Ladder diagram switching status of the relay electrical components electrical components
Ladder diagram relay switching of the electrical components associated with the data saved on the appropriate storage, if the stored data to 1, then the component is in a pass status, if the data is 0, then in off State. Different from the actual switching State electrical components.
Ladder diagram relay switch electrical components process different from electrical components
Trapezoidal figure relay electrical components of State switch just PLC on storage bit of State data of operation, if PLC on often open touch head equivalent of storage bit data assigned value for “1”, on completed moving collection operation process, also as on often closed touch head equivalent of storage bit data assigned value for “0”, on can completed moving broken operation process, switch operation process no time delay. Electrical element coils, contact or move when you switch off, there must be time delayed and generally closed after a disconnect operation.
Ladder diagram relay electric owned contact number and electrical components
If PLC from entered following electrical I0.0 corresponding of storage bit in the out has bit data “0”, will of deposit another memory in the of a storage bit, was deposit of storage bit on into has by I0.0 following electrical control of a often open touch head, was deposit of data for “0”; as in out bit data “0” zhihou first for take anti-operation, again deposit a memory of a storage bit, is the bit deposit of data for “1”, the storage bit on into has by following electrical I0.0 control of a often closed touch head.
As long as the PLC internal memory enough, this unlimited data transfer operations, each operation, it can produce a ladder diagram of the relay contact, therefore, ladder diagram relay electric contactors can be infinitely repeated use in principle.
But the PLC internal coils usually can only be referenced once, if you need to reuse the same address number of the coil should be wary. Unlike PLC‘s contacts in the electrical components are limited in number.
Descriptive rules for ladder diagram each row starts from the bus left, through contacts and coils (or feature box), ending on the right bus. Parallel unit to draw each line on the left side, output coils the painting on the right, the remaining series element to draw in the middle.
3. PLC process

PLC after the electricity in the system under program control system periodically according to a certain order, judge, and execute a query a variety of tasks such as
1) initialization
PLC poweron, first to initialize the system, including hardware initialization, I/O module configuration checking, power outages remain range sets and clears the internal relay, reset timer.
2) CPU self diagnosis
During each scan cycle to go through self diagnosis, self diagnosis on power supply, PLC internal circuit, user program‘s grammar check, once found, CPU so that abnormal relay access, exceptions on the PLC panel LEDs LED on, internally deposited in special registers and gives the error code fault display signs. If not fatal error entering the PLC stop (STOP); if it is a fatal error, then the CPU is required to stop, wait until after the error excluded into the STOP State.
3) communicate with external devices
Stage of communication with external devices, PLC and other intelligent devices, programmer, terminal equipment, color graphic display, information exchange with other PLC and PLC working judge.
PLC STOP and RUN two operating States, if the PLC is in the STOP State, you do not execute user programs, by exchanging information with devices such as programmer, edit, modify and debug the completed user tasks if the PLC is RUN, you will enter the scanning process, implementation of the user program.
4) scan
To scan the deposit status of the external input signal input image, then execute the user program and output the results in the output image area until the transfer to an external device.
PLC poweron cycle to perform the process until power outage.
4. user program loop scans

PLC input to loop scans a user program is divided into three stages of sampling, program execution, and output to refresh
1) input sample stage
CPU for full field of the input signal, such as buttons, limit switches, speed of the switching status of the relay by the PLC inputs reading image register, this process is called the input sample. After entering the program implementation phase after the end of the input sampling, during which changes of the input signal, input image data within the register no longer change until a scanning cycle ends, the next update only when the input sample. This entry is called a set input method.
2) program implementation phase
PLC in program implementation stage, if not appeared interrupted or jump instruction, on according to trapezoidal figure program from first address began by bottom, and from left to right of order for article-by-article scan implementation, scan process in the respectively from entered image left-device, and output image left-device and auxiliary following electrical will be about programming components of State data “0” or “1” read out, and according to trapezoidal figure provides of logic relationship implementation corresponding of operation, operation results writes corresponds to of components image left-device in the Save. Need to signal in the output image of the output register, and save the output latch.
3) output stage
CPU registers of the output image with output latches and PLC output interface to the external drive contactors and indicator light load. Then save the output latch is content to wait for the next scan cycle of the output stage to be refreshed again. This method of output known as a concentrate output.
4) PLC scanning examples
Ladder diagram in the form of directive statements tables stored in the PLC in the user program memory. Table directive statements is a programming language of the PLC, described by a table consisting of a series of instructions of PLC control procedures, statement form different PLC instructions use mnemonics are not the same. SIEMENS S7-300 series PLC instruction statement table prepared by the motor fullvoltage starting function of ladder diagram programs are as follows:
O I0.0//I0.0 into operation stack;
O Q0.0//Q0.0 and stack data or operation, results in the stack;
After AN I0.1//I0.1 negated and stack data and calculation results into the stack;
AN I0.2//I0.2 taking a non-stack data after operation, results in the stack;
= Q0.0//to register an image stack data are sent to the output Q0.0;
Q0.0//Q0.0 data out into the stack;
= Q0.1//the data is sent to the output image in the stack register Q0.1;
MEND//end of the main program.
Directive statements are made up of a number of statements program statements is the smallest independent unit of your program. Each operation carried out by one or several statements. PLC statement by the opcode and operand consists of two parts. Opcode mnemonic representation (such as a take, o means or, and so on) that describes the functions to be performed, that is, tell the CPU what to do. Opcode logical operations are the main features of the and, or, not, the arithmetic operations of addition, subtraction, multiplication, and Division, time or timer and counter in the condition control, movement and other functions.
Operand identifiers and parameters. Represents the types of the operands, such as relays, the output relays, timers, counters, registers, data and parameter that represents the operand address or a predetermined value.
Motor fullvoltage starting PLC control system, for example, the input sample stage, CPU, SB1, SB2 and FR contact reading into the corresponding input images register, deposit register when an external contact closure is a binary number 1, whereas in 0. Enter sample end enter the program implementation phase, as shown in Figure 11.
When performing a 1th, 2 instructions, registers from the corresponding input I0.0 image information out of 1 or 0 and credited to stack in Operations Manager.
When the 3rd instruction is executed, remove the corresponding output Q0.0 image information in the register 1 or 0, and with the content of the stack or resulted in the stack (corresponding to the parallel circuit or operation).
At the 4th and 5th instruction is executed, first remove I0.1 non-operational state data, and the data on the stack and back into the stack, and then remove the I0.2 taking a non-operation status data, and data on the stack and back again into the stack (the circuit corresponds to a line in and operation).
When implementing article 6th, stack, binary data into the corresponding output Q0.0 image register.
When the implementation of the 7th directive, remove the output Q0.0 image binary data into a stack of registers.
When implementation of the 8th directive, remove the binary data into Q2.0 in the stack registers the corresponding image.
Implementation of the 9th directive, end user programs in a circular scanning process, beginning the next scanning process.
In the output stage of processing CPU will register each output image‘s binary data to the output latch. If Q0.0, Q0.1 corresponds to the output register contains the image of a binary number is 1, the KM of external coils, LEDs HL1 power, in turn, will power down.

5) differences between relay control and PLC control
The principle of PLC program can be summarized as from top to bottom, from left to right, cycle, sequential execution. Control mode in parallel with relay control circuit of difference, as shown in Figure 12.
Figure 12A) in control charts, if relay control circuit, due to the parallel control mode, Q0.0 first coil winding Q0.1 powered on, and then since Q0.1 normally closed contacts disconnect, resulting in winding Q0.0 power.
If a ladder diagram control circuits, I0.0 once connected, winding Q0.0 power, Q0.1 power, completion of the 1th scan; 2nd scan, winding Q0.0 Q0.1 normally closed contacts disconnect the power, and the Q0.1 power.
Figure 12b) control charts, if relay control circuit, Q0.0 coil and coil Q0.1 first powered on, and then Q0.1 off.
If a ladder diagram control circuits, contact I0.0 is connected, so winding Q0.1 powered on, then 2nd scan, results for Q0.1 normally closed contacts disconnect winding Q0.0 still will not power on.

Third, the task

PLC elements described; reading PLC external wiring diagram; master basic drawing of PLC ladder diagram rules.

Information: sorted lecture notes
Decision: determine the basic links of electric control line as changing PLC controlled external wiring of CAD
Plan: the full voltage of the motor starting, for example, develop peripheral connection, plans to draw the corresponding PLC ladder diagram
Implementation: after school to complete PLC PLC controlled external wiring diagrams and ladder diagram of
Check: Panel cross assessment panel assessment

How to improve the speed of PLC program running

1: according to actual needs, function block programming, writing subroutines
In the PLC, subroutines are relatively independent of a specific control objective to develop the program. CALL subroutine call instruction is executed, if the subroutine call if the conditions are not met, the program scans only in the main program, and not to scan the routine, this reduces unnecessary scan time.
2: use the word or double word data to DO a method to control the output
In PLC applications usually have a lot of control, Word or double word data to DO a method to control the output can increase speed, as long as according to the actual requirements, reasonable distribution of the output address, control output control can greatly reduce the number of steps as the PLC program, so as to accelerate the speed of PLC program running.
3: pulse trigger SET and RESET
PLC, use the SET command to perform only once, don’t always scan the implementation of this directive, it is suitable for pulse output (PLS/PLF) instructions used. Some engineers ignored the problem, using conventional methods to drive a SET of instructions, inadvertently adds a PLC program scan run time
4: avoids type conversion, as follows:
In S7-200, for example, its memory format commonly used PC machine with us on the contrary, it is high in the front, low in the back. So we can put the argument in two bytes at program initialization by the first two bytes to zero (other parts of the program may not use two bytes).
As we define symbols defined argument VW2, while maintaining a VW0 value of zero. VW2 font can be used to access the variables in your program, also VD0 dual font access, to avoid type conversions.
When used in order to avoid confusion, it is best to clear the symbol definition to distinguish between Word and double word types. This class is highly recommended Hungary nomenclature: prefix indicates the variable type, first letter of the meaning of the English word combinations as a variable name. I used the following:
B—-variables of type byte (byte)
W—-type variable (Word)
D—-double word variable (double)
R—-real variables (real)
F—-Variant (flag)
BTNsince the reset button input (button)
SW—-toggle switch or lock button input (switch)
SIGsensor, coding-level signal inputs (signal)
RLYoutput relay (relay)
Of course, this according to the personal habits, there is no rule, mainly against its own distinction.
If there is a character type variable named VarName, tips for using the previous conversion, we can define:
wVarName —- VW2
dVarName —- VD0
When the program Initializes VW0 to zero (if it is does not require memory variables, dVarName zero can also be directly) or at the block VW0 is set to zero. You need to type variables with the word wVarName, needs to double type variable with dVarName. Totally unnecessary type conversions.
This method can greatly reduce the number of program statements, make the program simpler and more readable, because you do not need to do a time-consuming type conversion program run efficiency has also been improved. Mathematical computation and greater efficiency was more obvious.

Disadvantage is that occupies two bytes of memory, later VW0 cannot be used in a program. S7-200 RAM space is very large, is generally unused, in 226, for example, as many as 10K RAM, I never exceed 1K. The RAM is bought, no white no without waste.
Similarly, if there is often need to Byte variables and are converted to character type variable, waste of Byte variables contained in one word memory width one byte to avoid type conversions.
3rd use the SET command to perform only once, don’t always scan the implementation of this directive, some engineers ignored the problem, using conventional methods to drive a SET of instructions, inadvertently adds a PLC program scan run time
Don’t really understand it, can you say fine,
1: If you write a subroutine in the OB, is to scan, but if you write for the FC called, then called FC conditions are not met, programs do not perform in the FC. This is also what I said meant to save time.
2:PLC length of implementation steps according to the procedures will be different, scanning time varies based on the implementation steps, if you are using a mov instruction to finish 8 digital output control, certainly better than using 8 mov instructions needed to complete 8 digital output control program step is less.
Add one:
4: avoids type conversion, as follows:
In S7-200, for example, its memory format commonly used PC machine with us on the contrary, it is high in the front, low in the back. So we can put the argument in two bytes at program initialization by the first two bytes to zero (other parts of the program may not use two bytes).
As we define symbols defined argument VW2, while maintaining a VW0 value of zero. VW2 font can be used to access the variables in your program, also VD0 dual font access, to avoid type conversions.
When used in order to avoid confusion, it is best to clear the symbol definition to distinguish between Word and double word types. This class is highly recommended Hungary nomenclature: prefix indicates the variable type, first letter of the meaning of the English word combinations as a variable name. I used the following:
B—-variables of type byte (byte)
W—-type variable (Word)
D—-double word variable (double)
R—-real variables (real)
F—-Variant (flag)
BTNsince the reset button input (button)
SW—-toggle switch or lock button input (switch)
SIGsensor, coding-level signal inputs (signal)
RLYoutput relay (relay)
Of course, this according to the personal habits, there is no rule, mainly against its own distinction.
If there is a character type variable named VarName, tips for using the previous conversion, we can define:
wVarName —- VW2
dVarName —- VD0
When the program Initializes VW0 to zero (if it is does not require memory variables, dVarName zero can also be directly) or at the block VW0 is set to zero. You need to type variables with the word wVarName, needs to double type variable with dVarName. Totally unnecessary type conversions.
This method can greatly reduce the number of program statements, make the program simpler and more readable, because you do not need to do a time-consuming type conversion program run efficiency has also been improved. Mathematical computation and greater efficiency was more obvious.

Disadvantage is that occupies two bytes of memory, later VW0 cannot be used in a program. S7-200 RAM space is very large, is generally unused, in 226, for example, as many as 10K RAM, I never exceed 1K. The RAM is bought, no white no without waste.
Similarly, if there is often need to Byte variables and are converted to character type variable, waste of Byte variables contained in one word memory width one byte to avoid type conversions.
Above is the increased operating speed of PLC programming method.

Five stage of the learn PLC

I personally think that the PLC will go through 5 stages. Read the content below, please ask yourself is which form!
I. logical phases
Called the logical phase is to implement the General logic of relay system design, since it is a relay system of electric drive knowledge is the basis for the stage. My personal summary learn relay system is the root of a word seize, the relay system is able to implement logical control in this word. Relay systems mainly have three things in a normally open b closed; c coil. This corresponds to the basic element in the PLC, but reading is not the same.
Then you can copy the original relay system? No way! Their mode of operation is not the same. Relay all hard elements start at the same tense competition in the system, and all the soft PLC elements through the PLC‘s CPU to scanning process and finally calculates the result of tense, this is the PLC scanning cycle works. (Grab a book PLC has introduced)
Focus: the stage is electric drive, correspond to the normally open PLC ladder diagram; close; the coils.
Allows for simple system
II. Phase sequence control
Sequence control is widely used in industry, such as General automatic machine it is a sequential process. PLC design can achieve sequential control there are two types of methods: a PLC sequential control instruction such as Mitsubishi in STL; two way stop control. No matter what kinds of control methods in the design of the start we want to complete the process, it is the thread of the system has three main aspects: one step b activities three conversions.
Focus: 1. system sequence design process
2. grasp the stop control mode, convert ladder diagram flow chart
Can complete the General system design
III. Assembly phase
This stage is essentially different from the relay control system, is a relay control system cannot be achieved, but also improve the PLC control system of roots! I called the compilation stage, because it is very similar to the singlechip assembly language programming, such as transfer of singlechip instruction MOV, advanced instruction in the PLC is the same function. This stage is more difficult than larger, first to learn basic computer second to fully understand the PLC‘s internal capabilities and resources; the third are familiar with all the features of advanced instruction (not rote memorization). If you do not understand the computer based learning advanced instruction and resources within the PLC can not understand, design very different from ideas and relay systems for example: I0.0 and IB0 first is position is the logical design of points, and the second is bytes not involved in the logic design.
Focus: 1. Computer basics
2. PLC resources
3. Instruction function
4. Adapted the design thinking
Can complete complex system designs
IV. Special stage
Special stage is a system of special functions, such as motion control, PID temperature control, Internet access and so on. Different functions of PLC can be different, some features are integrated within PLC and some external extensions, then depending on the object selected. Mastering this stage can greatly improve the PLC program, but also Automation other than the master PLC knowledge required, such as servo, inverter and so on.
Focus: 1. Understanding system needs
2. Reasonable selection of expansion units
3. Expansion unit using method
Can complete a special system design
That phase of the study completion date certain actual conditions
The five. Network stage
With the development of automation technology made slave PLC applications is also very common. The stage set is different to learn PLC communication protocols and communication instruction, such as PLC programming control inverter Siemens USS protocol exchanges information with the inverter. As well as industrial Ethernet and fieldbus PROFIBUS Xizi; AS-i; For a while.
MODBUS is more important in small networks, such as MODBUS protocol established through PLC and inverter to control the inverter.
Sometimes non-standard communication protocol in a network, which is used to free communication, quite flexible, but some computer network infrastructure.

Siemens programmed software and program structure

1. Programming software
Siemens SIMATIC PLC series offers a variety of programming software, mainly STEP MICRO/DOS and STEP MICRO/WIN;STEP mini 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. Annotation features
NPST-GR to I/O output relays and added comments, allow users to relay the corresponding device and relays use at a glance.
3. Program to check the
NPST-GR can find syntax errors in the program and program verification
4. Monitoring
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. 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.
6. Remote I/O and I/O address assignment
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
Their application programming as well as Siemens is a single bus, while Japan is Panasonic dual-bus;
There is the Siemens and Japan Panasonic of the input and output are also different, Japan Panasonic enter only x, output only y.
In fact, language is the same, that is different, both can be converted.

PLC program debugging

After the PLC program debugging through can only to users, or try to run. Field debugging to debug outline prepared in advance. According to the outline, step by step in an orderly manner.
When you start debugging, the device may not work, not even charged. Progress step by step power available with debug, boot, loading, running until the rated criteria. Specific process is:

First, check wiring, check the address. Point by point, to make sure that is correct. Not charged check is to check the line, more trouble. Can also be charged search, plus signal, depending on the electrical control system for conformance to design purposes.
Second, check the analog inputs and outputs. Input/output module is correct, is functioning properly. If necessary, check the precision of the input and output of standard instruments.
Third, check with a test light. If there is light on the control panel should check the corresponding led display. On one hand, see lamp is broken without, on the other hand checking logic is correct. Led is a mirror system, tuned it will further facilitate the debugging.
Four, check the manual and manual control logic. Complete the above debugging, then action can be performed manually, and manually control logic debugging. To view the manual control of output point, is there a output and the output corresponding to the action, then, every manual control can be realized. If you have any questions, to settle.
Five, semi-automatic. System can work automatically, the first semi-automatic adjustment can be achieved. Step by step while debugging. Until the completion of the whole cycle. Problems with steps or step, which steps or to address problems.

Six, work automatically. After the completion of semi-auto debug can further debug works automatically. To observe several cycles in order to ensure that the system can work continuously for a correct.
Seven, analog and debugging, parameters. Debugging logic controlled items mentioned above. This is a system test, going through in the first place. After debugging is complete, proceed to debug analog, pulse control. Most is selected an appropriate control parameters. Generally speaking, this is a long process. Be patient transfer, the parameter has to make choices, and then chose the best. PLC, which can be obtained through the self-tuning of PID parameters. But the tuning process, and take considerable time to complete.
Eight, completed all the above steps, whole debugging is complete. But it‘s nice to check for abnormal conditions. Abnormal situation hard to avoid illegal operation, alarm or shutdown protection. When checking an exception, must fully take into account the equipment and personal safety!

PLC Basic programming steps

To write a PLC program can be carried out according to the following steps:
1. Process analysis
PLC control object work and control requirements are analyzed, to clarify the following questions:
1) how to start the process? The goal is how to further implement?
2) correspond to how input and output? On the timing and what are the characteristics?
3) to record and store data? How much volume of data to be stored?
4) there is no analog, digital control? What control law and the output method to use?
5) what are the requirements for system monitoring? Measures to be taken?
Process analysis is to get a clear answer to the above question.
2. Channel allocation
PLC input numbers and control objects corresponding to the input signal, output control points and output circuits are also appropriate. If analog, analog style, also to the actual PLC, so that the actual channel allocation is assigned to PLC input points of the actual input circuit, certain points of PLC outputs number is assigned to the output circuit. Programming press the dot build logic or control relationship, connection point, condemnation wiring. In this way, PLC may be properly controlled.
Channel allocation in the hardware should be taken to prevent jamming of the output signal to the input signal, and to facilitate wiring. To this end, the input and output module should be focused arrangements as well.
In the software, I/O is assigned the best according to certain rules, easy to use Word command or subroutine programming and increase efficiency.
Particular case or an actual input numbers more than the PLC input, or action than the output of the PLC output control points. Then, on entered signal can in into PLC Qian, with wiring for some logic combination, put a points, to two or multiple by series or parallel Hou of entered signal, or with a points,, respectively to two a points, with output points in its intercropping switch; output points enough, also can for corresponding combination, just such by external wiring to combination cannot too more, too more has, on lost has PLC of flexibility. Point is not enough, the PLC is to use more points as well.
3. Draw a ladder diagram
Draw a ladder diagram, it is write a PLC program. Users can select their own programming (such as experience, analysis, diagrams) programming.
PLC program to organize, especially procedures more complex, we will strive to modular, divided into modules to prepare. OMRON PLC program block relies on programmers subroutines, step into its own organization.
4. Loading and debugging a program
Good programs to be loaded after the PLC in order to debug. Loading through the hand-held programmer, graphics programmer, or a personal computer to complete. In order to use the hand-held programmer, you also need to form a ladder diagram into a statement. If you use your computer or graphics programmer programming directly in ladder form.
Offline programs can not no problems, and these problems are only in the process of debugging, can be resolved.
To debug using a programmer or computer, or through a number of signals that control the State of an object for easy viewing, the PLC‘s work as transparent. Meanwhile, also forced some State of the PLC, makes a point to ON or OFF, so easy to identify problems, analyze and solve problems, and the program continues to improve, to achieve the desired objective.

The programming method of PLC

There are three commonly used programming methods: empirical method, the analytical method and the graphical method
1. Empirical method
The so-called experience programming is the use of one‘s own or others ‘ experience. This method requires the user to be familiar with basic circuit conditions, grasp the basic principles of design of ladder diagram and