logIsInitialized (Function)

Top  Previous  Next

Architecture:

X32 / NX32 / NX32L

Device support:

ALL

Firmware version:

1.00 / 1.00.00


logIsInitialized will check if the Datalogger system is correct initialized (The logInitialize() function has been called at some point). If the logInitialize() function has been called with a keyvalue that is different from the key value used in this function, logIsInitialized() will return false.

 

Input:

key : DINT

User defined keyvalue.

 

handle : SYSHANDLE

A handle to the Datalogger to check if is initialized. If not provided, it will check the flash-based log. Only supported on NX32L with firmware 1.50.00 or newer.

 

Returns: BOOL

True if Datalogger system has been initialized (and it was initialized with the same key value), false if not.

 

Declaration:

FUNCTION logIsInitialized : BOOL;
VAR_INPUT
  key        : DINT;
  handle     : SYSHANDLE;
END_VAR;

 

 

Example:

INCLUDE rtcu.inc
 
PROGRAM test;
 
BEGIN
  ...
  // Check if Datalogger has been initialized
  IF logIsInitialized(key:=4711) THEN
    ...
  END_IF;
  ...
END;
 
END_PROGRAM;