Setting $BASE parameter

  • I have a programming question. I am running krc 4.1.6. software and need to set my base to use external kinematics. In the newer versions you set by $BASE = Base_data[17], but in the older version base data only goes to 16 and external kinematics are setup via another parameter, so does anyone know what the command is?
    Thanks

  • Can you please indicate what variables must be defined in config.dat file?
    I am in the same situation with bmike.


    Can you attach any config.dat for external axis?


    EK command must be defined in each src program file?


    If I have 80 files ?


    Ty

  • Just take a look at method


    DEF EX_BASE (BASE_NO :IN , MACH_IDX : IN)


    of bas.src. It pretty much shows how the $config.dat values are used. Using this information and my prevoius post you would be able to use a e.g. call


    EX_BASE(13,5)


    call in your programs to activate geometric coupling for base 13 and machine 5 according to you $config.dat.


    Fubini

  • Fubini,


    Can you check if next definition is right ? On your explained logic I tried to configure my rotary table, only one axis, vertical (x) from CAM reason asked for 4 axis strategy .


    In file.src i should have:


    DEF EX_BASE(17,2)
    INT 17 , 2
    $BASE=EK(MACHINE_DEF[2].ROOT, MACHINE_DEF[2].MECH_TYPE,BASE_DATA[17]:{x 0.0,y 0.0, z 0.0, a 0.0, b -90.0, c 0,0)) x axis must be vertical
    $ACT_BASE=17
    Base 17 is defined in reference to EASYS frame, center of rotary flange as I understood and not in reference to world frame of robot.
    IN config.dat I should have:


    MACHINE_DEF[1]={NAME[]"Robot",COOP_KRC_INDEX 1,PARENT[] "WORLD",ROOT {x 0.0,y 0.0,z 0.0,a 0.0,b 0.0,c 0.0},MECH_TYPE #ROBOT,GEOMETRY[] " "}


    MACHINE_DEF[2]={NAME[]"RV450",COMP_KRC_INDEX 1,PARENT[]" ",ROOT[x 0.0, y -2500.0,z -700,0,a 0.0,b 0.0,c.0},MECH_TYPE#EASYS,GEOMETRY[]" "}


    MACHINE_FRAME_DAT[17]={MACH_DEF_INDEX2,PARENT[]"RV450",GEOMETRY" "}


    I thinks this is correct variables setting in config.dat file for 7 th axis turntable. For my table positioning.
    I just got a config.dat from someone .

    Edited once, last by signum ().

  • Hi,


    looks ok for me. Of course I can not state wether you external kinematic set up is don correct. It is always easier to just check it out. Set the TCP close to your external axis and activate your base. Then cartesian jog the external axis. The Robot should stay at the same Position in relation to your external axis base (visually and $pos_act stands still).


    Fubini

    Edited once, last by Fubini ().

  • Can someone check if syntax of this src head file has well defined external axis base and EK command?
    Only as syntax.



    &ACCESS RVE
    DEF DEGRO1( )
    ;FOLD INI;%{PE}%V3.2.0,%MKUKATPBASIS,%CINIT,%VCOMMON,%P
    ;FOLD BAS INI;%{E}%V3.2.0,%MKUKATPBASIS,%CINIT,%VINIT,%P
    GLOBAL INTERRUPT DECL 3 WHEN $STOPMESS==TRUE DO IR_STOPM ( )
    INTERRUPT ON 3
    BAS (#INITMOV,0 )
    ;ENDFOLD (BAS INI)
    ;ENDFOLD (INI)
    DEF EX_BASE(BASE_NO :IN,MACH_IDX :IN)
    INT BASE_NO , MACH_IDX
    END
    BAS(#VEL_PTP, 10)
    BAS(#ACC_PTP, 10)
    PTP $POS_ACT
    EX_BASE(17,2)
    INT 17,2
    $APO.CDIS=0.1
    $APO.CORI=1
    $APO.CVEL=100
    $APO.CPTP=50
    BAS(#VEL_PTP, 75)
    $IPO_MODE=#BASE
    $BASE=EK(MACHINE_DEF[2].ROOT, MACHINE_DEF[2].MECH_TYPE,BASE_DATA[17]:{x 0.0,y 0.0, z 0.0, a 0.0, b -90.0, c 0,0))
    $ACT_BASE=17
    $TOOL=TOOL_DATA[1]
    $VEL.CP=0.083
    LIN {X 860,Y 0, Z 360.25, A 93.92, B 0, C 0, E1 -137.71} C_VEL
    LIN {X 860,Y 0, Z 250, A 93.92, B 0, C 0, E1 -137.71} C_VEL
    $VEL.CP=0.167
    LIN {X 860,Y 0, Z 250, A 93.92, B 0, C 0, E1 -137.71} C_VEL
    LIN {X 860,Y -7.93, Z 249.87, A 93.92, B -1.81, C -0.12, E1 -139.53} C_VEL
    LIN {X 860,Y -15.86, Z 249.5, A 93.93, B -3.63, C -0.25, E1 -141.34} C_VEL
    LIN {X 860,Y -23.76, Z 248.87, A 93.94, B -5.44, C -0.37, E1 -143.16} C_VEL
    LIN {X 860,Y -31.65, Z 247.99, A 93.95, B -7.26, C -0.5, E1 -144.98} C_VEL

  • Probably you never did expert programming before. Please read the System Integrators Manual for more on this stuff. Just a quick hack, that probably get you furthrt but will not yet solve all your Problems:



    &ACCESS RVE
    DEF DEGRO1( )
    ;FOLD INI;%{PE}%V3.2.0,%MKUKATPBASIS,%CINIT,%VCOMMON,%P
    ;FOLD BAS INI;%{E}%V3.2.0,%MKUKATPBASIS,%CINIT,%VINIT,%P
    GLOBAL INTERRUPT DECL 3 WHEN $STOPMESS==TRUE DO IR_STOPM ( )
    INTERRUPT ON 3
    BAS (#INITMOV,0 )
    ;ENDFOLD (BAS INI)
    ;ENDFOLD (INI)
    BAS(#VEL_PTP, 10)
    BAS(#ACC_PTP, 10)
    PTP $POS_ACT
    $APO.CDIS=0.1
    $APO.CORI=1
    $APO.CVEL=100
    $APO.CPTP=50
    BAS(#VEL_PTP, 75)
    $IPO_MODE=#BASE
    $TOOL=TOOL_DATA[1]
    $VEL.CP=0.083
    EX_BASE(17,2)
    LIN {X 860,Y 0, Z 360.25, A 93.92, B 0, C 0, E1 -137.71} C_VEL
    LIN {X 860,Y 0, Z 250, A 93.92, B 0, C 0, E1 -137.71} C_VEL
    $VEL.CP=0.167
    LIN {X 860,Y 0, Z 250, A 93.92, B 0, C 0, E1 -137.71} C_VEL
    LIN {X 860,Y -7.93, Z 249.87, A 93.92, B -1.81, C -0.12, E1 -139.53} C_VEL
    LIN {X 860,Y -15.86, Z 249.5, A 93.93, B -3.63, C -0.25, E1 -141.34} C_VEL
    LIN {X 860,Y -23.76, Z 248.87, A 93.94, B -5.44, C -0.37, E1 -143.16} C_VEL
    LIN {X 860,Y -31.65, Z 247.99, A 93.95, B -7.26, C -0.5, E1 -144.98} C_VEL
    ...
    END


    DEF EX_BASE(BASE_NO :IN,MACH_IDX :IN)
    INT BASE_NO , MACH_IDX
    $BASE=EK(MACHINE_DEF[MACH_IDX].ROOT, MACHINE_DEF[MACH_IDX].MECH_TYPE,BASE_DATA[BASE_NO]:{x 0.0,y 0.0, z 0.0, a 0.0, b -90.0, c 0,0))
    $ACT_BASE=BASE_NO
    END





    Report to moderator Logged

  • This Version works:


    DEF TEST( )
    ;FOLD INI;%{PE}%V3.2.0,%MKUKATPBASIS,%CINIT,%VCOMMON,%P
    ;FOLD BAS INI;%{E}%V3.2.0,%MKUKATPBASIS,%CINIT,%VINIT,%P
    GLOBAL INTERRUPT DECL 3 WHEN $STOPMESS==TRUE DO IR_STOPM ( )
    INTERRUPT ON 3
    BAS (#INITMOV,0 )
    ;ENDFOLD (BAS INI)
    ;ENDFOLD (INI)
    BAS(#VEL_PTP, 10)
    BAS(#ACC_PTP, 10)
    PTP $POS_ACT
    $APO.CDIS=0.1
    $APO.CORI=1
    $APO.CVEL=100
    $APO.CPTP=50
    BAS(#VEL_PTP, 75)
    $IPO_MODE=#BASE
    $TOOL=TOOL_DATA[1]
    $VEL.CP=0.083
    EX_BASE(17,2)
    LIN {X 860,Y 0, Z 360.25, A 93.92, B 0, C 0, E1 -137.71} C_VEL
    LIN {X 860,Y 0, Z 250, A 93.92, B 0, C 0, E1 -137.71} C_VEL
    $VEL.CP=0.167
    LIN {X 860,Y 0, Z 250, A 93.92, B 0, C 0, E1 -137.71} C_VEL
    LIN {X 860,Y -7.93, Z 249.87, A 93.92, B -1.81, C -0.12, E1 -139.53} C_VEL
    LIN {X 860,Y -15.86, Z 249.5, A 93.93, B -3.63, C -0.25, E1 -141.34} C_VEL
    LIN {X 860,Y -23.76, Z 248.87, A 93.94, B -5.44, C -0.37, E1 -143.16} C_VEL
    LIN {X 860,Y -31.65, Z 247.99, A 93.95, B -7.26, C -0.5, E1 -144.98} C_VEL
    END


    DEF EX_BASE(BASE_NO :IN,MACH_IDX :IN)
    INT BASE_NO , MACH_IDX
    MY_FRAME = BASE_DATA[BASE_NO]:{x 0.0,y 0.0, z 0.0, a 0.0, b -90.0, c 0.0}
    $BASE=EK(MACHINE_DEF[MACH_IDX].ROOT, MACHINE_DEF[MACH_IDX].MECH_TYPE,BASE_DATA[BASE_NO]:{x 0.0,y 0.0, z 0.0, a 0.0, b -90.0, c 0.0})
    $ACT_BASE=BASE_NO
    END


    Please note that I will not be able to do your work. Read a about expert programming and especially krl-sytax. In your case the error messages pretty cleary stated the problems: in line


    $BASE=EK(MACHINE_DEF[MACH_IDX].ROOT, MACHINE_DEF[MACH_IDX].MECH_TYPE,BASE_DATA[BASE_NO]:{x 0.0,y 0.0, z 0.0, a 0.0, b -90.0, c 0.0})


    you wrote "c 0,0)" instead of "c 0.0}"


    In my previous correction i only corrected your wrong subroutine calls and did not check for syntax on a real controller.


    Fubini

    Edited once, last by Fubini ().

  • Thank you Fubini.
    Quick question: I know you stated that external kinematic bases were stored in base_data[17 ...] but in my case this is not true. In the older KRC version there is no Base_date[17], it only goes to 16 and the external Kinematic data is stored in EX_AX_DATA[1...6] parameter. So, can anyone tell my the syntax for using it?


    Thanks

  • Thank you Fubini, this last version is ok, I got no error compilation with it.
    Robot arm is getting wrong though, but probably is a matter of kinematics, base frame,....machine definition. I will check all.
    Important is that syntax is ok and tool is going toward base 17. Tool orientation is not good.

  • Hi bmike,


    looking into bas.src reveals in the older versions (V4.1.7) syntax was:


    $BASE=EK(EX_AX_DATA[EX_AX_NO].ROOT,EX_AX_DATA[EX_AX_NO].EX_KIN,EX_AX_DATA[EX_AX_NO].OFFSET)


    so it is pretty much the same as in newer versions:


    $BASE=EK(MACHINE_DEF[MACH_IDX].ROOT,MACHINE_DEF[MACH_IDX].MECH_TYPE,BASE_DATA[BASE_NO])


    So basically the offset is not stored in BASE_DATA[17...] but in EX_AX_DATA[EX_AX_NO].OFFSET


    Fubini

  • Fubini,


    Can you check my file please, I tried last version from you which suposed to work but robot still goes wrong.
    Have you possibility maybe to test on a robot and let me know?
    Thank you very much.



    &ACCESS RVE
    DEF DEGRO1( )
    ;FOLD INI;%{PE}%V3.2.0,%MKUKATPBASIS,%CINIT,%VCOMMON,%P
    ;FOLD BAS INI;%{E}%V3.2.0,%MKUKATPBASIS,%CINIT,%VINIT,%P
    GLOBAL INTERRUPT DECL 3 WHEN $STOPMESS==TRUE DO IR_STOPM ( )
    INTERRUPT ON 3
    BAS (#INITMOV,0 )
    ;ENDFOLD (BAS INI)
    ;ENDFOLD (INI)



    BAS(#VEL_PTP, 10)
    BAS(#ACC_PTP, 10)
    PTP $POS_ACT
    $APO.CDIS=0.1
    $APO.CORI=1
    $APO.CVEL=100
    $APO.CPTP=50
    BAS(#VEL_PTP, 75)
    $IPO_MODE=#BASE
    $TOOL=TOOL_DATA[1]
    $VEL.CP=0.083
    EX_BASE(17,2)
    LIN {X 2273.13,Y 889.88, Z 488.05, A -2.44, B -37.39, C -27.13, E1 0} C_VEL
    LIN {X 422.11,Y 77.03, Z 934.75, A -134.85, B 11.65, C -90, E1 62.7} C_VEL
    LIN {X 422.11,Y 77.03, Z -12.22, A -134.85, B 11.65, C -90, E1 62.7} C_VEL
    LIN {X 415.01,Y 84.08, Z -12.22, A -134.85, B 11.65, C -90, E1 62.71} C_VEL
    LIN {X 407.92,Y 91.13, Z -12.22, A -134.85, B 11.65, C -90, E1 62.72} C_VEL
    $VEL.CP=0.167
    LIN {X 407.93,Y 91.13, Z -12.26, A -134.85, B 11.65, C -90, E1 62.72} C_VEL
    LIN {X 407.98,Y 91.18, Z -12.64, A -134.85, B 11.65, C -90, E1 62.7} C_VEL
    LIN {X 408.11,Y 91.31, Z -12.98, A -134.85, B 11.65, C -90, E1 62.66} C_VEL
    LIN {X 408.3,Y 91.51, Z -13.25, A -134.85, B 11.65, C -90, E1 62.58} C_VEL
    LIN {X 408.55,Y 91.76, Z -13.43, A -134.85, B 11.65, C -90, E1 62.5} C_VEL
    LIN {X 408.82,Y 92.03, Z -13.5, A -134.85, B 11.65, C -90, E1 62.4} C_VEL
    $VEL.CP=0.2
    LIN {X 409.17,Y 92.39, Z -13.5, A -134.72, B 11.65, C -90, E1 62.27} C_VEL
    LIN {X 409.52,Y 92.74, Z -13.5, A -134.59, B 11.65, C -90, E1 62.14} C_VEL
    LIN {X 409.87,Y 93.1, Z -13.5, A -134.46, B 11.65, C -90, E1 62.01} C_VEL
    LIN {X 410.22,Y 93.46, Z -13.5, A -134.33, B 11.65, C -90, E1 61.89} C_VEL
    LIN {X 410.57,Y 93.82, Z -13.5, A -134.21, B 11.65, C -90, E1 61.76} C_VEL
    LIN {X 410.92,Y 94.17, Z -13.5, A -134.08, B 11.65, C -90, E1 61.63} C_VEL
    ..........
    LIN {X 204.81,Y 469.4, Z -40.5, A 11.64, B 11.65, C -90, E1 -84.09} C_VEL
    LIN {X 205.79,Y 469.6, Z -40.5, A 11.38, B 11.65, C -90, E1 -83.83} C_VEL
    LIN {X 206.77,Y 469.79, Z -40.5, A 11.13, B 11.65, C -90, E1 -83.58} C_VEL
    LIN {X 207.76,Y 469.98, Z -40.5, A 10.87, B 11.65, C -90, E1 -83.32} C_VEL
    LIN {X 208.74,Y 470.17, Z -40.5, A 10.61, B 11.65, C -90, E1 -83.06} C_VEL
    END


    DEF EX_BASE(BASE_NO :IN,MACH_IDX :IN)
    INT BASE_NO , MACH_IDX
    MY_FRAME = BASE_DATA[BASE_NO]:{x -250.0,y -250.0, z 1000.0, a 0.0, b 0.0, c 0.0}
    $BASE=EK(MACHINE_DEF[MACH_IDX].ROOT, MACHINE_DEF[MACH_IDX].MECH_TYPE,BASE_DATA[BASE_NO]:{x -250.0,y -250.0, z 1000.0, a 0.0, b 0.0, c 0.0})
    $ACT_BASE=BASE_NO
    END

Advertising from our partners