DWIN T5L ModBus
DWIN T5L ModBus
1:The ModBus protocol is executed on the serial port 4 of the T5L screen.
3:The protocol is compatible with Ascii and RTU formats (ascii is not supported yet).
4:The command format is divided into standard format and clock format.
5:When configured as a host, the command has the function of automatic reissue.
7:The maximum read and write data length is 64 words (128 bytes).
10: When the host is powered on, it will automatically send the data configured in the 0x10
command (initialize the slave).
11:The 70-word variable address starting from the last instruction of the configured file No.
22 is occupied.
12:Timer T1 is occupied.
0x0089: Edit the start (word) address of the instruction in file No. 22 (default 0xE000).
0x008AH: Edit the number of instructions in file No. 22, each with 8 characters (255 by
default).
0x02=Configure as a master (RTU), and the response data of the slave includes a
clock.
0x03=Configure as a master (ascii), and the response data of the slave includes a
clock.
0x008BH: When the slave does not respond or responds incorrectly, the number of
reissues of this command (default 5 times).
0x008BL: The delay time from the execution of this instruction to the sending of the
next instruction (default 100ms).
0x008EL: When configured as a host, the serial number of the currently executed
command in file No. 22
0x008F: spare
0x0089=0xE000: In file No. 22, the starting (word) address of the first instruction =
0xE000
0x008BH=0x05: If the slave does not respond or the response is received incorrectly,
the master reissues the current command, and the upper limit of
reissue is 5 times (0-255).
0x008F: spare .
Example: 5A 01 03 06 02 01 00 02 10 00 00 01
D0: 0x5A=execute this instruction, others=do not execute this instruction.
D2: Command (03H) (0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x10).
D3: The length of the operation data of this instruction (06H) (03H, 04H, 06H, 10H are
counted by word).
D5: The way to trigger the instruction to execute and send (0-4)
0x02= Execute when the key value specified by D6.D7 is not zero, and the key
value will be cleared after the command is executed.
0X03= In the 0x06 command, when the value of the variable pointed to by D8.D9
is non-zero, it is automatically sent.
D8.D9: This instruction operates on the source variable address or starting address
(1000H) allocated in the DGUS screen.
D10.D11: The slave address point table (0001H) operated by this instruction.
D12.D13.D14.D15: undefined.
This instruction is for the screen as the master to read the data of 6 consecutive words in
the point table starting from 0x0001 of the slave (id=0x01) to the address 0x1000_0x1005
of the screen for display.
0x0100
01 01 01 01 01 01 00 00 00 00 00 00 00 00 00 000
5 4 3 2 1 0 9 8 7 6 5 4 3 2 1
0x0101
03 03 02 02 02 02 02 02 02 02 02 02 01 01 01 016
1 0 9 8 7 6 5 4 3 2 1 0 9 8 7
0x0102
04 04 04 04 04 04 04 04 03 03 03 03 03 03 03 032
7 6 5 4 3 2 1 0 9 8 7 6 5 4 3
0x0103
06 06 06 06 05 05 05 05 05 05 05 05 05 05 04 048
3 2 1 0 9 8 7 6 5 4 3 2 1 0 9
0x0104
07 07 07 07 07 07 07 07 07 07 06 06 06 06 06 064
9 8 7 6 5 4 3 2 1 0 9 8 7 6 5
0x0105
09 09 09 09 09 09 08 08 08 08 08 08 08 08 08 080
5 4 3 2 1 0 9 8 7 6 5 4 3 2 1
0x0106
11 11 10 10 10 10 10 10 10 10 10 10 09 09 09 096
1 0 9 8 7 6 5 4 3 2 1 0 9 8 7
0x0107
12 12 12 12 12 12 12 12 11 11 11 11 11 11 11 11
7 6 5 4 3 2 1 0 9 8 7 6 5 4 3 2
0x0108
14 14 14 14 13 13 13 13 13 13 13 13 13 13 12 128
3 2 1 0 9 8 7 6 5 4 3 2 1 0 9
0x0109
15 15 15 15 15 15 15 15 15 15 14 14 14 14 14 144
9 8 7 6 5 4 3 2 1 0 9 8 7 6 5
0x010A
17 17 17 17 17 17 16 16 16 16 16 16 16 16 16 160
5 4 3 2 1 0 9 8 7 6 5 4 3 2 1
0x010B
19 19 18 18 18 18 18 18 18 18 18 18 17 17 17 176
1 0 9 8 7 6 5 4 3 2 1 0 9 8 7
0x010C
20 20 20 20 20 20 20 20 19 19 19 19 19 19 19 19
7 6 5 4 3 2 1 0 9 8 7 6 5 4 3 2
0x010D
22 22 22 22 21 21 21 21 21 21 21 21 21 21 20 208
3 2 1 0 9 8 7 6 5 4 3 2 1 0 9
0x010E
23 23 23 23 23 23 23 23 23 23 22 22 22 22 22 224
9 8 7 6 5 4 3 2 1 0 9 8 7 6 5
0x010F
25 25 25 25 25 25 24 24 24 24 24 24 24 24 24 240
5 4 3 2 1 0 9 8 7 6 5 4 3 2 1
Usually cooperate with DWIN screen display control and bit variable icon control.
0x0110
01 01 01 01 01 01 00 00 00 00 00 00 00 00 00 000
5 4 3 2 1 0 9 8 7 6 5 4 3 2 1
0x0111
03 03 02 02 02 02 02 02 02 02 02 02 01 01 01 016
1 0 9 8 7 6 5 4 3 2 1 0 9 8 7
0x0112
04 04 04 04 04 04 04 04 03 03 03 03 03 03 03 032
7 6 5 4 3 2 1 0 9 8 7 6 5 4 3
0x0113
06 06 06 06 05 05 05 05 05 05 05 05 05 05 04 048
3 2 1 0 9 8 7 6 5 4 3 2 1 0 9
0x0114
07 07 07 07 07 07 07 07 07 07 06 06 06 06 06 064
9 8 7 6 5 4 3 2 1 0 9 8 7 6 5
0x0115
09 09 09 09 09 09 08 08 08 08 08 08 08 08 08 080
5 4 3 2 1 0 9 8 7 6 5 4 3 2 1
0x0116
11 11 10 10 10 10 10 10 10 10 10 10 09 09 09 096
1 0 9 8 7 6 5 4 3 2 1 0 9 8 7
0x0117
12 12 12 12 12 12 12 12 11 11 11 11 11 11 11 11
7 6 5 4 3 2 1 0 9 8 7 6 5 4 3 2
0x0118
14 14 14 14 13 13 13 13 13 13 13 13 13 13 12 128
3 2 1 0 9 8 7 6 5 4 3 2 1 0 9
0x0119
15 15 15 15 15 15 15 15 15 15 14 14 14 14 14 144
9 8 7 6 5 4 3 2 1 0 9 8 7 6 5
0x011A
17 17 17 17 17 17 16 16 16 16 16 16 16 16 16 160
5 4 3 2 1 0 9 8 7 6 5 4 3 2 1
0x011B
19 19 18 18 18 18 18 18 18 18 18 18 17 17 17 176
1 0 9 8 7 6 5 4 3 2 1 0 9 8 7
0x011C
20 20 20 20 20 20 20 20 19 19 19 19 19 19 19 19
7 6 5 4 3 2 1 0 9 8 7 6 5 4 3 2
0x011D
22 22 22 22 21 21 21 21 21 21 21 21 21 21 20 208
3 2 1 0 9 8 7 6 5 4 3 2 1 0 9
0x011E
23 23 23 23 23 23 23 23 23 23 22 22 22 22 22 224
9 8 7 6 5 4 3 2 1 0 9 8 7 6 5
0x011F
25 25 25 25 25 25 24 24 24 24 24 24 24 24 24 240
5 4 3 2 1 0 9 8 7 6 5 4 3 2 1
Example: The 50# button address configuration of DWIN screen is sent, query the 03bit
of the corresponding variable address 0x0113 through the above table, and cooperate with
the touch control incremental adjustment setting of DWIN screen as shown in the figure
below.
Command description:
3:03H, 04H with a clock will add a 6-byte clock before the check code after the returned
data.
4:The format of the clock attached to 03H and 04H is year, month, day, hour, minute,
second (hex).
6:The corresponding relationship between bit variable addresses and variables in 01H,
02H, 05H instructions can be queried according to the above table.
Find the first line of data (starting with a non-zero segment) and download after
modifying the mark position.
Note: E000 means to edit the first entry from E000H (word address) 1C000 (byte
address) of No. 22 file
FF00 FF means maximum 255 pieces 0x00=Configure as host, RTU data format
0564 The upper limit of reissuing the current command is 5 times, 64=the delay time
between commands is 100ms.
0140 01 ID 40 when configured as a slave, high 4bit=4 low 4bit=0, enable serial port
4, 8N1.
Write the 0x1042 address data of the screen into the D1 of the plc (0x06 instruction)
0X04= command trigger mode(If the data of 0x1042 is changed, it will be sent
automatically. This mode has a reissue function to ensure successful sending, and there is
no need to read the write result of the slave.)。
0x1042= Send the address assigned by the data source in the screen。
Write the 0x1044-0X1046 address data of the screen into the D2-D4 of the plc (0x10
instruction 04 trigger mode)
0x1044= Send the address assigned by the data source in the screen。
Write the 0x1047-0X1049 address data of the screen into the D5-D7 of the plc (0x10
instruction 02 trigger mode)
0x1047= Send the address assigned by the data source in the screen。
Read the Y1 of the PLC to the 0-bit display in the bit display area on the screen (0x01
command)
Note:The screen does not have a bit address, in order to address bit variables, a 256bit
display area is defined starting from 0X0100
Since it is not a real bit variable, there are certain restrictions when using 0X01 and
0X02 instructions. 0x01, 0x02 instructions fixedly read 16bit (one word) data. When setting
the address of the slave machine, round up to 16. For example, when reading Y1 in this
example, the address of Y1 is found to be 301, and the actual address of the slave machine
should be 300. When reading Y0-Y17, fill in 300, which is actually 300. To 315, 16bit will all
be read. The display area address is also rounded up by 16. For example, if it is displayed
at 0 in this example, then bit0 - Y0 BIT1-Y1 of 0x0100 ......... BIT15-Y17. If it is displayed at
16 bits, then bit0 of 0x0101 - Y0 BIT1-Y1.........BIT15-Y17. The display area should be
displayed with bit icons.
Read the M5 of PLC to the 32-bit display in the bit display area on the screen (command
0x02)
Write the fifth digit of the keypad on the screen into Y2 of the PLC (command 0x05)
0X04= Instruction trigger mode (the address of bit 5 is changed and sent)
0x012E= The start bit address (302) of Y2 allocated in the point table.