beautypg.com

Modbus transmission mode, A.2.1. rtu transmission mode, A.2.2. ascii transmission mode – Beijer Electronics NA-9379 User Manual

Page 59: Supported modbus function codes, Fnio s-series, A.2 modbus transmission mode, A.3 supported modbus function codes

background image

59

MODBUS Programmable I/O NA-9379

FnIO S-Series



Copyright(C) CREVIS Co.,Ltd Support +82-31-899-4599 URL : www.crevis.co.kr

A.2 MODBUS Transmission Mode

Two different serial transmission modes are defined: The RTU mode and the ASCII mode. It defines the bit
contents of message fields transmitted serially on the line. It determines how information is packed into the
message fields and decoded.

A.2.1. RTU Transmission Mode
When devices communicate on a MODBUS serial line using the RTU (Remote Terminal Unit) mode, each 8–bit
byte in a message contains two 4–bit hexadecimal characters. The main advantage of this mode is that its greater
character density allows better data throughput than ASCII mode for the same baudrate. Each message must be
transmitted in a continuous stream of characters.

Start

Address

Function

Data

CRC Check

End

≥ 3.5 chars

1 char

1 char

Up to 252 chars

2 chars

≥ 3.5 chars

A.2.2. ASCII Transmission Mode
When devices are setup to communicate on a MODBUS serial line using ASCII (American Standard Code for
Information Interchange) mode, each 8–bit byte in a message is sent as two ASCII characters. This mode is used
when the physical communication link or the capabilities of the device does not allow the conformance with RTU
mode requirement regarding timers management.

Start

Address

Function

Data

CRC Check

End

1 char

2 chars

2 chars

Up to 252 chars

2 chars

2 chars CR,LF





A.3 Supported MODBUS Function Codes

Function Code

Function

Description

Unicast / Broadcast

1 (0x01)

Read Coils

Read output bit

Unicast

2 (0x02)

Read Discrete Inputs

Read input bit

Unicast

3 (0x03)

Read Holding Registers

Read output word

Unicast

4 (0x04)

Read Input Registers

Read input word

Unicast

5 (0x05)

Write Single Coil

Write one bit output

Unicast / Broadcast

6 (0x06)

Write Single Register

Write one word output

Unicast / Broadcast

8 (0x08)

Diagnostics (Serial Line only)

Read diagnostic register

Unicast

15 (0x0F)

Write Multiple Coils

Write a number of output bits

Unicast / Broadcast

16 (0x10)

Write Multiple registers

Write a number of output words

Unicast / Broadcast

23 (0x17)

Read / Write Multiple register

Read a number of input words /
Write a number of output words

Unicast

-

Refer to MODBUS APPLICATION PROTOCOL SPECIFICATION V1.1a