diff --git a/IOB-UT-NEXT/Objects.cs b/IOB-UT-NEXT/Objects.cs
index 2b182b95..8623020c 100644
--- a/IOB-UT-NEXT/Objects.cs
+++ b/IOB-UT-NEXT/Objects.cs
@@ -59,52 +59,6 @@ namespace IOB_UT_NEXT
#endregion Public Methods
}
-#if false
- ///
- /// Classe di base per trasferimento informazioni di tipo RawTransfer
- ///
- public class BaseRawTransf
- {
- ///
- /// Data-Ora riferimento (x ordinamento fifo)
- ///
- public DateTime dataRif { get; set; } = DateTime.Now;
-
- ///
- /// Messaggio in modalità raw/stringa
- ///
- public object mesContent { get; set; } = new object();
-
- ///
- /// Tipo di messaggio trasmesso
- ///
- public rawTransfType mesType { get; set; } = rawTransfType.ND;
-
- ///
- /// Costruttore senza parametri
- ///
- public BaseRawTransf()
- {
- this.dataRif = DateTime.Now;
- this.mesContent = new object();
- this.mesType = rawTransfType.ND;
- }
-
- ///
- /// Costruttore oggetto
- ///
- ///
- ///
- ///
- public BaseRawTransf(DateTime dataRif, object mesContent, rawTransfType mesType)
- {
- this.dataRif = dataRif;
- this.mesContent = mesContent;
- this.mesType = mesType;
- }
- }
-#endif
-
public class FtpTaskList
{
public List ListTask { get; set; } = new List();
diff --git a/IOB-UT-NEXT/utils.cs b/IOB-UT-NEXT/utils.cs
index 12391133..ee5ad0d0 100644
--- a/IOB-UT-NEXT/utils.cs
+++ b/IOB-UT-NEXT/utils.cs
@@ -95,19 +95,6 @@ namespace IOB_UT_NEXT
}
}
-#if false
- ///
- /// File SimData x simulazione deterministica
- ///
- public static string simDataFile
- {
- get
- {
- return string.Format(@"{0}\{1}", utils.dataDatDir, utils.CRS("simDataFile"));
- }
- }
-#endif
-
#endregion Public Properties
#region Public Methods
diff --git a/IOB-WIN-MTC/App.config b/IOB-WIN-MTC/App.config
index d987216e..4e0b6799 100644
--- a/IOB-WIN-MTC/App.config
+++ b/IOB-WIN-MTC/App.config
@@ -116,31 +116,31 @@
-
+
-
+
-
+
-
+
-
+
-
+
-
+
@@ -154,6 +154,26 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/IOB-WIN-MTC/ILLink/ILLink.Descriptors.LibraryBuild.xml b/IOB-WIN-MTC/ILLink/ILLink.Descriptors.LibraryBuild.xml
new file mode 100644
index 00000000..a42d7f0e
--- /dev/null
+++ b/IOB-WIN-MTC/ILLink/ILLink.Descriptors.LibraryBuild.xml
@@ -0,0 +1,8 @@
+
+
+
+
+
+
+
+
diff --git a/IOB-WIN-MTC/IOB-WIN-MTC.csproj b/IOB-WIN-MTC/IOB-WIN-MTC.csproj
index 79929569..55220186 100644
--- a/IOB-WIN-MTC/IOB-WIN-MTC.csproj
+++ b/IOB-WIN-MTC/IOB-WIN-MTC.csproj
@@ -47,8 +47,8 @@
..\packages\MapoSDK.6.14.2411.518\lib\MapoSDK.dll
-
- ..\packages\Microsoft.Bcl.AsyncInterfaces.7.0.0\lib\net462\Microsoft.Bcl.AsyncInterfaces.dll
+
+ ..\packages\Microsoft.Bcl.AsyncInterfaces.9.0.0\lib\net462\Microsoft.Bcl.AsyncInterfaces.dll
..\packages\Microsoft.Extensions.Configuration.7.0.0\lib\net462\Microsoft.Extensions.Configuration.dll
@@ -77,8 +77,8 @@
..\packages\Microsoft.Extensions.DependencyInjection.7.0.0\lib\net462\Microsoft.Extensions.DependencyInjection.dll
-
- ..\packages\Microsoft.Extensions.DependencyInjection.Abstractions.7.0.0\lib\net462\Microsoft.Extensions.DependencyInjection.Abstractions.dll
+
+ ..\packages\Microsoft.Extensions.DependencyInjection.Abstractions.9.0.0\lib\net462\Microsoft.Extensions.DependencyInjection.Abstractions.dll
..\packages\Microsoft.Extensions.FileProviders.Abstractions.7.0.0\lib\net462\Microsoft.Extensions.FileProviders.Abstractions.dll
@@ -98,8 +98,8 @@
..\packages\Microsoft.Extensions.Logging.7.0.0\lib\net462\Microsoft.Extensions.Logging.dll
-
- ..\packages\Microsoft.Extensions.Logging.Abstractions.7.0.0\lib\net462\Microsoft.Extensions.Logging.Abstractions.dll
+
+ ..\packages\Microsoft.Extensions.Logging.Abstractions.9.0.0\lib\net462\Microsoft.Extensions.Logging.Abstractions.dll
..\packages\Microsoft.Extensions.Logging.Configuration.7.0.0\lib\net462\Microsoft.Extensions.Logging.Configuration.dll
@@ -171,31 +171,31 @@
..\packages\StackExchange.Redis.2.8.24\lib\net461\StackExchange.Redis.dll
-
- ..\packages\System.Buffers.4.5.1\lib\net461\System.Buffers.dll
+
+ ..\packages\System.Buffers.4.6.0\lib\net462\System.Buffers.dll
-
- ..\packages\System.Diagnostics.DiagnosticSource.7.0.0\lib\net462\System.Diagnostics.DiagnosticSource.dll
+
+ ..\packages\System.Diagnostics.DiagnosticSource.9.0.0\lib\net462\System.Diagnostics.DiagnosticSource.dll
..\packages\System.IO.Compression.4.3.0\lib\net46\System.IO.Compression.dll
-
- ..\packages\System.IO.Pipelines.5.0.1\lib\net461\System.IO.Pipelines.dll
+
+ ..\packages\System.IO.Pipelines.9.0.0\lib\net462\System.IO.Pipelines.dll
-
- ..\packages\System.Memory.4.5.5\lib\net461\System.Memory.dll
+
+ ..\packages\System.Memory.4.6.0\lib\net462\System.Memory.dll
-
- ..\packages\System.Numerics.Vectors.4.5.0\lib\net46\System.Numerics.Vectors.dll
+
+ ..\packages\System.Numerics.Vectors.4.6.0\lib\net462\System.Numerics.Vectors.dll
-
- ..\packages\System.Runtime.CompilerServices.Unsafe.6.0.0\lib\net461\System.Runtime.CompilerServices.Unsafe.dll
+
+ ..\packages\System.Runtime.CompilerServices.Unsafe.6.1.0\lib\net462\System.Runtime.CompilerServices.Unsafe.dll
..\packages\System.Runtime.InteropServices.RuntimeInformation.4.3.0\lib\net45\System.Runtime.InteropServices.RuntimeInformation.dll
@@ -206,17 +206,17 @@
..\packages\System.Security.Cryptography.Primitives.4.3.0\lib\net46\System.Security.Cryptography.Primitives.dll
-
- ..\packages\System.Text.Encodings.Web.7.0.0\lib\net462\System.Text.Encodings.Web.dll
+
+ ..\packages\System.Text.Encodings.Web.9.0.0\lib\net462\System.Text.Encodings.Web.dll
-
- ..\packages\System.Text.Json.7.0.0\lib\net462\System.Text.Json.dll
+
+ ..\packages\System.Text.Json.9.0.0\lib\net462\System.Text.Json.dll
-
- ..\packages\System.Threading.Channels.5.0.0\lib\net461\System.Threading.Channels.dll
+
+ ..\packages\System.Threading.Channels.9.0.0\lib\net462\System.Threading.Channels.dll
-
- ..\packages\System.Threading.Tasks.Extensions.4.5.4\lib\net461\System.Threading.Tasks.Extensions.dll
+
+ ..\packages\System.Threading.Tasks.Extensions.4.6.0\lib\net462\System.Threading.Tasks.Extensions.dll
..\packages\System.ValueTuple.4.5.0\lib\net461\System.ValueTuple.dll
@@ -251,6 +251,7 @@
+
Always
diff --git a/IOB-WIN-MTC/packages.config b/IOB-WIN-MTC/packages.config
index ec6cb5b3..a13932cb 100644
--- a/IOB-WIN-MTC/packages.config
+++ b/IOB-WIN-MTC/packages.config
@@ -1,7 +1,7 @@
-
+
@@ -11,14 +11,14 @@
-
+
-
+
@@ -43,20 +43,20 @@
-
-
+
+
-
-
-
-
+
+
+
+
-
-
-
-
+
+
+
+
\ No newline at end of file
diff --git a/IOB-WIN-NEXT/AdapterFormNext.cs b/IOB-WIN-NEXT/AdapterFormNext.cs
index ea91196d..d64945f3 100644
--- a/IOB-WIN-NEXT/AdapterFormNext.cs
+++ b/IOB-WIN-NEXT/AdapterFormNext.cs
@@ -139,13 +139,6 @@ namespace IOB_WIN_NEXT
btnStart.Enabled = true;
break;
-#if false
- case tipoAdapter.MTConnect:
- iobObj = new Iob.MTConn(this, IOBConf);
- btnStart.Enabled = true;
- break;
-#endif
-
case tipoAdapter.OMRON:
iobObj = new Iob.Omron(this, IOBConf);
btnStart.Enabled = true;
@@ -242,13 +235,6 @@ namespace IOB_WIN_NEXT
btnStart.Enabled = true;
break;
-#if false
- case tipoAdapter.PingWatchdog:
- iobObj = new IOB_WIN_FORM.Iob.PingWatchDog(this, IOBConf);
- btnStart.Enabled = true;
- break;
-#endif
-
case tipoAdapter.OSAI_OPEN:
case tipoAdapter.OSAI_CNDEX:
case tipoAdapter.OSAI_VB6:
diff --git a/IOB-WIN-NEXT/DATA/CONF/3024-PING.ini b/IOB-WIN-NEXT/DATA/CONF/3024-PING.ini
deleted file mode 100644
index cc4abec9..00000000
--- a/IOB-WIN-NEXT/DATA/CONF/3024-PING.ini
+++ /dev/null
@@ -1,57 +0,0 @@
-;Configurazione IOB-WIN
-[IOB]
-CNCTYPE=PingWatchdog
-PING_MS_TIMEOUT=500
-IOB_NAME=3024
-
-[MACHINE]
-VENDOR=STEAMWARE
-MODEL=WATCHDOG
-
-[CNC]
-IP=192.168.0.68
-;IP=192.168.1.7 Server MP
-PORT=0000
-
-[SERVER]
-MPIP=http://192.168.1.7
-MPURL=/MP/IO
-CMDBASE=/IOB/input/
-CMDFLOG=/IOB/flog/
-CMDALIVE=/IOB
-CMDENABLED=/IOB/enabled/
-CMDADV1=?valore=
-CMDREBO=/sendReboot.aspx?idxMacchina=
-CMD_ODL_STARTED=/IOB/getCurrOdlStart/
-CMD_FORCLE_SPLIT_ODL=/IOB/forceSplitOdlFull/
-CMD_IDLE_TIME=/IOB/getIdlePeriod/
-
-[MEMORY]
-
-[BLINK]
-MAX_COUNTER_BLINK = 15
-BLINK_FILT=0
-
-[OPTPAR]
-timerIntMs=300
-VETO_QUEUE_IN=15
-AUTO_CHANGE_ODL=false
-POWEROFF_TIMEOUT_SEC=60
-DISABLE_PZCOUNT=TRUE
-;; gestioni PING
-;MAX_TRY_PING=3
-;VETO_QUEUE_IN=4
-;VETO_PING_SEC=4
-;VETO_CHECKDIR_SEC=10
-;MAX_ELAPSED_TIME_SEC=60
-;VETO_SEND_SNAPSHOT=3
-
-[BRANCH]
-NAME=master
-
-; Tags manuali
-[TAGS]
-Customer=JETCO
-HostOS=WIN
-HostName=IOB-WIN-09
-HostAddr=192.168.1.133
diff --git a/IOB-WIN-NEXT/DATA/CONF/3024.ini b/IOB-WIN-NEXT/DATA/CONF/3024.ini
deleted file mode 100644
index 85757f49..00000000
--- a/IOB-WIN-NEXT/DATA/CONF/3024.ini
+++ /dev/null
@@ -1,76 +0,0 @@
-;Configurazione IOB-WIN
-[IOB]
-;Tornio Biglia 438 controllo Mitsubishi MTConnect
-CNCTYPE=MTConnect
-PING_MS_TIMEOUT=500
-
-[MACHINE]
-VENDOR=BIGLIA
-MODEL=438
-
-[CNC]
-IP=192.168.1.27
-PORT=5000
-GETPRGNAME=true
-
-[SERVER]
-MPIP=http://192.168.1.7
-MPURL=/MP/IO
-CMDBASE=/IOB/input/
-CMDFLOG=/IOB/flog/
-CMDALIVE=/IOB
-CMDENABLED=/IOB/enabled/
-CMDADV1=?valore=
-CMDREBO=/sendReboot.aspx?idxMacchina=
-
-[MEMORY]
-ADDR_READ=DB9999.DBB0
-ADDR_WRITE=DB9999.DBB0
-SIZE_READ=0
-SIZE_WRITE=0
-;BIT0=CONN
-;BIT1=DB60.DBB1
-;BIT2=PZCOUNT.STD.DB700.DBW22
-;BIT3=DB60.DBB3
-;BIT4=DB60.DBB4
-
-
-[BLINK]
-;MAX_COUNTER_BLINK = 30
-MAX_COUNTER_BLINK = 30
-;bit0 = 1
-;bit1 = 1
-;bit2 = 0
-;bit3 = 0
-;bit4 = 0
-;bit5 = 0
-;bit6 = 0
-;bit7 = 0
-BLINK_FILT=3
-;BLINK_FILT=28
-
-[OPTPAR]
-PZCOUNT_MODE=MTC
-DISABLE_PZCOUNT=FALSE
-ENABLE_SEND_PZC_BLOCK=TRUE
-MIN_SEND_PZC_BLOCK=0
-MAX_SEND_PZC_BLOCK=100
-ENABLE_DYN_DATA=FALSE
-FORCE_DYN_DATA=TRUE
-ENABLE_DATA_FILTER=TRUE
-ENABLE_MTC_RESTART=TRUE
-VETO_QUEUE_IN=15
-DISABLE_SEND_WDST=TRUE
-
-; conf parametri memoria READ/WRITE
-MTC_PARAM_CONF=3024.json
-
-[BRANCH]
-NAME=master
-
-; Tags manuali
-[TAGS]
-Customer=JETCO
-HostOS=WIN
-HostName=IOB-WIN-8
-HostAddr=192.168.1.132
diff --git a/IOB-WIN-NEXT/DATA/CONF/3024.json b/IOB-WIN-NEXT/DATA/CONF/3024.json
deleted file mode 100644
index 588a3389..00000000
--- a/IOB-WIN-NEXT/DATA/CONF/3024.json
+++ /dev/null
@@ -1,108 +0,0 @@
-{
- "clientSampleIntMs": 600,
- "reqTOutMs": 16000,
- "reconnectIntMs": 6000,
- "doSubsObserv": false,
- "doSubsSample": true,
- "keyPartCount": "M7010B4214N_23",
- "keyPartReq": "",
- "keyPartId": "",
- "keyProgName": "M7010B4214N_31",
- "keyRunMode": "M7010B4214N_13",
- "keyEStop": "M7010B4214N_3",
- "pingAsPowerOn": false,
- "emergencyArmedTrue": false,
- "condPowerOn": {
- "keyName": "M7010B4214N_2",
- "targetValue": "AVAILABLE"
- },
- "condWork": [
- {
- "keyName": "M7010B4214N_20",
- "targetValue": "ACTIVE"
- }
- ],
- "condManual": {
- "checkMode": "AND",
- "checkList": [
- {
- "keyName": "M7010B4214N_20",
- "targetValue": "OPTINAL_STOP"
- }
- ]
- },
- "condReady": {
- "checkMode": "AND",
- "checkList": [
- {
- "keyName": "M7010B4214N_20",
- "targetValue": "STOPPED"
- }
- ]
- },
- "fluxLogVeto": [
- "_24956f03ad_adapter_uri",
- "_24956f03ad_adapter_software_version",
- "_24956f03ad_mtconnect_version",
- "agent_2cde48001122_asset_chg",
- "agent_2cde48001122_asset_rem",
- "device_changed",
- "M7010B4214N_4",
- "M7010B4214N_9",
- "M7010B4214N_19",
- "M7010B4214N_14",
- "M7010B4214N_26",
- "M7010B4214N_32",
- "M7010B4214N_36",
- "M7010B4214N_45",
- "M7010B4214N_47",
- "M7010B4214N_48",
- "M7010B4214N_49",
- "M7010B4214N_50",
- "M7010B4214N_51",
- "M7010B4214N_52",
- "M7010B4214N_54",
- "M7010B4214N_55",
- "M7010B4214N_57",
- "M7010B4214N_59",
- "M7010B4214N_60",
- "M7010B4214N_63",
- "M7010B4214N_5",
- "M7010B4214N_65",
- "M7010B4214N_66",
- "M7010B4214N_68",
- "M7010B4214N_69",
- "M7010B4214N_71",
- "M7010B4214N_72",
- "M7010B4214N_1_asset_chg",
- "M7010B4214N_1_asset_rem"
- ],
- "itemTranslation": {
- "E_M7010B4214N_2": "Machine Available",
- "E_M7010B4214N_3": "Emergency",
- "C_M7010B4214N_5": "System Condition (Alarm)",
- "E_M7010B4214N_20": "Execution Mode",
- "E_M7010B4214N_11": "Active Axes",
- "E_M7010B4214N_13": "Controller Mode",
- "E_M7010B4214N_31": "Program Name",
- "E_M7010B4214N_23": "Contapezzi",
- "E_M7010B4214N_24": "Rimanenti",
- "E_M7010B4214N_25": "Qta Richiesta",
- "E_M7010B4214N_28": "PATH FEED OVERRIDE",
- "E_M7010B4214N_29": "PATH RAPID OVERRIDE",
- "E_M7010B4214N_34": "PROGRAM",
- "E_M7010B4214N_39": "Tool Asset ID"
- },
- "mMapRead": {
- "E_M7010B4214N_2": {
- "name": "E_M7010B4214N_2",
- "description": "Machine Availability",
- "displOrdinal": 1
- }
- },
- "paramsEndThresh": {
- "PosAct": 50,
- "PosTgt": 50,
- "InvDDone": 50
- }
-}
\ No newline at end of file
diff --git a/IOB-WIN-NEXT/DATA/CONF/FOV062.ini b/IOB-WIN-NEXT/DATA/CONF/FOV062.ini
deleted file mode 100644
index 5cd7f51c..00000000
--- a/IOB-WIN-NEXT/DATA/CONF/FOV062.ini
+++ /dev/null
@@ -1,68 +0,0 @@
-;Configurazione IOB-WIN
-[IOB]
-;Centro di lavoro HAAS MTConnect
-CNCTYPE=MTConnect
-PING_MS_TIMEOUT=500
-
-[MACHINE]
-VENDOR=TREVISAN
-MODEL=DS500
-
-[CNC]
-IP=192.168.20.100
-PORT=5000
-GETPRGNAME=true
-
-[SERVER]
-MPIP=http://192.168.168.17
-MPURL=/MP/IO
-CMDBASE=/IOB/input/
-CMDFLOG=/IOB/flog/
-CMDALIVE=/IOB
-CMDENABLED=/IOB/enabled/
-CMDADV1=?valore=
-CMDREBO=/sendReboot.aspx?idxMacchina=
-
-[MEMORY]
-ADDR_READ=DB9999.DBB0
-ADDR_WRITE=DB9999.DBB0
-SIZE_READ=0
-SIZE_WRITE=0
-;BIT0=CONN
-;BIT1=DB60.DBB1
-;BIT2=PZCOUNT.STD.DB700.DBW22
-;BIT3=DB60.DBB3
-;BIT4=DB60.DBB4
-
-
-[BLINK]
-;MAX_COUNTER_BLINK = 30
-MAX_COUNTER_BLINK = 15
-;bit0 = 0
-;bit1 = 0
-;bit2 = 1
-;bit3 = 1
-;bit4 = 1
-;bit5 = 0
-;bit6 = 0
-;bit7 = 0
-BLINK_FILT=0
-;BLINK_FILT=28
-
-[OPTPAR]
-PZCOUNT_MODE=MTC
-DISABLE_PZCOUNT=FALSE
-ENABLE_SEND_PZC_BLOCK=TRUE
-MIN_SEND_PZC_BLOCK=0
-MAX_SEND_PZC_BLOCK=100
-ENABLE_DYN_DATA=FALSE
-FORCE_DYN_DATA=TRUE
-ENABLE_DATA_FILTER=TRUE
-ENABLE_MTC_RESTART=TRUE
-UNAVAIL_POWEROFF=TRUE
-
-; conf parametri memoria READ/WRITE
-MTC_PARAM_CONF=FOV062.json
-
-[BRANCH]
-NAME=master
diff --git a/IOB-WIN-NEXT/DATA/CONF/FOV062.json b/IOB-WIN-NEXT/DATA/CONF/FOV062.json
deleted file mode 100644
index 016e9cd8..00000000
--- a/IOB-WIN-NEXT/DATA/CONF/FOV062.json
+++ /dev/null
@@ -1,34 +0,0 @@
-{
- "keyPartCount": "npartcnt1",
- "keyPartReq": "",
- "keyPartId": "",
- "keyProgName": "nprogram1",
- "keyRunMode": "nmode1",
- "keyEStop": "nestop1",
- "pingAsPowerOn": true,
- "condPowerOn": {
- "keyName": "navail",
- "targetValue": "AVAILABLE"
- },
- "condWork": [
- {
- "keyName": "nexecution1",
- "targetValue": "ACTIVE"
- }
- ],
- "itemTranslation": {
- "navail": "Machine Available",
- "nexecution1": "Execution Mode",
- "nmode1": "Controller Mode",
- "nprogram1": "Program Name",
- "npartcnt1": "Contapezzi",
- "lpremain": "Qta Richiesta",
- "nfeedoverride1": "PATH FEED OVERRIDE",
- "nrapidoverride1": "PATH RAPID OVERRIDE"
- },
- "paramsEndThresh": {
- "PosAct": 50,
- "PosTgt": 50,
- "InvDDone": 50
- }
-}
\ No newline at end of file
diff --git a/IOB-WIN-NEXT/DATA/CONF/GT573.ini b/IOB-WIN-NEXT/DATA/CONF/GT573.ini
deleted file mode 100644
index 2c08f88f..00000000
--- a/IOB-WIN-NEXT/DATA/CONF/GT573.ini
+++ /dev/null
@@ -1,74 +0,0 @@
-;Configurazione IOB-WIN
-[IOB]
-;Tornio Mitsubishi
-CNCTYPE=MTConnect
-PING_MS_TIMEOUT=500
-
-[MACHINE]
-VENDOR=Mitsubishi
-MODEL=PowerCenterPro1000
-
-[CNC]
-IP=192.168.1.88
-PORT=5000
-GETPRGNAME=true
-
-[SERVER]
-MPIP=http://192.168.1.64
-MPURL=/MP/IO
-CMDBASE=/IOB/input/
-CMDFLOG=/IOB/flog/
-CMDALIVE=/IOB
-CMDENABLED=/IOB/enabled/
-CMDADV1=?valore=
-CMDREBO=/sendReboot.aspx?idxMacchina=
-
-[MEMORY]
-ADDR_READ=DB9999.DBB0
-ADDR_WRITE=DB9999.DBB0
-SIZE_READ=0
-SIZE_WRITE=0
-;BIT0=CONN
-;BIT1=DB60.DBB1
-;BIT2=PZCOUNT.STD.DB700.DBW22
-;BIT3=DB60.DBB3
-;BIT4=DB60.DBB4
-
-
-[BLINK]
-;MAX_COUNTER_BLINK = 30
-MAX_COUNTER_BLINK = 15
-;bit0 = 0
-;bit1 = 0
-;bit2 = 1
-;bit3 = 1
-;bit4 = 1
-;bit5 = 0
-;bit6 = 0
-;bit7 = 0
-BLINK_FILT=0
-;BLINK_FILT=28
-
-[OPTPAR]
-PZCOUNT_MODE=MTC
-DISABLE_PZCOUNT=FALSE
-ENABLE_SEND_PZC_BLOCK=TRUE
-MIN_SEND_PZC_BLOCK=0
-MAX_SEND_PZC_BLOCK=100
-ENABLE_DYN_DATA=FALSE
-FORCE_DYN_DATA=TRUE
-ENABLE_DATA_FILTER=TRUE
-ENABLE_MTC_RESTART=TRUE
-
-; conf parametri memoria READ/WRITE
-MTC_PARAM_CONF=GT573.json
-
-[BRANCH]
-NAME=master
-
-; Tags manuali
-[TAGS]
-Customer=LVF
-HostOS=WIN
-HostName=Server-MAPO-IOB
-HostAddr=192.168.1.208
diff --git a/IOB-WIN-NEXT/DATA/CONF/GT573.json b/IOB-WIN-NEXT/DATA/CONF/GT573.json
deleted file mode 100644
index fd9bd1fa..00000000
--- a/IOB-WIN-NEXT/DATA/CONF/GT573.json
+++ /dev/null
@@ -1,33 +0,0 @@
-{
- "keyPartCount": "GD179N_p1_58",
- "keyPartReq": "GD179N_p1_x58",
- "keyPartId": "",
- "keyProgName": "GD179N_p1_52",
- "keyRunMode": "GD179N_p1_49",
- "pingAsPowerOn": false,
- "condPowerOn": {
- "keyName": "GD179N_dtop_2",
- "targetValue": "AVAILABLE"
- },
- "condWork": [
- {
- "keyName": "GD179N_p1_48",
- "targetValue": "ACTIVE"
- }
- ],
- "itemTranslation": {
- "GD179N_dtop_2": "Machine Available",
- "E_GD179N_p1_48": "Execution Mode",
- "E_GD179N_p1_49": "Controller Mode",
- "E_GD179N_p1_52": "Program Name",
- "E_GD179N_p1_58": "Contapezzi",
- "E_GD179N_p1_x58": "Qta Richiesta",
- "E_GD179N_p1_61": "PATH FEED OVERRIDE",
- "E_GD179N_p1_62": "PATH RAPID OVERRIDE"
- },
- "paramsEndThresh": {
- "PosAct": 50,
- "PosTgt": 50,
- "InvDDone": 50
- }
-}
\ No newline at end of file
diff --git a/IOB-WIN-NEXT/DATA/CONF/GT576.ini b/IOB-WIN-NEXT/DATA/CONF/GT576.ini
deleted file mode 100644
index bd44a47b..00000000
--- a/IOB-WIN-NEXT/DATA/CONF/GT576.ini
+++ /dev/null
@@ -1,74 +0,0 @@
-;Configurazione IOB-WIN
-[IOB]
-;Centro di lavoro Okuma MTConnect
-CNCTYPE=MTConnect
-PING_MS_TIMEOUT=500
-
-[MACHINE]
-VENDOR=Okuma
-MODEL=Lathe 2SP-35HG
-
-[CNC]
-IP=192.168.0.47
-PORT=5000
-GETPRGNAME=true
-
-[SERVER]
-MPIP=http://192.168.1.64
-MPURL=/MP/IO
-CMDBASE=/IOB/input/
-CMDFLOG=/IOB/flog/
-CMDALIVE=/IOB
-CMDENABLED=/IOB/enabled/
-CMDADV1=?valore=
-CMDREBO=/sendReboot.aspx?idxMacchina=
-
-[MEMORY]
-ADDR_READ=DB9999.DBB0
-ADDR_WRITE=DB9999.DBB0
-SIZE_READ=0
-SIZE_WRITE=0
-;BIT0=CONN
-;BIT1=DB60.DBB1
-;BIT2=PZCOUNT.STD.DB700.DBW22
-;BIT3=DB60.DBB3
-;BIT4=DB60.DBB4
-
-
-[BLINK]
-;MAX_COUNTER_BLINK = 30
-MAX_COUNTER_BLINK = 15
-;bit0 = 0
-;bit1 = 0
-;bit2 = 1
-;bit3 = 1
-;bit4 = 1
-;bit5 = 0
-;bit6 = 0
-;bit7 = 0
-BLINK_FILT=0
-;BLINK_FILT=28
-
-[OPTPAR]
-PZCOUNT_MODE=MTC
-DISABLE_PZCOUNT=FALSE
-ENABLE_SEND_PZC_BLOCK=TRUE
-MIN_SEND_PZC_BLOCK=0
-MAX_SEND_PZC_BLOCK=100
-ENABLE_DYN_DATA=FALSE
-FORCE_DYN_DATA=TRUE
-ENABLE_DATA_FILTER=TRUE
-ENABLE_MTC_RESTART=TRUE
-
-; conf parametri memoria READ/WRITE
-MTC_PARAM_CONF=GT576.json
-
-[BRANCH]
-NAME=master
-
-; Tags manuali
-[TAGS]
-Customer=LVF
-HostOS=WIN
-HostName=Server-MAPO-IOB
-HostAddr=192.168.1.208
diff --git a/IOB-WIN-NEXT/DATA/CONF/GT576.json b/IOB-WIN-NEXT/DATA/CONF/GT576.json
deleted file mode 100644
index f2976ff7..00000000
--- a/IOB-WIN-NEXT/DATA/CONF/GT576.json
+++ /dev/null
@@ -1,77 +0,0 @@
-{
- "keyEStop": "L2estop",
- "keyPartCount": "L2p2partcount",
- "keyPartReq": "",
- "keyPartId": "",
- "keyProgName": "L2p2program",
- "keyRunMode": "L2p2mode",
- "pingAsPowerOn": true,
- "condPowerOn": {
- "keyName": "L2avail",
- "targetValue": "AVAILABLE"
- },
- "condWork": [
- {
- "keyName": "L2p2execution",
- "targetValue": "ACTIVE"
- }
- ],
- "fluxLogVeto": [
- "L2p1BlockNumber",
- "L2p1block",
- "L2p1line",
- "L2S1ChuckState",
- "L2p1LPathPos",
- "L2p1CommonVariable"
- ],
- "itemTranslation": {
- "L2avail": "Machine Available",
- "L2p2execution": "Execution Mode",
- "L2p2mode": "Controller Mode",
- "L2p2program": "Program Name",
- "L2p2partcount": "Contapezzi",
- "L2estop": "Emergenza",
- "p2Fovr": "PATH FEED OVERRIDE",
- "rovrd": "PATH RAPID OVERRIDE",
- "L2S1speed": "Spindle C1 Actual SPEED",
- "L2S1load": "Spindle C1 LOAD",
- "L2S1ovr": "Spindle C1 OVERRIDE",
- "L2S2speed": "Spindle C2 Actual SPEED",
- "L2S2load": "Spindle C2 LOAD",
- "L2S2ovr": "Spindle C2 OVERRIDE",
- "L2p1OperatingTime": "OPERATING TIME",
- "L2p1RunningTime": "RUNNING TIME"
- },
- "paramsEndThresh": {
- "PosAct": 50,
- "PosTgt": 50,
- "InvDDone": 50,
- "L2Z1actw": 30,
- "L2Z1actm": 10,
- "L2X1actw": 50,
- "L2Z1load": 10,
- "L2X1actm": 100,
- "L2S1speed": 100,
- "L2S1load": 10,
- "L2X1load": 10,
- "L2S1ovr": 10,
- "L2S2speed": 100,
- "L2S2load": 10,
- "L2Z2load": 5,
- "L2S2ovr": 10,
- "L2S1cmd": 100,
- "L2p1OperatingTime": 600,
- "L2p1RunningTime": 600,
- "L2p1TotalRunningTime": 600,
- "L2p1TotalOperatingTime": 600,
- "L2p2OperatingTime": 600,
- "L2p2RunningTime": 600,
- "L2p2TotalRunningTime": 600,
- "L2p2TotalOperatingTime": 60,
- "L2p1SpindleRunTime": 600,
- "L2p1TotalSpindleRunTime": 600,
- "L2p1TotalCuttingTime": 600,
- "L2p1CuttingTime": 600,
- "L2S1SurfaceSpeedA": 1000
- }
-}
\ No newline at end of file
diff --git a/IOB-WIN-NEXT/DATA/CONF/GT577.ini b/IOB-WIN-NEXT/DATA/CONF/GT577.ini
deleted file mode 100644
index f25ba4af..00000000
--- a/IOB-WIN-NEXT/DATA/CONF/GT577.ini
+++ /dev/null
@@ -1,75 +0,0 @@
-;Configurazione IOB-WIN
-[IOB]
-;Centro di lavoro HAAS MTConnect
-CNCTYPE=MTConnect
-PING_MS_TIMEOUT=500
-
-[MACHINE]
-VENDOR=HAAS
-MODEL=UMC-500
-
-[CNC]
-IP=192.168.1.82
-PORT=8082
-GETPRGNAME=true
-
-[SERVER]
-MPIP=http://192.168.1.64
-MPURL=/MP/IO
-CMDBASE=/IOB/input/
-CMDFLOG=/IOB/flog/
-CMDALIVE=/IOB
-CMDENABLED=/IOB/enabled/
-CMDADV1=?valore=
-CMDREBO=/sendReboot.aspx?idxMacchina=
-
-[MEMORY]
-ADDR_READ=DB9999.DBB0
-ADDR_WRITE=DB9999.DBB0
-SIZE_READ=0
-SIZE_WRITE=0
-;BIT0=CONN
-;BIT1=DB60.DBB1
-;BIT2=PZCOUNT.STD.DB700.DBW22
-;BIT3=DB60.DBB3
-;BIT4=DB60.DBB4
-
-
-[BLINK]
-;MAX_COUNTER_BLINK = 30
-MAX_COUNTER_BLINK = 15
-;bit0 = 0
-;bit1 = 0
-;bit2 = 1
-;bit3 = 1
-;bit4 = 1
-;bit5 = 0
-;bit6 = 0
-;bit7 = 0
-BLINK_FILT=0
-;BLINK_FILT=28
-
-[OPTPAR]
-PZCOUNT_MODE=MTC
-DISABLE_PZCOUNT=FALSE
-ENABLE_SEND_PZC_BLOCK=TRUE
-MIN_SEND_PZC_BLOCK=0
-MAX_SEND_PZC_BLOCK=100
-ENABLE_DYN_DATA=FALSE
-FORCE_DYN_DATA=TRUE
-ENABLE_DATA_FILTER=TRUE
-ENABLE_MTC_RESTART=TRUE
-DISABLE_SEND_WDST=TRUE
-
-; conf parametri memoria READ/WRITE
-MTC_PARAM_CONF=GT577.json
-
-[BRANCH]
-NAME=master
-
-; Tags manuali
-[TAGS]
-Customer=LVF
-HostOS=WIN
-HostName=Server-MAPO-IOB
-HostAddr=192.168.1.208
diff --git a/IOB-WIN-NEXT/DATA/CONF/GT577.json b/IOB-WIN-NEXT/DATA/CONF/GT577.json
deleted file mode 100644
index 990ba489..00000000
--- a/IOB-WIN-NEXT/DATA/CONF/GT577.json
+++ /dev/null
@@ -1,33 +0,0 @@
-{
- "keyPartCount": "m30c1",
- "keyPartReq": "lpremain",
- "keyPartId": "",
- "keyProgName": "ncprog",
- "keyRunMode": "mode",
- "pingAsPowerOn": true,
- "condPowerOn": {
- "keyName": "avail",
- "targetValue": "AVAILABLE"
- },
- "condWork": [
- {
- "keyName": "rstat",
- "targetValue": "ACTIVE"
- }
- ],
- "itemTranslation": {
- "avail": "Machine Available",
- "rstat": "Execution Mode",
- "mode": "Controller Mode",
- "ncprog": "Program Name",
- "m30c1": "Contapezzi",
- "lpremain": "Qta Richiesta",
- "fdovrd": "PATH FEED OVERRIDE",
- "rovrd": "PATH RAPID OVERRIDE"
- },
- "paramsEndThresh": {
- "PosAct": 50,
- "PosTgt": 50,
- "InvDDone": 50
- }
-}
\ No newline at end of file
diff --git a/IOB-WIN-NEXT/DATA/CONF/GT593.ini b/IOB-WIN-NEXT/DATA/CONF/GT593.ini
deleted file mode 100644
index 373e782e..00000000
--- a/IOB-WIN-NEXT/DATA/CONF/GT593.ini
+++ /dev/null
@@ -1,75 +0,0 @@
-;Configurazione IOB-WIN
-[IOB]
-;Centro di lavoro HAAS MTConnect
-CNCTYPE=MTConnect
-PING_MS_TIMEOUT=500
-
-[MACHINE]
-VENDOR=HAAS
-MODEL=VF-1
-
-[CNC]
-IP=192.168.1.49
-PORT=8082
-GETPRGNAME=true
-
-[SERVER]
-MPIP=http://192.168.1.64
-MPURL=/MP/IO
-CMDBASE=/IOB/input/
-CMDFLOG=/IOB/flog/
-CMDALIVE=/IOB
-CMDENABLED=/IOB/enabled/
-CMDADV1=?valore=
-CMDREBO=/sendReboot.aspx?idxMacchina=
-
-[MEMORY]
-ADDR_READ=DB9999.DBB0
-ADDR_WRITE=DB9999.DBB0
-SIZE_READ=0
-SIZE_WRITE=0
-;BIT0=CONN
-;BIT1=DB60.DBB1
-;BIT2=PZCOUNT.STD.DB700.DBW22
-;BIT3=DB60.DBB3
-;BIT4=DB60.DBB4
-
-
-[BLINK]
-;MAX_COUNTER_BLINK = 30
-MAX_COUNTER_BLINK = 15
-;bit0 = 0
-;bit1 = 0
-;bit2 = 1
-;bit3 = 1
-;bit4 = 1
-;bit5 = 0
-;bit6 = 0
-;bit7 = 0
-BLINK_FILT=0
-;BLINK_FILT=28
-
-[OPTPAR]
-PZCOUNT_MODE=MTC
-DISABLE_PZCOUNT=FALSE
-ENABLE_SEND_PZC_BLOCK=TRUE
-MIN_SEND_PZC_BLOCK=0
-MAX_SEND_PZC_BLOCK=100
-ENABLE_DYN_DATA=FALSE
-FORCE_DYN_DATA=TRUE
-ENABLE_DATA_FILTER=TRUE
-ENABLE_MTC_RESTART=TRUE
-DISABLE_SEND_WDST=TRUE
-
-; conf parametri memoria READ/WRITE
-MTC_PARAM_CONF=GT593.json
-
-[BRANCH]
-NAME=master
-
-; Tags manuali
-[TAGS]
-Customer=LVF
-HostOS=WIN
-HostName=Server-MAPO-IOB
-HostAddr=192.168.1.208
diff --git a/IOB-WIN-NEXT/DATA/CONF/GT593.json b/IOB-WIN-NEXT/DATA/CONF/GT593.json
deleted file mode 100644
index 990ba489..00000000
--- a/IOB-WIN-NEXT/DATA/CONF/GT593.json
+++ /dev/null
@@ -1,33 +0,0 @@
-{
- "keyPartCount": "m30c1",
- "keyPartReq": "lpremain",
- "keyPartId": "",
- "keyProgName": "ncprog",
- "keyRunMode": "mode",
- "pingAsPowerOn": true,
- "condPowerOn": {
- "keyName": "avail",
- "targetValue": "AVAILABLE"
- },
- "condWork": [
- {
- "keyName": "rstat",
- "targetValue": "ACTIVE"
- }
- ],
- "itemTranslation": {
- "avail": "Machine Available",
- "rstat": "Execution Mode",
- "mode": "Controller Mode",
- "ncprog": "Program Name",
- "m30c1": "Contapezzi",
- "lpremain": "Qta Richiesta",
- "fdovrd": "PATH FEED OVERRIDE",
- "rovrd": "PATH RAPID OVERRIDE"
- },
- "paramsEndThresh": {
- "PosAct": 50,
- "PosTgt": 50,
- "InvDDone": 50
- }
-}
\ No newline at end of file
diff --git a/IOB-WIN-NEXT/DATA/CONF/GT594.ini b/IOB-WIN-NEXT/DATA/CONF/GT594.ini
deleted file mode 100644
index f0e31840..00000000
--- a/IOB-WIN-NEXT/DATA/CONF/GT594.ini
+++ /dev/null
@@ -1,75 +0,0 @@
-;Configurazione IOB-WIN
-[IOB]
-;Centro di lavoro HAAS MTConnect
-CNCTYPE=MTConnect
-PING_MS_TIMEOUT=500
-
-[MACHINE]
-VENDOR=HAAS
-MODEL=UMC-750
-
-[CNC]
-IP=192.168.1.50
-PORT=8082
-GETPRGNAME=true
-
-[SERVER]
-MPIP=http://192.168.1.64
-MPURL=/MP/IO
-CMDBASE=/IOB/input/
-CMDFLOG=/IOB/flog/
-CMDALIVE=/IOB
-CMDENABLED=/IOB/enabled/
-CMDADV1=?valore=
-CMDREBO=/sendReboot.aspx?idxMacchina=
-
-[MEMORY]
-ADDR_READ=DB9999.DBB0
-ADDR_WRITE=DB9999.DBB0
-SIZE_READ=0
-SIZE_WRITE=0
-;BIT0=CONN
-;BIT1=DB60.DBB1
-;BIT2=PZCOUNT.STD.DB700.DBW22
-;BIT3=DB60.DBB3
-;BIT4=DB60.DBB4
-
-
-[BLINK]
-;MAX_COUNTER_BLINK = 30
-MAX_COUNTER_BLINK = 15
-;bit0 = 0
-;bit1 = 0
-;bit2 = 1
-;bit3 = 1
-;bit4 = 1
-;bit5 = 0
-;bit6 = 0
-;bit7 = 0
-BLINK_FILT=0
-;BLINK_FILT=28
-
-[OPTPAR]
-PZCOUNT_MODE=MTC
-DISABLE_PZCOUNT=FALSE
-ENABLE_SEND_PZC_BLOCK=TRUE
-MIN_SEND_PZC_BLOCK=0
-MAX_SEND_PZC_BLOCK=100
-ENABLE_DYN_DATA=FALSE
-FORCE_DYN_DATA=TRUE
-ENABLE_DATA_FILTER=TRUE
-ENABLE_MTC_RESTART=TRUE
-DISABLE_SEND_WDST=TRUE
-
-; conf parametri memoria READ/WRITE
-MTC_PARAM_CONF=GT594.json
-
-[BRANCH]
-NAME=master
-
-; Tags manuali
-[TAGS]
-Customer=LVF
-HostOS=WIN
-HostName=Server-MAPO-IOB
-HostAddr=192.168.1.208
diff --git a/IOB-WIN-NEXT/DATA/CONF/GT594.json b/IOB-WIN-NEXT/DATA/CONF/GT594.json
deleted file mode 100644
index 990ba489..00000000
--- a/IOB-WIN-NEXT/DATA/CONF/GT594.json
+++ /dev/null
@@ -1,33 +0,0 @@
-{
- "keyPartCount": "m30c1",
- "keyPartReq": "lpremain",
- "keyPartId": "",
- "keyProgName": "ncprog",
- "keyRunMode": "mode",
- "pingAsPowerOn": true,
- "condPowerOn": {
- "keyName": "avail",
- "targetValue": "AVAILABLE"
- },
- "condWork": [
- {
- "keyName": "rstat",
- "targetValue": "ACTIVE"
- }
- ],
- "itemTranslation": {
- "avail": "Machine Available",
- "rstat": "Execution Mode",
- "mode": "Controller Mode",
- "ncprog": "Program Name",
- "m30c1": "Contapezzi",
- "lpremain": "Qta Richiesta",
- "fdovrd": "PATH FEED OVERRIDE",
- "rovrd": "PATH RAPID OVERRIDE"
- },
- "paramsEndThresh": {
- "PosAct": 50,
- "PosTgt": 50,
- "InvDDone": 50
- }
-}
\ No newline at end of file
diff --git a/IOB-WIN-NEXT/DATA/CONF/GT651.ini b/IOB-WIN-NEXT/DATA/CONF/GT651.ini
deleted file mode 100644
index b0c86040..00000000
--- a/IOB-WIN-NEXT/DATA/CONF/GT651.ini
+++ /dev/null
@@ -1,75 +0,0 @@
-;Configurazione IOB-WIN
-[IOB]
-;Centro di lavoro HAAS MTConnect
-CNCTYPE=MTConnect
-PING_MS_TIMEOUT=500
-
-[MACHINE]
-VENDOR=HAAS
-MODEL=VF3
-
-[CNC]
-IP=192.168.0.81
-PORT=8082
-GETPRGNAME=true
-
-[SERVER]
-MPIP=http://192.168.1.64
-MPURL=/MP/IO
-CMDBASE=/IOB/input/
-CMDFLOG=/IOB/flog/
-CMDALIVE=/IOB
-CMDENABLED=/IOB/enabled/
-CMDADV1=?valore=
-CMDREBO=/sendReboot.aspx?idxMacchina=
-
-[MEMORY]
-ADDR_READ=DB9999.DBB0
-ADDR_WRITE=DB9999.DBB0
-SIZE_READ=0
-SIZE_WRITE=0
-;BIT0=CONN
-;BIT1=DB60.DBB1
-;BIT2=PZCOUNT.STD.DB700.DBW22
-;BIT3=DB60.DBB3
-;BIT4=DB60.DBB4
-
-
-[BLINK]
-;MAX_COUNTER_BLINK = 30
-MAX_COUNTER_BLINK = 15
-;bit0 = 0
-;bit1 = 0
-;bit2 = 1
-;bit3 = 1
-;bit4 = 1
-;bit5 = 0
-;bit6 = 0
-;bit7 = 0
-BLINK_FILT=0
-;BLINK_FILT=28
-
-[OPTPAR]
-PZCOUNT_MODE=MTC
-DISABLE_PZCOUNT=FALSE
-ENABLE_SEND_PZC_BLOCK=TRUE
-MIN_SEND_PZC_BLOCK=0
-MAX_SEND_PZC_BLOCK=100
-ENABLE_DYN_DATA=FALSE
-FORCE_DYN_DATA=TRUE
-ENABLE_DATA_FILTER=TRUE
-ENABLE_MTC_RESTART=TRUE
-DISABLE_SEND_WDST=TRUE
-
-; conf parametri memoria READ/WRITE
-MTC_PARAM_CONF=GT651.json
-
-[BRANCH]
-NAME=master
-
-; Tags manuali
-[TAGS]
-Customer=LVF
-HostOS=WIN
-HostName=Server-MAPO-IOB
-HostAddr=192.168.1.208
diff --git a/IOB-WIN-NEXT/DATA/CONF/GT651.json b/IOB-WIN-NEXT/DATA/CONF/GT651.json
deleted file mode 100644
index 9d67d7e9..00000000
--- a/IOB-WIN-NEXT/DATA/CONF/GT651.json
+++ /dev/null
@@ -1,60 +0,0 @@
-{
- "keyPartCount": "m30c1",
- "keyPartReq": "lpremain",
- "keyPartId": "",
- "keyProgName": "ncprog",
- "keyRunMode": "mode",
- "pingAsPowerOn": true,
- "condPowerOn": {
- "keyName": "avail",
- "targetValue": "AVAILABLE"
- },
- "condWork": [
- {
- "keyName": "rstat",
- "targetValue": "ACTIVE"
- }
- ],
- "fluxLogVeto": [
- "E_macrorange1",
- "E_macrorange2",
- "E_macrorange3",
- "E_macrorange4",
- "E_macrorange5",
- "tooltype",
- "E_workmaterial",
- "E_toolclearance",
- "E_edgemeasure",
- "E_cintpos",
- "E_toolid",
- "E_approxdiam",
- "E_diamwear",
- "E_toolmaterial",
- "E_lengthwear",
- "E_actualdiam",
- "E_flutes",
- "E_probetype",
- "E_approxlength",
- "E_macrorange1",
- "E_macrorange2",
- "E_macrorange3",
- "E_macrorange4",
- "E_macrorange5",
- "E_macrorange6",
- ],
- "itemTranslation": {
- "avail": "Machine Available",
- "rstat": "Execution Mode",
- "mode": "Controller Mode",
- "ncprog": "Program Name",
- "m30c1": "Contapezzi",
- "lpremain": "Qta Richiesta",
- "fdovrd": "PATH FEED OVERRIDE",
- "rovrd": "PATH RAPID OVERRIDE"
- },
- "paramsEndThresh": {
- "PosAct": 50,
- "PosTgt": 50,
- "InvDDone": 50
- }
-}
\ No newline at end of file
diff --git a/IOB-WIN-NEXT/DATA/CONF/GT652.ini b/IOB-WIN-NEXT/DATA/CONF/GT652.ini
deleted file mode 100644
index 9ce363ab..00000000
--- a/IOB-WIN-NEXT/DATA/CONF/GT652.ini
+++ /dev/null
@@ -1,75 +0,0 @@
-;Configurazione IOB-WIN
-[IOB]
-;Centro di lavoro HAAS MTConnect
-CNCTYPE=MTConnect
-PING_MS_TIMEOUT=500
-
-[MACHINE]
-VENDOR=HAAS
-MODEL=UMC 500
-
-[CNC]
-IP=192.168.0.32
-PORT=8082
-GETPRGNAME=true
-
-[SERVER]
-MPIP=http://192.168.1.64
-MPURL=/MP/IO
-CMDBASE=/IOB/input/
-CMDFLOG=/IOB/flog/
-CMDALIVE=/IOB
-CMDENABLED=/IOB/enabled/
-CMDADV1=?valore=
-CMDREBO=/sendReboot.aspx?idxMacchina=
-
-[MEMORY]
-ADDR_READ=DB9999.DBB0
-ADDR_WRITE=DB9999.DBB0
-SIZE_READ=0
-SIZE_WRITE=0
-;BIT0=CONN
-;BIT1=DB60.DBB1
-;BIT2=PZCOUNT.STD.DB700.DBW22
-;BIT3=DB60.DBB3
-;BIT4=DB60.DBB4
-
-
-[BLINK]
-;MAX_COUNTER_BLINK = 30
-MAX_COUNTER_BLINK = 15
-;bit0 = 0
-;bit1 = 0
-;bit2 = 1
-;bit3 = 1
-;bit4 = 1
-;bit5 = 0
-;bit6 = 0
-;bit7 = 0
-BLINK_FILT=0
-;BLINK_FILT=28
-
-[OPTPAR]
-PZCOUNT_MODE=MTC
-DISABLE_PZCOUNT=FALSE
-ENABLE_SEND_PZC_BLOCK=TRUE
-MIN_SEND_PZC_BLOCK=0
-MAX_SEND_PZC_BLOCK=100
-ENABLE_DYN_DATA=FALSE
-FORCE_DYN_DATA=TRUE
-ENABLE_DATA_FILTER=TRUE
-ENABLE_MTC_RESTART=TRUE
-DISABLE_SEND_WDST=TRUE
-
-; conf parametri memoria READ/WRITE
-MTC_PARAM_CONF=GT652.json
-
-[BRANCH]
-NAME=master
-
-; Tags manuali
-[TAGS]
-Customer=LVF
-HostOS=WIN
-HostName=Server-MAPO-IOB
-HostAddr=192.168.1.208
diff --git a/IOB-WIN-NEXT/DATA/CONF/GT652.json b/IOB-WIN-NEXT/DATA/CONF/GT652.json
deleted file mode 100644
index 9d67d7e9..00000000
--- a/IOB-WIN-NEXT/DATA/CONF/GT652.json
+++ /dev/null
@@ -1,60 +0,0 @@
-{
- "keyPartCount": "m30c1",
- "keyPartReq": "lpremain",
- "keyPartId": "",
- "keyProgName": "ncprog",
- "keyRunMode": "mode",
- "pingAsPowerOn": true,
- "condPowerOn": {
- "keyName": "avail",
- "targetValue": "AVAILABLE"
- },
- "condWork": [
- {
- "keyName": "rstat",
- "targetValue": "ACTIVE"
- }
- ],
- "fluxLogVeto": [
- "E_macrorange1",
- "E_macrorange2",
- "E_macrorange3",
- "E_macrorange4",
- "E_macrorange5",
- "tooltype",
- "E_workmaterial",
- "E_toolclearance",
- "E_edgemeasure",
- "E_cintpos",
- "E_toolid",
- "E_approxdiam",
- "E_diamwear",
- "E_toolmaterial",
- "E_lengthwear",
- "E_actualdiam",
- "E_flutes",
- "E_probetype",
- "E_approxlength",
- "E_macrorange1",
- "E_macrorange2",
- "E_macrorange3",
- "E_macrorange4",
- "E_macrorange5",
- "E_macrorange6",
- ],
- "itemTranslation": {
- "avail": "Machine Available",
- "rstat": "Execution Mode",
- "mode": "Controller Mode",
- "ncprog": "Program Name",
- "m30c1": "Contapezzi",
- "lpremain": "Qta Richiesta",
- "fdovrd": "PATH FEED OVERRIDE",
- "rovrd": "PATH RAPID OVERRIDE"
- },
- "paramsEndThresh": {
- "PosAct": 50,
- "PosTgt": 50,
- "InvDDone": 50
- }
-}
\ No newline at end of file
diff --git a/IOB-WIN-NEXT/DATA/CONF/IMI_50.ini b/IOB-WIN-NEXT/DATA/CONF/IMI_50.ini
deleted file mode 100644
index 671a69f7..00000000
--- a/IOB-WIN-NEXT/DATA/CONF/IMI_50.ini
+++ /dev/null
@@ -1,108 +0,0 @@
-;Configurazione IOB-WIN
-[IOB]
-;Macchina miscelazione Ossidi di Ferro Interclays
-CNCTYPE=MTConnect
-PING_MS_TIMEOUT=500
-
-[MACHINE]
-VENDOR=CMS
-MODEL=WaterJet
-
-[CNC]
-;IP=127.0.0.1
-;IP=192.168.139.100
-IP=172.28.30.50
-PORT=5000
-
-[SERVER]
-;MPIP=http://10.74.82.218
-MPIP=http://192.168.0.110
-MPURL=/MP/IO
-CMDBASE=/IOB/input/
-CMDFLOG=/IOB/flog/
-CMDALIVE=/IOB
-CMDENABLED=/IOB/enabled/
-CMDADV1=?valore=
-CMDREBO=/sendReboot.aspx?idxMacchina=
-
-[MEMORY]
-ADDR_READ=DB9999.DBB0
-ADDR_WRITE=DB9999.DBB0
-SIZE_READ=0
-SIZE_WRITE=0
-;BIT0=CONN
-;BIT1=DB60.DBB1
-;BIT2=PZCOUNT.STD.DB700.DBW22
-;BIT3=DB60.DBB3
-;BIT4=DB60.DBB4
-
-
-[BLINK]
-;MAX_COUNTER_BLINK = 30
-MAX_COUNTER_BLINK = 15
-;bit0 = 0
-;bit1 = 0
-;bit2 = 1
-;bit3 = 1
-;bit4 = 1
-;bit5 = 0
-;bit6 = 0
-;bit7 = 0
-BLINK_FILT=0
-;BLINK_FILT=28
-
-[OPTPAR]
-;PZCOUNT_MODE=STD.[PAR/MEM].info|BIT.indice
-; attenzione memoria sempre base BYTE (1604 DW --> 6416...)
-PZCOUNT_MODE=STD.DM20.2
-DISABLE_PZCOUNT=TRUE
-ENABLE_DYN_DATA=FALSE
-FORCE_DYN_DATA=TRUE
-ENABLE_DATA_FILTER=TRUE
-ENABLE_MTC_RESTART=TRUE
-
-; conf parametri memoria READ/WRITE
-MTC_PARAM_CONF=IMI_50.json
-
-[BRANCH]
-NAME=master
-
-;--------------------------------------
-; NOTE ESPLICATIVE
-;--------------------------------------
-;
-;contapezzi: Path_01_PZ_TOT
-;
-; E_Path_01_RUN_MODE
-; public enum MtcRunMode
-; {
-; UNDEFINED = 0,
-; AUTOMATIC,
-; EDIT,
-; MANUAL_DATA_INPUT,
-; MANUAL,
-; SEMI_AUTO
-; }
-;
-; E_Path_01_EXE_MODE
-; ///
-; /// ENUM degli stati EXE del path MTC
-; ///
-; public enum MtcExeMode
-; {
-; UNDEFINED = 0,
-; ACTIVE,
-; READY,
-; STOPPED,
-; FEED_HOLD,
-; OPTIONAL_STOP,
-; PROGRAM_STOPPED,
-; PROGRAM_COMPLETED
-; }
-;
-; LAVORA SOLO SE
-; Path_01_EXE_MODE = ACTIVE
-; Path_01_RUN_MODE = AUTOMATIC
-; ST_Abilitaz_Abrasivo = ACTIVE
-; ST_Getto_On = ACTIVE
-; ST_UnOp_01_Status = ACTIVE
\ No newline at end of file
diff --git a/IOB-WIN-NEXT/DATA/CONF/IMI_50.json b/IOB-WIN-NEXT/DATA/CONF/IMI_50.json
deleted file mode 100644
index bbd20cb9..00000000
--- a/IOB-WIN-NEXT/DATA/CONF/IMI_50.json
+++ /dev/null
@@ -1,28 +0,0 @@
-{
- "keyPartCount": "Path_01_PZ_TOT",
- "keyPartReq": "",
- "keyPartId": "Path_01_PartId",
- "keyProgName": "Path_01_CurrProg",
- "keyRunMode": "Path_01_RUN_MODE",
- "pingAsPowerOn": true,
- "emergencyArmedTrue": false,
- "condPowerOn": {
- "keyName": "POWER",
- "targetValue": "OK"
- },
- "condWork": [
- {
- "keyName": "Path_01_EXE_MODE",
- "targetValue": "ACTIVE"
- },
- {
- "keyName": "ST_UnOp_01_Status",
- "targetValue": "ACTIVE"
- }
- ],
- "paramsEndThresh": {
- "PosAct": 50,
- "PosTgt": 50,
- "InvDDone": 50
- }
-}
\ No newline at end of file
diff --git a/IOB-WIN-NEXT/DATA/CONF/PING.ini b/IOB-WIN-NEXT/DATA/CONF/PING.ini
deleted file mode 100644
index 1a4c140e..00000000
--- a/IOB-WIN-NEXT/DATA/CONF/PING.ini
+++ /dev/null
@@ -1,51 +0,0 @@
-;Configurazione IOB-WIN
-[IOB]
-CNCTYPE=PingWatchdog
-PING_MS_TIMEOUT=500
-;IOB_NAME=SIMUL_09
-IOB_NAME=SIMUL_01
-
-[MACHINE]
-VENDOR=STEAMWARE
-MODEL=WATCHDOG
-
-[CNC]
-IP=10.74.83.183
-;IP=10.74.82.253
-PORT=0000
-
-[SERVER]
-MPIP=http://10.74.82.218
-MPURL=/MP/IO
-CMDBASE=/IOB/input/
-CMDFLOG=/IOB/flog/
-CMDALIVE=/IOB
-CMDENABLED=/IOB/enabled/
-CMDADV1=?valore=
-CMDREBO=/sendReboot.aspx?idxMacchina=
-CMD_ODL_STARTED=/IOB/getCurrOdlStart/
-CMD_FORCLE_SPLIT_ODL=/IOB/forceSplitOdlFull/
-CMD_IDLE_TIME=/IOB/getIdlePeriod/
-
-[MEMORY]
-
-[BLINK]
-MAX_COUNTER_BLINK = 15
-BLINK_FILT=0
-
-[OPTPAR]
-VETO_QUEUE_IN=15
-AUTO_CHANGE_ODL=false
-POWEROFF_TIMEOUT_SEC=60
-DISABLE_PZCOUNT=TRUE
-;; gestioni PING
-;MAX_TRY_PING=3
-;VETO_QUEUE_IN=4
-;VETO_PING_SEC=4
-;VETO_CHECKDIR_SEC=10
-;MAX_ELAPSED_TIME_SEC=60
-;VETO_SEND_SNAPSHOT=3
-
-
-[BRANCH]
-NAME=master
\ No newline at end of file
diff --git a/IOB-WIN-NEXT/DATA/CONF/SIMUL_01_WD.ini b/IOB-WIN-NEXT/DATA/CONF/SIMUL_01_WD.ini
deleted file mode 100644
index 56bca173..00000000
--- a/IOB-WIN-NEXT/DATA/CONF/SIMUL_01_WD.ini
+++ /dev/null
@@ -1,51 +0,0 @@
-;Configurazione IOB-WIN
-[IOB]
-CNCTYPE=PingWatchdog
-PING_MS_TIMEOUT=500
-; attenzione che alcuni eventi vengo scritti cmq nel log di SIMUL_01 invece di SIMUL_01_WD
-IOB_NAME=SIMUL_01
-
-[MACHINE]
-VENDOR=STEAMWARE
-MODEL=WATCHDOG
-
-[CNC]
-; ping vs WIN10-VPN-03 per test
-IP=10.74.83.203
-PORT=0000
-
-[SERVER]
-MPIP=http://10.74.82.218
-MPURL=/MP/IO
-CMDBASE=/IOB/input/
-CMDFLOG=/IOB/flog/
-CMDALIVE=/IOB
-CMDENABLED=/IOB/enabled/
-CMDADV1=?valore=
-CMDREBO=/sendReboot.aspx?idxMacchina=
-CMD_ODL_STARTED=/IOB/getCurrOdlStart/
-CMD_FORCLE_SPLIT_ODL=/IOB/forceSplitOdlFull/
-CMD_IDLE_TIME=/IOB/getIdlePeriod/
-
-[MEMORY]
-
-[BLINK]
-MAX_COUNTER_BLINK = 15
-BLINK_FILT=0
-
-[OPTPAR]
-AUTO_CHANGE_ODL=false
-POWEROFF_TIMEOUT_SEC=60
-ENABLE_SEND_PZC_BLOCK=TRUE
-MIN_SEND_PZC_BLOCK=0
-MAX_SEND_PZC_BLOCK=100
-
-[BRANCH]
-NAME=master
-
-; Tags manuali
-[TAGS]
-Customer=Steamware
-HostOS=WIN
-HostName=IOB-WIN-SIMULA
-HostAddr=10.74.82.76
diff --git a/IOB-WIN-NEXT/DATA/CONF/TEST.ini b/IOB-WIN-NEXT/DATA/CONF/TEST.ini
deleted file mode 100644
index 93330055..00000000
--- a/IOB-WIN-NEXT/DATA/CONF/TEST.ini
+++ /dev/null
@@ -1,65 +0,0 @@
-;Configurazione IOB-WIN
-[IOB]
-;Macchina miscelazione Ossidi di Ferro Interclays
-CNCTYPE=MTConnect
-PING_MS_TIMEOUT=500
-
-[MACHINE]
-VENDOR=CMS
-MODEL=WaterJet
-
-[CNC]
-;IP=192.168.139.100
-IP=127.0.0.1
-PORT=5000
-
-[SERVER]
-;MPIP=http://192.168.0.110
-MPIP=http://10.74.82.218
-MPURL=/MP/IO
-CMDBASE=/IOB/input/
-CMDFLOG=/IOB/flog/
-CMDALIVE=/IOB
-CMDENABLED=/IOB/enabled/
-CMDADV1=?valore=
-CMDREBO=/sendReboot.aspx?idxMacchina=
-
-[MEMORY]
-ADDR_READ=DB9999.DBB0
-ADDR_WRITE=DB9999.DBB0
-SIZE_READ=0
-SIZE_WRITE=0
-;BIT0=CONN
-;BIT1=DB60.DBB1
-;BIT2=PZCOUNT.STD.DB700.DBW22
-;BIT3=DB60.DBB3
-;BIT4=DB60.DBB4
-
-
-[BLINK]
-;MAX_COUNTER_BLINK = 30
-MAX_COUNTER_BLINK = 15
-;bit0 = 0
-;bit1 = 0
-;bit2 = 1
-;bit3 = 1
-;bit4 = 1
-;bit5 = 0
-;bit6 = 0
-;bit7 = 0
-BLINK_FILT=0
-;BLINK_FILT=28
-
-[OPTPAR]
-;PZCOUNT_MODE=STD.[PAR/MEM].info|BIT.indice
-; attenzione memoria sempre base BYTE (1604 DW --> 6416...)
-PZCOUNT_MODE=STD.DM20.2
-DISABLE_PZCOUNT=TRUE
-ENABLE_DYN_DATA=FALSE
-FORCE_DYN_DATA=TRUE
-
-; conf parametri memoria READ/WRITE
-PARAM_CONF=TEST.json
-
-[BRANCH]
-NAME=master
\ No newline at end of file
diff --git a/IOB-WIN-NEXT/DATA/CONF/TEST.json b/IOB-WIN-NEXT/DATA/CONF/TEST.json
deleted file mode 100644
index 0a2aad1a..00000000
--- a/IOB-WIN-NEXT/DATA/CONF/TEST.json
+++ /dev/null
@@ -1,60 +0,0 @@
-{
- "mMapWrite": {
- "kgRich": {
- "name": "kgRich",
- "description": "Pesatura Richiesta",
- "memAddr": "D26",
- "tipoMem": "Int",
- "index": 26,
- "size": 2,
- "value": "0"
- },
- "kgLotto": {
- "name": "kgLotto",
- "description": "Tot Lotto (kg)",
- "memAddr": "D52",
- "tipoMem": "Int",
- "index": 52,
- "size": 2,
- "value": "0"
- },
- "portata": {
- "name": "portata",
- "description": "Portata Ton/h",
- "memAddr": "D50",
- "tipoMem": "Int",
- "index": 50,
- "size": 1
- },
- "setComm": {
- "name": "setComm",
- "description": "Commessa",
- "memAddr": "W0",
- "tipoMem": "String",
- "index": 0,
- "size": 10
- }
- },
- "mMapRead": {
- "kgAct": {
- "name": "kgAct",
- "description": "Pesatura Rilevata",
- "memAddr": "D20",
- "tipoMem": "Int",
- "index": 20,
- "size": 2,
- "period": 60,
- "value": "0"
- },
- "kgImp": {
- "name": "kgImp",
- "description": "Pesatura Impostata",
- "memAddr": "D22",
- "tipoMem": "Int",
- "index": 22,
- "size": 2,
- "period": 60,
- "value": "0"
- }
- }
-}
\ No newline at end of file
diff --git a/IOB-WIN-NEXT/DATA/CONF/WPS.ini b/IOB-WIN-NEXT/DATA/CONF/WPS.ini
deleted file mode 100644
index e1eda9c0..00000000
--- a/IOB-WIN-NEXT/DATA/CONF/WPS.ini
+++ /dev/null
@@ -1,66 +0,0 @@
-;Configurazione IOB-WIN
-[IOB]
-;Complessore Atlas Copco
-CNCTYPE=WPS
-PING_MS_TIMEOUT=500
-
-[MACHINE]
-VENDOR=Atlas Copco
-MODEL=GA18VP_13
-
-[CNC]
-;IP=192.168.1.55
-IP=10.74.82.253
-;IP=10.82.74.1
-
-[SERVER]
-MPIP=http://10.74.82.218
-;MPIP=http://192.168.1.7
-MPURL=/MP/IO
-CMDBASE=/IOB/input/
-CMDFLOG=/IOB/flog/
-CMDALIVE=/IOB
-CMDENABLED=/IOB/enabled/
-CMDADV1=?valore=
-CMDREBO=/sendReboot.aspx?idxMacchina=
-
-[MEMORY]
-ADDR_READ=DB550.DBB0
-ADDR_WRITE=DB701.DBB0
-SIZE_READ=1
-SIZE_WRITE=0
-;BIT0=CONN
-BIT1=DB550.DBB1
-;BIT2=PZCOUNT.STD.DB700.DBW22
-BIT3=DB550.DBB3
-BIT4=DB550.DBB4
-
-
-[BLINK]
-;MAX_COUNTER_BLINK = 30
-MAX_COUNTER_BLINK = 15
-;bit0 = 0
-;bit1 = 0
-;bit2 = 1
-;bit3 = 1
-;bit4 = 1
-;bit5 = 0
-;bit6 = 0
-;bit7 = 0
-BLINK_FILT=0
-;BLINK_FILT=28
-
-[OPTPAR]
-;PZCOUNT_MODE=STD.[PAR/MEM].info|BIT.indice
-; attenzione memoria sempre base BYTE (1604 DW --> 6416...)
-;PZCOUNT_MODE=STD.DB550.DBDW0
-PZCOUNT_MODE=NONE
-DISABLE_PZCOUNT=TRUE
-ENABLE_DYN_DATA=TRUE
-FORCE_DYN_DATA=TRUE
-; CONF variabili da recuperare in WebPage (stato macchina, contatori, variabili, ...)
-LUT_CONF=WPS.json
-timerIntMs=50
-
-[BRANCH]
-NAME=master
diff --git a/IOB-WIN-NEXT/DATA/CONF/WPS.json b/IOB-WIN-NEXT/DATA/CONF/WPS.json
deleted file mode 100644
index eef87652..00000000
--- a/IOB-WIN-NEXT/DATA/CONF/WPS.json
+++ /dev/null
@@ -1,83 +0,0 @@
-{
- "SrvData": {
- "baseUri": "http://cassera.steamware.net/prova.html",
- "driverName": "FIREFOX"
- },
- "DynData": [
- {
- "key": "",
- "name": "CLOCK_1",
- "val": "ct4",
- "unit": "DateTime",
- "func": "CHANGE",
- "sPeriod": 10
- },
- {
- "key": "",
- "name": "CLOCK_2",
- "val": "ct4",
- "unit": "DateTime",
- "func": "SAMPLE",
- "sPeriod": 10
- }
- //{
- // "key": "ANALOGINPUTSR0C1",
- // "val": "ANALOGINPUTSR0C2",
- // "unit": "bar",
- // "func": "CHANGE",
- // "sPeriod": 3600
- //},
- //{
- // "key": "ANALOGINPUTSR1C1",
- // "val": "ANALOGINPUTSR1C2",
- // "unit": "C",
- // "func": "CHANGE",
- // "sPeriod": 3600
- //},
- //{
- // "key": "ANALOGINPUTSR2C1",
- // "val": "ANALOGINPUTSR2C2",
- // "unit": "C",
- // "func": "CHANGE",
- // "sPeriod": 3600
- //},
- //{
- // "key": "COUNTERSR0C1",
- // "val": "COUNTERSR0C2",
- // "unit": "ore",
- // "func": "CHANGE",
- // "sPeriod": 3600
- //},
- //{
- // "key": "COUNTERSR2C1",
- // "val": "COUNTERSR2C2",
- // "unit": "#",
- // "func": "CHANGE",
- // "sPeriod": 3600
- //},
- //{
- // "key": "DIGITALINPUTSR0C1",
- // "val": "DIGITALINPUTSR0C2",
- // "unit": "ENUM",
- // "func": "CHANGE",
- // "sPeriod": 3600
- //}
- ],
- "Status": [
- {
- "key": "",
- "name": "CURR_STATUS",
- "val": "status",
- "unit": "ENUM",
- "func": "CHANGE",
- "sPeriod": 1,
- "codeMapping": {
- "STATUS_1": "01",
- "STATUS_2": "03",
- "STATUS_3": "07",
- "STATUS_4": "09",
- "STATUS_5": "0F"
- }
- }
- ]
-}
\ No newline at end of file
diff --git a/IOB-WIN-NEXT/Iob/MTConn.cs b/IOB-WIN-NEXT/Iob/MTConn.cs
deleted file mode 100644
index 487e4de8..00000000
--- a/IOB-WIN-NEXT/Iob/MTConn.cs
+++ /dev/null
@@ -1,1710 +0,0 @@
-using IOB_UT_NEXT;
-using MapoSDK;
-using MTConnect.Clients;
-using MTConnect.Devices;
-using MTConnect.Observations;
-using MTConnect.Streams;
-using Newtonsoft.Json;
-using System;
-using System.Collections.Generic;
-using System.IO;
-using System.Linq;
-using System.Net.NetworkInformation;
-using System.Threading;
-using System.Threading.Tasks;
-using System.Windows.Forms;
-using System.Xml.Linq;
-
-namespace IOB_WIN_NEXT.Iob
-{
- public class MTConn : Iob.GenericNext
- {
- #region Public Constructors
-
- ///
- /// Estende l'init della classe base, impiegando il pacchetto Nuget TrackHound https://github.com/TrakHound/MTConnect.NET
- ///
- ///
- ///
- public MTConn(AdapterFormNext caller, IobConfiguration IOBConf) : base(caller, IOBConf)
- {
- // gestione invio ritardato contapezzi
- pzCountDelay = utils.CRI("pzCountDelay");
- // gestione data filtering...
- if (!string.IsNullOrEmpty(getOptPar("ENABLE_DATA_FILTER")))
- {
- bool.TryParse(getOptPar("ENABLE_DATA_FILTER"), out enableDataFilter);
- }
- // gestione data unavailable = poweroff...
- if (!string.IsNullOrEmpty(getOptPar("UNAVAIL_POWEROFF")))
- {
- bool.TryParse(getOptPar("UNAVAIL_POWEROFF"), out unavailPoweroff);
- }
- // gestione restart MTC client...
- if (!string.IsNullOrEmpty(getOptPar("ENABLE_MTC_RESTART")))
- {
- bool.TryParse(getOptPar("ENABLE_MTC_RESTART"), out enableMtcRestart);
- }
-
- // gestione override contapezzi
- enablePzCountByApp = utils.CRB("enableContapezzi");
- enablePzCountByIob = (getOptPar("ENABLE_PZCOUNT") == "TRUE");
- disablePzCountByIob = (getOptPar("DISABLE_PZCOUNT") == "TRUE");
-
- // init datetime counters
- DateTime adesso = DateTime.Now;
- lastPzCountSend = adesso;
- lastWarnODL = adesso;
- lastCurrent = adesso;
- // ora leggo il file di conf specifico....
- string jsonFileName = getOptPar("MTC_PARAM_CONF");
- if (!string.IsNullOrEmpty(jsonFileName))
- {
- // leggo il file...
- loadMtcConf(jsonFileName);
- }
- }
-
- #endregion Public Constructors
-
- #region Public Methods
-
- ///
- /// Processo i task richiesti document li elimino dalla coda 1:1
- ///
- ///
- public override Dictionary executeTasks(Dictionary task2exe)
- {
- // uso metodo base x ora
- return base.executeTasks(task2exe);
- }
-
- ///
- /// Recupera uno specifico dataItem
- ///
- ///
- ///
- public string getDataItemValue(string diKey)
- {
- string answ = "";
- if (queueInEnabCurr)
- {
- try
- {
- if (dataItemMem.ContainsKey(diKey))
- {
- var currDataItem = dataItemMem[diKey];
- answ = currDataItem.value;
- }
- }
- catch (Exception exc)
- {
- Logging.Instance.Error($"Errore in getDataItemValue per {diKey}{Environment.NewLine}{exc}");
- }
- }
- else
- {
- lgDebug($"[VETO getDataItemValue] | veto attivo alle {DateTime.Now:yyyy.MM.dd HH:mm:ss}");
- }
- return answ;
- }
-
- ///
- /// Recupero dati dinamici...
- ///
- public override Dictionary getDynData()
- {
- Dictionary outVal = new Dictionary();
- return outVal;
- }
-
- ///
- /// Effettua vero processing contapezzi
- ///
- public override void processContapezzi()
- {
- if ((enablePzCountByApp || enablePzCountByIob) && !(disablePzCountByIob))
- {
- if (queueInEnabCurr)
- {
- // cerco parametro contapezzi...
- string currPzCount = getDataItemValue(mtcParams.keyPartCount);
-
- if (isVerboseLog)
- {
- lgInfo($"contapezzi: {mtcParams.keyPartCount} --> {currPzCount}");
- }
-
- // se ho un contapezzi... processo...
- if (!string.IsNullOrEmpty(currPzCount))
- {
- int newVal = -1;
- Int32.TryParse(currPzCount, out newVal);
- contapezziPLC = newVal > -1 ? newVal : contapezziPLC;
- }
- }
- else
- {
- lgDebug($"[VETO processContapezzi] | veto attivo alle {DateTime.Now:yyyy.MM.dd HH:mm:ss}");
- }
- }
- else
- {
- lgTrace($"processContapezzi escluso: enablePzCountByApp = {enablePzCountByApp} | enablePzCountByIob: {enablePzCountByIob} | disablePzCountByIob: {disablePzCountByIob}");
- }
- }
-
- ///
- /// Effettua lettura semafori principale Parametri da
- /// aggiornare x display in form
- ///
- public override void readSemafori(ref newDisplayData currDispData)
- {
- DateTime adesso = DateTime.Now;
- lastReadPLC = adesso;
- // verifico non sia in veto invio iniziale...
- if (queueInEnabCurr)
- {
- try
- {
- if (verboseLog)
- {
- lgInfo("inizio read semafori");
- }
-
- currDispData.semIn = Semaforo.SV;
-
- // decodifica document gestione
- decodeToBaseBitmap();
- reportRawInput(ref currDispData);
- }
- catch (Exception exc)
- {
- currDispData.semIn = Semaforo.SR;
- lgError($"Eccezione in readSemafori:{Environment.NewLine}{exc}");
- }
- }
- else
- {
- lgDebug($"[VETO readSemafori] | veto attivo alle {adesso:yyyy.MM.dd HH:mm:ss}");
- checkVetoQueueIn();
- }
- }
-
- ///
- /// Effettua reset del contapezzi, NON POSSIBILE per MTC (read only)
- ///
- ///
- public override bool resetContapezziPLC()
- {
- bool answ = true;
- return answ;
- }
-
- ///
- /// Effettua IMPOSTAZIONE FORZATA del contapezzi, NON POSSIBILE per MTC (read only)
- ///
- ///
- public override bool setcontapezziPLC(int newPzCount)
- {
- bool answ = true;
- return answ;
- }
-
- ///
- /// Override connessione
- ///
- public override void tryConnect()
- {
- if (!connectionOk)
- {
- // controllo che il ping sia stato tentato almeno pingTestSec fa...
- if (DateTime.Now.Subtract(lastPING).TotalSeconds > utils.CRI("pingTestSec"))
- {
- if (verboseLog || periodicLog)
- {
- lgInfo("MTC: ConnKO - tryConnect");
- }
- // in primis salvo data ping...
- lastPING = DateTime.Now;
- // se passa il ping faccio il resto...
- if (testPingMachine == IPStatus.Success)
- {
- string szStatusConnection = "";
- try
- {
- // ora provo connessione...
- parentForm.commPlcActive = true;
- doConnect();
- parentForm.commPlcActive = false;
- // refresh stato allarmi!!!
- if (connectionOk)
- {
- checkVetoQueueIn();
- //queueInEnabCurr = true;
- if (adpRunning)
- {
- lgInfo("Connessione OK");
- }
- }
- else
- {
- lgError("Impossibile procedere, connessione mancante...");
- }
- }
- catch (Exception exc)
- {
- lgFatal($"Errore nella connessione all'adapter MTC: {szStatusConnection}{Environment.NewLine}{exc}");
- connectionOk = false;
- lgInfo($"Eccezione in TryConnect, Adapter MTC NON running, pausa di {utils.CRI("waitRecMSec")} msec prima di ulteriori tentativi di riconnessione");
- }
- }
- else
- {
- // loggo no risposta ping ...
- connectionOk = false;
- if (verboseLog || periodicLog)
- {
- lgInfo($"Attenzione: MTC controllo PING fallito per IP {cIobConf.cncPingAddr}");
- }
- }
- }
- }
- else
- {
- needRefresh = true;
- }
- // se non è ancora connesso faccio procesisng memoria caso disconnesso...
- if (!connectionOk)
- {
- // processo semafori ed invio...
- processMemoryDiscon();
- }
- }
-
- ///
- /// Override disconnessione
- ///
- public override void tryDisconnect()
- {
- queueInEnabCurr = false;
- // verifico che NON sia in fase di avvio MTC...
- if (isConnecting && DateTime.Now.Subtract(startConnecting).TotalSeconds < 60)
- {
- lgInfo("Disconnessione non effettuata: connessione ancora in corso");
- }
- else
- {
- lgTrace("Richiesta tryDisconnect");
- if (connectionOk)
- {
- string szStatusConnection = "";
- try
- {
- MTC_ref.Stop();
- connectionOk = false;
- isConnecting = false;
- lgInfo($"conn status: {szStatusConnection}");
- lgInfo("Effettuata disconnessione adapter MTC!");
- }
- catch (Exception exc)
- {
- lgFatal(exc, "Errore nella disconnessione dall'adapter MTC");
- }
- }
- else
- {
- lgError("IMPOSSIBILE effettuare disconnessione MTC: Connessione non disponibile...");
- }
- }
- queueInEnabCurr = false;
- needRefresh = true;
- }
-
- #endregion Public Methods
-
- #region Protected Fields
-
- ///
- /// Gestione filtraggio dati
- ///
- protected bool enableDataFilter = false;
-
- ///
- /// Abilitazione restart (da opt par...)
- ///
- protected bool enableMtcRestart = false;
-
- ///
- /// Determina se ha effettuata lettura items in memoria x confronto...
- ///
- protected bool hasReadItems = false;
-
- ///
- /// Ultimo current received x gestione update periodico...
- ///
- protected DateTime lastCurrent = DateTime.Now;
-
- ///
- /// Oggetto MAIN x connessione MTC
- ///
- protected MTConnectHttpClient MTC_ref;
-
- ///
- /// Gestione valori unavailable come POWEROFF (es trevisan)
- ///
- protected bool unavailPoweroff = false;
-
- ///
- /// Veto controllos tatus x log...
- ///
- protected DateTime vetoCheckStatus = DateTime.Now;
-
- #endregion Protected Fields
-
- #region Protected Properties
-
- ///
- /// Verifico se abbia ALMENO un errore...
- ///
- protected bool hasError
- {
- get
- {
- bool answ = false;
- // controllo TUTTE le conditions...
- foreach (var item in dataItemMem)
- {
- // se NON HO GIA' allarmi attivi...
- if (!answ)
- {
- // se è una condition...
- if (item.Value.Category == MTConnect.Devices.DataItemCategory.CONDITION)
- {
- // se ha valore !="" --> allarmi attivi
- if (!string.IsNullOrEmpty(item.Value.value))
- {
- answ = true;
- }
- }
- }
- }
- return answ;
- }
- }
-
- ///
- /// Indica se abbia emergenza premuta
- ///
- protected bool hasEStopTriggered
- {
- get
- {
- bool answ = false;
- if (queueInEnabCurr)
- {
- try
- {
- if (!string.IsNullOrEmpty(mtcParams.keyEStop))
- {
- string currEStop = getDataItemValue(mtcParams.keyEStop);
- answ = (currEStop == "TRIGGERED");
- }
- }
- catch (Exception exc)
- {
- Logging.Instance.Error($"Errore in hasEStopTriggered{Environment.NewLine}{exc}");
- }
- }
- else
- {
- lgDebug($"[VETO hasEStopTriggered] | veto attivo alle {DateTime.Now:yyyy.MM.dd HH:mm:ss}");
- }
- return answ;
- }
- }
-
- ///
- /// Verifico se abbia unavailable x le condizioni principali condPowerOn keyRunMode
- ///
- protected bool hasUnavailableData
- {
- get
- {
- bool answ = false;
- if (queueInEnabCurr)
- {
- // verifico le condizioni: powerOn, run document work...
- string currRun = getDataItemValue(mtcParams.keyRunMode);
- bool unavRun = currRun.ToUpper() == "UNAVAILABLE";
- string currPowerOn = getDataItemValue(mtcParams.condPowerOn.keyName);
- bool checkPowerOn = (currPowerOn == mtcParams.condPowerOn.targetValue);
- answ = unavRun && !checkPowerOn;
- }
- return answ;
- }
- }
-
- protected bool isConnecting { get; set; } = false;
-
- ///
- /// Parametri specifici MTC
- ///
- protected MtcParamConf mtcParams { get; set; }
-
- protected DateTime startConnecting { get; set; } = DateTime.Today;
-
- ///
- /// URL x salvataggio elenco dataItems MTC
- ///
- protected string urlSaveDataItems
- {
- get
- {
- string answ = "";
- try
- {
- string machineName = Environment.MachineName;
- answ = $@"{cIobConf.serverData.TRANSP}://{cIobConf.serverData.MPIP}{cIobConf.serverData.MPURL}{cIobConf.serverData.CMDALIVE}/saveDataItems/{cIobConf.codIOB}";
- }
- catch (Exception exc)
- {
- lgError(exc, "Errore in composizione urlSaveDataItems");
- }
- return answ;
- }
- }
-
- #endregion Protected Properties
-
- #region Protected Methods
-
- ///
- /// Verifica un DataItem document se il valore corrisponde a quello indicato come "true eValue"
- /// restituisce true
- ///
- ///
- ///
- ///
- protected bool checkDataItem(string itemName, string trueVal)
- {
- bool answ = false;
- MtcDataItemExt currValue = null;
- try
- {
- currValue = dataItemMem[itemName];
- answ = (currValue.value.Equals(trueVal));
- }
- catch
- {
- lgError($"Errore in decodifica valore per {itemName} rispetto a {trueVal} | recuperato {currValue} / {currValue.value}");
- }
- return answ;
- }
-
- ///
- /// Verifica / Salva valore condition
- ///
- ///
- /// Messaggio completo (livello + testo)
- ///
- protected bool checkSaveCondition(IObservation observ, string cValue)
- {
- bool answ = !enableDataFilter;
-
- if (observ != null)
- {
- if (isVerboseLog)
- {
- lgInfo($"Richiesta checkSaveCondition per {observ} | id: {observ.DataItemId} | message: {cValue}");
- }
- // verifico in memoria se ho l'oggetto condition ed il suo valore..
- if (dataItemMem.ContainsKey(observ.DataItemId))
- {
- // check variazione
- if (dataItemMem[observ.DataItemId].value != cValue)
- {
- dataItemMem[observ.DataItemId].value = cValue;
- answ = true;
- }
- dataItemMem[observ.DataItemId].valueTimestamp = observ.Timestamp;
- }
- else
- {
- // registro non trovato da aggiungere...
- lgInfo($"DataItem non trovato in checkSaveCondition: {observ.DataItemId}");
- try
- {
- // provo a creare oggetot in memoria...
- List elencoDataItems = new List();
- int dSamplePeriod = 0;
- float threshDBand = 0;
- string uuid = "";
- var currDataItem = formatDataItem(ref dSamplePeriod, ref threshDBand, ref uuid, observ, cValue);
- // aggiungo
- dataItemMem.Add(observ.DataItemId, currDataItem);
- var thisCat = (MapoSDK.DataItemCategory)Enum.Parse(typeof(MapoSDK.DataItemCategory), $"{observ.Category}");
- // salvo oggetto x registrazione su server MP-IO
- var currMapoDataItem = new machDataItem()
- {
- uuid = observ.DataItemId,
- Category = thisCat,
- Name = observ.Name,
- Type = observ.Type,
- SubType = observ.SubType,
- //Units = observ.Units
- };
- // aggiungo
- elencoDataItems.Add(currMapoDataItem);
- // invio il dataItem serializzato...
- sendDataItemsList(elencoDataItems);
- }
- catch (Exception exc)
- {
- lgError($"Eccezione in checkSaveCondition{Environment.NewLine}{exc}");
- }
- }
- }
- else
- {
- lgError("Attenzione: checkSaveCondition con observ null!");
- }
- return answ;
- }
-
- ///
- /// Verifica / Salva valore generico (NON SAMPLE)
- ///
- ///
- ///
- ///
- protected bool checkSaveItem(IObservation observ, string iValue)
- {
- bool answ = !enableDataFilter;
-
- if (observ != null)
- {
- if (isVerboseLog)
- {
- lgInfo($"Richiesta checkSaveItem per {observ} | id: {observ.DataItemId} | eValue: {iValue}");
- }
- // verifico in memoria se ho l'oggetto condition ed il suo valore..
- if (dataItemMem.ContainsKey(observ.DataItemId))
- {
- // verifico SE sia cambiato...
- if (dataItemMem[observ.DataItemId].value != iValue)
- {
- dataItemMem[observ.DataItemId].value = iValue;
- answ = true;
- }
- dataItemMem[observ.DataItemId].valueTimestamp = observ.Timestamp;
- }
- else
- {
- // registro non trovato da aggiungere...
- lgInfo($"DataItem non trovato in checkSaveItem: {observ.DataItemId}");
- try
- {
- // provo a creare oggetot in memoria...
- List elencoDataItems = new List();
- int dSamplePeriod = 0;
- float threshDBand = 0;
- string uuid = "";
- var currDataItem = formatDataItem(ref dSamplePeriod, ref threshDBand, ref uuid, observ, iValue);
- // aggiungo
- dataItemMem.Add(observ.DataItemId, currDataItem);
- var thisCat = (MapoSDK.DataItemCategory)Enum.Parse(typeof(MapoSDK.DataItemCategory), $"{observ.Category}");
- // salvo oggetto x registrazione su server MP-IO
- var currMapoDataItem = new machDataItem()
- {
- uuid = observ.DataItemId,
- Category = thisCat,
- Name = observ.Name,
- Type = observ.Type,
- SubType = observ.SubType,
- //Units = observ.Units
- };
- // aggiungo
- elencoDataItems.Add(currMapoDataItem);
- // invio il dataItem serializzato...
- sendDataItemsList(elencoDataItems);
- }
- catch (Exception exc)
- {
- lgError($"Eccezione in checkSaveItem{Environment.NewLine}{exc}");
- }
- }
- }
- else
- {
- lgError("Attenzione: checkSaveItem con observ null!");
- }
- return answ;
- }
-
- ///
- /// Verifica / Salva valore SAMPLE document restitusice SE sia variato (document quindi da inviare...)
- ///
- ///
- ///
- protected bool checkSaveSample(IObservation observ, string sValue)
- {
- bool answ = !enableDataFilter;
- double oldVal = 0;
- double newVal = 0;
- if (observ != null)
- {
- // verifico in memoria se ho l'oggetto condition ed il suo valore..
- if (dataItemMem.ContainsKey(observ.DataItemId))
- {
- MtcDataItemExt currDataItemMem = dataItemMem[observ.DataItemId];
- // controllo SE SIA scaduto il tempo massimo...
- if (Math.Abs(dataItemMem[observ.DataItemId].valueTimestamp.Subtract(observ.Timestamp).TotalSeconds) > currDataItemMem.samplePeriod)
- {
- answ = true;
- }
- else
- {
- // ALTRIMENTI controllo SE diverso
- if (dataItemMem[observ.DataItemId].value != sValue)
- {
- // controllo SE ho DeadBand...
- if (dataItemMem[observ.DataItemId].thresholdDeadBand > 0)
- {
- if (isVerboseLog)
- {
- lgInfo($"Test deadband: oldVal: {oldVal} | newVal: {newVal}");
- }
- // recupero i valori document testo DeadBand...
- double.TryParse(dataItemMem[observ.DataItemId].value.Replace(".", ","), out oldVal);
- double.TryParse(sValue.Replace(".", ","), out newVal);
- // test deadband!
- if (Math.Abs(newVal - oldVal) > dataItemMem[observ.DataItemId].thresholdDeadBand)
- {
- // indico da salvare..
- answ = true;
- }
- }
- }
- }
- if (answ)
- {
- // salvo!
- dataItemMem[observ.DataItemId].value = sValue;
- dataItemMem[observ.DataItemId].valueTimestamp = observ.Timestamp;
- }
- }
- else
- {
- // registro non trovato da aggiungere...
- lgInfo($"DataItem non trovato in checkSaveSample: {observ.DataItemId}");
- // provo a creare oggetto in memoria...
- try
- {
- List elencoDataItems = new List();
- int dSamplePeriod = 0;
- float threshDBand = 0;
- string uuid = "";
- var currDataItem = formatDataItem(ref dSamplePeriod, ref threshDBand, ref uuid, observ, sValue);
- // aggiungo
- dataItemMem.Add(observ.DataItemId, currDataItem);
- var thisCat = (MapoSDK.DataItemCategory)Enum.Parse(typeof(MapoSDK.DataItemCategory), $"{observ.Category}");
- // salvo oggetto x registrazione su server MP-IO
- var currMapoDataItem = new machDataItem()
- {
- uuid = observ.DataItemId,
- Category = thisCat,
- Name = observ.Name,
- Type = observ.Type,
- SubType = observ.SubType,
- //Units = observ.Units
- };
- // aggiungo
- elencoDataItems.Add(currMapoDataItem);
- // invio il dataItem serializzato...
- sendDataItemsList(elencoDataItems);
- }
- catch (Exception exc)
- {
- lgError($"Eccezione in checkSaveSample{Environment.NewLine}{exc}");
- }
- }
- }
- else
- {
- lgError("Attenzione: checkSaveItem con observ null!");
- }
- return answ;
- }
-
- ///
- /// Effettua traduzione ITEM da LUT parametrica (key: tipo+id) del file di conf, se non
- /// trovo uso key
- ///
- ///
- ///
- ///
- protected override string itemTranslation(string tipo, string id)
- {
- string answ = "";
- string lemma = $"{tipo}_{id}";
- // cerco nel dizionario delle traduzioni SE esiste un valore document prendo quello, altrimenti
- // uso il lemma...
- if (mtcParams.itemTranslation.ContainsKey(lemma))
- {
- answ = mtcParams.itemTranslation[lemma];
- }
- else
- {
- answ = lemma;
- }
- return answ;
- }
-
- ///
- /// Effettua log di un elenco componenti
- ///
- ///
- protected void logComponentsList(List elencoComponenti)
- {
- if (elencoComponenti != null)
- {
- foreach (var item in elencoComponenti)
- {
- lgInfo($"Component data | ID: {item.Id} | Name: {item.Name} | Type: {item.Type} | # items: {item.DataItems.Count()}");
- // se ho sottocomponenti richiamo...
- if (item.Components != null)
- {
- if (item.Components.Count() > 0)
- {
- logComponentsList(item.GetComponents().ToList());
- }
- }
- if (item.DataItems.Count() > 0)
- {
- logDataItemList(item.GetDataItems().ToList());
- }
- }
- }
- }
-
- ///
- /// Effettua log di un elenco composizioni
- ///
- ///
- protected void logCompositionList(List elencoComposizioni)
- {
- if (elencoComposizioni != null)
- {
- foreach (var item in elencoComposizioni)
- {
- lgInfo($"Composition data | ID: {item.Id} | Name: {item.Name} | Type: {item.Type} | # items: {item.DataItems.Count()} | path: {item.IdPath}");
- }
- }
- }
-
- ///
- /// Log elenco DataItems
- ///
- ///
- protected void logDataItemList(List elencoItems)
- {
- if (elencoItems != null)
- {
- // loggo devices principali...
- foreach (var item in elencoItems)
- {
- lgInfo($"Device data | ID: {item.Id} | Name: {item.Name} | Category: {item.Category} | # Type: {item.Type} | Path: {item.IdPath}");
- }
- }
- }
-
- ///
- /// Effettua log di un devices (ed eventualmente dei sub-devices...
- ///
- ///
- protected void logProbeDevices(List listDevices)
- {
- if (listDevices != null)
- {
- // loggo devices principali...
- foreach (var device in listDevices)
- {
- lgInfo($"Device data | ID: {device.Id} | Name: {device.Name} | UUID: {device.Uuid} | # items: {device.DataItems.Count()}");
- // se ho subItems descrivo pure loro...
- if (device.DataItems.Count() > 0)
- {
- logDataItemList(device.GetDataItems().ToList());
- }
- if (device.Components.Count() > 0)
- {
- logComponentsList(device.GetComponents().ToList());
- }
- // All Compositions (traverse the entire Device model)
- if (device.Compositions.Count() > 0)
- {
- logCompositionList(device.GetCompositions().ToList());
- }
- }
- }
- }
-
- #endregion Protected Methods
-
- #region Private Fields
-
- ///
- /// Struttura dove vengono memorizzati i dataitem ed i rispettivi valori x processing
- ///
- private Dictionary dataItemMem = new Dictionary();
-
- #endregion Private Fields
-
- #region Private Methods
-
- ///
- /// Verifica ed invia variazioni
- ///
- ///
- ///
- private void checkAndSend(MTConnect.Streams.IStreamsResponseDocument document, bool forceSend)
- {
- if (document != null)
- {
- foreach (var deviceStream in document.Streams)
- {
- // DeviceStream
- lgTrace($"Stream: {deviceStream.Name}");
-
- // Component Streams
- foreach (var dataStream in deviceStream.ComponentStreams)
- {
- lgTrace($"Component {dataStream.Name} -->");
- // DataItems (Samples, Events, and Conditions)
- foreach (var observation in dataStream.Observations)
- {
- // cerco se non sia un dato filtrato in FLUXLOG...
- bool isFiltered = mtcParams.fluxLogVeto.Where(x => x == observation.DataItemId).Count() > 0;
- if (isFiltered)
- {
- traceObservation(observation);
- }
- else
- {
- processObservation(observation, forceSend);
- }
- }
- }
- }
- }
- else
- {
- lgError("StreamsSuccessful ERROR: document è null");
- }
- }
-
- ///
- /// Effettua decodifica aree memoria alla bitmap usata x MAPO
- ///
- private void decodeToBaseBitmap()
- {
- // init a zero...
- B_input = 0;
- if (queueInEnabCurr)
- {
- /* -----------------------------------------------------
- * bitmap MAPO
- * B0: POWER_ON
- * B1: RUN
- * B2: pzCount
- * B3: allarme
- * B4: manuale
- * B5: emergenza (dipende da state machine se riportare 1 = armata/premuta, vedere conf mtcParams.emergencyArmedTrue)
- ----------------------------------------------------- */
-
- // Controllo booleano PING document POWERON...
- string currPowerOn = getDataItemValue(mtcParams.condPowerOn.keyName);
- // se valido il check ping lo eseguo... altrimenti lo do x buono
- bool isPingOk = mtcParams.pingAsPowerOn && (testPingMachine == IPStatus.Success);
-
- // verifico da target eValue richiesto...
- bool checkPowerOn = (currPowerOn == mtcParams.condPowerOn.targetValue);
-
- // bit 0 (poweron) imposto a 1 SE pingo o PowerOn=="ON"...
- B_input = (isPingOk || checkPowerOn) ? 1 : 0;
-
- // variabili RUN...
- string currRun = getDataItemValue(mtcParams.keyRunMode);
-
- // controllo RUN MODE preliminare... CABLATO - è GENERALE x MTC
- if (currRun == "AUTOMATIC" || currRun == "SEMI_AUTO" || currRun == "SEMI_AUTOMATIC")
- {
- int numCond = mtcParams.condWork.Count;
- int numCondOk = 0;
- // cerco nell'elenco delle condizioni che indicano lavora se sono ok faccio +1 conteggio......
- foreach (var item in mtcParams.condWork)
- {
- if (getDataItemValue(item.keyName) == item.targetValue)
- {
- numCondOk++;
- }
- }
- // se tutte condizioni rispettate --> lavora!
- if (numCond == numCondOk)
- {
- // RUN = LAVORA!
- B_input += (1 << 1);
- }
- }
- // se ho almeno 1 allarme E NON SONO IN AUTO --> ALARM!
- else if (hasError)
- {
- B_input += (1 << 3);
- }
- // 2024.01.90: gestione dati UNAVAILABLE che indicano poweroff...
- else if (hasUnavailableData && unavailPoweroff)
- {
- B_input = 0;
- }
- else
- {
- // se ho run mode != auto --> manual
- B_input += (1 << 4);
- }
-
- // emergenza armata da riportare con bit True/ 1
- if (mtcParams.emergencyArmedTrue)
- {
- //se NON premuta lazo il bit
- if (!hasEStopTriggered)
- {
- B_input += (1 << 5);
- }
- }
- // emergenza armata da riportare come False/0 (!mtcParams.emergencyArmedTrue)
- else
- {
- // se premuta alzo il bit...
- if (hasEStopTriggered)
- {
- B_input += (1 << 5);
- }
- }
-
- DateTime adesso = DateTime.Now;
- int vFactor = 1;
- // controllo SE HO dati per fare verifiche...
- if (string.IsNullOrEmpty(currRun))
- {
- // se ho parametro x gestione reset...
- if (enableMtcRestart)
- {
- // controllo se ho ricevuto il current da OLTRE 1 minuto...
- if (lastCurrent.AddMinutes(3) < adesso)
- {
- lastCurrent = adesso;
- // stop...
- lgInfo("Fermato MTC_ref per mancanza dati current");
- MTC_ref.Stop();
- Thread.Sleep(1000);
- // restart
- lgInfo("Riavviato MTC_ref per mancanza dati current");
- MTC_ref.Start();
- }
- }
- }
- else
- {
- vFactor = 6;
- }
-
- // solo se non ho veto check
- if (vetoCheckStatus < adesso)
- {
- lgInfo($"Stato variabili: currRun: {currRun}");
- // imposto veto per vetoSeconds...
- vetoCheckStatus = adesso.AddSeconds(vetoSeconds * vFactor);
- }
- // log opzionale!
- if (verboseLog)
- {
- lgInfo($"Trasformazione B_input: {B_input} | currRun = {currRun}");
- }
- }
- else
- {
- lgDebug($"[VETO getDataItemValue] | veto attivo alle {DateTime.Now:yyyy.MM.dd HH:mm:ss}");
- }
- }
-
- ///
- /// Vera connessione ad MTC
- ///
- ///
- private void doConnect()
- {
- isConnecting = true;
- startConnecting = DateTime.Now;
- // reset memoria dataItem..
- dataItemMem = new Dictionary();
- // predisposizione conf oggetto di comunicazione MTC
- short port = 5000;
- short.TryParse(cIobConf.cncPort, out port);
- string callUrl = $"{cIobConf.cncIpAddr}:{port}";
- // test probe!
- try
- {
- lgInfo($"Test Probe MTC Client: {callUrl}");
- var prbClient = new MTConnectHttpProbeClient(callUrl);
- //var prbClient = new MTConnectHttpProbeClient(cIobConf.cncIpAddr, port);
- prbClient.Timeout = mtcParams.reqTOutMs;
- var prbDoc = prbClient.Get();
- // se valido loggo!
- if (prbDoc != null)
- {
- // anche se non del tutto vero...
- connectionOk = true;
- lgInfo($"Effettuata correttamente PROBE per device MTC all'URL {callUrl}");
- lgInfo($"---------------- Elenco Devices ----------------");
- // loggo devices principali...
- logProbeDevices(prbDoc.Devices.ToList());
- }
- }
- catch (Exception exc)
- {
- lgError($"Eccezione durante test probe:{Environment.NewLine}{exc}");
- }
- // attendo 1 sec...
- Thread.Sleep(1000);
- // ora avvio
- try
- {
- lgInfo($"Chiamata apertura MTC Client: {callUrl}");
- MTC_ref = new MTConnectHttpClient(cIobConf.cncIpAddr, port);
- //MTC_ref = new MTConnectHttpClient(callUrl);
- // sample interval
- MTC_ref.Interval = mtcParams.clientSampleIntMs;
- // timeout x richieste
- MTC_ref.Timeout = mtcParams.reqTOutMs;
- // timeout riconnessione
- MTC_ref.ReconnectionInterval = mtcParams.reconnectIntMs;
-
- // Sottoscrizioni base
- MTC_ref.ClientStarted += MTC_ref_ClientStarted;
- MTC_ref.ClientStopped += MTC_ref_ClientStopped;
- MTC_ref.ConnectionError += MTC_ref_ConnectionError;
-
- // Sottoscrizioni dati ricevuti !!!
- MTC_ref.AssetsReceived += MTC_ref_AssetsReceived;
- MTC_ref.ProbeReceived += MTC_ref_ProbeReceived;
- //MTC_ref.ProbeReceived += DevicesSuccessful;
- MTC_ref.CurrentReceived += MTC_ref_CurrentReceived;
- //MTC_ref.CurrentReceived += CurrentSuccessful;
-
- // sample subscription
- if (mtcParams.doSubsSample)
- {
- MTC_ref.SampleReceived += MTC_ref_SampleReceived;
- //MTC_ref.SampleReceived += StreamsSuccessful;
- }
- // observ subscription
- if (mtcParams.doSubsObserv)
- {
- MTC_ref.ObservationReceived += MTC_ref_ObservationReceived;
- }
-
- MTC_ref.Start();
-
- //// attendo 2 sec...
- //Thread.Sleep(2000);
-
- // fix tempi!
- DateTime adesso = DateTime.Now;
- lastPzCountSend = adesso;
- lastWarnODL = adesso;
- lastCurrent = adesso;
- }
- catch
- { }
- isConnecting = false;
- }
-
- ///
- /// Formatta un dataitem da uno stream SAMPLE
- ///
- ///
- ///
- ///
- ///
- ///
- ///
- private MtcDataItemExt formatDataItem(ref int dSamplePeriod, ref float threshDBand, ref string uuid, IObservation observ, string fullMsg)
- {
- DataItemStatistic currStat = DataItemStatistic.AVERAGE;
- //cerco nei values...
- if (observ.Values.Count() > 0)
- {
- foreach (var item in observ.Values)
- {
- if (item.Key == "Statistic")
- {
- currStat = (DataItemStatistic)Enum.Parse(typeof(DataItemStatistic), item.Value);
- }
- }
- }
- // creo il nuovo dataitem da sample...
- MTConnect.Devices.DataItem newDataItem = new MTConnect.Devices.DataItem()
- {
- Category = observ.Category,
- Id = observ.DataItemId,
- Name = observ.Name,
- //SampleRate = ,
- Statistic = currStat,
- SubType = observ.SubType,
- Type = observ.Type
- };
- return formatDataItem(ref dSamplePeriod, ref threshDBand, ref uuid, newDataItem, fullMsg);
- }
-
- ///
- /// Formatta un dataitem x salvataggio in memoria locale
- ///
- ///
- ///
- ///
- ///
- ///
- ///
- private MtcDataItemExt formatDataItem(ref int dSamplePeriod, ref float threshDBand, ref string uuid, MTConnect.Devices.DataItem dataItem, string value)
- {
- MtcDataItemExt currDataItem;
- // uuid document parametri secondo categoria...
- switch (dataItem.Category)
- {
- case MTConnect.Devices.DataItemCategory.CONDITION:
- uuid = $"C_{dataItem.Id}";
- threshDBand = 0;
- dSamplePeriod = 0;
- break;
-
- case MTConnect.Devices.DataItemCategory.EVENT:
- uuid = $"E_{dataItem.Id}";
- threshDBand = 0;
- dSamplePeriod = 0;
- break;
-
- case MTConnect.Devices.DataItemCategory.SAMPLE:
- uuid = $"S_{dataItem.Id}";
- // SOLO SE è abilitato il datafiltering...
- if (enableDataFilter)
- {
- threshDBand = 1;
- // controllo SE ho conf x deadband...
- if (mtcParams.paramsEndThresh.Count > 0)
- {
- // ciclo su tutti i parametri indicati...
- foreach (var item in mtcParams.paramsEndThresh)
- {
- if (dataItem.Id.EndsWith(item.Key))
- {
- threshDBand = item.Value;
- }
- }
- }
- }
- else
- {
- threshDBand = 0;
- }
- dSamplePeriod = 60;
- break;
-
- default:
- break;
- }
- // salvo oggetto x "uso interno"
- currDataItem = new MtcDataItemExt()
- {
- Id = dataItem.Id,
- Category = dataItem.Category,
- Constraints = dataItem.Constraints,
- CoordinateSystem = dataItem.CoordinateSystem,
- Name = dataItem.Name,
- NativeScale = dataItem.NativeScale,
- NativeUnits = dataItem.NativeUnits,
- SampleRate = dataItem.SampleRate,
- Representation = dataItem.Representation,
- SignificantDigits = dataItem.SignificantDigits,
- Source = dataItem.Source,
- Statistic = dataItem.Statistic,
- SubType = dataItem.SubType,
- Type = dataItem.Type,
- //TypePath = dataItem.TypePath,
- Units = dataItem.Units,
- //XPath = dataItem.XPath,
- uid = uuid,
- thresholdDeadBand = threshDBand,
- samplePeriod = dSamplePeriod,
- value = value
- };
- // log x capire COME ho chiamato alcune cosette...
- if (dataItem.Id.Contains("EXE_MODE") || dataItem.Id.Contains("RUN_MODE") || dataItem.Id.Contains("POWER") || dataItem.Id.EndsWith("_Status"))
- {
- lgInfo($"DEBUG DATA | dataItem.Id : {dataItem.Id}");
- }
-
- return currDataItem;
- }
-
- ///
- /// Formatta un dataitem x salvataggio in memoria locale
- ///
- ///
- ///
- ///
- ///
- ///
- ///
- private MtcDataItemExt formatDataItem(ref int dSamplePeriod, ref float threshDBand, ref string uuid, MTConnect.Devices.IDataItem dataItem, string value)
- {
- MtcDataItemExt currDataItem;
- // uuid document parametri secondo categoria...
- switch (dataItem.Category)
- {
- case MTConnect.Devices.DataItemCategory.CONDITION:
- uuid = $"C_{dataItem.Id}";
- threshDBand = 0;
- dSamplePeriod = 0;
- break;
-
- case MTConnect.Devices.DataItemCategory.EVENT:
- uuid = $"E_{dataItem.Id}";
- threshDBand = 0;
- dSamplePeriod = 0;
- break;
-
- case MTConnect.Devices.DataItemCategory.SAMPLE:
- uuid = $"S_{dataItem.Id}";
- // SOLO SE è abilitato il datafiltering...
- if (enableDataFilter)
- {
- threshDBand = 1;
- // controllo SE ho conf x deadband...
- if (mtcParams.paramsEndThresh.Count > 0)
- {
- // ciclo su tutti i parametri indicati...
- foreach (var item in mtcParams.paramsEndThresh)
- {
- if (dataItem.Id.EndsWith(item.Key))
- {
- threshDBand = item.Value;
- }
- }
- }
- }
- else
- {
- threshDBand = 0;
- }
- dSamplePeriod = 60;
- break;
-
- default:
- break;
- }
-
- // salvo oggetto x "uso interno"
- currDataItem = new MtcDataItemExt()
- {
- Id = dataItem.Id,
- Category = dataItem.Category,
- Constraints = dataItem.Constraints,
- CoordinateSystem = dataItem.CoordinateSystem,
- Name = dataItem.Name,
- NativeScale = dataItem.NativeScale,
- NativeUnits = dataItem.NativeUnits,
- SampleRate = dataItem.SampleRate,
- Representation = dataItem.Representation,
- SignificantDigits = dataItem.SignificantDigits,
- Source = dataItem.Source,
- Statistic = dataItem.Statistic,
- SubType = dataItem.SubType,
- Type = dataItem.Type,
- //TypePath = dataItem.TypePath,
- Units = dataItem.Units,
- //XPath = dataItem.XPath,
- uid = uuid,
- thresholdDeadBand = threshDBand,
- samplePeriod = dSamplePeriod,
- value = value
- };
- // log x capire COME ho chiamato alcune cosette...
- if (dataItem.Id.Contains("EXE_MODE") || dataItem.Id.Contains("RUN_MODE") || dataItem.Id.Contains("POWER") || dataItem.Id.EndsWith("_Status"))
- {
- lgInfo($"DEBUG DATA | dataItem.Id : {dataItem.Id}");
- }
-
- return currDataItem;
- }
-
- ///
- /// Effettua lettura file di conf specifico MTC da oggetto serializzato json Nome file da cui leggere i parametri json
- ///
- private void loadMtcConf(string fileName)
- {
- string jsonFullPath = $"{Application.StartupPath}/DATA/CONF/{fileName}";
- lgInfo($"Apertura file {jsonFullPath}");
- StreamReader reader = new StreamReader(jsonFullPath);
- string jsonData = reader.ReadToEnd().Replace("\n", "").Replace("\r", "");
- if (!string.IsNullOrEmpty(jsonData))
- {
- lgInfo($"File json composto da {jsonData.Length} caratteri");
- try
- {
- mtcParams = JsonConvert.DeserializeObject(jsonData);
- lgInfo($"Decodifica aree MtcParamConf | condPowerOn: {mtcParams.condPowerOn.keyName}={mtcParams.condPowerOn.targetValue} | condWork: {mtcParams.condWork.Count} | keyPartCount: {mtcParams.keyPartCount} | itemTranslation: {mtcParams.itemTranslation.Count} | fluxLogVeto: {mtcParams.fluxLogVeto.Count} | paramsEndThresh: {mtcParams.paramsEndThresh.Count} ");
- }
- catch (Exception exc)
- {
- lgError($"Eccezione in decodifica conf json MTC:{Environment.NewLine}{exc}");
- }
- }
- else
- {
- lgError("Errore in loadMtcConf: file json vuoto!");
- }
- reader.Dispose();
- }
-
- private void MTC_ref_AssetsReceived(object sender, MTConnect.Assets.IAssetsResponseDocument doc)
- {
- lgInfo("ASSET received");
- queueInEnabCurr = true;
- connectionOk = true;
- foreach (var asset in doc.Assets)
- {
- // Print AssetId to the Console
- lgInfo($"Asset: {asset.AssetId}");
- }
- }
-
- private void MTC_ref_ClientStarted(object sender, EventArgs e)
- {
- lgInfo($"Client Started!");
- }
-
- private void MTC_ref_ClientStopped(object sender, EventArgs e)
- {
- lgInfo($"Client Stopped! | {e}");
- queueInEnabCurr = false;
- connectionOk = false;
- }
-
- private void MTC_ref_ConnectionError(object sender, Exception exc)
- {
- lgError($"CONNECTION ERROR returned!{Environment.NewLine}{exc}");
- queueInEnabCurr = false;
- connectionOk = false;
- }
-
- ///
- /// Effettuata discovery iniziale valori CURRENT
- ///
- ///
- ///
- private void MTC_ref_CurrentReceived(object sender, MTConnect.Streams.IStreamsResponseDocument document)
- {
- lgInfo("CURRENT received");
- queueInEnabCurr = true;
- connectionOk = true;
- if (document != null)
- {
- if (document.Streams != null)
- {
- lgInfo($"CurrentSuccessful: trovati {document.Streams.Count()} streams");
- }
- checkAndSend(document, true);
- }
- else
- {
- lgError("MTC_ref_CurrentReceived ERROR: document è null");
- }
- }
-
- ///
- /// Processing singola observation ricevuta
- ///
- ///
- ///
- private void MTC_ref_ObservationReceived(object sender, MTConnect.Observations.IObservation observ)
- {
- connectionOk = true;
- processObservation(observ, false);
- }
-
- ///
- /// Effettuata discovery iniziale valori PROBE
- ///
- ///
- ///
- private void MTC_ref_ProbeReceived(object sender, MTConnect.Devices.IDevicesResponseDocument document)
- {
- queueInEnabCurr = true;
- connectionOk = true;
- lgInfo("STEP 01 DevicesSuccessful reached!");
- MtcDataItemExt currDataItem = null;
- machDataItem currMapoDataItem = null;
- List elencoDataItems = new List();
- int dSamplePeriod = 0;
- float threshDBand = 0;
- string uuid = "";
- if (document != null)
- {
- foreach (var device in document.Devices)
- {
- List dataItems = device.GetDataItems().ToList();
- //List dataItems = device.GetDataItems();
- lgInfo($"Inizio STEP 02 per caricare {dataItems.Count} dataItems");
- foreach (var dataItem in dataItems)
- {
- try
- {
- currDataItem = formatDataItem(ref dSamplePeriod, ref threshDBand, ref uuid, dataItem, "");
- // aggiungo se non c'è...
- if (!dataItemMem.ContainsKey(dataItem.Id))
- {
- dataItemMem.Add(dataItem.Id, currDataItem);
- }
- var thisCat = (MapoSDK.DataItemCategory)Enum.Parse(typeof(MapoSDK.DataItemCategory), $"{dataItem.Category}");
- // salvo oggetto x registrazione su server MP-IO
- currMapoDataItem = new machDataItem()
- {
- uuid = dataItem.Id,
- Category = thisCat,
- Name = dataItem.Name,
- Type = dataItem.Type,
- SubType = dataItem.SubType,
- Units = dataItem.Units
- };
- // aggiungo se non ci fosse
- if (!elencoDataItems.Contains(currMapoDataItem))
- {
- elencoDataItems.Add(currMapoDataItem);
- }
- }
- catch (Exception exc)
- {
- lgError($"Eccezione in DevicesSuccessful / DataItem:{Environment.NewLine}{exc}");
- }
- }
- }
- // invio IN BLOCCO il dataItem serializzati...
- if (elencoDataItems.Count > 0)
- {
- lgInfo($"STEP 03 invio dati di {elencoDataItems.Count} records");
- sendDataItemsList(elencoDataItems);
- }
- hasReadItems = true;
- lgInfo($"STEP 04: memorizzati {dataItemMem.Count} oggetti in memoria");
- }
- else
- {
- lgError("STEP 05 error: document null!");
- }
- }
-
- ///
- /// Ricevuto SAMPLE stream da campionamenti ricevuti
- ///
- ///
- private void MTC_ref_SampleReceived(object sender, MTConnect.Streams.IStreamsResponseDocument document)
- {
- connectionOk = true;
- lgTrace("SAMPLE received");
- checkAndSend(document, false);
- }
-
- ///
- /// Processing di una singola observ in un datastream
- ///
- /// Osservazione da processare
- /// invio forzato
- private void processObservation(IObservation observ, bool forceSend)
- {
- string sVal = "";
- string descr = "";
- DateTime locTStamp = DateTime.Now;
- // log msg
- string sMsg = $" - {observ.DataItemId} | {observ.Category}";
- switch (observ.Category)
- {
- case MTConnect.Devices.DataItemCategory.CONDITION:
- string message = "OK";
- string level = "";
- string fullMsg = "";
- try
- {
- descr = itemTranslation("C", observ.DataItemId);
- locTStamp = observ.Timestamp.ToLocalTime();
- sVal = $"CONDITION: {locTStamp.ToString()} | descr: {descr} | Id: {observ.DataItemId} | Name: {observ.Name}";
- if (observ.Values.Count() > 0)
- {
- foreach (var item in observ.Values)
- {
- sVal += $" | {item.Key}: {item.Value}";
- if (item.Key == "Level")
- {
- level = item.Value;
- }
- else if (item.Key == "Message")
- {
- message = item.Value;
- }
- }
- fullMsg = $"{level} | {message}";
- }
- // condition verboso SEMPRE!
- lgInfo(sVal);
- DateTime tStamp = observ.Timestamp;
- var time2 = tStamp.ToLocalTime();
- // verifico se salvare
- bool changed = checkSaveCondition(observ, fullMsg);
- if (changed || forceSend)
- {
- // accodare ed invia nella coda ALARMS (che POI salva in document
- // MongoDB anche ultimi x minuti di FluxLog...)
- accodaAlarmLog(sVal, qEncodeFLog(time2, descr, fullMsg));
- }
- }
- catch (Exception exc)
- {
- lgError($"Eccezione in decodifica Conditions x StreamSuccesfull{Environment.NewLine}{exc}", false);
- }
- break;
-
- case MTConnect.Devices.DataItemCategory.EVENT:
- string eValue = "";
- try
- {
- descr = itemTranslation("E", observ.DataItemId);
- locTStamp = observ.Timestamp.ToLocalTime();
- sVal = $"EVENT: {locTStamp.ToString()} | descr: {descr} | Id: {observ.DataItemId} | Name: {observ.Name}";
- if (observ.Values.Count() > 0)
- {
- foreach (var item in observ.Values)
- {
- sVal += $" | {item.Key}: {item.Value}";
- if (item.Key == "Result")
- {
- eValue = item.Value;
- }
- }
- }
- if (isVerboseLog)
- {
- lgInfo(sVal);
- }
- DateTime tStamp = observ.Timestamp;
- var time2 = tStamp.ToLocalTime();
- // verifico se salvare
- bool changed = checkSaveItem(observ, eValue);
- if (changed || forceSend)
- {
- accodaFLog(sVal, qEncodeFLog(time2, descr, eValue));
- }
- }
- catch (Exception exc)
- {
- lgError($"Eccezione in decodifica Events x StreamSuccesfull{Environment.NewLine}{exc}", false);
- }
- break;
-
- case MTConnect.Devices.DataItemCategory.SAMPLE:
- string sValue = "";
- try
- {
- descr = itemTranslation("S", observ.DataItemId);
- locTStamp = observ.Timestamp.ToLocalTime();
- sVal = $"SAMPLE: {locTStamp.ToString()} | descr: {descr} | Id: {observ.DataItemId} | Name: {observ.Name}";
- if (observ.Values.Count() > 0)
- {
- foreach (var item in observ.Values)
- {
- sVal += $" | {item.Key}: {item.Value}";
- if (item.Key == "Result")
- {
- sValue = item.Value;
- }
- }
- }
- if (isVerboseLog)
- {
- lgInfo(sVal);
- }
- DateTime tStamp = observ.Timestamp;
- var time2 = tStamp.ToLocalTime();
- // verifico se salvare
- bool changed = checkSaveSample(observ, sValue);
- if (changed || forceSend)
- {
- accodaFLog(sVal, qEncodeFLog(time2, descr, sValue));
- }
- else
- {
- if (isVerboseLog)
- {
- lgTrace($"NON ACCODATO sample per {observ.DataItemId} - verifica variazione SAMPLE ha dato esito negativo", false);
- }
- }
- }
- catch (Exception exc)
- {
- lgError($"Eccezione in decodifica Samples x StreamSuccesfull{Environment.NewLine}{exc}");
- }
- break;
-
- default:
- break;
- }
- if (observ.Values != null && observ.Values.Count() > 0)
- {
- foreach (var item in observ.Values)
- {
- sMsg += $" | {item.Key}: {item.Value}";
- }
- }
- lgTrace(sMsg);
- }
-
- ///
- /// Effettua invio a MP/IO dell'elenco serializzato dei dataItems
- ///
- ///
- private void sendDataItemsList(List dataItems)
- {
- string rawData = JsonConvert.SerializeObject(dataItems);
- utils.callUrlNow($"{urlSaveDataItems}", rawData);
- }
-
- ///
- /// Esegue log trace del valore che è filtrato in invio
- ///
- ///
- private void traceObservation(IObservation observation)
- {
- string sMsg = $"VETO: - {observation.DataItemId} | {observation.Category}";
- if (observation.Values != null && observation.Values.Count() > 0)
- {
- foreach (var item in observation.Values)
- {
- sMsg += $" | {item.Key}: {item.Value}";
- }
- }
- lgTrace(sMsg);
- }
-
- #endregion Private Methods
-
- }
-}
\ No newline at end of file