<?xml version="1.0" encoding="utf-8"?>
<feed xml:lang="en" xmlns="http://www.w3.org/2005/Atom"><title>Recent posts to CodeSYS CL2 library internal error for CAN on (Raspberry Pi + MCP2515)</title><link href="https://forge.codesys.com/forge/talk/Runtime/thread/6b9c71b7e5/" rel="alternate"/><link href="https://forge.codesys.com/forge/talk/Runtime/thread/6b9c71b7e5/feed.atom" rel="self"/><id>https://forge.codesys.com/forge/talk/Runtime/thread/6b9c71b7e5/</id><updated>2021-06-29T15:30:41.266000Z</updated><subtitle>Recent posts to CodeSYS CL2 library internal error for CAN on (Raspberry Pi + MCP2515)</subtitle><entry><title>CodeSYS CL2 library internal error for CAN on (Raspberry Pi + MCP2515)</title><link href="https://forge.codesys.com/forge/talk/Runtime/thread/6b9c71b7e5/?limit=25#d5de" rel="alternate"/><published>2021-06-29T15:30:41.266000Z</published><updated>2021-06-29T15:30:41.266000Z</updated><author><name>alexmserra</name><uri>https://forge.codesys.com/u/alexmserra/</uri></author><id>https://forge.codesys.comd6fdc64e6135dfaaef0a47c403ac41ef8dcf49fe</id><summary type="html">&lt;div class="markdown_content"&gt;&lt;p&gt;Good morning everyone, could someone help me with a project where I use a Raspberry pi 3 with codesys and Powerlink Communication and now I need to add a canbus communication but I don't even know how I could add a driver for example usb-Can or some other device ? could someone help me with this question?&lt;/p&gt;&lt;/div&gt;</summary></entry><entry><title>CodeSYS CL2 library internal error for CAN on (Raspberry Pi + MCP2515)</title><link href="https://forge.codesys.com/forge/talk/Runtime/thread/6b9c71b7e5/?limit=25#959c" rel="alternate"/><published>2020-02-27T17:02:19.927000Z</published><updated>2020-02-27T17:02:19.927000Z</updated><author><name>Kalyani-K</name><uri>https://forge.codesys.com/u/kalyani-k/</uri></author><id>https://forge.codesys.com7754cc361881fe1ce1a6c2f6e5253d4eddf9ebaf</id><summary type="html">&lt;div class="markdown_content"&gt;&lt;p&gt;Edwin,&lt;/p&gt;
&lt;p&gt;I added everything you mentioned.&lt;br/&gt;
And, my Can bus works!&lt;/p&gt;
&lt;p&gt;Thanks so much!!!&lt;/p&gt;&lt;/div&gt;</summary></entry><entry><title>CodeSYS CL2 library internal error for CAN on (Raspberry Pi + MCP2515)</title><link href="https://forge.codesys.com/forge/talk/Runtime/thread/6b9c71b7e5/?limit=25#8ff1" rel="alternate"/><published>2020-02-27T17:02:17.251000Z</published><updated>2020-02-27T17:02:17.251000Z</updated><author><name>eschwellinger</name><uri>https://forge.codesys.com/u/eschwellinger/</uri></author><id>https://forge.codesys.comccd0c6a9c46c9ff7ac1f96372f3136ce04664a26</id><summary type="html">&lt;div class="markdown_content"&gt;&lt;p&gt;did you add in /etc/CODESYSControl_User.cfg&lt;/p&gt;
&lt;div class="codehilite"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;span class="k"&gt;[CmpSocketCanDrv]&lt;/span&gt;
&lt;span class="na"&gt;ScriptPath&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s"&gt;/opt/codesys/scripts/&lt;/span&gt;
&lt;span class="na"&gt;ScriptName&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s"&gt;rts_set_baud.sh&lt;/span&gt;
&lt;/pre&gt;&lt;/div&gt;


&lt;p&gt;the sript is:&lt;/p&gt;
&lt;div class="codehilite"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;span class="err"&gt;\&lt;/span&gt;&lt;span class="o"&gt;#!/&lt;/span&gt;&lt;span class="n"&gt;bin&lt;/span&gt;&lt;span class="o"&gt;/&lt;/span&gt;&lt;span class="n"&gt;sh&lt;/span&gt;
&lt;span class="n"&gt;BITRATE&lt;/span&gt;&lt;span class="o"&gt;=`&lt;/span&gt;&lt;span class="n"&gt;expr&lt;/span&gt; &lt;span class="err"&gt;$&lt;/span&gt;&lt;span class="mi"&gt;2&lt;/span&gt; &lt;span class="err"&gt;\\&lt;/span&gt;&lt;span class="o"&gt;*&lt;/span&gt; &lt;span class="mi"&gt;1000&lt;/span&gt;&lt;span class="o"&gt;`&lt;/span&gt;
&lt;span class="n"&gt;ifconfig&lt;/span&gt; &lt;span class="err"&gt;$&lt;/span&gt;&lt;span class="mi"&gt;1&lt;/span&gt; &lt;span class="n"&gt;down&lt;/span&gt;
&lt;span class="n"&gt;echo&lt;/span&gt; &lt;span class="n"&gt;ip&lt;/span&gt; &lt;span class="n"&gt;link&lt;/span&gt; &lt;span class="k"&gt;set&lt;/span&gt; &lt;span class="err"&gt;$&lt;/span&gt;&lt;span class="mi"&gt;1&lt;/span&gt; &lt;span class="k"&gt;type&lt;/span&gt; &lt;span class="n"&gt;can&lt;/span&gt; &lt;span class="n"&gt;bitrate&lt;/span&gt; &lt;span class="err"&gt;$&lt;/span&gt;&lt;span class="n"&gt;BITRATE&lt;/span&gt;
&lt;span class="n"&gt;ip&lt;/span&gt; &lt;span class="n"&gt;link&lt;/span&gt; &lt;span class="k"&gt;set&lt;/span&gt; &lt;span class="err"&gt;$&lt;/span&gt;&lt;span class="mi"&gt;1&lt;/span&gt; &lt;span class="k"&gt;type&lt;/span&gt; &lt;span class="n"&gt;can&lt;/span&gt; &lt;span class="n"&gt;bitrate&lt;/span&gt; &lt;span class="err"&gt;$&lt;/span&gt;&lt;span class="n"&gt;BITRATE&lt;/span&gt;
&lt;span class="n"&gt;ifconfig&lt;/span&gt; &lt;span class="err"&gt;$&lt;/span&gt;&lt;span class="mi"&gt;1&lt;/span&gt; &lt;span class="n"&gt;up&lt;/span&gt;
&lt;/pre&gt;&lt;/div&gt;


&lt;p&gt;should be in /opt/codesys/scripts/rts_set_baud.sh &lt;br/&gt;
and need to be executable.&lt;br/&gt;
sudo chmod +x /opt/codesys/scripts/rts_set_baud.sh&lt;/p&gt;
&lt;p&gt;BR&lt;br/&gt;
Edwin&lt;/p&gt;&lt;/div&gt;</summary></entry><entry><title>CodeSYS CL2 library internal error for CAN on (Raspberry Pi + MCP2515)</title><link href="https://forge.codesys.com/forge/talk/Runtime/thread/6b9c71b7e5/?limit=25#c789" rel="alternate"/><published>2020-02-27T17:02:16.321000Z</published><updated>2020-02-27T17:02:16.321000Z</updated><author><name>Kalyani-K</name><uri>https://forge.codesys.com/u/kalyani-k/</uri></author><id>https://forge.codesys.com2fa323087ba01ed0ae08976cfdd6a778bb5a297b</id><summary type="html">&lt;div class="markdown_content"&gt;&lt;p&gt;Now, the Runtime info on CodeSYS says that a command can't be executed.&lt;br/&gt;
Can somebody tell me what's going on?&lt;/p&gt;
&lt;p&gt;&lt;img alt="IMG: forcodesysforum.jpg" rel="nofollow" src="https://forum.codesys.com//download/file.php?id=4750"/&gt;&lt;/p&gt;&lt;/div&gt;</summary></entry><entry><title>CodeSYS CL2 library internal error for CAN on (Raspberry Pi + MCP2515)</title><link href="https://forge.codesys.com/forge/talk/Runtime/thread/6b9c71b7e5/?limit=25#aef2" rel="alternate"/><published>2020-02-27T17:02:15.385000Z</published><updated>2020-02-27T17:02:15.385000Z</updated><author><name>Kalyani-K</name><uri>https://forge.codesys.com/u/kalyani-k/</uri></author><id>https://forge.codesys.com3cca5a6c68f693e8854e4bb36742b4c31682b11a</id><summary type="html">&lt;div class="markdown_content"&gt;&lt;p&gt;Hello everyone,&lt;/p&gt;
&lt;p&gt;My aim is to establish CAN bus network using Raspberry Pi + MCP2515, programmed in CodeSYS.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;On the hardware's side&lt;/strong&gt;, I have connected the SPI pins of MCP2515 to the corresponding SPI pins of Raspberry Pi. As for the INT pin, I have connected it to GPIO25 (this comes after many posts mentioned the use of pin 25 for INT).&lt;br/&gt;
The GND and VCC for MCP2515 are connected to GND and 3.3V pin on Raspberry Pi.&lt;br/&gt;
I have seperately soldered a 5V connection to TJA1050 by etching out the bridging capacitor.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;On the Linux side&lt;/strong&gt;, I downloaded CAN utils, enabled corresponding overlays, and got the CANbus to working. It is fully functional.&lt;br/&gt;
I monitor the messages using PCAN USB Pro.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Now, the real problem is with CodeSYS library.&lt;/strong&gt;&lt;br/&gt;
Everytime I attempt to configure the driver, the CL2 library either throws an &lt;strong&gt;"INTERNAL ERROR"&lt;/strong&gt; or a &lt;strong&gt;"NO DRIVER"&lt;/strong&gt; error!&lt;br/&gt;
I loaded every possible CMPManager file, every CodeSYSConfig file on Linux. However, the problem still persists.&lt;/p&gt;
&lt;p&gt;I just don't understand what the real problem is.&lt;/p&gt;
&lt;p&gt;Can somebody throw some light?? &lt;br/&gt;
I will be greatly indebted.&lt;/p&gt;&lt;/div&gt;</summary></entry></feed>