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 Fri Nov 15, 2019 8:59 pm

All times are UTC+01:00




Post new topic  Reply to topic  [ 1 post ] 
Author Message
 Post subject: CAN through PI2
PostPosted: Wed Apr 20, 2016 2:20 pm 
Offline

Joined: Thu Feb 11, 2016 4:06 am
Posts: 38
So I've been trying to use CANbus J1939 through my PI2 but have been having some issues integrating it into Codesys.

Initially I wanted to test just my hardware to make sure there was an operating communication port between my PI and Can network.
I have the exact same hardware and followed this write up to a tee except i used a bitrate of 250000 and not 125000. https://www.raspberrypi.org/forums/viewtopic.php?f=44&t=141052 and everything worked perfectly when I issued a candump command. I was able to view all the canbus traffic.

So now I'm at the point where I wanted to use the canbus interface through codesys. I've looked at the other posts on this forum regarding integrating Canbus into codesys but they all used older versions of both codesys and the raspian kernal. With the newer versions, I believe there is less raspian code modification required to get this working but I am unable to determine exactly what I need to modify.

So I initially started by following the details in the link above and added to the /etc/network/interfaces to start the interface on boot up:

auto can0
iface can0 can static
bitrate 250000

When I started codesys and added the j1939 interface, the software said everything was running but I was unable to recieve any data.

I am at a point where I know the hardware and network is working but i need to integrate the canbus into codesys. Can anyone provide some assistance?


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

All times are UTC+01:00


Who is online

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