Siemens SIMATIC S7-300 Manual page 101

Fm 354 servo drive positioning module
Hide thumbs Also See for SIMATIC S7-300:
Table of Contents

Advertisement

6.4.2
FC DIAG_INF (FC 6) – Read diagnostic interrupt data in OB 1
Task
You can call FC DIAG_INF in OB 1 (or at another cyclical program level).
For call options, parameters and evaluation, see Section 6.4.1.
Principle of
This function works together with a user DB. The DB number is passed when
operation
you call the FC with the DB_NO parameter.
Reading of the diagnostic interrupt data DIAGNOSTIC_INT_INFO (in user
DB starting at address 72) is started when you set the in/out parameter
IN_DIAG to one. The parameter is reset by the FC after the job is executed.
The FC must be called up until it has reset the in/out parameter. When the
FM 354 is used centrally, the Read job is processed within a single function-
block callup. When the FM 354 is used in a distributed configuration, it may
take several function-block callups to process the Read job.
The in/out parameter remains set while the job is running. Data transfer is
complete when the in/out parameter is reset (IN_DIAG = FALSE).
Example call
An example call is shown below for FC DIAG_INF
in OB 1
STL
...
U
DIAG_READ;
SPB
DIRD;
S
DIAG_READ;
DIRD: CALL DIAG_INF(
DB_NO
:= W#16#1,
RET_VAL
:= FEHLERCODE_LESEN,
IN_DIAG
:= DIAG_READ);
U
DIAG_READ;
SPB
END;
UN
BIE;
S
FEHLER_LESEFKT;
END:
NOP
0;
...
FM 354 Servo Drive Positioning Module
Programming the FM 354
.
Explanation
// Call FC if initiation flag set
// Initiate read function
// Call diagnostic information FC
// DB number
// Return value
// Initiate reading
// Jump to end if read job not // yet fin-
ished
// Binary result
// Error on read function
6-21

Hide quick links:

Advertisement

Table of Contents

Troubleshooting

loading

Table of Contents