Yaskawa G7 User Manual

4 (1)

Modbus Communication Manual

G7 Drive

Drive Model: CIMR-G7U*

Document Number: TM.G7.11

 

 

Page intentionally blank

2

Warnings and Cautions

This section provides Warnings and Cautions pertinent to this product that if not heeded, may result in personal injury, fatality, or equipment damage. Yaskawa is not responsible for consequences of ignoring these instructions.

WARNING

YASKAWA manufactures component parts that can be used in a wide variety of industrial applications. The selection and application of YASKAWA products remains the responsibility of the equipment designer or end user. YASKAWA accepts no responsibility for the way its products are incorporated into the final system design. Under no circumstances should any YASKAWA product be incorporated into any product or design as the exclusive or sole safety control. Without exception, all controls should be designed to detect faults dynamically and to fail safely under all circumstances. All products designed to incorporate a component part manufactured by YASKAWA must be supplied to the end user with appropriate warnings and instructions as to that part’s safe use and operation. Any warnings provided by YASKAWA must be promptly provided to the end user. YASKAWA offers an express warranty only as to the quality of its products in conforming to standards and specifications published in the YASKAWA manual. NO OTHER WARRANTY, EXPRESS OR IMPLIED, IS OFFERED. YASKAWA assumes no liability for any personal injury, property damage, losses, or claims arising from misapplication of its products.

WARNING

Read and understand this manual before installing, operating, or servicing this G7 drive. All warnings, cautions, and instructions must be followed. All activity must be performed by qualified personnel. The G7 drive must be installed according to this manual and local code.

Do not connect or disconnect wiring while the power is on. Do not remove covers or touch circuit boards while the power is on. Do not remove or insert the digital operator while power is on.

Before servicing, disconnect all power to the equipment. The internal capacitor remains charged even after the power supply is turned off. Status indicator LEDs and Digital Operator display will be extinguished when the DC bus voltage is below 50 VDC. To prevent electric shock, wait at least 5 minutes after all indicators are OFF and measure DC bus voltage and verify that it is at a safe level.

Do not perform a withstand voltage test on any part of the unit. This equipment uses sensitive devices and may be damaged by high voltage.

The G7 drive is not suitable for circuits capable of delivering more than the specified RMS symmetrical amperes. Install adequate branch short circuit protection per applicable codes. Refer to the specification. Failure to do so may result in equipment damage and/or personal injury.

Do not connect unapproved LC or RC interference suppression filters, capacitors, or over voltage protection devices to the output of the G7 drive. Capacitors may generate peak currents that exceed G7 drive specifications.

To avoid unnecessary fault displays, caused by contactors or output switches placed between G7 drive and motor, auxiliary contacts must be properly integrated into the control logic circuit.

YASKAWA is not responsible for any modification of the product made by the user; doing so will void the warranty. This product must not be modified.

Verify that the rated voltage of the G7 drive matches the voltage of the incoming power supply before applying power.

To meet CE directives, proper line filters and proper installation are required.

Some drawings in this manual may be shown with protective covers or shields removed, to describe details. These must be replaced before operation.

Observe Electrostatic Discharge Procedures when handling the G7 drive and G7 drive components to prevent ESD damage.

The attached equipment may start unexpectedly upon application of power to the G7 drive. Clear all personnel from the G7 drive, motor, and machine area prior to applying power. Secure covers, couplings, shaft keys, machine beds and all safety equipment before energizing the G7 drive.

Do not attempt to disassemble this unit. There are no user serviceable parts. Disassembling this unit will void any and all warranties.

3

Introduction

This manual is intended as an overview of parameter access for the Yaskawa model G7 drive and describes how to connect the G7 drive to RS232, RS-422 or RS-485. Refer to the G7 Drive Technical Manual (TM.G7.01) for detailed parameter information.

This document pertains to the G7 drive. In this document, the word “inverter”, “ac drive” and “drive” may be used interchangeably.

For details on installation and operation of the G7 drive, refer to the G7 Drive Technical Manual (TM.G7.01). All manuals and support files are available on the CD that came with the G7 drive and are also available for download at www.yaskawa.com.

Modbusis a registered trademark of Schneider Automation, Inc.

All trademarks are the property of their respective owners.

4

Table of Contents

Chapter 1 - Connections....................................................................

7

Connection Check Sheet ................................................................................................

8

Verify Operation..............................................................................................................

9

G7 Drive Connections....................................................................................................

10

Network Connections.....................................................................................................

11

Communications Parameters.........................................................................................

13

Run/Stop and Frequency Reference Source..................................................................

15

Verify Communication....................................................................................................

16

Chapter 2 - Message Formats.........................................................

18

Protocol .........................................................................................................................

20

Read Multiple Registers – Function Code 03H ..............................................................

21

Write Single Register – Function Code 06H...................................................................

23

Loop-Back Test – Function Code 08H ...........................................................................

25

Write Multiple Registers – Function Code 10H...............................................................

27

No Response.................................................................................................................

29

Error Codes ...................................................................................................................

29

CRC-16 Calculations .....................................................................................................

30

Chapter 3 - Troubleshooting...........................................................

31

General Information .......................................................................................................

33

RS-232 Communication.................................................................................................

35

RS-422/RS-485 Communication....................................................................................

37

RS-422/RS-485 Self-Test ..............................................................................................

40

Chapter 4 - G7 Drive Parameters....................................................

41

Command Registers (Read/Write) for Modbus RTU ......................................................

42

Broadcast Registers (Write Only)...................................................................................

43

Monitor Registers (Read Only).......................................................................................

44

Parameter Registers (Read/Write).................................................................................

52

CM090 Modbus TCP/IP Option Kit Specific Registers ...................................................

75

ENTER/ACCEPT Command (Write Only) ......................................................................

78

Modbus Fault Decoding Table for Monitors....................................................................

79

Chapter 5 - User Notes ....................................................................

81

Notes .............................................................................................................................

82

User Parameter Settings................................................................................................

83

Hex/Dec Conversion Table ............................................................................................

91

5

Notes:

6

Chapter 1 - Connections

This chapter describes how to connect the G7 drive to a RS-232, RS-422 or RS-485 network.

Connection Check Sheet..............................................................

8

Verify Operation............................................................................

9

G7 Drive Connections .................................................................

10

Serial Network Connections ......................................................

11

Communications Parameters ....................................................

13

Run/Stop and Frequency Reference Source............................

15

Verify Communications..............................................................

16

7

Connection Check Sheet

The following is a quick reference guide to connect and configure the G7 drive for serial communications. Make a copy of this page and checkoff each item as it is completed. For detailed information please refer to the detailed sections that follow.

1: Unpack the G7 drive and verify that all components are present and undamaged.

2: Connect power to the G7 drive and verify that the G7 drive functions correctly. This includes running the G7 drive from the operator keypad. Refer to the G7 Technical Manual for information on connecting and operating the G7 drive.

3: Remove power from the G7 drive and wait for the charge lamp to be completely extinguished. Wait at least five additional minutes for the G7 drive to be completely discharged. Measure the DC bus voltage and verify that it is at a safe level.

4: Connect the G7 drive to an RS-232 network. Note: It is not possible to use the drive’s keypad and an RS-232 connection at the same time.

4.1: Remove the G7 drive’s operator keypad.

4.2: Connect the RJ-45 port on the front of the G7 drive to the controller serial port. Refer to Figure 1.1 - G7 Diagram for the location of drive connectors. Use a DB9 to RJ-45 adapter with a standard Ethernet CAT-5 patch cable or use Yaskawa cable UWR00468-2. Do NOT connect this cable to an Ethernet port on the controller, as damage to the controller and/or G7 drive may result. Refer to Figure 1.2 – RS-232 Connections for a description of the interface cable.

4.3: Verify that the controller communications parameters match the G7 drive’s communications parameters. Refer to Table 1.1

RS-232 (RJ-45 port) Communications Parameters for a list of default G7 drive communications parameters.

4.4: Reapply power to the G7 drive.

5: Connect the G7 drive to an RS-422/RS-485 network.

5.1: Remove the G7 drive’s terminal cover.

5.2: Connect the controller to the S+/S- and R+/R- terminals on the G7 drive’s terminal block as shown in Figure 1.3 – RS- 422/RS-485 Connections.

5.3: If this device is either the first or last device on the network, set the network termination, S1, to the ON position.

5.4: Reapply power to the G7 drive.

5.5: Set the G7 drive communication parameters to match those of the controller. Refer to Table 1.2 –Baud Rate, Table 1.3 – Parity and Table 1.4 - RTS.

5.6: Set the node address of the G7 drive.

6: Verify that the G7 drive and controller are communicating and that the exchanged data is valid.

8

Yaskawa G7 User Manual

Verify Operation

Connect power to the G7 drive and verify that the G7 drive functions properly. This includes running the G7 drive from the operator keypad. Refer to the G7 drive Technical Manual for information on connecting and operating the G7 drive.

Remove power from the G7 drive and wait for the charge lamp to be completely extinguished. Wait at least five additional minutes for the G7 drive to be completely discharged. Measure the DC bus voltage and verify that it is at a safe level.

Remove the operator keypad and terminal cover.

Figure 1.1 G7 Connection Diagram

9

G7 Drive Connections

Figure 1.2 G7 Drive Connections

10

Network Connections

The following describes how to connect the G7 drive to an RS-232, RS-422 or RS-485 network. For detailed information please refer to the appropriate sections of this manual or the G7 drive Technical Manual.

RS-232 Network

The RS-232 network is a single ended network with limited data transmission rates and cable lengths. The G7 drive RS-232 data transmission is fixed at 9600bps, no parity, 8 data bits and 1 stop bit. The maximum cable length is 50 ft (16 m). It is recommended that Yaskawa cable UWR00468-2 be used. Note: It is not possible to use the drive’s keypad and an RS-232 connection at the same time.

Figure 1.3 RS-232 Network Connection

RS-422/RS-485 4-Wire Network

RS-422/RS-485 4-wire networks allow for longer cable lengths, maximum 4000 ft (1200 m), and are more immune to noise than RS-232 networks because of their balanced line drivers. RS-422/RS-485 4-wire communication does not require RTS (request to send) control. See parameter H5-07. Set the Termination Resistor S1 switch to ON (slide the switch to the right) for each RS-422 device and the last RS-485 device on the network.

Figure 1.4 RS-422/RS-485 4-Wire Network Connection

11

RS-485 2-Wire Network

RS-485 2-wire networks can be either single or multi-drop networks, with each slave device on the network assigned a unique node address. A maximum of 31 devices may reside on any network segment before a repeater is required. The maximum segment length is 4000 ft (1200 m). Set the Termination Resistor S1 switch to ON (slide the switch to the right) on the last device on the network. RS-485 2-wire communication requires RTS (request to send) control. See parameter H5-07.

Figure 1.5 RS-485 2-Wire Network Connection

12

Communication Parameters

The following communications parameters affect communication over RS-232, RS-422 and RS-485 networks. The RS-232 communication parameters are fixed. In addition, the node address is ignored when communicating via RS-232.

H5 group communication parameters can only be changed via the drive keypad.

Note: Drive power must be cycled for changes to H5 Group parameters to be recognized.

RS-232 Communication

The RS-232 communications parameters are fixed at the values shown below. Although the node address is ignored, the master when communicating to the G7 drive in this method typically uses a node address of 1.

 

Table 1.1 RS-232 (RJ-45 port) Communication Parameters

Value

Description

Baud rate

9600

 

 

Parity

None

 

 

Stop Bits

1

 

 

Node Address

N/A

 

 

RS-422/RS-485 Communication

Node Address – H5-01. The node address is set through G7 drive parameter H5-01. When communicating via RS-422 or RS-485, a unique node address between 0 and 20h (32 decimal), inclusive, must be entered. The default G7 drive address is 1Fh (31 decimal). The address is always entered as a hexadecimal number (refer to the conversion chart in Chapter 4). Address 0 is typically reserved for global messages.

Baud Rate – H5-02. Select the baud rate that matches the controller’s communication configuration.

 

Table 1.2 Baud Rate – Parameter H5-02

Value

Description

0

1200bps

 

 

1

2400bps

 

 

2

4800bps

 

 

3

9600bps (Default Setting)

 

 

4

19,200bps

 

 

Parity – H5-03. Select the parity that matches the controller’s communication configuration.

 

Table 1.3 Parity – Parameter H5-03

Value

Description

0

None (Default Setting)

 

 

1

Even

 

 

2

Odd

 

 

13

Communication Fault (CE) Response Selection – H5-04. Select the drive operation method when a communication fault (CE) occurs. See parameter H5-05 also.

 

Table 1.4 Communication Fault Response Selection – Parameter H5-04

Value

Description

0

Ramp to Stop (Fault)

 

 

1

Coast to Stop (Fault)

 

 

2

Fast Stop (Fault)

 

 

3

Alarm Only (Alarm) (Default Setting)

 

 

4

Run at D1-04 frequency

 

 

Communication Fault (CE) Detection Selection – H5-05. Selects whether the communication fault (CE) is monitored. Please note that either B1-01 or B1-02 must also be set to a 2 (Serial Communication) for fault monitoring to occur. If the CE fault is enabled, the G7 will flash CALL on the keypad after power up until a message is received. The drive will trip and respond according to H5-04 if communication is lost (a message is not received) for more than 2 seconds after successful communication has been initiated.

 

Table 1.5 Communication Fault Detection Selection – Parameter H5-05

Value

Description

0

Disabled (Default Setting)

 

 

1

Enabled

 

 

Serial Communication Send Delay – H5-06. A delay can be inserted before the G7 drive responds to a command message. This allows for slower communication devices to switch their transceiver state in order to get ready to receive a message. A value of 5 ~ 65 ms can be inserted, with 5 ms being the default.

RTS Control – H5-07. This parameter determines whether RTS is continually asserted (disabled) or asserted only during send (enabled). RTS must be enabled for use with RS-485 2-wire communication.

 

Table 1.6 RTS Control – Parameter H5-07

Value

Description

0

Disable (always ON) (Default Setting)

 

 

1

Enable (ON only during send) (Use this setting for RS-485 2-wire systems)

 

 

14

Run/Stop and Frequency Reference

The Run/Stop and Frequency Reference commands can originate from:

Serial communication (Built-in Modbus: Keypad or R+/-, S+/- Terminals)

Keypad (Digital Operator)

Terminal Strip

Option Card

Parameter B1-01 (Run/Stop Method Selection) allows the selection of the origin of the Run/Stop command. Parameter B1-02 (Reference Selection) allows the selection of the origin of the Frequency Reference command. The Run/Stop and Frequency Reference commands may have different origins.

For example, the Run/Stop command may be set to Terminals (B1-01=1) while the Frequency Reference command may be set to Serial Communication (B1-02=2).

Run/Stop Source

 

Table 1.7 Run/Stop Method Selection

B1-01

Operation Method Selection (Run/Stop)

0

Keypad

 

 

1

Terminal Strip (Default Setting)

 

 

2

Serial Communication (Built-in Modbus: Keypad or R+/-, S+/- Terminals)

 

 

3

Option Card (EtherNet/IP, Modbus TCP/IP, DeviceNet, Profibus DP, LonWorks, etc.)

 

 

4

Pulse Input (RP Terminal)

 

 

Frequency Reference Source

 

Table 1.8 Frequency Reference Source Selection

B1-02

Frequency Reference Selection

0

Keypad

 

 

1

Terminal Strip (Default Setting)

 

 

2

Serial Communication (Built-in Modbus: Keypad or R+/-, S+/- Terminals)

 

 

3

Option Card (EtherNet/IP, Modbus TCP/IP, DeviceNet, Profibus DP, LonWorks, etc.)

 

 

15

Verify Communication

The following is a quick reference guide for serial communications to the G7 drive. Make a copy of this page and check-off each item as it is completed. For detailed information please refer to the detailed sections that follow.

1: RS-232 Communication.

1.1: Verify that the correct cable is used to connect the controller to the G7 drive.

1.2: Verify that the controller is set for RS-232 communication and that the communication cable is connected to the correct communication port.

1.3: Record the controller communication parameters.

Baud Rate

 

Parity

 

Data Bits

 

Stop Bits

1

1.4: Record the G7 drive communication parameters (H5-02, H5-03, H5-07).

Baud Rate

 

Parity

 

Data Bits

 

Stop Bits

1

1.5: Verify that the communication parameters match.

2: RS-422/RS-485 Communication.

2.1: Verify that the G7 drive is connected correctly.

2.2: Verify that the controller is set for RS-422/RS-485 communications and that the communications cable is connected to the correct communications port.

2.3: Record the controller communications parameters.

Baud Rate

 

Parity

 

Data Bits

 

Stop Bits

1

2.4: Record the G7 drive communication parameters (H5-01, H5-02, H5-03, H5-07).

 

 

Baud Rate

 

Parity

 

Data Bits

 

Stop Bits

1

2.5: Verify that the communication parameters match.

2.6: Verify that parameter H5-07 (RTS) is set to enable.

2.7: Verify that parameter H5-01 (Node Address) is set to the correct, unique, hexadecimal value and that it matches the node address required by the controller.

Controller Node Address

 

G7 Drive Node Address

16

] [ ] [ ] [ ] [
] [ ] [ ] [ ] [
] [ ] [ ] [ ] [
] [ ] [ ] [ ] [
] [ ] [ ] [ ] [

3:Send a command message to the G7 drive from the controller and verify the data of the command and response messages.

3.1:

Verify the contents of the command message.

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

[

 

 

] [

] [

] [

] [

] [

] [

] [

] [

] [

]

[

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

] [

] [

] [

] [

] [

] [

] [

] [

] [

]

[

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

]

[

]

[

]

[

]

[

]

[

]

[

]

[

]

[

]

[

]

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

[

 

 

]

[

]

[

]

[

]

[

]

[

]

[

]

[

]

[

]

[

]

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

3.2:

Verify the contents of the response message.

 

 

 

 

 

 

]

[

]

[

]

[

]

[

[

 

[

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

]

[

]

[

]

[

]

[

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

[

 

 

]

[

]

[

]

[

]

[

[

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

]

[

]

[

]

[

]

[

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

]

]

]

]

Notes:

17

Notes:

18

Chapter 2 - Message Formats

This chapter provides information on the message (telegram) contents and configuration.

Protocol .......................................................................................

20

Read Multiple Registers – Function Code 03H.........................

21

Write Single Register – Function Code 06H .............................

23

Loop-Back Test – Function Code 08H ......................................

25

Write Multiple Registers – Function Code 10H ........................

27

No Response...............................................................................

29

Error Codes.................................................................................

29

CRC-16 Calculation ....................................................................

30

19

Protocol

The parameter access method supported by the G7 drive is a subset of the Modbuscommunication protocol, which Yaskawa refers to as MEMOBUS. The G7 drive supports Modbus functions 3, 6, 8 and 10h. The message format varies depending upon the function code of the message. For each function code, there is a command message from the master and a response message from the slave. The following sections review the format of the command and response messages for each function.

Message Functions Supported

The following table lists the Modbus function codes available and their minimum and maximum byte lengths.

Table 2.1 Supported Function Codes

 

Function Code

 

Function

Command Message

Response Message (Normal)

 

 

 

 

 

Minimum (bytes)

Maximum (bytes)

Minimum (bytes)

Maximum (bytes)

 

 

3h (3 dec)

 

Read Multiple Registers

8

8

7

21

 

 

 

 

 

 

 

 

 

 

 

6h (6 dec)

 

Write Single Register

8

8

8

8

 

 

 

 

 

 

 

 

 

 

 

8h (8 dec)

 

Loop-Back Test

8

8

8

8

 

 

 

 

 

 

 

 

 

 

 

10h (16 dec)

 

Write Multiple Registers

11

25

8

8

 

 

 

 

 

 

 

 

 

 

20

Read Multiple Registers – Function Code 03H

The Read Multiple Register function is used to read the contents of from 1 to 8 consecutive registers. The formats of the read command and response messages are shown below.

Read Multiple Registers Command Message

Table 2.2 Read Command Message

 

Description

 

 

Data

 

 

Slave Address

 

 

02h

 

 

 

 

 

 

 

 

Function Code

 

 

03h

 

 

 

 

 

 

 

 

Starting Register

Upper

 

00h

 

 

 

 

 

 

 

Lower

 

20h

 

 

 

 

 

 

 

 

 

 

 

 

Quantity

Upper

 

00h

 

 

 

 

 

 

 

Lower

 

04h

 

 

 

 

 

 

 

 

 

 

 

 

CRC-16

Upper

 

45h

 

 

 

 

 

 

 

Lower

 

F0h

 

 

 

 

 

 

 

 

 

 

 

Each G7 drive slave address is set via parameter H5-01. Valid slave addresses must be in the range of 1 ~ 20 hex (1 ~ 32 dec) and entered as a hexadecimal number. No two slaves may have the same address. The master addresses the slave by placing the slave address in the Slave Address field of the message. In the command message above, the slave is addressed at 02h. Broadcast address 0 is not valid for register read commands.

The function code of this message is 03h (read multiple registers).

The starting register is the address of the first register to be read. In the command message above the starting register address is 20h (0020h).

The quantity indicates how many consecutive registers are to be read. The quantity may range from 1 to 8 registers. If an invalid quantity is entered, error code 03h is returned in a fault response message. In this example, four consecutive registers are to be read: 20h, 21h, 22h and 23h.

A CRC-16 value is generated from a calculation including the message slave address, function code, starting register and quantity. The procedure for calculating a CRC-16 is described at the end of this chapter. When the slave receives the command message it calculates a CRC16 value and compares it to the CRC-16 of the command message. If the two CRC-16 values are identical and the Slave Address is correct, the slave processes the command message. If the two CRC-16 values are not identical, the slave will discard the command message and not respond.

If the command message has a valid slave address, function code, starting register, and quantity, the slave will respond with a normal response message. If the command message has an invalid function code, starting register, and/or quantity, the slave will respond with a fault response message. If the command message has an invalid slave address or CRC-16, no response will be returned.

21

Read Multiple Registers Normal Response Message

Table 2.3 Read Normal Response Message

 

Description

 

 

Data

 

 

Slave Address

 

 

02h

 

 

 

 

 

 

 

 

 

Function Code

 

 

03h

 

 

 

 

 

 

 

 

 

Number of Data Bytes

 

 

08h

 

 

 

 

 

 

 

 

 

Starting Register

 

Upper

 

17h

 

 

 

 

 

 

 

 

 

Lower

 

70h

 

 

 

 

 

 

 

 

 

 

 

 

 

 

Next Register

 

Upper

 

17h

 

 

 

 

 

 

 

 

 

Lower

 

70h

 

 

 

 

 

 

 

 

 

 

 

 

 

 

Next Register

 

Upper

 

01h

 

 

 

 

 

 

 

 

 

Lower

 

09h

 

 

 

 

 

 

 

 

 

 

 

 

 

 

Last Register

 

Upper

 

00h

 

 

 

 

 

 

 

 

 

Lower

 

00h

 

 

 

 

 

 

 

 

 

 

 

 

 

 

CRC-16

 

Upper

 

38h

 

 

 

 

 

 

 

 

 

Lower

 

ACh

 

 

 

 

 

 

 

 

 

 

 

 

 

The normal response message contains the same slave address and function code as the command message, indicating to the master which specific slave is responding and to what type of function it is responding.

The number of data bytes is the number of data bytes returned in the response message. The number of data bytes is actually the number of registers read times 2, since there are two bytes of data in each register.

The starting register is the address of the first register read.

The data section of the response message contains the data for the registers' requested read, in this case registers 20h, 21h, 22h and 23h. Their data is 20h = 1770h, 21h = 1770h, 22h = 0109h and 23h = 0h.

Read Multiple Registers Fault Response Message

Table 2.4 Read Fault Response Message

 

Description

 

 

Data

 

 

Slave Address

 

 

02h

 

 

 

 

 

 

 

 

Function Code

 

 

83h

 

 

 

 

 

 

 

 

Error Code

 

 

02h

 

 

 

 

 

 

 

 

CRC-16

Upper

 

30h

 

 

 

 

 

 

 

Lower

 

F1h

 

 

 

 

 

 

 

 

 

 

 

The fault response message contains the same slave address as the command message, indicating to the master, which slave is responding.

The function code of a fault response message is the logical OR of 80h and the original function code of 03h. This indicates to the master that the message is a fault response message, instead of a normal response message.

The error code indicates where the error occurred in the command message. The value of 02h in the error code field of this fault response message indicates that the command message requested data be read from an invalid register. Refer to section Error Codes, Table 2-14, for more information on returned error codes.

22

Write Single Register – Function Code 06H

The Write Single Register function allows the writing of data to one register only.

Write Single Register Command Message

Table 2.5 Write Command Message

 

Description

 

 

Data

 

 

Slave Address

 

 

01h

 

 

 

 

 

 

 

 

Function Code

 

 

06h

 

 

 

 

 

 

 

 

Register Address

Upper

 

00h

 

 

 

 

 

 

 

Lower

 

01h

 

 

 

 

 

 

 

 

 

 

 

 

Data

Upper

 

00h

 

 

 

 

 

 

 

Lower

 

03h

 

 

 

 

 

 

 

 

 

 

 

 

CRC-16

Upper

 

98h

 

 

 

 

 

 

 

Lower

 

H0B

 

 

 

 

 

 

 

 

 

 

 

Each G7 drive slave address is set via parameter H5-01. Valid slave addresses must be in the range of 1 ~ 20 hex (1 ~ 32 dec) and entered as a hexadecimal number. No two slaves may have the same address. The master addresses the slave by placing the slave address in the Slave Address field of the message. In the command message above, the slave is addressed at 01h. Broadcast address 0 is valid for register write commands.

By setting the slave address to zero (0) in the command message, the master can send a message to all the slaves on the network simultaneously. This is called simultaneous broadcasting. In a simultaneous broadcast message there is no response message.

The function code of this message is 06h (write single register).

In the command message above the register address is 01h (0001h).

The data section contains the data to be written.

A CRC-16 value is generated from a calculation including the message slave address, function code, starting register, quantity, Number of Data Bytes, and all register data. The procedure for calculating a CRC-16 is described at the end of this chapter. When the slave receives the command message it calculates a CRC-16 value and compares it to the CRC-16 of the command message. If the two CRC-16 values are identical and the slave address is correct, the slave processes the command message. If the two CRC-16 values are not identical, the slave will discard the command message and not respond.

If the command message has a valid slave address, function code, register address and data, the slave will respond with a normal response message. If the command message has an invalid function code, register address and/or data, the slave will respond with a fault response message. If the command message has an invalid slave address or CRC-16, no response will be returned.

23

Write Single Register Normal Response Message

Table 2.6 Write Register Normal Response Message

Description

 

Data

Slave Address

 

01h

Function Code

 

06h

Register Address

Upper

00h

Lower

01h

 

Data

Upper

00h

Lower

03h

 

CRC-16

Upper

98h

Lower

0Bh

 

The normal response message contains the same slave address, function code, register address and data as the command message, indicating to the master which slave is responding and to what type of function it is responding.

In the response message above the register address is 01h (0001h).

Write Single Register Fault Response Message

Table 2.7 Write Register Fault Response Message

 

Description

 

 

Data

 

 

Slave Address

 

 

01h

 

 

 

 

 

 

 

 

Function Code

 

 

86h

 

 

 

 

 

 

 

 

Error Code

 

 

21h

 

 

 

 

 

 

 

 

CRC-16

Upper

 

82h

 

 

 

 

 

 

 

Lower

 

78h

 

 

 

 

 

 

 

 

 

 

 

The fault response message contains the same slave address as the command message, indicating to the master which slave is responding.

The function code of a fault response message is the logical OR of 80h and the original function code of 06h. This indicates to the master that the message is a fault response message, instead of a normal response message.

The error code indicates where the error occurred in the command message. The value of 21h in the error code field of this fault response message indicates that the command message data to be written was invalid for that register. Refer to the section Error Codes, Table 2-14, for more information on returned error codes.

24

Loop-Back Test – Function Code 08H

The Loop-Back Test is used to verify that the communications parameters for the G7 drive have been set correctly and that the connection is correct. The message should be constructed exactly as shown below. If everything is set and connected correctly, the received response will match the response shown below.

Loop-Back Test - 08h

The Loop-Back test function (08h) is used for checking signal transmission between master and slaves. The command message format is shown below.

Table 2.8 Loop-Back Command Message

 

Description

 

 

Data

 

 

Slave Address

 

 

01h

 

 

 

 

 

 

 

 

 

Function Code

 

 

08h

 

 

 

 

 

 

 

 

 

Test Code

 

Upper

 

00h

 

 

 

 

 

 

 

 

 

Lower

 

00h

 

 

 

 

 

 

 

 

 

 

 

 

 

 

Data

 

Upper

 

A5h

 

 

 

 

 

 

 

 

 

Lower

 

37h

 

 

 

 

 

 

 

 

 

 

 

 

 

 

CRC-16

 

Upper

 

DAh

 

 

 

 

 

 

 

 

 

Lower

 

8Dh

 

 

 

 

 

 

 

 

 

 

 

 

 

Each G7 drive slave address is set via parameter H5-01. Valid slave addresses must be in the range of 1 ~ 20 hex (1 ~ 32 dec) and entered as a hexadecimal number. No two slaves may have the same address. The master addresses the slave by placing the slave address in the slave address field of the message. In the command message above, the slave is addressed at 01h. Broadcast address 0 is not valid for Loop-Back test commands.

The function code of this message is 08h (Loop-Back test).

The test code must be set to 0000h. This function specifies that the data passed in the command message is to be returned (looped back) in the response message.

The Data section contains arbitrary values.

A CRC-16 value is generated from a calculation including the message slave address, function code, test code, and data. The procedure for calculating a CRC-16 is described at the end of this chapter. When the slave receives the command message it calculates a CRC-16 value and compares it to the CRC-16 of the command message. If the two CRC-16 values are identical and the Slave Address is correct, the slave processes the command message. If the two CRC-16 values are not identical, the slave will discard the command message and not respond.

If the command message has a valid slave address, function code, test code, data and CRC-16, the slave will respond with the normal response message. If the command message has an invalid function code, test code, and/or data, the slave will respond with a fault response message. If the command message has an invalid slave address or CRC-16, no response will be returned.

25

Loop-Back Normal Response

The normal Loop-Back Test response is identical to the command message.

Table 2.9 Loop-Back Normal Response Message

Description

 

Data

Slave Address

 

01h

Function Code

 

08h

Test Code

Upper

00h

Lower

00h

 

Data

Upper

A5h

Lower

37h

 

CRC-16

Upper

DAh

Lower

8Dh

 

Loop-Back Fault Response

Table 2.10 Loop-Back Fault Response Message

 

Description

 

 

Data

 

 

Slave Address

 

 

01h

 

 

 

 

 

 

 

 

Function Code

 

 

88h

 

 

 

 

 

 

 

 

Error Code

 

 

01h

 

 

 

 

 

 

 

 

CRC-16

Upper

 

87h

 

 

 

 

 

 

 

Lower

 

C0h

 

 

 

 

 

 

 

 

 

 

 

The fault response message contains the same slave address as the command message, indicating to the master which slave is responding. The function code of a fault response message is the logical OR of 80h and the original function code of 08h. This indicates to the master that the message is a fault response message, instead of a normal response message.

The error code indicates where the error occurred in the command message. Refer to the section Error Codes, Table 2-14, for more information on returned error codes.

26

Write Multiple Registers – Function Code 10H

The Write Multiple Register function allows the writing of data to from 1 to 16 consecutive registers.

Write Multiple Registers Command Message

Table 2.11 Write Command Message

 

Description

 

 

Data

 

 

Slave Address

 

 

01h

 

 

 

 

 

 

 

 

 

Function Code

 

 

10h

 

 

 

 

 

 

 

 

 

Starting Register

 

Upper

 

00h

 

 

 

 

 

 

 

 

 

Lower

 

01h

 

 

 

 

 

 

 

 

 

 

 

 

 

 

Quantity

 

Upper

 

00h

 

 

 

 

 

 

 

 

 

Lower

 

02h

 

 

 

 

 

 

 

 

 

 

 

 

 

 

Number of Data Bytes

 

 

04h

 

 

 

 

 

 

 

 

 

First Register Data

 

Upper

 

00h

 

 

 

 

 

 

 

 

 

Lower

 

01h

 

 

 

 

 

 

 

 

 

 

 

 

 

 

Next Register Data

 

Upper

 

02h

 

 

 

 

 

 

 

 

 

Lower

 

58h

 

 

 

 

 

 

 

 

 

 

 

 

 

 

CRC-16

 

Upper

 

63h

 

 

 

 

 

 

 

 

 

Lower

 

39h

 

 

 

 

 

 

 

 

 

 

 

 

 

Each G7 drive slave address is set via parameter H5-01. Valid slave addresses must be in the range of 1 ~ 20 hex (1 ~ 32 dec) and entered as a hexadecimal number. No two slaves may have the same address. The master addresses the slave by placing the slave address in the Slave Address field of the message. In the command message above, the slave is addressed at 01h. Broadcast address 0 is valid for register write commands.

By setting the slave address to zero (0) in the command message, the master can send a message to all the slaves on the network simultaneously. This is called simultaneous broadcasting. In a simultaneous broadcast message there is no response message.

The function code of this message is 10h (write multiple registers).

The starting register is the address of the first register to be written. In the command message above the starting register address is 01h (0001h).

The quantity indicates how many consecutive registers are to be written. The quantity may range from 1 to 16 registers. If an invalid quantity is entered, error code of 03h is returned in a fault response message. In this command message there are two consecutive registers to be written: 0001h (Operation Command) and 0002h (Frequency Reference).

The number of data bytes is the number of bytes of data to be written. The number of data bytes is actually the quantity multiplied by 2, since there are two bytes of data in each register.

The Data section contains the data for each register to be written in the order in which they are to be written.

A CRC-16 value is generated from a calculation including the message slave address, function code, starting register, quantity, Number of Data Bytes, and all register data. The procedure for calculating a CRC-16 is described at the end of this chapter. When the slave receives the command message it calculates a CRC-16 value and compares it to the CRC-16 of the command message. If the two CRC-16 values are identical and the slave address is correct, the slave processes the command message. If the two CRC-16 values are not identical, the slave will discard the command message and not respond.

If the command message has a valid slave address, function code, starting register, quantity, number of data bytes and data, and the slave will respond with a normal response message. If the command message has an invalid function code, starting register, quantity, Number of Data Bytes and/or data, the slave will respond with a fault response message. If the command message has an invalid slave address or CRC-16, no response will be returned.

27

Write Multiple Registers Normal Response Message

Table 2.12 Write Registers Normal Response Message

 

Description

 

 

Data

 

 

Slave Address

 

 

01h

 

 

 

 

 

 

 

 

Function Code

 

 

10h

 

 

 

 

 

 

 

 

Starting Register

Upper

 

00h

 

 

 

 

 

 

 

Lower

 

01h

 

 

 

 

 

 

 

 

 

 

 

 

Quantity

Upper

 

00h

 

 

 

 

 

 

 

Lower

 

02h

 

 

 

 

 

 

 

 

 

 

 

 

CRC-16

Upper

 

10h

 

 

 

 

 

 

 

Lower

 

08h

 

 

 

 

 

 

 

 

 

 

 

The normal response message contains the same slave address, function code, starting register and quantity as the command message, indicating to the master which slave is responding and to what type of function it is responding.

The starting register is the address of the first register written. In the response message above the starting register address is 01h (0001h).

The quantity indicates how many consecutive registers were written. In this case the quantity is 2.

Write Multiple Registers Fault Response Message

Table 2.13 Write Registers Fault Response Message

 

Description

 

 

Data

 

 

Slave Address

 

 

01h

 

 

 

 

 

 

 

 

Function Code

 

 

90h

 

 

 

 

 

 

 

 

Error Code

 

 

02h

 

 

 

 

 

 

 

 

CRC-16

Upper

 

CDh

 

 

 

 

 

 

 

Lower

 

C1h

 

 

 

 

 

 

 

 

 

 

 

The fault response message contains the same slave address as the command message, indicating to the master which slave is responding.

The function code of a fault response message is the logical OR of 80h and the original function code of 10h. This indicates to the master that the message is a fault response message, instead of a normal response message.

The error code indicates where the error occurred in the command message. The value of 02h in the error code field of this fault response message indicates that the command message requested data to be written to an invalid register. Refer to the section Error Codes, Table 2-14, for more information on returned error codes.

28

Loading...
+ 64 hidden pages