Set up ABB Controller

System requirements

The robot-side part of the ABB connection was written in RAPID and uses both parallel tasks and sockets. The following options are required:

  • 623-1: Multitasking

  • 616-1: PC Interface

At least RobotWare OS version 5.13 is required.

RobotStudio is required for this setup. It is available in a free Basic version and is used in the following instructions.

Robot Web Services (RWS) is required for the direct control of grippers and IOs.

RWS 1.0 is included in RobotWare OS 6.x.

RWS 2.0 is installed in RobotWare OS 7.0 and above. Mikado systems older than 3.3 might require an update to support IO via RWS 2.0.

Alternatively, grippers and IOs can also be controlled via Profinet or other fieldbusses.

Network configuration

To enable communication between the mikado controller and the robot controller, a network connection is required. To achieve this, connect the ABB Controller and the Mikado Controller using a network cable (ethernet).

Hint

On the ABB controller, it is strongly recommended to use the WAN port. If your controller has multiple WAN ports, use WAN1.

A network connection between the two systems is required for communication between the robot controller and Mikado controller. To do this, first connect an Ethernet port of the ABB controller to an Ethernet port of the Mikado controller. A fixed IP address and a corresponding subnet mask must then be set for both the Mikado Controller and the robot controller. The network configuration of the Mikado Controller is explained in more detail in section Network adapter. On the ABB controller, you can configure the IP address of the public network by going to Settings → Network → Public Network (default is 192.168.3.2). For more details on how to configure the network on the robot please check out the manufacturer’s user manual.

Hint

Make sure that the IP addresses of the Mikado Controller and ABB Controller are in the same address space and that the subnet masks match.

Then enter the IP address of the robot controller in the Mikado Assistant under Robot → Connection in the corresponding field and save the settings.

To check the network connection see Connection issues.

Installing the programs

In order for the ABB robot to be controlled by Mikado, the corresponding programs must be copied to the robot controller and set up there. You can find the required RAPID programs at

/opt/isys-vision/mikado/robot_programs/abb/rapid

or using the corresponding button in the Mikado Assistant:

Robot → Set up ABB Controller → Open folder

Screenshot of the ABB rapid files

Mikado Rapid files on the Mikado controller

Copy the files to a USB drive, plug it into the controller or flex pendant and copy the files onto the robot controller, into a folder named ROS, e.g. under HOME.

Then copy all files from the usb drive there.

Rapid files in RobotStudio

Mikado Rapid files in RobotStudio

The following section describes the configuration of these programs on the robot controller in more detail.

Setting up the programs

The driver consists of three programs running in parallel:

  • ROS_stateServer.mod Transmits the current joint position and the state of the robot

  • ROS_motionServer.mod Receives trajectories from Mikado

  • ROS_motion.mod Executes the received trajectories

Separate tasks must now be created for these three programs. To do this, go to Controller → Configuration → Controller → Task. You can now add the required tasks by right-clicking and selecting New Task:

Name

Type

TrustLevel

Motion Task

ROS_StateServer

Semistatic

NoSafety

No

ROS_MotionServer

Semistatic

SysStop

No

T_ROB1

Normal

Yes

If the task T_ROB1 exists on your controller and already contains motion-control modules, rename the main() function of ROS_motion to ROS_main() and set the entry point to ROS_main().

Adding tasks in Robot Studio

Tasks to add in Robot Studio

If you plan to apply changes to ROS_StateServer or ROS_MotionServer``during the setup process, it is recommended to set their task types to ``Normal first. When going into production mode, the task types of both servers need to be changed to Semistatic.

Now you need to create some signals, go to I/O System → Signal and add the following signals by right-clicking and selecting New Signal:

Name

Type

signalExecutionError

Digital Output

signalMotionPossible

Digital Output

signalMotorOn

Digital Output

signalRobotActive

Digital Output

signalRobotEStop

Digital Output

signalRobotNotMoving

Digital Output

signalRosMotionTaskExecuting

Digital Output

Signals in RobotStudio

Signals to add in RobotStudio

These must now be connected to the system outputs. To do this, go to Controller → System Output and right-click and add New System Output:

Signal name

Status

Arg 1

Arg 2

signalExecutionError

Execution Error

N/A

T_ROB1

signalMotionPossible

Runchain OK

N/A

N/A

signalMotorOn

Motors On State

N/A

N/A

signalRobotActive

Mechanical Unit Active

ROB_1

N/A

signalRobotEStop

Emergency Stop

N/A

N/A

signalRobotNotMoving

Mechanical Unit Not Moving

ROB_1

N/A

signalRosMotionTaskExecuting

Task Executing

N/A

T_ROB1

System output signals in RobotStudio

System output signals in RobotStudio

Now auto-start must be activated for these programs, go to Controller → Automatic Loading of Modules and add New Automatic Loading of Modules by right-clicking:

Warning

To ensure the functionality of the driver, it is essential to make sure that the ROS_common file is installed as shared and is not loaded separately into the tasks. None of the tasks may contain an instance of ROS_common, as otherwise the data from this instance will be accessed instead of the shared data.

File

Task

Installed

All Tasks

Hidden

Shared

HOME:/ROS/ROS_common.sys

NO

NO

NO

YES

HOME:/ROS/ROS_messages.sys

ROS_MotionServer

NO

NO

NO

NO

HOME:/ROS/ROS_motionServer.mod

ROS_MotionServer

NO

NO

NO

NO

HOME:/ROS/ROS_socket.sys

ROS_MotionServer

NO

NO

NO

NO

HOME:/ROS/ROS_messages.sys

ROS_StateServer

NO

NO

NO

NO

HOME:/ROS/ROS_socket.sys

ROS_StateServer

NO

NO

NO

NO

HOME:/ROS/ROS_stateServer.mod

ROS_StateServer

NO

NO

NO

NO

HOME:/ROS/ROS_motion.mod

T_ROB1

NO

NO

NO

NO

Automatic loading of modules in RobotStudio

Automatic loading of modules in RobotStudio

After restarting the system (ideally P-Start), the robot can now be controlled by Mikado.

Updating the robot programs

If you want to replace the robot programs with programs from a different version, upload the files of the new version to the robot as described in section Installing the programs and perform a P-start.

ABB → Restart → Advanced → P-Start → OK

Robot Control

To control robots with Mikado, use the Flex Pendant:

  • Auto Mode

  • Motors On

  • Reset program pointer

  • Start

The robot status should look as follows after successful setup:

Robot Status after succesfull setup

Robot Status after succesfull setup

If Mikado shows the status No Motion Possible: is another machine running RobotStudio and currently in control of the robot? That machine needs to release control in order for Mikado to be able to gain control over the robot.

On status Timeout in Mikado:

  • Can the robot be pinged?

    • ping robot-ip in Konsole

  • Are the three tasks ROS_StateServer, ROS_MotionServer and T_ROB1 running on the robot?

    • If necessary activate motors, reset program pointer and press Start on the Flex Pendant

Configuring gripper and IO with Robot Web Services

ABB’s Robot Web Service (RWS) can be used to control simple grippers and IOs in general.

When using Mikado Assistant version 3.3.1 or newer, the RWS version can be selected on the robot connection setup page.

If necessary, modify the following data in the config/manipulator.yaml file of your cell:

rws_username: Default User   #default
rws_password: robotics       #default
rws_digital_in_path: MIK_DI
rws_digital_out_path: MIK_DO
rws_version: 2

We recommend to update RWS user names and passwords on the ABB controller. If user name or password have been changed, the entries rws_username and rws_password have to be updated accordingly.

Mikado uses internal numbers for the individual inputs and outputs, these are appended to the prefix rws_digital_in_path, so if input 23 is read in Mikado, MIK_DI23 is read on the ABB IRC in this example. Same for the outputs: a Mikado write to output 12 is mapped to ABB output MIK_DO12.

If RWS is used, the access level has to be changed in RobotStudio, as the default level only allows reading access.

By mapping the IOs we can unlock access to individual signals:

  • Configuration > I/O System > Signal

  • Right Click > New Signal …

  • Create new IO with a chosen name. Important: use the scheme prefix + number, e.g. MIK_DO1

  • Type of Signal: Digital Output

  • Assigned to Device: leave empty

  • Access Level: All (allows remote access)

Now a cross connection can be created:

  • Configuration > I/O System > Cross Connection

  • Right Click > New cross connection …

  • Name of choice

  • Resultant: name of the actual IO, e.g. ABB_0_DO1 or a fieldbus IO

The IO signal numbers for gripper operation can now be set in Mikado Assistant.

Giving up control over the robot temporarily

It is possible to give up control of the robot from Mikado in order to perform other tasks/movements directly on the robot and then hand robot control back to Mikado.

This requires adjustments in both the Mikado program and the robot program ROS_motion. A flag is also required for the transfer, which can be read and written by both Mikado and the robot. In this example, the output MIK_DO3 is used for this purpose.

View of the digital output *MIK_DO3* used in the example in RobotStudio

View of the digital output MIK_DO3 used in the example in RobotStudio

You must now make the following changes to your Mikado program:

  • Insert a Set Robot Output Signal task at the point in the Mikado program where you want to transfer control. Give the task the output number and a variable with the value true as arguments.

  • Create a new sequence called Wait for robot control.

  • Underneath the Set robot output signal task, insert a sequence change that switches to the sequence you just created.

  • The sequence Waiting for robot control should now read the robot output repeatedly in a loop. To do this, insert a Read robot output task, read the same output as above, and write the result to a variable.

  • Insert an IF statement that checks the result variable. If it is false, this means that the robot has returned control to Mikado. In this case, you can continue with the actual sequence after updating the robot position (as shown in the screenshot using the Read robot position task). If the output is still true, we wait a while and then query again.

Logic to be executed by Mikado while the robot is in control can be inserted after setting the output and before switching to the wait sequence.

Example of a Mikado program with control transfer to the ABB robot

Example of a Mikado program with control transfer to the ABB robot

Additionally, the ROS_motion robot program must be adapted. To do this, insert the output query in the WHILE loop of the main function:

[...]

IF(ROS_new_trajectory) THEN
  init_trajectory;
ENDIF

! check if robot should take control
! we are setting a digital output in mikado and then wait until it is reset
! in the meantime the robot can do whatever it wants
IF MIK_DO3 = 1 THEN
  TPWrite "Robot taking control";
  ! insert your commands here
  !MoveJ p9, v1000, z50, tool0;
  WaitRob \InPos;
  InvertDO MIK_DO3;
  TPWrite "Mikado taking control";
ENDIF

IF (trajectory_size > 0) THEN
[...]

Once the robot has executed its commands, the output must be reset to false so that Mikado can regain control. In the example this is done by the command InvertDO MIK_DO3.

Troubleshooting

Increasing robot speed

To adjust the robots movement speed, open the program ROS_motion and adjust the value of the variable move_speed. Proceed with caution, especially if you have also made adjustments to the variable stop_mode.

Debug messages on the teach pendant

To facilitate the set up process, debug messages are enabled on the teach pendant by default (update frequency, number of trajectory points transmitted, etc.). If you want to disable them, you can do so by changing the persistent variable isDebug to false inside of ROS_motionServer. Messages that are not written to the teach pendant as messages using TPWrite, but rather to the event log using ErrWrite \W, are not affected by this.

RWS Debug Messages

TODO Um mehr Details zu RWS IO-Vorgängen zu erhalten kann das Logging-Level des RWS Adapters erhöht werden.

Add the following line in launch/rosconsole.config:

log4j.logger.ros.abb_rws_mikado_adapter=DEBUG

Connection issues

In case of connection problems, we recommend to first check whether the robot controller can be reached from the Mikado controller. To do this, open a console on the Mikado controller (CTRL + ALT + T) and enter the following command in the console (replace the IP with the IP of the robot controller):

ping 192.168.1.42

The ping can be canceled by pressing Ctrl + C. A positive response would look like this:

ping 192.168.1.42
PING 192.168.1.42 (192.168.1.42) 56(84) bytes of data.
64 bytes from 192.168.1.42: icmp_seq=1 ttl=64 time=1.18 ms
64 bytes from 192.168.1.42: icmp_seq=2 ttl=64 time=0.448 ms
^C
--- 192.168.1.42 ping statistics ---
2 packets transmitted, 2 received, 0% packet loss, time 1001ms
rtt min/avg/max/mdev = 0.448/0.816/1.185/0.369 ms

If the ping is successful, the robot controller can be reached. If that is the case, check whether both server programs (state and motion server) are running on the robot and where the program pointers are located. If both programs are waiting for a client connection, try restarting Mikado.