Difference between revisions of "Locator Tutorial: Setting up Locator to work with ABB robots"
Line 183: | Line 183: | ||
== 4. LOCATOR RAPID API == | == 4. LOCATOR RAPID API == | ||
− | The | + | The '''ABB Locator module''' is a set of RAPID procedures which handle socket communication with Locator and provide basic example how to navigate robot to reach received targets. |
=== 4.1 COMMUNICATION API === | === 4.1 COMMUNICATION API === | ||
− | + | RAPID procedures necessary for communication with Locator are available in '''LocatorCommunication''' system module. | |
==== 4.1.1 RAPID PROCEDURES ==== | ==== 4.1.1 RAPID PROCEDURES ==== | ||
Line 195: | Line 195: | ||
'''connectToLocator(string server_ip, num port, \num wait_time)''' - a procedure to establish connection to Locator. | '''connectToLocator(string server_ip, num port, \num wait_time)''' - a procedure to establish connection to Locator. | ||
− | - ''server_ip'' - An IP address of Vision Controller running Locator | + | - ''server_ip'' - An IP address of Vision Controller running Locator. |
− | - ''port'' - A | + | - ''port'' - A port on which Locator is listening for a connection. |
---- | ---- | ||
Line 205: | Line 205: | ||
- ''mode'' - two modes are available - '''SINGLE_RESULT_MODE''' and '''MULTIPLE_RESULT_MODE'''. | - ''mode'' - two modes are available - '''SINGLE_RESULT_MODE''' and '''MULTIPLE_RESULT_MODE'''. | ||
− | - ''\num num_of_results'' - optional parameter used in MULTIPLE_RESULT_MODE - defines a number of how many results are expected by user | + | - ''\num num_of_results'' - optional parameter used in MULTIPLE_RESULT_MODE - defines a number of how many results are expected by user. |
---- | ---- | ||
Line 220: | Line 220: | ||
A RAPID module called '''LocatorBasicTemplate.mod''' is a very simple example, which illustrates how Locator can be easily integrated into existing RAPID application. | A RAPID module called '''LocatorBasicTemplate.mod''' is a very simple example, which illustrates how Locator can be easily integrated into existing RAPID application. | ||
− | It shows use of both SINGLE_RESULT_MODE and MULTIPLE_RESULT_MODE and provides basic routine to navigate arm to goals received | + | It shows use of both '''SINGLE_RESULT_MODE''' and '''MULTIPLE_RESULT_MODE''' and provides basic routine to navigate arm to goals received from Locator. |
==== 4.2.1 RAPID PROCEDURES ==== | ==== 4.2.1 RAPID PROCEDURES ==== | ||
Line 234: | Line 234: | ||
'''isReachable(robtarget point)''' - a procedure to check if given pose is reachable by the selected arm. Procedure sets/resets global flag '''is_reachable'''. | '''isReachable(robtarget point)''' - a procedure to check if given pose is reachable by the selected arm. Procedure sets/resets global flag '''is_reachable'''. | ||
− | - ''robtarget point'' - robtarget pose received as a result of localization | + | - ''robtarget point'' - robtarget pose received as a result of localization. |
---- | ---- |
Revision as of 14:39, 7 May 2018
Contents
1. Prerequisities
Locator ABB Interface is compatible with RobotWareOS versions 5.13 and higher.
System options required for Locator ABB Interface: (616-6) PC Interface Module
NOTE: Use of Robot Studio v.6.06 or higher is highly recommended for Locator ABB Interface setup.
2. ABB Controller setup
The following tutorial gives a step by step guide of how to configure your ABB IRC5 controller and install RAPID files to get the interface up and running.
This tutorial was originally written using the latest RobotWare v.6.06, however it should be compatible with older versions with minor changes.
2.1 Network configuration
NOTE: The network configuration procedure described below only works with RobotWareOS v.6 or higher. If you have an older version of RobotWareOS and need to change an IP address, please contact local ABB support.
Turn on the IRC5 Controller, wait for the Initialization Screen to appear, open the Menu screen and select the Control Panel option:
In the Control Panel pane, select Controller Settings:
Select Settings and choose the Network option:
The Network Settings window should now appear. Use the Touch Panel Keypad to set the IP address of the IRC5 WAN port:
Choose OK button and restart the Controller to apply the new settings:
3 Robot Studio Setup
3.1 Connect to IRC5 Controller from Robot Studio
Set your local PC network settings to DHCP, plug an Ethernet cable into the Service Port of the IRC5 Controller and launch Robot Studio.
For a direct connection to the Robot Controller, select the Controller tab and select the One Click Connect option:
If everything is configured properly, Robot Studio should connect to the IRC5 controller and you should see the content of "Current Station" in the left pane.
NOTE: For the purpose of writing this tutorial, an ABB IRB1200 7kg was used.
3.2 Load Locator ABB Module files
Locator module for ABB consists of two RAPID files - LocatorBasicTemplate.mod and LocatorCommunication.sys .
Both files needs to be uploaded to the controller. Right Click on T_ROB1 task and select Load Module option. Browse to the LocatorBasicTemplate.mod and hit Open.
Repeat the same procedure with LocatorCommunication.sys file.
You should see that both files have appeared in the T_ROB1 module list.
If Synchronize to Station dialog panel appears, just click Cancel, we will synchronize later.
In case you are working with a clean system and you do not plan to make use of default Module1, feel free to delete it.
3.3 Configure Main Entry
Now we need to set LocatorBasicTemplate to become the main robot program. On the left pane, select Controller -> Configuration -> Task
Double click on T_ROB1 task. Instance Editor dialog screen should appear.
Here change Main Entry to Locator main fucntion which is called locatorMain and Hit OK.
Since this is a major change to the system, a restart is needed in order to take effect. Hit OK here, we will restart system later on.
3.4 Adopt Network Configuration
Now click LocatorBasicTemplate in the left pane to open the RAPID code. Adopt first three constants to meet your application requirements and network configuration.
Click Apply button when finished
Now it is the time to Restart the system. Use Restart button in Robot Studio or directly on the Pendant.
3.5 Reteach Start and End poses
After system reboot open the Production Window and hit PP to Main button.
You should see the LocatorBasicTemplate being properly loaded with the Program Pointer set as shown in the figure below:
Before we play the program, we need to Reteach Start and End positions to meet your application requirements. From the Main menu on Pendant select the Program Editor tool.
Switch to the Manual mode, jog the robot to your desired start position, select the asterisk at the locator_start_robtarget line and hit Modify Position.
Repeat the same procedure for locator end position.
3.6 Run Locator
Now you are ready to run the program. Switch back to Auto mode, Plug Ethernet cable to pre-configured WAN port and due to safety reasons select 10% speed.
Open Production Window, PP to Main and hit Play.
Make sure that you are ready to stop the motion execution immediately in case if something goes wrong.
If everything was configured and calibrated properly, robot should trigger a first scan, wait for the result and move to towards the first localized object (if returned pose is reachable).
You can monitor program steps directly on the pendant info log panel.
If you are satisfied with the basic locator functionality, feel free to adopt the RAPID code to meet your application requirement, change speed, precision or the order of the steps in the main loop.
4. LOCATOR RAPID API
The ABB Locator module is a set of RAPID procedures which handle socket communication with Locator and provide basic example how to navigate robot to reach received targets.
4.1 COMMUNICATION API
RAPID procedures necessary for communication with Locator are available in LocatorCommunication system module.
4.1.1 RAPID PROCEDURES
connectToLocator(string server_ip, num port, \num wait_time) - a procedure to establish connection to Locator.
- server_ip - An IP address of Vision Controller running Locator.
- port - A port on which Locator is listening for a connection.
trigLocator(num mode, \num num_of_results) - a procedure to trigger next localization
- mode - two modes are available - SINGLE_RESULT_MODE and MULTIPLE_RESULT_MODE.
- \num num_of_results - optional parameter used in MULTIPLE_RESULT_MODE - defines a number of how many results are expected by user.
waitForLocatorResponse() - a procedure to wait for a result of localization to be received
flushSocket() - a procedure to read and discard all remaining bytes in the socket buffer
4.2 MOTION EXECTUION API
A RAPID module called LocatorBasicTemplate.mod is a very simple example, which illustrates how Locator can be easily integrated into existing RAPID application.
It shows use of both SINGLE_RESULT_MODE and MULTIPLE_RESULT_MODE and provides basic routine to navigate arm to goals received from Locator.
4.2.1 RAPID PROCEDURES
moveToTarget(\num target_id) - a procedure to reach the target received as a result of localization
- \num target_id - optional parameter used in MULTIPLE_RESULT_MODE - specifies which of multiple targets received to reach.
isReachable(robtarget point) - a procedure to check if given pose is reachable by the selected arm. Procedure sets/resets global flag is_reachable.
- robtarget point - robtarget pose received as a result of localization.