Retain Variables and Simulation Mode on Codesys 2.3

marios
2014-11-21
2014-11-25
  • marios - 2014-11-21

    Hello everyone, i’m new to codesys and I kindly ask an help on this useful forum.
    I’m working on codesys 2.3 (configuration : WAGO_750-881) and I have to modify the running project with the purpose of obtaining the restore of the system after blackouts in its exact state before the power goes down.
    I see that it is possible to declare “Retain” variables, to obtain the current state of all the variables, but in simulation mode they don’t work (if I logout, or reset the program they come back to their initialization value) , so I would know if it’s a normal thing and after the download on the plc they will work correctly, or if there is a way to make them also work in simulation mode. I would prefer to test the program in simulation mode first, that’s the reason of my question.
    I’m also available for alternative solutions.
    Thank you very much!

     
  • shooter - 2014-11-22

    No retain does not work in simulation, you will need an PLC, maybe standalone on the bench without any modules if possible.
    You will see that tasks are running a lot faster, and al these remanent constant and other things work.

     
  • marios - 2014-11-24

    Thank you for your answer shooter.
    So It seems I need to operate directly on the PLC .
    And what about alternative solutions for restoring the state of the system after blackouts (for example writing on file is possible on code sys 2.3) ?
    If retain variables work correctly in my opinion it's the most reliable solution, but I'm evaluating every possible way to improve the productivity of the work assigned to these machines.
    Thank you very much

     
  • shooter - 2014-11-24

    writing to a file works too, but where do you write it?
    it should be on a PC or alike

     
  • marios - 2014-11-25

    Exactly
    I would write the state of all variables on the same pc I login&start the program, if retain variables will not work...

     

Log in to post a comment.