RobotStudio event

Using cPos from motion task in a semistatic task

Hi all,

I’ve been trying to use cPos from a motion task in a semistatic task. Anytime I try it the semistatic task comes up with an argument error for the work object and took data. I am using this to try to measure the distance of weld paths. I am using RW 5.15.


1!!!2 AWLC.

I Seam 45

P_1:=Cpos (\Tool: =tR2_A500_45L|wobj: =wobjR2_0p35_2);

WaitTime 0.5;

P_2:=Pos (\Tool:=tR2_A500_45L \wobj:=wobjR2_0p35_2) ;

W_45:= Distance (P

_1, PL

_2) :

Add W45, L_ W45;

This is just the basic bit of the program to see if it would actually work.

Thanks in advance 


  • lemster68
    lemster68 ✭✭✭
    If you want the tooldata and workobjectdata to be known to another task it must be declared in both (or more, if more tasks) and it must be declared as type PERS.
    Lee Justice
  • samflower
    Thank you, got this working now