Dear Colleagues,
there is a very nice post about how to setup Codesys as a CANopen Master, however I wonder if it is also that simple to use the RevPi Connect/RevPi Con CAN configuration as a CANopen Slave?
(The use case is to read data from the canbus (wheel sensors), calculate the control system in RevPi and send the calculated steering commands to the 3rd Party CANopen Master)
Thanks a lot!
Codesys as CANopen Master: https://revolution.kunbus.de/tutorials/ ... en-master/
(PS: I would like to buy your hardware as soon as possible, if it is possible to run it as CANopen Slave in Codesys)
RevPi as CANopen Slave in Codesys
Re: RevPi as CANopen Slave in Codesys
Hello,
Yes, CANopen Slave can also used with Codesys on RevPi Connect. The procedure for running RevPi Can Open Codesys Slave is similar to that of Master.
For Rev Pi Con Can Master Slave the following step for setting baud rate and enabling Con Can Module remains same.
sudo nano /var/opt/codesys/rts_set_baud.sh
#!/bin/sh
BITRATE=`expr $2 \\* 1000`
ifconfig $1 down
echo ip link set $1 type can bitrate $BITRATE
ip link set $1 type can bitrate $BITRATE
ifconfig $1 up
sudo chmod +x /var/opt/codesys/rts_set_baud.sh
sudo revpi-config enable revpi-con-can
The only difference then is to configure the Can Open slave in Codesys device tree.
Regards,
Amar
Yes, CANopen Slave can also used with Codesys on RevPi Connect. The procedure for running RevPi Can Open Codesys Slave is similar to that of Master.
For Rev Pi Con Can Master Slave the following step for setting baud rate and enabling Con Can Module remains same.
sudo nano /var/opt/codesys/rts_set_baud.sh
#!/bin/sh
BITRATE=`expr $2 \\* 1000`
ifconfig $1 down
echo ip link set $1 type can bitrate $BITRATE
ip link set $1 type can bitrate $BITRATE
ifconfig $1 up
sudo chmod +x /var/opt/codesys/rts_set_baud.sh
sudo revpi-config enable revpi-con-can
The only difference then is to configure the Can Open slave in Codesys device tree.
Regards,
Amar
KUNBUS