Fix assi
fix XML e save/load dei parametri
This commit is contained in:
@@ -35,11 +35,8 @@
|
||||
<DataItem category="SAMPLE" id="Axis_01_AccTime" name="Tempo impiego cumulato asse X (1)" nativeUnits="SECOND" type="ACCUMULATED_TIME" units="SECOND"/>
|
||||
<DataItem category="SAMPLE" id="Axis_01_Battery" name="Valore batteria asse X (1)" nativeUnits="VOLT" type="VOLTAGE" units="VOLT"/>
|
||||
<DataItem type="TEMPERATURE" id="Temp_01_Value" category="SAMPLE" name="Sonda Temperatura asse 1" units="DEGREE" />
|
||||
<!-- aggiungere gli allarmi x ogni altro asse -->
|
||||
<DataItem category="CONDITION" id="AX01_CNC" type="SYSTEM"/>
|
||||
<DataItem category="CONDITION" id="AX01_PLC" type="LOGIC"/>
|
||||
<!--<DataItem category="CONDITION" id="Xloadc" type="LOAD"/>
|
||||
<DataItem category="CONDITION" id="Xsystem" type="SYSTEM"/>-->
|
||||
</DataItems>
|
||||
</Linear>
|
||||
<Linear id="Axis_02" name="Asse Y">
|
||||
@@ -59,11 +56,8 @@
|
||||
<DataItem category="SAMPLE" id="Axis_02_AccTime" name="Tempo impiego cumulato asse Y (2)" nativeUnits="SECOND" type="ACCUMULATED_TIME" units="SECOND"/>
|
||||
<DataItem category="SAMPLE" id="Axis_02_Battery" name="Valore batteria asse Y (2)" nativeUnits="VOLT" type="VOLTAGE" units="VOLT"/>
|
||||
<DataItem type="TEMPERATURE" id="Temp_02_Value" category="SAMPLE" name="Sonda Temperatura asse 2" units="DEGREE" />
|
||||
<!-- aggiungere gli allarmi x ogni altro asse -->
|
||||
<DataItem category="CONDITION" id="AX02_CNC" type="SYSTEM"/>
|
||||
<DataItem category="CONDITION" id="AX02_PLC" type="LOGIC"/>
|
||||
<!--<DataItem category="CONDITION" id="Yloadc" type="LOAD"/>
|
||||
<DataItem category="CONDITION" id="Ysystem" type="SYSTEM"/>-->
|
||||
</DataItems>
|
||||
</Linear>
|
||||
<Linear id="Axis_03" name="Asse Z">
|
||||
@@ -83,11 +77,8 @@
|
||||
<DataItem category="SAMPLE" id="Axis_03_AccTime" name="Tempo impiego cumulato asse Z (3)" nativeUnits="SECOND" type="ACCUMULATED_TIME" units="SECOND"/>
|
||||
<DataItem category="SAMPLE" id="Axis_03_Battery" name="Valore batteria asse Z (3)" nativeUnits="VOLT" type="VOLTAGE" units="VOLT"/>
|
||||
<DataItem type="TEMPERATURE" id="Temp_03_Value" category="SAMPLE" name="Sonda Temperatura asse 3" units="DEGREE" />
|
||||
<!-- aggiungere gli allarmi x ogni altro asse -->
|
||||
<DataItem category="CONDITION" id="AX03_CNC" type="SYSTEM"/>
|
||||
<DataItem category="CONDITION" id="AX03_PLC" type="LOGIC"/>
|
||||
<!--<DataItem category="CONDITION" id="Xloadc" type="LOAD"/>
|
||||
<DataItem category="CONDITION" id="Xsystem" type="SYSTEM"/>-->
|
||||
</DataItems>
|
||||
</Linear>
|
||||
<Linear id="Axis_06" name="Asse U">
|
||||
@@ -107,11 +98,8 @@
|
||||
<DataItem category="SAMPLE" id="Axis_06_AccTime" name="Tempo impiego cumulato asse U (6)" nativeUnits="SECOND" type="ACCUMULATED_TIME" units="SECOND"/>
|
||||
<DataItem category="SAMPLE" id="Axis_06_Battery" name="Valore batteria asse U (6)" nativeUnits="VOLT" type="VOLTAGE" units="VOLT"/>
|
||||
<DataItem type="TEMPERATURE" id="Temp_06_Value" category="SAMPLE" name="Sonda Temperatura asse 6" units="DEGREE" />
|
||||
<!-- aggiungere gli allarmi x ogni altro asse -->
|
||||
<DataItem category="CONDITION" id="AX06_CNC" type="SYSTEM"/>
|
||||
<DataItem category="CONDITION" id="AX06_PLC" type="LOGIC"/>
|
||||
<!--<DataItem category="CONDITION" id="Xloadc" type="LOAD"/>
|
||||
<DataItem category="CONDITION" id="Xsystem" type="SYSTEM"/>-->
|
||||
</DataItems>
|
||||
</Linear>
|
||||
<Rotary id="Axis_04" name="Asse B">
|
||||
@@ -128,16 +116,8 @@
|
||||
<DataItem category="SAMPLE" id="Axis_04_AccelAct" name="Accelerazione angolare asse J (4)" nativeUnits="DEGREE/SECOND^2" type="ANGULAR_ACCELERATION" units="DEGREE/SECOND^2"/>
|
||||
<DataItem category="SAMPLE" id="Axis_04_AccTime" name="Tempo impiego cumulato asse J (4)" nativeUnits="SECOND" type="ACCUMULATED_TIME" units="SECOND"/>
|
||||
<DataItem category="SAMPLE" id="Axis_04_Battery" name="Valore batteria asse J (4)" nativeUnits="VOLT" type="VOLTAGE" units="VOLT"/>
|
||||
|
||||
<!--<DataItem category="EVENT" id="cm" name="Cmode" type="ROTARY_MODE">
|
||||
<Constraints>
|
||||
<Value>SPINDLE</Value>
|
||||
<Value>INDEX</Value>
|
||||
</Constraints>
|
||||
</DataItem>
|
||||
<DataItem category="CONDITION" id="Cloadc" type="LOAD"/>
|
||||
<DataItem category="CONDITION" id="Csystem" type="SYSTEM"/>
|
||||
<DataItem category="SAMPLE" id="cl3" name="Cload" nativeUnits="PERCENT" type="LOAD" units="PERCENT"/>-->
|
||||
<DataItem category="CONDITION" id="AX04_CNC" type="SYSTEM"/>
|
||||
<DataItem category="CONDITION" id="AX04_PLC" type="LOGIC"/>
|
||||
</DataItems>
|
||||
</Rotary>
|
||||
<Rotary id="Axis_05" name="Asse C (5)">
|
||||
@@ -154,16 +134,8 @@
|
||||
<DataItem category="SAMPLE" id="Axis_05_AccelAct" name="Accelerazione angolare asse K (5)" nativeUnits="DEGREE/SECOND^2" type="ANGULAR_ACCELERATION" units="DEGREE/SECOND^2"/>
|
||||
<DataItem category="SAMPLE" id="Axis_05_AccTime" name="Tempo impiego cumulato asse K (5)" nativeUnits="SECOND" type="ACCUMULATED_TIME" units="SECOND"/>
|
||||
<DataItem category="SAMPLE" id="Axis_05_Battery" name="Valore batteria asse K (5)" nativeUnits="VOLT" type="VOLTAGE" units="VOLT"/>
|
||||
|
||||
<!--<DataItem category="EVENT" id="cm" name="Cmode" type="ROTARY_MODE">
|
||||
<Constraints>
|
||||
<Value>SPINDLE</Value>
|
||||
<Value>INDEX</Value>
|
||||
</Constraints>
|
||||
</DataItem>
|
||||
<DataItem category="CONDITION" id="Cloadc" type="LOAD"/>
|
||||
<DataItem category="CONDITION" id="Csystem" type="SYSTEM"/>
|
||||
<DataItem category="SAMPLE" id="cl3" name="Cload" nativeUnits="PERCENT" type="LOAD" units="PERCENT"/>-->
|
||||
<DataItem category="CONDITION" id="AX05_CNC" type="SYSTEM"/>
|
||||
<DataItem category="CONDITION" id="AX05_PLC" type="LOGIC"/>
|
||||
</DataItems>
|
||||
</Rotary>
|
||||
</Components>
|
||||
@@ -180,8 +152,6 @@
|
||||
<DataItem category="EVENT" id="Path_01_ActiveAxes" type="ACTIVE_AXES"/>
|
||||
<DataItem category="EVENT" id="Path_01_PartId" type="PART_ID"/>
|
||||
<DataItem category="EVENT" id="Path_01_PZ_TOT" type="PART_COUNT"/>
|
||||
<!-- <DataItem category="EVENT" id="PZ_OK" type="PART_COUNT" subtype="GOOD"/>
|
||||
<DataItem category="EVENT" id="PZ_KO" type="PART_COUNT" subtype="BAD"/> -->
|
||||
<DataItem category="EVENT" id="Path_01_Cod_M" type="MESSAGE"/>
|
||||
<DataItem category="EVENT" id="Path_01_Cod_S" type="MESSAGE"/>
|
||||
<DataItem category="EVENT" id="Path_01_Cod_T" type="MESSAGE"/>
|
||||
|
||||
Binary file not shown.
@@ -20,7 +20,7 @@ namespace MTC_Sim
|
||||
{
|
||||
string sNomeAdapt;
|
||||
int nVers;
|
||||
public tipoAdapter etipoAdapt;
|
||||
tipoAdapter etipoAdapt;
|
||||
|
||||
element[] _VacuumPump;
|
||||
element[] _VacuumAct;
|
||||
@@ -38,7 +38,7 @@ namespace MTC_Sim
|
||||
public AdapterConf()
|
||||
{
|
||||
sNomeAdapt = "";
|
||||
etipoAdapt = tipoAdapter.Demo;
|
||||
etipoAdapt = tipoAdapter.DEMO;
|
||||
}
|
||||
public int nVacuumPump
|
||||
{
|
||||
|
||||
@@ -1,9 +1,8 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<AdapterConf xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
|
||||
<etipoAdapt>Demo</etipoAdapt>
|
||||
<Version>1</Version>
|
||||
<NomeAdapt>CMS_ADAPTER_00</NomeAdapt>
|
||||
<TipoAdapt>Fanuc</TipoAdapt>
|
||||
<NomeAdapt>CMS_ADAPTER_FANUC</NomeAdapt>
|
||||
<TipoAdapt>FANUC</TipoAdapt>
|
||||
<VacuumPump>
|
||||
<element>
|
||||
<ident>VacPump_01</ident>
|
||||
@@ -156,39 +155,83 @@
|
||||
<dataRefList>
|
||||
<dataRef>
|
||||
<Key>Path_01_FeedRate</Key>
|
||||
<Value>0#15</Value>
|
||||
<Value>INT#D8888.0</Value>
|
||||
</dataRef>
|
||||
<dataRef>
|
||||
<Key>Path_01_FeedOverr</Key>
|
||||
<Value>16#31</Value>
|
||||
<Value>INT#D8888.0</Value>
|
||||
</dataRef>
|
||||
<dataRef>
|
||||
<Key>Path_01_RapidOverr</Key>
|
||||
<Value>32#47</Value>
|
||||
<Value>INT#D8888.0</Value>
|
||||
</dataRef>
|
||||
<dataRef>
|
||||
<Key>Path_01_PosActX</Key>
|
||||
<Value>48#63</Value>
|
||||
<Value>FLOAT#D7777.0</Value>
|
||||
</dataRef>
|
||||
<dataRef>
|
||||
<Key>Path_01_PosActY</Key>
|
||||
<Value>64#79</Value>
|
||||
<Value>FLOAT#D7777.1</Value>
|
||||
</dataRef>
|
||||
<dataRef>
|
||||
<Key>Path_01_PosActZ</Key>
|
||||
<Value>80#95</Value>
|
||||
<Value>FLOAT#D7777.2</Value>
|
||||
</dataRef>
|
||||
<dataRef>
|
||||
<Key>Path_01_PosActI</Key>
|
||||
<Value>96#111</Value>
|
||||
<Value>FLOAT#D7777.3</Value>
|
||||
</dataRef>
|
||||
<dataRef>
|
||||
<Key>Path_01_PosActJ</Key>
|
||||
<Value>112#127</Value>
|
||||
<Value>FLOAT#D7777.4</Value>
|
||||
</dataRef>
|
||||
<dataRef>
|
||||
<Key>Path_01_PosActK</Key>
|
||||
<Value>128#143</Value>
|
||||
<Value>FLOAT#D7777.5</Value>
|
||||
</dataRef>
|
||||
<dataRef>
|
||||
<Key>Path_01_Type</Key>
|
||||
<Value>FLAG#R10528.12</Value>
|
||||
</dataRef>
|
||||
<dataRef>
|
||||
<Key>Path_01_PartId</Key>
|
||||
<Value>INT#D9999</Value>
|
||||
</dataRef>
|
||||
<dataRef>
|
||||
<Key>Path_01_PZ_TOT</Key>
|
||||
<Value>INT#D9999</Value>
|
||||
</dataRef>
|
||||
<dataRef>
|
||||
<Key>Path_01_Cod_M</Key>
|
||||
<Value>STROBE#R10520.0</Value>
|
||||
</dataRef>
|
||||
<dataRef>
|
||||
<Key>Path_01_Cod_S</Key>
|
||||
<Value>STROBE#R10520.1</Value>
|
||||
</dataRef>
|
||||
<dataRef>
|
||||
<Key>Path_01_Cod_T</Key>
|
||||
<Value>STROBE#R10520.2</Value>
|
||||
</dataRef>
|
||||
<dataRef>
|
||||
<Key>Path_01_RUN_MODE</Key>
|
||||
<Value>FLAG#R10528.1:R10528.7</Value>
|
||||
</dataRef>
|
||||
<dataRef>
|
||||
<Key>Path_01_EXE_MODE</Key>
|
||||
<Value>FLAG#R10528.8:R10528.11</Value>
|
||||
</dataRef>
|
||||
<dataRef>
|
||||
<Key>Path_01_CurrProg</Key>
|
||||
<Value>STRING#D0000</Value>
|
||||
</dataRef>
|
||||
<dataRef>
|
||||
<Key>Path_01_CurrProg_RowNum</Key>
|
||||
<Value>INT#D0001.0</Value>
|
||||
</dataRef>
|
||||
<dataRef>
|
||||
<Key>Path_01_ActiveAxes</Key>
|
||||
<Value>STROBE#R10520.3</Value>
|
||||
</dataRef>
|
||||
</dataRefList>
|
||||
</element>
|
||||
|
||||
@@ -0,0 +1,632 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<AdapterConf xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
|
||||
<Version>1</Version>
|
||||
<NomeAdapt>CMS_ADAPTER_00</NomeAdapt>
|
||||
<TipoAdapt>FANUC</TipoAdapt>
|
||||
<VacuumPump>
|
||||
<element>
|
||||
<ident>VacPump_01</ident>
|
||||
<alias>Pompa 1</alias>
|
||||
<fonte>Random</fonte>
|
||||
<dataRefList>
|
||||
<dataRef>
|
||||
<Key>VacPump_01_Status</Key>
|
||||
<Value>0#7</Value>
|
||||
</dataRef>
|
||||
</dataRefList>
|
||||
</element>
|
||||
<element>
|
||||
<ident>VacPump_02</ident>
|
||||
<alias>Pompa 2</alias>
|
||||
<fonte>Random</fonte>
|
||||
<dataRefList>
|
||||
<dataRef>
|
||||
<Key>VacPump_02_Status</Key>
|
||||
<Value>0#7</Value>
|
||||
</dataRef>
|
||||
</dataRefList>
|
||||
</element>
|
||||
</VacuumPump>
|
||||
<VacuumAct>
|
||||
<element>
|
||||
<ident>VacAct_01</ident>
|
||||
<alias>Attuatore vuoto 1</alias>
|
||||
<fonte>Random</fonte>
|
||||
<dataRefList>
|
||||
<dataRef>
|
||||
<Key>VacAct_01_Count</Key>
|
||||
<Value>0#15</Value>
|
||||
</dataRef>
|
||||
</dataRefList>
|
||||
</element>
|
||||
<element>
|
||||
<ident>VacAct_02</ident>
|
||||
<alias>Attuatore vuoto 2</alias>
|
||||
<fonte>Random</fonte>
|
||||
<dataRefList>
|
||||
<dataRef>
|
||||
<Key>VacAct_02_Count</Key>
|
||||
<Value>0#15</Value>
|
||||
</dataRef>
|
||||
</dataRefList>
|
||||
</element>
|
||||
</VacuumAct>
|
||||
<Lubro>
|
||||
<element>
|
||||
<ident>Lubro_01</ident>
|
||||
<alias>Lubrorefrigerante 1</alias>
|
||||
<fonte>Random</fonte>
|
||||
<dataRefList>
|
||||
<dataRef>
|
||||
<Key>Lubro_01_Num</Key>
|
||||
<Value>0#15</Value>
|
||||
</dataRef>
|
||||
</dataRefList>
|
||||
</element>
|
||||
<element>
|
||||
<ident>Lubro_02</ident>
|
||||
<alias>Lubrorefrigerante 2</alias>
|
||||
<fonte>Random</fonte>
|
||||
<dataRefList>
|
||||
<dataRef>
|
||||
<Key>Lubro_02_Num</Key>
|
||||
<Value>0#15</Value>
|
||||
</dataRef>
|
||||
</dataRefList>
|
||||
</element>
|
||||
</Lubro>
|
||||
<Cooler>
|
||||
<element>
|
||||
<ident>Cooler_01</ident>
|
||||
<alias>Cooler 1</alias>
|
||||
<fonte>Random</fonte>
|
||||
<dataRefList>
|
||||
<dataRef>
|
||||
<Key>Cooler_01_Status</Key>
|
||||
<Value>0#3</Value>
|
||||
</dataRef>
|
||||
</dataRefList>
|
||||
</element>
|
||||
<element>
|
||||
<ident>Cooler_02</ident>
|
||||
<alias>Cooler 2</alias>
|
||||
<fonte>Random</fonte>
|
||||
<dataRefList>
|
||||
<dataRef>
|
||||
<Key>Cooler_02_Status</Key>
|
||||
<Value>0#3</Value>
|
||||
</dataRef>
|
||||
</dataRefList>
|
||||
</element>
|
||||
</Cooler>
|
||||
<Press>
|
||||
<element>
|
||||
<ident>Press_01</ident>
|
||||
<alias>Pressostato 1</alias>
|
||||
<fonte>Random</fonte>
|
||||
<dataRefList>
|
||||
<dataRef>
|
||||
<Key>Press_01_Value</Key>
|
||||
<Value>0#7</Value>
|
||||
</dataRef>
|
||||
</dataRefList>
|
||||
</element>
|
||||
<element>
|
||||
<ident>Press_02</ident>
|
||||
<alias>Pressostato 2</alias>
|
||||
<fonte>Random</fonte>
|
||||
<dataRefList>
|
||||
<dataRef>
|
||||
<Key>Press_02_Value</Key>
|
||||
<Value>0#7</Value>
|
||||
</dataRef>
|
||||
</dataRefList>
|
||||
</element>
|
||||
</Press>
|
||||
<Temp>
|
||||
<element>
|
||||
<ident>Temp_01</ident>
|
||||
<alias>Sonda Temperatura 1</alias>
|
||||
<fonte>Random</fonte>
|
||||
<dataRefList>
|
||||
<dataRef>
|
||||
<Key>Temp_01_Value</Key>
|
||||
<Value>0#7</Value>
|
||||
</dataRef>
|
||||
</dataRefList>
|
||||
</element>
|
||||
<element>
|
||||
<ident>Temp_02</ident>
|
||||
<alias>Sonda Temperatura 2</alias>
|
||||
<fonte>Random</fonte>
|
||||
<dataRefList>
|
||||
<dataRef>
|
||||
<Key>Temp_02_Value</Key>
|
||||
<Value>0#7</Value>
|
||||
</dataRef>
|
||||
</dataRefList>
|
||||
</element>
|
||||
</Temp>
|
||||
<Path>
|
||||
<element>
|
||||
<ident>Path_01</ident>
|
||||
<alias>Path num 1</alias>
|
||||
<fonte>Random</fonte>
|
||||
<dataRefList>
|
||||
<dataRef>
|
||||
<Key>Path_01_FeedRate</Key>
|
||||
<Value>INT#D8888.0</Value>
|
||||
</dataRef>
|
||||
<dataRef>
|
||||
<Key>Path_01_FeedOverr</Key>
|
||||
<Value>INT#D8888.0</Value>
|
||||
</dataRef>
|
||||
<dataRef>
|
||||
<Key>Path_01_RapidOverr</Key>
|
||||
<Value>INT#D8888.0</Value>
|
||||
</dataRef>
|
||||
<dataRef>
|
||||
<Key>Path_01_PosActX</Key>
|
||||
<Value>FLOAT#D7777.0</Value>
|
||||
</dataRef>
|
||||
<dataRef>
|
||||
<Key>Path_01_PosActY</Key>
|
||||
<Value>FLOAT#D7777.1</Value>
|
||||
</dataRef>
|
||||
<dataRef>
|
||||
<Key>Path_01_PosActZ</Key>
|
||||
<Value>FLOAT#D7777.2</Value>
|
||||
</dataRef>
|
||||
<dataRef>
|
||||
<Key>Path_01_PosActI</Key>
|
||||
<Value>FLOAT#D7777.3</Value>
|
||||
</dataRef>
|
||||
<dataRef>
|
||||
<Key>Path_01_PosActJ</Key>
|
||||
<Value>FLOAT#D7777.4</Value>
|
||||
</dataRef>
|
||||
<dataRef>
|
||||
<Key>Path_01_PosActK</Key>
|
||||
<Value>FLOAT#D7777.5</Value>
|
||||
</dataRef>
|
||||
<dataRef>
|
||||
<Key>Path_01_Type</Key>
|
||||
<Value>FLAG#R10528.12</Value>
|
||||
</dataRef>
|
||||
<dataRef>
|
||||
<Key>Path_01_PartId</Key>
|
||||
<Value>INT#D9999</Value>
|
||||
</dataRef>
|
||||
<dataRef>
|
||||
<Key>Path_01_PZ_TOT</Key>
|
||||
<Value>INT#D9999</Value>
|
||||
</dataRef>
|
||||
<dataRef>
|
||||
<Key>Path_01_Cod_M</Key>
|
||||
<Value>STROBE#R10520.0</Value>
|
||||
</dataRef>
|
||||
<dataRef>
|
||||
<Key>Path_01_Cod_S</Key>
|
||||
<Value>STROBE#R10520.1</Value>
|
||||
</dataRef>
|
||||
<dataRef>
|
||||
<Key>Path_01_Cod_T</Key>
|
||||
<Value>STROBE#R10520.2</Value>
|
||||
</dataRef>
|
||||
<dataRef>
|
||||
<Key>Path_01_RUN_MODE</Key>
|
||||
<Value>FLAG#R10528.1:R10528.7</Value>
|
||||
</dataRef>
|
||||
<dataRef>
|
||||
<Key>Path_01_EXE_MODE</Key>
|
||||
<Value>FLAG#R10528.8:R10528.11</Value>
|
||||
</dataRef>
|
||||
<dataRef>
|
||||
<Key>Path_01_CurrProg</Key>
|
||||
<Value>STRING#D0000</Value>
|
||||
</dataRef>
|
||||
<dataRef>
|
||||
<Key>Path_01_CurrProg_RowNum</Key>
|
||||
<Value>INT#D0001.0</Value>
|
||||
</dataRef>
|
||||
<dataRef>
|
||||
<Key>Path_01_ActiveAxes</Key>
|
||||
<Value>STROBE#R10520.3</Value>
|
||||
</dataRef>
|
||||
</dataRefList>
|
||||
</element>
|
||||
</Path>
|
||||
<UnOp>
|
||||
<element>
|
||||
<ident>UnOp_01</ident>
|
||||
<alias>Unita Op num 1</alias>
|
||||
<fonte>Random</fonte>
|
||||
<dataRefList>
|
||||
<dataRef>
|
||||
<Key>UnOp_01_ToolId</Key>
|
||||
<Value>0#7</Value>
|
||||
</dataRef>
|
||||
<dataRef>
|
||||
<Key>UnOp_01_NumCU</Key>
|
||||
<Value>8#15</Value>
|
||||
</dataRef>
|
||||
<dataRef>
|
||||
<Key>UnOp_01_Status</Key>
|
||||
<Value>16#23</Value>
|
||||
</dataRef>
|
||||
<dataRef>
|
||||
<Key>UnOp_01_VitaRes</Key>
|
||||
<Value>24#31</Value>
|
||||
</dataRef>
|
||||
<dataRef>
|
||||
<Key>UnOp_01_Speed</Key>
|
||||
<Value>32#39</Value>
|
||||
</dataRef>
|
||||
<dataRef>
|
||||
<Key>UnOp_01_Load</Key>
|
||||
<Value>40#47</Value>
|
||||
</dataRef>
|
||||
<dataRef>
|
||||
<Key>UnOp_01_AccTime</Key>
|
||||
<Value>48#55</Value>
|
||||
</dataRef>
|
||||
</dataRefList>
|
||||
</element>
|
||||
</UnOp>
|
||||
<Axis>
|
||||
<element>
|
||||
<ident>Axis_01</ident>
|
||||
<alias>Asse num 1</alias>
|
||||
<fonte>Random</fonte>
|
||||
<dataRefList>
|
||||
<dataRef>
|
||||
<Key>Axis_01_MainProc</Key>
|
||||
<Value>0#7</Value>
|
||||
</dataRef>
|
||||
<dataRef>
|
||||
<Key>Axis_01_IsMast</Key>
|
||||
<Value>8#15</Value>
|
||||
</dataRef>
|
||||
<dataRef>
|
||||
<Key>Axis_01_MastId</Key>
|
||||
<Value>16#23</Value>
|
||||
</dataRef>
|
||||
<dataRef>
|
||||
<Key>Axis_01_Type</Key>
|
||||
<Value>24#31</Value>
|
||||
</dataRef>
|
||||
<dataRef>
|
||||
<Key>Axis_01_Dir</Key>
|
||||
<Value>32#39</Value>
|
||||
</dataRef>
|
||||
<dataRef>
|
||||
<Key>Axis_01_Load</Key>
|
||||
<Value>40#47</Value>
|
||||
</dataRef>
|
||||
<dataRef>
|
||||
<Key>Axis_01_PosAct</Key>
|
||||
<Value>48#55</Value>
|
||||
</dataRef>
|
||||
<dataRef>
|
||||
<Key>Axis_01_PosTgt</Key>
|
||||
<Value>56#63</Value>
|
||||
</dataRef>
|
||||
<dataRef>
|
||||
<Key>Axis_01_FeedAct</Key>
|
||||
<Value>64#71</Value>
|
||||
</dataRef>
|
||||
<dataRef>
|
||||
<Key>Axis_01_FeedOver</Key>
|
||||
<Value>72#79</Value>
|
||||
</dataRef>
|
||||
<dataRef>
|
||||
<Key>Axis_01_AccelAct</Key>
|
||||
<Value>80#87</Value>
|
||||
</dataRef>
|
||||
<dataRef>
|
||||
<Key>Axis_01_AccTime</Key>
|
||||
<Value>88#95</Value>
|
||||
</dataRef>
|
||||
<dataRef>
|
||||
<Key>Axis_01_Battery</Key>
|
||||
<Value>96#103</Value>
|
||||
</dataRef>
|
||||
</dataRefList>
|
||||
</element>
|
||||
<element>
|
||||
<ident>Axis_02</ident>
|
||||
<alias>Asse num 2</alias>
|
||||
<fonte>Random</fonte>
|
||||
<dataRefList>
|
||||
<dataRef>
|
||||
<Key>Axis_02_MainProc</Key>
|
||||
<Value>0#7</Value>
|
||||
</dataRef>
|
||||
<dataRef>
|
||||
<Key>Axis_02_IsMast</Key>
|
||||
<Value>8#15</Value>
|
||||
</dataRef>
|
||||
<dataRef>
|
||||
<Key>Axis_02_MastId</Key>
|
||||
<Value>16#23</Value>
|
||||
</dataRef>
|
||||
<dataRef>
|
||||
<Key>Axis_02_Type</Key>
|
||||
<Value>24#31</Value>
|
||||
</dataRef>
|
||||
<dataRef>
|
||||
<Key>Axis_02_Dir</Key>
|
||||
<Value>32#39</Value>
|
||||
</dataRef>
|
||||
<dataRef>
|
||||
<Key>Axis_02_Load</Key>
|
||||
<Value>40#47</Value>
|
||||
</dataRef>
|
||||
<dataRef>
|
||||
<Key>Axis_02_PosAct</Key>
|
||||
<Value>48#55</Value>
|
||||
</dataRef>
|
||||
<dataRef>
|
||||
<Key>Axis_02_PosTgt</Key>
|
||||
<Value>56#63</Value>
|
||||
</dataRef>
|
||||
<dataRef>
|
||||
<Key>Axis_02_FeedAct</Key>
|
||||
<Value>64#71</Value>
|
||||
</dataRef>
|
||||
<dataRef>
|
||||
<Key>Axis_02_FeedOver</Key>
|
||||
<Value>72#79</Value>
|
||||
</dataRef>
|
||||
<dataRef>
|
||||
<Key>Axis_02_AccelAct</Key>
|
||||
<Value>80#87</Value>
|
||||
</dataRef>
|
||||
<dataRef>
|
||||
<Key>Axis_02_AccTime</Key>
|
||||
<Value>88#95</Value>
|
||||
</dataRef>
|
||||
<dataRef>
|
||||
<Key>Axis_02_Battery</Key>
|
||||
<Value>96#103</Value>
|
||||
</dataRef>
|
||||
</dataRefList>
|
||||
</element>
|
||||
<element>
|
||||
<ident>Axis_03</ident>
|
||||
<alias>Asse num 3</alias>
|
||||
<fonte>Random</fonte>
|
||||
<dataRefList>
|
||||
<dataRef>
|
||||
<Key>Axis_03_MainProc</Key>
|
||||
<Value>0#7</Value>
|
||||
</dataRef>
|
||||
<dataRef>
|
||||
<Key>Axis_03_IsMast</Key>
|
||||
<Value>8#15</Value>
|
||||
</dataRef>
|
||||
<dataRef>
|
||||
<Key>Axis_03_MastId</Key>
|
||||
<Value>16#23</Value>
|
||||
</dataRef>
|
||||
<dataRef>
|
||||
<Key>Axis_03_Type</Key>
|
||||
<Value>24#31</Value>
|
||||
</dataRef>
|
||||
<dataRef>
|
||||
<Key>Axis_03_Dir</Key>
|
||||
<Value>32#39</Value>
|
||||
</dataRef>
|
||||
<dataRef>
|
||||
<Key>Axis_03_Load</Key>
|
||||
<Value>40#47</Value>
|
||||
</dataRef>
|
||||
<dataRef>
|
||||
<Key>Axis_03_PosAct</Key>
|
||||
<Value>48#55</Value>
|
||||
</dataRef>
|
||||
<dataRef>
|
||||
<Key>Axis_03_PosTgt</Key>
|
||||
<Value>56#63</Value>
|
||||
</dataRef>
|
||||
<dataRef>
|
||||
<Key>Axis_03_FeedAct</Key>
|
||||
<Value>64#71</Value>
|
||||
</dataRef>
|
||||
<dataRef>
|
||||
<Key>Axis_03_FeedOver</Key>
|
||||
<Value>72#79</Value>
|
||||
</dataRef>
|
||||
<dataRef>
|
||||
<Key>Axis_03_AccelAct</Key>
|
||||
<Value>80#87</Value>
|
||||
</dataRef>
|
||||
<dataRef>
|
||||
<Key>Axis_03_AccTime</Key>
|
||||
<Value>88#95</Value>
|
||||
</dataRef>
|
||||
<dataRef>
|
||||
<Key>Axis_03_Battery</Key>
|
||||
<Value>96#103</Value>
|
||||
</dataRef>
|
||||
</dataRefList>
|
||||
</element>
|
||||
<element>
|
||||
<ident>Axis_04</ident>
|
||||
<alias>Asse num 4</alias>
|
||||
<fonte>Random</fonte>
|
||||
<dataRefList>
|
||||
<dataRef>
|
||||
<Key>Axis_04_MainProc</Key>
|
||||
<Value>0#7</Value>
|
||||
</dataRef>
|
||||
<dataRef>
|
||||
<Key>Axis_04_IsMast</Key>
|
||||
<Value>8#15</Value>
|
||||
</dataRef>
|
||||
<dataRef>
|
||||
<Key>Axis_04_MastId</Key>
|
||||
<Value>16#23</Value>
|
||||
</dataRef>
|
||||
<dataRef>
|
||||
<Key>Axis_04_Type</Key>
|
||||
<Value>24#31</Value>
|
||||
</dataRef>
|
||||
<dataRef>
|
||||
<Key>Axis_04_Dir</Key>
|
||||
<Value>32#39</Value>
|
||||
</dataRef>
|
||||
<dataRef>
|
||||
<Key>Axis_04_Load</Key>
|
||||
<Value>40#47</Value>
|
||||
</dataRef>
|
||||
<dataRef>
|
||||
<Key>Axis_04_PosAct</Key>
|
||||
<Value>48#55</Value>
|
||||
</dataRef>
|
||||
<dataRef>
|
||||
<Key>Axis_04_PosTgt</Key>
|
||||
<Value>56#63</Value>
|
||||
</dataRef>
|
||||
<dataRef>
|
||||
<Key>Axis_04_FeedAct</Key>
|
||||
<Value>64#71</Value>
|
||||
</dataRef>
|
||||
<dataRef>
|
||||
<Key>Axis_04_FeedOver</Key>
|
||||
<Value>72#79</Value>
|
||||
</dataRef>
|
||||
<dataRef>
|
||||
<Key>Axis_04_AccelAct</Key>
|
||||
<Value>80#87</Value>
|
||||
</dataRef>
|
||||
<dataRef>
|
||||
<Key>Axis_04_AccTime</Key>
|
||||
<Value>88#95</Value>
|
||||
</dataRef>
|
||||
<dataRef>
|
||||
<Key>Axis_04_Battery</Key>
|
||||
<Value>96#103</Value>
|
||||
</dataRef>
|
||||
</dataRefList>
|
||||
</element>
|
||||
<element>
|
||||
<ident>Axis_05</ident>
|
||||
<alias>Asse num 5</alias>
|
||||
<fonte>Random</fonte>
|
||||
<dataRefList>
|
||||
<dataRef>
|
||||
<Key>Axis_05_MainProc</Key>
|
||||
<Value>0#7</Value>
|
||||
</dataRef>
|
||||
<dataRef>
|
||||
<Key>Axis_05_IsMast</Key>
|
||||
<Value>8#15</Value>
|
||||
</dataRef>
|
||||
<dataRef>
|
||||
<Key>Axis_05_MastId</Key>
|
||||
<Value>16#23</Value>
|
||||
</dataRef>
|
||||
<dataRef>
|
||||
<Key>Axis_05_Type</Key>
|
||||
<Value>24#31</Value>
|
||||
</dataRef>
|
||||
<dataRef>
|
||||
<Key>Axis_05_Dir</Key>
|
||||
<Value>32#39</Value>
|
||||
</dataRef>
|
||||
<dataRef>
|
||||
<Key>Axis_05_Load</Key>
|
||||
<Value>40#47</Value>
|
||||
</dataRef>
|
||||
<dataRef>
|
||||
<Key>Axis_05_PosAct</Key>
|
||||
<Value>48#55</Value>
|
||||
</dataRef>
|
||||
<dataRef>
|
||||
<Key>Axis_05_PosTgt</Key>
|
||||
<Value>56#63</Value>
|
||||
</dataRef>
|
||||
<dataRef>
|
||||
<Key>Axis_05_FeedAct</Key>
|
||||
<Value>64#71</Value>
|
||||
</dataRef>
|
||||
<dataRef>
|
||||
<Key>Axis_05_FeedOver</Key>
|
||||
<Value>72#79</Value>
|
||||
</dataRef>
|
||||
<dataRef>
|
||||
<Key>Axis_05_AccelAct</Key>
|
||||
<Value>80#87</Value>
|
||||
</dataRef>
|
||||
<dataRef>
|
||||
<Key>Axis_05_AccTime</Key>
|
||||
<Value>88#95</Value>
|
||||
</dataRef>
|
||||
<dataRef>
|
||||
<Key>Axis_05_Battery</Key>
|
||||
<Value>96#103</Value>
|
||||
</dataRef>
|
||||
</dataRefList>
|
||||
</element>
|
||||
<element>
|
||||
<ident>Axis_06</ident>
|
||||
<alias>Asse num 6</alias>
|
||||
<fonte>Random</fonte>
|
||||
<dataRefList>
|
||||
<dataRef>
|
||||
<Key>Axis_06_MainProc</Key>
|
||||
<Value>0#7</Value>
|
||||
</dataRef>
|
||||
<dataRef>
|
||||
<Key>Axis_06_IsMast</Key>
|
||||
<Value>8#15</Value>
|
||||
</dataRef>
|
||||
<dataRef>
|
||||
<Key>Axis_06_MastId</Key>
|
||||
<Value>16#23</Value>
|
||||
</dataRef>
|
||||
<dataRef>
|
||||
<Key>Axis_06_Type</Key>
|
||||
<Value>24#31</Value>
|
||||
</dataRef>
|
||||
<dataRef>
|
||||
<Key>Axis_06_Dir</Key>
|
||||
<Value>32#39</Value>
|
||||
</dataRef>
|
||||
<dataRef>
|
||||
<Key>Axis_06_Load</Key>
|
||||
<Value>40#47</Value>
|
||||
</dataRef>
|
||||
<dataRef>
|
||||
<Key>Axis_06_PosAct</Key>
|
||||
<Value>48#55</Value>
|
||||
</dataRef>
|
||||
<dataRef>
|
||||
<Key>Axis_06_PosTgt</Key>
|
||||
<Value>56#63</Value>
|
||||
</dataRef>
|
||||
<dataRef>
|
||||
<Key>Axis_06_FeedAct</Key>
|
||||
<Value>64#71</Value>
|
||||
</dataRef>
|
||||
<dataRef>
|
||||
<Key>Axis_06_FeedOver</Key>
|
||||
<Value>72#79</Value>
|
||||
</dataRef>
|
||||
<dataRef>
|
||||
<Key>Axis_06_AccelAct</Key>
|
||||
<Value>80#87</Value>
|
||||
</dataRef>
|
||||
<dataRef>
|
||||
<Key>Axis_06_AccTime</Key>
|
||||
<Value>88#95</Value>
|
||||
</dataRef>
|
||||
<dataRef>
|
||||
<Key>Axis_06_Battery</Key>
|
||||
<Value>96#103</Value>
|
||||
</dataRef>
|
||||
</dataRefList>
|
||||
</element>
|
||||
</Axis>
|
||||
</AdapterConf>
|
||||
@@ -1,59 +0,0 @@
|
||||
<?xml version='1.0' encoding='UTF-8'?>
|
||||
<MTConnectDevices xmlns:mt='urn:mtconnect.org:MTConnectDevices:1.3' xmlns:xsi='http://www.w3.org/2001/XMLSchema-instance' xmlns='urn:mtconnect.org:MTConnectDevices:1.3' xsi:schemaLocation='urn:mtconnect.org:MTConnectDevices:1.3 ./schemas/MTConnectDevices_1.3.xsd'>
|
||||
<Header creationTime='2013-04-02T03:40:04Z' assetBufferSize='1024' sender='localhost' assetCount='0' version='1.2' instanceId='1' bufferSize='131072'/>
|
||||
<Devices>
|
||||
<Device name='MC2_LAB' uuid='MC2_LAB' id='MC2_LAB_1'>
|
||||
<Description model='LAB' manufacturer='MTC'>MTConnect Lab Machine - Machine</Description>
|
||||
<DataItems>
|
||||
<DataItem type='AVAILABILITY' category='EVENT' id='dtop_3' name='avail'/>
|
||||
<DataItem type='EMERGENCY_STOP' category='EVENT' id='dtop_2' name='estop'/>
|
||||
<DataItem id="dtop_5" name="func" type="FUNCTIONAL_MODE" category="EVENT" />
|
||||
</DataItems>
|
||||
<Components>
|
||||
<Axes name='axes' id='axes_4'>
|
||||
<Components>
|
||||
<Linear name='X' id='X_5'>
|
||||
<DataItems>
|
||||
<DataItem type='LOAD' category='SAMPLE' id='X_6' name='xLoad' units='PERCENT' nativeUnits='PERCENT'/>
|
||||
<DataItem type='POSITION' category='SAMPLE' id='X_7' name='xPosition' subType='ACTUAL' units='MILLIMETER' nativeUnits='INCH' coordinateSystem='MACHINE'/>
|
||||
<DataItem type='POSITION' category='CONDITION' id='X_8' name='travel'/>
|
||||
<DataItem type='LOAD' category='CONDITION' id='X_9' name='overload'/>
|
||||
</DataItems>
|
||||
</Linear>
|
||||
<Rotary name='C' nativeName="C" id='C_1'>
|
||||
<DataItems>
|
||||
<DataItem type='LOAD' category='SAMPLE' id='C_6' name='sLoad' units='PERCENT' nativeUnits='PERCENT'/>
|
||||
<DataItem type="ROTARY_VELOCITY" category="SAMPLE" id="C_7" name="sSpeed" units="REVOLUTION/MINUTE"/>
|
||||
</DataItems>
|
||||
</Rotary>
|
||||
</Components>
|
||||
</Axes>
|
||||
<Controller name='controller' id='controller_10'>
|
||||
<DataItems>
|
||||
<DataItem type='CONTROLLER_MODE' category='EVENT' id='controller_11' name='mode'/>
|
||||
<DataItem type='EXECUTION' category='EVENT' id='controller_12' name='exec'/>
|
||||
<DataItem type='PROGRAM' category='EVENT' id='controller_13' name='program'/>
|
||||
<DataItem type='MESSAGE' category='EVENT' id='controller_14' name='message' representation="DISCRETE"/>
|
||||
<DataItem type='SYSTEM' category='CONDITION' id='controller_15' name='system'/>
|
||||
<DataItem type='TEMPERATURE' category='CONDITION' id='controller_16' name='temp'/>
|
||||
<DataItem type="e:COMMON_VARIABLE" category="EVENT" id="cv_117" name="cv"/>
|
||||
</DataItems>
|
||||
</Controller>
|
||||
<Systems name='systems' id='systems_17'>
|
||||
<Components>
|
||||
<Coolant name='coolant' id='coolant_18'>
|
||||
<DataItems>
|
||||
<DataItem type='FILL_LEVEL' category='CONDITION' id='coolant_19' name='cool_low'/>
|
||||
</DataItems>
|
||||
</Coolant>
|
||||
</Components>
|
||||
</Systems>
|
||||
<!--<Sensor name='audio' id='audio_20'>
|
||||
<DataItems>
|
||||
<DataItem type='DISPLACEMENT' category='SAMPLE' id='audio_21' name='audio' units='SOUND_LEVEL' representation='TIME_SERIES' sampleRate='8000'/>
|
||||
</DataItems>
|
||||
</Sensor>-->
|
||||
</Components>
|
||||
</Device>
|
||||
</Devices>
|
||||
</MTConnectDevices>
|
||||
@@ -284,6 +284,14 @@ namespace MTC_Sim
|
||||
/// Angolo K
|
||||
/// </summary>
|
||||
public Sample mPathPosActK;
|
||||
/// <summary>
|
||||
/// Allarmi CNC del PATH
|
||||
/// </summary>
|
||||
public Condition mPathAlarmCNC;
|
||||
/// <summary>
|
||||
/// Allarmi PCL del PATH
|
||||
/// </summary>
|
||||
public Condition mPathAlarmPLC;
|
||||
|
||||
/// <summary>
|
||||
/// Classe Path con Idx e descrizione
|
||||
@@ -319,6 +327,8 @@ namespace MTC_Sim
|
||||
mPathCurrProg = new Event(dataRefList[17].Key);
|
||||
mPathCurrProgRowNum = new Event(dataRefList[18].Key);
|
||||
mPathActiveAxes = new Event(dataRefList[19].Key);
|
||||
mPathAlarmCNC = new Condition(string.Format("{0}_AlarmCNC", ident));
|
||||
mPathAlarmPLC = new Condition(string.Format("{0}_AlarmPLC", ident));
|
||||
}
|
||||
}
|
||||
/// <summary>
|
||||
@@ -441,6 +451,14 @@ namespace MTC_Sim
|
||||
/// Carica batteria
|
||||
/// </summary>
|
||||
public Sample mAxBattery;
|
||||
/// <summary>
|
||||
/// Allarmi CNC del PATH
|
||||
/// </summary>
|
||||
public Condition mAxAlarmCNC;
|
||||
/// <summary>
|
||||
/// Allarmi PCL del PATH
|
||||
/// </summary>
|
||||
public Condition mAxAlarmPLC;
|
||||
|
||||
/// <summary>
|
||||
/// Classe Asse con relativo ID UNIVOCO ed alias
|
||||
@@ -469,6 +487,9 @@ namespace MTC_Sim
|
||||
mAxAccelAct = new Sample(dataRefList[10].Key);
|
||||
mAxAccTime = new Sample(dataRefList[11].Key);
|
||||
mAxBattery = new Sample(dataRefList[12].Key);
|
||||
|
||||
mAxAlarmCNC = new Condition(string.Format("{0}_AlarmCNC", ident));
|
||||
mAxAlarmPLC = new Condition(string.Format("{0}_AlarmPLC", ident));
|
||||
}
|
||||
|
||||
}
|
||||
@@ -787,6 +808,8 @@ namespace MTC_Sim
|
||||
mAdapter.AddDataItem(vettPath[i].mPathCurrProg);
|
||||
mAdapter.AddDataItem(vettPath[i].mPathCurrProgRowNum);
|
||||
mAdapter.AddDataItem(vettPath[i].mPathActiveAxes);
|
||||
// aggiungo condizioni allarme...
|
||||
|
||||
}
|
||||
// UnOp
|
||||
vettUnOp = new UnOp[adpConf.nUnOp];
|
||||
|
||||
@@ -15,29 +15,11 @@
|
||||
<add key="D1_UUID" value="000123456"/>
|
||||
<add key="D1_PROGRAM" value="PROG_DEMO_01"/>
|
||||
<add key="PartID" value="Prod_0001"/>
|
||||
<add key="STATUS_PLC_ADP" value="0"/>
|
||||
<add key="STATUS_ADP_PLC" value="0"/>
|
||||
<add key="STATUS_FLAGS" value="0"/>
|
||||
|
||||
<!--conf file-->
|
||||
<add key="adapterConfPath" value="AdapterConf"/>
|
||||
<add key ="adapterConfPathFull" value="C:\Users\samuele.STEAMWAREWIN\Documents\VisualStudioProjects\CMS-MTConn\MTC_Sim\MTC_Sim\AdapterConf"/>
|
||||
<add key="AlarmList" value="AlarmList.txt"/>
|
||||
|
||||
|
||||
|
||||
|
||||
<!--Cardinalità: conf x numero assi, UnitaOperatrici, ...-->
|
||||
<add key="NumUnOp" value="1"/>
|
||||
<add key="NumEvtUnOp" value="2"/>
|
||||
<add key="NumSamUnOp" value="14"/>
|
||||
<add key="NumAssi" value="6"/>
|
||||
<add key="NumEvtAssi" value="4"/>
|
||||
<add key="NumSamAssi" value="18"/>
|
||||
<add key="NumMand" value="1"/>
|
||||
<add key="NumAllarmi" value="1"/>
|
||||
|
||||
|
||||
|
||||
</appSettings>
|
||||
</configuration>
|
||||
@@ -1,32 +1,7 @@
|
||||
#fix simulation:
|
||||
- meno frequente modifiche produzione...
|
||||
- posizione attuale/sim meno "ballerina"
|
||||
# modifica threading
|
||||
- thread molto veloci
|
||||
- eseguo SEMPRE lettura degli STROBE
|
||||
- leggo strobe valori speciali
|
||||
- leggo strobe stato + allarmi
|
||||
|
||||
- quando ho lettura minimal/normal/full leggo altri dati OLTRE a strobe
|
||||
- gestione 3 contatori
|
||||
- ho dei contatori a count down x task di HF/MF/LF di ripetizione
|
||||
- decremento contatori
|
||||
- se count == 0 --> eseguo + reinizializzo variabile...
|
||||
|
||||
|
||||
|
||||
STROBE: gestione full PLC --> ADP e ADP --> PLC (32 bit)
|
||||
STATUS: elenco di variabili semaforiche che indicano variazione status importanti (32 bit?) + status delle CLASSI di allarme (32 bit)
|
||||
|
||||
|
||||
|
||||
AREE PER STATUS
|
||||
- D3450 - bit 0: AUTO
|
||||
- D3450 - bit 1: EDIT
|
||||
- D3450 - bit 2: MDI
|
||||
- D3450 - bit 3: DNC
|
||||
|
||||
lettura da D3450 --> D3457
|
||||
|
||||
|
||||
ATTENZIONE: aggiungere pos memoria x status e strobe x path
|
||||
|
||||
@@ -42,7 +42,7 @@ namespace MTC_Sim
|
||||
/// <summary>
|
||||
/// tipo di adapter prescelto...
|
||||
/// </summary>
|
||||
protected tipoAdapter tipoScelto = tipoAdapter.Demo;
|
||||
protected tipoAdapter tipoScelto = tipoAdapter.DEMO;
|
||||
|
||||
#region utils ed helpers
|
||||
|
||||
@@ -90,13 +90,13 @@ namespace MTC_Sim
|
||||
{
|
||||
switch (tipoScelto)
|
||||
{
|
||||
case tipoAdapter.Demo:
|
||||
case tipoAdapter.DEMO:
|
||||
agObj = new AdapterDemo(this, adpConf);
|
||||
EnableTab(tabCtrlMain.TabPages[1], true);
|
||||
EnableTab(tabCtrlMain.TabPages[2], true);
|
||||
start.Enabled = true;
|
||||
break;
|
||||
case tipoAdapter.Fanuc:
|
||||
case tipoAdapter.FANUC:
|
||||
agObj = new AdapterFanuc(this, adpConf);
|
||||
EnableTab(tabCtrlMain.TabPages[1], true);
|
||||
EnableTab(tabCtrlMain.TabPages[2], false);
|
||||
@@ -140,9 +140,9 @@ namespace MTC_Sim
|
||||
|
||||
OPERATOR_ID.Text = "M9999";
|
||||
|
||||
STATUS_PLC_ADP.Text = utils.binaryForm(utils.CRI("STATUS_PLC_ADP"));
|
||||
STATUS_ADP_PLC.Text = utils.binaryForm(utils.CRI("STATUS_ADP_PLC"));
|
||||
STATUS_FLAGS.Text = utils.binaryForm(utils.CRI("STATUS_FLAGS"));
|
||||
STATUS_PLC_ADP.Text = utils.binaryForm(0);
|
||||
STATUS_ADP_PLC.Text = utils.binaryForm(0);
|
||||
STATUS_FLAGS.Text = utils.binaryForm(0);
|
||||
|
||||
MainProgrBar.Minimum = 0;
|
||||
MainProgrBar.Maximum = 100;
|
||||
@@ -335,7 +335,7 @@ namespace MTC_Sim
|
||||
/// </summary>
|
||||
private void simulateData()
|
||||
{
|
||||
if (enableDataSim.Checked && tipoScelto == tipoAdapter.Demo)
|
||||
if (enableDataSim.Checked && tipoScelto == tipoAdapter.DEMO)
|
||||
{
|
||||
DateTime adesso = DateTime.Now;
|
||||
Random rnd = new Random();
|
||||
|
||||
@@ -110,9 +110,12 @@
|
||||
</ProjectReference>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Content Include="AdapterConf\CMS_FANUC.xml" />
|
||||
<Content Include="AdapterConf\Demo.xml" />
|
||||
<Content Include="AdapterConf\Devices.xml" />
|
||||
<Content Include="AdapterConf\CMS_FANUC.xml">
|
||||
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
||||
</Content>
|
||||
<Content Include="AdapterConf\Demo.xml">
|
||||
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
||||
</Content>
|
||||
<Content Include="AlarmList.txt">
|
||||
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
|
||||
</Content>
|
||||
|
||||
Generated
+1
-2
@@ -88,7 +88,7 @@
|
||||
this.txtFileName.Name = "txtFileName";
|
||||
this.txtFileName.Size = new System.Drawing.Size(122, 20);
|
||||
this.txtFileName.TabIndex = 2;
|
||||
this.txtFileName.Text = "Demo.xml";
|
||||
this.txtFileName.Text = "CMS_FANUC.xml";
|
||||
//
|
||||
// btnSave
|
||||
//
|
||||
@@ -164,7 +164,6 @@
|
||||
this.cbTipoAdapt.Name = "cbTipoAdapt";
|
||||
this.cbTipoAdapt.Size = new System.Drawing.Size(121, 21);
|
||||
this.cbTipoAdapt.TabIndex = 11;
|
||||
this.cbTipoAdapt.Text = "DEMO";
|
||||
//
|
||||
// label6
|
||||
//
|
||||
|
||||
@@ -198,17 +198,26 @@ namespace MTC_Sim
|
||||
c.NomeAdapt = txtAdapter.Text;
|
||||
c.Version = 1;
|
||||
// tipo da selettore
|
||||
switch (cbTipoAdapt.SelectedText)
|
||||
string valTipo = "";
|
||||
try
|
||||
{
|
||||
valTipo = cbTipoAdapt.SelectedItem.ToString().ToUpper();
|
||||
}
|
||||
catch
|
||||
{
|
||||
valTipo = cbTipoAdapt.SelectedText;
|
||||
}
|
||||
switch (valTipo)
|
||||
{
|
||||
case "FANUC":
|
||||
c.TipoAdapt = tipoAdapter.Fanuc;
|
||||
c.TipoAdapt = tipoAdapter.FANUC;
|
||||
break;
|
||||
case "HMI":
|
||||
c.TipoAdapt = tipoAdapter.HMI;
|
||||
break;
|
||||
case "DEMO":
|
||||
default:
|
||||
c.TipoAdapt = tipoAdapter.Demo;
|
||||
c.TipoAdapt = tipoAdapter.DEMO;
|
||||
break;
|
||||
}
|
||||
|
||||
@@ -337,17 +346,17 @@ namespace MTC_Sim
|
||||
listaDR.Add(new DataRefItem<string, string>(string.Format("Path_{0:00}_PosActJ", i + 1), "FLOAT#D7777.4"));
|
||||
listaDR.Add(new DataRefItem<string, string>(string.Format("Path_{0:00}_PosActK", i + 1), "FLOAT#D7777.5"));
|
||||
// aggiunta x revisione 2016.05.05
|
||||
listaDR.Add(new DataRefItem<string, string>(string.Format("Path_{0:00}_Type", i + 1), "LAVORO"));
|
||||
listaDR.Add(new DataRefItem<string, string>(string.Format("Path_{0:00}_Type", i + 1), "FLAG#R10528.12"));
|
||||
listaDR.Add(new DataRefItem<string, string>(string.Format("Path_{0:00}_PartId", i + 1), "INT#D9999"));
|
||||
listaDR.Add(new DataRefItem<string, string>(string.Format("Path_{0:00}_PZ_TOT", i + 1), "INT#D9999"));
|
||||
listaDR.Add(new DataRefItem<string, string>(string.Format("Path_{0:00}_Cod_M", i + 1), "STROBE#D6666.0"));
|
||||
listaDR.Add(new DataRefItem<string, string>(string.Format("Path_{0:00}_Cod_S", i + 1), "STROBE#D6666.1"));
|
||||
listaDR.Add(new DataRefItem<string, string>(string.Format("Path_{0:00}_Cod_T", i + 1), "STROBE#D6666.2"));
|
||||
listaDR.Add(new DataRefItem<string, string>(string.Format("Path_{0:00}_RUN_MODE", i + 1), "FLAG#D3450"));
|
||||
listaDR.Add(new DataRefItem<string, string>(string.Format("Path_{0:00}_EXE_MODE", i + 1), "FLAG#D3460"));
|
||||
listaDR.Add(new DataRefItem<string, string>(string.Format("Path_{0:00}_Cod_M", i + 1), "STROBE#R10520.0"));
|
||||
listaDR.Add(new DataRefItem<string, string>(string.Format("Path_{0:00}_Cod_S", i + 1), "STROBE#R10520.1"));
|
||||
listaDR.Add(new DataRefItem<string, string>(string.Format("Path_{0:00}_Cod_T", i + 1), "STROBE#R10520.2"));
|
||||
listaDR.Add(new DataRefItem<string, string>(string.Format("Path_{0:00}_RUN_MODE", i + 1), "FLAG#R10528.1:R10528.7"));
|
||||
listaDR.Add(new DataRefItem<string, string>(string.Format("Path_{0:00}_EXE_MODE", i + 1), "FLAG#R10528.8:R10528.11"));
|
||||
listaDR.Add(new DataRefItem<string, string>(string.Format("Path_{0:00}_CurrProg", i + 1), "STRING#D0000"));
|
||||
listaDR.Add(new DataRefItem<string, string>(string.Format("Path_{0:00}_CurrProg_RowNum", i + 1), "INT#D0001.0"));
|
||||
listaDR.Add(new DataRefItem<string, string>(string.Format("Path_{0:00}_ActiveAxes", i + 1), "FLAG#D9999"));
|
||||
listaDR.Add(new DataRefItem<string, string>(string.Format("Path_{0:00}_ActiveAxes", i + 1), "STROBE#R10520.3"));
|
||||
|
||||
Path[i] = new element(string.Format("Path_{0:00}", i + 1), string.Format("Path num {0}", i + 1), fonteDati.Random, listaDR);
|
||||
}
|
||||
@@ -419,6 +428,8 @@ namespace MTC_Sim
|
||||
AdapterConf c2 = AdapterConf.Deserialize(filePath);
|
||||
|
||||
txtAdapter.Text = c2.NomeAdapt;
|
||||
cbTipoAdapt.SelectedText = c2.TipoAdapt.ToString();
|
||||
//cbTipoAdapt.SelectedItem = c2.TipoAdapt;
|
||||
numVacPump = c2.nVacuumPump;
|
||||
numVacAct = c2.nVacuumAct;
|
||||
numLubro = c2.nLubro;
|
||||
|
||||
@@ -147,11 +147,11 @@ namespace MTC_Sim
|
||||
/// <summary>
|
||||
/// Adapter generico/demo
|
||||
/// </summary>
|
||||
Demo,
|
||||
DEMO,
|
||||
/// <summary>
|
||||
/// adapter FANUC-CMS
|
||||
/// </summary>
|
||||
Fanuc,
|
||||
FANUC,
|
||||
/// <summary>
|
||||
/// Adapter HMI-SCM
|
||||
/// </summary>
|
||||
@@ -167,7 +167,7 @@ namespace MTC_Sim
|
||||
public enum fonteDati
|
||||
{
|
||||
/// <summary>
|
||||
/// dati recuperati da metodi/calssi con HMI
|
||||
/// dati recuperati da metodi/classi con HMI
|
||||
/// </summary>
|
||||
HMI,
|
||||
/// <summary>
|
||||
|
||||
Reference in New Issue
Block a user