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

Program freezes after I click 'Run'

b.mcd
2015-06-19
2015-06-30
  • b.mcd - 2015-06-19

    I am running a Codesys 2.3 program on a WAGO PLC ethernet controller. After I upload the program and click 'Run', the communication with the controller freezes (as it appears). I can't communicate with the controller until I physicall reset the device and reload all the network settings.

    Does someone have advice for this situation?

    Thanks!

     
  • shooter - 2015-06-21

    first make a simple blinker program,check for correct working and communication.
    be sure the program is not activating watchdog, and does not change the internet settings.
    if still problems zip program and put it here.

     
  • Anonymous - 2015-06-21

    Originally created by: scott_cunningham

    This typically happens when you write to a memory location you shouldn't and the PLC crashes.

    Many possibilities:

    Defining an array[1..9] and then forgetting vars init to 0:

    VAR
    Β  J:INT;
    Β  aBad : ARRAY[1..9] OF INT;
    END_VAR
    aBad[j] := 27;
    

    This will compile but crash or act weird when run..

    Using a pointer that points to a wrong location.

    Etc

     
  • b.mcd - 2015-06-30

    Thanks for your help! It apparently was an infinite loop.

     

Log in to post a comment.