Load variables from file (espide_pv_load)¶
What it does: Reads an INI file saved by pvstore and sets global program variables from it.

Inputs and output¶
- File: text with path to configuration. With no input connected,
"vars.ini"is used. - The block does not return a value or success flag. Library messages are displayed in the terminal.
Recommended order after start¶
- Set variables to safe default values.
- Load the saved file.
- Check the ranges of the read values before using them to control the device.
Missing or empty file will leave default variables and print a message. Variables not contained in the file are not changed by loading. Don't put the load in the fast main loop unless you really need to read the file again.
Tips and pitfalls¶
- all sections and all valid names in the file are read, not just the list selected in the save block. Identical names across sections are rewritten.
- For a manually edited file, keep the type prefixes (
int:,float:,bool:,str:,list_int:, etc.). With an invalid type, the library may return a text instead of the expected number; loading is therefore not a substitute for checking the data. - The keys in the file match the names in the generated Python. After renaming the project variable, the saved data also needs to be modified or saved again.
- The
pvstore.pylibrary must be available on the device. The values file is part of its repository, not automatically part of the.blkproject.