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 Apr 24, 2019 7:05 am

All times are UTC+01:00




Post new topic  Reply to topic  [ 65 posts ]  Go to page Previous 1 2 3 4 5
Author Message
 Post subject: Re: CAN trough SPI ?
PostPosted: Wed Oct 19, 2016 4:28 pm 
Offline

Joined: Mon Oct 17, 2016 1:49 pm
Posts: 3
I do have exactly the same problem, that I can not get CANopen running properly.

My setup is: 2x Raspberry Pi 3 with CanberryDual 2.1, connected to each other. SocketCAN is working properly and I can send CAN messages from one Raspberry Pi to the next and vice versa. Also in CodeSys, the SocketCAN driver is working properly as CAN messages are received if I configure one Pi as a CANopen slave that produces heartbeat messages.

What I did is configure one Pi as a CANopen slave, export the EDS file to the other Pi that adds this CANopen device.

However, the CANopen manager says it is not running. After added CANOPEN_DEBUG, I noticed in the PLC log that it remains stuck in the SDO exchange phase. The message is: SDO read timeout for object 16#1000sub16#00, AbortCode: 16#05040000.

Appreciated if someone can give some guidance what goes wrong here?


Top
   
 Post subject: Re: CAN trough SPI ?
PostPosted: Sun Oct 22, 2017 8:56 pm 
Offline

Joined: Sun Sep 24, 2017 6:53 pm
Posts: 18
Hello everybody,

first thank you very much for the fantastic descriptions.
I got everything running with J1939.
But why couldn't i get it running with CANOpen? Which CANOpen-Modul in Codesys do i have to choose.

Thanks for helping
Timo

_________________
Ich freue mich besonders über die Besucher auf meinem Blog die auch einen Kommentar hinterlassen...


Top
   
 Post subject: Re: CAN trough SPI ?
PostPosted: Fri Mar 02, 2018 5:57 pm 
Offline

Joined: Thu Jan 08, 2015 12:21 pm
Posts: 65
PI can success with NiRen Pi mcp2515... was one problem.. in /boot/config.txt
dtparam=spi=on
dtoverlay=mcp2515-can0,oscillator=8000000,interrupt=25
dtoverlay=spi1-2cs

I have 8Mhz oscill .. and maximum speed limit on Canopen 500kbs. For 1Mbs needed 16Mhz osill on canoprn board.. and chip selesct in my case 2nd dtoverlay=spi1-2cs

From another sime PC with Runtime and PeakUSB working fine. Pi was tested as salve and as master on canopen bus.

And have to connect 5V separate to TJA1050 as here descrbed. https://vimtut0r.com/2017/01/17/can-bus ... nel-4-4-x/


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


Top
   
 Post subject: Re: CAN trough SPI ?
PostPosted: Thu May 24, 2018 3:51 pm 
Offline

Joined: Thu May 03, 2018 11:58 pm
Posts: 1
[quote="yannickasselin1"]Hi everyone,

I followed all the steps above and CANbus and CANopen_manager seem to work fine but I still cannot communicate with my Festo Servo Drive through CANopen.
Can someone help me please.


Yannick, Did you ever resolve this problem? I am trying to do the exact same thing with RPI and 3 axis CMMP-AS. Please let me know if you did.


Top
   
 Post subject: Re: CAN trough SPI ?
PostPosted: Fri May 25, 2018 8:39 am 
Offline

Joined: Thu Jan 08, 2015 12:21 pm
Posts: 65
You can show screen with PDO and SDO configuration?


Top
   
Display posts from previous:  Sort by  
Post new topic  Reply to topic  [ 65 posts ]  Go to page Previous 1 2 3 4 5

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