<?xml version="1.0" encoding="utf-8"?>
<feed xml:lang="en" xmlns="http://www.w3.org/2005/Atom"><title>Recent posts to Low Level Can Communication Driver from scratch</title><link href="https://forge.codesys.com/forge/talk/CODESYS-V2/thread/dc1b0be745/" rel="alternate"/><link href="https://forge.codesys.com/forge/talk/CODESYS-V2/thread/dc1b0be745/feed.atom" rel="self"/><id>https://forge.codesys.com/forge/talk/CODESYS-V2/thread/dc1b0be745/</id><updated>2020-02-27T23:12:20.627000Z</updated><subtitle>Recent posts to Low Level Can Communication Driver from scratch</subtitle><entry><title>Low Level Can Communication Driver from scratch</title><link href="https://forge.codesys.com/forge/talk/Codesys%2520V2.3/thread/dc1b0be745/?limit=25#6e77" rel="alternate"/><published>2020-02-27T23:12:20.627000Z</published><updated>2020-02-27T23:12:20.627000Z</updated><author><name>vincido</name><uri>https://forge.codesys.com/u/vincido/</uri></author><id>https://forge.codesys.com6f253fc777fe0c28dd917ef40cce756961f0f8e2</id><summary type="html">&lt;div class="markdown_content"&gt;&lt;p&gt;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!&lt;br/&gt;
At the end the problem was in the device and not in the CodeSys development system.&lt;br/&gt;
Regards D&lt;/p&gt;
&lt;p&gt;&lt;img alt="IMG: sshot.png" rel="nofollow" src="https://forum.codesys.com//download/file.php?id=2468"/&gt;&lt;/p&gt;&lt;/div&gt;</summary></entry><entry><title>Low Level Can Communication Driver from scratch</title><link href="https://forge.codesys.com/forge/talk/Codesys%2520V2.3/thread/dc1b0be745/?limit=25#dec6" rel="alternate"/><published>2020-02-27T23:12:14.810000Z</published><updated>2020-02-27T23:12:14.810000Z</updated><author><name>vincido</name><uri>https://forge.codesys.com/u/vincido/</uri></author><id>https://forge.codesys.com28ac1f3676d34ae6131e0b472f1dc6ea8181c0dd</id><summary type="html">&lt;div class="markdown_content"&gt;&lt;p&gt;Hello,&lt;br/&gt;
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.&lt;br/&gt;
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.&lt;br/&gt;
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.&lt;br/&gt;
Just to better explain, if I send from the client the CanID 0x18FF4400  what I get in the pMessageRx.dwID is 0x0000063F.&lt;br/&gt;
Can anyone tell me how to set the 3S_CanDrv to handle 29bits CanID (Can 2.0B)?&lt;/p&gt;
&lt;p&gt;The can driver documentation is really poor and I didn't find any solution after an hard search over internet.&lt;/p&gt;
&lt;p&gt;Thank you, Domenico&lt;/p&gt;
&lt;p&gt;&lt;img alt="IMG: CanIDTest.png" rel="nofollow" src="https://forum.codesys.com//download/file.php?id=2350"/&gt;&lt;/p&gt;&lt;/div&gt;</summary></entry></feed>