Diagnostics command
(Original Document)
At a Glance
A diagnostics command is sent by the SEND_REQ function block.
The SEND_REQ function must be used for reading or resetting the various diagnostics counters.
In order to handle common problems, the TSX PBY 100 module provides four diagnostics counters per slave. These counters can be accessed via the SEND_REQ function and are presented in the form of a byte table.
Syntax
The communication function syntax is presented in the following format:
SEND_REQ (ADDR('r.m.c'), 16#0031, %MWi:3, % MWk:4, %MWj:L)
The following table describes the various parameters of the function:
Parameter
Description
ADDR(‘r.m.c’)
r
Rack number
m
Module number
c
Channel number (0 for Profibus DP)
16#0031
Request code
%MWi:3
Request parameters
%MWi
Type of diagnostics
%MWi.0....8
0...125
126
127
128
129
130
131
132
Diagnostics on slave x
List of diagnostics available
Compressed diagnostics on all slaves
Diagnostics on master module
Total diagnostics counters
Faulty exchange counters
Downtime counters
Invalid response counters
%MWi.9
Reserved
%MWi.10
Reserved
%MWi.11
Reserved
%MWi.12
If activated, reading of configuration data for slave selected by %MWi.0...8 (= 0 to 124)
%MWi.13
If activated, reading of information for slave selected by %MWi.0....8 = 0 to 124
%MWi.14
If activated, resetting the list of available diagnostics or the counters specified by %MWi.0....8 = 126, 129 to 132
%MWi.15
If activated, reading of the list of available diagnostics or the counters specified by %MWi.0....8 = 126, 129 to 132
%MWi+1
Start address in the diagnostics table (default value is 0). To access part of the diagnostics table, it is possible to specify a start word in the table (Offset start)
%MWi+2
Length of diagnostics to be read
%MWk:4
Management table for the function SEND_REQ
%MWj:L
Reception table of length L, starting at the word %MWj which contains the diagnostics information. The responses obtained depend on the type of diagnostics performed. For further details on the diagnostics information that cab be obtained using the SEND_REQ communication function, consult the diagnostics chapter.