my problem nr 1:
i have defined a variable about DECL command
i write my name in this variable
DECL CHAR ATEC_VAR
i read at next location the variable with "while" command
PS read two quotation marks in variable ( " "benjamin" " ) see picture
problem nr 2:
same situation as problem nr 1
i read the variable in the "# Reltool ATEC_VAR " function
ps dosen't read the topic of the variable
Solved! Go to Solution.
Variables of type strings are, in general, not supported.
However for the while, you should write:
WHILE ATEC_VAR = "benjamin"
which is also the correct KUKA syntax and it should work as expected.
I do not see the point to use # MoveRelTool ATEC_VAR?
Instead you should have real variables x, y, z and use them in your # MoveRelTool statement.
this is what i want to do
ATEC_VA = "benjamin"
# MoveRelTool benjamin X Y Z
and the varaible "benjamin" this should be the name of location
the "while" problem was my fault
normaly krc syntax WHILE INPUT > 0
whitout " " "
For MoveRelTool, you need to specify X, Y and Z. You cannot just specify X as you did in your example, that is why you get this syntax error message.
Anyway, passing a string variable as MoveRelTool reference location is not supported.
You may instead want to use a Custom XML Olp Command in which you will type this reference location name in the creation UI, and use it in the MoveRelTool withing the simulation layer.
i found a other solutution
i work with "txobject" commands in custom xml
txobject = location
# MoveReltool location X Y Z
in this way is working