Schneider Electric VW3 A3 303 Modes, RTU mode, Ascii mode, Slave address Function code Data, Lrc

Page 26

8. Modbus protocol

8. 2. Modes

bRTU mode

The Modbus RTU frame contains no message header byte, nor end of message bytes. It is defined as follows:

Slave address

Function code

Data

CRC16

The data is transmitted in binary code. CRC16: Cyclic redundancy check parameter.

The end of the frame is detected on a silence greater than or equal to 3.5 characters. The format used for the frames in the rest of this document is RTU mode.

bASCII mode

The structure of the Modbus ASCII frame is as follows:

Header

Slave

Function

 

Data

":"

address

code

 

 

 

 

 

 

 

LRC

HiLo

End

"CR" "LF"

Header: By default, ":" = 16#3A. Two other characters are possible: "CR" = 16#0D and "LF" = 16#0A.

LRC: The 2's-complement of the modulo 256 sum (in hexadecimal format) of the frame (excluding the header and end characters) before ASCII coding.

Example: Write a value of 10 to logic address word 9001 (16#2329) on slave 2

Identical request and response:

In hexadecimal format

3A

30 32

30 36

32 33 32 39

30 30 30 41

41 32

0D

0A

In ASCII format

:

0

2

0 6

2

3

2

9

0 0 0 A

A 2

CR

LF

26

Image 26
Contents Altivar Contents Before you begin Electric shock will result in death or serious injuryProgramming Manual Installation ManualDocumentation structure Communication Parameters ManualNotation IntroductionPresentation Receipt Hardware setupInstalling the card in the drive Hardware descriptionCoding the address Switch codingChoosing polarization Address 1234Modbus RS485 standard Connecting to the busWiring recommendations Connection cables Connection via RJ45 wiring systemConnection accessories TWD XCA RJ030 Connection cables for the masterType of master Master interface Description Catalog number TSX SCP CMRS485 double shielded twisted pair Connection via junction boxesDescription Catalog Number Subscriber socket CablesTSX CSA500 TSX P ACCConfiguration Communication parametersControl via Modbus or the terminals in I/O profile Control CommandControl via Modbus in I/O profile Parameter Value CommentControl via Modbus in Drivecom profile Control via Modbus or the terminals in Drivecom profileConfiguration RDY NET Example of configuration via the graphic display terminalCommunication scanner COM. Scanner InputCommunication faults COM. Fault ManagementFormat CONFIG. COMM. MAPMonitored parameters Format Range Terminal displayLEDs DiagnosticsChecking the address Green RUN Red ERR Meaning Corrective actionCOM. Scanner Input MAP RUN NETCommunication MAP COM Scan Output MAP CMD. Word ImageCOM Scan Output MAP Input variable Scanner parameterOutput variable Scanner parameter Communication fault Card faultSlave Slave j Slave k Modbus protocolPrinciple Modes RTU modeAscii mode Slave address Function code DataCode Modbus name Description Broadcast Size of data Modbus functions availableRead Holding/Input Registers 3/4 Write Single Register Diagnostics Get Comm Event Counter 11 = 16#0B Write Multiple Registers 16 = 16#10Read/Write Multiple Registers 23 = 16#17 Read Device Identification 43 = 16#2B MachineExample of positive response MEICode 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 Input monitoring Output controlParameter assigned Value Parameter assignedResponse Code Error codeException responses Read non-existent or protected parameters Logic address Parameter ValueAppendix RS485 standardModbus 2-wire standard schematic MasterModbus 4-wire standard schematic Uni-Telway schematic Wire Jbus schematic Type of trunk cable Cable with 1 shielded twisted pairRecommendations Creating a Modbus bus using non-standard equipmentDifferent scenarios Calculating the polarization ExampleContact no. Signal RS485 schematic for the cardCard connector pinout SUB-DAtv71ModbusJbusENV1 2005-05