HOW TO USE THE 2-FINGER ADAPTIVE GRIPPER WITH UNIVERSAL ROBOTS CONTROLLER REVISION HISTORY Rev Date Author Comment V001 08-05-2013 J. Mangel & Initial creation N. Lauzier V002 28-06-2013 J. Mangel Few precisions concerning the installation V003 31-07-2013 C. Bernier Needed version of Polyscope revised (use version 1.7 or later) REFERENCE DOCUMENTS Document Location 2 TABLE OF CONTENT 1. SUMMARY ................................................................................................................................. 4 2. AVAILABLE FILES AND METHODOLOGY ...................................................................................... 4 3. HOW TO CONFIGURE THE PARAMETERS OF THE UNIVERSAL ROBOTS NETWORK WITH THE MODBUS I/Os OF THE ROBOTIQ GRIPPER ................................................................................. 5 4. USE OF OPEN AND CLOSE PROGRAMS AS SUBROUTINES ........................................................... 8 5. HOW TO KNOW THE POSITION OF THE ROBOTIQ GRIPPER’S FINGERS ..................................... 14 6. OBJECT DETECTION DURING THE OPENING AND CLOSING OF THE GRIPPER ............................ 15 7. USING SUBROUTINES WITH UNIVERSAL ROBOTS..................................................................... 18 3 1. SUMMARY This white paper describes the operating mode to use for the 2-Finger Adaptive Robot Gripper from Robotiq with the controller from Universal Robots (named Polyscope). The 2-Finger Adaptive Robot Gripper uses the Modbus TCP/IP communication protocol. Polyscope is also compatible with this protocol. Robotiq provides the configuration file for the inputs and outputs (I/Os). Therefore, the user has the possibility of applying subroutines which have been previously developed; such as open/close, go to a requested position, and apply speed and force parameters. These routines will allow the user to be able to manage object detection when the Gripper opens and closes. A script file will allow the user to know the position of the fingers. Two example programs are provided along with the description of their operations. 2. AVAILABLE FILES AND METHODOLOGY WARNING BEFORE STARTING Please disconnect the gripper’s USB to use it with the Universal Robots and reboot the Universal Robots’ controller Please use version 1.7 (or later) of the software Polyscope. Start by unzipping the file RQ_2FG_URobots.zip. Here is an overview of the files included: 4 Installation file of Modbus I/Os 3 programs: Open the Gripper (2 versions of the same operation, but using two different parameters) and Close the Gripper: RQ_2FG_Open, RQ_2FG_Open2 and RQ_2FG_Close. 1 script file: RQ_2FG_Activate_script.script for Gripper initialization (to be used before the 3 previous programs). 1 script file: RQ_2FG_Position_script.script. to be used in a thread to know the finger position in real time. 2 example programs: RQ_2FG_Closing_Detection_Demo and RQ_2FG_Pick&Place_Demo. You need to copy files in the Universal Robots controller. To achieve this, Universal Robots provide a file named “urmagic_upload_programs.sh”. All program, sript and installation files will be copied from a USB-stick onto the controller, to the programs folder, subfolders included. The following instructions explain how to upload files from USB to controller: 1. Copy ''umagic_upload_programs.sh'' file to the root of a USB-stick. 2. Copy program and installation files to the USB-stick. 3. Insert the USB stick in the USB-slot in teach pendant. 4. A red "! USB !" warning sign will appear indicating the upload is in progress. 5. Await a green "<- USB" sign appearing, indicating the upload is completed, it is now safe to remove the USB-stick. 3. HOW TO CONFIGURE THE PARAMETERS OF THE UNIVERSAL ROBOTS NETWORK WITH THE MODBUS I/Os OF THE ROBOTIQ GRIPPER When starting up Polyscope, click on 'SETUP Robot' and 'Setup NETWORK'. Fill in the parameters of the network to which the Gripper is connected and click on 'Apply settings‘. 5 When creating a new program, you must load the installation file with the Modbus parameters for the I/Os of the Gripper. To achieve this, go to the home page, click on 'PROGRAM Robot’ and click on ‘Load Program’ in the ‘Program’ tab, choose the file RQ_2FG_Installation.installation in the folder /Robotiq/2_Finger_Adaptive_Robot_Gripper. Then go to the ‘Modbus’ section of the ‘Installation’ tab, the digital I/Os (register bits) and the I/Os registers are configured automatically. NOTE : When editing a program, the appropriate installation file has not to be reloaded manually. A pop-up will inform you if you want to use the same settings. The previous selected installation file will be loaded by clicking the “Yes” button. 6 CAUTION: You need to set the IP address of the Robotiq Gripper on this page. You can manually change the refresh frequency of Modbus I/Os by clicking on the ‘Show advanced options’ checkbox. To know the digital I/Os’ status, and to set the digital outputs, go to the ‘Modbus’ tab of the ‘I/O’ tab. 7 Digital Outputs: Activate: Go_to_Requested: Auto_Release: bit n°0 (rACT) from the ACTION REQUEST register bit n°3 (rGTO) from the ACTION REQUEST register bit n°4 (rATR) from the ACTION REQUEST register Digital Inputs: Action_Status: Gripper_StatusX: Obj_Det_StatusX: bit n°3 (gGTO) from the GRIPPER STATUS register bits n°4 & 5 (gSTA) from the GRIPPER STATUS register bits n°6 & 7 (gOBJ) from the GRIPPER STATUS register 4. USE OF OPEN AND CLOSE PROGRAMS AS SUBROUTINES GRIPPER ACTIVATION In order to be able to use the OPEN and CLOSE programs; each time you start-up the main program you must: Either manually activate the Robotiq Gripper (Activate = True), reset the finger's movement (Go_to_Requested = False) by setting the digital outputs as such: 8 CAUTION: If this option is selected, please wait until the end of the Robotiq Gripper activation sequence (opening-closing-opening) before starting the program. Or Ioad the file RQ_2FG_Activate_script.script, in the folder /Robotiq/2_Finger_Adaptive_Robot_Gripper, at the beginning of the main program. To access this file in the previous directory, use the filter 'All Files', on the bottom of the 'Load Text File' page: 9 This script will launch the activation of the Gripper (Activate = True), wait until the end of its activation sequence before resetting the finger's movement (Go_to_Requested = False). This script can only be used once in the main program, for example, at the beginning of the program, but before the infinite loop (see the sample programs below). OPEN PROGRAM This program file is named RQ_2FG_Open and is located in the folder …/Robotiq/2_Finger_Adaptive_Robot_Gripper. This program allows the developer to manually change the motion settings of the Gripper by changing the following variables: Position_open, Speed_open and Force_open, which are accessible on the left in the 'Program' tab. 10 CAUTION : These values must be set between 0 and 255 Position_open: 0 equals the maximum opening value for the fingers and 255 is the Gripper closing value ; Speed_open/Force_open: 0 setting the minimum speed/force and 255 the maximum ; 11 CLOSE PROGRAM This program file is named RQ_2FG_Close and is located in the folder …/Robotiq/2_Finger_Adaptive_Robot_Gripper. This program allows the developer to manually change the motion settings of the Gripper by changing the following variables: Position_close, Speed_close and Force_close, which are accessible on the left in the 'Program' tab. CAUTION: These values must be set between 0 and 255 Position_close: 0 is the maximum opening of the fingers and 255 is the Gripper closing value ; Speed_close/Force_close: 0 setting the minimum speed/force and 255 the maximum; USING FUNCTIONS ACTIVATE, OPEN AND CLOSE IN A PROGRAM Polyscope allows you to use previously developed programs in the development of a new program. Here is an example program that shows you how the OPEN and CLOSE functions work as subroutines in a program: 12 13 DESCRIPTIONS: At the inception of the program, use the 'Script Code' and ‘SubProg’ structures in the 'Advanced' tab. Then, you have to select your desired files. At the execution of the program, the RQ_2FG_Activate_script.script script is run and the Gripper will be activated (if it is not already). Once the activation is complete, the program will run an infinite loop, set like this: Subroutines SubP_RQ_2FG_Open and SubP_RQ_2FG_Close will be run one after the other. Then, the Gripper will open and close continuously, regardless of whether an object is detected or not. 14 5. HOW TO KNOW THE POSITION OF THE ROBOTIQ GRIPPER’S FINGERS The Robotiq 2-Finger Adaptive Robot Gripper allows you to know the position of the Gripper’s fingers in real time. To do this, you have to use a thread (a program that runs in parallel with the main program). This structure is available in the 'Advanced' tab of the 'Structure' tab. The Gripper’s finger positions can be displayed in the 'Variables' tab. The relative value will be assigned to the selected variable, using the global variable RQ_2FG_Position (variable 'grip_position' is used in the example): 15 Note: The values for extreme positions on either end – opened or closed (0 or 255) – will never be reached because there are internal mechanical margins configured to avoid this (stop components). But, this does not affect the detection of objects. 6. OBJECT DETECTION DURING THE OPENING AND THE CLOSING OF THE GRIPPER The Robotiq 2-Finger Adaptive Robot Gripper allows for the detection of objects at the opening and closing of the Gripper’s fingers. The OPEN and CLOSE programs are designed to recognize object detection. Two booleans, Contact_opening and Contact_closing will automatically be recorded in the case of detection or not, during the execution of these programs. Please note that Contact_closing is not reliable for thin objects to avoid false detections when the fingers touch themselves. OPENING DETECTION During the execution of the OPEN program: If an object is detected, the global variable Contact_opening will be recorded as True. If an object is not detected, the global variable Contact_opening will be recorded as False. You can also test this variable in the main program to manage object detections by the Robotiq Gripper. 16 CLOSING DETECTION During the execution of the CLOSE program: If an object is detected, the global variable Contact_closing will be recorded as True. If an object is not detected, the global variable Contact_closing will be recorded as False. You can also test this variable in the main program to manage object detections by the Robotiq Gripper. USING SEVERAL SIMILAR OPEN AND CLOSE PROGRAMS AS SUBROUTINES WITH DIFFERENT PARAMETERS IN THE SAME PROGRAM You might want the Gripper to fit several different types of parts or pieces (different sizes, fragility, etc.) with the same main program. To avoid material damage or to gain execution time, the same subroutine can be used in your program, but with different parameters for: Position, Speed and Force. To do this you need to manually create a program matching your desired functions, but using a different name and different variables: First step: Copy the following files and rename them as desired. In this example, RQ_2FG_Open.urp et RQ_2FGOpen_script.script has been copied and renamed RQ_2FG_Open2.urp and RQ_2FGOpen_script2.script Second step: Open Polyscope and load the copied and renamed program (in this example, RQ_2FG_Open2.urp). To do this, open the programming page (home page and 'PROGRAM Robot' button), go to the 'Load / Save' section of the 'Installation' tab. Fill in the field for the file .urp: Then, choose the related copied and renamed program file. 17 Third step: Edit the copied and renamed program(s): o Rename Position_x, Speed_x and Force_ x variables (in this example, Position_open2, Speed_ open2 and Force_ open2) and change their values. Change the .script file of the Script structure. o To do this, remove the file named Script: RQ_2FG_x_script.script (select it on the left of the screen, ‘Structure’ tab and 'Delete' button). Then, add Script code structure in the same place (‘Advanced’ tab of ‘Structure’ tab). Select the copied and renamed .script file (Select Script on the left of the screen, choose 'File' in the 'Command' tab, 'Edit' button, 'Select File' button, select the file and 'SAVE & EXIT' button). Modify this script in the 'Command' tab and replace the previously known variables, like this: Last step: Save the .script file and the program in the desired folder. It will then be possible to use this program as a subroutine. Here are the results for this example: 18 EXAMPLE: CLOSING DECTECTION RQ_2FG_Closing_Detection_Demo.urp Load the program named RQ_2FG_Closing_Detection_Demo.urp onto Polyscope (Home page and 'PROGRAM Robot' button), click on 'Load Program' in the 'Program' tab. Program description: Robotiq Gripper activation Once the activation is complete, the program will run an infinite loop: o Robotiq Gripper closes o Wait for 500 ms o If a part is detected when the Robotiq Gripper closes: The Robotiq Gripper slowly opens with a minimum of force and not completely (position = speed = force = 100) o Else (If no part is detected when the Robotiq Gripper closes): The Robotiq Gripper opens completely and rapidly with a maximum of force (position = 0, speed = force = 255) o Wait for 500 ms o (Back to the top of the loop) Note: The position of the Robotiq Gripper’s fingers is given by the Grip_position variable. 7. USING SUBROUTINES WITH UNIVERSAL ROBOTS The main objective is to program Universal Robots and the Robotiq Gripper from the same program. Here is an example of the integration of the Robotiq Gripper into a program which picks and places objects: Load RQ_2FG_Pick&Place_Demo.urp program in Polyscope (Home page and 'PROGRAM Robot' button), click on 'Load Program' in the 'Program' tab. Program description: The robot will move to the location of the objects (Point_wait) Robotiq Gripper activates Once the activation is complete, the program will run an infinite loop: o The robot moves to the collection point for the objects (Point_pick) o Robotiq Gripper closes o If a part is detected when the Robotiq Gripper is closed: The robot will move to the point for the disposal of the objects (Point_place), passing by the holding point of the objects (Point_wait) Robotiq Gripper opens o Else (If no part is detected when the Robotiq Gripper is closed): Robotiq Gripper opens o (Back to the top of the loop) 19 Note: The position of the Robotiq Gripper’s fingers is given by the Grip_position variable. 20 © 2008-2013 Robotiq, Inc. 966 chemin Olivier, suite 325, St-Nicolas, Québec, Canada, G7A 2N1. All Rights Reserved. 21
* Your assessment is very important for improving the work of artificial intelligence, which forms the content of this project
advertisement