How to Restore Setpoint in FactoryLink… Using Persistence File (of course)

Xybernetics IncHave you been stuck in situation where you have restored your application using MPS file and all the setpoints have disappeared on you… that when you get cold sweat. The article below is directly from FactoryLink user manual (FactoryLink 7: Task Configuration Reference Guide) and takes no credit for the material. I have extracted some of the most important paragraph which I think would be useful for readers. The document can be found here. If the document link is not working (as it is a matured product), you can still get it from my webpage… here.

What is Persistence in FactoryLink

The Persistence task saves values from an active FactoryLink application at predetermined times to prevent loss of useful data if FactoryLink shuts down unexpectedly. These saved values are written to disk and are not affected when FactoryLink shuts down. Then, when you restart FactoryLink with the warm start command-line option, the Run-Time Manager restores the real-time database from the values in the disk file.

How do you setup your tag to write to Persistence files

It can be done in the Tag Definition dialog (by pressing Ctrl-T). The Persistence section you can configure the tag value saving characteristics.

Xybernetics Inc

Where are the Persistence files

The persistent data is saved in a unique Persistence save file for each domain instance. The Persistence save files have the extension .PRS and are located in the /FLAPP/FLNAME/FLDOMAIN directory.

FLAPP Translated application environment variable.
FLNAME Translated application environment variable.
FLDOMAIN Translated domain environment variable.

The name of each Persistence save file is {FLUSER}.PRS where FLUSER is the translated environment variable for the domain user name. The Persistence save file contains the saved values for that domain user.

For example, in Windows, where the FLRUN.BAT file sets the Shared FLUSER environment variable to SHAREUSR, but the USER domain FLUSER environment variable remains at the default setup in the AUTOEXEC.BAT file, the Shared persist file is named SHAREUSR.PRS and the User persist file is named FLUSER1.PRS.

The Persistence backup files are in the same place and have the same name, except they have the extension .BAK

It is always a good practice to keep a backup copy of this file and copy it over to the same directory when the MPS file is restored.