While homing, the Axis moves in the positive direction, reaching the sensor but it never stops. The homing sensor changes from FALSE to TRUE and then FALSE.
I’m using the Trigger 1 input of my Acopos as my Homing Switch.
I have used mappCockpit to check the status of the digital inputs. As you can see in the picture below, the input Trigger 1 is TRUE when the sensor is reached, and the Homing Switch Variable takes the value of Trigger 1. So, I’m reading the correct reaction of the sensor.
you use the mode “Limit Switch”. This means a limit switch like the positive or negative end-switch. If you want to use the homing switch as in your screenshot from the configuration and mappCockpit you have tu use the mode mcHOMING_ABSOLUTE_SWITCH.
Thanks, for your reply. That’s interesting, using the ACP10.
In my case, I’m using mapp and after correcting the mode to mcHOMING_ABSOLUTE_SWITCH and selecting the right homing variant, I was able to reproduce this:
The axis moves in the positive direction using StartVelocity.
When the sensor is reached (FALSE to TRUE), the axis moves in the negative direction using HomingVelocity.
When the sensor is not detected (TRUE to FALSE), the axis moves again in the positive direction using HomingVelocity.
When the sensor is detected again (FALSE to TRUE), the axis stops with the sensor in TRUE.
The Homing Position is set in the Positive Edge of the sensor.
When homing if the sensor is TRUE:
The axis moves in the negative direction using StartVelocity.
When the sensor is not detected (TRUE to FALSE), the axis moves in the positive direction using HomingVelocity.
When the sensor is detected (FALSE to TRUE), the axis stops with the sensor in TRUE.
The Homing Position is set in the Positive Edge of the sensor.
Basically, it is doing something similar to your code, but all the described sequence is done automatically by the mpAxisBasic function. I just wait until the sequence is done or aborted.