Emerson PLC Communication Program Design in Frequency Converter Network Control

    Introduction With the continuous development of PLC technology, more and more show its powerful core control functions, the connection between PLC and other devices has been more and more popular simple and advanced communication methods from the more cumbersome traditional I/O methods. The transition not only saves the designer a lot of hardware costs, but also provides the possibility of remote control and networking, making the control system more seamless.

    This article mainly uses Emerson PLC and several inverter network communication (using MODBUS protocol) as an example to illustrate the design method of network control communication program for PLC and multiple inverters.

    A brief introduction of MODBUS protocol

    The Modbus protocol is proposed by the famous MODICON company in the United States. Through this protocol, controllers can communicate with each other and between controllers via a network (such as Ethernet) and other devices. Control devices produced by different manufacturers can be connected into an industrial network. Centralized monitoring, it has become a common industry standard. Controller communication uses master-slave technology, ie only one device (master) can initiate transmission (query). Other devices (slave devices) respond accordingly to the data provided by the master device query. Typical master devices: IPC, HMI, PLC, etc.; typical slave devices: various instruments, PLCs, frequency converters, etc. The master device can communicate with the slave devices individually, and it can also communicate with all slave devices by broadcasting. If communicating alone, a message is returned from the device as a response, and if it is broadcasted, no response is made. The Modbus protocol establishes the format of the master device query and slave device response: device (or broadcast) address, function code, all data to be sent, and error detection domain. Modbus protocol supports both RTU mode and ASCII mode. The corresponding frame format of RTU mode is as follows: (The ASCII mode is omitted.)

    For a more detailed explanation, please refer to the relevant information of the MODBUS protocol (or visit the website).

    Second, Emerson PLC integrated MODBUS protocol function

    Emerson EC20 series PLC communication port COM 1 integrates the MODBUS master protocol. When programming, it is first set in the system block of the programming software as follows: System block -> "Communication port" menu -> "Communication port 1 parameter setting" Menu -> Select "MODBUS Protocol" -> "MODBUS Setup" -> to set the communication parameters and (main mode) station number.

    Then use the MODBUS instruction to program -----------MODBUS (S1) (S2) (S3) The meaning of each parameter is as follows:

    S1 designated communication channel;

    S2 send data start address;

    S3 receive data start address;

    During the sending of the MODBUS instruction, the required start character, the end character and the checksum are automatically added. The data to be sent does not need to set the length of the sent data. The system will automatically send the length set in the system according to the function code. .

    2 important communication flags: SM135-- MODBUS communication success flag, set upon successful communication, will not be automatically reset, so a reset is required when sending data; SM136-MODBUS communication error flag, communication error (Including no response from the device) is set, it will not be automatically reset, so a reset should be performed when receiving data;


    Third, Emerson inverter communication protocol


    Emerson's EV series inverters are integrated with the MODBUS protocol, and provide RS232C and RS485 communication ports for users to choose, so the PLC and inverter communication method is relatively simple and economical to complete the control, and it appears that the system is relatively high-grade, the following briefly describes its protocol:

    1. Support MODBUS RTU and ASCII format;

    2. Parameter MODBUS protocol address mapping rules: The function code parameters, control parameters and status parameters of the inverter are mapped to Modbus read and write registers. The group number of the inverter function code is mapped to the high byte of the register address, and the group index is mapped to the low byte of the register address. The inverter's control parameters and status parameters are virtual inverter function code groups. The corresponding relationship between the function code group number and its mapped register address high byte is as follows: F0 group: 0x00, F1 group: 0x01, F2 group: 0x02, F3 group: 0x03, F4 group: 0x04, F5 group: 0x05, F6 group: 0x06; F7 group: 0x07; F8 group: 0x08; F9 group: 0x09; FA group: 0x0A; Fb group: 0x0B; FC group: 0x0C; Fd group: 0x0D; FE group: 0x0E; FF group: 0x0F; FH group: 0x10; FL group: 0x11; Fn group: 0x12; FP group: 0x13; FU group: 0x14; inverter control parameter group: 0x32; inverter status parameter group: 0x33. For example, the register address of the inverter function code parameter F3.02 is 0x302, and the register address of the inverter function code parameter FF.01 is 0xF01.

    3. The supported function codes are as follows:

    function code

    Function code meaning

    0x03

    Read the function code parameter and running status parameter of the inverter

    0x06

    Rewrite single inverter function code or control parameter, do not save after power off

    0x08

    Line diagnosis

    0x10

    Rewrite multiple inverter function codes or control parameters, do not save after power off

    0x41

    Rewrite single inverter function codes or control parameters, save after power off

    0x42

    Functional code management

    4. Please refer to the Emerson inverter user manual for the specific protocol description.



    Fourth, program flow chart

    The message inquiry commands from the master device to the slave devices are mainly divided into two major categories, continuous command sequences and random command sequences.


    Continuous command sequence: The command sequence that the master device needs to send to the slave device regularly or continuously. It is characterized by periodicity and continuity. For example, the PLC reads the running frequency command and the running status command from the inverter.

    Random command sequence: The command sequence that the master device sends to the slave device from time to time or randomly. It is characterized by irregularity, randomness, such as PLC start-stop control of the inverter, rewriting of frequency or other parameters.


    <./p>

    V. List of procedures: (subroutines and main programs)

    This procedure mainly introduces a simple example of communication control of three sets of inverters (slave numbers 2, 3, and 4) by an EC20 PLC (as a master station) according to the MODBUS protocol network. In this example:

    The continuous command sequence includes the reading of the operating frequencies of frequency converters 2, 3, and 4;

    The random command sequence includes command operations for starting, stopping, and changing frequencies for frequency converters 2, 3, and 4;


    1) The list of “converter forward rotation” subroutines is as follows:

    / / Main program uses M1993 as each send auxiliary, mainly used for the rising edge of the MODBUS command to trigger no other use

    LD LM0 //Bit Input Parameter - Send Assist Enable

    RST SM135 // Reset Success Flag

    RST SM136 // Reset Failed Flag

    LD SM0 //Run flag

    MOV Z0 V9 //Save Z0 to V9

    LD SM0 //Run flag

    MOV V0 V10 //Slave address

    MOV 16#6 V11 //Function code

    MOV 16#32 V12 // Register address high byte

    MOV 16#0 V13 //Register Address Low Byte

    MOV 1 V14 //write data high byte

    MOV 16#C7 V15 //Write data low byte

    //The following transfers the send data to D7940-D7945

    LD SM0

    MOV 0 Z0

    LD SM0

    FOR 6

    LD SM0

    MOV V10Z0 D7940Z0

    LD SM0

    INC Z0

    NEXT

    //Send and receive data, data is placed in the D7970 start area

    LD LM0

    MODBUS 1 D7940 D7970

    RST LM0 //Reset Send Assist Enable Immediately

    //Restore the Z0 value regardless of success failure

    //Of course, the processing of the error report is omitted here

    LD SM135

    OR SM136

    EU // rising edge

    MOV V9 Z0

    2) "Shutdown" subroutine (omitted)

    3) "Set frequency" subroutine (omitted)

    4) "Read run frequency" subroutine (omitted)

    5) Main program list:

    //****** The following is the communication logic processing section ******

    LD SM1 //run first cycle pulse

    //*** This step omitted to check if the slave is ready ***

    / / *** program designed three consecutive command sequences ***

    RST M6 // Reset Continuous Command Sequence 1 Enable Flag

    RST M7 // reset continuous command sequence 2 enable flag

    RST M8 // Reset Continuous Command Sequence 3 Enable Flag

    ED // falling edge

    // Set continuous command sequence 1 enable flag to start the first consecutive command execution

    SET M6

    / / *** program designed a total of 9 random command sequence ***

    //As long as there is at least 1 random command, // M1000=ON, it means that there is a random command waiting, so that when the continuous command is switched, the random command series is executed first.

    LD M0 // random command sequence 1 enable flag

    OR M1 // random command sequence 2 enable flag

    OR M2 // random command sequence 3 enable flag

    OR M3 // random command sequence 4 enable flag

    OR M4 // random command sequence 5 enable flag

    OR M5 // random command sequence 6 enable flag

    OR M9 // random command sequence 7 enable flag

    OR M10 // random command sequence 8 enable flag

    OR M11 // random command sequence 9 enable flag

    SET M1000

    // After all random commands are processed, M1000=OFF, indicating that the random command is completed, then the continuous command can be switched normally.

    LDI M0

    ANI M1

    ANI M2

    ANI M3

    ANI M4

    ANI M5

    ANI M9

    ANI M10

    ANI M11

    RST M1000

    // When any one of the consecutive commands is not completed, M1001 = ON, which marks the continuous command being executed. If there is a random command, it must wait.

    LD M6

    OR M7

    OR M8

    SET M1001

    // When the continuous command is in the switching state, M1001 = OFF, indicating that the continuous command is completed, if there is a random command that can be performed.

    LDI M6

    ANI M7

    ANI M8

    RST M1001

    // When every 1 consecutive command is completed and no random command is waiting, start the delay T0 100MS to switch the next consecutive command execution

    LD M100 //Continuous command 1 completion flag

    OR M101 //Continuous command 2 completion flag

    OR M102 //Continuous command 3 finish flag

    ANI M1000

    TON T0 1 // start delay T0 100MS

    //******************************************

    //********** The following are three consecutive command sequences**********

    / / Call the "read run frequency" subroutine - 2 # station, the frequency exists in D1000;

    // Success or failure of communication resets the continuous command sequence 1 enable flag M6, and simultaneously sets the completion flag M100 for switching. Of course, the failed processing routines are omitted here;

    // After delaying T0 time, execute continuous command 2 sequence, set continuous command 2 sequence enable flag M7;

    LD M6 //Continuous command sequence 1 enable

    MPS

    EU

    SET M1993 //Send the pre-position sending auxiliary flag

    MRD

    CALL read operating frequency 2 M1993 D1000

    //Parameter comment: station address, send auxiliary bit, frequency storage address

    MPP

    LD SM135

    OR SM136

    ANB

    RST M6

    SET M100

    LD T0

    AND M100

    EU

    RST M100 //Reset Continuous Command 1 Complete Flag

    SET M7

    / / Call the "read run frequency" subroutine - 3 # station, the frequency exists D1001;

    // Success or failure of communication resets the continuous command sequence 2 enable flag M7, and sets the completion flag M101 at the same time for switching. Of course, the failed processing routines are omitted here;

    // After delaying T0 time, execute continuous command 3 sequence, set continuous command 3 sequence enable flag M8;

    LD M7 // serial command 2 sequence enable

    MPS

    EU

    SET M1993 //Send the pre-position sending auxiliary flag

    MRD

    CALL read operating frequency 3 M1993 D1001

    //Parameter comment: station address, send auxiliary bit, frequency storage address

    MPP

    LD SM135

    OR SM136

    ANB

    RST M7 // reset enable flag

    SET M101 // Set completion flag

    LD T0

    AND M101

    EU

    RST M101 // Reset Continuous Command 2 Finish Flag

    SET M8 // Set Continuous Command 3 Enable Flag

    / / Call "read run frequency" subroutine -4 # station, the frequency exists in D1002

    // The success or failure of the communication resets the continuous command sequence 3 enable flag M8 and simultaneously sets the completion flag M102 for switching. Of course, the failed processing routines are omitted here;

    // After delaying T0 time, re-execute the continuous command 1 sequence, set the continuous command 1 sequence enable flag M6;

    LD M8 //Continuous command 3 sequence enable

    MPS

    EU

    SET M1993

    MRD

    CALL read operating frequency 4 M1993 D1002

    //Parameter comment: station address, send auxiliary bit, frequency storage address

    MPP

    LD SM135

    OR SM136

    ANB

    RST M8

    SET M102

    LD T0

    AND M102

    EU

    RST M102

    SET M6

    //******************************************

    //********** Here are 9 random command sequences***********

    //9 random command ideas are the same;

    // After the random command enable flag is set, if the continuous command is in the switching state, it can enter the sending state; otherwise, it only waits;

    // Send first to send the auxiliary bit M1993, call the subroutine to send and receive;

    // Resets their random command enable flags regardless of communication success or failure. Of course, the communication error handler is still omitted here;

    //If all random commands are completed, the random command wait flag M1000=OFF;

    //Call "frequency setting" subroutine-2# station

    LD M9 // random command sequence 7 enable flag

    ANI M1001 //When judging that the continuous command is in the switching state

    MPS

    EU

    SET M1993 // Set Send Assist Bit

    MRD

    CALL traffic setting 2 D1100 M1993

    //Parameter comment: station address, set frequency, send auxiliary bits

    MPP

    LD SM135

    OR SM136

    ANB

    RST M9 // reset random command sequence 7 enable flag

    //Call "frequency setting" subroutine-3# station

    LD M10 // random command sequence 8 enable flag

    ANI M1001 //When judging that the continuous command is in the switching state;

    MPS

    EU

    SET M1993 // Set Send Assist Bit

    MRD

    CALL traffic setting 3 D1101 M1993

    //Parameter comment: station address, set frequency, send auxiliary bits

    MPP

    LD SM135

    OR SM136

    ANB

    RST M10

    // Call "frequency setting" subroutine - 4# station

    LD M11 / Random Command Sequence 9 Enable Flag

    ANI M1001

    MPS

    EU

    SET M1993

    MRD

    CALL traffic setting 4 D1102 M1993

    //Parameter comment: station address, set frequency, send auxiliary bits

    MPP

    LD SM135

    OR SM136

    ANB

    RST M10

    / / Call "Forward turn" subroutine -2 # station

    LD X11 //Boot button

    EU

    SET M0 // random command sequence 1 enable flag

    LD M0

    ANI M1001

    MPS

    EU

    SET M1993

    MRD

    CALL is turning on 2 M1993

    //Parameter comment: station address, send auxiliary bit

    MPP

    LD SM135

    OR SM136

    ANB

    RST M0

    //Call the "Positive boot" subroutine - 3# station

    LD X12 //Boot button

    EU

    SET M1 // random command sequence 2 enable flag

    LD M1

    ANI M1001

    MPS

    EU

    SET M1993

    MRD

    CALL is turning on 3 M1993

    //Parameter comment: station address, send auxiliary bit

    MPP

    LD SM135

    OR SM136

    ANB

    RST M1

    / / Call "Forward turn" subroutine -4 # station

    LD X13 //Boot button

    EU

    SET M2 // random command sequence 3 enable flag

    LD M2

    ANI M1001

    MPS

    EU

    SET M1993

    MRD

    CALL is turning on 4 M1993

    //Parameter comment: station address, send auxiliary bit

    MPP

    LD SM135

    OR SM136

    ANB

    RST M2

    //Call the "downtime" subroutine - 2# station

    LD X14 //Off button

    EU

    SET M3 // random command sequence 4 enable flag

    LD M3

    ANI M1001

    MPS

    EU

    SET M1993

    MRD

    CALL shutdown 2 M1993

    //Parameter comment: station address, send auxiliary bit

    MPP

    LD SM135

    OR SM136

    ANB

    RST M3

    //Call the "downtime" subroutine - 3# station

    LD X15 // Shutdown button

    EU

    SET M4 // random command sequence 5 enable flag

    LD M4

    ANI M1001

    MPS

    EU

    SET M1993

    MRD

    CALL shutdown 3 M1993

    // Parameter comment: station address, send auxiliary bit

    MPP

    LD SM135

    OR SM136

    ANB

    RST M4

    //Call the "downtime" subroutine -4# station

    LD X16 // Shutdown button

    EU

    SET M5 // random command sequence 6 enable flag

    LD M5

    ANI M1001

    MPS

    EU

    SET M1993

    MRD

    CALL shutdown 4 M1993

    //Parameter comment: station address, send auxiliary bit

    MPP

    LD SM135

    OR SM136

    ANB

    RST M5

    Six, program description:

    When the routine is designed, it actually stays in the gap of continuous command sequence switching for 100 MS. This means that the continuous sequence in the program is intermittent; if you want to use a non-intermittent continuous sequence, remove the intermediate delay part. Now.

    VII. Conclusion

    The method of logical processing of the communication sequence described in this routine has been practically applied in some of the author's projects, and the results have also achieved the expected assumptions. The operation is relatively stable. This method of PLC communication through multiple inverters is used in practical applications. There is a great reference value, not only can make full use of the hardware resources of EMERSON PLC and inverter to achieve the purpose of cost savings, but also easier to integrate the entire system.

    Eight, reference bibliography:

    l Emerson EC20PLC Programming Reference Manual

    l Emerson EC20PLC Programming Software Tool Manual

    l Emerson EV1000 Inverter User Manual (MODBUS Protocol)

    Stainless Steel Casseroles

    Stainless steel Cassorole manufacturer in China

    Our Casserole is made of stainless steel with aluminum disc layered in the bottom.Stainless steel for durability,easy cleaning,and appearance.We have several shapes,apple shape,belly shape,straight shape and so on.Also there are many sizes for your choosing.The cassorer can be worked on gas,electric,glass,ceramic,etc.Dishwasher safe.

    Stainless Steel Casseroles,Stainless Steel Casserole Set,Stainless Steel Casserole Online,Stainless Steel Casserole Pan

    Jiangmen Yuesheng Metal Products Co., Ltd. , https://www.hkbestgain.com

    Previous Post: From January to October, Japan's machine tool orders exceeded trillion yen
    Next Post: Cross-strait commuter cruises
    Home
    Recent Posts
    • In 2017, the rural subsidies have been adjusted.…
    • What happened to these wonderful car accident sc…
    • PVC Coated and Galvanized Fully-Automatic Chain …
    • Shanhe Intelligent New Concept Loader SWEL won I…
    • Td05-12b Compressor Wheel Factory Supplier Thail…
    • From January to April, the three major economic …
    • Shanghai Putian Industrial Base Phase A1 Expansi…
    • 1200kg/Day Commercial Flake Ice Machine with Aut…