# [KUKA] LIN_REL problem

• Hi,

I'm programming a solution which send to robot coordinates. After that I want move robot on position by lin_rel or ptp_rel.

I write smth like that:

Code
posRel = {x 0, y 0, z 0, a 0, b 0, c 0}
posRel.x = 50
lin_REL posRel

I defined others points eg. PTP X0 etc previously in code.

In next step I want to use variable to posRel.x.

Unfortunately I can't move, and at kuka display erros kss01415 or 01413 what's mean " non defined velocity" or "not defined aceleration". I was looking for it at manual, but I can't any example how to fix it.

• ## zwierzyk5Jan 30th 2020

Changed the title of the thread from “LIN_REL problem” to “[KUKA] LIN_REL problem”.
• first motion must be PTP to perform BCO

all inline form motion instructions set bunch of parameters

if you place them before your code, it will work.

better idea is to not rely on "leftovers" of other code and initialize all relevant parameters yourself each and every time you plan on using bare bone KRL motions.

for example

BAS(#TOOL, 1) ; select first tool

BAS(#BASE, 3) ; select base 3

BAS(#VEL_CP, 0.5) ; set speed to 0.5m/s

BAS(#ACC_CP, 100) ; use max acceleration

2) if you have an issue with robot, post question in the correct forum section... do NOT contact me directly

• bas(#tool,1) ;set tool

bas(#base,1) ; set base

bas(#vel_cp,1) ; set lin speed

bas(#vel_ptp,10) ;set ptp speed

bas(#acc_cp,10) ; set max acceleration lin

bas(#acc_ptp,10) ; set max acceleration ptp

\$apo.cptp=100 ;

\$apo.cdis=100 ;

ptp \$pos_act ; replacement first ptp move

posRel = {x 0, y 0, z 0, a 0, b 0, c 0}

posRel.x = 50

lin_REL posRel

• Hello, I have somewhat similar question.

So the situation is, I have a kuku KRC2 robot, which I am successfully controlling using Beckhoff PLC and cell program in automatic-external mode. To write robot positioning program I am using RoboDK software. For PTP movement RoboDK is useful and programs written with it works great. But now I need to position robot using relative movement. As I've read from manual "KR C2 / KR C3 Expert Programming KUKA System Software (KSS) Release 5.2" it is possible to move robot using relative movement by using PTP_REL or LIN_REL commands. But I can't programm it with RoboDK and I can't change already existing programs via "Kuka HMI 2.0" GUI. I understand that I have to create custom program to move robot with relative movement (that's not a problem), but cant I call this program from cell program (in automatic external mode)? Also is it possible to change robot movement PTP to PTP_REL in existing program?