logPrev (Function)

Top  Previous  Next

Architecture:

X32 / NX32 / NX32L

Device support:

ALL

Firmware version:

1.00 / 1.00.00


logPrev will advance the current read pointer one step backwards (backward in time).

 

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 there is no record to move to (if there is no previous record or Datalogger is empty).

 

Declaration:

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

 

 

Example:

INCLUDE rtcu.inc
 
PROGRAM test;
VAR
  success : BOOL;
END_VAR;
 
BEGIN
  ...
  // Advance readpointer to previous record (backward in time)
  success:=logPrev();
  ...
END;
 
END_PROGRAM;