Skip to content

Commit

Permalink
Merge pull request pcdshub#219 from NSLentz/fix-4.1.0-bug-target-pos
Browse files Browse the repository at this point in the history
Fixed bug with NC Target position not playing nice with how ioc comm…
  • Loading branch information
NSLentz authored Jun 4, 2024
2 parents 55e38da + 9ebd660 commit 36ab7c2
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -143,8 +143,8 @@ ffNoGoal(
IF bLockBounds THEN
// Prevent forward/backward motion if the position of the axis is outside of the upper/lower bounds respectively.
// Prevent forward/backward motion if the command to the axis is outside of the upper/lower bounds respectively.
bForwardEnabled := stMotionStage.Axis.NcToPlc.ActPos < fUpperPos AND stMotionStage.Axis.NcToPlc.TargetPos < fUpperPos;
bBackwardEnabled := stMotionStage.Axis.NcToPlc.ActPos > fLowerPos AND stMotionStage.Axis.NcToPlc.TargetPos > fLowerPos;
bForwardEnabled := stMotionStage.Axis.NcToPlc.ActPos < fUpperPos AND stMotionStage.fPosition < fUpperPos;
bBackwardEnabled := stMotionStage.Axis.NcToPlc.ActPos > fLowerPos AND stMotionStage.fPosition > fLowerPos;
IF (stMotionStage.nErrorId = 16#4223 OR stMotionStage.nErrorId = 16#4260) AND
((stMotionStage.bAllForwardEnable AND NOT bForwardEnabled) OR
Expand Down

0 comments on commit 36ab7c2

Please sign in to comment.