Skip to content

Commit

Permalink
Merge pull request pcdshub#115 from tongju12/st1k4
Browse files Browse the repository at this point in the history
st1k4 following st3k4
  • Loading branch information
tongju12 authored Aug 9, 2023
2 parents 6303f17 + 04b2389 commit 1f98f90
Show file tree
Hide file tree
Showing 2 changed files with 49 additions and 32 deletions.
35 changes: 24 additions & 11 deletions plc-kfe-motion/kfe_motion/POUs/PRG_ST1K4_TEST.TcPOU
Original file line number Diff line number Diff line change
Expand Up @@ -7,14 +7,15 @@ VAR
{attribute 'pytmc' := '
pv: ST1K4:MMS:STATE
pv: ST1K4:TEST:MMS:STATE
io: i
arrStates.array: 1..3
arrStates.array: 1..2
'}
fbST1K4_InOut_States:FB_PositionStateInOut;
ST1K4_In:DUT_PositionState:= (
bUseRawCounts := FALSE,
bMoveOK := TRUE,
Expand All @@ -32,8 +33,17 @@ VAR
fPosition := 40,
fDelta := 1,
fVelocity := 9);
ST3K4_In: bool;
{attribute 'pytmc' := '
pv: ST1K4:TEST:MMS:STATE:ST3K4_AUTO
io: io
'}
bST3K4_auto:bool:= TRUE ;
END_VAR
]]></Declaration>
Expand All @@ -53,14 +63,17 @@ fbMotion1(stMotionStage:=Main.M33);
stMotionStage := Main.M33);
{* bIn := PMPS_GVL.stCurrentBeamParameters.aVetoDevices[PMPS.K_Stopper.ST3K4];
IF bIn
fbST1K4_InOut_States.enumSet:= ENUM_EpicsInOut.IN;
fbST1K4_Out_States;
ST3K4_In:= PMPS_GVL.stCurrentBeamParameters.aVetoDevices[PMPS.K_Stopper.ST3K4];
IF bST3K4_auto THEN
IF ST3K4_In AND fbST1K4_InOut_States.enumGet <> ENUM_EpicsInOut.IN THEN
fbST1K4_InOut_States.enumSet:= ENUM_EpicsInOut.IN;
ELSIF NOT ST3K4_In AND fbST1K4_InOut_States.enumGet <> ENUM_EpicsInOut.OUT THEN
fbST1K4_InOut_States.enumSet:= ENUM_EpicsInOut.OUT;
END_IF
END_IF
*}
]]></ST>
</Implementation>
Expand Down
46 changes: 25 additions & 21 deletions plc-kfe-motion/kfe_motion/kfe_motion.tmc

Large diffs are not rendered by default.

0 comments on commit 1f98f90

Please sign in to comment.