Welcome to our new forum
All users of the legacy CODESYS Forums, please create a new account at account.codesys.com. But make sure to use the same E-Mail address as in the old Forum. Then your posts will be matched. Close

how to declare retain variables in eeprom

Anonymous
2017-09-22
2017-09-25
  • Anonymous - 2017-09-22

    Originally created by: barkamharikrishna

    Hi ALL;
    can any one help in codesys v3.5
    I want to declare some variable( parameters) in eeprom and read/write whenever required .

    But I want to know the address of variable in eeprom .
    Why I am interested in address is . I am transferring the parameters values from one plc to other plc on canbus .... With address as reference.

    Regards
    Hari

     
  • teichhei - 2017-09-22

    barkamharikrishna hat geschrieben:
    Hi ALL;
    can any one help in codesys v3.5
    I want to declare some variable( parameters) in eeprom and read/write whenever required .
    But I want to know the address of variable in eeprom .
    Why I am interested in address is . I am transferring the parameters values from one plc to other plc on canbus .... With address as reference.
    Regards
    Hari
    That depends on your Hardware but I think you will not get around extracting the data from CAN and then managing the sync. What if the data changed on both sides and comms was down or the message not received? How do you know whether it was changed locally or remotely?
    Usually you declare the variable list as persistent and if your PLC has the capability it will hold the value. If not, like with the raspberry pi, you'll have to save to file.

    Sent from my SM-G935F using Tapatalk

     
  • Anonymous - 2017-09-25

    Originally created by: barkamharikrishna

    hi,
    as you said . im saving all the Parameter in the file in PLC1. Now i want to Transfer that file to PLC2.when ever thr is any Change in the paramters. but i want to Transfer through canbus. please suggest if u have any solution.

    im using checksum to know that all the data transfered from PLC1 to Plc2.when coom is down or etc etc...
    i had written Software module for even transfering parmaters From PLC1 to PLc2 . in which PLC1 Hardware supplier given me a tool which help me to know the address in eeprom of parmaters.
    now im workign on other Controller where i want to implement the same Software module .but in this case where supplier dont know to eeprom address where this file is save ?

     

Log in to post a comment.