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

Library cmpErrors is only supported in 32bit applications

2 days ago
  • aliazzz

    aliazzz - 2018-09-21


    Anybody got a work-around or some solution for this?

    IMG: cmperrors interfaces error message 2018

  • eschwellinger

    eschwellinger - 2018-09-21

    use Systypes2Interfaces instead.

    IMG: Systypes2.png

  • aliazzz

    aliazzz - 2018-09-22

    Hi Edwin,

    Thanks for the hint. I have replaced "Systypes Interface" for "Systypes2 Interface" and did the same for some other libs/references which i found had this new *2 version.
    Also, some new bug popped up, seemingly from the SPI master of RPi package, please advice.

    Thank you

    IMG: SPI master errors 2018

  • aliazzz

    aliazzz - 2018-09-22

    Funny, these errors only occur when simulation is enabled. If simulation is disabled, these errors disappear! => problem solved ..

    It almost did the job, but can please explain in short why these libs are named *2?
    I can guess at reasons, but rather stick to know why hearing from 3S.

    IMG: No Simulation 2018

    IMG: Simulation 2018

  • eschwellinger

    eschwellinger - 2018-09-23

    apperently this is a known bug (at the moment) that in simulation on Raspberry PI and PFC200
    you'll see this error.
    The reason is: the simulation plc is if you use CODESYS 64Bit ( which maybe >90% of the users are doing) is
    a 64bit plc. So the code (your project and our/your drivers ) should be 64bit capable.

    That need to be fixed in this case on CODESYS side.

    SysTypes2 have been introduced for the 64bit plc's so we strongly recommend to write platform independet code which could run on 64Bit and 32bit Systems this measn all libs and applikationen should use SysTypes2 Library. ( not CmpError)
    This '2' is due compatibility reasons it is an Interface library which will pulled with newest.
    The second point you Need to take care on to be 64bit and 32bit capable is to use
    the datatypes __XWORD, etc...

    There will come up an article in the new faq shortly.


  • aliazzz

    aliazzz - 2018-09-23

    Hi Edwin,

    Thank you for the explanation! As I am not a system integrator, I don't have access to the Jira.
    Maybe you guys have some other way for us to look into the Jira? That will save you a lot of work

    Thank you!


  • Anonymous - 2019-06-28

    Originally created by: mg

    Hello Edwin

    Where I can find this promised faq.
    Please send a link


  • marsmännchen

    marsmännchen - 2020-08-28

    Hi, I have the same problem when i try to simulate with my PFC200.
    I'm using 3.5SP16 64-Bit. I already included the SysTypes2 Library but the simulation won't work.
    Do I need to deinstall the CmpError Library? I cant find it in the Library Tab.
    Does anyone have a hint for me?

  • eschwellinger

    eschwellinger - 2020-08-28

    you never need to deinstall any library in CODESYS:
    Just do the fowllowing:
    - Interfaces-Libs: use CmpError2 and SysTypes2 instead of CmpError and SysTypes, namespaces are the same but: RTS_INVALID_HANDLE is now in SysTypes and not in CmpErrors! There may be more interface libs that need to be raised. But give us a screenshot which errors you get.
    Replace 32 bit pointer variables by 64 bit (__XWORD or alias XWORD)



    Last edit: eschwellinger 2020-08-28
  • marsmännchen

    marsmännchen - 2020-08-28

    Ok, i installed the CmpError2 and SysTypes2.Then i clicked on "Update Device". Still won't work.Got the same fault.

  • yann2021

    yann2021 - 2021-05-13

    I'm facing out the same problem. Is there some news about this know problem because I actually can't use the Simulation! Can somebody help me?
    Many thanks!

  • marsmännchen

    marsmännchen - 2021-05-14

    Sorry, cant help you. Still have the same issue. Never found out how

    "Interfaces-Libs: use CmpError2 and SysTypes2 instead of CmpError and SysTypes, namespaces are the same but: RTS_INVALID_HANDLE is now in SysTypes and not in CmpErrors!"

    should be done.

  • i-campbell

    i-campbell - 2021-05-14

    Can someone please post one of these projects which still uses the cmpErrors?

  • yann2021

    yann2021 - 2 days ago

    Any news about this problem? Has somebody downloaded my projet to see the problem?

    • i-campbell

      i-campbell - 2 days ago

      Hello yann, there is actually a known bug with the SPI driver that it is not compatible with 64-bit simulation mode.

      I have shared your example project with the delevelopment team. In your case both the Raspberry Pi Peripherals library and the IoDrvPiFace library are not compatible.

      The libraries are open source, should any enterprising individual or team like to convert them so that they 'compile' in 64-bit simulation mode.
      You can find them both here:
      C:\Users\your_user_name\CODESYS Control for Raspberry PI\\Libraries

      Workarounds are of course to run it on an actual raspberry pi, or to run it in a 32-bit version of the IDE.


Log in to post a comment.