logLast (Function)

Top  Previous  Next

Architecture:

X32 / NX32 / NX32L

Device support:

ALL

Firmware version:

1.00 / 1.00.00


logLast will position the current read pointer at the last (newest) record in the Datalogger.

When the read pointer is positioned on the last (newest) record, it will, in case of additional logWrite operations, automatically be updated to point to the last record.

 

Note for multithreading application:

There is only one global read pointer available for each Datalogger which means that several threads navigating the Datalogger should implement critical sections to avoid problems.

 

 

Input:

handle : SYSHANDLE

A handle to the Datalogger to move the read-pointer in. If not provided, it will work on the flash-based log. Only supported on NX32L with firmware 1.50.00 or newer.

 

Returns: BOOL

True if successful, false if no record to move to (i.e. Datalogger is empty).

 

Declaration:

FUNCTION logLast : BOOL;
VAR_INPUT
  handle     : SYSHANDLE;
END_VAR;

 

 

Example:

INCLUDE rtcu.inc
 
PROGRAM test;
VAR
  success : BOOL;
END_VAR
 
BEGIN
  ...
  // Position readpointer to the last (newest) record in the Datalogger
  success:=logLast();
  ...
END;
 
END_PROGRAM;