Variable for home position (Kuka Krc4)

  • I am using the default home. I put the robot in the home position and check the variables "$ IN_HOME" or "$ OUT [1000]", but they are always in FALSE. The only way I found was to compare the variable "$ AXIS_ACT" with "XHOME" (config.dat). I don't know if there is another way.

  • System variables start with $

    XHOME is just a position variable but... it is not a system variable. you can make you own variable to be home position if you like....


    system variable that defines home position is $H_POS. since you are using XHOME as home position, XHOME value need to be copied to $H_POS

    1) read pinned topic: READ FIRST...

    2) if you have an issue with robot, post question in the correct forum section... do NOT contact me directly

    3) read 1 and 2

  • Note, the standard "Home" move included in the KRC's Normal Module template includes $H_POS = XHOME as part of the Inline Form, just to protect against issues like this. If you're writing "raw" KRL, rather than using the template, that might be one cause of the issue.

  • you can just use variable monitor to assign XHOME value to $H_POS.

    this only need to be done once unless you are manually transferring programs but not updating $CONFIG.DAT for example


    another option is to add at the top of the program

    $H_POS=XHOME

    this can be placed inside INI, and added into template file.


    and finally you can simply change first SPTP HOME to PTP HOME.

    this is not an approximated motion anyway (unless you change it) so by default will not have any effect on program execution even if all other motions are new motions.

    1) read pinned topic: READ FIRST...

    2) if you have an issue with robot, post question in the correct forum section... do NOT contact me directly

    3) read 1 and 2

  • I used the home default which is created automatically.


    Should I use the same home default as the cell.src program?

    Open the SPTP HOME Fold and look inside it. Unless something has changed, there should be a line inside it that sets $H_POS=XHOME.


    The trick here is that the Inline Form for the Home motion only updates XHOME when the TouchUp button is used. And XHOME is a "local " variable, stored in the program's .DAT file. So to ensure that $H_POS is updated whenever someone uses TouchUp on Home, that line is included.


    This makes ILF-programming on the pendant easier for novices. But there is one potential pitfall -- if you create multiple programs using the basic template, and TouchUp Home differently in each program, each one will re-assign $H_POS as it runs. Which can have unexpected side effects.

  • that is why it is best to stick with global XHOME which is a default anyway. most people know nothing about robots they use and are bound to make mistakes. goal should be to minimize mistakes.

    1) read pinned topic: READ FIRST...

    2) if you have an issue with robot, post question in the correct forum section... do NOT contact me directly

    3) read 1 and 2

Advertising from our partners