CODESYS - the IEC 61131-3 automation software

Welcome to the official CODESYS Forum by 3S-Smart Software Solutions GmbH | A member of the CODESYS Group
Deutsche Version English version russian version 
It is currently Sat Dec 15, 2018 3:36 pm

All times are UTC+01:00




Post new topic  Reply to topic  [ 4 posts ] 
Author Message
PostPosted: Thu Oct 25, 2018 1:45 pm 
Offline

Joined: Fri May 11, 2018 1:18 am
Posts: 5
Hello,

i am looking for information about persistent variables. I made a program which declare some persistent variables. Everything work fine and when the device shutdown and restart, the variable are indeed persistent in the right way. When i change the program (not the PersistentVars) and upload the new program to the device, the persistent variables are not restored as expected : not always, depending on the modification i made to the programe.
I had try a lot a things but do not understand why when i made a change to the program, sometime the persistent variables restart from 0 (persistent lost) and sometime the persistent variables keep its latest value. When exporting in OpenXML, i saw that sometimes tags "Checksum_Type" and "checksumnoinit_override" are added.

Does someone can help me understand if this behaviour is correct or not ? Does someone know the meaning of the tag "Checksum_Type" and "checksumnoinit_override" ?

<globalVars name="PersistentVars" retain="true" persistent="true">
<variable name="_A">
<type>
<DINT />
</type>
<initialValue>
<simpleValue value="0" />
</initialValue>
<addData>
<data name="http://www.3s-software.com/plcopenxml/attributes" handleUnknown="implementation">
<Attributes>
<Attribute Name="Checksum_Type" Value="3401061445" />
</Attributes>
</data>
</addData>
</variable>
<addData>
<data name="http://www.3s-software.com/plcopenxml/attributes" handleUnknown="implementation">
<Attributes>
<Attribute Name="checksum_override" Value="2196742183" />
<Attribute Name="authentification" Value="d433c4d1-208a-4b7a-b4ba-e3c77e67e46b" />
<Attribute Name="vfinitonly" Value="" />
<Attribute Name="dummy" Value="0" />
<Attribute Name="checksumnoinit_override" Value="2363421397" />
</Attributes>
</data>
</addData>
</globalVars>


Top
   
PostPosted: Wed Oct 31, 2018 1:46 pm 
Offline

Joined: Fri Feb 23, 2018 3:41 pm
Posts: 67
Code:
<initialValue>
<simpleValue value="0" />
</initialValue>

This forces your value when downloading with rebuild all.

Just don't rebuild all, or update your initial values.


Top
   
PostPosted: Mon Nov 05, 2018 2:35 am 
Offline

Joined: Fri May 11, 2018 1:18 am
Posts: 5
Thank. Do you know if there is some documentation about these XML tags ?


Top
   
PostPosted: Mon Nov 05, 2018 7:03 am 
Offline
Site Admin

Joined: Mon Sep 05, 2005 9:42 am
Posts: 3018
Hi,
which device and which version are you using?
If the retain/persist vars do not work reliable try to solve the root cause... there is not need to Workaround
by any XML file ( even I think this is not possible)

BR
Edwin


Top
   
Display posts from previous:  Sort by  
Post new topic  Reply to topic  [ 4 posts ] 

All times are UTC+01:00


Who is online

Users browsing this forum: No registered users and 7 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB® Forum Software © phpBB Limited