How to write a persistent Value

10 views
Skip to first unread message

Carlos Bou Gerges (automate)

unread,
Apr 3, 2018, 8:25:48 AM4/3/18
to Beckhoff Support Lebanon

To save a value on persistent value if we don’t have a NovRAM or one of Bus controller,

 

CE can’t save the persistent variables automatically.

 

First of all: the persistent-variables does not need a location! ( NO ADDRESS)

 

we create variables as below:

Sample:

VAR PERSTIENT

TestVar:int;

 

END_VAR

 

Then we need to use the library “TcUtilities.lib” or “Tc2_Utilities” in a way  to write that variables ( persistent variable) with the Function block “WritePersitsentData”  before we stop the project.

Best way is to create the persistent data after start of the project and actualize it on demand.

 

http://infosys.beckhoff.com/english.php?content=../content/1033/tcplclib_tc2_utilities/9007199289809547.html&id=

 

 

In case of we have a UPS ( such as CX5000, CX8000 series for example) we need the Library TC2_SUPS to use the function to save the persistent Variables automatically.


https://download.beckhoff.com/download/document/ipc/embedded-pc/embedded-pc-cx/cx8090_hwen.pdf


Reply all
Reply to author
Forward
0 new messages