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

aliazzz
2018-09-21
2023-03-16
  • aliazzz

    aliazzz - 2018-09-21

    Hi,

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

    IMG: cmperrors interfaces error message 2018

     
  • eschwellinger

    eschwellinger - 2018-09-21

    Hi,
    use Systypes2Interfaces instead.
    BR
    Edwin

    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 3.5.13.0, please advice.

    Thank you

    IMG: SPI master errors 3.5.13.0 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

    Hi,
    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.

    BR
    Edwin

     
  • 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!

    Aliazzz

     
  • Anonymous - 2019-06-28

    Originally created by: mg

    Hello Edwin

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

    THANKS

     
  • 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?
    Greetings
    Patrick

     
  • 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)

    BR
    Edwin

     

    Last edit: eschwellinger 2020-08-28
  • 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.
    MfG
    Patrick

     
  • yann2021 - 2021-05-13

    Hello,
    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 - 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?
    Cheers,
    Ian

     
  • yann2021 - 2021-06-18

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

     
    • i-campbell

      i-campbell - 2021-06-18

      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\4.0.1.0\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.

       
      👍
      1
      • yann2021 - 2021-07-04

        Hello "i-campbell",
        Thank you for your answer.
        "The libraries are open source, should any enterprising individual or team like to convert them so that they 'compile' in 64-bit simulation mode."
        Unfortunately this is far away from my knowledge and capabilities. The libraries comes from 3S - Smart Software Solution GmbH. They should provide 64 bits compatible library with Codesys.

        Best regards
        Yann

         
        • erdemustunel - 2023-03-14

          Hello,
          is the problem solved , because I have faced this problem , and I can not progressing.

           
        • erdemustunel - 2023-03-14

          Hello,
          is the problem solved , because I have faced this problem , and I can not progressing.

           
  • eschwellinger

    eschwellinger - 2023-03-15

    if you use current version this should be solved ( working with PI and SPI)
    all others:
    https://faq.codesys.com/pages/viewpage.action?pageId=128253958

     
    • erdemustunel - 2023-03-16

      I will try this solution.
      Thank you Mr.eschwellinger , good things find you.

       

      Last edit: erdemustunel 2023-03-16
  • yann2021 - 2023-03-16

    Hello eschwellinger,
    Many thanks for this update. Now it's working, many thanks!☺

     

Log in to post a comment.