Inconsistent results of pose_add function

I have an application where I am calculating positions based on taught positions.

I have a couple installation variables defined as:

Variable \ Value
Up_20mm_var p[0,0.02,0,0,0,0]
Dest_pos p[0,0,0,0,0,0]
Test_pos p[0,0,0,0,0,0]

In my program I have a waypoint named VC1_putty_start, taught relative to a plane named “TopOfPlate”.

In my program I run the following code:
image
image

As you can see from the screenshots, I am using the TCP_1_putty as the TCP, and TopOfPlate as the feature.

This works as expected. The position offset variable was added to the existing position, and the robot moved to a position offset from the existing position. I expanded the program using this method with several different offset variables and it runs fine.

My problem comes in when I copy this program and installation to an identical robot. When I run the program, the result of the calculation is now sent back in reference to the Base frame. So I have to go to all of my MoveL commands and select “Base” as the Feature. Then the program runs identical to the program on the other robot. The robots all have the same software installed on them (URSoftware 5.9.5.1031259 (Feb 05 2021))

It appears to me that the result of the calculation “dest_pos := pose_add(Block_A_Start, Up_20_mm_var” is sometimes returned in reference to the base coordinate system, and sometimes it is returned in reference to the “TopOfPlate” plane, seemingly arbitrarily.

What is very confusing is that I copied the exact code to another line and put the result of the calculation into another different variable (test_pos), and they returned two different results (viewed in the installation variables screen), even though I used the exact same code.
image

I tested moving to the resulting positions, and found that the positions are identical, but for one of them I had to use the base as the feature for the MoveL command, while I had to use “TopOfPlate” as the feature for the other one.

Does anyone have any guidance or recommendations on what could be going wrong here or how I can know whether it will return results relative to the base or plane? I want to be confident that the program will be consistent so I can copy this program to the other 5 robots doing the same task.

1 Like