Temp
This commit is contained in:
@@ -172,6 +172,7 @@ M_HandlePLCJobs();
|
||||
xReady := _xRobotReady;
|
||||
xError := _xError;]]></ST>
|
||||
</Implementation>
|
||||
<Folder Name="StateMachine" Id="{66d46722-f002-4d97-ae1f-63dcdad370cb}" />
|
||||
<Method Name="FB_Init" Id="{71a3f6f0-d3bb-4348-acc7-be533d7488d2}">
|
||||
<Declaration><![CDATA[//FB_Init ist immer implizit verfügbar und wird primär für die Initialisierung verwendet.
|
||||
//Der Rückgabewert wird nicht ausgewertet. Für gezielte Einflussnahme können Sie
|
||||
@@ -191,7 +192,7 @@ _stSMConfig.xCompletedDisabled := TRUE;
|
||||
_stSMConfig.xAbortingDisabled := TRUE;]]></ST>
|
||||
</Implementation>
|
||||
</Method>
|
||||
<Method Name="M_Aborted" Id="{0c0c17ce-5c1c-4640-9d39-f25b22309d5d}">
|
||||
<Method Name="M_Aborted" Id="{0c0c17ce-5c1c-4640-9d39-f25b22309d5d}" FolderPath="StateMachine\">
|
||||
<Declaration><![CDATA[METHOD PROTECTED M_Aborted
|
||||
]]></Declaration>
|
||||
<Implementation>
|
||||
@@ -208,7 +209,7 @@ stJobs.wJobNrForRobot := E_KukaRobot_JobNumberRobot.NO_JOB;
|
||||
stJobs.wFinishedJobNrFromPlc := E_KukaRobot_JobNumerPLC.NO_JOB;]]></ST>
|
||||
</Implementation>
|
||||
</Method>
|
||||
<Method Name="M_Clearing" Id="{e6152288-8c7d-4b38-bfbc-4f861d76ccc5}">
|
||||
<Method Name="M_Clearing" Id="{e6152288-8c7d-4b38-bfbc-4f861d76ccc5}" FolderPath="StateMachine\">
|
||||
<Declaration><![CDATA[METHOD PROTECTED M_Clearing
|
||||
VAR_INST
|
||||
_tonWait : TON;
|
||||
@@ -226,7 +227,7 @@ END_IF
|
||||
]]></ST>
|
||||
</Implementation>
|
||||
</Method>
|
||||
<Method Name="M_Execute" Id="{bc86876c-a8db-4285-b95c-7c6858a2ca66}">
|
||||
<Method Name="M_Execute" Id="{bc86876c-a8db-4285-b95c-7c6858a2ca66}" FolderPath="StateMachine\">
|
||||
<Declaration><![CDATA[METHOD PROTECTED M_Execute
|
||||
]]></Declaration>
|
||||
<Implementation>
|
||||
@@ -299,14 +300,14 @@ THEN
|
||||
END_IF]]></ST>
|
||||
</Implementation>
|
||||
</Method>
|
||||
<Method Name="M_Held" Id="{22ddbad0-0b66-427e-a2aa-f177f8adbc94}">
|
||||
<Method Name="M_Held" Id="{22ddbad0-0b66-427e-a2aa-f177f8adbc94}" FolderPath="StateMachine\">
|
||||
<Declaration><![CDATA[METHOD PROTECTED M_Held
|
||||
]]></Declaration>
|
||||
<Implementation>
|
||||
<ST><![CDATA[]]></ST>
|
||||
</Implementation>
|
||||
</Method>
|
||||
<Method Name="M_Holding" Id="{ff8c2c8e-1fe0-4c63-ad7b-790d72bd9217}">
|
||||
<Method Name="M_Holding" Id="{ff8c2c8e-1fe0-4c63-ad7b-790d72bd9217}" FolderPath="StateMachine\">
|
||||
<Declaration><![CDATA[METHOD PROTECTED M_Holding
|
||||
]]></Declaration>
|
||||
<Implementation>
|
||||
@@ -318,14 +319,14 @@ END_IF
|
||||
]]></ST>
|
||||
</Implementation>
|
||||
</Method>
|
||||
<Method Name="M_Idle" Id="{025437ab-beb0-4ad6-bdc3-468dec599ff4}">
|
||||
<Method Name="M_Idle" Id="{025437ab-beb0-4ad6-bdc3-468dec599ff4}" FolderPath="StateMachine\">
|
||||
<Declaration><![CDATA[METHOD PROTECTED M_Idle
|
||||
]]></Declaration>
|
||||
<Implementation>
|
||||
<ST><![CDATA[_stJobParams := stJobParams;]]></ST>
|
||||
</Implementation>
|
||||
</Method>
|
||||
<Method Name="M_Resetting" Id="{dfe4d36a-80aa-4364-bfd8-6ddd41636d59}">
|
||||
<Method Name="M_Resetting" Id="{dfe4d36a-80aa-4364-bfd8-6ddd41636d59}" FolderPath="StateMachine\">
|
||||
<Declaration><![CDATA[METHOD PROTECTED M_Resetting
|
||||
VAR_INST
|
||||
_tonTimeout : TON;
|
||||
@@ -412,7 +413,7 @@ CASE _iSSM OF
|
||||
END_CASE]]></ST>
|
||||
</Implementation>
|
||||
</Method>
|
||||
<Method Name="M_Starting" Id="{011f85d8-1225-4288-876f-918df6e4f235}">
|
||||
<Method Name="M_Starting" Id="{011f85d8-1225-4288-876f-918df6e4f235}" FolderPath="StateMachine\">
|
||||
<Declaration><![CDATA[METHOD PROTECTED M_Starting
|
||||
VAR_INST
|
||||
_tonTimeout : TON;
|
||||
@@ -512,7 +513,7 @@ END_CASE
|
||||
]]></ST>
|
||||
</Implementation>
|
||||
</Method>
|
||||
<Method Name="M_Stopped" Id="{50813767-4bd7-4147-b5dc-1bbd18ae1555}">
|
||||
<Method Name="M_Stopped" Id="{50813767-4bd7-4147-b5dc-1bbd18ae1555}" FolderPath="StateMachine\">
|
||||
<Declaration><![CDATA[METHOD PROTECTED M_Stopped
|
||||
]]></Declaration>
|
||||
<Implementation>
|
||||
@@ -525,21 +526,21 @@ stJobs.wJobNrForRobot := E_KukaRobot_JobNumberRobot.NO_JOB;
|
||||
_ePlcJob := E_KukaRobot_JobNumerPLC.NO_JOB;]]></ST>
|
||||
</Implementation>
|
||||
</Method>
|
||||
<Method Name="M_Suspended" Id="{c2db015c-1cd0-491a-8ce6-6c0bffba7631}">
|
||||
<Method Name="M_Suspended" Id="{c2db015c-1cd0-491a-8ce6-6c0bffba7631}" FolderPath="StateMachine\">
|
||||
<Declaration><![CDATA[METHOD PROTECTED M_Suspended
|
||||
]]></Declaration>
|
||||
<Implementation>
|
||||
<ST><![CDATA[]]></ST>
|
||||
</Implementation>
|
||||
</Method>
|
||||
<Method Name="M_Suspending" Id="{5b0e5227-d5bb-40c6-a1b8-8e81b852b9b9}">
|
||||
<Method Name="M_Suspending" Id="{5b0e5227-d5bb-40c6-a1b8-8e81b852b9b9}" FolderPath="StateMachine\">
|
||||
<Declaration><![CDATA[METHOD PROTECTED M_Suspending
|
||||
]]></Declaration>
|
||||
<Implementation>
|
||||
<ST><![CDATA[]]></ST>
|
||||
</Implementation>
|
||||
</Method>
|
||||
<Method Name="M_Unholding" Id="{786f4949-9630-4ace-9e30-65bea4e87cb2}">
|
||||
<Method Name="M_Unholding" Id="{786f4949-9630-4ace-9e30-65bea4e87cb2}" FolderPath="StateMachine\">
|
||||
<Declaration><![CDATA[METHOD PROTECTED M_Unholding
|
||||
VAR_INST
|
||||
_tonTimeout : TON;
|
||||
@@ -609,7 +610,7 @@ CASE _iSSM OF
|
||||
END_CASE]]></ST>
|
||||
</Implementation>
|
||||
</Method>
|
||||
<Method Name="M_Unsuspending" Id="{d7ce33fd-cd94-44f1-9289-25a3ab3829eb}">
|
||||
<Method Name="M_Unsuspending" Id="{d7ce33fd-cd94-44f1-9289-25a3ab3829eb}" FolderPath="StateMachine\">
|
||||
<Declaration><![CDATA[METHOD PROTECTED M_Unsuspending
|
||||
]]></Declaration>
|
||||
<Implementation>
|
||||
|
||||
@@ -225,7 +225,7 @@ _xRunSMAgain := FALSE;
|
||||
_iState := 40;
|
||||
END_IF
|
||||
|
||||
// Didnt receive command ack in time
|
||||
// Didn't receive command ack in time
|
||||
// So resend the command if max retries are not reached
|
||||
IF _tonReceiveTimeout.Q THEN
|
||||
_xEnableReceiveTimeout := FALSE;
|
||||
@@ -235,7 +235,7 @@ _xRunSMAgain := FALSE;
|
||||
IF _uiRetries > MAX_RETRIES THEN
|
||||
_iState := 90;
|
||||
ELSE
|
||||
// Retry by sendind command again
|
||||
// Retry by sending command again
|
||||
_iState := 20;
|
||||
END_IF
|
||||
END_IF
|
||||
@@ -368,6 +368,7 @@ _iCmdLength := LEN(sCmd);
|
||||
|
||||
// start sendind command state machine
|
||||
_xSendCmd := TRUE;
|
||||
_xBusy := TRUE;
|
||||
|
||||
M_SendCmd := TRUE;]]></ST>
|
||||
</Implementation>
|
||||
|
||||
@@ -12,10 +12,6 @@ VAR
|
||||
_udiPort : UDINT;
|
||||
|
||||
_fbProtocolHandler : FB_TFProtocol;
|
||||
|
||||
_xTest : BOOL;
|
||||
_xSendResult : BOOL;
|
||||
_sCmd : STRING := 'STAT-FEED:';
|
||||
END_VAR
|
||||
]]></Declaration>
|
||||
<Implementation>
|
||||
@@ -31,12 +27,6 @@ _fbProtocolHandler(
|
||||
xBusy=> ,
|
||||
xError=> );
|
||||
|
||||
IF _xTest THEN
|
||||
_xTest := FALSE;
|
||||
|
||||
_xSendResult := _fbProtocolHandler.M_SendCmd(sCmd := _sCmd);
|
||||
END_IF
|
||||
|
||||
// Call isa88 base state machine
|
||||
SUPER^();]]></ST>
|
||||
</Implementation>
|
||||
@@ -63,9 +53,44 @@ _stSMConfig.xStoppingDisabled := TRUE;
|
||||
|
||||
_stSMConfig.xCompletingDisabled := TRUE;
|
||||
_stSMConfig.xCompletedDisabled := TRUE;
|
||||
_stSMConfig.xHeldDisabled := TRUE;
|
||||
_stSMConfig.xSuspededDisabled := TRUE;
|
||||
|
||||
_stSMConfig.xAbortingDisabled := TRUE;]]></ST>
|
||||
</Implementation>
|
||||
</Method>
|
||||
<Method Name="M_Resetting" Id="{d821c17b-c2d1-4267-b49d-1f82be218ca5}">
|
||||
<Declaration><![CDATA[METHOD PROTECTED M_Resetting
|
||||
]]></Declaration>
|
||||
<Implementation>
|
||||
<ST><![CDATA[CASE _iSSM OF
|
||||
// Check state of connection
|
||||
0:
|
||||
IF _fbProtocolHandler.xConnected THEN
|
||||
_iSSM := 10;
|
||||
ELSE
|
||||
_eCmd := E_PackMLCmd.STOP;
|
||||
END_IF
|
||||
|
||||
// Send reset command
|
||||
10:
|
||||
IF _fbProtocolHandler.M_SendCmd('SYST-RESE') THEN
|
||||
_iSSM := 20;
|
||||
ELSE
|
||||
_eCmd := E_PackMLCmd.STOP;
|
||||
END_IF
|
||||
|
||||
// Wait for reset command to be finished
|
||||
20:
|
||||
IF (NOT _fbProtocolHandler.xBusy) AND (NOT _fbProtocolHandler.xError) THEN
|
||||
M_StateComplete();
|
||||
END_IF
|
||||
|
||||
IF _fbProtocolHandler.xError THEN
|
||||
_eCmd := E_PackMLCmd.STOP;
|
||||
END_IF
|
||||
END_CASE]]></ST>
|
||||
</Implementation>
|
||||
</Method>
|
||||
</POU>
|
||||
</TcPlcObject>
|
||||
Reference in New Issue
Block a user