Base code for Sumitomos AGV, and companion app
Acronymn | Meaning |
---|---|
CAN | Controller Area Network |
CDM | CANopen Device Monitor |
CiA | CAN in Automation e.V. |
CMS | CAN Message Specification |
COB | Communication Object (CAN Message) |
COBID | Communication Object Identifier |
CRC | Cyclic redundancy check. Bit error protection method for data communication |
CSDO | Client SDO |
DAM | Destination Address Mode |
EDS | Electronic Data Sheet. This is a file with the device specific parameter description and is provided by the manufacturer of a DeviceNet or CANopen device. |
EMCY | Emergency Object |
HAL | Hardware Abstraction Layer |
ISR | Interrupt Service Routine |
LME | Layer Management Entity |
LMT | Layer Management |
LSS | Layer Setting Services |
MPDO | Multiplexed PDO |
NMT | Network Management |
OD | Object Dictionary |
PDO | Process Data Objects. They are messages in an unconfirmed service. They are used for the transfer of real-time data to and from the device. |
RPDO | Receive PDO |
RTR | Remote Transmission Request |
SAM | Source Address Mode |
SCT | Safeguard Cycle Time (CANopen Safety) |
SDO | Service Data Objects, messages in a confirmed service. They are used for the access of entries in the object dictionary. |
SRD | SDO Requesting Device |
SRDO | Safety Relevant Data Objects |
SRVT | Safety Relevant object Validation Time (CANopen Safety) |
SSDO | Server SDO |
SYNC | Synchronization Object (CANopen communication object) |
TIME | Time Stamp Object |
TPDO | Transmit PDO |
- Printer 2 USB cable
- Ginkgo CAN interface
-
Connect the driver to your computer
-
Use the terminal to list all your USB devices. Write down the device Bus XXX Device XXX and ID XXXX:XXXX (idVendor:idProduct)
lsusb
-
On the host device, create a filename called etc/udev/rules.d/10-GinkgoUSBCAN.rules.
- Write the following to the file:
SUBSYSTEMS=="usb", ATTRS{idVendor}=="0483", ATTRS{idProduct}=="0666", GROUP="jpc"
- Take into account the idVendor and idProduct listed on your USB Devices. And also, change the group your user belongs to.
whoami
groups
-
Once you've done that, execute:, where the 0XX is replaced by the Device shown in the listed USB devices
sudo udevadm info -a -p $(udevadm info -q path -n /dev/bus/usb/001/0XX)
-
After that a list of pci devices will be shown, look for the one that has as manufacturer: ViewTool. Copy it's device name, it's quotated. Mine is:
'/devices/pci0000:00/0000:00:08.1/0000:05:00.3/usb1/1-2'
-
Test the device
sudo udevadm test /devices/pci0000:00/0000:00:08.1/0000:05:00.3/usb1/1-2
-
If no errors are promted, you are good to go
-
Wake up the CAN service Source
sudo modprobe can-raw
sudo modprobe slcan
sudo slcand -o -s8 -t hw -S 3000000 /dev/ttyUSB0
sudo ip link set up slcan0
-
Remember to set correctly the transmission bitrate
SCII Command | CAN Bitrate |
---|---|
s0 | 10 Kbit/s |
s1 | 20 Kbit/s |
s2 | 50 Kbit/s |
s3 | 100 Kbit/s |
s4 | 125 Kbit/s |
s5 | 250 Kbit/s |
s6 | 500 Kbit/s |
s7 | 800 Kbit/s |
s8 | 1000 Kbit/s |
-
Go to the following website: http://viewtool.com/product/readmefirst/
-
Choose the file for your architecture and OS, then download it.
- As you decompress it, you'll realice it's a library object.
file.so
on Linux. - Save it under the /lib or /usr/lib folder, with a name that's easily recallable. I chose to create the folder viewtool_CAN, and moved the files there
- Source
- As you decompress it, you'll realice it's a library object.
-
Download the bootloader from the first link and make sure the driver was installed correctly
-
Download SocketCAN
- Since the file is a
file.ko
, that basically means it's a loadable kernel module - Follow this document to complete the installation
- Since the file is a
-
Download the library for the language you'll be using from
modinfo first_driver.ko
uname -r
dmesg | tail
https://manpages.ubuntu.com/manpages/bionic/man1/slcand.1.html
https://scratchrobotics.com/2019/07/03/how-to-enable-can-bus-on-nvidia-jetson-tx2-developer-board/
sudo jetson_clocks
sudo echo 255 > /sys/devices/pwm-fan/target_pwm
The SSH deamon is on by default on the Jetson
ssh-keygen
Codesys Edge Gateway Codesys control (CAN)