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 mysql connection for free

2019-07-11
2019-08-02
  • mos89@yahoo.com - 2019-07-11

    Hi
    I found a sample programm done for raspberry Pi to connect to mysql DB:
    https://www.youtube.com/watch?v=CxTWELke8dU
    from PASK PLC

    I try to test it in my application on RTE 64 bit and i have some error on Precompile files
    C0032: Cannot convert type 'POINTER TO BYTE' to type 'DWORD'
    C0032: Cannot convert type 'POINTER TO BYTE' to type 'DWORD'
    C0032: Cannot convert type 'DWORD' to type 'POINTER TO BYTE'

    Any idea ?

     
  • dFx

    dFx - 2019-08-01

    That may be because DWORD is 32 bits, and you are working on 64bits version, which suppose that pointers are 64 bits long.
    Change for a 32 bit version or adapt the code to be 64 bits compatible.

     
  • mos89@yahoo.com - 2019-08-01

    dFx hat geschrieben:
    That may be because DWORD is 32 bits, and you are working on 64bits version, which suppose that pointers are 64 bits long.
    Change for a 32 bit version or adapt the code to be 64 bits compatible.

    hi,

    As i see each time there is an update code is not any more portable, i understand that 32 to 64 bit is a big change but the goal of codesys is to keep the code independant of hardware, or do i miss something

     
  • eschwellinger

    eschwellinger - 2019-08-02

    Hi,
    this has nothing to do with the CODESYS development system,
    I would recommend to use always the 64Bit Version for this.

    His problem is, that he try to use the RTE plc as 64bit version, as result he get this errors.
    probably these mysql libs need to be adapted to be platform indempendent (usable for 32bit and 64bit runtime systems)

    Use interface lib CmpError2 and SysTypes2 instead of CmpError and SysTypes, but namespaces are the same: RTS_INVALID_HANDLE is now in SysTypes and no longer in CmpErrors! There may be more interface libs that need to be raised.
    Replace 32 Bit Pointer Variables with 64 Bit (__XWORD or Alias XWORD)

    BR
    Edwin

     

Log in to post a comment.