SILO – Save input value, load output value

Block SymbolLicensing group: STANDARD
PIC

Function Description
The SILO block can be used to export or import a single value to/from a file. The value is saved when a rising edge (off on) occurs at the SAVE input and the value is also set to the y output. The value is loaded at startup and when a rising edge (off on) occurs at the LOAD input. If an error occurs, a substitute value yerr is set to the y output.

Alternatively it is possible to write or read the value continuously if the corresponding flag (CSF, CLF) is set to on. The disk operation is then performed when the corresponding input is set to on. Beware, in that case the disk operation is executed in each cycle, which can cause excessive use of the storage medium. Thus it is necessary to use this feature with caution.

The fname parameter defines the location of the file on the target platform. The path is relative to the folder where the archives of the REX Control System are stored.

Use the SGSLP function block for advanced and complex operations.

Inputs

u

Input signal

double

SAVE

Save value to file

bool

LOAD

Load value from file

bool

Parameters

fname

Name of persistent storage file

string

CSF

Flag for continuous saving

bool

CLF

Flag for continuous loading

bool

yerr

Substitute value for an error case

double

Outputs

y

Output signal

double

E

Error flag

bool

iE

Error code of the operating system

long