Skip to content

Commit

Permalink
Merge pull request #201 from ZLLentz/fix_fb_internal_order
Browse files Browse the repository at this point in the history
FIX: run fbInternal first to mark states as ready to use
  • Loading branch information
ZLLentz authored Sep 20, 2023
2 parents 84f1b81 + 7198ce2 commit 534ceab
Showing 1 changed file with 5 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,11 @@ END_VAR]]></Declaration>
<ST><![CDATA[
stEpicsToPlc.nSetValue := eEnumSet;
fbInternal(
astMotionStage:=astMotionStageMax,
astPositionState:=astPositionStateMax,
);
fbRead(
astMotionStage:=astMotionStageMax,
astPositionState:=astPositionStateMax,
Expand All @@ -69,11 +74,6 @@ fbInput(
bResetMove=>,
);
fbInternal(
astMotionStage:=astMotionStageMax,
astPositionState:=astPositionStateMax,
);
FOR nIterMotor := 1 TO MotionConstants.MAX_STATE_MOTORS DO
IF nCurrGoal > 0 THEN
astMoveGoals[nIterMotor] := astPositionStateMax[nIterMotor][nCurrGoal];
Expand Down

0 comments on commit 534ceab

Please sign in to comment.