The perfect choice of one-stop service for diversification of architecture.

Configuration and Debugging Method of Modbus Communication Between Siemens S7-200 Smart and G120 Fre

1. System configuration

1.1 software

A PC with STEP7 micro / win smart software (including Modbus protocol library) installed. In this example, STEP7 micro win smart v2.0 is used.

1.2 hardware

G120 is equipped with one frequency converter of cu240e-2 control unit, one asynchronous motor, one S7-200 smartplc, one standard drive-cliq cable and one twisted pair shielded cable. In this example, the firmware version v4.6 of the control unit cu240e-2 of G120 is used.

Note: before using microwin software to create a project, confirm that the Modbus library file already exists.

Figure 1-1 S7-200 smart interface

2. Hardware wiring 2.1 cu240e-2 control unit interface

The terminal block of cu240e-2 control unit is shown in Figure 2-1. The RS485 interface is at the bottom of the control unit. There are five wiring terminals, from left to right. Terminal 2 is rs485p and terminal 3 is rs485n. These two terminals are used for transmitting and receiving communication data.

Figure 2-1 terminal diagram of control unit

2.2 G120 and S7-200 smart wiring

Figure 2-2 wiring diagram of PLC and controller

S7-200 smart serves as the Modbus communication master station, and the wiring of its communication port and frequency converter slave station is shown in Figure 2-2. Terminal resistors need to be used at the head and end of the communication network. For S7-200 smart, a resistance of 120 ohms needs to be connected between communication port terminals 3 and 8. For the frequency converter, turn the cu240e-2 terminal resistance dial switch at the end of the communication network to the on position (the position is in Figure 2-1, label ⑨); For cu240e-2 in the middle position, the terminal resistance dial switch must be turned to the off position. In this example, S7-200 smart uses the CPU's own communication port to communicate with the frequency converter.

3. Communication settings

3.1 setting communication interface

This routine uses PLC Ethernet interface and drive-cliq cable to set communication interface, as shown in Figure 3-1 below.

Step 1: double click communication to open the communication setting window;

Step 2: select the network interface card and set it to "ICP / IP. Auto. 1", and the system will automatically collect the CPU.

Figure 3-1 setting communication interface

3.2 establish the connection between PC and PLC

After selecting "network interface", the CPU is automatically searched, as shown in Figure 3-2.

Step 1: after searching the CPU, select the searched CPU and click "IP address" of the CPU.

Step 2: click "OK" to complete the network connection.

Figure 3-2 establishing S7-200 CPU and controller connection

4. Frequency converter parameter setting

4.1 frequency converter address setting

The Modbus communication address of the frequency converter can be set through the bus address dial switch on the control unit, as shown in Figure 4-1. When the positions of address dial switches are off, it can also be set with parameter p2021. (Note: after changing the address, it can take effect only after power on again)

Figure 4-1 address switch setting

4.2 frequency converter parameter setting

Modbus communication can only be carried out after setting some basic communication parameters of the frequency converter, as shown in Table 4-2:

Table 4-2 parameter setting of frequency converter

4.3 description of G120 common registers

The common registers of G120 frequency converter are also the registers used in this example, as shown in table 4-3. For more G120 register information, see the G120 operator's manual.

Table 4-3 description of common registers

5. PLC programming

5.1 initialization procedure

Initialization module MBus using Modbus Protocol_ CTRL, initialize the CPU port of S7-200 smart, which is dedicated to MODBUS master station communication, as shown in Figure 5-1.

Figure 5-1 initialization

Function block Description:

Note: the "function block description" here and below only introduces the main pin functions in the function block. For the pin functions not described, please refer to the help document of STEP7 micro win smart v2.0 software.

EN enable: it must be ensured that each scanning cycle is enabled (sm0.0 is used)

Mode mode: when it is 1, the Modbus protocol function is enabled; when it is 0, it is restored to the system PPI Protocol. Baud baud rate: the supported communication baud rate is 4800960019200, and 9600 is set here. Parity verification: verification mode selection (G120 adopts even verification)

0 = no verification

1 = odd comparison test

2 = even comparison

Port port: set the physical communication port (0 = RS-485 integrated in the CPU, 1 = RS-485 or RS-232 on the optional CM01 signal board).

Timeout: the time that the master station waits for the response from the slave station, in milliseconds. The typical setting value is 1000 milliseconds (1 second), and the allowable setting range is 1-32767. Note: this value must be set large enough to ensure that the slave station has time response.

Done bit: after initialization, this bit will be automatically set to 1.

Error: initialization error code.

5.2 master station read / write function block

5.2.1 write control word

Figure 5-2 write control word

Function block Description:

Note: the "function block description" here and below only introduces the main pin functions in the function block. For the pin functions not described, please refer to the help document of STEP7 micro win smart v2.0 software.

EN enable: only one read-write function (i.e. mbus_msg) can be enabled at the same time. Note: G120 only operates on one holding register for write instructions at the same time; 125 holding registers are allowed to be operated at the same time for read instructions.

First read / write request bit: each new read / write request must be triggered by a pulse.

Slave slave address: selectable range 1-247

RW request mode: 0 = read, 1 = write

Count data number: the number of data (bits or words) for communication. Note: the maximum amount of data read / written by MODBUS master station is 120 words (referring to each mbus_msg instruction).

Dataptr data pointer:

If it is a read instruction, the read back data is placed in this data area;

2. If it is a write instruction, the written data is placed in this data area.

Done completion bit: read / write function completion bit.

Error code: the error code is valid only when the done bit is 1.

Common control words:

047e: preparation for operation

047f: forward start

0c7f: reverse start

04fe: fault confirmation

5.2.2 write speed setting

Figure 5-3 write speed value

5.2.3 read status word and actual speed value

Figure 5-4 read status word 1 and actual speed value

5.2.4 read ramp time

Figure 5-5 reading parameters p1120 and p1121

5.2.5 write ramp down time

Figure 5-6 write parameter p1121

6. Allocate inventory storage

Before compiling the program, first assign the available global V memory address to the Modbus library, as shown in Figure 6-1.

Step 1: select "program block" - > "library", right-click and select "inventory storage area";

Step 2: click "suggested address" and select the address of V memory;

Step 3: click "OK" to exit.

Figure 6-1 allocation of inventory storage area

7. Debugging program

After editing the program, debug the program, as shown in Figure 7-1 below.

Step 1: click "save" to save the edited program;

Step 2: click "compile" to compile the program;

Step 3: click "download" to download the program to the CPU of PLC; step 4: click "run" to start the program.

Figure 7-1 commissioning procedure

8. Monitoring status table

Through the monitoring status table, you can modify the process data and the change status of monitoring process data, as shown in Figure 8-1.

Figure 8-1 status table

Control word: vw100 = 16#047f indicates that the start command has been given.

Status word: vw300 = 16#ef37 indicates the status of the frequency converter, see r0052.

Main setting value: vw200 = 16#1000 indicates that the speed setting value has been given, and 16#0-4000 corresponds to the value of speed 0-p2000.

Actual speed value: vw302 = 16#1000 indicates that the actual speed of the motor has run to 375 rpm. Ramp rise time: vw400 = 1000. From the register list, we can see that the calibration coefficient of the register of 40322 is 100, so parameter p1120 = 1000 / 100 = 10.

Ramp down time: vw402 = 2000, the read down time; vw500 = 2000, the set down time; vw402 = vw500, indicating that the write instruction has taken effect. From the register list, you can see that the calibration coefficient of the register of 40323 is 100, so the parameter p1121 = 2000 / 100 = 20.

9. Modbus error codes

Done completion bit: the completion bit of Modbus function block, which is used to determine whether the operation of the function block is completed;

Error code: the error code is valid only when the done bit is 1. The Modbus error code and its meaning are shown in table 9-1.

Table 9-1 MODBUS error codes

Configuration and Debugging Method of Modbus Communication Between Siemens S7-200 Smart and G120 Fre 1

get in touch with us
مقالات مقترحة
Problems of Phased Array Ground Penetrating Radar Detection System
Although GPR has been widely used in hydrology, engineering, environment and other fields, many basic theoretical and technical problems have not been fundamentally solved, so the real advantages of GPR have not been brought into full play.The main problems existing in GPR technology include:1) The detection depth is shallow, and the contradiction between detection depth and resolution cannot be overcome. Increasing detection depth means sacrificing detection resolution;2) Multiple spread and other clutter jamming are serious, and there has been no good elimination method, which exists in radars at home and abroad;3) The influence of medium unevenness is great and can not be eliminated, resulting in difficulty in obtaining necessary velocity data;4) The data collection method of single sending and single receiving can provide limited information for post-processing and interpretation.The above problems are fatal defects for GPR. Although many geophysicists, electromagnetic experts and geophysical workers have done a lot of research and improvement on radar antenna design, signal processing and underground target imaging, these works are only partial modifications to the existing GPR system. In order to develop GPR technology, we must update our ideas and solve the problems from the fundamental principle.In view of this situation, experts proposed to develop a new GPR system - phased array GPR detection system in 1999.The basic research idea is to replace the current monopole radar antenna with the phased array radar antenna by using the relatively mature military phased array radar technology. Its purpose is to gather the electromagnetic wave into a narrow beam to transmit underground (or detection object) through the phased array technology, and receive the radar echo signal reflected by the target by using the multi-channel acquisition technology, The advanced data processing is carried out, and finally the three-dimensional image of the internal structure of the detection object is given.Development prospect of ground penetrating radar technologyIt is worth noting that at present, similar products have appeared in the market, such as RIS antenna array series of a company, but these products simply combine multiple monopole antennas into array antennas, which is essentially different from the idea of phased array ground penetrating radar.Because the phased array radar converges the electromagnetic wave into a narrow beam by controlling the phase delay of each channel, the energy is concentrated and the wave front diffusion is small. Therefore, the detection depth of the phased array radar is much larger under the condition of the same frequency and transmission power; On the contrary, under the same detection depth, phased array radar can improve the transmission power, so its resolution is much higher than the existing radar. In addition, since the spherical wave transmission is changed to beam transmission, the influence of medium heterogeneity is much smaller.Secondly, the phased array radar works in a continuous scanning mode and can scan in multiple directions. Therefore, the amount of information is much larger than that of the existing ground penetrating radar. For some special detection work, such as the quality detection of embankment cut-off wall, its role is unmatched by the existing ground penetrating radar (monopole antenna radar can not detect the joints, forks and other defects of embankment cut-off wall at all).Because phased array radar is a multi-channel received signal, multi-channel superposition can be carried out, just like the multiple coverage technology of reflection seismic exploration. Therefore, multiple interference can be greatly eliminated, which is difficult for existing radars. The antenna of high frequency (600mhz-1ghz) phased array ground penetrating radar can be made smaller, and its advantages are unmatched by the existing ground penetrating radar in shallow detection.At present, the system prototype has been completed. The carrier free pulse working system with center frequency of 900MHz is adopted, and the transmitting and receiving antennas are separated. 16 (4 × 4) Transmit channel forming, beam aggregation and scanning 16 (4) × 4) The channel receives the echo, and the optional scanning angles are - 36 °, - 24 °, - 12 °, 0 °, 12 °, 24 ° and 36 °.The software part of the system has rich data processing functions. The main conventional processing includes filtering, gain adjustment, static and dynamic correction, deconvolution, complex signal analysis, time-frequency analysis, etc., and multi-channel data processing, such as velocity analysis, superposition technology, coherence analysis technology, array signal processing, etc. And weak signal extraction, target automatic recognition and inversion interpretation under various clutter interference. A large number of field experiments on concrete detection in Yichang Three Gorges dam are carried out. The experimental results show that the spotlight scanning function of phased array radar has been realized, the penetration depth is greater than 1.5m and the resolution is higher than that of ordinary radar.Editing: hfy
Suggestions for Journaling, Bullet Notes, Activity, Wiki Like Application
How Many NCAA Football Bowls Are There?
What Is the Name of a Horror Movie with an Eye Falling in a Cocktail Glass?
Automotive Backup Camera Systems, Backup Hub
Blockchain Technology Explained: Powering Bitcoin
PLEASE HELP ME CHOOSE a VIDEO CAMERA!?
The National Key R & D Plan Launched the Key Project of "key Technologies and Demonstration of Inter
Alibaba Goes to War! Smart Home Battlefield Adds Another Giant
Looking for Software to Monitor Installations
عمليات البحث ذات الصلة
Problems of Phased Array Ground Penetrating Radar Detection System
Suggestions for Journaling, Bullet Notes, Activity, Wiki Like Application
How Many NCAA Football Bowls Are There?
What Is the Name of a Horror Movie with an Eye Falling in a Cocktail Glass?
Automotive Backup Camera Systems, Backup Hub
Blockchain Technology Explained: Powering Bitcoin
PLEASE HELP ME CHOOSE a VIDEO CAMERA!?
The National Key R & D Plan Launched the Key Project of "key Technologies and Demonstration of Inter
Alibaba Goes to War! Smart Home Battlefield Adds Another Giant
Guangzhou
House Empire Construction&Furnishing Co.,Ltd
لايوجد بيانات
Sign Up For The Newsletterus
Copyright © 2018 Guangzhou House Empire Construction&Furnishing Co.,Ltd. | All Rights Reserved Design by www.digahousing.com |Sitemap