Difference between revisions of "CRI Ethernet Interface"

From Wiki
Line 1: Line 1:
The CRI interface allows remote applications to connect to a CPR robot controller (CPRog or TinyCtrl).  
+
The CRI ethernet interface allows remote applications to connect to a robot controller: iRC, CPRog or the embedded control.  
 
   
 
   
 
[[File:CRI-robolink.JPG|600px|CRI-Interface]]
 
[[File:CRI-robolink.JPG|600px|CRI-Interface]]
Line 6: Line 6:
 
* Jog the robot arm in joint space or cartesian space (base or tool coordinate system xyzabc)
 
* Jog the robot arm in joint space or cartesian space (base or tool coordinate system xyzabc)
 
* Send commands: joint motion, linear motion, digital outputs, ...  
 
* Send commands: joint motion, linear motion, digital outputs, ...  
 +
* Change variables
 
* Start and stop programs. These can be stored programs or the commands just send.
 
* Start and stop programs. These can be stored programs or the commands just send.
  
 
==Requirements==
 
==Requirements==
* CPRog version V902-08-013 or higher (Updates can be found here: [[CPRog Updates]]) or a TinyCtrl embedded robot controller
+
* iRC / CPRog version V902-11-011 or higher, Embedded Control with TinyCtrl version V980-11-087 or higher (Updates can be found here: [[CPRog Updates]])
  
 
==Documentation and Example==
 
==Documentation and Example==
 
* Documentation: [http://www.cpr-robots.com/download/CRI/CPR_RobotInterfaceCRI.pdf CRI Interface Documentation]  
 
* Documentation: [http://www.cpr-robots.com/download/CRI/CPR_RobotInterfaceCRI.pdf CRI Interface Documentation]  
* Example code CRI client: [http://www.cpr-robots.com/download/CRI/CRI_Client.zip C# source code] in Visual Studio Express 2012 and the 2015 Visual Studio Community Edition. Other versions untested. The code shows how to connect, how to send the control commands  and how to parse the robots answers. For a stable operation of course more means regarding e.g. fault detection and error recovery have to be taken. Do read the documentation in the link above.
+
* Example code CRI client: [https://github.com/CommonplaceRobotics/CRI-DemoClient Repository with C# source code] in Visual Studio Express 2019 Community Edition. The code shows how to connect, how to send the control commands  and how to parse the robots answers. For a stable operation of course more means regarding e.g. fault detection and error recovery have to be taken. Do read the documentation in the link above.
<!--
+
 
==Getting started==
 
IP addresses are:
 
*Local host:                127.0.0.1
 
*TinyCtrl on Phytec board:        192.168.3.11,  login as root without password
 
-->
 
 
===CProg and iRC specific settings===
 
===CProg and iRC specific settings===
 
The new Version of CPRog and TinyCtrl (V902-11-007 and above) allow to configure the CRI interface in the backstage menu. Press File/Interface Configuration/CRI Interface (Datei/Schnittstellenkonfiguration/CRI-Schnittstelle).
 
The new Version of CPRog and TinyCtrl (V902-11-007 and above) allow to configure the CRI interface in the backstage menu. Press File/Interface Configuration/CRI Interface (Datei/Schnittstellenkonfiguration/CRI-Schnittstelle).
  
These settings do not replace the Documentation in the link above, they merely allow you to get started quickly.
 
* [[Robot Files and Project Files|Find]] the Project file for your robot and change the line starting with CRIServer Active to this:
 
<CRIServer Active="True" ServerIP="127.0.0.1" Definitions=" " Debug="True"/>
 
* Save and Start CPRog, ensure that the correct Project file is loaded.
 
* Compile and start the Example program. In the example Program, enter the IP 127.0.0.1 and click on "Connect to CRI server".
 
* The example code does not have a button connects CPRog to the Robot. This can be done by hand in CPRog. Alternatively the Project file can be edited, so that CPRog auto-connects on startup. This is accomplished by enabling the [[PLC Interface]]. As a side effect this configures the DIO module as described on the page [[PLC Interface]]. In order to free up the DIO channels, you could set them to numbers outside of your DIO channel range, e.g. if you have a single DIO module, you could use channels 30, 31 and 32 so the the PLC interface section looks like this:
 
<PLCInterface Active="True" AutoConnect="True"/>
 
<PLCInterfaceIn EnableNumber="30" RequestReferenceNumber="31" PlayNumber="32"/>
 
<PLCInterfaceOut NoFaultNumber="31"  ProgramRunningNumber="32"  RobotIsReferenced="30"/>
 
*Start the Robot, the CPROg Software, and then the Example code. CPRog will now connect to the robot automatically.[[file:CRI-autoconnectCPRog.png|frameless|300px]]
 
*In the Example Program, enter 127.0.0.1 at the top left under Remote Control
 
*Now hit "Connect" to Establish a connection between the Example Program and CPRog. [[file:CRI-connect-to-CPRog.png|frameless|300px]]
 
*Click "Reset" and "Enable" to reset all errors and enable the motors.
 
* Now you can move the robot using the A1, A2,... buttons.
 
  
 
[[Category:Downloads]]
 
[[Category:Downloads]]

Revision as of 09:37, 6 July 2020

The CRI ethernet interface allows remote applications to connect to a robot controller: iRC, CPRog or the embedded control.

CRI-Interface

The remote application can request the following operations:

  • Jog the robot arm in joint space or cartesian space (base or tool coordinate system xyzabc)
  • Send commands: joint motion, linear motion, digital outputs, ...
  • Change variables
  • Start and stop programs. These can be stored programs or the commands just send.

Requirements

  • iRC / CPRog version V902-11-011 or higher, Embedded Control with TinyCtrl version V980-11-087 or higher (Updates can be found here: CPRog Updates)

Documentation and Example

  • Documentation: CRI Interface Documentation
  • Example code CRI client: Repository with C# source code in Visual Studio Express 2019 Community Edition. The code shows how to connect, how to send the control commands and how to parse the robots answers. For a stable operation of course more means regarding e.g. fault detection and error recovery have to be taken. Do read the documentation in the link above.

CProg and iRC specific settings

The new Version of CPRog and TinyCtrl (V902-11-007 and above) allow to configure the CRI interface in the backstage menu. Press File/Interface Configuration/CRI Interface (Datei/Schnittstellenkonfiguration/CRI-Schnittstelle).