
07/04 AWB2700-1428GB
51
6 Diagnostics for the local XI/ON-BUS and the PROFIBUS-DP / CANopen bus
In the XC600 system, diagnostics are available not only for the
local input/output modules, but also for the remote modules that
are linked via the PROFIBUS-DP or CANopen bus segment. The
local modules are handled in a similar manner to the remote
modules on the PROFIBUS-DP.
Basic procedure for error handling
1. If a participant detects that an error has occurred, it will send a
message to the master. The master processes this in the
GETBUSSTATE POU (
Section “POU (Program Organization
2. Bit 2 is set in one of the user bytes in the output array
GETBUSSTATE.EXTENDEDINFO array”, Page 52).
3. All user bytes are interrogated by the diagnostics program. If, in
one of them, Bit 2 is set in a user byte, then the POU
DiagGetState is called. This has the effect that the message is
no longer available and Bit 2 of the user byte is reset
(
Section “Function block DiagGetState”, Page 53).
The error message is indicated in various bytes in the output array
DiagGetState.EXTENDEDINFO. With PROFIBUS-DP, the Bit 3 of
Byte 8 is set, and an error code appears in the diagnostics byte of
the diagnostics-capable module (from Byte 17). With CAN, an
error code is indicated in Bytes 16 and 17.
If the error in the participant has been cleared, then another
message is sent. Bit 2 is set in the participant byte of the output
array GETBUSSTATE.EXTENDEDINFO and the POU DiagGetState is
called, which then resets Bit 2. The error messages in the output
array DiagGetState.EXTENDEDINFO are also reset.
POU (Program Organization Unit) GETBUSSTATE
The GETBUSSTATE POU is included in the BusDiag.LIB file. Make
sure that this file is included in the project. This file, which is
invisible to the user, is called cyclically by the run-time system. The
input and output data for the POU, which you can access, are
stored in a 142-byte data field.
The system establishes such a data field for every configured
segment.
The input and output data are collected in a single structure, to
facilitate data access easier. The correlation between the marker
range (starting with the diagnostic address) and the structure is
made by the declaration of a directly addressable variable of type
GETBUSSTATE (not task-specific). Example
You must declare a (global) variable not only for the local XI/ON
segment but also for every PROFIBUS DP or CANopen bus
segment.
h
Design the program for diagnostics so that you first
interrogate the local segment for messages, and then the
remote segments, one after another. The diagnostics
program should be implemented as a separate task, with
a task interval of 50 msec.
h
From XSoft V2.3.1, the module for diagnosis of the DP
segment with the internal BOLDENABLE variable must be
called a few times. The programming can be seen in the
DIAGDP example program.
Data field
Content
MB0
Data for the 1st bus system, e.g. local XI/ON bus
MB1
MBxx etc.
MB142
Data for the 2nd bus system, e.g. local XION bus
MB143
MBxx etc.
MB284
Data for the 3rd bus system, e.g. local XION bus
MB285
MBxx etc.
MB0, MB142, MB284, etc. are diagnostic addresses.
DP_segment AT %MB142: GETBUSSTATE;
Содержание XControl XC600
Страница 4: ...II...
Страница 8: ...07 04 AWB2700 1428GB 4...
Страница 30: ...07 04 AWB2700 1428GB 26...
Страница 40: ...07 04 AWB2700 1428GB 36...
Страница 74: ...07 04 AWB2700 1428GB 70...
Страница 78: ...07 04 AWB2700 1428GB 74...