logFirst (Function)

Top  Previous  Next

Architecture:

X32 / NX32 / NX32L

Device support:

ALL

Firmware version:

1.00 / 1.00.00


logFirst will position the current read pointer at the first (oldest) record in the Datalogger.

 

Note for multithreading application:

There is only 1 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 there is no record to move to (i.e. Datalogger is empty).

 

Declaration:

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

 

 

Example:

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