CODESYS - the IEC 61131-3 automation software

Welcome to the official CODESYS Forum
Deutsche Version English version russian version 
It is currently Mon May 29, 2017 12:15 pm

All times are UTC+01:00




Post new topic  Reply to topic  [ 2 posts ] 
Author Message
PostPosted: Wed Dec 07, 2016 8:50 am 
Offline

Joined: Sat Nov 19, 2016 8:41 am
Posts: 2
Hello,
I'm involved in the development of a CodeSys application where the external devices are interfaced by means of a Can bus communication; I'm in charge of the application layer development for a protocol very similar to the SAE J1939 one but with several customized messages. Our objective for this project is to rely on the CodeSys "3S_CanDrv.lib" library for the low level communication primitive (Initialization, Bus handshake, Read/Write message, ...) while we have to write the management code for the data contained in the messages by directly accessing the Rx/Tx buffers. I need to develop the code from scratch without chance to use third party libraries.
I successfully set a CAN communication channel between the PLC where CodeSys runs (master) and the device to be controlled (slave) and I'm able to read good data in the 3S_CanDrv.lib pCanRxBuffer Global Variable.
Anyway I'm stuck on a little problem. It seems that the 3S_CanDrv.lib is set to manage 11bits CanID while I need to manage 29bits CanID.
Just to better explain, if I send from the client the CanID 0x18FF4400 what I get in the pMessageRx.dwID is 0x0000063F.
Can anyone tell me how to set the 3S_CanDrv to handle 29bits CanID (Can 2.0B)?

The can driver documentation is really poor and I didn't find any solution after an hard search over internet.

Thank you, Domenico


You do not have the required permissions to view the files attached to this post.


Top
   
PostPosted: Fri Jan 20, 2017 9:31 am 
Offline

Joined: Sat Nov 19, 2016 8:41 am
Posts: 2
After an hard fight I discovered that the problem was due to a bug in the communication stack library. The CAN chip manufacturer issued an updated interface library that the PLC manufacturer linked in the firmware and now everything works like a charm!
At the end the problem was in the device and not in the CodeSys development system.
Regards D


You do not have the required permissions to view the files attached to this post.


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

All times are UTC+01:00


Who is online

Users browsing this forum: No registered users and 3 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