CODESYS - the IEC 61131-3 automation software

Welcome to the official CODESYS Forum by 3S-Smart Software Solutions GmbH | A member of the CODESYS Group
Deutsche Version English version russian version 
It is currently Sun Oct 20, 2019 9:53 am

All times are UTC+01:00




Post new topic  Reply to topic  [ 5 posts ] 
Author Message
PostPosted: Thu Jul 11, 2019 9:20 am 
Offline

Joined: Mon Feb 04, 2019 2:11 pm
Posts: 39
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 ?


Top
   
PostPosted: Thu Aug 01, 2019 12:26 pm 
Offline
Frequent User
Frequent User

Joined: Fri Feb 23, 2018 3:41 pm
Posts: 159
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.


Top
   
PostPosted: Thu Aug 01, 2019 1:58 pm 
Offline

Joined: Mon Feb 04, 2019 2:11 pm
Posts: 39
dFx wrote:
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


Top
   
PostPosted: Fri Aug 02, 2019 8:00 am 
Offline
Frequent User
Frequent User

Joined: Fri Feb 23, 2018 3:41 pm
Posts: 159
You changed the target arch going for RTE 64bits. Just stay in 32 bits then … https://store.codesys.com/codesys.html?___store=en#All%20versions


Top
   
PostPosted: Fri Aug 02, 2019 9:03 am 
Offline
Site Admin

Joined: Mon Sep 05, 2005 9:42 am
Posts: 3495
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


Top
   
Display posts from previous:  Sort by  
Post new topic  Reply to topic  [ 5 posts ] 

All times are UTC+01:00


Who is online

Users browsing this forum: No registered users and 9 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB® Forum Software © phpBB Limited