canLoggerRead2 (Functionblock) |
Top Previous Next |
This function will read the oldest record stored in the logger when operating in mode 2 (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.
Input: port : SINT (1/2) (default 1) The port of the logger.
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.
time : INT The time-stamp. (Look here for information).
ready : BOOL True if a message has been received.
Declaration: FUNCTION_BLOCK canLoggerRead2; datasize : SINT; ready : BOOL;
Example: INCLUDE rtcu.inc |