LoadStringX (Function)

Top  Previous  Next

Architecture:

X32 / NX32 / NX32L

Device support:

ALL

Firmware version:

1.00 / 1.00.00


LoadStringX will load a string from a specific location in the persistent extended FLASH memory.

 

Use the GetFlashXSize function to determine the highest location it is possible to read from.

 

Note: not all RTCU devices support extended flash memory.

 

 

Input:

index : INT (1..max)

Location number the string should be loaded from.

 

Returns: STRING

The string from the specified location.

 

Declaration:

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

 

Example:

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