REGDFB: Alarm saving and dating
(Original Document)
Description of the function
The REGDFB function, entered in the code of a user DFB, saves and dates an alarm in the diagnostics buffer.
Additional parameters EN and ENO can be configured.
Representation in FBD
Representation in LD
Representation in IL
LD ControlledArea
REGDFB ErrorClass, StatusLength, OperatorControl, PinNumber,
PinValue, DiagnosticBuffer, ErrorIdentifier, RegistrationStatus
Representation in ST
REGDFB(ControlledArea, ErrorClass, StatusLength,
OperatorControl, PinNumber, PinValue, ErrorIdentifier,
RegistrationStatus);
Description of parameters
The following table describes the input parameters:
Parameter
Type
Comment
AREA
Area of the machine monitored by the DFB: 0...15.
CLAS
Class of error: 16#0062
SLEN
Length of the status: 0, 2 or 4 bytes:
  • 0 = no status managed
  • 2 = status managed on one word
  • 4 = status managed on a double word
CTRL
1 = Operator acknowledgement required.
0 = no acknowledgement required.
PIN
Number of pins in error.
Rule for numbering inputs: only inputs with a "Diag" attribute are counted.
VALPIN
Expected value on the pin in error.
The following table describes the output parameters:
Parameter
Type
Comment
ERID
Error identifier.
ESTS
Address of the error status.
STAT
Registration status.
  • if the registration is successful: STAT= 0 and ERID is valid,
  • if the registration fails: ERID is invalid and
    • STAT = 1: diagnostic buffer not configured,
    • STAT = 2: diagnostic buffer is full.
See DIAGBUF.
The following table describes the input/output parameters:
Parameter
Type
Comment
DIAGBUF
Diagnostic buffer that contains the DFB registration result