LoadStringF (Function)

Top  Previous  Next

Architecture:

X32 / NX32 / NX32L

Device support:

ALL

Firmware version:

1.00 / 1.00.00


LoadStringF will load a string from a specific location in the persistent FRAM memory.

 

A total of 20 (X32) / 100 (NX32/NX32L) FRAM entries are available.

 

Input:

index : INT (1..20 or 1..100)

Location number the string should be loaded from.

 

Returns: STRING

The string from the specified location.

 

Declaration:

FUNCTION LoadStringF : STRING;
VAR_INPUT
  index : INT;
END_VAR;

 

Example:

INCLUDE rtcu.inc
 
PROGRAM test;
VAR
  result : STRING;
END_VAR;
 
BEGIN
  ...
 result:=LoadStringF(index:=10);
  // If persistent memory location number 10 contains "hello world", then result
  // will contain the same text after the call
  ...
END;
 
END_PROGRAM;