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 Dec 16, 2018 6:26 pm

All times are UTC+01:00




Post new topic  Reply to topic  [ 4 posts ] 
Author Message
PostPosted: Fri Nov 02, 2018 2:38 pm 
Offline

Joined: Mon Oct 29, 2018 5:06 pm
Posts: 9
Hi

I am using a Rpi3 with Stretch and a canberry dual HAT.

Canbus seems to be operating on the pi as per ifconfig and also using candump to monitor the traffic.
Attachment:
IMG_20181102_142301A.jpg


The canberry project appears to have loaded correctly into codesys.
Attachment:
Capture4.PNG


Could this also be an SPI speed issue somilar to another thread of mine?https://forum.codesys.com/viewtopic.php?f=21&t=9265 Except I have no idea where to change the clock speed this time.

I can see the webinterface but nothing changes.
Attachment:
Capture5.PNG


Thanks


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


Top
   
PostPosted: Tue Nov 06, 2018 1:42 pm 
Offline

Joined: Mon Oct 29, 2018 5:06 pm
Posts: 9
Seem to have got one stage furtehr. I wasn't using the RTC so did not enable I2C as the Can only uses SPI.

It is now working after enabling I2C.


Top
   
PostPosted: Fri Nov 16, 2018 11:43 am 
Offline

Joined: Mon Oct 29, 2018 5:06 pm
Posts: 9
The instructions on the canberry website are not fully correct certainly for Stretch:

https://www.industrialberry.com/?s=codesys&submit=Search

3 things need to be done: Line 3 one doesn't uncomment but one needs to insert the complete lines (also note that the word overlay is removed after the mcp2525-can0 and -can1

Insert the line dtoverlay=mcp2515-can0,oscillator=16000000,interrupt=22 for CanBerryNormal, Isolated and CanBerryDual
Insert the line dtoverlay=mcp2515-can1,oscillator=16000000,interrupt=25 only for CanBerryDual

After line 8, you must copy ALL the files in canberry-codesys folder (not the folder) to /home/pi

Also I2C needs to be activated even if you do not intend to use the RTC.

Once done it works as expected!


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


Top
   
PostPosted: Tue Nov 20, 2018 6:39 pm 
Offline

Joined: Mon Oct 29, 2018 5:06 pm
Posts: 9
Continuing with info I found as it may help others:

The demo that is provided for the caberry will not send.

You need cansend and this you download from http://www.skpang.co.uk/dl/can-test_pi2.zip These are teh CAN test programs provided for the pi-2 at skpang.co.uk

You will need to put them on the pi and copy the cansend file to /home/pi

In codesys you will need to add in front of the command cansend ./cansend cano or can1 depending on which interface you are using.


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  [ 4 posts ] 

All times are UTC+01:00


Who is online

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