We have Raspberry PI with the MCP2518FD chip to connect with CAN-FD devices.
We already know that CodeSys doesn't support CAN-FD natively.
Linux System support this chip in kernel, CAN linux interface is visible.
We can operate with CAN-FD devices using cansend and canread commands.
We can also create own application using socketcan linux library, and averything works fine.
We need to pass CAN-FD frames TO and FROM CodeSys with about 1kHz frequency and low latency.
What is the best option to make this project as good as possible?
a) Try to read CAN-FD frames in external CPP application using socketcan and pass it to CodeSys using udp/serial/shared memory?
b) Somehow read frames directly in the CodeSys by creating own module?
c) use C extension module to get communication with CanFD using socketcan?
d) write MCP2518FD driver directly in CodeSys using SPI?
e) other?
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
If it is raspberry pi why not just modify
/opt/codesys/scripts
so it sets up with
ip link set DEVICE type can fd on
maybe CODESYS will work with that? I don't know but give it a try
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Hello @macieksz, did you find a solution to your requirement? I'd also like to get a CAN-FD operational on Raspberry Pi with CODESYS. Do you have any suggestions? Thanks.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
We have Raspberry PI with the MCP2518FD chip to connect with CAN-FD devices.
We already know that CodeSys doesn't support CAN-FD natively.
Linux System support this chip in kernel, CAN linux interface is visible.
We can operate with CAN-FD devices using cansend and canread commands.
We can also create own application using socketcan linux library, and averything works fine.
We need to pass CAN-FD frames TO and FROM CodeSys with about 1kHz frequency and low latency.
What is the best option to make this project as good as possible?
a) Try to read CAN-FD frames in external CPP application using socketcan and pass it to CodeSys using udp/serial/shared memory?
b) Somehow read frames directly in the CodeSys by creating own module?
c) use C extension module to get communication with CanFD using socketcan?
d) write MCP2518FD driver directly in CodeSys using SPI?
e) other?
If it is raspberry pi why not just modify
/opt/codesys/scripts
so it sets up with
ip link set DEVICE type can fd on
maybe CODESYS will work with that? I don't know but give it a try
Hello @macieksz, did you find a solution to your requirement? I'd also like to get a CAN-FD operational on Raspberry Pi with CODESYS. Do you have any suggestions? Thanks.
Unsuccessful. We use Can 2.0b
Many thanks for the response. I had come to a similar conclusion.
Last edit: eeyrsja 2022-12-22