Difference between revisions of "CAN Protocol"
m (Text updated) |
|||
(28 intermediate revisions by 3 users not shown) | |||
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. | |
− | |||
− | + | =Protocol versions= | |
+ | * CPRCAN: 16 bit position data. Used for Mover4 and Mover6 robots and Slider platforms | ||
+ | * CPRCANv2: 32 bit position data. Used for SRA, Mover6-2016 (understands both, CPRCAN and CPRCANV2) and all stepper based robots. | ||
+ | * CPRCANv3: 16 bit motor current values and new firmware parameter messages. Used for BLDC controls including [[Igus ReBeL|igus ReBeL arms]]. Follow the CPRCANv2 examples since the protocol is mostly the same. | ||
− | + | The position set point messages have to be send in a loop at a constant frequency of e.g. 10 or 20 Hz. If the jitter is too big the motion might not be smooth or the communication (timeout) error may occur. Additionally the application has to send state change messages like reset errors and enable motors. | |
− | |||
− | |||
− | |||
− | |||
− | |||
− | + | The modules answer the position or IO state message with position/input states and an error code that provides the current state. | |
− | |||
− | |||
− | |||
− | |||
− | |||
− | = | + | =CPR CAN Documentation and Demo Code= |
− | + | * Documentation | |
− | * | + | ** [[Rebel_Joint|CANv2/CANv3 protocol specification]] |
− | + | ** [http://www.cpr-robots.com/download/CAN/UserGuide_ProtocolCPRCAN.pdf CANv1/CANv2 documentation] | |
− | **[ | ||
− | * | + | * Example source code |
− | **https:// | + | ** [https://github.com/CommonplaceRobotics/CANV2ProtocolDemoClient CANv2 example source code in C# for Windows] |
− | *[ | + | *** If you do not need motor current values you can use this example for CANv3 without any changes |
− | + | ** [https://github.com/CPR-Robots/Mover4 CANv1 example source code in C++ for Linux] (deprecated) | |
+ | ** [http://www.cpr-robots.com/download/CAN/CPRMoverDemoCSharp.zip CANv1 example source code in C# for Windows] for Visual Studio Express 2012 (deprecated) | ||
+ | =CAN Hardware / Drivers= | ||
+ | Most robot controls from Commonplace Robotics come with an embedded control computer, in which case you do not need to access the CAN protocol, use the [[Control Interfaces|high level control interfaces]] instead. For robot controls without embedded control computer, e.g. the [[igus ReBeL|igus ReBeL Open Source version]] or separate ReBeL joints we recommend using the [https://www.peak-system.com/PCAN-USB.199.0.html PCAN USB adapter]. This adapter is supported by our support tools (e.g. [[Module Control]] for configuring joints) and example source code. We recommend not to use other adapters since we will not be able to support you. | ||
[[Category:Downloads]] | [[Category:Downloads]] |
Latest revision as of 13:11, 27 March 2025
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.
Protocol versions
- CPRCAN: 16 bit position data. Used for Mover4 and Mover6 robots and Slider platforms
- CPRCANv2: 32 bit position data. Used for SRA, Mover6-2016 (understands both, CPRCAN and CPRCANV2) and all stepper based robots.
- CPRCANv3: 16 bit motor current values and new firmware parameter messages. Used for BLDC controls including igus ReBeL arms. Follow the CPRCANv2 examples since the protocol is mostly the same.
The position set point messages have to be send in a loop at a constant frequency of e.g. 10 or 20 Hz. If the jitter is too big the motion might not be smooth or the communication (timeout) error may occur. Additionally the application has to send state change messages like reset errors and enable motors.
The modules answer the position or IO state message with position/input states and an error code that provides the current state.
CPR CAN Documentation and Demo Code
- Documentation
- Example source code
- CANv2 example source code in C# for Windows
- If you do not need motor current values you can use this example for CANv3 without any changes
- CANv1 example source code in C++ for Linux (deprecated)
- CANv1 example source code in C# for Windows for Visual Studio Express 2012 (deprecated)
- CANv2 example source code in C# for Windows
CAN Hardware / Drivers
Most robot controls from Commonplace Robotics come with an embedded control computer, in which case you do not need to access the CAN protocol, use the high level control interfaces instead. For robot controls without embedded control computer, e.g. the igus ReBeL Open Source version or separate ReBeL joints we recommend using the PCAN USB adapter. This adapter is supported by our support tools (e.g. Module Control for configuring joints) and example source code. We recommend not to use other adapters since we will not be able to support you.