diff --git a/MTC_Adapter/MTC_Adapter/AdapterGeneric.cs b/MTC_Adapter/MTC_Adapter/AdapterGeneric.cs index b53dca0..ec19b47 100644 --- a/MTC_Adapter/MTC_Adapter/AdapterGeneric.cs +++ b/MTC_Adapter/MTC_Adapter/AdapterGeneric.cs @@ -368,29 +368,29 @@ namespace MTC_Adapter mPathAlias = new MTConnect.Message(string.Format("{0}_Alias", ident)); mPathAlias.Value = alias; - mPathFeed = new Sample(dataRefList[0].Key); - mPathFeedOver = new Sample(dataRefList[1].Key); - mPathRapidOver = new Sample(dataRefList[2].Key); - mPathPosActX = new Sample(dataRefList[3].Key); - mPathPosActY = new Sample(dataRefList[4].Key); - mPathPosActZ = new Sample(dataRefList[5].Key); - mPathPosActI = new Sample(dataRefList[6].Key); - mPathPosActJ = new Sample(dataRefList[7].Key); - mPathPosActK = new Sample(dataRefList[8].Key); + mPathFeed = new Sample(string.Format("{0}_FeedRate", ident)); + mPathFeedOver = new Sample(string.Format("{0}_FeedOverr", ident)); + mPathRapidOver = new Sample(string.Format("{0}_RapidOverr", ident)); + mPathPosActX = new Sample(string.Format("{0}_PosActX", ident)); + mPathPosActY = new Sample(string.Format("{0}_PosActY", ident)); + mPathPosActZ = new Sample(string.Format("{0}_PosActZ", ident)); + mPathPosActI = new Sample(string.Format("{0}_PosActI", ident)); + mPathPosActJ = new Sample(string.Format("{0}_PosActJ", ident)); + mPathPosActK = new Sample(string.Format("{0}_PosActK", ident)); // aggiunta x revisione 2016.05.05 - mPathType = new MTConnect.Message(dataRefList[9].Key); - mPathPartId = new Event(dataRefList[10].Key); - mPathPartCount = new Event(dataRefList[11].Key); - mPathCodM = new MTConnect.Message(dataRefList[12].Key); - mPathCodS = new MTConnect.Message(dataRefList[13].Key); - mPathCodT = new MTConnect.Message(dataRefList[14].Key); - mPathRunMode = new Event(dataRefList[15].Key); - mPathExeMode = new Event(dataRefList[16].Key); - mPathCurrProg = new Event(dataRefList[17].Key); - mPathCurrProgRowNum = new Event(dataRefList[18].Key); - mPathActiveAxes = new Event(dataRefList[19].Key); - mPathCodG_Act = new MTConnect.Message(dataRefList[20].Key); - mPathSubMode = new MTConnect.Message(dataRefList[21].Key); + mPathType = new MTConnect.Message(string.Format("{0}_Type", ident)); + mPathPartId = new Event(string.Format("{0}_PartId", ident)); + mPathPartCount = new Event(string.Format("{0}_PZ_TOT", ident)); + mPathCodM = new MTConnect.Message(string.Format("{0}_Cod_M", ident)); + mPathCodS = new MTConnect.Message(string.Format("{0}_Cod_S", ident)); + mPathCodT = new MTConnect.Message(string.Format("{0}_Cod_T", ident)); + mPathRunMode = new Event(string.Format("{0}_RUN_MODE", ident)); + mPathExeMode = new Event(string.Format("{0}_EXE_MODE", ident)); + mPathCurrProg = new Event(string.Format("{0}_CurrProg", ident)); + mPathCurrProgRowNum = new Event(string.Format("{0}_CurrProg_RowNum", ident)); + mPathActiveAxes = new Event(string.Format("{0}_ActiveAxes", ident)); + mPathCodG_Act = new MTConnect.Message(string.Format("{0}_CodG_Act", ident)); + mPathSubMode = new MTConnect.Message(string.Format("{0}_SubMode", ident)); mPathAlarmCNC = new Condition(string.Format("{0}_AlarmCNC", ident)); mPathAlarmPLC = new Condition(string.Format("{0}_AlarmPLC", ident)); } diff --git a/MTC_Adapter/MTC_Adapter/DATA/CONF/Adapter_ItemList.xml b/MTC_Adapter/MTC_Adapter/DATA/CONF/Adapter_ItemList.xml index 33355af..8e5ae00 100644 --- a/MTC_Adapter/MTC_Adapter/DATA/CONF/Adapter_ItemList.xml +++ b/MTC_Adapter/MTC_Adapter/DATA/CONF/Adapter_ItemList.xml @@ -183,97 +183,8 @@ Path_01 Path num 1 - Random - - - Path_01_FeedRate - 0 - - - Path_01_FeedOverr - 0 - - - Path_01_RapidOverr - 0 - - - Path_01_PosActX - 0 - - - Path_01_PosActY - 0 - - - Path_01_PosActZ - 0 - - - Path_01_PosActI - 0 - - - Path_01_PosActJ - 0 - - - Path_01_PosActK - 0 - - - Path_01_Type - 0 - - - Path_01_PartId - 0 - - - Path_01_PZ_TOT - 0 - - - Path_01_Cod_M - 0 - - - Path_01_Cod_S - 0 - - - Path_01_Cod_T - 0 - - - Path_01_RUN_MODE - 0 - - - Path_01_EXE_MODE - 0 - - - Path_01_CurrProg - 0 - - - Path_01_CurrProg_RowNum - 0 - - - Path_01_ActiveAxes - 0 - - - Path_01_CodG_Act - 0 - - - Path_01_SubMode - 0 - - + MemLoad + diff --git a/MTC_Adapter/MTC_Adapter/Resources/SCM/SCM_ESA.xml b/MTC_Adapter/MTC_Adapter/Resources/SCM/SCM_ESA.xml index 33355af..8e5ae00 100644 --- a/MTC_Adapter/MTC_Adapter/Resources/SCM/SCM_ESA.xml +++ b/MTC_Adapter/MTC_Adapter/Resources/SCM/SCM_ESA.xml @@ -183,97 +183,8 @@ Path_01 Path num 1 - Random - - - Path_01_FeedRate - 0 - - - Path_01_FeedOverr - 0 - - - Path_01_RapidOverr - 0 - - - Path_01_PosActX - 0 - - - Path_01_PosActY - 0 - - - Path_01_PosActZ - 0 - - - Path_01_PosActI - 0 - - - Path_01_PosActJ - 0 - - - Path_01_PosActK - 0 - - - Path_01_Type - 0 - - - Path_01_PartId - 0 - - - Path_01_PZ_TOT - 0 - - - Path_01_Cod_M - 0 - - - Path_01_Cod_S - 0 - - - Path_01_Cod_T - 0 - - - Path_01_RUN_MODE - 0 - - - Path_01_EXE_MODE - 0 - - - Path_01_CurrProg - 0 - - - Path_01_CurrProg_RowNum - 0 - - - Path_01_ActiveAxes - 0 - - - Path_01_CodG_Act - 0 - - - Path_01_SubMode - 0 - - + MemLoad + diff --git a/MTC_Adapter/MTC_Adapter/SetupAdapter.cs b/MTC_Adapter/MTC_Adapter/SetupAdapter.cs index efbfc37..99be478 100644 --- a/MTC_Adapter/MTC_Adapter/SetupAdapter.cs +++ b/MTC_Adapter/MTC_Adapter/SetupAdapter.cs @@ -386,32 +386,7 @@ namespace MTC_Adapter { // inizializzo list x parametri listaDR = new List>(); - listaDR.Add(new DataRefItem(string.Format("Path_{0:00}_FeedRate", i + 1), "0")); - listaDR.Add(new DataRefItem(string.Format("Path_{0:00}_FeedOverr", i + 1), "0")); - listaDR.Add(new DataRefItem(string.Format("Path_{0:00}_RapidOverr", i + 1), "0")); - listaDR.Add(new DataRefItem(string.Format("Path_{0:00}_PosActX", i + 1), "0")); - listaDR.Add(new DataRefItem(string.Format("Path_{0:00}_PosActY", i + 1), "0")); - listaDR.Add(new DataRefItem(string.Format("Path_{0:00}_PosActZ", i + 1), "0")); - listaDR.Add(new DataRefItem(string.Format("Path_{0:00}_PosActI", i + 1), "0")); - listaDR.Add(new DataRefItem(string.Format("Path_{0:00}_PosActJ", i + 1), "0")); - listaDR.Add(new DataRefItem(string.Format("Path_{0:00}_PosActK", i + 1), "0")); - listaDR.Add(new DataRefItem(string.Format("Path_{0:00}_Type", i + 1), "0")); - // aggiunta x revisione 2016.05.05 - listaDR.Add(new DataRefItem(string.Format("Path_{0:00}_PartId", i + 1), "0")); - listaDR.Add(new DataRefItem(string.Format("Path_{0:00}_PZ_TOT", i + 1), "0")); - listaDR.Add(new DataRefItem(string.Format("Path_{0:00}_Cod_M", i + 1), "0")); - listaDR.Add(new DataRefItem(string.Format("Path_{0:00}_Cod_S", i + 1), "0")); - listaDR.Add(new DataRefItem(string.Format("Path_{0:00}_Cod_T", i + 1), "0")); - listaDR.Add(new DataRefItem(string.Format("Path_{0:00}_RUN_MODE", i + 1), "0")); - listaDR.Add(new DataRefItem(string.Format("Path_{0:00}_EXE_MODE", i + 1), "0")); - listaDR.Add(new DataRefItem(string.Format("Path_{0:00}_CurrProg", i + 1), "0")); - listaDR.Add(new DataRefItem(string.Format("Path_{0:00}_CurrProg_RowNum", i + 1), "0")); - listaDR.Add(new DataRefItem(string.Format("Path_{0:00}_ActiveAxes", i + 1), "0")); - // aggiunto 2016.05.10 - listaDR.Add(new DataRefItem(string.Format("Path_{0:00}_CodG_Act", i + 1), "0")); - listaDR.Add(new DataRefItem(string.Format("Path_{0:00}_SubMode", i + 1), "0")); - - Path[i] = new element(string.Format("Path_{0:00}", i + 1), string.Format("Path num {0}", i + 1), fonteDati.Random, listaDR); + Path[i] = new element(string.Format("Path_{0:00}", i + 1), string.Format("Path num {0}", i + 1), fonteDati.MemLoad, listaDR); } // salvo oggetto c.Path = Path;