My aim is to establish CAN bus network using Raspberry Pi + MCP2515, programmed in CodeSYS.
On the hardware's side, I have connected the SPI pins of MCP2515 to the corresponding SPI pins of Raspberry Pi. As for the INT pin, I have connected it to GPIO25 (this comes after many posts mentioned the use of pin 25 for INT).
The GND and VCC for MCP2515 are connected to GND and 3.3V pin on Raspberry Pi.
I have seperately soldered a 5V connection to TJA1050 by etching out the bridging capacitor.
On the Linux side, I downloaded CAN utils, enabled corresponding overlays, and got the CANbus to working. It is fully functional.
I monitor the messages using PCAN USB Pro.
Now, the real problem is with CodeSYS library.
Everytime I attempt to configure the driver, the CL2 library either throws an "INTERNAL ERROR" or a "NO DRIVER" error!
I loaded every possible CMPManager file, every CodeSYSConfig file on Linux. However, the problem still persists.
I just don't understand what the real problem is.
Can somebody throw some light??
I will be greatly indebted.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Good morning everyone, could someone help me with a project where I use a Raspberry pi 3 with codesys and Powerlink Communication and now I need to add a canbus communication but I don't even know how I could add a driver for example usb-Can or some other device ? could someone help me with this question?
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
I have only theoretical knowledge. But, what you need is a Socket CAN
driver for your CAN device. The interface of the socket can driver then
needs to be up, wehn the runtime starts.
Hello everyone,
My aim is to establish CAN bus network using Raspberry Pi + MCP2515, programmed in CodeSYS.
On the hardware's side, I have connected the SPI pins of MCP2515 to the corresponding SPI pins of Raspberry Pi. As for the INT pin, I have connected it to GPIO25 (this comes after many posts mentioned the use of pin 25 for INT).
The GND and VCC for MCP2515 are connected to GND and 3.3V pin on Raspberry Pi.
I have seperately soldered a 5V connection to TJA1050 by etching out the bridging capacitor.
On the Linux side, I downloaded CAN utils, enabled corresponding overlays, and got the CANbus to working. It is fully functional.
I monitor the messages using PCAN USB Pro.
Now, the real problem is with CodeSYS library.
Everytime I attempt to configure the driver, the CL2 library either throws an "INTERNAL ERROR" or a "NO DRIVER" error!
I loaded every possible CMPManager file, every CodeSYSConfig file on Linux. However, the problem still persists.
I just don't understand what the real problem is.
Can somebody throw some light??
I will be greatly indebted.
Now, the Runtime info on CodeSYS says that a command can't be executed.
Can somebody tell me what's going on?
did you add in /etc/CODESYSControl_User.cfg
the sript is:
should be in /opt/codesys/scripts/rts_set_baud.sh
and need to be executable.
sudo chmod +x /opt/codesys/scripts/rts_set_baud.sh
BR
Edwin
Edwin,
I added everything you mentioned.
And, my Can bus works!
Thanks so much!!!
Good morning everyone, could someone help me with a project where I use a Raspberry pi 3 with codesys and Powerlink Communication and now I need to add a canbus communication but I don't even know how I could add a driver for example usb-Can or some other device ? could someone help me with this question?
I have only theoretical knowledge. But, what you need is a Socket CAN
driver for your CAN device. The interface of the socket can driver then
needs to be up, wehn the runtime starts.