Implementation method of communication function be

  • Detail

Delta frequency converter and PLC communication function implementation method

1 introduction

plc and frequency converter are the most common components in automation equipment. Most of its initial control mode used the i/o point and analog module of PLC to directly control the start and stop of the frequency converter and realize speed regulation, but this control mode has two disadvantages. The biggest disadvantages are that it occupies the i/o point of PLC and needs to add expensive analog module, resulting in the increase of control cost. When the number of frequency converters controlled is large, this disadvantage is more obvious. The second drawback is that the analog control is easy to be disturbed, and the transmission distance is also easy to be limited

in recent years, automation products have been constantly upgraded, their performance has been continuously improved, and their functions have become increasingly powerful. In terms of Small PLC, this change is more obvious. Today's Small PLC not only greatly improves the execution speed, but also increasingly enriches the command functions. More importantly, most of them support a variety of communication protocols and provide more communication interfaces. At the same time, most frequency converters also have RS485 interface and can support a variety of communication protocols, the most common is Modbus protocol. The progress of this technology provides the protocol of software and physical interface of hardware for the realization of communication between PLC and frequency converter, which lays a good foundation for the realization of low-cost and high-performance communication control

2 basic knowledge related to communication

2.1 communication protocol

communication protocol refers to an agreement between the two sides of communication. This agreement includes unified provisions on data format, synchronization mode, transmission speed, transmission steps, inspection and error correction mode, control character definition and other issues, which must be observed by both sides of the communication. Therefore, it is also called communication control procedure, or transmission control procedure

modbus protocol is a common network protocol used in industrial controllers. Through this protocol, various control 588.4 devices (such as PLC, frequency converter, servo driver, various intelligent instruments), controllers can communicate and exchange information with other devices through other networks (such as Ethernet). The protocol defines an information architecture that can be recognized by the controller, so that various industrial control products produced by different manufacturers that support this protocol can be connected to a network for centralized control and information exchange

2.2 characteristics of RS485 interface

rs485 interface is a serial port with better performance based on the well-known RS232 interface. Because RS485 interface has the advantages of good anti-interference, long transmission distance and multi station function, it has become a more and more widely used serial interface. In addition, the half duplex network composed of RS485 interface generally only needs two shielded twisted pair wires, which saves a lot of wiring for long-distance communication lines and reduces the cost of the system

3 features of Delta PLC and frequency converter communication function

delta DVP series PLC has two communication ports, COM1 is RS232, com2 is RS485, supports Modbus ascii/rtu communication format, and the communication rate can reach 115200bps at the highest. The two communication ports can be used at the same time. Therefore, without any expansion module, it can not only connect the human-machine interface for parameter setting, but also control other equipment such as frequency converter by means of communication. And DVP series PLC provides special communication instructions for Modbus ascii/rtu mode, so that the writing of communication program can be greatly simplified, and there is no need to carry out complex check code calculation and follow complex instruction format like using serial data transmission instruction rs

delta VFD series inverter has a separate RS485 series communication interface, and also follows the Modbus ascii/rtu communication format (except vfd-a Series). Based on the above characteristics, there are three ways of communication control between Delta PLC and frequency converter. One is to use serial communication RS instruction, but this communication mode should comply with specific instruction format and carry out complex verification calculation, which is more complicated and will not be explained in this paper. The second is to use the Modbus special communication instructions provided by DVP series PLC. This function is applicable to the whole series of DVP series PLC. The third is to use the easy PLC link function of DVP series PLC, which is applicable to other series PLC except es/ex/ss. This paper describes the realization of the communication function of the next two ways

4 preparation for communication between PLC and frequency converter

4.1 setting method of communication format of relevant communication ports of PLC

each communication port of delta DVP series PLC corresponds to relevant special register D and special relay m to set parameters related to communication and transmit information. See Table 1 for the main features D and M corresponding to com2 to be used in this paper and their significance. Table 1 significance of special registers and special relays

d1120 in Table 1 is a 16 bit register. Set the value of this register through the program, so that the communication protocol of PLC is consistent with the slave protocol to be communicated. The meaning of each data bit in d1120 is shown in Table 2. When using the dedicated Modbus communication command of delta, the data of the upper 8 bits of d1120 can be regarded as all 0 without setting. For example, the communication format we want to use is: 7-bit data length, even number, 1-bit stop bit (that is, the commonly said protocol is: 7e1), and the communication rate is 9600. Through this chart, we can know that the data in d1120 is: 0000 0000 1000 0110, that is, d1120=h86. In this way, when programming the communication program, write H86 into d1120, and then set m1120 to set the communication protocol of PLC com2 port. Each data bit in Table 2 d1120 represents the relevant parameters that need to be set by the frequency converter and the communication address that needs to be used when communicating. See Figure 3 for the parameters and instructions that need to be set by the frequency converter for reasons such as the closed mouth of the sample is easy to wear. If these parameters must be set during the communication control of frequency converter, and the set value should be consistent with the d1120 value of PLC. Table 3 the frequency converter needs to set the parameter table

when PLC writes and reads the data of the frequency converter communication, it needs to know the address of the relevant functions defined by the frequency converter. Then write and read the data according to these addresses, so as to realize the control of the frequency converter and get the current information of the frequency converter. The word addresses and their meanings used in this communication example defined by VFD-M series frequency converters are shown in Table 4. According to this table, when the frequency converter needs to operate in the forward direction of 20Hz, it only needs to write in the parameter word address 2000h related to the frequency converter communication: 0000 0000 00010010, that is, hexadecimal H12 or decimal K18; Write k2000 in 2001h. Table 4 definition of communication parameter word address of frequency converter

4.3 connection of communication line between PLC and frequency converter

distribution and definition of each pin of frequency converter communication interface are shown in Figure 1. When communicating with PLC with RS485, only pins 3 and 4 need to be used. Among them, pin 3 is connected with - of PLC RS485 interface, and pin 4 is connected with + of RS485 interface. The inverter interface is RJ-11 interface, which is the same as the common machine interface, and the PLC end is an ordinary terminal port, so the production of communication line is very simple, and there is no need to weld the communication line with a special interface. The author has used a section of line removed from the machine to realize the communication between PLC and frequency converter

Figure 1 definition of each pin of RS-485 interface of frequency converter

5 realize the communication control of PLC to frequency converter with modrw instruction

modrw instruction is the Modbus data reading and writing instruction provided by DVP series PLC, which is suitable for DVP series PLC. Therefore, the low-end es host can be used to complete the communication control with the frequency converter, so as to achieve the best cost-effective cooperation of the control system. This communication example uses es series PLC to control VFD-M frequency converter to realize multi-stage speed regulation operation

The format of the

modrw instruction is: modrw S1 S2 S3 s n. S1 is the address of the online device, which is the set value of parameter p88 when communicating with the frequency converter. S2 is the communication function code. This instruction supports three function codes, namely H03 (read multiple commands), H06 (write single data command), and H10 (write multiple data command). S3 is the address of the communication slave to be read and written. S is the storage address of the data to be read and written. N is the length of data to be read and written. When the ES series PLC is in ASCII mode, the setting range of this value is k1-k8, and when it is in RTU mode, it is k1-k16

this communication example is to use PLC to control the multi-stage speed regulation of the frequency converter to realize a single axis positioning operation. The realization process is like this. At the beginning of the automatic action, PLC makes the frequency converter drive the motor to run at high speed by means of communication, and uses the high-speed counter of PLC to receive the position information of mechanical operation. Then, through the judgment of the position information, the frequency converter drives the motor to decelerate when it is close to the set position, and stops until the last position arrives, so as to realize the positioning function. The PLC program to realize this function is mainly divided into three parts, one is the high-speed counting program and comparison output, the other is to prepare the data to be communicated according to the comparison output of the high-speed counter, and the third is the communication program. The first part is not the scope of this article. The example procedures of the second and third parts are shown in Figure 2 and figure 3

Figure 2 data writing program to be communicated

Figure 3 communication program

6 use easy plclink function to realize the communication between PLC and frequency converter

the PLC link function of delta is to read and write data based on Modbus communication protocol, which is characterized by no special application instructions when reading and writing data, but only mov instructions for data exchange. When eh/eh2/sv PLC is the master station, it supports m1353=on, and can start 32 link functions and more than 16 pen reading and writing functions; The sa/sx/sc host only supports 16 link functions and 16 pen read/write functions. But the ability to control 16 hosts is enough to cope with most simple control systems. When using PLC to realize the link function, it is also necessary to make the communication format setting of the communication port of the master-slave device consistent, and the setting method is the same as that described above

when PLC link reads and writes slave station data, other items that need to be set for PLC as master station are shown in Table 5. Table 5 registers to be set for PLC link

knowing the above data to be set, you can write a program to realize the link function between PLC and slave. In this example, SA PLC is used as the host to control VFD-M frequency converter to realize the multi-stage speed control function described in the above example. The setting of frequency converter and the connection of communication line are the same as the above example

7 conclusion

from two communication examples, it can be seen that it is very simple and easy to realize high-performance communication control between Delta PLC and frequency converter, and it is highly cost-effective, which is worthy of promotion and application. However, it should be noted that since RS485 port is in half duplex working mode, when there are multiple communication program segments in the program, two or more communication programs must not be executed at the same time. (end)

Copyright © 2011 JIN SHI