# Command to move linearly WITHOUT DECLARED POSITIONS

**URL:** <https://tech-community.robotics.abb.com/t/command-to-move-linearly-without-declared-positions/7959>\
**Category:** RAPID Programming\
**Created:** [November 14, 2017, 11:33am UTC](https://tech-community.robotics.abb.com/t/command-to-move-linearly-without-declared-positions/7959 "2017-11-14T11:33:08Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Tonycek](https://avatars.discourse-cdn.com/v4/letter/t/a8b319/32.png) [@Tonycek](https://tech-community.robotics.abb.com/u/Tonycek)\
**Post date:** [November 14, 2017, 11:33am UTC](https://tech-community.robotics.abb.com/t/command-to-move-linearly-without-declared-positions/7959/1 "2017-11-14T11:33:08Z")

</div>

Hi all! I want to move abb robot linearly. I dont have declared positions where I want to get, I just want to make linear move (for example in x axis) when digital input is 1. Is there any command in RAPID, which can accomplish this task? I was thinking that set of speed of movement to some not zero value could do it, but I dont know, if there is command which can do it. Anyone with some help?Thank you very much

---

<div class="post-metadata">

**Author:** ![steve42](https://avatars.discourse-cdn.com/v4/letter/s/848f3c/32.png) [@steve42](https://tech-community.robotics.abb.com/u/steve42)\
**Post date:** [November 14, 2017, 5:30pm UTC](https://tech-community.robotics.abb.com/t/command-to-move-linearly-without-declared-positions/7959/2 "2017-11-14T17:30:36Z")

</div>

Here are some ideas…  
create the data  
PERS robtarget pMyPosition:=[[0,0,0,[1,0,0,0],[0,0,0,1],[9E+09,9E+09,9E+09,9E+09,9E+09,9E+09]];

VAR num nMyXvalue:=0;

! Then read the current robot position with this instruction…  
pMyPosition:=CRobT(\Tool:=tGripper\WObj:=wobjMyWobj);  
! set my x value to 100mm somewhere in your code  
nMyXvalue:=100;  
! Then use the variable inside an offset instruction inside your own routine  
MoveL Offs(pMyPosition,nMyXvalue,0,0),v100,fine,tGripper\Wobj:=wobjMyWobj;
