A simple note as I could not find anything on the net.
An example of how to write digital outputs 1 to 16 in CanOPEN in PDO with “cansend” command on Linux.
ifconfig can0 down
ip link set can0 type can bitrate 500000
ip link set up can0
cansend can0 -i 0 0x0101
while [ 1 ]; do
cansend can0 -i 0x601 0x2f 0x00 0x62 0x01 0x01
sleep 0.1
cansend can0 -i 0x601 0x2f 0x00 0x62 0x01 0x02
sleep 0.1
cansend can0 -i 0x601 0x2f 0x00 0x62 0x01 0x04
sleep 0.1
cansend can0 -i 0x601 0x2f 0x00 0x62 0x01 0x08
sleep 0.1
cansend can0 -i 0x601 0x2f 0x00 0x62 0x01 0x10
sleep 0.1
cansend can0 -i 0x601 0x2f 0x00 0x62 0x01 0x20
sleep 0.1
cansend can0 -i 0x601 0x2f 0x00 0x62 0x01 0x40
sleep 0.1
cansend can0 -i 0x601 0x2f 0x00 0x62 0x01 0x80
sleep 0.1
cansend can0 -i 0x601 0x2f 0x00 0x62 0x01 0x00
sleep 0.1
cansend can0 -i 0x601 0x2f 0x00 0x62 0x02 0x01
sleep 0.1
cansend can0 -i 0x601 0x2f 0x00 0x62 0x02 0x02
sleep 0.1
cansend can0 -i 0x601 0x2f 0x00 0x62 0x02 0x04
sleep 0.1
cansend can0 -i 0x601 0x2f 0x00 0x62 0x02 0x08
sleep 0.1
cansend can0 -i 0x601 0x2f 0x00 0x62 0x02 0x10
sleep 0.1
cansend can0 -i 0x601 0x2f 0x00 0x62 0x02 0x20
sleep 0.1
cansend can0 -i 0x601 0x2f 0x00 0x62 0x02 0x40
sleep 0.1
cansend can0 -i 0x601 0x2f 0x00 0x62 0x02 0x80
sleep 0.1
cansend can0 -i 0x601 0x2f 0x00 0x62 0x02 0x00
sleep 0.1
done
SwitchBot 3 Pezzi Igrometro Termometro da Esterno, 120m Portata Bluetooth, Termoigrometro da Interno, Sensore di Rugiada/VPD/Umidità Assoluta, Esportazione Gratuita Dati
40% OffIP65 antipolvere/impermeabile, adatto per interni ed esterni: Il termometro da esterno è impermeabile e antipolvere IP65 e può funzionare in modo sicuro anche nei giorni di pioggia. Sono facili da usare, leggeri e portatili. Perfetto per cucine, bagn... read more