Examples of diagnostics command
(Original Document)
Reading diagnostics words from a slave
Diagnostics carried out on slave 2.
The table below describes the parameters:
Parameters
Variables
Values
Address
-
ADDR(‘0.6.0’)
Request code
-
16#0031
Data to be sent
%MW100:3
2 (slave address in decimal)
0 (diagnostics table address in decimal)
32 (length of diagnostics table in decimal)
Exchange
%MW200:4
-
Reception Zone
%MW104:32
-
Diagnostics on a master
SEND_REQ(ADDR('0.6.0'),16#0031,%MW100:3,%MW200:4,%MW104:32)
Parameters
Variables
Values
Address
-
ADDR(‘0.6.0’)
Request code
-
16#0031
Data to be sent
%MW100:3
126 (master code in decimal)
0 (diagnostics table address in decimal)
32 (length of diagnostics table in decimal)
Exchange
%MW200:4
-
Reception Zone
%MW104:32
-
Resetting the diagnostics counter
SEND_REQ(ADDR('0.6.0'),16#0031,%MW100:3,%MW200:4,%MW104:32)
Parameters
Variables
Values
Address
-
ADDR(‘0.6.0’)
Request code
-
16#0031
Data to be sent
%MW100:3
16#4081 (initialization of the total diagnostics counter in hexadecimal)
0 (diagnostics table address in decimal)
32 (length of diagnostics table in decimal)
Exchange
%MW200:4
-
Reception Zone
%MW104:32
-