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 Wed Dec 19, 2018 4:26 pm

All times are UTC+01:00




Post new topic  Reply to topic  [ 6 posts ] 
Author Message
PostPosted: Tue Apr 24, 2018 4:41 am 
Offline

Joined: Tue Mar 13, 2018 8:26 am
Posts: 14
Dear all,

I would like to use Shared memory to exchange data between CodeSys and C++ app. However, I realized the speed of communication is very slow.
Every 50ms, I write data from C++ to memory and Codesys read it, but Codesys missed data in some period cycle.
Does anyone know how speed of this kind of exchange data using shared memory? Please help me, I would very appreciate and welcome your helps.

Thank you,


Top
   
PostPosted: Tue Apr 24, 2018 6:29 am 
Offline
Site Admin

Joined: Mon Sep 05, 2005 9:42 am
Posts: 3025
Hi,
we need more Information:
On which plc are you doing this?
This should work way faster.
BR
Edwin


Top
   
PostPosted: Thu Apr 26, 2018 3:04 am 
Offline

Joined: Tue Mar 13, 2018 8:26 am
Posts: 14
Hi Mr. Edwin Schwellinger,

I use Codesys Control RTE SL which is in following link:
https://store.codesys.com/codesys-contr ... __store=en

Anyway, could you please let me know which is fastest way to exchange data between PLC and C++ applicaiton?

Best regards,
Mr. PHUC


Top
   
PostPosted: Wed May 02, 2018 10:55 am 
Offline
Site Admin

Joined: Mon Sep 05, 2005 9:42 am
Posts: 3025
Hi,
yes ok should be way faster....

Are you using this example here?

https://store.codesys.com/shared-memory ... tml#System Requirements

BR
Edwin


Top
   
PostPosted: Wed May 02, 2018 4:29 pm 
Offline

Joined: Tue Mar 13, 2018 8:26 am
Posts: 14
Edwin Schwellinger wrote:
Hi,
yes ok should be way faster....

Are you using this example here?

https://store.codesys.com/shared-memory ... tml#System Requirements

BR
Edwin


Hi Mr. Edwin,

I made my code based on this example, but speed communication is very slow.
Can I use UDP to exchange data between C++ and PLC? What library should I use? I see that there are many library such as CAA net base, SysSocket,...

Best regards,
PHUC


Top
   
PostPosted: Wed Jul 11, 2018 3:31 pm 
Offline

Joined: Fri Dec 26, 2014 3:10 am
Posts: 45
Hi vmphuc,

I have done the similar project for share memory with VB. net, as my cycle time is about 10ms. And data will not lost.

to have this kind of share memory or udp data exchange is also depend how you structure the data you want to exchange.

You can always have a practice that also have a fix length data to transfer, then you can have a fast cycle time to exchange data.


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

All times are UTC+01:00


Who is online

Users browsing this forum: No registered users and 1 guest


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