Programming without SFB 52 and SFB 53
D.5 FC CAM_DIAG (FC 2)
FM 352 electronic cam controller
206 Operating Instructions, 05/2011, A5E01071724-03
D.5 FC CAM_DIAG (FC 2)
Tasks
Use FC CAM_DIAG to read the data of the diagnostic buffer of the module and make these
available for visualization on an operator control and monitoring system or for a programmed
evaluation.
Call
This function must be called cyclically. A further job in an interrupt OB is not permitted. At
least 2 calls (cycles) are required to complete execution of this function..
The function reads the diagnostic buffer when a new entry in the diagnostic buffer is
indicated by the checkback signal DIAG = 1. After the diagnostic buffer is read, DIAG is set
to 0 by the module.
Data used
● Diagnostic DB:
The module address must be entered in the diagnostic DB. The last entry in the
diagnostic buffer is entered in the DIAG[1] structure and the first entry in the DIAG[4]
structure.
Jobs
You can read the diagnostic buffer whether or not there is a new entry by setting the
DIAGRD_EN trigger bit. After reading the diagnostic buffer, the trigger bit is set to 0.
Startup
There is no startup processing associated with the function.
Call parameters
Name Data type P-type Meaning
DB_NO INT I Number of the diagnostic DB
RET_VAL INT O Return value