Modbus TCP/IP display board

Modbus TCP Communication Sign LED Display Solutions

The MODBUS protocol allows simple communication within a variety of network architectures. Every device (PLC, HMI, control panel, driver, motion control, input/output device) can use the MODBUS protocol to initiate remote operations.

Modbus has the following three communication modes:

Ethernet: The corresponding communication mode is Modbus TCP/IP

Asynchronous serial transmission (various media such as wired RS-232-/422/485/; Fiber, wireless, etc.): The corresponding communication mode is Modbus RTU or Modbus ASCII

High-speed token passing network: The corresponding communication mode is Modbus PLUS. 

LED sign with Modbus Protocol

 

Modbus RTU Data frame structure
The instructions in the RTU protocol are composed of five parts: function code (one byte), starting address (two bytes), address code (one byte), data (N bytes), check code (two bytes), in which the data is composed of data length (two bytes, indicating the number of registers, assuming the content is M) and data body (M multiplied by two bytes).

Take 01 06 00 00 00 1F C8 02 for example

01  Address 01

06  Write Register

00 00  Register 0 corresponds to variable 0

00 1F  The value 31 is displayed

C8 02   Modbus CRC verification code

 

Modbus TCP data frame structure
Modbus TCP adds the MBAP packet header to Modbus RTU. Since TCP is a service based on a reliable connection, there is no CRC check in Modbus TCP. All Modbus TCPADU sends and receive TCP transmission control protocols. The Modbus TCP/IP server usually uses port 502 as the port for receiving packets.

Take 00 01 00 00 00 06 01 06 00 00 00 00 00 1F for example

01  Address 01

06  Write Register

00 00  Register 0 corresponds to variable 0

00 1F  The value 31 is displayed

Modbus TCP: The network protocol is not verified.

The modbus.ini file also supports text display by modifying the parameter configuration. The following is a description of the displayed text configuration parameters.

parameter name

Type

default

describe

MaxVarNo

int

1

The value ranges from 1 to 100

UnitType

int

1

Unit type: 0: Units are not displayed. 1: displays the original unit. 2: Display replacement units, currently only ug/m3 can be replaced, need to use the font file "symbol.lmf"

Timeout

int

200

The Modbus protocol read timeout is expressed in milliseconds. The stable running of the current test cannot be less than 200ms

Interval

int

5000

Total cycle interval, in milliseconds

DispTypeNum

int

1

A maximum of 16 types can be displayed

AreaNum

int

4

The value can be a maximum of 32

1

string

0,1, leisure,0,255,0

Separated by commas, the first two are range values (close the interval, can be decimal), the third is the text to be displayed (not more than 32 bytes), if it is @@, it means that the original value is displayed, the following three are color RGB values, the whole line does not exceed 128 bytes

[1]

int

 

Variable number

DeviceAddr

int

1

Modbus device address

DataAddr

int

0

Data register address

DataLen

int

2

The value can be 1 or 2. 2 indicates that two values and four bytes are read at a time

Signed

int

0

Unsigned, 0. Unsigned number, 1. Signed number, 2. The highest digit is the sign 1 minus 0 plus.

Offset

int

0

Record the deviation between the data stored at the address and the actual value. The default value is 0, which takes precedence over the operator calculation

Sobel

int

1

Operator, multiply the read data by this operator to obtain the data to be displayed. The default is 1

Unit

string

ug/m3

The unit to be displayed is valid when UnitType=1/2. The maximum length is 10

Format

string

%d

Standard format string in the C language. The default is %d, and the maximum length is 10

FillSpaceNum

int

0

The number of Spaces that need to be filled between data and units when displayed. The default value is 0

ExistDecimal

int

1

Whether there is a decimal, 1 exists, 0 does not exist. The default value is 0

DispTypeNo

int

1

The current value displays the display type number corresponding to "DispTypeNum". The value is "1" to "DISPtypenum"

Function

int

1

Variable function, 0. Display variable, 1. Select broadcast program, 2. Set brightness, default is 0

Download the Protocol

C-power asynchronous controller  Download Protocol

 

Contact us for customizing this Industrial LED sign with a Communication Protocol.

 

Back to blog

Leave a comment

Please note, comments need to be approved before they are published.