Getting Started With CoDeSys

2013-08-06
2013-08-06
  • craigchamberlin - 2013-08-06

    Our company has recently adopted the ABB PLC units (AC500 PLCs) which run exclusively on CoDeSys 2.3.9.

    We've been consulting the manual within the software and have a copy of the CoDeSys manual on hand for programming. We've created a number of applications so far that have gone over really well. We do have some advanced questions that may require further documentation or consultation, hopefully someone here can help.

    We'd like to be able to create our own function blocks and libraries. Unfortunately there is no documentation for this process within the manual (unless I've missed it).

    Any help, samples or even direction would be great.

     
  • shooter - 2013-08-06

    creating a function block is easy.
    go to POU on left lower tab
    add object

    example
    give it a name (testblock)
    and a type (Function block)
    and a language (ST)

    type in the first programline:
    output1:=input1+input2;
    now you have to declare the VARs with the declare assistant.
    input1 is not a simple VAR but a input. all type is REAL
    output1 is an output.

    now you have made a simple adder as a FB.

    examples of function blocks can be found at w www.oscat.de w in german and english. download the version2 in lib and in txt and as pdf
    this will give you a lot of reading.

    When you have a lot of FB made you can put them in a lib. but for now just use a standard program and clean the PLC_PRG so you will keep your FB.
    i sometimes export them and then i can import them in a new program, just the ones i need.

    and yes we will try to give all the help you need.
    and yes the docs are not very good. i would love when they would have a talk with some users to upgrade the manual.

     
  • craigchamberlin - 2013-08-06

    Thank you for taking the time to reply to my question.

    Your instructions on building function blocks worked really well.

    We will eventually look into making our own libraries but for now we will simply export the objects as you suggested.

    The documentation doesn't really have much practical application to it. It would be nice if there were sample programs that could be viewed, compiled and executed so that we can learn from them. The in the IT programming world this practice is well established. Users are walked through a basic hello world (output application) and then walked through basic variable declaration, program execution and mathematical functions.

    I'm surprised CoDeSys hasn't really hammered any of these out yet. If I had the expertise, I would do it myself, but I am just starting to learn. Getting ahold of decent documentation seems to be extremely difficult at this time.

     

Log in to post a comment.