Welcome to our new forum
All users of the legacy CODESYS Forums, please create a new account at account.codesys.com. But make sure to use the same E-Mail address as in the old Forum. Then your posts will be matched. Close

Canberry Dual on Rpi3 - No data received or sent

Anerdgy
2018-11-02
2018-11-20
  • Anerdgy - 2018-11-02

    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.

    The canberry project appears to have loaded correctly into codesys.

    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.

    Thanks

    IMG: IMG_20181102_142301A.jpg

    IMG: Capture4.PNG

    IMG: Capture5.PNG

     
  • Anerdgy - 2018-11-06

    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.

     
  • Anerdgy - 2018-11-16

    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!

    IMG: Capture8.PNG

     
  • Anerdgy - 2018-11-20

    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.

    IMG: Codesys1.png

     

Log in to post a comment.