77 lines
2.4 KiB
XML
77 lines
2.4 KiB
XML
<?xml version="1.0" encoding="utf-8"?>
|
|
<TcPlcObject Version="1.1.0.1" ProductVersion="3.1.4024.6">
|
|
<POU Name="FB_CmdTInfo" Id="{adb7b52d-b0cb-47e5-92a4-3d78a8902e46}" SpecialFunc="None">
|
|
<Declaration><![CDATA[FUNCTION_BLOCK FB_CmdTInfo IMPLEMENTS ITF_ToolAction
|
|
VAR_INPUT
|
|
END_VAR
|
|
VAR_OUTPUT
|
|
END_VAR
|
|
VAR
|
|
_tool : Tc3_CNC.ST_CNC_TOOL_DATA_EXT;
|
|
END_VAR
|
|
]]></Declaration>
|
|
<Implementation>
|
|
<ST><![CDATA[]]></ST>
|
|
</Implementation>
|
|
<Method Name="Commit" Id="{fa444163-0c71-4c86-ba1b-725f5723ca12}">
|
|
<Declaration><![CDATA[(* Commits the tool data transfer action if it returns true*)
|
|
METHOD Commit : BOOL
|
|
VAR_INPUT
|
|
t : Tc3_CNC.ST_CNC_TOOL_DATA_EXT;
|
|
END_VAR
|
|
]]></Declaration>
|
|
<Implementation>
|
|
<ST><![CDATA[_tool := t;
|
|
|
|
// Wenn das neue Werkzeug das Nullwerkzeug ist, lade die WZW-Position des Nullwerkzeugs
|
|
// aus den Remanenten Daten
|
|
IF _tool.tool_desc.tool_id.basic = 0 THEN
|
|
_tool.pos := GVL_ToolMgmt.diToolZeroPosition;
|
|
END_IF
|
|
|
|
GVL_ToolMgmt.stToolToPrep := _tool;
|
|
|
|
// Positioniere das Kettenmagazin nur vor, wenn das neue Werkzeug nicht das
|
|
// selbe wie das alte ist
|
|
IF _tool.tool_desc.tool_id.basic <> GVL_ToolMgmt.diToolInSpindle THEN
|
|
GVL_ToolMgmt.bExecuteToolPrep := TRUE;
|
|
END_IF
|
|
|
|
Commit := TRUE;]]></ST>
|
|
</Implementation>
|
|
</Method>
|
|
<Property Name="Tool" Id="{0d967f20-5453-46e3-8feb-60cef128eee6}">
|
|
<Declaration><![CDATA[PROPERTY Tool : Tc3_CNC.ST_CNC_TOOL_DATA_EXT
|
|
]]></Declaration>
|
|
<Get Name="Get" Id="{88ffee38-caad-4c7f-b82c-730b0c67a5e9}">
|
|
<Declaration><![CDATA[VAR
|
|
END_VAR
|
|
]]></Declaration>
|
|
<Implementation>
|
|
<ST><![CDATA[Tool := _tool;]]></ST>
|
|
</Implementation>
|
|
</Get>
|
|
</Property>
|
|
<LineIds Name="FB_CmdTInfo">
|
|
<LineId Id="9" Count="0" />
|
|
</LineIds>
|
|
<LineIds Name="FB_CmdTInfo.Commit">
|
|
<LineId Id="8" Count="0" />
|
|
<LineId Id="30" Count="0" />
|
|
<LineId Id="32" Count="3" />
|
|
<LineId Id="31" Count="0" />
|
|
<LineId Id="11" Count="1" />
|
|
<LineId Id="22" Count="0" />
|
|
<LineId Id="20" Count="0" />
|
|
<LineId Id="23" Count="0" />
|
|
<LineId Id="19" Count="0" />
|
|
<LineId Id="13" Count="0" />
|
|
<LineId Id="21" Count="0" />
|
|
<LineId Id="10" Count="0" />
|
|
<LineId Id="9" Count="0" />
|
|
</LineIds>
|
|
<LineIds Name="FB_CmdTInfo.Tool.Get">
|
|
<LineId Id="2" Count="0" />
|
|
</LineIds>
|
|
</POU>
|
|
</TcPlcObject> |