Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Changes to FFO and MKS317 #43

Merged
merged 40 commits into from
Jun 24, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
40 commits
Select commit Hold shift + click to select a range
fac3c9c
DEV: Issue#20, Issue#22
ghalym Mar 18, 2020
1593aa2
DEV: PIP AutoOn is availabe through pragma
ghalym Mar 18, 2020
6901e05
DEV: Gauge event severity and message changes
ghalym Mar 20, 2020
c3a75b3
DEV: PIP logger and VGC pmps
ghalym Mar 24, 2020
3fcf67d
Merge branch 'master' into master
ghalym Mar 26, 2020
107470c
DEV: Added Gagues 972,909
ghalym Apr 2, 2020
29916e6
DEV: Unit Tests, Agilent Analog Signals. FIX: EBARA PTM Analaog Signals
ghalym May 20, 2020
ae102dd
Merge branch 'master' of https://github.com/ghalym/L2SI-Vacuum-Lib
ghalym May 20, 2020
8f84457
ENH: Comments
ghalym May 21, 2020
3b943c9
FIX: PIP Pressure is not calculated when device is off
ghalym May 21, 2020
bf9cc18
Issues #11, #14,#21,#25,#27,#32
ghalym May 28, 2020
84751c9
Issue #17
ghalym May 28, 2020
97544db
ENH: MKS 500 logger, Ebara dry pymp and ebara turbo
ghalym Jun 1, 2020
0acf6cf
FIX: Pragma
ghalym Jun 8, 2020
4953693
ENH: Change the valve moving timout to 30s
ghalym Jun 8, 2020
ad851cd
DEV: VGC new position State, Diode interlock ok function, Ebara max b…
ghalym Jun 10, 2020
792840b
ENH: xLog bool to switch off logger for noisy gauges
ghalym Jun 11, 2020
459b3d3
DEV: Don't use hard-coded values
n-wbrown Jun 13, 2020
3849a90
BUG: move MKS317's ValidLo low limit to .15V
n-wbrown Jun 13, 2020
cfb12e2
STY: order range limits
n-wbrown Jun 13, 2020
4041d66
FIX: MKS317's ValidLo limit issue #36
ghalym Jun 13, 2020
f5012e2
Merge branch 'master' into mks317-validlo-limits
ghalym Jun 13, 2020
38fa4a2
Merge pull request #6 from n-wbrown/mks317-validlo-limits
ghalym Jun 13, 2020
5ebafec
Merge branch 'master' into master
ghalym Jun 16, 2020
b78f775
Merge remote-tracking branch 'upstream/master'
ghalym Jun 16, 2020
cf218bd
ENH: PIP xError
ghalym Jun 16, 2020
d8f8f7a
Merge branch 'master' of git@github.com:ghalym/lcls-twincat-vacuum.git
ghalym Jun 17, 2020
6737170
Merge branch 'master' of git@github.com:ghalym/lcls-twincat-vacuum.git
ghalym Jun 17, 2020
e917164
FIX: FB_VGC valve state
ghalym Jun 17, 2020
11bf252
Merge remote-tracking branch 'upstream/master'
ghalym Jun 17, 2020
d533a18
Merge branch 'master' of git@github.com:ghalym/lcls-twincat-vacuum.git
ghalym Jun 17, 2020
354d022
ENH: VGC FFO AutoReset
ghalym Jun 19, 2020
9d61fd5
DEV: Modify limit based on experience with EM1K0-GMD-GPI-40 and signa…
n-wbrown Jun 19, 2020
689ea71
Merge pull request #7 from n-wbrown/mks317-validlo-limits
ghalym Jun 19, 2020
3a22c86
ENH: VGC Logger moved to ACT_logger. ADS Watchdog read and write time…
ghalym Jun 20, 2020
e442d9f
watchdog
ghalym Jun 20, 2020
1cfba6f
Merge remote-tracking branch 'upstream/master'
ghalym Jun 23, 2020
987ffc0
FIX: VFS Interface
ghalym Jun 24, 2020
6866157
FIX: MKS500 iTermBits
ghalym Jun 24, 2020
536374e
Merge branch 'master' of github.com:ghalym/lcls-twincat-vacuum
ghalym Jun 24, 2020
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
91 changes: 47 additions & 44 deletions L2SIVacuum/L2SIVacuum.tmc

Large diffs are not rendered by default.

5 changes: 2 additions & 3 deletions L2SIVacuum/POUs/ADS/FB_ADS_WATCHDOG.TcPOU
Original file line number Diff line number Diff line change
Expand Up @@ -41,8 +41,6 @@ fb_WriteWatchdog(
nLastCnt=> ,
bError=> bError,
nErrorId=> );




(*Error*)
Expand All @@ -51,7 +49,8 @@ fb_WriteWatchdog(
]]></ST>
</Implementation>
<LineIds Name="FB_ADS_WATCHDOG">
<LineId Id="26" Count="25" />
<LineId Id="26" Count="19" />
<LineId Id="48" Count="3" />
<LineId Id="9" Count="0" />
</LineIds>
</POU>
Expand Down
9 changes: 6 additions & 3 deletions L2SIVacuum/POUs/Functions/Deprecated/Valves/FB_VGC_EBD.TcPOU
Original file line number Diff line number Diff line change
Expand Up @@ -203,7 +203,7 @@ CASE iq_stValve.eVGC_State OF

(* Assuming the pump down went well, we are now at vacuum on both sides,
so we move to the vacuum state, otherwise remain in the vented state *)
IF iq_stValve.xAT_VAC AND (NOT (iq_stValve.xERR_DifPres)) AND NOT (NOT (iq_stValve.xERR_SP)) and NOT (NOT (iq_stValve.xERR_ExtFault))THEN
IF iq_stValve.xAT_VAC AND (NOT (iq_stValve.xERR_DifPres)) AND (NOT (iq_stValve.xERR_SP)) and (NOT (iq_stValve.xERR_ExtFault))THEN
iq_stValve.eVGC_State := AtVacuum;
ELSE
iq_stValve.eVGC_State := Vented;
Expand Down Expand Up @@ -323,7 +323,7 @@ END_IF
iq_stValve.q_xOPN_DO := (iq_stValve.pv_xOPN_SW AND iq_stValve.xOPN_OK) OR (tonOvrd.Q AND i_xOverrideMode);

(* When the valve is open MPS is OK*)
xMPS_OK := (iq_stValve.eState=OPEN);//iq_stValve.i_xOpnLS;
xMPS_OK := (iq_stValve.eState=OPEN) OR (iq_stValve.eState=OPEN_F);//iq_stValve.i_xOpnLS;

///Check valve moving postion timout
IF NOT iq_stValve.i_xClsLS AND tCLStimeout.Q THEN
Expand Down Expand Up @@ -365,6 +365,7 @@ ACT_IO();
(*FAST FAULT*)
fbFF(i_xOK := xMPS_OK,
i_xReset := i_xReset,
i_xAutoReset :=TRUE,
io_fbFFHWO := io_fbFFHWO);


Expand Down Expand Up @@ -430,7 +431,9 @@ END_VAR
</Implementation>
</Method>
<LineIds Name="FB_VGC_EBD">
<LineId Id="3" Count="265" />
<LineId Id="3" Count="261" />
<LineId Id="369" Count="0" />
<LineId Id="265" Count="3" />
<LineId Id="2" Count="0" />
</LineIds>
<LineIds Name="FB_VGC_EBD.ACT_IO">
Expand Down
18 changes: 10 additions & 8 deletions L2SIVacuum/POUs/Functions/Gauges/FB_MKS275.TcPOU
Original file line number Diff line number Diff line change
Expand Up @@ -19,17 +19,19 @@ VAR_OUTPUT
PG : ST_VG;
END_VAR
VAR
MinPressure: REAL := 1E-4;
V : REAL;
Vlowest: REAL := 10;
iTermBits: UINT := 32767 ; // The terminal's maximum value in bits

rValidLoBoundary : REAL := 0.375; // manual page 27
rValidHiBoundary : REAL := 5.659;// 5.534; // manual page 27
rDisconnectedBoundary : REAL := 0.3;

Vlowest: REAL := 10;
(*IO*)
i_iPRESS_R AT%I* :INT; // input Pressure // Link to analog Input
END_VAR

VAR CONSTANT
MinPressure: REAL := 1E-4;
rDeadband : REAL :=0.02;
rValidLoBoundary : REAL := 0.375; // 0.375V as per manual page 27
rValidHiBoundary : REAL := 5.659;// 5.534; // manual page 27
rDisconnectedBoundary : REAL := 0.3;
END_VAR]]></Declaration>
<Implementation>
<ST><![CDATA[(* This function block is used to provide protection and automatic turn on of ion gauges,
Expand All @@ -47,7 +49,7 @@ V := 10*INT_TO_REAL(PG.i_iPRESS_R)/iTermBits;

Vlowest := MIN(V, Vlowest);

IF V > rDisconnectedBoundary AND V < rValidLoBoundary THEN
IF V > rDisconnectedBoundary AND V < rValidLoBoundary +rDeadband THEN
PG.rPRESS := MinPressure;
PG.eState := ValidLo;

Expand Down
2 changes: 1 addition & 1 deletion L2SIVacuum/POUs/Functions/Gauges/FB_MKS317.TcPOU
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ END_VAR
VAR CONSTANT
rMinPressure: REAL := 1E-4;
rDefaultVAC_SP: REAL :=5E-2; // Default 50 mT
rDisconnectedBoundary : REAL := 0.15;
rDisconnectedBoundary : REAL := 0.10;
rValidLoBoundary : REAL := 0.22;
rValidBoundaryMin : REAL := 0.6;
rValidHiBoundary : REAL := 9.7;
Expand Down
9 changes: 5 additions & 4 deletions L2SIVacuum/POUs/Functions/Gauges/FB_MKS500.TcPOU
Original file line number Diff line number Diff line change
Expand Up @@ -44,24 +44,25 @@ VAR CONSTANT
vNoDischarge: REAL := 9.3;
MinPressure: REAL := 1E-10;
cDefaultPressure : REAL := 0;
rDeadband : REAL :=0.3;
END_VAR
]]></Declaration>
<Implementation>
<ST><![CDATA[(* 500 Logarithmic Output Conversion, factory default configuration *)
If (iTermBits=0) THEN iTermBits := 32767;END_IF
rV := 10*INT_TO_REAL(IG.i_iPRESS_R)/32767;
rV := 10*INT_TO_REAL(IG.i_iPRESS_R)/iTermBits;

(* Set Guage State based on the Analog voltage*)
IF rV < vDisconnected THEN
IG.eState := GaugeDisconnected;
IG.rPRESS := cDefaultPressure;
ELSIF rV >= vDisconnected AND rV < (vNoDischarge -0.3) THEN
ELSIF rV >= vDisconnected AND rV < (vNoDischarge -rDeadband) THEN
IG.eState := Valid;
IG.rPRESS := LREAL_TO_REAL(EXPT(10,((rV-vBase)/vSlope+LOG(pBase))));
ELSIF rV >= (vNoDischarge -0.3) AND rV <(vGaugeOff -0.3) THEN
ELSIF rV >= (vNoDischarge -rDeadband) AND rV <(vGaugeOff -rDeadband) THEN
IG.eState := Starting;
IG.rPRESS := LREAL_TO_REAL(EXPT(10,((rV-vBase)/vSlope+LOG(pBase))));
ELSIF rV >= (vGaugeOff -0.3) THEN
ELSIF rV >= (vGaugeOff -rDeadband) THEN
IG.eState := Off;
//IG.rPRESS := LREAL_TO_REAL(EXPT(10,((rV-vBase)/vSlope+LOG(pBase))));
IG.rPRESS := cDefaultPressure;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ fb_Read_VG(
(*Error*)
fb_CheckWatchdog(
bEnable:= TRUE,
tWatchdogTime:= T#100ms,
tWatchdogTime:= T#900ms,
nCnt:= iWatchdog ,
bWatchdog=> ,
nLastCnt=> );
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ fb_Read_VG(
(*Error*)
fb_CheckWatchdog(
bEnable:= TRUE,
tWatchdogTime:= T#100ms,
tWatchdogTime:= T#900ms,
nCnt:= iWatchdog ,
bWatchdog=> ,
nLastCnt=> );
Expand Down
8 changes: 4 additions & 4 deletions L2SIVacuum/POUs/Functions/Valves/FB_VFS.TcPOU
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ VAR
CloseTimer: TON;
TimDur: TIME := T#20MS;
OpenTimer: TON;
OpenTimDur: TIME := T#10S;
OpenTimDur: TIME := T#2S;

(* Timeouts*)
tTimeOutDuration: TIME:= T#0.5S;
Expand Down Expand Up @@ -105,9 +105,9 @@ IO();
///Check valve postion
IF iq_stValve.i_xClsLS AND iq_stValve.i_xOpnLS THEN
iq_stValve.eState:=INVALID;
ELSIF NOT iq_stValve.i_xClsLS AND iq_stValve.i_xOpnLS AND iq_stValve.q_xOPN_DO THEN
ELSIF NOT iq_stValve.i_xClsLS AND iq_stValve.i_xOpnLS THEN
iq_stValve.eState:=OPEN;
ELSIF iq_stValve.i_xClsLS AND NOT iq_stValve.i_xOpnLS AND NOT iq_stValve.q_xOPN_DO THEN
ELSIF iq_stValve.i_xClsLS AND NOT iq_stValve.i_xOpnLS THEN
iq_stValve.eState:=CLOSED;
ELSIF NOT iq_stValve.i_xClsLS AND NOT iq_stValve.i_xOpnLS THEN
iq_stValve.eState:=MOVING;
Expand Down Expand Up @@ -197,7 +197,7 @@ END_IF

(*Timers*)
CloseTimer ( IN:=xClose, PT:= TimDur, Q=>);
OpenTimer ( IN:=xOpen, PT:= OpenTimDur, Q=>);
OpenTimer ( IN:=i_xOpnLS, PT:= OpenTimDur, Q=>);
tOPNtimeout(IN:= iq_stValve.q_xOPN_DO, PT := tTimeOutDuration );
tCLStimeout(IN:= NOT iq_stValve.q_xOPN_DO, PT := tTimeOutDuration);

Expand Down
Loading