Hi, I’m new to programming in rapid. I have a question about distance measurement.
I have created targets for my robot, and then I want to record the position of the TCP after it has moved to each target. Here is a snippet of my code:
MoveL Target_200,v1000,fine,EndEffector3\WObj:=Workobject_1;
TCPPos1 := CPos(\Tool := EndEffector3 \WObj := Workobject_1);
dist2 := Distance(TCPPos1, measurementPoint);
MoveL Target_210,v1000,fine,EndEffector3\WObj:=Workobject_1;
TCPPos2 := CPos(\Tool := EndEffector3 \WObj := Workobject_1);
dist3 := Distance(TCPPos2, measurementPoint);
MoveL Target_220,v1000,fine,EndEffector3\WObj:=Workobject_1;
TCPPos3 := CPos(\Tool := EndEffector3 \WObj := Workobject_1);
dist3 := Distance(TCPPos2, measurementPoint);
MoveL Target_230,v1000,fine,EndEffector3\WObj:=Workobject_1;
TCPPos4 := CPos(\Tool := EndEffector3 \WObj := Workobject_1);
dist4 := Distance(TCPPos2, measurementPoint);
for dist1,..,4 I get the same distance as in the first one, even though I can see in the flexpendant that TCPPos1,…,4 are different, so it should be different distances as well.
Thas is my first concern. My second concern is if there is a way to extract the data TCPPo1,…,4 in any way from RobotStudio for analysing the data?