# Moving the robot arm via TCP/IP/URscript in the tool coordinate system

**URL:** <https://forum.universal-robots.com/t/moving-the-robot-arm-via-tcp-ip-urscript-in-the-tool-coordinate-system/24404>\
**Category:** General Application Help: How do I?\
**Created:** [October 14, 2022, 12:16pm UTC](https://forum.universal-robots.com/t/moving-the-robot-arm-via-tcp-ip-urscript-in-the-tool-coordinate-system/24404 "2022-10-14T12:16:21Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![sakari.salmi](https://avatars.discourse-cdn.com/v4/letter/s/c37758/32.png) [@sakari.salmi](https://forum.universal-robots.com/u/sakari.salmi)\
**Post date:** [October 14, 2022, 12:16pm UTC](https://forum.universal-robots.com/t/moving-the-robot-arm-via-tcp-ip-urscript-in-the-tool-coordinate-system/24404/1 "2022-10-14T12:16:21Z")

</div>

Hi,

I am creating a screwdriving solution for our UR5e robot where we will be doing the tightening only in one direction - parallel to the robot base axis. This means the screwdriver/tool TCP will always be pointing in the “Z”-direction/towards the table the robot is mounted on.

I will send movement commands to the robot from a text-file where the screw coordinates are defined from a common origin. Then I will define some point in the robot coordinate system as the same origin as in the text-file. This way I should be able to tell the robot to move to a specific coordinate [x\_text-file + robot\_origin\_x, y\_text-file + robot\_origin\_y, z\_text-file + robot\_origin\_z] when I want to tighten a specific screw.

The question is: how do I actually tell the robot to move within the TCP x,y and z-axis? I have tried various move-commands, but either they do nothing or the robot moves to an “arbitrary position”

One example I found on the net suggested me to use “movel(pose\_trans(get\_actual\_tcp\_pose(),p[0.1,0,0,0,0,0]),b, c)” but this really didnt move the robot to a wished position.

For example the following command in Python does nothing - it only returns a return value in Windows Prompt

```auto
pose = "p[0.7, -0.1, -0.03, 0.824, -3.026, 0]"
s.send(("movej(pose, a = 0.01, v=0.001)"+"\n").encode("utf8"))

```

> > > s.send((“movej(pose, t = 15)”+“\n”).encode(“utf8”))  
> > > 20  
> > > s.send((“movej(pose, a = 0.01, v=0.001)”+“\n”).encode(“utf8”))  
> > > 31
