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

Error: Function Block Must Be Initiated Before Accessed

kmckinney
2015-06-25
2015-07-01
  • kmckinney - 2015-06-25

    How dp you initiate a function bloack before is it accessed. I am new to Codesys and have been struggling mightily.

    Please assist

     
  • shooter - 2015-06-26

    when you have enetered (F2) a function block, give it another name as it is by default (that is the FBname) when pressing enter or you go to next line it says hey it is not defined, in omost cases you can press enter and it will insert a line in the VAR list above.

    try it with the FB editor as this is simplest.
    when you put in a FB on top it will ??? change it to a name example fbblock press enter and the line will be inserted.

    later on edit this var list to make it readable.

     
  • kmckinney - 2015-07-01

    Thank you. That was very helpful

     

Log in to post a comment.