canLoggerRead (Functionblock) |
Top Previous Next |
This function will read the oldest record stored in the logger when operating in mode 1 (see canLoggerSetup). The function block must be initialized and manually updated in order to read any messages from the logger. When a message is read from the logger, the ready flag will be set, the output variables will contain the message identifier (ID) information, and the buffer defined during initialization will contain the data. The data is valid until the function block is updated again. Note: this function will not affect the internal buffer.
The function block can only read CAN messages from the first logger.
Input: data : PTR Address of the buffer to receive the data in. Note: the buffer must be 8 bytes long.
Output: xtd : BOOL
id : DINT The identifier of the message.
datasize : SINT Number of bytes received.
ready : BOOL True if a message has been received.
Declaration: FUNCTION_BLOCK canLoggerRead;
Example: INCLUDE rtcu.inc |