This commit is contained in:
2026-02-11 16:32:03 +01:00
parent 69ef2c6904
commit d6a4fc6e42
6 changed files with 194 additions and 51 deletions

View File

@@ -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>