CanBerry with Codesys

It is possible to use Codesys to control the can bus on Raspberry. If you want to use this, simply follow the steps below.

Iso preparation:

  1. Download and Install CODESYS Control for Raspberry Pi SL at the following link: http://store.codesys.com/codesys-control-for-raspberry-pi-sl.html
  2. Edit the config.txt in the boot SD card
  3. Uncomment the line dtoverlay=mcp2515-can0-overlay,oscillator=16000000,interrupt=22 for CanBerryNormal, Isolated and CanBerryDual
  4. Uncomment the line dtoverlay=mcp2515-can1-overlay,oscillator=16000000,interrupt=25 only for CanBerryDual
  5. SAVE
  6. Download the canberry-codesys.tar to raspberry
  7. Decompress it by using the command: tar –xvf canberry-codesys.tar
  8. Go to folder canberry-codesys
  9. Edit the file canberry-codesys.sh by using the command: nano canberry-codesys.sh
  10. Comment or uncomment the lines according to your type of canberry board
  11. Save the file and run the command: : sudo sh canberry-codesys.sh
  12. Open the codesys project: canberry_project.project
  13. Connect with raspberry as is shown in the Video:

4 comments

      1. thank you for your respons.
        I’m currently trying to get communication with canberry dual with codesys but i get the errorcode 521 with socketconnect function. Any idea why?

        Thanks in advance,

        Jeremy

Leave a Reply

Your email address will not be published. Required fields are marked *