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.

The outputs E and lastErr indicate an error during disk operation. The E indicator is reset on falling edge at the SAVE or LOAD input while the lastErr output holds the value until another disk operation is invoked. If the error occurs during the LOAD operation, 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 data folder of the RexCore runtime module.

Use the SGSLP function block for advanced and complex operations.

Inputs

u

Input signal

Double (F64)

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 (F64)

Outputs

y

Output signal

Double (F64)

E

Error flag

Bool

lastErr

Result of last operation

Long (I32)

2022 © REX Controls s.r.o., www.rexygen.com