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 Interrutore Robot Intelligente - Controllo APP Bluetooth o Timer, Facile da Usare, Necessità SwitchBot Hub per Supportare Alexa, Google Home e il Telecomando, Automazione Domestica (Bianco)
25% OffUniversale - Funziona praticamente con qualsiasi interruttore e pulsante di qualsiasi apparecchio. Interruttore intelligente per la tua casa intelligente Timer - Usa l'App SwitchBot per programmare i timer integrati, senza telefono o Hub. Accendi e s... read more