Some refactoring after static code analysis
This commit is contained in:
@@ -1,7 +1,8 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<TcPlcObject Version="1.1.0.1">
|
||||
<DUT Name="ST_PMLa" Id="{16746b45-38ff-4f58-95c8-eb6734adb976}">
|
||||
<Declaration><![CDATA[TYPE ST_PMLa :
|
||||
<Declaration><![CDATA[{attribute 'analysis' := '-33'}
|
||||
TYPE ST_PMLa :
|
||||
STRUCT
|
||||
astProductData : ARRAY[0..(GVL_PackML_Conf.MAX_PRODUCT_DATA-1)] OF ST_PackML_ProductData;
|
||||
diStopReason : DINT;
|
||||
|
||||
@@ -1,7 +1,8 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<TcPlcObject Version="1.1.0.1">
|
||||
<DUT Name="ST_PMLc" Id="{5cf4c850-57ba-42f8-9986-b146207e1b2f}">
|
||||
<Declaration><![CDATA[TYPE ST_PMLc :
|
||||
<Declaration><![CDATA[{attribute 'analysis' := '-33'}
|
||||
TYPE ST_PMLc :
|
||||
STRUCT
|
||||
eUnitMode : E_PackMLUnitMode;
|
||||
xUnitModeChangeRequest : BOOL;
|
||||
|
||||
@@ -1,7 +1,8 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<TcPlcObject Version="1.1.0.1">
|
||||
<DUT Name="ST_PMLs" Id="{dace328e-4599-42b5-ac3b-2a705ec8e2f3}">
|
||||
<Declaration><![CDATA[TYPE ST_PMLs :
|
||||
<Declaration><![CDATA[{attribute 'analysis' := '-33'}
|
||||
TYPE ST_PMLs :
|
||||
STRUCT
|
||||
eUnitModeCurrent : E_PackMLUnitMode;
|
||||
eStateCurrent : E_PackMLState;
|
||||
|
||||
@@ -1,7 +1,8 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<TcPlcObject Version="1.1.0.1">
|
||||
<DUT Name="ST_PackMLPI" Id="{e7198eb6-2cd3-41c0-be59-e7dbcf10a569}">
|
||||
<Declaration><![CDATA[TYPE ST_PackMLPI :
|
||||
<Declaration><![CDATA[{attribute 'analysis' := '-33'}
|
||||
TYPE ST_PackMLPI :
|
||||
STRUCT
|
||||
astParameterReal : ARRAY[0..(GVL_PackML_Conf.MAX_PARAMS-1)] OF ST_PackMLParamREAL;
|
||||
astParameterString : ARRAY[0..(GVL_PackML_Conf.MAX_PARAMS-1)] OF ST_PackMLParamSTRING;
|
||||
|
||||
@@ -1,11 +1,13 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<TcPlcObject Version="1.1.0.1">
|
||||
<DUT Name="ST_PackMLParamDINT" Id="{f9801bf5-a73d-450f-b9fc-a5d8229e4946}">
|
||||
<Declaration><![CDATA[TYPE ST_PackMLParamDINT :
|
||||
<Declaration><![CDATA[{attribute 'naming' := 'off'}
|
||||
{attribute 'analysis' := '-33'}
|
||||
TYPE ST_PackMLParamDINT :
|
||||
STRUCT
|
||||
diID : DINT;
|
||||
sName : STRING;
|
||||
sUnit : STRING(6);
|
||||
ID : DINT;
|
||||
Name : STRING;
|
||||
Unit : STRING(6);
|
||||
Value : DINT;
|
||||
END_STRUCT
|
||||
END_TYPE
|
||||
|
||||
@@ -1,11 +1,13 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<TcPlcObject Version="1.1.0.1">
|
||||
<DUT Name="ST_PackMLParamLREAL" Id="{195fabe8-44c0-43ec-8434-75e38b68efb7}">
|
||||
<Declaration><![CDATA[TYPE ST_PackMLParamLREAL :
|
||||
<Declaration><![CDATA[{attribute 'naming' := 'off'}
|
||||
{attribute 'analysis' := '-33'}
|
||||
TYPE ST_PackMLParamLREAL :
|
||||
STRUCT
|
||||
diID : DINT;
|
||||
sName : STRING;
|
||||
sUnit : STRING(6);
|
||||
ID : DINT;
|
||||
Name : STRING;
|
||||
Unit : STRING(6);
|
||||
Value : LREAL;
|
||||
END_STRUCT
|
||||
END_TYPE
|
||||
|
||||
@@ -1,11 +1,13 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<TcPlcObject Version="1.1.0.1">
|
||||
<DUT Name="ST_PackMLParamREAL" Id="{373303ba-9979-4979-a439-c899a36baa12}">
|
||||
<Declaration><![CDATA[TYPE ST_PackMLParamREAL :
|
||||
<Declaration><![CDATA[{attribute 'naming' := 'off'}
|
||||
{attribute 'analysis' := '-33'}
|
||||
TYPE ST_PackMLParamREAL :
|
||||
STRUCT
|
||||
diID : DINT;
|
||||
sName : STRING;
|
||||
sUnit : STRING(6);
|
||||
ID : DINT;
|
||||
Name : STRING;
|
||||
Unit : STRING(6);
|
||||
Value : REAL;
|
||||
END_STRUCT
|
||||
END_TYPE
|
||||
|
||||
@@ -1,11 +1,13 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<TcPlcObject Version="1.1.0.1">
|
||||
<DUT Name="ST_PackMLParamSTRING" Id="{85353d3e-e4c9-4e83-857e-8ce7ed43abaf}">
|
||||
<Declaration><![CDATA[TYPE ST_PackMLParamSTRING :
|
||||
<Declaration><![CDATA[{attribute 'naming' := 'off'}
|
||||
{attribute 'analysis' := '-33'}
|
||||
TYPE ST_PackMLParamSTRING :
|
||||
STRUCT
|
||||
diID : DINT;
|
||||
sName : STRING;
|
||||
sUnit : STRING(6);
|
||||
ID : DINT;
|
||||
Name : STRING;
|
||||
Unit : STRING(6);
|
||||
Value : STRING;
|
||||
END_STRUCT
|
||||
END_TYPE
|
||||
|
||||
@@ -1,7 +1,8 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<TcPlcObject Version="1.1.0.1">
|
||||
<DUT Name="ST_PackMLRecipe" Id="{b453a4b5-bb40-4669-97f2-8d8ab8d3dc26}">
|
||||
<Declaration><![CDATA[TYPE ST_PackMLRecipe :
|
||||
<Declaration><![CDATA[{attribute 'analysis' := '-33'}
|
||||
TYPE ST_PackMLRecipe :
|
||||
STRUCT
|
||||
diID : DINT;
|
||||
sName : STRING;
|
||||
|
||||
@@ -1,7 +1,8 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<TcPlcObject Version="1.1.0.1">
|
||||
<DUT Name="ST_PackML_ProductData" Id="{2af30e31-0927-41d2-9df4-7ed222070c13}">
|
||||
<Declaration><![CDATA[TYPE ST_PackML_ProductData :
|
||||
<Declaration><![CDATA[{attribute 'analysis' := '-33'}
|
||||
TYPE ST_PackML_ProductData :
|
||||
STRUCT
|
||||
diProcessedCount : DINT;
|
||||
diDefectiveCount : DINT;
|
||||
|
||||
@@ -4,14 +4,14 @@
|
||||
<Declaration><![CDATA[TYPE ST_PackMLStateMachineConfig :
|
||||
STRUCT
|
||||
xClearingDisabled : BOOL;
|
||||
// xStoppedDisabled : BOOL;
|
||||
// xStoppedDisabled required state
|
||||
xStartingDisabled : BOOL;
|
||||
// xIdleDisabled : BOOL;
|
||||
// xIdleDisabled required state
|
||||
xSuspededDisabled : BOOL;
|
||||
// xExecuteDisabled : BOOL;
|
||||
// xExecuteDisabled required state
|
||||
xStoppingDisabled : BOOL;
|
||||
xAbortingDisabled : BOOL;
|
||||
// xAbortedDisabled : BOOL;
|
||||
// xAbortedDisabled required state
|
||||
xHoldingDisabled : BOOL;
|
||||
xHeldDisabled : BOOL;
|
||||
xUnholdingDisabled : BOOL;
|
||||
|
||||
@@ -2,6 +2,8 @@
|
||||
<TcPlcObject Version="1.1.0.1">
|
||||
<GVL Name="GVL_PackML_Conf" Id="{b46d8e14-5a19-467d-bb78-56321e43ef47}">
|
||||
<Declaration><![CDATA[{attribute 'qualified_only'}
|
||||
{attribute 'naming' := 'off'}
|
||||
{attribute 'analysis' := '-43'}
|
||||
VAR_GLOBAL CONSTANT
|
||||
MAX_PARAMS : UINT := 10;
|
||||
MAX_PRODUCT_DATA : UINT := 10;
|
||||
|
||||
@@ -27,9 +27,6 @@ VAR
|
||||
|
||||
// Internal unit mode
|
||||
_eMode : E_PackMLUnitMode;
|
||||
|
||||
// Internal unit state
|
||||
_eState : E_PackMLState;
|
||||
|
||||
// Last state
|
||||
_eLastState : E_PackMLState;
|
||||
|
||||
@@ -1,7 +1,8 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<TcPlcObject Version="1.1.0.1">
|
||||
<POU Name="FB_PackMLStateMachine" Id="{784ceb84-1721-424f-89d1-422a24198e57}" SpecialFunc="None">
|
||||
<Declaration><![CDATA[FUNCTION_BLOCK FB_PackMLStateMachine
|
||||
<Declaration><![CDATA[{attribute 'analysis' := '-178'}
|
||||
FUNCTION_BLOCK FB_PackMLStateMachine
|
||||
VAR_INPUT
|
||||
eMode : E_PackMLUnitMode;
|
||||
eCmd : E_PackMLCmd;
|
||||
@@ -419,6 +420,9 @@ END_VAR
|
||||
|
||||
E_PackMLState.CLEARING:
|
||||
_eState := E_PackMLState.STOPPED;
|
||||
|
||||
ELSE
|
||||
;
|
||||
END_CASE
|
||||
|
||||
eState := _eState;]]></ST>
|
||||
|
||||
Reference in New Issue
Block a user