add hardware and functions for development with test crate
This commit is contained in:
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@@ -2,13 +2,14 @@
|
||||
<TcPlcObject Version="1.1.0.1" ProductVersion="3.1.4024.5">
|
||||
<GVL Name="GVL_APP" Id="{8fe9690c-7907-432e-bedb-6fc99b5ce255}">
|
||||
<Declaration><![CDATA[
|
||||
|
||||
{attribute 'qualified_only'}
|
||||
VAR_GLOBAL
|
||||
|
||||
END_VAR
|
||||
|
||||
VAR_GLOBAL CONSTANT
|
||||
nAXIS_NUM : UINT:=0;
|
||||
nAXIS_NUM : UINT:=4;
|
||||
END_VAR]]></Declaration>
|
||||
</GVL>
|
||||
</TcPlcObject>
|
||||
@@ -1,18 +0,0 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<TcPlcObject Version="1.1.0.1" ProductVersion="3.1.4024.5">
|
||||
<POU Name="Application_Template" Id="{4bdeebc0-15d8-4790-97d0-e9c4239d121c}" SpecialFunc="None">
|
||||
<Declaration><![CDATA[PROGRAM Application_Template
|
||||
VAR
|
||||
//Define all necessary variables for your application
|
||||
END_VAR
|
||||
]]></Declaration>
|
||||
<Implementation>
|
||||
<ST><![CDATA[//Program any specific code or safety code for an specific application when it involves multiple axes
|
||||
//Eg. Collision avoidance, interlocks, sequencing, etc.]]></ST>
|
||||
</Implementation>
|
||||
<LineIds Name="Application_Template">
|
||||
<LineId Id="5" Count="0" />
|
||||
<LineId Id="10" Count="0" />
|
||||
</LineIds>
|
||||
</POU>
|
||||
</TcPlcObject>
|
||||
@@ -0,0 +1,19 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<TcPlcObject Version="1.1.0.1" ProductVersion="3.1.4024.5">
|
||||
<POU Name="limitsPower" Id="{7dcb7d67-8fc5-4c4f-a1c9-d3a3a11a9340}" SpecialFunc="None">
|
||||
<Declaration><![CDATA[PROGRAM limitsPower
|
||||
VAR
|
||||
bEnableAxis1Limits AT %Q*: BOOL:=TRUE;
|
||||
bEnableAxis2Limits AT %Q*: BOOL:=TRUE;
|
||||
bEnableAxis1Enc AT %Q*: BOOL:=TRUE;
|
||||
bEnableAxis2Enc AT %Q*: BOOL:=TRUE;
|
||||
END_VAR
|
||||
]]></Declaration>
|
||||
<Implementation>
|
||||
<ST><![CDATA[]]></ST>
|
||||
</Implementation>
|
||||
<LineIds Name="limitsPower">
|
||||
<LineId Id="5" Count="0" />
|
||||
</LineIds>
|
||||
</POU>
|
||||
</TcPlcObject>
|
||||
@@ -1,34 +0,0 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<TcPlcObject Version="1.1.0.1" ProductVersion="3.1.4024.5">
|
||||
<POU Name="Axis_Template" Id="{1a43acb4-bd2e-4637-97fb-9976d47292b6}" SpecialFunc="None">
|
||||
<Declaration><![CDATA[PROGRAM Axis_Template
|
||||
VAR
|
||||
|
||||
END_VAR
|
||||
]]></Declaration>
|
||||
<Implementation>
|
||||
<ST><![CDATA[//Initial parameters of an Axis
|
||||
(*IF _TaskInfo[fbGetCurTaskIndex.index].FirstCycle THEN
|
||||
//Initial default values:
|
||||
GVL.astAxes[1].stConfig.eHomeSeq := 0;
|
||||
GVL.astAxes[1].stConfig.fHomePosition := 0.0;
|
||||
GVL.astAxes[1].stConfig.fHomeFinishDistance := 0.0;
|
||||
END_IF*)
|
||||
|
||||
//Define ACTIONS() or write exclusive code for an specific axis.
|
||||
//Eg. Stop when temperature reaches certain values, reduce speed if a signal is activated, etc.
|
||||
]]></ST>
|
||||
</Implementation>
|
||||
<LineIds Name="Axis_Template">
|
||||
<LineId Id="20" Count="0" />
|
||||
<LineId Id="5" Count="0" />
|
||||
<LineId Id="13" Count="0" />
|
||||
<LineId Id="17" Count="2" />
|
||||
<LineId Id="14" Count="0" />
|
||||
<LineId Id="22" Count="0" />
|
||||
<LineId Id="21" Count="0" />
|
||||
<LineId Id="24" Count="0" />
|
||||
<LineId Id="23" Count="0" />
|
||||
</LineIds>
|
||||
</POU>
|
||||
</TcPlcObject>
|
||||
@@ -0,0 +1,25 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<TcPlcObject Version="1.1.0.1" ProductVersion="3.1.4024.5">
|
||||
<POU Name="testProg" Id="{6b742e2c-3720-4a26-aa80-15486c69d838}" SpecialFunc="None">
|
||||
<Declaration><![CDATA[PROGRAM testProg
|
||||
VAR
|
||||
myFirstSlits : FB_SlitPair;
|
||||
END_VAR
|
||||
]]></Declaration>
|
||||
<Implementation>
|
||||
<ST><![CDATA[GVL.astAxes[1].stConfig.eHomeSeq:=E_HomingRoutines.eHomeToRef_Bwd;
|
||||
GVL.astAxes[1].stConfig.fHomePosition:=30;
|
||||
GVL.astAxes[2].stConfig.eHomeSeq:=E_HomingRoutines.eHomeToRef_Fwd;
|
||||
GVL.astAxes[2].stConfig.fHomePosition:=-30;
|
||||
|
||||
myFirstSlits(iBladeNegative:=2,iBladePositive:=1, iGapSize:=3, iGapCentre:=4);]]></ST>
|
||||
</Implementation>
|
||||
<LineIds Name="testProg">
|
||||
<LineId Id="10" Count="0" />
|
||||
<LineId Id="12" Count="0" />
|
||||
<LineId Id="11" Count="0" />
|
||||
<LineId Id="13" Count="1" />
|
||||
<LineId Id="5" Count="0" />
|
||||
</LineIds>
|
||||
</POU>
|
||||
</TcPlcObject>
|
||||
@@ -78,14 +78,9 @@ END_IF]]></ST>
|
||||
</Action>
|
||||
<Action Name="PROG" Id="{5d03ebbb-2a47-4890-ad6d-e82daf72dc51}">
|
||||
<Implementation>
|
||||
<ST><![CDATA[//Call the programs that are defined in the "Application Specific" folder.
|
||||
//Create as many programs in that folder as axes and applications you have or need
|
||||
|
||||
//Axes initial parameters and program
|
||||
Axis_Template();
|
||||
|
||||
//Application program calls
|
||||
Application_Template();]]></ST>
|
||||
<ST><![CDATA[testProg();
|
||||
limitsPower();
|
||||
]]></ST>
|
||||
</Implementation>
|
||||
</Action>
|
||||
<Action Name="RESTORE_POSITIONS" Id="{0c7ee537-7bd9-4833-b428-c17cbb57e893}" FolderPath="POSITION_RECOVERY\">
|
||||
@@ -233,12 +228,7 @@ END_FOR]]></ST>
|
||||
<LineId Id="1" Count="0" />
|
||||
</LineIds>
|
||||
<LineIds Name="MAIN.PROG">
|
||||
<LineId Id="4" Count="1" />
|
||||
<LineId Id="7" Count="0" />
|
||||
<LineId Id="6" Count="0" />
|
||||
<LineId Id="8" Count="0" />
|
||||
<LineId Id="10" Count="0" />
|
||||
<LineId Id="9" Count="0" />
|
||||
<LineId Id="11" Count="1" />
|
||||
<LineId Id="3" Count="0" />
|
||||
</LineIds>
|
||||
<LineIds Name="MAIN.RESTORE_POSITIONS">
|
||||
|
||||
Submodule solution/tc_project_app/tc_mca_std_lib updated: bc5e78c637...735c9fed01
@@ -27,10 +27,10 @@
|
||||
<Compile Include="PlcTask.TcTTO">
|
||||
<SubType>Code</SubType>
|
||||
</Compile>
|
||||
<Compile Include="POUs\Application_Specific\Applications\Application_Template.TcPOU">
|
||||
<Compile Include="POUs\Application_Specific\Applications\limitsPower.TcPOU">
|
||||
<SubType>Code</SubType>
|
||||
</Compile>
|
||||
<Compile Include="POUs\Application_Specific\Axes\Axis_Template.TcPOU">
|
||||
<Compile Include="POUs\Application_Specific\Axes\testProg.TcPOU">
|
||||
<SubType>Code</SubType>
|
||||
</Compile>
|
||||
<Compile Include="POUs\MAIN.TcPOU">
|
||||
@@ -93,6 +93,9 @@
|
||||
<Compile Include="tc_mca_std_lib\POUs\Motion\FB_Axis.TcPOU">
|
||||
<SubType>Code</SubType>
|
||||
</Compile>
|
||||
<Compile Include="tc_mca_std_lib\POUs\Motion\FB_SlitPair.TcPOU">
|
||||
<SubType>Code</SubType>
|
||||
</Compile>
|
||||
<Compile Include="tc_mca_std_lib\POUs\Motion\Homing\FB_Homing.TcPOU">
|
||||
<SubType>Code</SubType>
|
||||
</Compile>
|
||||
|
||||
Reference in New Issue
Block a user