Skip to content

Commit

Permalink
Changes to FFO and MKS317 (#43)
Browse files Browse the repository at this point in the history
* DEV: Issue#20, Issue#22

Issue#20 : Ion Pumps use own pressure reading after turning on, also added a method for AutoOn. user program to invoke the method.

Issue#22, Update MKS 909 Hot Cathode POU with logging and all other upgrades.

* DEV: PIP AutoOn is availabe through pragma

* DEV: Gauge event severity and message changes

* DEV: PIP logger and VGC pmps

* DEV: Added Gagues 972,909

ENH: PTM MagDriveDigital has status updates
DEV: Serial_IO Methodes added to pumps with serial interface

* DEV: Unit Tests, Agilent Analog Signals. FIX: EBARA PTM Analaog Signals

* ENH: Comments

* FIX: PIP Pressure is not calculated when device is off

* Issues #11, #14,#21,#25,#27,#32

* Issue #17

* ENH: MKS 500 logger, Ebara dry pymp and ebara turbo

* FIX: Pragma

* ENH: Change the valve moving timout to 30s

* DEV: VGC new position State, Diode interlock ok function, Ebara max backing pressure

* ENH: xLog bool to switch off logger for noisy gauges
FIX: PTM_Ebara Current speed calculations

* DEV: Don't use hard-coded values

* BUG: move MKS317's ValidLo low limit to .15V

* STY: order range limits

* FIX: MKS317's ValidLo limit issue #36

* ENH: PIP xError

* FIX: FB_VGC valve state

* ENH: VGC FFO AutoReset

* DEV: Modify limit based on experience with EM1K0-GMD-GPI-40 and signal noise

* ENH: VGC Logger moved to ACT_logger. ADS Watchdog read and write times has been configured (5-10 times) the signal transmission

* watchdog

* FIX: MKS500 iTermBits
FIX: MKS275 deadband
FIX: MKS317 DisconnectedBoundary

Co-authored-by: ghalym <ghalym@users.noreply.github.com>
Co-authored-by: n-wbrown <n-wbrown@users.noreply.github.com>
  • Loading branch information
3 people authored Jun 24, 2020
1 parent e77ca05 commit e24e1f6
Show file tree
Hide file tree
Showing 14 changed files with 244 additions and 233 deletions.
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

0 comments on commit e24e1f6

Please sign in to comment.