Applying RelTool when Calculating Positions from a RobTarget

Morning Forum members,
Subject tile relates primarily to needing to apply rotational values against a robtarget. i have a Taught point and calculate another Point that has no rotational values needed to obtain the center of a Part (for instance). Next i need to add parts to this application using the Center and applying Trans.X,Y,Z and some RZ to create a New Point, however the Reltool() is not applying the robconfig im asking for.
the source values are staying the Same for the rot and robconf , so im stumped on what i am doing wrong.
 at present i have the lines of code broken out to attempt to understand my issue and should be able to just apply it all in the RelTool() function.


Thanks for any help,
Alan Cannon


  • lemster68
    lemster68 ✭✭✭
    Single step through each instruction, observe the values that are being calculated before making the next step.  Debugging in this fashion is often times the best way to get to that "aha" moment.
    Lee Justice
  • lemster68
    lemster68 ✭✭✭
    I am looking at this once more, put the original points rot into the array robtarget, then try the reltool.
    Lee Justice

  • this (destination{1,1):=source) does that.. im not following you thought

  • lemster68
    lemster68 ✭✭✭
    I got focused on this: "Point that has no rotational values needed".  I was thinking you were not putting the rot values in.  Not needed, but yes, your first line will put the rot value into the array.  SO Execute the first line in step mode, look at the array index position value, make sure that it matches.  Then go step by step, checking values each time to see that they match what you expect.  If not, that is what you have to figure out why.

                    pLocPoint_RHPallet{1,1}:=pLocPoint{nPntPalletCtr_RH};  ! this is an array position also?  Are you sure where it is pointing?

                   You could also just do this:
                    This next one is not necessary, you already wrote in the z value.

    Lee Justice
  • ok i will line test these as soon as i can get past:
    50419: Common base_frame error
    Task: Task1.
    The Base Frame is moved by another task than the robot and could not be solved, reason 5:
    1. SingArea\Wrist not supported with MoveC.
    2. The Base Frame must be moved by first synchronized motion_group.
    3. Only one common Base Frame can be handled.
    4. Absolute Accuracy not supported with MoveC.
    5. The common Base Frame can only be solved in synchronized move.
    Program ref. /TeachCellPoints/TeachWorkObj3point_RHPallet/MoveJ/439.
    1. Use SingArea\Off. The CirPathMode can also be used.
    2. Check Controller and Motion configuration.
    3. Use MoveL or remove Absolute Accuracy.
    4. Use MoveAbsJ.

    My Entire app has a File:
        ! PROJECT:       0972 -Pactive  
        ! RELEASE DATE:  03/03/2021
        ! WRITTEN BY:    Alan Cannon -
        !                Cannon Control Concepts
        !                4 Windrow Lane
        !                Fountain inn, S.C 29644
        !                http://www.CannonControls.Com
        !                    Phone: 864-201-9261
        !Notes: Adaptation from Template v13 to accommodate this Process
        !**********************   Start DEFINITIONS   **********************************    
      ! Robot Commands
        VAR num nNoCmd:=0;
        VAR num nCmdPick:=1;
        VAR num nCmdLabel:=2;
        VAR num nCmdPlace:=3;
        VAR num nCmdNewPallet:=4;
        VAR num nCmdPark:=15;
        VAR num nMaxPickIndex:=2;
        VAR num nMaxPlaceIndex:=4;   
        ! Robot Speed data
        VAR num gVelocity:=1000;
        VAR num gLargeBlendZone:=100;
        VAR num gSmallBlendZone:=10;
        PERS speeddata gFastSpeed;
        PERS speeddata gSlowSpeed;
        PERS speeddata gFineSpeed;    
        ! PartData
        VAR dnum nPartPicked:=1;

        ! Pallet Data
        VAR num nPalletWidth:=1828.8;
        VAR num nPalletLength:=1828.8;
        VAR num nPalletHeight:=101.6;
        ! Gripper Commands
        VAR dNum nGripperStatus:=0;    
        VAR dNum nGripCloseCmd:=1;
        VAR dNum nGripOpenCmd:=2;
        VAR dnum nGripperOpen :=1;
        VAR dnum nGripperClosed:=2;
        VAR dnum nNothing:=0;
        VAR dnum nSuccess:=1;
        VAR dnum nFail:=99;
        ! Cell Movement Constructs
        CONST num nSafeRadius:=900;
        CONST num nSafeZ:=-800;
        ! Point Array Modifiers
        VAR num nPntPickLH:=1;
        VAR num nPntPickRH:=2;
        VAR num nPntLabelLH:=3;
        VAR num nPntLabelRH:=4;
        VAR num nPntPalletPos_LH:=5;
        VAR num nPntPalletPos_RH:=6;
        VAR num nPntPalletLH:=7;
        VAR num nPntPalletRH:=8;
        VAR num nPntPalletCtr_LH:=9;
        VAR num nPntPalletCtr_RH:=10;
        VAR num nPntSpare11:=11;
        VAR num nPntSpare12:=12;
        VAR num nPntSpare13:=13;
        VAR num nPntSpare14:=14;
        VAR num nPntSpare15:=15;
        VAR num nPntSpare16:=16;
        VAR num nPntSpare17:=17;    
        VAR num nPntPalletFrameLH_Origin:=18;
        VAR num nPntPalletFrameLH_X:=19;
        VAR num nPntPalletFrameLH_Y:=20;
        VAR num nPntPalletFrameRH_Origin:=21;
        VAR num nPntPalletFrameRH_X:=22;
        VAR num nPntPalletFrameRH_Y:=23;
        VAR num nPntSpare24;
        VAR num nPntPark:=25;
        VAR num nPntSpare26:=26;
        VAR num nPntSpare27:=27;
        VAR num nPntSpare28:=28;
        VAR num nPntSpare29:=29;    
        VAR num nPntZero:=30;
        VAR num nApproPickLH:=1;
        VAR num nApproPickRH:=2;
        VAR num nApproLabelLH:=3;
        VAR num nApproLabelRH:=4;
        VAR num nApproPalletPos_LH:=5;
        VAR num nApproPalletPos_RH:=6;
        VAR num nApproPalletLH:=7;
        VAR num nApproPalletRH:=8;
        VAR num nApproPalletCtr_LH:=9;
        VAR num nApproPalletCtr_RH:=10;
        VAR num nApproSpare11:=11;
        VAR num nApproSpare12:=12;
        VAR num nApproSpare13:=13;
        VAR num nApproSpare14:=14;
        VAR num nApproSpare15:=15;
        VAR num nApproSpare16:=16;
        VAR num nApproSpare17:=17;    
        VAR num nApproPalletFrameLH_Origin:=18;
        VAR num nApproPalletFrameLH_X:=19;
        VAR num nApproPalletFrameLH_Y:=20;
        VAR num nApproPalletFrameRH_Origin:=21;
        VAR num nApproPalletFrameRH_X:=22;
        VAR num nApproPalletFrameRH_Y:=23;
        VAR num nApproSpare24;
        VAR num nApproPark:=25;
        VAR num nApproSpare26:=26;
        VAR num nApproSpare27:=27;
        VAR num nApproSpare28:=28;
        VAR num nApproSpare29:=29;    
        VAR num nApproZero:=30;      
        ! EOAT Modifiers    
        VAR num nToolWidth :=41.274;
        VAR num nToolHeight:=95.36;    
        ! Pallet Point Modifiers
        VAR num nLayerHeight :=196.8;
        VAR num nRowSpacing:=133.35;
        VAR num nColumnSpacing :=304.8;
    !**********************   End DEFINITIONS   **********************************     

  • lemster68
    lemster68 ✭✭✭
    Can you post your Backinfo file please?
    Lee Justice
  • Hi Alan,

    If I use your code in RobotStudio, the function is running. Only thing I cant test is "pLocPoint{nPntPalletCtr_RH}", array part.
    I cant figure out the definition of nPntPalletCtr_RH.

    But if for the test purposes I use


    Everything is working!!

    Also try using following example

    So in your case it would be

    If this is not working, then I would say its the issue in line
    Or later on in program..

    Please report if you fixed it, and what was the issue.


    "We're more aware of simple processes that don't work well than of complex ones that work flawlessly"

  • Afternoon, And thanks for assisting. At tpresent the Issue is when i attempt to goto these positions from the Pallet Center is says nope Out of reach. I can Jog directly there which for this conversation it is \Rz:=+90 and a Slight x and Y
    I can use the Goto from this position back to the Center and that works as well..

    To step back a little. my Original Config (Inverted and on a Rail (MOC) file data was incorrect causing the original thread o start, but i fear i still have some addditional issue i am un aware of causing my plight

  • Hi Alan,

    Jog and move instruction is not the same, also the movement of the robot is not the same if you use MoveJ, MoveL or MoveC.
    From your post, I would say that you can complete move with MoveJ, and I guess that with MoveL/MoveC instructions robot would need to go out of the Axis limits to complete the move. Which is not possible, so he gives error.

    Best regards,
    "We're more aware of simple processes that don't work well than of complex ones that work flawlessly"