# Degree instead of Radient

**URL:** <https://forum.universal-robots.com/t/degree-instead-of-radient/22361>\
**Category:** Robot Communication\
**Created:** [June 30, 2022, 1:16pm UTC](https://forum.universal-robots.com/t/degree-instead-of-radient/22361 "2022-06-30T13:16:43Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![anon17403245](https://avatars.discourse-cdn.com/v4/letter/a/cdc98d/32.png) [@anon17403245](https://forum.universal-robots.com/u/anon17403245)\
**Post date:** [June 30, 2022, 1:16pm UTC](https://forum.universal-robots.com/t/degree-instead-of-radient/22361/1 "2022-06-30T13:16:43Z")

</div>

Hey Community,

I wrote a little script for my UR3 which looks like this.

CenterPoint = “movel([-1.1374195257769983, -2.982007165948385, -1.8962527513504028, 0.5131620603748779, 1.3882300853729248, 9.879166666661398], a=1.2, v=0.25)\n”  
s.send(CenterPoint.encode(‘utf-8’))  
received\_data = s.recv(1024)

Is it possible to write the Degress instead of the radiant ? Because i want to move the TCP in the RZ for example 25 Degrees each waypoint

---

<div class="post-metadata">

**Author:** ![MikeM](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.universal-robots.com/mikem/32/3114_2.png) [@MikeM](https://forum.universal-robots.com/u/MikeM)\
**Post date:** [June 30, 2022, 11:17pm UTC](https://forum.universal-robots.com/t/degree-instead-of-radient/22361/2 "2022-06-30T23:17:23Z")

</div>

Try using URscript functions:

```auto
r2d(radians) #will output degrees

```

and

```auto
d2r(degrees) #will output radians

```

Hope that helps, and best of luck!

---

<div class="post-metadata">

**Author:** ![anon17403245](https://avatars.discourse-cdn.com/v4/letter/a/cdc98d/32.png) [@anon17403245](https://forum.universal-robots.com/u/anon17403245)\
**Post date:** [July 1, 2022, 7:24am UTC](https://forum.universal-robots.com/t/degree-instead-of-radient/22361/3 "2022-07-01T07:24:57Z")

</div>

Thank you Michael,

I wrote the scrip in phyton but I´m still a total beginner with programming. How exactly would I Use the r2d(radians) function ?

---

<div class="post-metadata">

**Author:** ![terryc](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.universal-robots.com/terryc/32/3006_2.png) [@terryc](https://forum.universal-robots.com/u/terryc)\
**Post date:** [July 1, 2022, 5:29pm UTC](https://forum.universal-robots.com/t/degree-instead-of-radient/22361/4 "2022-07-01T17:29:37Z")

</div>

Replace the angles in the pose with d2r(180) or something like that.

myPose = [x, y, z, d2r(45), d2r(90), d2r(135)]

The function is part of the standard library and just converts one to the other.

---

<div class="post-metadata">

**Author:** ![anon17403245](https://avatars.discourse-cdn.com/v4/letter/a/cdc98d/32.png) [@anon17403245](https://forum.universal-robots.com/u/anon17403245)\
**Post date:** [July 21, 2022, 9:10am UTC](https://forum.universal-robots.com/t/degree-instead-of-radient/22361/5 "2022-07-21T09:10:26Z")

</div>

i tried to convert the radians from my function into degress but the robot performs a totally different movement when using d2r

Any Ideas why ? for example my last coordinate ist 9.87 radient which is 565.5093 Degree converted and would like like this d2r(565) ?
