manualshive.com logo in svg
background image

7

6.4 RTU mode

8-bit binary data in command is transmitted as it is.
Data format

Start bit

: 1 bit

Data bit

: 8 bits

Parity

: No parity

Stop bit

: 1 bit

Error detection : CRC-16 (Cyclic Redundancy Check)
Data interval

: 3.5 characters transmission time or less

(1) Message configuration

RTU mode is configured to start after idle time is processed for more than 3.5 characters transmission

and end after idle time is processed for more than 3.5 characters transmission. (See Fig. 6.4-1)

(Fig. 6.4-1)

(2) Slave address

Slave address is an individual instrument number on the slave side and is set within the range
00H to 5FH (0 to 95).
The master identifies slaves by the slave address of the requested message.
The slave informs the master which slave is responding to the master by placing its own address
in the response message.
[Slave address 00H (broadcast address) can identify all the slaves. However slaves do not respond.]

(3) Function code

The function code is the command code that makes the slave undertake the following action types(Table 6.4-1).

(Table 6.4-1)

Function code

Contents

03 (03H)

Reading the set value and information from slaves

06 (06H)

Setting to slaves

A function code is used to discern whether the response is normal (acknowledgement) or if any error

(negative acknowledgement) has occurred when the slave returns the response message to the master.

When acknowledgement is returned, the slave simply returns the original function code.
When negative acknowledgement is returned, the MSB of the original function code is set as 1 for the
response.
(For example, when the master sends request message setting 10H to function code by mistake,
slave returns 90H by setting the MSB to 1, because the former is an illegal function.)
For negative acknowledgement, exception code (Table 6.4-2) below is set to the data of response
message and returned to the master in order to inform it that what kind of error has occurred.

(Table 6.4-2)

Exception code

Contents

1 (01H)

Illegal function (Non-existent function)

2 (02H)

Illegal data address (Non-existent data address)

3 (03H)

Illegal data value (Value out of the setting range)

17 (11H)

Illegal setting (Unsettable status)

18 (12H)

Illegal setting (During setting mode by keypad, etc)

(4) Data

Data differs depending on the function code.
A request message from the master side is composed of data item, number of data and setting data.
A response message from the slave side is composed of number of bytes, data and exception code
in negative acknowledgement.
Effective range of data is –32768 to 32767 (8000H to 7FFFH).

(5) RTU mode error check

After calculating CRC-16 (Cyclic Redundancy Check) from the slave address to the end of data, the
calculated 16-bit data is appended to the end of message in sequence from low order to high order.

How CRC is calculated

In the CRC system, the information is divided by a polynomial series. The remainder is added to the
end of the information and then transmitted. The generation of the polynomial series is as follows.
(Generation of the polynomial series: X

16

+ X

15

+ X

2

+ 1)

1

Initialize the CRC-16 data (assumed as X) (FFFFH).

2

Calculate exclusive OR (XOR) with the 1st data and X. This is assumed as X.

3

Shift X one bit to the right. This is assumed as X.

4

When a carry is generated as a result of the shift, XOR is calculated by X of

3

and the fixed

value (A001H). This is assumed as X. If a carry is not generated, go to step

5

.

5

Repeat steps

3

and

4

until shifting 8 times.

3.5 idle

characters

Slave

address

Function

code

Data

Error check

CRC

3.5 idle

characters

Содержание KT2

Страница 1: ...unication protocol selection Modbus ASCII mode Selects the communication protocol Unavailable Modbus ASCII mode Modbus RTU mode Instrument number setting 0 Sets the instrument number individually to e...

Страница 2: ...in Connection RS 232C RS 485 Communication speed 2400 4800 9600 19200bps Fig 4 1 RS 485 PLC KT2 No 0 KT2 No 1 KT2 No 2 KT2 No 30 RS 485 Host computer KT2 No 0 KT2 No 1 KT2 No 2 KT2 No 30 RS 485 RS 232...

Страница 3: ...speed of KT2 in accordance with that of the host computer For instrument number setting and communication speed selection refer to Chapter 1 Setup of the KT2 or the instruction manual for KT2 Memory c...

Страница 4: ...communication line within a 1 character transmission period after sending the response Master side Notice on programming Set the program so that the master can disconnect the transmitter from the com...

Страница 5: ...a value Value out of the setting range 17 11H Illegal setting Unsettable status 18 12H Illegal setting During setting mode by keypad etc 4 Data Data differs depending on the function code A request me...

Страница 6: ...range is set The function code MSB is set to 1 for the response message in exception error status 86H 38H 36H If an exception code 03H 30H 33H Value out of the setting range is returned the error can...

Страница 7: ...by setting the MSB to 1 because the former is an illegal function For negative acknowledgement exception code Table 6 4 2 below is set to the data of response message and returned to the master in or...

Страница 8: ...tatus 83H If an exception code 02H Non existent data address is returned the error can be determined by reading this code Fig 6 4 7 3 Setting Address 1 SV1 A request message from the master When setti...

Страница 9: ...1191H Step 9 time Set value Decimal point ignored 03H 06H 0001H SV1 Set value Decimal point ignored 0002H Not used 03H 06H 0003H AT 0000H Cancel 0001H Perform 03H 06H 0004H OUT1 Heating proportional...

Страница 10: ...ecimal point ignored 03H 06H 0026H A2 hysteresis Set value Decimal point ignored 0027H Not used 0028H Not used 03H 06H 0029H A1 action delayed timer Set value 03H 06H 002AH A2 action delayed timer Set...

Страница 11: ...g MV manipulated variable Decimal point ignored 03H 0082H OUT2 Cooling MV reading OUT2 Cooling MV Decimal point ignored 03H 0083H Current SV reading Current SV Decimal point ignored 03H 0084H Running...

Страница 12: ...failure Check the following The connection or wiring of the communication cable is not secure Burnout or imperfect contact on the communication cable and the connector Communication speed of the slav...

Отзывы: