Iris _

Pixsys Forum

everybody's effort for the same goal

PersistentVars

Post Reply
Akizildas
Posts: 2
Joined: 10/10/2023, 16:39

PersistentVars

Post by Akizildas »

Hi.I use codesys and PL700 PLC. When I cut the power Retain variable go to zero. I declarate variable for example:

VAR_GLOBAL PERSISTENT RETAIN
scaAkuSP :INT;
END_VAR

VAR_GLOBAL RETAIN
scaAkuSP:int;
END_VAR

How can i do it.
You do not have the required permissions to view the files attached to this post.
Pixsys tecnico 1
Moderatore
Posts: 1679
Joined: 29/10/2010, 10:09
Contact:

Re: PersistentVars

Post by Pixsys tecnico 1 »

Hi,
please go to "[PL700] CODESYS programming examples" section and take a look to the example number 7.
https://forum.pixsys.net/viewtopic.php?f=25&t=2642

To manage retain variables, you need to use the Persistent Manager service.
Akizildas
Posts: 2
Joined: 10/10/2023, 16:39

Re: PersistentVars

Post by Akizildas »

How long can the plc keep its variable value in memory when it is not powered?
Pixsys tecnico 1
Moderatore
Posts: 1679
Joined: 29/10/2010, 10:09
Contact:

Re: PersistentVars

Post by Pixsys tecnico 1 »

Hi,
memory file is stored in a EMMC flash memory type so the duration is almost infinite.
Post Reply