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

Codesys Forge FAQ

Anonymous
2018-09-21
2018-09-22
  • Anonymous - 2018-09-21

    Originally created by: Viacheslav Mezentsev

    Which version of the Codesys IDE is the base for all projects (10.x, 11.x, 12.x or 13.x)? It seems to me that it is important to specify. Otherwise, users will not be able to open projects.

     
  • Ingo

    Ingo - 2018-09-21

    OK, didn't think about that rule, yet. I would expect no problems, as long as the users of the project have the most current version.

    But you are right, that libraries should always be stored with a specific project format when working with multiple people on it.

    Is that OK for you, if I document it Like that? Or did I get you wrong?

    BR,
    Ingo

    Gesendet von meinem LG-H870 mit Tapatalk

     
  • Anonymous - 2018-09-21

    Originally created by: Viacheslav Mezentsev

    I think that all developers should stick to one version of the development environment to avoid any confusion (not only for libraries). Users can use any version.
    In any case before download user must know project (library) format. This format must be one for target device (RPi3, ...).

     
  • aliazzz

    aliazzz - 2018-09-22

    As long as the used compiler version is mentioned in a project/lib, there should not be any issues for users as they know they will need to upgrade or not.
    Personally, I always use the newest available runtime in a library/project, as version freezing is not wise from a from security/bug fixes standpoint.
    Offcourse this approach has also got some downsides.

    So, specifying which current version is used will help the users.

     
  • Anonymous - 2018-09-22

    Originally created by: Viacheslav Mezentsev

    "used compiler version" and project file format are different things. You can use 3.5.10.0 version for compiler but 3.5.11.0 version for the project file format. I'm also suggest to choose minimal compiler version too.
    If you have an old working project for 3.5.10.0, then, I think, you will not rework it for each new Codesys IDE. Because it is dangerous.
    If you have Codesys 3.5.10.x you can't open 3.5.11.x (3.5.12.x, 3.5.13.x) projects. You must install new Codesys version, open project and save it as 3.5.10.x.

    I have experience developing libraries and projects as SDK. Support is difficult, if you do not use one format type.

     
  • aliazzz

    aliazzz - 2018-09-22

    Never too old to learn something new, as I did not realise this...
    In my experience, a .package in which all components are tuned to each other has proven a good way to deploy software to third parties.
    This offcourse is a different way alltogether.
    Ergo, we as developers can help to alleviate each other (and users) by sticking to some simple good practice points with regards to versioning.
    Keep in mind that these guidelines are not dogma's! Sticking by them helps mainly others, but if someone deviates from them its not a deal-breaker.
    Could you please bullet-point your good practices here? This so we can comment on them and slowly reach to some guidelines for cforge.

     
  • Anonymous - 2018-09-22

    Originally created by: Viacheslav Mezentsev

    Visualization Profile version important too.

    Also few things:
    - for RTS_IEC_HANDLE and RTS_IEC_RESULT types need to add SysTypes2 Interfaces (3.5.4.0);
    - if possible, use standard error codes (CmpErrors or CmpErrors2 Interfaces);
    - do not use dynamic memory (you can use it if you really need it);
    - use the ST language if possible;
    - for ST use the modern coding style (Steve McConnell "Code Complete");
    - document the source code (more comments);

     
  • aliazzz

    aliazzz - 2018-09-22

    Hi there,

    Good contributions, but not exactly what I expected.
    How about the versioning tips/bullits? We should start with crawling before we run

    Suggestion;
    We can start a WIKI in cforge called "Developer guide & tips" which can contain a compendium of good practices like versioning tips, coding style tips etc etc.

    Versioning tips;
    -All developers should stick to one version of the development environment to avoid any confusion (not only for libraries). Offcourse, users can use any version.
    In any case, the user must know project (library) format before download. This format must be one for target device (RPi3, ...).
    - "used compiler version" and "project file format" are different things. You can e.g. use 3.5.10.0 version as compiler but e.g. 3.5.11.0 version for the project file format.
    - As long as your project is not finished, stick to the chosen version of compiler and project format;
    - ;
    etc.

    Coding tips;
    - for RTS_IEC_HANDLE and RTS_IEC_RESULT types need to add SysTypes2 Interfaces (3.5.4.0);
    - if possible, use standard error codes (CmpErrors or CmpErrors2 Interfaces);
    - avoid using dynamic memory (the usage of __NEW operator);
    - use the ST language whenever possible (ST is by far the most versatile language, in which all operations, manipulations and functions are possible);
    - document the source code (add meaningful comments);
    codesys help - guidelines for creating libraries,
    They are pretty good but, but not as thorough as "code complete" but provide a very good starting point.
    Further reading: e.g. Steve McConnell "Code Complete";
    -;
    etc.

     
  • Anonymous - 2018-09-22

    Originally created by: Viacheslav Mezentsev

    It's hard to show which version and when to use. For example, if you use object-oriented programming (OOP), I recommend 3.5.10.0 or higher version for the compiler. This is because since this version, something related to properties has changed significantly.
    In general, it all depends on the version of runtime available for a specific target platform.

     
  • aliazzz

    aliazzz - 2018-09-22

    Zitat:
    For example, if you use object-oriented programming (OOP), I recommend 3.5.10.0 or higher version for the compiler. This is because since this version, something related to properties has changed significantly.

    • The general recommendation should be to pick the newest available version in which the target can programmed, simply because of security and bugfixes.
     
  • Ingo

    Ingo - 2018-09-22

    Very nice guys! Thanks for all this input.

    I know that all this is very difficult, as so many versions, which can be configured in CODESYS, can play a role in the experience everyone of us made once.

    But if you reflect, most of it is only a problem in an actual project, or when upgrading it.

    When it comes to library compatibility, the rule is really as easy as that:

    "The CODESYS version of the user should be greater or equal to the format of the library."

    Things like the Compiler Version, Visu Profile, etc. will usually be used from the final project, not from the library. I wrote "usually" as I have exceptions in mind, which count for compiled libs.

    But I think, that if we avoid compiled libs, this easy rule will apply (until you prove me wrong ).

    BTW: The idea to add a crowd sourced documentation section sounds great! I'll think about it.
    And if you have more ideas, or you find bugs, you can also add a ticket to the forge support tracker:
    https://forge.codesys.com/forge/support/

    Cheers,
    Ingo

    Gesendet von meinem LG-H870 mit Tapatalk

     

Log in to post a comment.