Difference between revisions of "CRI Ethernet Interface"
From Wiki
Line 32: | Line 32: | ||
*In the Example Program, enter 127.0.0.1 at the top left under Remote Control | *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]] | *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:26, 17 May 2018
The CRI interface allows remote applications to connect to a CPR robot controller (CPRog or TinyCtrl).
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, ...
- Start and stop programs. These can be stored programs or the commands just send.
Requirements
- CPRog version V902-08-013 or higher (Updates can be found here: CPRog Updates) or a TinyCtrl embedded robot controller
Documentation and Example
- Documentation: CRI Interface Documentation
- Example code CRI client: 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.
CProg specific settings
- 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 PCL 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.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. 300px
- Click "Reset" and "Enable" to reset all errors and enable the motors.
- Now you can move the robot using the A1, A2,... buttons.