Schneider Electric VW3 A3 303 user manual Diagnostics

Page 29

8. Modbus protocol

8. 6. Diagnostics (8)

Request and response:

Slave no.

 

08

 

Sub-code

 

 

 

 

Data

 

 

CRC16

 

 

 

 

 

 

 

 

 

 

Hi

 

 

 

Lo

 

Hi

 

 

Lo

 

Hi

 

 

 

Lo

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

1 byte

 

1 byte

 

2 bytes

 

 

 

 

2 bytes

 

 

2 bytes

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

Sub

Function

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

Request

 

 

Response

code

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

data

 

 

data

00

Echo

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

XX YY

 

 

XX YY

 

This function asks the slave to return the request sent by the master. The size

 

 

 

 

 

 

 

 

 

 

of the data is limited to 2 bytes.

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

01

Reinitialize channel

 

 

 

 

 

 

 

 

 

 

 

 

 

 

16#00 00

 

16#00 00

 

This function is used to reinitialize slave communication and, in particular, to

 

 

 

or

 

 

or

 

make it exit listen only mode (LOM).

 

 

 

 

 

 

 

 

 

 

 

 

 

16#FF 00

 

 

16#FF 00

03

Change ASCII delimiter

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

XX 00

 

 

XX 00

 

In ASCII mode, messages are delimited by the line feed character

 

 

 

 

 

XX = new delimiter

 

 

 

(LF = H'0A). This function is used to change this character.

 

 

 

 

 

 

 

 

 

 

 

04

Change to LOM mode

 

 

 

 

 

 

 

 

 

 

 

 

 

 

00 00

 

00 00

 

This function is used to force a slave to listen only mode (LOM). In this mode,

 

 

 

 

 

 

 

 

 

 

the slave does not handle messages which are addressed to it, nor does it send

 

 

 

 

 

 

 

 

 

 

any responses, except when the channel is reinitialized.

 

 

 

 

 

 

 

 

 

 

 

0A

Counter reset

 

 

 

 

 

 

 

 

 

 

 

 

 

 

00 00

 

00 00

 

This function resets all the counters responsible for monitoring slave

 

 

 

 

 

 

 

 

 

 

exchanges.

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

0B

Read the number of correct messages on the line without checksum error

00 00

 

 

Value of

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

counter

0C

Read the number of incorrect messages on the line with checksum error

00 00

 

 

Value of

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

counter

0D

Read the number of exception responses sent by the slave

 

 

00 00

 

 

Value of

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

counter

0E

Read the number of messages addressed to the slave excluding

 

 

00 00

 

 

Value of

 

broadcast messages regardless of type

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

counter

0F

Read the number of broadcast messages on the line regardless of type

00 00

 

 

Value of

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

counter

10

Read the number of NAK exception responses

 

 

 

 

 

 

00 00

 

00 00

 

The value read is always 0.

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

11

Read the number of slave not ready responses

 

 

 

 

 

 

00 00

 

00 00

 

The value read is always 0.

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

12

Read the number of messages received with character overrun

 

 

00 00

 

 

Value of

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

counter

The counters are unsigned words.

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

Example: Values 16#31 and 16#32 echoed by slave 4

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

Request and response:

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

Slave no.

 

Code

 

Subcode

 

 

 

Value of

 

Value of

 

 

 

CRC

 

CRC

 

 

 

 

 

 

Hi

 

 

Lo

 

1st byte

 

2nd byte

 

 

 

Lo

 

Hi

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

04

 

 

08

 

00

 

 

 

 

00

 

 

31

 

32

 

74

 

 

1B

 

29

Image 29
Contents Altivar Contents Electric shock will result in death or serious injury Before you beginDocumentation structure Installation ManualProgramming Manual Communication Parameters ManualNotation IntroductionPresentation Installing the card in the drive Hardware setupReceipt Hardware descriptionCoding the address Switch codingChoosing polarization 1234 AddressModbus RS485 standard Connecting to the busWiring recommendations Connection cables Connection via RJ45 wiring systemConnection accessories Type of master Master interface Description Catalog number Connection cables for the masterTWD XCA RJ030 TSX SCP CMDescription Catalog Number Subscriber socket Connection via junction boxesRS485 double shielded twisted pair CablesTSX P ACC TSX CSA500Communication parameters ConfigurationControl via Modbus in I/O profile Control CommandControl via Modbus or the terminals in I/O profile Parameter Value CommentControl via Modbus or the terminals in Drivecom profile Control via Modbus in Drivecom profileConfiguration Communication scanner Example of configuration via the graphic display terminalRDY NET COM. Scanner InputCOM. Fault Management Communication faultsMonitored parameters CONFIG. COMM. MAPFormat Format Range Terminal displayChecking the address DiagnosticsLEDs Green RUN Red ERR Meaning Corrective actionCommunication MAP RUN NETCOM. Scanner Input MAP COM Scan Output MAP CMD. Word ImageCOM Scan Output MAP Input variable Scanner parameterOutput variable Scanner parameter Card fault Communication faultSlave Slave j Slave k Modbus protocolPrinciple Ascii mode RTU modeModes Slave address Function code DataCode Modbus name Description Broadcast Size of data Modbus functions availableRead Holding/Input Registers 3/4 Write Single Register Diagnostics Write Multiple Registers 16 = 16#10 Get Comm Event Counter 11 = 16#0BRead/Write Multiple Registers 23 = 16#17 Machine Read Device Identification 43 = 16#2BMEI Example of positive responseCode Modbus name Description Size of data Output variables Logic address Default assignmentInput variables Logic address Default assignment Parameter Logic Input variable address Logic address Default valueParameter Logic Read Parameter assigned Output controlInput monitoring Value Parameter assignedResponse Code Error codeException responses Logic address Parameter Value Read non-existent or protected parametersRS485 standard AppendixMaster Modbus 2-wire standard schematicModbus 4-wire standard schematic Uni-Telway schematic Type of trunk cable Cable with 1 shielded twisted pair Wire Jbus schematicRecommendations Creating a Modbus bus using non-standard equipmentDifferent scenarios Example Calculating the polarizationCard connector pinout RS485 schematic for the cardContact no. Signal SUB-DAtv71ModbusJbusENV1 2005-05