The function block FB_EventLogger is used to log the IO-Link events. By enabling the function block, a callback is registered to the IO-Link events. Based on the first-in-first-out principle, the output q_astEventLogList lists the newest IO-Link events detected including a time stamp based on the RTC of the controller. The output q_xNewValue indicates that at least one new event is logged per cycle. The total number of events detected since the function block was enabled is indicated by the output q_udi_EventCounterTotal.
Input |
Data type |
Description |
---|---|---|
i_xEnable |
BOOL |
The function block starts logging the IO-Link events on a rising edge of this input. Refer to Behavior of Function Blocks with the Input i_xEnable. |
Output |
Data type |
Description |
---|---|---|
q_xActive |
BOOL |
Indicates that the execution of the function block is active. As long this output is TRUE, the function block must be executed cyclically. |
q_xReady |
BOOL |
Indicates that the callback to the IO-Link events was registered successfully and that the logging process is running. |
q_xError |
BOOL |
Indicates that an error was detected during the execution of the function block. |
q_etResult |
Provides diagnostic and status information as a numeric value. |
|
q_sResultMsg |
STRING [80] |
Provides additional diagnostic and status information as a text message. |
q_astEventLogList |
ARRAY[1..GPL.Gc_udiEventLogListSize] OF ST_EventLog |
Array containing the last logged events. |
q_xNewValue |
BOOL |
Indicates that a new value was logged in this cycle. |
q_udiEventCounterTotal |
UDINT |
Indicates the total number of IO-Link events logged since the function block was enabled. |