Persistent - update application

2018-10-25
2024-03-26
  • 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"></attribute>




    <adddata>
    <data handleunknown="implementation" name="http://www.3s-software.com/plcopenxml/attributes">
    <attributes>
    <attribute name="checksum_override" value="2196742183"></attribute>
    <attribute name="authentification" value="d433c4d1-208a-4b7a-b4ba-e3c77e67e46b">
    <attribute name="vfinitonly" value="">
    <attribute name="dummy" value="0">
    <attribute name="checksumnoinit_override" value="2363421397"></attribute>
    </attribute></attribute></attribute></attributes>
    </data>
    </adddata>

     
  • dFx

    dFx - 2018-10-31
    <initialValue>
    <simpleValue value="0" />
    </initialValue>
    

    This forces your value when downloading with rebuild all.

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

     
  • Thank. Do you know if there is some documentation about these XML tags ?

     
  • eschwellinger

    eschwellinger - 2018-11-05

    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

     

Log in to post a comment.