The Festo_Motion.lib library
23
Function block xxx_PRM_DIAG
The xxx_PRM_DIAG block reads the error memory or if applicable the warning memory of the relevant
motor controller.
Figure: Example of function block CMMP_AS_PRM_DIAG
Inputs and outputs
The following table contains a list of inputs and outputs that the function block xxx_PRM_DIAG has to
parameterise a motor controller.
Input/output Type Description
ReadLatest BOOL Read the most recent entry
0->1: A rising edge reads out the most recent
message
ReadAll BOOL Read all entries
0->1: A rising edge reads out all messages
Warning BOOL Switch between warnings
= 0: Rear errors
= 1: Read warnings
DATA_REF VAR_IN_OUT FPC data structure
Data structure provided by FB ..._PRM_INIT
Done BOOL Transfer status
= 0: Transfer has not been initiated
= 1: Transfer has been initiated
ParamNr USINT Parameter number of the error memory
Number of the parameter currently being transferred
ReadLatest: ParamNr = 1
ReadAll: ParamNr of the error memory currently
being processed
Err BOOL Error
= 0: No error during parameter transfer
= 1: Error during parameter transfer
ErrStr STRING(80) Outputs an error message as a string
DiagBuff ARRAY [1..n] OF
FHPP_PRM_DIAGMESSAGE
Diagnostic buffer
The read messages are stored in the diagnostic
buffer (array). The completeness of the entries and
number of parameters depend on the relevant
device.
RETVAL UINT Current status of the FB instance
When using several instances of the FB, the current
internal status of the relevant FB is output.