Files
TC_iTomcat-ES2-Detector-Tow…/solution/tc_project_app/POUs/MAIN.TcPOU
Torsten Bögershausen 4ca1f6e110 Normalize all line endings to LF in the repo
Change the CRLF strategie:
All (nearly all) files have LF in the repo, and CRLF in the working tree.
When we started, all files had been commited "as is".
Now it is more and more disturbing that Git shows "^M" in git diff
when a line was added or chenged.
To avoid this, store all files in the repo with LF.

To normalzie existing repos for a crate, run:

Step 1)
(unless you have done that already)
git remote add tc_generic_structure https://bitbucket.org/europeanspallationsource/tc_generic_structure.git

Step 2)
git fetch tc_generic_structure

Step 3)
(master below may be integration)
git merge tc_generic_structure/master  -X renormalize
2019-12-04 16:30:58 +01:00

144 lines
4.1 KiB
XML

<?xml version="1.0" encoding="utf-8"?>
<TcPlcObject Version="1.1.0.1" ProductVersion="3.1.4024.0">
<POU Name="MAIN" Id="{33eb6f49-7781-4211-a70b-87ada6d80cb7}" SpecialFunc="None">
<Declaration><![CDATA[PROGRAM MAIN
VAR
sVersion: STRING:='1.0.0';
i : UINT; //index variable for AXES()
aFbAxes: ARRAY [1..gvl_app.axisNum] OF FB_Axis;
hmiAxisSelection : INT:=1; //Not possible to use local hmi variables for array indexes
(******Outputs: Power for Limit switches and Home Sensors (every 4th output)********)
bOutput1 AT %Q*: BOOL:= TRUE;
//bOutput2 AT %Q*: BOOL:= TRUE;
//bOutput3 AT %Q*: BOOL:= TRUE;
//bOutput4 AT %Q*: BOOL:= TRUE;
//bOutput5 AT %Q*: BOOL:= TRUE;
//bOutput6 AT %Q*: BOOL:= TRUE;
//bOutput7 AT %Q*: BOOL:= TRUE;
//bOutput8 AT %Q*: BOOL:= TRUE;
//bOutput9 AT %Q*: BOOL:= TRUE;
//bOutput13 AT %Q*: BOOL:= TRUE;
//bOutput17 AT %Q*: BOOL:= TRUE;
//bOutput21 AT %Q*: BOOL:= TRUE;
//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;
END_VAR
]]></Declaration>
<Implementation>
<ST><![CDATA[PROG();
AXES();
ERROR();]]></ST>
</Implementation>
<Action Name="AXES" Id="{7eb32732-9b53-4934-8cd9-20ba971dd8ff}">
<Implementation>
<ST><![CDATA[
FOR GVL.iAxis:=1 TO gvl_app.axisNum DO
aFbAxes[GVL.iAxis](stAxisStruct:=gvl.axes[GVL.iAxis]);
END_FOR
]]></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="PROG" Id="{5d03ebbb-2a47-4890-ad6d-e82daf72dc51}">
<Implementation>
<ST><![CDATA[//
(* Program any sequence, safety or feature (if necessary) application specific in thsi section*)
//]]></ST>
</Implementation>
</Action>
<LineIds Name="MAIN">
<LineId Id="2" Count="0" />
<LineId Id="81" Count="1" />
</LineIds>
<LineIds Name="MAIN.AXES">
<LineId Id="3" Count="0" />
<LineId Id="1" Count="0" />
<LineId Id="4" Count="0" />
<LineId Id="10" Count="0" />
<LineId Id="7" Count="0" />
<LineId Id="16" Count="0" />
<LineId Id="11" 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.PROG">
<LineId Id="2" Count="0" />
<LineId Id="1" Count="0" />
<LineId Id="3" Count="0" />
</LineIds>
</POU>
</TcPlcObject>