Skip to content

Commit

Permalink
running precommit
Browse files Browse the repository at this point in the history
  • Loading branch information
KaushikMalapati committed Jan 15, 2025
1 parent 74003ef commit 50137cd
Show file tree
Hide file tree
Showing 3 changed files with 68 additions and 68 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -36,8 +36,8 @@ VAR_INPUT
bMoveOnArbiterTimeout: BOOL := TRUE;
// Set to TRUE when it is safe to reset the BPTM timeout fast fault, to reset it early.
bResetBPTMTimeout: BOOL;
// Set to TRUE to make the BPTM retry
bRetry: BOOL;
// Set to TRUE to make the BPTM retry
bRetry: BOOL;
END_VAR
VAR_OUTPUT
// This becomes TRUE when the motors are allowed to move to their destinations.
Expand Down Expand Up @@ -120,7 +120,7 @@ bptm(
i_stRequestedAssertion:=stGoalParams.stBeamParams,
i_xDoneMoving:=bDoneMoving AND bAtState,
stCurrentBeamParameters:=PMPS_GVL.stCurrentBeamParameters,
bRetry:=bRetry,
bRetry:=bRetry,
q_xTransitionAuthorized=>bInternalAuth,
bDone=>bDone,
);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -58,11 +58,11 @@ VAR
fbPerMotorFFO: FB_PerMotorFFOND;
eStatePMPSStatus: E_StatePMPSStatus;
bEnable: BOOL;
nGoalAtClear : UINT;
bAtStateAtClear : BOOL;
rtEnable: R_TRIG;
bEnable: BOOL;
nGoalAtClear : UINT;
bAtStateAtClear : BOOL;
rtEnable: R_TRIG;
END_VAR
]]></Declaration>
<Implementation>
Expand Down Expand Up @@ -99,7 +99,7 @@ fbMotionBPTM(
bEnable:=bEnable,
bAtState:=stPlcToEpics.nGetValue = nCurrGoal AND nCurrGoal <> 0,
sDeviceName:=sDeviceName,
bRetry:=rtEnable.Q AND nGoalAtClear = nCurrGoal AND bAtStateAtClear,
bRetry:=rtEnable.Q AND nGoalAtClear = nCurrGoal AND bAtStateAtClear,
bTransitionAuthorized=>,
bDone=>,
bMotorCountError=>,
Expand Down
118 changes: 59 additions & 59 deletions lcls-twincat-motion/Library/Tests/FB_PositionStatePMPSND_Test.TcPOU
Original file line number Diff line number Diff line change
Expand Up @@ -805,7 +805,7 @@ END_IF]]></ST>
<Declaration><![CDATA[METHOD TestToggleBPTM
VAR_INST
fbFFHWO: FB_HardwareFFOutput;
nState: UINT;
nState: UINT;
END_VAR
]]></Declaration>
<Implementation>
Expand All @@ -824,71 +824,71 @@ eSetPos := 2;
CASE nState OF
0:
fb_Move1D(
stMotionStage:=stMotionStage1,
astPositionState:=astPositionState1,
eEnumSet:= eSetPos,
eEnumGet:=eGetPos,
fbFFHWO:=fbFFHWO,
fbArbiter:=fbArbiter1D,
bEnableMotion:=TRUE,
bEnableBeamParams:=TRUE,
bEnablePositionLimits:=TRUE,
bReadDBNow:=TRUE,
sDeviceName:='test',
sTransitionKey:='trans',
);
fb_Move1D(
stMotionStage:=stMotionStage1,
astPositionState:=astPositionState1,
eEnumSet:= eSetPos,
eEnumGet:=eGetPos,
fbFFHWO:=fbFFHWO,
fbArbiter:=fbArbiter1D,
bEnableMotion:=TRUE,
bEnableBeamParams:=TRUE,
bEnablePositionLimits:=TRUE,
bReadDBNow:=TRUE,
sDeviceName:='test',
sTransitionKey:='trans',
);
IF fb_Move1D.stPlcToEpics.bDone THEN
AssertTrue(
fbArbiter1D.CheckRequestInPool(astBeam[E_TestStates.TARGET1].nRequestAssertionID),
'Destination bp should have been in the arbiter',
);
AssertTrue(
fbArbiter1D.CheckRequestInPool(astBeam[E_TestStates.TARGET1].nRequestAssertionID),
'Destination bp should have been in the arbiter',
);
nState := 1;
END_IF
1:
fb_Move1D.stPMPSEpicsToPlc.bArbiterEnabled := FALSE;
fb_Move1D(
stMotionStage:=stMotionStage1,
astPositionState:=astPositionState1,
eEnumSet:= eSetPos,
eEnumGet:=eGetPos,
fbFFHWO:=fbFFHWO,
fbArbiter:=fbArbiter1D,
bEnableMotion:=TRUE,
bEnableBeamParams:=TRUE,
bEnablePositionLimits:=TRUE,
bReadDBNow:=FALSE,
sDeviceName:='test',
sTransitionKey:='trans',
);
1:
fb_Move1D.stPMPSEpicsToPlc.bArbiterEnabled := FALSE;
fb_Move1D(
stMotionStage:=stMotionStage1,
astPositionState:=astPositionState1,
eEnumSet:= eSetPos,
eEnumGet:=eGetPos,
fbFFHWO:=fbFFHWO,
fbArbiter:=fbArbiter1D,
bEnableMotion:=TRUE,
bEnableBeamParams:=TRUE,
bEnablePositionLimits:=TRUE,
bReadDBNow:=FALSE,
sDeviceName:='test',
sTransitionKey:='trans',
);
IF fb_Move1D.stPlcToEpics.bDone THEN
AssertFalse(
fbArbiter1D.CheckRequestInPool(astBeam[E_TestStates.TARGET1].nRequestAssertionID),
'Destination bp should have been in the arbiter',
);
AssertFalse(
fbArbiter1D.CheckRequestInPool(astBeam[E_TestStates.TARGET1].nRequestAssertionID),
'Destination bp should have been in the arbiter',
);
nState := 2;
END_IF
2:
fb_Move1D.stPMPSEpicsToPlc.bArbiterEnabled := TRUE;
fb_Move1D(
stMotionStage:=stMotionStage1,
astPositionState:=astPositionState1,
eEnumSet:= eSetPos,
eEnumGet:=eGetPos,
fbFFHWO:=fbFFHWO,
fbArbiter:=fbArbiter1D,
bEnableMotion:=TRUE,
bEnableBeamParams:=TRUE,
bEnablePositionLimits:=TRUE,
bReadDBNow:=FALSE,
sDeviceName:='test',
sTransitionKey:='trans',
);
2:
fb_Move1D.stPMPSEpicsToPlc.bArbiterEnabled := TRUE;
fb_Move1D(
stMotionStage:=stMotionStage1,
astPositionState:=astPositionState1,
eEnumSet:= eSetPos,
eEnumGet:=eGetPos,
fbFFHWO:=fbFFHWO,
fbArbiter:=fbArbiter1D,
bEnableMotion:=TRUE,
bEnableBeamParams:=TRUE,
bEnablePositionLimits:=TRUE,
bReadDBNow:=FALSE,
sDeviceName:='test',
sTransitionKey:='trans',
);
IF fb_Move1D.stPlcToEpics.bDone THEN
AssertTrue(
fbArbiter1D.CheckRequestInPool(astBeam[E_TestStates.TARGET1].nRequestAssertionID),
'Destination bp should have been in the arbiter',
);
AssertTrue(
fbArbiter1D.CheckRequestInPool(astBeam[E_TestStates.TARGET1].nRequestAssertionID),
'Destination bp should have been in the arbiter',
);
nState := 3;
END_IF
3:
Expand Down

0 comments on commit 50137cd

Please sign in to comment.