Skip to content

Commit

Permalink
ENH: add bUsePmpsDB flag to 1D,2D,3D, and ND_Core
Browse files Browse the repository at this point in the history
  • Loading branch information
nrwslac committed Jan 26, 2024
1 parent 4898708 commit b80a6b8
Show file tree
Hide file tree
Showing 6 changed files with 24 additions and 11 deletions.
2 changes: 1 addition & 1 deletion lcls-twincat-motion/Library/Library.plcproj
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
<CombineIds>false</CombineIds>
<Company>SLAC</Company>
<Released>false</Released>
<Title>lcls-twincat-motion</Title>
<Title>lcls-twincat-motion-nrw</Title>
<ProjectVersion>0.0.0</ProjectVersion>
<WriteProductVersion>false</WriteProductVersion>
<!-- <OutputType>Exe</OutputType>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,8 @@ VAR_INPUT
stPMPSEpicsToPlc: ST_StatePMPSEpicsToPlc;
// Set this to TRUE to re-read the loaded database immediately (useful for debug)
bReadDBNow: BOOL;
// Set this to FALSE to load PMPS parameters locally
bUsePmpsDB: BOOL := TRUE;
END_VAR
VAR_OUTPUT
// Normal EPICS outputs, gathered into a single struct
Expand Down Expand Up @@ -109,6 +111,7 @@ fbPMPSCore(
nCurrGoal:=fbCore.nCurrGoal,
bReadDBNow:=bReadDBNow,
stDbStateParams=>stDbStateParams,
bUsePmpsDB:=TRUE,
);
stMotionStage := astMotionStageMax[1];
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,8 @@ VAR_INPUT
stPMPSEpicsToPlc: ST_StatePMPSEpicsToPlc;
// Set this to TRUE to re-read the loaded database immediately (useful for debug)
bReadDBNow: BOOL;
// Set this to FALSE to load PMPS parameters locally
bUsePmpsDB: BOOL := TRUE;
END_VAR
VAR_OUTPUT
// Normal EPICS outputs, gathered into a single struct
Expand Down Expand Up @@ -120,6 +122,7 @@ fbPMPSCore(
nCurrGoal:=fbCore.nCurrGoal,
bReadDBNow:=bReadDBNow,
stDbStateParams=>stDbStateParams,
bUsePmpsDB:=TRUE,
);
stMotionStage1 := astMotionStageMax[1];
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,8 @@ VAR_INPUT
stPMPSEpicsToPlc: ST_StatePMPSEpicsToPlc;
// Set this to TRUE to re-read the loaded database immediately (useful for debug)
bReadDBNow: BOOL;
// Set this to FALSE to load PMPS parameters locally
bUsePmpsDB: BOOL := TRUE;
END_VAR
VAR_OUTPUT
// Normal EPICS outputs, gathered into a single struct
Expand Down Expand Up @@ -131,6 +133,7 @@ fbPMPSCore(
nCurrGoal:=fbCore.nCurrGoal,
bReadDBNow:=bReadDBNow,
stDbStateParams=>stDbStateParams,
bUsePmpsDB:=TRUE,
);
stMotionStage1 := astMotionStageMax[1];
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,8 @@ VAR_INPUT
nCurrGoal: UINT;
// Set this to TRUE to re-read the loaded database immediately (useful for debug)
bReadDBNow: BOOL;
// Set this to FALSE to load PMPS parameters locally
bUsePmpsDB: BOOL := TRUE;
END_VAR
VAR_OUTPUT
// The PMPS database lookup associated with the current position state.
Expand Down Expand Up @@ -72,15 +74,17 @@ ELSE
eStatePMPSStatus := E_StatePMPSStatus.TRANSITION;
END_IF
fbMotionReadPMPSDB(
astPositionState:=astPositionStateMax,
fbFFHWO:=fbFFHWO,
sTransitionKey:=sTransitionKey,
sDeviceName:=sDeviceName,
bReadNow:=bReadDBNow,
astDbStateParams=>,
bError=>,
);
IF bUsePmpsDB THEN
fbMotionReadPMPSDB(
astPositionState:=astPositionStateMax,
fbFFHWO:=fbFFHWO,
sTransitionKey:=sTransitionKey,
sDeviceName:=sDeviceName,
bReadNow:=bReadDBNow,
astDbStateParams=>,
bError=>,
);
END_IF
fbMotionBPTM(
astMotionStage:=astMotionStageMax,
Expand Down
2 changes: 1 addition & 1 deletion lcls-twincat-motion/Library/Version/Global_Version.TcGVL
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
// This function has been automatically generated from the project information.
VAR_GLOBAL CONSTANT
{attribute 'const_non_replaced'}
stLibVersion_lcls_twincat_motion : ST_LibVersion := (iMajor := 0, iMinor := 0, iBuild := 0, iRevision := 0, nFlags := 0, sVersion := '0.0.0');
stLibVersion_lcls_twincat_motion_nrw : ST_LibVersion := (iMajor := 0, iMinor := 0, iBuild := 0, iRevision := 0, nFlags := 0, sVersion := '0.0.0');
END_VAR
]]></Declaration>
</GVL>
Expand Down

0 comments on commit b80a6b8

Please sign in to comment.