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

Fix FORCE_CLS and FORCE_OPN field names. #106

Merged
merged 2 commits into from
Oct 20, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
4 changes: 2 additions & 2 deletions L2SIVacuum/DUTs/Valves/ST_VRC_NO.TcDUT
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
2 changes: 1 addition & 1 deletion L2SIVacuum/DUTs/Valves/ST_VVC.TcDUT
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ STRUCT
{attribute 'pytmc' := '
pv:FORCE_OPN;
field: ZNAM FALSE;
field: ONAM OPEN;
field: ONAM FORCE OPEN;
io: io;
'}
xOvrdOpn : BOOL;
Expand Down
4 changes: 2 additions & 2 deletions L2SIVacuum/DUTs/Valves/ST_VWC_NO.TcDUT
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
2 changes: 1 addition & 1 deletion L2SIVacuum/L2SIVacuum.tmc
Original file line number Diff line number Diff line change
Expand Up @@ -970,4 +970,4 @@ This function provides ILK and Set Point Protection for the Cold Cathode]]></Com
</Value></Property><Property><Name>TcVarGlobal</Name></Property></Properties><BitOffs>3072000</BitOffs></Symbol><Symbol><Name>PMPS_GVL.AccumulatedFF</Name><Comment><![CDATA[ Any time a FF occurs]]></Comment><BitSize>32</BitSize><BaseType>UDINT</BaseType><Properties><Property><Name>pytmc</Name><Value>
pv: @(PREFIX)AccumulatedFastFaults
io: i
</Value></Property><Property><Name>TcVarGlobal</Name></Property></Properties><BitOffs>3072032</BitOffs></Symbol></DataArea></DataAreas><Deployment /><EventClasses><EventClass><Type GUID="{97CF8247-B59C-4E2C-B4B0-7350D0471457}">LCLSGeneralEventClass</Type></EventClass></EventClasses><Properties><Property><Name>ApplicationName</Name><Value>Port_851</Value></Property><Property><Name>ChangeDate</Name><Value>2022-10-14T14:51:13</Value></Property><Property><Name>GeneratedCodeSize</Name><Value>667648</Value></Property><Property><Name>GlobalDataSize</Name><Value>65368064</Value></Property></Properties></Module></Modules></TcModuleClass>
</Value></Property><Property><Name>TcVarGlobal</Name></Property></Properties><BitOffs>3072032</BitOffs></Symbol></DataArea></DataAreas><Deployment /><EventClasses><EventClass><Type GUID="{97CF8247-B59C-4E2C-B4B0-7350D0471457}">LCLSGeneralEventClass</Type></EventClass></EventClasses><Properties><Property><Name>ApplicationName</Name><Value>Port_851</Value></Property><Property><Name>ChangeDate</Name><Value>2022-10-19T13:28:12</Value></Property><Property><Name>GeneratedCodeSize</Name><Value>667648</Value></Property><Property><Name>GlobalDataSize</Name><Value>65368064</Value></Property></Properties></Module></Modules></TcModuleClass>
16 changes: 14 additions & 2 deletions L2SIVacuum/POUs/Functions/Valves/Interfaces/FB_VFS_Interface.TcPOU
Original file line number Diff line number Diff line change
Expand Up @@ -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]]></ST>
</Implementation>
</Action>
Expand Down Expand Up @@ -165,5 +165,17 @@ iq_stValve.sVetoDeviceName := Veto_Valve.sDevName;
]]></ST>
</Implementation>
</Action>
<LineIds Name="FB_VFS_Interface">
<LineId Id="3" Count="32" />
<LineId Id="2" Count="0" />
</LineIds>
<LineIds Name="FB_VFS_Interface.ACT_Logger">
<LineId Id="2" Count="41" />
<LineId Id="1" Count="0" />
</LineIds>
<LineIds Name="FB_VFS_Interface.IO">
<LineId Id="2" Count="24" />
<LineId Id="1" Count="0" />
</LineIds>
</POU>
</TcPlcObject>