From 17a55e1ccc57bcb0012c07896e1d3faee8514181 Mon Sep 17 00:00:00 2001 From: jyin999 Date: Wed, 19 Oct 2022 13:06:51 -0700 Subject: [PATCH 1/2] Fix FORCE_CLS and FORCE_OPN field names. --- L2SIVacuum/DUTs/Valves/ST_VRC_NO.TcDUT | 4 ++-- L2SIVacuum/DUTs/Valves/ST_VVC.TcDUT | 2 +- L2SIVacuum/DUTs/Valves/ST_VWC_NO.TcDUT | 4 ++-- L2SIVacuum/L2SIVacuum.tmc | 2 +- 4 files changed, 6 insertions(+), 6 deletions(-) diff --git a/L2SIVacuum/DUTs/Valves/ST_VRC_NO.TcDUT b/L2SIVacuum/DUTs/Valves/ST_VRC_NO.TcDUT index 6fdadce..b35fc9c 100644 --- a/L2SIVacuum/DUTs/Valves/ST_VRC_NO.TcDUT +++ b/L2SIVacuum/DUTs/Valves/ST_VRC_NO.TcDUT @@ -29,8 +29,8 @@ STRUCT q_xCLS_DO : BOOL; {attribute 'pytmc' := ' pv: FORCE_CLS; - field: ONAM CLOSE; - field: ZNAM OPEN; + field: ONAM FORCE CLOSE; + field: ZNAM FALSE; io: io; '} pv_xOvrdCls : BOOL; diff --git a/L2SIVacuum/DUTs/Valves/ST_VVC.TcDUT b/L2SIVacuum/DUTs/Valves/ST_VVC.TcDUT index 34d68ed..fc90cc3 100644 --- a/L2SIVacuum/DUTs/Valves/ST_VVC.TcDUT +++ b/L2SIVacuum/DUTs/Valves/ST_VVC.TcDUT @@ -16,7 +16,7 @@ STRUCT {attribute 'pytmc' := ' pv:FORCE_OPN; field: ZNAM FALSE; - field: ONAM OPEN; + field: ONAM FORCE OPEN; io: io; '} xOvrdOpn : BOOL; diff --git a/L2SIVacuum/DUTs/Valves/ST_VWC_NO.TcDUT b/L2SIVacuum/DUTs/Valves/ST_VWC_NO.TcDUT index 97f1c9a..7f81327 100644 --- a/L2SIVacuum/DUTs/Valves/ST_VWC_NO.TcDUT +++ b/L2SIVacuum/DUTs/Valves/ST_VWC_NO.TcDUT @@ -21,8 +21,8 @@ STRUCT pv_xCLS_SW : BOOL; {attribute 'pytmc' := ' pv: FORCE_CLS; - field: ONAM CLOSE; - field: ZNAM OPEN; + field: ONAM FORCE CLOSE; + field: ZNAM FALSE; io: io; '} pv_xOvrdCls : BOOL; diff --git a/L2SIVacuum/L2SIVacuum.tmc b/L2SIVacuum/L2SIVacuum.tmc index 4fd260b..4c87117 100644 --- a/L2SIVacuum/L2SIVacuum.tmc +++ b/L2SIVacuum/L2SIVacuum.tmc @@ -970,4 +970,4 @@ This function provides ILK and Set Point Protection for the Cold Cathode]]>TcVarGlobal3072000PMPS_GVL.AccumulatedFF32UDINTpytmc pv: @(PREFIX)AccumulatedFastFaults io: i - TcVarGlobal3072032LCLSGeneralEventClassApplicationNamePort_851ChangeDate2022-10-14T14:51:13GeneratedCodeSize667648GlobalDataSize65368064 \ No newline at end of file + TcVarGlobal3072032LCLSGeneralEventClassApplicationNamePort_851ChangeDate2022-10-19T12:38:36GeneratedCodeSize667648GlobalDataSize65368064 \ No newline at end of file From f708f82e83b1325295897584128f067525c17469 Mon Sep 17 00:00:00 2001 From: jyin999 Date: Wed, 19 Oct 2022 13:29:22 -0700 Subject: [PATCH 2/2] Fix FB_VFS_Interface logger. --- L2SIVacuum/L2SIVacuum.tmc | 2 +- .../Valves/Interfaces/FB_VFS_Interface.TcPOU | 16 ++++++++++++++-- 2 files changed, 15 insertions(+), 3 deletions(-) diff --git a/L2SIVacuum/L2SIVacuum.tmc b/L2SIVacuum/L2SIVacuum.tmc index 4c87117..1649f7c 100644 --- a/L2SIVacuum/L2SIVacuum.tmc +++ b/L2SIVacuum/L2SIVacuum.tmc @@ -970,4 +970,4 @@ This function provides ILK and Set Point Protection for the Cold Cathode]]>TcVarGlobal3072000PMPS_GVL.AccumulatedFF32UDINTpytmc pv: @(PREFIX)AccumulatedFastFaults io: i - TcVarGlobal3072032LCLSGeneralEventClassApplicationNamePort_851ChangeDate2022-10-19T12:38:36GeneratedCodeSize667648GlobalDataSize65368064 \ No newline at end of file + TcVarGlobal3072032LCLSGeneralEventClassApplicationNamePort_851ChangeDate2022-10-19T13:28:12GeneratedCodeSize667648GlobalDataSize65368064 \ No newline at end of file diff --git a/L2SIVacuum/POUs/Functions/Valves/Interfaces/FB_VFS_Interface.TcPOU b/L2SIVacuum/POUs/Functions/Valves/Interfaces/FB_VFS_Interface.TcPOU index 160755b..f302b84 100644 --- a/L2SIVacuum/POUs/Functions/Valves/Interfaces/FB_VFS_Interface.TcPOU +++ b/L2SIVacuum/POUs/Functions/Valves/Interfaces/FB_VFS_Interface.TcPOU @@ -128,10 +128,10 @@ tOverrideActivated(CLK:= (tonOvrd.Q AND q_xOverrideMode)); IF tOverrideActivated.Q THEN fbLogger(sMsg:='Valve override mode activated', eSevr:=TcEventSeverity.Warning); END_IF //Log when the trigger is vetoed -rtTriggerVetoed(CLK:= (NOT(q_xPRESS_OK) OR NOT(i_xTrigger)) AND (NOT q_xVetoValveOpenDO AND q_xVetoValveClosed)); +rtTriggerVetoed(CLK:= (NOT q_xPRESS_OK OR i_xTrigger) AND (NOT q_xVetoValveOpenDO AND q_xVetoValveClosed)); IF rtTriggerVetoed.Q THEN fbLogger(sMsg:='Valve triggered while veto device is in', eSevr:=TcEventSeverity.Warning); END_IF -rtTriggered(CLK:= ((q_xPRESS_OK) OR (i_xTrigger)) AND ( q_xVetoValveOpenDO AND NOT q_xVetoValveClosed)); +rtTriggered(CLK:= (NOT q_xPRESS_OK OR i_xTrigger) AND ( q_xVetoValveOpenDO AND NOT q_xVetoValveClosed)); IF rtTriggered.Q THEN fbLogger(sMsg:='Fast valve triggered!', eSevr:=TcEventSeverity.Critical); END_IF]]> @@ -165,5 +165,17 @@ iq_stValve.sVetoDeviceName := Veto_Valve.sDevName; ]]> + + + + + + + + + + + + \ No newline at end of file