0% found this document useful (0 votes)
296 views6 pages

ATS 48 Modbus Protocol

1) The Modbus protocol document describes the configuration and operation of the Modbus RTU serial communication protocol. 2) It defines the basic frame structure used in Modbus RTU mode consisting of the slave address, function code, data, and CRC. 3) The protocol supports master-slave communication where the master initiates all communication and slaves can only respond when polled by the master. It allows the master to read or write registers in the slaves.

Uploaded by

Mohamed Elbanadi
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
296 views6 pages

ATS 48 Modbus Protocol

1) The Modbus protocol document describes the configuration and operation of the Modbus RTU serial communication protocol. 2) It defines the basic frame structure used in Modbus RTU mode consisting of the slave address, function code, data, and CRC. 3) The protocol supports master-slave communication where the master initiates all communication and slaves can only respond when polled by the master. It allows the master to read or write registers in the slaves.

Uploaded by

Mohamed Elbanadi
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 6

Modbus Protocol

Configuration of the serial link


Configuration of the serial link parameters can be accessed from the Communication menu COP

Parameters Possible values Terminal Default value


display
Protocol (COP) Modbus RTU RTU RTU
Address 0 to 31 000 to 031 0
Add
Speed 4800 48 19200 bps
tbr 9600 96
19200 192
Format 8 data bits, odd parity, 1 stop bit 8O1 8n1
FOr 8 data bits, even parity, 1 stop bit 8E1
8 data bits, no parity, 1 stop bit 8n1
8 data bits, no parity, 2 stop bits 8n2

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

Slave Request code Data CRC16


address

The data is transmitted in binary code.


CRC16: cyclical redundancy check parameter.
ENGLISH

The end of the frame is detected if silent for Š 3 characters.

69 1623736 10/2009
Modbus Protocol

Principle
Modbus protocol is a master-slave protocol.
Master Only one device can transmit on the line at any time.
The master manages the exchanges and only it can take the initiative.
It interrogates each of the slaves in succession.
No slave can send a message unless it is invited to do so.
The master repeats the question when there is an incorrect exchange, and
declares the interrogated slave missing if no response is received within a given
time period.
If a slave does not understand a message, it sends an exception response to
the master. The master may or may not repeat the request.

Slave j
Slave i Slave k

Direct slave-to-slave communications are not possible.

For slave-to-slave communication, the application software must have been purposely designed: to interrogate
one slave and send back data received to the other slave.

Two types of dialogue are possible between master and slaves:

• the master sends a request to a slave and waits for its response
• the master sends a request to all slaves without waiting for a response (broadcasting principle).

ENGLISH
Addresses
The slave address can have a value between 0 and 31.

Address 0:
• Address 0 coded in a request sent by the master is reserved for broadcast communication. All slaves,
including the ATS48, take account of the request, but do not respond to it.
• When the ATS48 has been configured with address 0 (default value), it takes account of requests addressed
between 1 and 31 and responds to the same address as each of these requests. As a result, the starter
behaves as if it were configured on all the possible addresses (1 to 31).
This default configuration should only be retained if point-to-point connection is being used, ie. mainly with
connection to a PC. An address other than 0 should be configured on a Modbus network which includes
other slaves.

Addresses 126 and 127:


Addresses 126 and 127 constitute privileged addresses. No Modbus master should therefore use either of
these addresses in requests generated on a Modbus network incorporating at least one Altistart 48.
Address 126 is reserved for communication with a terminal and address 127 is reserved for exchanges with
PowerSuite. Both of these should only be used on a point-to-point link.

1623736 10/2009 70
Modbus Protocol

Modbus functions
The following table indicates which Modbus functions are managed by the Altistart 48, and specifies their limits.
The "read" and "write" functions are defined from the point of view of the master.

Code Function name Broadcast Max. value of N Modbus standard name


(decimal) communication
3 Read N output words NO 30 words max. Read Holding Registers
4 Read N input words NO 30 words max. Read Input Registers
6 Write one output word YES – Preset Single Register
16 Write N output words YES 30 words max. Preset Multiple Regs
65 Identification NO – –

The Identification function is specific to ATV drives and ATS starters.


ENGLISH

71 1623736 10/2009
Modbus Protocol

Read N words: functions 3 and 4


Note: Hi = high order byte, Lo = low order byte.

Read N output words: function 3


Read N input words: function 4

Request
Slave No. of 1st word Number of words CRC16
03 or 04
no. Hi Lo Hi Lo Lo Hi
1 byte 1 byte 2 bytes 2 bytes 2 bytes
Response
Slave Number of Value of 1st word Last word value CRC16
03 or 04 -------
no. bytes read Hi Lo Hi Lo Lo Hi
1 byte 1 byte 1 byte 2 bytes 2 bytes 2 bytes

Example: read 4 words W4023 to W4026 (16#0FB7 to 16#0FBA) in slave 2, using function 4, with:
• LO1 = Motor thermal alarm tAI (W4023 = 16#0001)
• AO = Motor current OCr (W4024 = 16#0001)
• ASC = 200% (W4025 = 16#00C8)
• In = 1.0 x starter rating ICL (W4026 = 16#000A)

Request 02 04 0FB7 0004 42C8

Response 02 04 08 0001 0001 00C8 000A 07B0


Value of: W4023 W4024 W4025 W4026
Parameters: LO1 AO ASC In

ENGLISH
Write one output word: function 6
Request and response (the frame format is identical)
Slave Word number Value of word CRC16
06
no. Hi Lo Hi Lo Lo Hi
1 byte 1 byte 2 bytes 2 bytes 2 bytes

Example: write value 16#000D in word W4043 of slave 2 (ACC = 13 s).

Request and re-


02 06 0FCB 000D 3AD6
sponse

1623736 10/2009 72
Modbus Protocol

Write N output words: function 16 (16#10)


Request
Slave No. of 1st word Number Number Value of 1st word CRC16
10 -------
no. Hi Lo of words of bytes Hi Lo Lo Hi
1 byte 1 byte 2 bytes 2 bytes 1 byte 2 bytes 2 bytes
Response
Slave No. of 1st word Number of words CRC16
10
no. Hi Lo Hi Lo Lo Hi
1 byte 1 byte 2 bytes 2 bytes 2 bytes

Example : write values 20 and 30 in words W4043 and W4044 of slave 2


(ACC = 20 s and DES = 30 s)
Request 02 10 0FCB 0002 04 0014 001E 30F4

Response 02 10 0FCB 0002 3311

Identification: function 65 (16#41)


This function is used to obtain additional information to the parameters described in the “Product characteristic
parameters” section.

Request
Slave CRC16
41
no. Lo Hi
1 byte 1 byte 2 bytes
ENGLISH

Response
Slave Length of name Manufacturer name (in ASCII)
41 -------
no. of manufacturer (F) Byte 0 … Byte F–1
1 byte 1 byte 1 byte F bytes

Length of name Product name (in ASCII) Product reference name (ASCII)
------- -------
of product (P) Byte 0 … Byte M–1 Byte 0 … Byte 10
1 byte P bytes 11 bytes

Bits 4-7: Software version UI (upgrade index


-------
Bits 0-3: Version subdeterminant no. of the software)
1 byte 1 byte

Note: The response to function 6 is always positive, ie. the slave cannot send back an exception response.

Example: following the request from the Modbus master, slave 2 identifies itself as follows:
• Manufacturer name (F = 13 = 16#0D): “TELEMECANIQUE”
• Product name (P = 12 = 16#0C): “ALTISTART 48”
• Product reference name: “ATS48D17Q”
• Software version (version . subdeterminant number): 1.1
• Software upgrade index: 01

73 1623736 10/2009
Modbus Protocol

Request 02 41 C0E0

Response 02 41 0D 54 45 4C 45 4D 45 43 41 4E 49 51 55 45 -------

------- 0C 41 4C 54 49 53 54 41 52 54 20 34 38 41 54 53 2D 34 38 44 31 37 51 20 -------

------- 11 01 2C81

Exception responses
An exception response is returned by a slave when it is unable to perform the request which is addressed to it.

Format of an exception response:

Slave Response Error CRC16


no. code code Lo Hi
1 byte 1 byte 1 byte 2 bytes

Response code: request function code + H’80.

Error code:
1 = The function requested is not recognized by the slave.
2 = The bit or word addresses indicated in the request do not exist in the slave.
3 = The bit or word values indicated in the request are not permissible in the slave.
4 = The slave has started to execute the request but cannot continue to process it completely.

ENGLISH
CRC16 calculation
The CRC16 is calculated on all the message bytes by applying the following method:

Initialize the CRC (16-bit register) to 16#FFFF.

Enter the first to the last byte of the message:

CRC XOR <byte> —> CRC


Enter 8 times
Move the CRC one bit to the right
If the output bit = 1, enter CRC XOR 16#A001—> CRC
End
enter
End
enter

The CRC obtained will be transmitted with the low bytes sent first, then the high bytes (unlike the other data
contained in Modbus frames).

XOR = exclusive OR.

1623736 10/2009 74

You might also like