Difference between revisions of "CAN Protocol"
Line 1: | Line 1: | ||
− | ''' | + | '''Searching for igus Rebel robot or joints docs? Then please go to this page: [[Rebel Joint]] for specific documentation!''' |
Commonplace Robotics uses the CAN field bus to send position set point values from the robot controller to the joint modules. The applied protocols are custom, but quite simple. | Commonplace Robotics uses the CAN field bus to send position set point values from the robot controller to the joint modules. The applied protocols are custom, but quite simple. |
Revision as of 15:31, 28 April 2022
Searching for igus Rebel robot or joints docs? Then please go to this page: Rebel Joint for specific documentation!
Commonplace Robotics uses the CAN field bus to send position set point values from the robot controller to the joint modules. The applied protocols are custom, but quite simple.
Two version are used
- CPRCAN: 16 bit position data used for Mover4 and Mover6 robots and Slider platforms
- CPRCANV2: 32 bit position data used for SRA and Mover6-2016 (understands both, CPRCAN and CPRCANV2) robots.
The position set point messages have to be send in a loop with e.g. 20 Hz. The application has to verify that this loop has a constant cycle time. If the jitter is too big the motion control modules might get into a communication loss error state. Additionally the application has to send state change messages like reset-all-errors and enable-motors.
The joint modules answer with an error code that provides the current state.
CPR CAN Documentation and Demo Code
- Documentation: CAN protocol documentation
- Linux examples: C sources can be downloaded at www.github.com/CPR-Robots
- C# demo: Source code for Visual Studio Express 2012
- The example code builds on the PCAN basic API, mirror to communicate via the PCAN-USB adapter. The documentation for the API can be found in chapter 5 of the PCAN-USB Manual, mirror
Currently we are updating the example source code to the cprcanv2 protocol. Please get in contact if you need these sources.
CAN Hardware / Drivers
Most robots and control electronics are usually supplied with a white PCAN USB adapter. The robolink DCi robots are not supplied with a CAN adapter as the communication between PC and robot is via Ethernet and a CAN adapter is not required for operation and programming of the robot.
If you have a black PCAN adapter, get in touch with us. The following driver links will likely not work for you.
for Windows 10, 8.1, 7 (32/64-bit)
The PCAN USB Windows driver for the adapter can be found on the CPRog installation CD, if supplied, or downloaded here:
- PCAN Windows driver, mirror
- PCAN USB Manual, mirror
- CAN Bus Monitor for debugging PCAN View, mirror
for Linux
For the ROS environment a Linux driver is required. It can be found here:
- If you use ROS with example code from our git repos, you will notice that the documentation of the ROS repos will refer to this version of the driver PEAK-Linux-driver-7.10, mirror. This is what we tested our code with.
- For installation instructions have a look at section 4 in this document
- Manual, mirror
- Latest driver for Linux (still untested with our example code)
- Since mainline kernel 3.4, the driver is part of the kernel. However, we have not fully tested our code with this driver yet. It is on the "to do" list.
- PCAN offers a separate driver as well: https://www.peak-system.com/fileadmin/media/linux/files/peak-linux-driver-8.5.1.tar.gz PEAK Linux driver 8.5.1], mirror
- Manual, mirror.
- For installation instructions, please refer to the manual linked above.