RobotStudio event

How do I take the "Z" value out of a program (pose) displacement and multiply it by a -1 and use it

Options
So I have a jig that's hold 12 parts in a positioner, the parts get welded on the top than rotated and welding performed on the bottom. I don't want to use 2 separate work objects for the top & bottom, I'm trying to minimize searches and hence cycle time.  When I use smart tac to search the top I invoke a program displacement, my problem is how do I take the "Z" value out of that displacement pose data  and multiply it by a -1 so I can use it in a new program displacement for the bottom and under the same work object as the top, the "X & Y" coordinates of the displacement do not need altered as the only welding being performed on the bottom is a single straight weld. Please someone show me how to extract that single pose "Z" value and perform an arithmetic operation and use it elsewhere. Parameter definition would be greatly appreciated with the help. 

Comments

  • Pavel Riabichev
    edited September 2016
    Options
    Hello
    If i understood you correctly, you can get the search Z distance as below:

            SearchL \Stop, di2, pEnd, pTo, v100, tool0;
            WaitRob\Inpos;   !PP should wait here untill the robot stops moving        nStartZ:=pStart.trans.z;        nSearchEndZ:=pEnd.trans.z;
            nSearchDistZ:=nStartZ-nSearchEndZ; 
    /Pavel