S7-SoftPLC:NVRAM configuration

From IBHsoftec Wiki English
Jump to: navigation, search

The NVRAM configuration allows a remanent behavior of S7-SoftPLC. The NVRAM configuration builds a file to save the retain data. Depending on the capabilities of your filesystem and the size of the parameterised values, the saving process will take some time, so that the process does not occur in real-time.

It is not possible to store retain data on local hard drives, because Microsoft Windows® writes buffered only and does not store data on the hard drive, because of the high access rates. That's why the saving of retain data can only be performed on network drives (or similar).

If PC-plug-in cards are being used, that emulate a hard drive via battery buffered RAM, it must be ensured, that the used driver overrides the data buffering of the Microsoft Windows® operating system and that the data is written onto the emulated hard drive immediately.


Remanence checking with STATUS SFC/FC

The STATUS SFC/FC returns two information:

OUT0 (DOWRD) returns the interval of the last saving process.

RET_VAL (INT) see chart:

RET_VAL(INT) Description
0 Everything operational
-1 NVRamDll not longer in memory
-2 Unable to open data file
-3 No write access
-4 Unable to close data file


Calling the STATUS SFC/FC:

CALL SFC 212
OUT0  := MD 0 //OUTPUT DWORD
RET_VAL  := MW 4 //RESULT INT


Comment on file systems

It is not possible to store retain data on local hard drives, because Microsoft Windows® writes buffered only and does not store data on the hard drive, because of the high access rates. That's why the saving of retain data can only be performed on network drives (or similar).

If PC-plug-in cards are being used, that emulate a hard drive via battery buffered RAM, it must be ensured, that the used driver overrides the data buffering of the Microsoft Windows® operating system and that the data is written onto the emulated hard drive immediately.