This tutorial provides an overview of how to export coordinates and how to perform an external calculation.

## Overview

This tutorial serves as a starting point of how to export the position of the robot and how to perform an external calculation since mathematic operations are not supported in Intera Studio by now. The last step will be a quick guide of how to upload the externally calculated coordinates into an user-defined frame.

## Prerequisites

Before performing this tutorial, following sections should be read carefully first:

## How To Export Coordinates

The following task will be implemented in Intera:

The main task consists of 2 Move To nodes and 2 Set To nodes, that will send the coordinates and orientations of the robot to the external device via TCP/IP.

Best Practice: In advance of sending the data add a Wait node with at least 0.5s waiting time to achieve a stable position of the robot and avoid fluctuating coordinates due to an oscillating robot arm, which may occur because of physical inertia.

Within this tutorial, the endpoints of both Move To nodes have been set up to:

 Move To – 1 Move To - 2 Position X [mm] 700 700 Position Y [mm] -360 -360 Position Z [mm] 450 -150 Rotation X [deg] -90 -90 Rotation Y [deg] 90 90 Rotation Z [deg] 0 0

After preparing the task, the communication device needs to be set up. Therefore, please refer to the TCP/IP section first.

The configuration of the communication device can be performed within the Device Editor and the necessary output signals need to be set to:

Since the whole task is now prepared for start up and after establishing a connection to the external communication device, the task can be executed.

Best practice: To avoid an infinite loop of the task, the max loop count of the Loop node can be set to 1. The task will then only be executed once.

After running the task, the coordinates and orientations of both endpoints are sent to the external communication device, where further mathematics operations can be performed.

## Upload New Coordinates into a Frame

The received coordinates and orientations are shown below:

 Endpoint 1 Endpoint 2 Position x [mm] 700 700 Position y [mm] -360 -360 Position z [mm] 450 -150 Rotation x [deg] -90 -90 Rotation y [deg] 90 90 Rotation z [deg] 0 0

Now, the middle point of both endpoints can be calculated manually. Since only the Position z is changing, the middle can be calculated by

Pz = (450 - 150)/2 = 150

while all other coordinates and orientations are staying the same.

After calculating the middle point, a new Frame can be added and set up to the coordinates and orientations of the calculated middle point.

First, the robot needs to be moved to this point.

Then a new Frame can be added, which will automatically adopt the coordinates and orientations of the Tool Center Point. The newly added Frame is named MidPointFrame.

For example, new Move To nodes can be implemented, which will refer to this newly added frame. With this tutorial, reference points can be approached by the robot, send to an external device where some calculations will take place, and saved within a new Frame.