Files
Motion_test/solution/tc_project_app/POUs/MAIN.TcPOU
Simon-Cooper 8e59e35241 Single gear in and gear out support
-Add visualisation elements for support of single gear in
-Add visualisation elements for support of gear out
-Change AXES() action call to use GVL.iAxis as index of FOR loop
2019-06-04 11:46:53 +01:00

127 lines
3.6 KiB
XML

<?xml version="1.0" encoding="utf-8"?>
<TcPlcObject Version="1.1.0.1" ProductVersion="3.1.4022.12">
<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.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********)
fbErrorList: FB_ErrorList;
//fbEL3214: EL3214;
//fbEL1808: EL1808;
//fbEL2819: EL2819;
//fbEL9410: EL9410;
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.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****)
//
fbErrorList(
En:= TRUE,
bReset:= ,
lErrorID:= ,
bACK:= ,
EnO=> ,
nNoError=> ,
nNoOverflow=> ,
pErrorSystem=> );
(*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 "fbErrorList.pErrorSystem" to the input ErrorSystem in each FB E. g. :
fbEL1808(
En:= TRUE,
iTerminal_ID:= 1,
ErrorSystem:= fbErrorList.pErrorSystem,
EnO=> ,
bDi_1=> ,
bDi_2=> ,
bDi_3=> ,
bDi_4=> ,
bDi_5=> ,
bDi_6=> ,
bDi_7=> ,
bDi_8=> ,
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="2" Count="7" />
<LineId Id="1" Count="0" />
<LineId Id="12" Count="1" />
<LineId Id="29" Count="1" />
<LineId Id="16" Count="12" />
<LineId Id="14" Count="0" />
<LineId Id="32" Count="1" />
</LineIds>
<LineIds Name="MAIN.PROG">
<LineId Id="2" Count="0" />
<LineId Id="1" Count="0" />
<LineId Id="3" Count="0" />
</LineIds>
</POU>
</TcPlcObject>