I am using the default home. I put the robot in the home position and check the variables "$ IN_HOME" or "$ OUT ", 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.
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.
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.