
Diagnostics for the local XI/
ON-BUS and the PROFIBUS-DP /
CANopen bus
07/04 AWB2700-1428GB
56
Example
The diagnostics are explained through a program example:
The following takes place before a main program:
• The outputs of the local XI/ON modules are accessed and the
corresponding diagnostics program is called up.
• Two subprograms are started, to set an output in a PROFIBUS-
DP segment and in a CANopen segment.
The individual subprograms each call up a diagnostics program.
The function block DiagGetState is accessed in the diagnostics
program, and its EXTENDEDINFO output is made available for the
diagnostics data.
In the sample program, the participant bytes of the output array
GETBUSSTATE.EXTENDEDINFO are continuously interrogated. If
Bit 2 is set in a participant byte, then the DiagGetState function
block is called, and the output array DiagGetState.EXTENDEDINFO
is copied into a dummy field FeldDiagData. The evaluation of the
diagnostics data must be performed by the application (user). The
diagnostics data can also be taken directly from the output array
DiagGetState.EXTENDEDINFO.
If an error is detected and processed, then the interrogation of the
output array GETBUSSTATE.EXTENDEDINFO carries on again from
the first participant.
FeldDiagData basically contains the error code for the participant
that sent the last message.
If a direct interrogation is requested, then the user can set an
auxiliary marker to signal that the error message has arrived (
a
note in the example program). When this is received, the error
code can be interrogated.
Configuration
Figure 69 : Configuration of the example project
1) Short-circuit applied
PROFIBUS-DP
Bridge
a b c d e f
a b c d e f
a
XN-2DI-24VDC-P
b
XN-2DI-24VDC-P
c
XN-2DO-R-NC
d
XN-2DO-R-NC
e
XN-2DO-24VDC-0,5A-P
f
XN-2DO-24VDC-0,5A-P
1)
a
XN-GW-PBDP-12MB
b
XN-BR-24VDC-D
c
XN-2DI-24VDC-P
d
XN-2DI-24VDC-P
e
XN-2DO-24VDC-0,5A-P
1)
f
XN-2DO-24VDC-0,5A-P
WINbloc CAN
16DO 0,5 A PK (EDS)
1)
Node_ID: 2
WINbloc CAN
16DO 0,5 A PK (EDS)
Node_ID: 3
Modules:
(address 2)
Modules:
CANopen bus
Summary of Contents for XControl XC600
Page 4: ...II...
Page 8: ...07 04 AWB2700 1428GB 4...
Page 30: ...07 04 AWB2700 1428GB 26...
Page 40: ...07 04 AWB2700 1428GB 36...
Page 74: ...07 04 AWB2700 1428GB 70...
Page 78: ...07 04 AWB2700 1428GB 74...