1. Home
    1. Dashboard
    2. Search
  2. Forum
    1. Unresolved Threads
    2. Members
      1. Recent Activities
      2. Users Online
      3. Team Members
      4. Search Members
      5. Trophys
  3. Articles
  4. Blog
  5. Videos
  6. Jobs
  7. Shop
    1. Orders
  • Login or register
  • Search
This Thread
  • Everywhere
  • This Thread
  • This Forum
  • Articles
  • Pages
  • Forum
  • Blog Articles
  • Products
  • More Options
  1. Robotforum - Support and discussion community for industrial robots and cobots
  2. Forum
  3. Industrial Robot Support and Discussion Center
  4. KUKA Robot Forum
Your browser does not support videos RoboDK Software for simulation and programming
Visit our Mainsponsor
IRBCAM
Robotics Channel
Robotics Training
Advertise in robotics
Sponsored Ads

Base change issue

  • Marco
  • December 9, 2016 at 11:28 AM
  • Thread is Resolved
  • Marco
    Reactions Received
    3
    Trophies
    3
    Posts
    116
    • December 9, 2016 at 11:28 AM
    • #1

    Hello Everyone,
    I'm monitoring the actual base with the $ACT_BASE variable while running a program and I noticed that the base value is not changing to base 1 as supposed but the variable monitor shows 0 (I've set the continuous update of the monitor with the shift+enter). Here is my code, I do not see what is wrong. Can you help me with this?
    Very Best,
    Marco

    Code
    DEF BCT_A()
    GLOBAL INTERRUPT DECL 3 WHEN $STOPMESS==TRUE DO IR_STOPM ( )
    INTERRUPT ON 3
    BAS (#INITMOV,0)
    
    
    $LOAD=LOAD_DATA[1]
    $BASE=BASE_DATA[1]
    $TOOL=TOOL_DATA[2]
    HSD_LOGIC_SET=5
    $OUT[13] = FALSE
    HSD_SPEED_SET=0
    $TIMER[10] = -10000
    $TIMER_STOP[10] = FALSE
    WHILE NOT $TIMER_FLAG[10]
    ENDWHILE
    
    
    $VEL_AXIS[1]=15
    $VEL_AXIS[2]=15
    $VEL_AXIS[3]=15
    $VEL_AXIS[4]=15
    $VEL_AXIS[5]=15
    $VEL_AXIS[6]=15
    $ACC_AXIS[1]=70
    $ACC_AXIS[2]=70
    $ACC_AXIS[3]=70
    $ACC_AXIS[4]=70
    $ACC_AXIS[5]=70
    $ACC_AXIS[6]=70
    $VEL.CP=0.167
    $ACC.CP=2.3
    $VEL.ORI1=200
    $VEL.ORI2=200
    $ACC.ORI1=100
    $ACC.ORI2=100
    $advance=5
    $APO.CDIS=0.2
    
    
    PTP $POS_ACT
    $VEL.CP=0.167
    PTP {A1 46.934, A2 -35.843, A3 121.072, A4 0.105, A5 -85.313, A6 -0.016, E1 0, E2 0, E3 0, E4 0, E5 0, E6 0}
    LIN {X -0.188, Y 0.03, Z 100, A 133.204, B 0.086, C 179.933} C_DIS
    $VEL.CP=0.008
    LIN {X -0.038, Y 0.006, Z 20, A 133.204, B 0.086, C 179.933} C_DIS
    LIN {X 1499.959, Y 0.871, Z 22.828, A 152.602, B 0.104, C 179.965} C_DIS
    $VEL.CP=0.167
    LIN {X 1499.809, Y 0.895, Z 102.827, A 152.602, B 0.104, C 179.965} C_DIS
    HSD_SPEED_SET=0
    $TIMER[10] = -10000
    $TIMER_STOP[10] = FALSE
    WHILE NOT $TIMER_FLAG[10]
    ENDWHILE
    
    
    PTP {A1 0.000, A2 -100.000, A3 120.000, A4 0.000, A5 -20.000, A6 0.000, E1 0, E2 0, E3 0, E4 0, E5 0, E6 0}
    END
    Display More

    I'm running the program above through this program

    Code
    DEF alo_processing_cam_A( )
    
    ; --- DECLARATIONS ---
      DECL INT s,a
      s = 10
      a = 70
    
    ; --- INITIALIZATION
      $base = $world
      $tool = TOOL_DATA[1]
      $load = LOAD_DATA[1]
      $vel_axis[1]=s
      $vel_axis[2]=s
      $vel_axis[3]=s
      $vel_axis[4]=s
      $vel_axis[5]=s
      $vel_axis[6]=s
      $acc_axis[1]=a
      $acc_axis[2]=a
      $acc_axis[3]=a
      $acc_axis[4]=a
      $acc_axis[5]=a
      $acc_axis[6]=a
      ;$vel.cp = 2
      ;$vel.ori1 = 0.3
      ;$vel.ori2 = 0.3
      ;$acc.ori1 = 2
      ;$acc.ori2 = 2
      ;$advance = 2
    
    
      $OUT[6] = TRUE
      $OUT[7] = FALSE
    
    
    ; --- MAIN
    
      $OUT[9] = TRUE            ;com led on 
      WAIT FOR HSD_SPEED_IN < 50
      PTP $POS_ACT
      ;LIN_REL {Z 100}
      PTP XHOME             
      $OUT[9]=FALSE             ;com led off
    
    
      
    ; specify interrupt level and program name to call
    ; when PAUSE button is pressed... (wired to $IN[7])
    
    
      INTERRUPT DECL 10 WHEN $OUT[7] DO MoveAway()
    
    ;activate interrupt
      INTERRUPT ON 10
    
    ;enable fieldbus reference values for HSD
      $OUT[10] = TRUE
    
    
    ; pick tool
    ; PT0101()
    
    
    ; call CAM program to execute 
    BCT_A() 
    
    
    ; release tool
    ; RT0101()
    
    
      
    
    
    ; after milling program is finished, deactivate interrupt...
      INTERRUPT OFF 10
    
    
      HSD_LOGIC_SET = 5
      HSD_sPEED_SET = 0
      HSD_LOGIC_SET = 0
      $OUT[9] = TRUE
      WAIT FOR HSD_SPEED_IN < 50
      PTP XHOME 
      $OUT[9] = FALSE
      $OUT[6] = FALSE
      $OUT[10] = FALSE
    
    END
    
    
    DEF MoveAway()
      BRAKE ; need to pause current robot motion
      $OUT[10] = FALSE ;fieldbus reference values
      $VEL.CP = 0.005
      $ACC.CP = 0.01
    
    
      LIN_REL {Z 50} ; move robot up 
      $TIMER[12] = -10000
      $TIMER_STOP[12] = FALSE
      WHILE NOT $TIMER_FLAG[12]
      ENDWHILE
    
    
      WAIT FOR NOT $OUT[7] ; wait until PAUSE is released
    
    
      $OUT[10] = TRUE ;fieldbus reference values
    
    
      $TIMER[13] = -10000
      $TIMER_STOP[13] = FALSE
      WHILE NOT $TIMER_FLAG[13]
      ENDWHILE
    
    
      LIN $POS_RET  ; return to last position to resume work
    END
    Display More

    Kuka KR150-2 KRC2 ed05 V5.6.11<br />VFD TDE Macno<br />Spindle HSD ES915 with Automatic tool changer<br />Sprutcam 11

    Edited once, last by Marco (December 9, 2016 at 11:50 AM).

  • Fubini
    Reactions Received
    272
    Trophies
    9
    Posts
    1,873
    • December 9, 2016 at 11:44 AM
    • #2

    The value of $ACT_BASE is only adapted if you use inlineforms! Actually the bas.src sets it whenever a base is set using the inline forms. So in expert programs you will have to set it yourself.

    Fubini

  • Marco
    Reactions Received
    3
    Trophies
    3
    Posts
    116
    • December 9, 2016 at 11:54 AM
    • #3

    You mean that the $ACT_BASE is not actually showing the base value changing during the run if there is change of the base along the program? I did some test and it seems that the value changes :wallbash:

    Kuka KR150-2 KRC2 ed05 V5.6.11<br />VFD TDE Macno<br />Spindle HSD ES915 with Automatic tool changer<br />Sprutcam 11

    Edited once, last by Marco (December 9, 2016 at 12:02 PM).

  • Fubini
    Reactions Received
    272
    Trophies
    9
    Posts
    1,873
    • December 9, 2016 at 12:12 PM
    • #4

    Yes it changes if and only if you use inline forms.

    Fubini

  • Marco
    Reactions Received
    3
    Trophies
    3
    Posts
    116
    • December 9, 2016 at 12:17 PM
    • #5

    OK then there is something strange going on here with the base:

    I have base 1 with Z=-36.787
    my digital model from which I get the CAM has the 0 at Z=-36.787
    I program the linear movement you have in the program above from point A to B with A at Z=20
    I run the program and stop it in A and the $POS_ACT shows Z=20
    I measure with the caliper the distance of the tool tip from the base and I get a measure of Z = 17.59
    $ACT_base shows value 0 rather then 1 (as programmed) during the run and after stop
    I leave the robot in the same position, I deselect the program, I set the tool (2) and the base (1) as from the program using the configure menu
    I go to the variable monitor and $pos_act shows Z= 17.59709 which matches with my measure done with the caliper

    So my conclusion is that the base loaded to run the program is not the right one. Am I right? Is my program syntax wrong?

    Kuka KR150-2 KRC2 ed05 V5.6.11<br />VFD TDE Macno<br />Spindle HSD ES915 with Automatic tool changer<br />Sprutcam 11

  • Fubini
    Reactions Received
    272
    Trophies
    9
    Posts
    1,873
    • December 9, 2016 at 12:22 PM
    • #6

    NO. Your program probably is fine. The value of $ACT_BASE is only changed when you use inline forms and yes also if you use the menu to choose the current base (I forgot about this case). The base is set correct.

    Fubini

    Edited once, last by Fubini (December 9, 2016 at 12:24 PM).

  • Spl
    Reactions Received
    5
    Trophies
    3
    Posts
    178
    • December 9, 2016 at 12:31 PM
    • #7

    Try the linear move without the c_dis approximation. Also, instead of $base = ... you could use bas(#base,1) to set the base.

  • Marco
    Reactions Received
    3
    Trophies
    3
    Posts
    116
    • December 9, 2016 at 12:55 PM
    • #8

    Ok, now I used bas (#base,1) but still the same result, I stop the robot at point A and Z is 17.59 measured with the caliper while $pos_act says Z= 20. Then $pos_act says Z=17.59 if I check again the monitor after I deselect the program (the robot is still in the same position), set manually the tool and base with the same values i should have to run my program ... :wallbash:

    (btw the $act_base in the monitor is now changing from 0 to 1 while the program runs),

    Kuka KR150-2 KRC2 ed05 V5.6.11<br />VFD TDE Macno<br />Spindle HSD ES915 with Automatic tool changer<br />Sprutcam 11

    Edited once, last by Marco (December 9, 2016 at 12:57 PM).

  • kr16_2
    Reactions Received
    3
    Trophies
    4
    Posts
    378
    • December 9, 2016 at 3:05 PM
    • #9

    $act_base is responsible for the little display icon that you are watching.
    Your program is working the way you want it.

    If you set $base = base_data[1] KRC is using base1 from now on.
    Your display is not changign because your are not setting it.

    Do this in your program:
    $base=base_data[4] ; sets the actual base
    $act_base=4 ; set value on user display

    If you are not sure what is going on continuously monitor $base variable to make sure it is not switching.

    Edited once, last by kr16_2 (December 9, 2016 at 3:07 PM).

  • Marco
    Reactions Received
    3
    Trophies
    3
    Posts
    116
    • December 19, 2016 at 4:42 PM
    • #10
    Quote from Spl


    Try the linear move without the c_dis approximation. Also, instead of $base = ... you could use bas(#base,1) to set the base.

    I there,
    I solved the issue using bas (#base,basenumber) and I also had to use bas (#tool,toolnumber). I don't know why it works fine in this way and not with the other syntax $BASE=BASE_DATA[1] and $TOOL=TOOL_DATA[2].

    Does BAS work also for BAS (#load,loadnumber)?

    Anyway, it works. Thanks for your help!
    Best,
    Marco

    Kuka KR150-2 KRC2 ed05 V5.6.11<br />VFD TDE Macno<br />Spindle HSD ES915 with Automatic tool changer<br />Sprutcam 11

  • SkyeFire
    Reactions Received
    1,044
    Trophies
    12
    Posts
    9,391
    • December 19, 2016 at 11:15 PM
    • #11

    Examining BAS.SRC will show you all the options it accepts. Usually, the #TOOL option (which is called as a normal extension of #FRAMES, which is normally called as an extension of #PARAMS) sets the $TOOL, $ACT_TOOL, and $LOAD values.

Advertising from our partners

IRBCAM
Robotics Channel
Robotics Training
Advertise in robotics
Advertise in Robotics
Advertise in Robotics

Job Postings

  • Anyware Robotics is hiring!

    yzhou377 February 23, 2025 at 4:54 AM
  • How to see your Job Posting (search or recruit) here in Robot-Forum.com

    Werner Hampel November 18, 2021 at 3:44 PM
Your browser does not support videos RoboDK Software for simulation and programming

Tag Cloud

  • abb
  • Backup
  • calibration
  • Communication
  • CRX
  • DCS
  • dx100
  • dx200
  • error
  • Ethernet
  • Ethernet IP
  • external axis
  • Fanuc
  • help
  • hmi
  • I/O
  • irc5
  • IRVIsion
  • karel
  • kawasaki
  • KRC2
  • KRC4
  • KRC 4
  • KRL
  • KUKA
  • motoman
  • Offset
  • PLC
  • PROFINET
  • Program
  • Programming
  • RAPID
  • robodk
  • roboguide
  • robot
  • robotstudio
  • RSI
  • safety
  • Siemens
  • simulation
  • SPEED
  • staubli
  • tcp
  • TCP/IP
  • teach pendant
  • vision
  • Welding
  • workvisual
  • yaskawa
  • YRC1000

Thread Tag Cloud

  • abb
  • Backup
  • calibration
  • Communication
  • CRX
  • DCS
  • dx100
  • dx200
  • error
  • Ethernet
  • Ethernet IP
  • external axis
  • Fanuc
  • help
  • hmi
  • I/O
  • irc5
  • IRVIsion
  • karel
  • kawasaki
  • KRC2
  • KRC4
  • KRC 4
  • KRL
  • KUKA
  • motoman
  • Offset
  • PLC
  • PROFINET
  • Program
  • Programming
  • RAPID
  • robodk
  • roboguide
  • robot
  • robotstudio
  • RSI
  • safety
  • Siemens
  • simulation
  • SPEED
  • staubli
  • tcp
  • TCP/IP
  • teach pendant
  • vision
  • Welding
  • workvisual
  • yaskawa
  • YRC1000
  1. Privacy Policy
  2. Legal Notice
Powered by WoltLab Suite™
As a registered Member:
* You will see no Google advertising
* You can translate posts into your local language
* You can ask questions or help the community with your knowledge
* You can thank the authors for their help
* You can receive notifications of replies or new topics on request
* We do not sell your data - we promise

JOIN OUR GREAT ROBOTICS COMMUNITY.
Don’t have an account yet? Register yourself now and be a part of our community!
Register Yourself Lost Password
Robotforum - Support and discussion community for industrial robots and cobots in the WSC-Connect App on Google Play
Robotforum - Support and discussion community for industrial robots and cobots in the WSC-Connect App on the App Store
Download