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 Sun Aug 18, 2019 2:23 pm

All times are UTC+01:00




Post new topic  Reply to topic  [ 9 posts ] 
Author Message
PostPosted: Thu Apr 20, 2017 7:20 pm 
Offline

Joined: Tue Apr 05, 2016 12:36 pm
Posts: 16
I've contacted Logic Supply. CAN/serial cape has been discontinued. Any alternative produc to implement CAN with Codesys in a reliable way??


Top
   
PostPosted: Thu Apr 20, 2017 8:33 pm 
Offline
Site Admin

Joined: Mon Sep 05, 2005 9:42 am
Posts: 3384
Hi,

http://www.waveshare.com/rs485-can-cape.htm


BR
Edwin


Top
   
PostPosted: Mon Nov 12, 2018 10:44 pm 
Offline

Joined: Tue Mar 11, 2014 2:43 am
Posts: 15
Has anyone been able to get the WaveShare RS485/CAN Cape to work? I followed Edwins BB setup instructions, by:
1. Installing the RT kernel (4.18.16-bone-rt-r15)
2. Enabling the cape id BB-CAN1 in the /boot/uEnv.txt file. (Is this the right name for this cape?)
3. Editing /etc/init.d/cpufrequtils Governor to "performance"

I checked the salve device's baud rate (125kB) and device ID's are correct (id1). If I right-click on the CANopen Manager and scan for devices, it locks up Codesys.

CANbus is green, but the CANopen Manager never starts and stays orange. Device is always red.

On the device (WAGO 750-347 coupler) If I unplug the slave's cable I get the expected TX/RX error lights, but otherwise if I reboot slave after master is running, the RUN light blinks green slowly indicating pre-operational state. I believe it is seeing CAN messages otherwise it would not be in pre-operational state.

Any ideas what I'm doing wrong?

Here is a screenshot.


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


Top
   
PostPosted: Tue Nov 13, 2018 7:05 am 
Offline
Site Admin

Joined: Mon Sep 05, 2005 9:42 am
Posts: 3384
Hi Kurt,

two things to check:
1. does cansend / work under Linux (login by ssh)
Code:
cansend can0 123#12

2. Could you set the compiler option: CANOPEN_DEBUG
and check the plclogger for more information?

BR
Edwin


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


Top
   
PostPosted: Tue Nov 13, 2018 3:36 pm 
Offline

Joined: Tue Mar 11, 2014 2:43 am
Posts: 15
Thank you, I have completed those steps, here are the results;
When I put the wrong NodeID (intentionally) it gives the error wrong NodeID, which tells me CANopen messages are being sent. With the right NodeID, I get a SDO Read error. Below are my Slave devices SDOs, I do not see object 16#1000:16#00 mapped.


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


Top
   
PostPosted: Tue Nov 13, 2018 7:04 pm 
Offline
Site Admin

Joined: Mon Sep 05, 2005 9:42 am
Posts: 3384
Hi,
what happens if you do a slave 'scan' by rightclick on the CANopen Manager?
BR
Edwin


Top
   
PostPosted: Tue Nov 13, 2018 11:53 pm 
Offline

Joined: Tue Mar 11, 2014 2:43 am
Posts: 15
It locks up Codesys when I try to scan.


Top
   
PostPosted: Thu Nov 15, 2018 6:58 am 
Offline
Site Admin

Joined: Mon Sep 05, 2005 9:42 am
Posts: 3384
Hi,
check if from Linux cansend and receive work like expected with SocketCAN.
If this is the case the CODESYS side should work too.

BR
Edwin


Top
   
PostPosted: Thu Nov 15, 2018 11:16 pm 
Offline

Joined: Tue Mar 11, 2014 2:43 am
Posts: 15
Hello, I tried cansend can0 123#12 again. I have an o-scope attached to the TX pin, and see a flatline.
Does not appear to record any packets transmitted either, so must be a problem with this cape (which has very limited and old documentation)


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  [ 9 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