# Variable Waypoint using both Tool Position and Joint Position

**URL:** <https://forum.universal-robots.com/t/variable-waypoint-using-both-tool-position-and-joint-position/21395>\
**Category:** Technical Questions\
**Created:** [May 18, 2022, 6:45am UTC](https://forum.universal-robots.com/t/variable-waypoint-using-both-tool-position-and-joint-position/21395 "2022-05-18T06:45:32Z")\
**Posts on this page:** 1\
**Showing post:** 2

<div class="post-metadata">

**Author:** ![aswathamang](https://avatars.discourse-cdn.com/v4/letter/a/b5a626/32.png) [@aswathamang](https://forum.universal-robots.com/u/aswathamang)\
**Post date:** [May 18, 2022, 11:58am UTC](https://forum.universal-robots.com/t/variable-waypoint-using-both-tool-position-and-joint-position/21395/2 "2022-05-18T11:58:48Z")

</div>

Hai @francis ,Sorry to say that I only understood your question partially, I assume that you are using the URCaps SDK for developing the program. So can actually make that is what I think. To put it as a rough sketch you can actually create two variables GlobalVariable\_p, GlobalVariable\_q with dummy values and assign the proper values once you wish to assign it using a getter , setter function calls.

To get the joint position you can verify this [JointPositions (api 1.3.0 API)](https://plus.universal-robots.com/apidoc/40237/com/ur/urcap/api/domain/value/jointposition/jointpositions.html),

To move the robot by actually generating and executing a urscript using the SDK as shown shown here:- [com.ur.urcap.api.domain.script (api 1.3.0 API)](https://plus.universal-robots.com/apidoc/40237/com/ur/urcap/api/domain/script/package-summary.html)

---

_[View the full topic](https://forum.universal-robots.com/t/variable-waypoint-using-both-tool-position-and-joint-position/21395)._
