This page shows an example program for the CPRog software v980-10-XXX
Demo - First Program
In this video we demonstrate the programming and control of a robolink DCi robot. The DCi is a compact robot with integrated electronics and a linux single board computer, so that once the program is written in CPRog on an external PC, the DCi can operate and run a program without any connection to an external PC: Robolink DCi Programming in CPRog. Programming of other robolink robots is identical but requires the external PC to remain connected during execution of the program.
Structured programming using Sub-Programs and Matrix Motion
The article Structured_Programming gives a short introduction on how to use sub-programs and the matrix command. A pick-and-place example can be downloaded there as well.
This example shows the manual approach of handling matrices using loop commands, please refer to the previous section for the integrated matrix command!
In order to grip work pieces form a rectangular tray one has to control the robot so that it moves a new position and then operates the gripper. The motions have to be carried out multiple times for multiple items on the matrix. To simplify setting up such a motion, CPRog can handle loops and subprograms. In this case once would program two loops: one that increment the x and y of the target position and a second loop that controls the gripping motion. Here some example code that accomplishes this task:
- Download the following xml files (right click, save as) and save both of them in the directory
- Load the
test.matrix.xmlprogram in CPRog by clicking on the folder symbol in the menu ribbon at the top right.
Please refer to the CPRog/iRC documentation for further information on the commands and variables.
- If the robot does not perform the complete pattern, please check if the motion might exceed the motion limits. This is shown in the log messages tab on the bottom of CPRog.
- Take a look at the variables in the "variables" tab on the bottom of CPRog. This often helps to find problems.
- Precision: If the real robot approaches the positions with offsets it might be necessary to perform a fine calibration. Please have a look at the according page Define the zero position offsets or get in contact!
For questions please get in contact