
158 PROFIBUS Master in CoDeSys 2.3
WAGO-I/O-SYSTEM 750
758-874/000-131
WAGO-I/O-IPC-C6
Manual
Version 1.0.0
12.5.5
Performing Bus Diagnostics via DiagGetBusState()
To perform bus diagnostics, proceed as follows:
1.
Log in to CoDeSys. To do this, click in the menu bar on
Online > Login
.
Now the variable window displays the information on the variables (Online
View).
2.
Start the PLC program by clicking in the menu bar on
Online > Run
.
Starting causes the call up of the function block DiagGetBusState() and the
diagnostic information is output to the array EXTENDEDINFO.
In the online view of the variable window, the array EXTENDEDINFO provides
information on the status of the slaves. One entry is reserved for each slave in the
array. The slave address is assigned to the array index. In this example, it is the
slaves with the station addresses 2 and 5 that store the diagnostic information.
Display the diagnostic information
The diagnostic information is only displayed for the duration of one program
cycle. If the diagnostic information is to be available for longer, a suitable
program must be written.
Figure 86: Online view of the variable window (upper window) in FBD
3.
The binary code facilitates the evaluation of the individual diagnostic bits.
You can have the diagnostic information of the array EXTENDEDINFO
0: No slaves or non-configured slaves
≠
0: Configured slaves
Array