CANbus example on RaspberryPi programmed in CodeSYS (NOT USING SPI)

Kalyani-K
2019-07-10
2020-05-25
  • Kalyani-K

    Kalyani-K - 2019-07-10

    Hello all,

    I am implementing CAN bus on RaspberryPi-MCP2515 setup using CodeSYS.

    However, I am NOT implementing it using SPI.

    I want to be able to run CAN bus example directly on RaspberryPi and indeed, MCP2515.
    And so far, I have been able to do it on Linux.

    But, when I try running the CAN example program, CAN driver is NEVER created, because of which, any and every attempt to transmit a message returns an error message "CAN Driver Not Foud".

    What am I missing out on?
    How should I go about this problem?

    Any and every input is highly appreciated.

     
  • eschwellinger

    eschwellinger - 2019-07-11

    Hi,
    I would search this forum for
    rts_set_baud.sh this is what you need to add... based on socket can

    l viewtopic.php?t=8463#p20132 l
    BR
    Edwin

     
  • Kalyani-K

    Kalyani-K - 2019-07-18

    Checked!!
    Thanks so much!! I has helped me big time!

     
  • molarcheveque

    molarcheveque - 2020-05-25

    Hi,

    I'm also having the same problem. not able to have the CANbus working.
    I tried to add the to edit and add these lines at the bottom as you suggested.

    /etc/CODESYSControl_User.cfg

    CmpSocketCanDrv]
    ScriptPath=/opt/codesys/scripts/
    ScriptName=rts_set_baud.sh

    but still not working.

    I have a can Sensor installed on a Pican2 and I'm seeing the information/communication in Rpi terminal.
    so the CAN0 is properly working...

    what am I missing...?
    thanks for your help.

     

Log in to post a comment.