Merge branch 'MBP-136-clean-up-the-code' of https://bitbucket.org/europeanspallationsource/tc_generic_structure into MBP-136-clean-up-the-code

This commit is contained in:
Dominic Oram committed 2020-03-02 16:29:22 +00:00
commit c12210b5f3
2 files changed
+2 -193

No files matched your search

+2 -72
View File
@@ -26,19 +26,6 @@ VAR
//bOutput24 AT %Q*: BOOL:= TRUE;
//bOutput28 AT %Q*: BOOL:= TRUE;
(******Error Handling********)
fbErrorSystem: FB_ErrorSystem;
aFbAxesError: ARRAY [1..gvl_app.axisNum] OF FB_NC_Error;
//fbEL1018 : EL1018;
//fbEL2808 : EL2808;
//fbEL5101 : EL5101;
//fbEL9505 : EL9505;
//fbEL1252 : EL1252;
//fbEL9410 : EL9410;
//fbEL7037 : EL7037;
//fbEK1110 : EK1110;
(******Startup, Shutdown and UPS********)
fbUPS : FB_S_UPS_CX51x0;
eUpsMode : E_S_UPS_Mode := eSUPS_WrPersistData_Shutdown;
@@ -59,8 +46,7 @@ END_VAR]]></Declaration>
<Implementation>
<ST><![CDATA[POSITION_RECOVERY();
PROG();
AXES();
ERROR();]]></ST>
AXES();]]></ST>
</Implementation>
<Folder Name="POSITION_RECOVERY" Id="{3561f6ef-e145-4ed3-9839-f17334bd2d97}" />
<Action Name="AXES" Id="{7eb32732-9b53-4934-8cd9-20ba971dd8ff}">
@@ -87,46 +73,6 @@ ELSIF eGlobalSUpsState <> eSUPS_PowerOK THEN
END_IF]]></ST>
</Implementation>
</Action>
<Action Name="ERROR" Id="{35f2cf38-f81e-4aa3-9534-be5fb417817d}">
<Implementation>
<ST><![CDATA[//
(****FB containting the log of the errors****)
//
fbErrorSystem(
En:= TRUE,
bReset:= ,
nErrorNum:= ,
bACK:= ,
bValidSelection:= ,
nTableRowIndex:= ,
EnO=> ,
nSelectedError=> ,
pErrorSystem=> );
FOR GVL.iAxis:=1 TO gvl_app.axisNum DO
aFbAxesError[gvl.iAxis](EN:=TRUE,
nNC_ErrorID:= gvl.axes[gvl.iAxis].status.nErrorID,
nNC_AxisID:=gvl.axes[gvl.iAxis].Axis.NcToPlc.AxisId,
ErrorSystem:= fbErrorSystem.pErrorSystem);
END_FOR
(*call all the necessary instance (input assistance F2 or right click) according to the terminals that you have in your hardware and
add "TRUE" in the input En, the corresponding number of termianl to the iTerminal_ID and
the variable "fbErrorSystem.pErrorSystem" to the input ErrorSystem in each FB E. g. :
fbEL1808(
En:= TRUE,
iTerminal_ID:= 01,
ErrorSystem:= fbErorSystem.pErrorSystem,
EnO=> ,
bError=> );
*)
]]></ST>
</Implementation>
</Action>
<Action Name="POSITION_RECOVERY" Id="{28e203b7-aea5-42d0-980d-12a6841f9d22}" FolderPath="POSITION_RECOVERY\">
<Implementation>
<ST><![CDATA[fbGetDeviceIdentification(bExecute:=TRUE);
@@ -276,7 +222,7 @@ END_FOR]]></ST>
<LineIds Name="MAIN">
<LineId Id="505" Count="0" />
<LineId Id="134" Count="0" />
<LineId Id="81" Count="1" />
<LineId Id="81" Count="0" />
</LineIds>
<LineIds Name="MAIN.AXES">
<LineId Id="1" Count="0" />
@@ -287,22 +233,6 @@ END_FOR]]></ST>
<LineId Id="2" Count="11" />
<LineId Id="1" Count="0" />
</LineIds>
<LineIds Name="MAIN.ERROR">
<LineId Id="31" Count="0" />
<LineId Id="10" Count="1" />
<LineId Id="34" Count="8" />
<LineId Id="1" Count="0" />
<LineId Id="90" Count="1" />
<LineId Id="88" Count="1" />
<LineId Id="92" Count="2" />
<LineId Id="87" Count="0" />
<LineId Id="79" Count="1" />
<LineId Id="12" Count="0" />
<LineId Id="44" Count="8" />
<LineId Id="62" Count="0" />
<LineId Id="14" Count="0" />
<LineId Id="33" Count="0" />
</LineIds>
<LineIds Name="MAIN.POSITION_RECOVERY">
<LineId Id="2" Count="3" />
<LineId Id="1" Count="0" />
@@ -71,117 +71,6 @@
<Compile Include="tc_mca_std_lib\POUs\ChangeConfig\FB_WriteParameterInNc_v1_00.TcPOU">
<SubType>Code</SubType>
</Compile>
<Compile Include="tc_mca_std_lib\POUs\ErrorHandling\DUT_ErrorState.TcDUT">
<SubType>Code</SubType>
</Compile>
<Compile Include="tc_mca_std_lib\POUs\ErrorHandling\FB_ErrorSystem.TcPOU">
<SubType>Code</SubType>
</Compile>
<Compile Include="tc_mca_std_lib\POUs\ErrorHandling\FB_GenericError.TcPOU">
<SubType>Code</SubType>
</Compile>
<Compile Include="tc_mca_std_lib\POUs\ErrorHandling\FB_NC_Error.TcPOU">
<SubType>Code</SubType>
</Compile>
<Compile Include="tc_mca_std_lib\POUs\ErrorHandling\FB_TerminalError.TcPOU">
<SubType>Code</SubType>
</Compile>
<Compile Include="tc_mca_std_lib\POUs\ErrorHandling\ST_ErrorEntry.TcDUT">
<SubType>Code</SubType>
</Compile>
<Compile Include="tc_mca_std_lib\POUs\ErrorHandling\ST_ErrorSystem.TcDUT">
<SubType>Code</SubType>
</Compile>
<Compile Include="tc_mca_std_lib\POUs\Hardware\EtherCAT_Terminals\Analog_Inputs\EL3174_0002.TcPOU">
<SubType>Code</SubType>
</Compile>
<Compile Include="tc_mca_std_lib\POUs\Hardware\EtherCAT_Terminals\Analog_Inputs\EL3214.TcPOU">
<SubType>Code</SubType>
</Compile>
<Compile Include="tc_mca_std_lib\POUs\Hardware\EtherCAT_Terminals\Analog_Inputs\EL3255.TcPOU">
<SubType>Code</SubType>
</Compile>
<Compile Include="tc_mca_std_lib\POUs\Hardware\EtherCAT_Terminals\Digital_Inputs\EL1008.TcPOU">
<SubType>Code</SubType>
</Compile>
<Compile Include="tc_mca_std_lib\POUs\Hardware\EtherCAT_Terminals\Digital_Inputs\EL1018.TcPOU">
<SubType>Code</SubType>
</Compile>
<Compile Include="tc_mca_std_lib\POUs\Hardware\EtherCAT_Terminals\Digital_Inputs\EL1252.TcPOU">
<SubType>Code</SubType>
</Compile>
<Compile Include="tc_mca_std_lib\POUs\Hardware\EtherCAT_Terminals\Digital_Inputs\EL1808.TcPOU">
<SubType>Code</SubType>
</Compile>
<Compile Include="tc_mca_std_lib\POUs\Hardware\EtherCAT_Terminals\Digital_Inputs\EL1809.TcPOU">
<SubType>Code</SubType>
</Compile>
<Compile Include="tc_mca_std_lib\POUs\Hardware\EtherCAT_Terminals\Digital_Inputs\EL1819.TcPOU">
<SubType>Code</SubType>
</Compile>
<Compile Include="tc_mca_std_lib\POUs\Hardware\EtherCAT_Terminals\Digital_Outputs\EL2014.TcPOU">
<SubType>Code</SubType>
</Compile>
<Compile Include="tc_mca_std_lib\POUs\Hardware\EtherCAT_Terminals\Digital_Outputs\EL2252.TcPOU">
<SubType>Code</SubType>
</Compile>
<Compile Include="tc_mca_std_lib\POUs\Hardware\EtherCAT_Terminals\Digital_Outputs\EL2808.TcPOU">
<SubType>Code</SubType>
</Compile>
<Compile Include="tc_mca_std_lib\POUs\Hardware\EtherCAT_Terminals\Digital_Outputs\EL2819.TcPOU">
<SubType>Code</SubType>
</Compile>
<Compile Include="tc_mca_std_lib\POUs\Hardware\EtherCAT_Terminals\Digital_Outputs\External_Types\dutEL2521_Ctrl.TcDUT">
<SubType>Code</SubType>
</Compile>
<Compile Include="tc_mca_std_lib\POUs\Hardware\EtherCAT_Terminals\Digital_Outputs\External_Types\dutEL2521_Status.TcDUT">
<SubType>Code</SubType>
</Compile>
<Compile Include="tc_mca_std_lib\POUs\Hardware\EtherCAT_Terminals\Drives\EL2522.TcPOU">
<SubType>Code</SubType>
</Compile>
<Compile Include="tc_mca_std_lib\POUs\Hardware\EtherCAT_Terminals\Drives\EL4134.TcPOU">
<SubType>Code</SubType>
</Compile>
<Compile Include="tc_mca_std_lib\POUs\Hardware\EtherCAT_Terminals\Drives\EL7037.TcPOU">
<SubType>Code</SubType>
</Compile>
<Compile Include="tc_mca_std_lib\POUs\Hardware\EtherCAT_Terminals\Drives\EL7041_0052.TcPOU">
<SubType>Code</SubType>
</Compile>
<Compile Include="tc_mca_std_lib\POUs\Hardware\EtherCAT_Terminals\Drives\EL7047.TcPOU">
<SubType>Code</SubType>
</Compile>
<Compile Include="tc_mca_std_lib\POUs\Hardware\EtherCAT_Terminals\Drives\EL7211.TcPOU">
<SubType>Code</SubType>
</Compile>
<Compile Include="tc_mca_std_lib\POUs\Hardware\EtherCAT_Terminals\Feedback_Terminals\EL5002.TcPOU">
<SubType>Code</SubType>
</Compile>
<Compile Include="tc_mca_std_lib\POUs\Hardware\EtherCAT_Terminals\Feedback_Terminals\EL5021.TcPOU">
<SubType>Code</SubType>
</Compile>
<Compile Include="tc_mca_std_lib\POUs\Hardware\EtherCAT_Terminals\Feedback_Terminals\EL5042.TcPOU">
<SubType>Code</SubType>
</Compile>
<Compile Include="tc_mca_std_lib\POUs\Hardware\EtherCAT_Terminals\Feedback_Terminals\EL5101.TcPOU">
<SubType>Code</SubType>
</Compile>
<Compile Include="tc_mca_std_lib\POUs\Hardware\EtherCAT_Terminals\Feedback_Terminals\EL7201.TcPOU">
<SubType>Code</SubType>
</Compile>
<Compile Include="tc_mca_std_lib\POUs\Hardware\EtherCAT_Terminals\System\EK1100.TcPOU">
<SubType>Code</SubType>
</Compile>
<Compile Include="tc_mca_std_lib\POUs\Hardware\EtherCAT_Terminals\System\EK1110.TcPOU">
<SubType>Code</SubType>
</Compile>
<Compile Include="tc_mca_std_lib\POUs\Hardware\EtherCAT_Terminals\System\EL9410.TcPOU">
<SubType>Code</SubType>
</Compile>
<Compile Include="tc_mca_std_lib\POUs\Hardware\EtherCAT_Terminals\System\EL9505.TcPOU">
<SubType>Code</SubType>
</Compile>
<Compile Include="tc_mca_std_lib\POUs\Motion\FB_Axis.TcPOU">
<SubType>Code</SubType>
</Compile>
@@ -242,18 +131,8 @@
<Folder Include="tc_mca_std_lib\POUs" />
<Folder Include="tc_mca_std_lib\POUs\ChangeConfig" />
<Folder Include="tc_mca_std_lib\POUs\Hardware" />
<Folder Include="tc_mca_std_lib\POUs\Hardware" />
<Folder Include="tc_mca_std_lib\POUs\Hardware\EtherCAT_Terminals" />
<Folder Include="tc_mca_std_lib\POUs\Hardware\EtherCAT_Terminals\Analog_Inputs" />
<Folder Include="tc_mca_std_lib\POUs\Hardware\EtherCAT_Terminals\Digital_Inputs" />
<Folder Include="tc_mca_std_lib\POUs\Hardware\EtherCAT_Terminals\Digital_Outputs" />
<Folder Include="tc_mca_std_lib\POUs\Hardware\EtherCAT_Terminals\Digital_Outputs\External_Types" />
<Folder Include="tc_mca_std_lib\POUs\Hardware\EtherCAT_Terminals\Drives" />
<Folder Include="tc_mca_std_lib\POUs\Hardware\EtherCAT_Terminals\Feedback_Terminals" />
<Folder Include="tc_mca_std_lib\POUs\Hardware\EtherCAT_Terminals\System" />
<Folder Include="tc_mca_std_lib\POUs\Motion" />
<Folder Include="tc_mca_std_lib\POUs\Hardware" />
<Folder Include="tc_mca_std_lib\POUs\ErrorHandling" />
<Folder Include="tc_mca_std_lib\POUs\Motion\Homing" />
<Folder Include="tc_mca_std_lib\POUs\VISUs" />
<Folder Include="VISUs" />