[RMP 8.1.3]
I’m trying to home to a network I/O, using HomeLimitCustomConfigSet(). I observe different behavior when I explicitly set Axis::HomeTravelDistanceSet.
If I don’t call it, homing completes as normal. If I call it, stage two never recognized that the I/O has gone low, and it just keeps moving in the reverse direction (forever? I’ve never been that patient).
Here’s what I’m doing:
for (auto& stage : std::vector<r::RSIHomeStage>{r::RSIHomeStageSTAGE_ONE, r::RSIHomeStageSTAGE_TWO,
r::RSIHomeStageSTAGE_THREE, r::RSIHomeStageSTAGE_FOUR}) {
axis->HomeVelocitySet(stage,HOME_VELOCITY);
axis->HomeAccelerationSet(stage,HOME_ACCEL);
axis->HomeDecelerationSet(stage,HOME_DECEL);
axis->HomeJerkPercentSet(stage,HOME_JERK_PCT);
axis->HomeTravelDistanceSet(stage, HOME_TRAVEL_DISTANCE);
}
I haven’t tried the various permutations of stages. I’m just setting the same values for every stage.
If I comment out that last call, stage two behaves as I would expect (and as customEtherCATHome.cpp behaves).
customEtherCATHome.cpp behaves correctly, though it never calls HomeTravelDistanceSet(). If I add (four) call(s) to customEtherCATHome.cpp, it fails to notice the I/O change in stage two.
Here’s the trace when no travel distance is set:
(0:49:59.391) Axis (0) Home Method Rising Home (19). Home Stage (Stage Two) Home Switch Initial State (False)
(0:49:59.391) Axis (0) Home to Move to (Home) seeking state (True) with direction (Positive). Home Stage(Stage Two)
(0:49:59.403) Axis (0) Starting Velocity SCurve Move at Velocity (1.000000), Accel (1.000000), and Jerk (100.000000)
(0:50:2.10) Axis (0) Limit Found
(0:50:2.510) Axis (0) Home to Move to Switch(Home) with direction (Negative). Home Stage(Stage Two)
(0:50:2.524) Axis (0) Starting Velocity SCurve Move at Velocity (-1.000000), Accel (1.000000), and Jerk (100.000000)
(0:50:3.991) Axis (0) HomePositionSet()
(0:50:4.3) Axis (0) Home Moving to Zero. MoveSCurve with Velocity (1.000000), Accel (1.000000), Decel (1.000000), and Jerk (100.000000)
Here’s the corresponding trace when I set a travel distance:
(0:50:33.49) Axis (0) Home Method Rising Home (19). Home Stage (Stage Two) Home Switch Initial State (False)
(0:50:33.49) Axis (0) Home to Move to (Home) seeking state (True) with direction (Positive). Home Stage(Stage Two)
(0:50:33.61) Axis (0) Starting Velocity SCurve Move at Velocity (1.000000), Accel (1.000000), and Jerk (100.000000)
(0:50:36.364) Axis (0) Limit Found
(0:50:36.865) Axis (0) Home to Move to Switch(Home) with direction (Negative). Home Stage(Stage Two)
(0:50:36.879) Axis (0) Starting Velocity SCurve Move at Velocity (-1.000000), Accel (1.000000), and Jerk (100.000000)
It doesn’t seem to matter what I set the travel distance to (zero/nonzero), though I’ve only tried 0 and 1000.0.