diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index e1d097e4..28c5b943 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -208,6 +208,19 @@ IOB-WIN:build:
script:
- '& "$env:MSBUILD_PATH" "$env:APP_NAME\$env:APP_NAME.csproj" -target:Build /p:Configuration=Release /p:Platform="x86" /p:OutputPath=bin/ /nodeReuse:false /verbosity:minimal /m'
+IOB-WIN-MBUS:build:
+ stage: build
+ tags:
+ - win
+ variables:
+ APP_NAME: IOB-WIN-MBUS
+ before_script:
+ - *nuget-fix
+ - '& "$env:NUGET_PATH" restore "$env:APP_NAME.sln" -verbosity quiet'
+ - *version-fix
+ script:
+ - '& "$env:MSBUILD_PATH" "$env:APP_NAME\$env:APP_NAME.csproj" -target:Build /p:Configuration=Release /p:Platform="x86" /p:OutputPath=bin/ /nodeReuse:false /verbosity:minimal /m'
+
IOB-WIN-MTC:build:
stage: build
tags:
@@ -301,6 +314,31 @@ IOB-WIN:release:
- *nexusUpload
- *SendToVersionsLog
+IOB-WIN-MBUS:release:
+ stage: release
+ needs: ["IOB-WIN-MBUS:build"]
+ tags:
+ - win
+ variables:
+ APP_NAME: IOB-WIN-MBUS
+ NEXUS_PATH: MAPO/IOB-WIN-MBUS
+ rules:
+ - if: $CI_COMMIT_BRANCH == 'master'
+ changes:
+ - IOB-WIN-MBUS/*
+ when: always
+ before_script:
+ - *nuget-fix
+ - '& "$env:NUGET_PATH" restore "$env:APP_NAME.sln" -verbosity quiet'
+ - *version-fix
+ - *cleanup-zip
+ script:
+ - '& "$env:MSBUILD_PATH" "$env:APP_NAME\$env:APP_NAME.csproj" -target:Build /p:Configuration=Release /p:Platform="x86" /p:OutputPath=bin/ /nodeReuse:false /verbosity:minimal /m'
+ - *zipper
+ - *hashBuild
+ - *nexusUpload
+ - *SendToVersionsLog
+
IOB-WIN-MTC:release:
stage: release
needs: ["IOB-WIN-MTC:build"]
@@ -430,6 +468,26 @@ IOB-WIN-WPS:release:
# DocFx
# --------------------------------
+IOB-WIN-MBUS:docfx:
+ stage: docfx
+ needs: ["IOB-WIN-MBUS:build"]
+ tags:
+ - win
+ variables:
+ APP_NAME: IOB-WIN-MBUS
+ rules:
+ - if: $CI_COMMIT_BRANCH == 'master'
+ changes:
+ - IOB-WIN-MBUS/*
+ when: always
+ before_script:
+ - *nuget-fix
+ - '& "$env:NUGET_PATH" restore "$env:APP_NAME.sln" -verbosity quiet'
+ script:
+ - docfx $env:APP_NAME/docfx.json
+ - mv $env:APP_NAME/_site "docfx"
+ - *DocReplica
+
IOB-WIN-MTC:docfx:
stage: docfx
needs: ["IOB-WIN-MTC:build"]
diff --git a/IOB-UT-NEXT/IOB-UT-NEXT.csproj b/IOB-UT-NEXT/IOB-UT-NEXT.csproj
index 889b0ad6..0c5e647d 100644
--- a/IOB-UT-NEXT/IOB-UT-NEXT.csproj
+++ b/IOB-UT-NEXT/IOB-UT-NEXT.csproj
@@ -101,8 +101,9 @@
..\packages\System.Diagnostics.PerformanceCounter.9.0.0\lib\net462\System.Diagnostics.PerformanceCounter.dll
-
+
..\packages\System.IO.Compression.4.3.0\lib\net46\System.IO.Compression.dll
+ True
..\packages\System.IO.Pipelines.9.0.0\lib\net462\System.IO.Pipelines.dll
@@ -185,7 +186,7 @@
-
+
diff --git a/IOB-UT-NEXT/app.config b/IOB-UT-NEXT/app.config
index 6e67234a..051187d0 100644
--- a/IOB-UT-NEXT/app.config
+++ b/IOB-UT-NEXT/app.config
@@ -1,57 +1,56 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/IOB-WIN-FANUC.sln b/IOB-WIN-FANUC.sln
new file mode 100644
index 00000000..221674f9
--- /dev/null
+++ b/IOB-WIN-FANUC.sln
@@ -0,0 +1,83 @@
+
+Microsoft Visual Studio Solution File, Format Version 12.00
+# Visual Studio Version 17
+VisualStudioVersion = 17.2.32505.173
+MinimumVisualStudioVersion = 10.0.40219.1
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "VersGen", "VersGen\VersGen.csproj", "{58E399F3-9D4E-49D3-AB35-9ED536543D50}"
+EndProject
+Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution Items", "{B52E3E86-1B82-4F4D-982C-0C8909CD2A28}"
+ ProjectSection(SolutionItems) = preProject
+ .editorconfig = .editorconfig
+ EndProjectSection
+EndProject
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "IOB-UT-NEXT", "IOB-UT-NEXT\IOB-UT-NEXT.csproj", "{90512E12-29FC-460D-94CC-648C2A072DBD}"
+EndProject
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "IOB-WIN-FORM", "IOB-WIN-FORM\IOB-WIN-FORM.csproj", "{9BA331BB-9BF1-40E0-AC03-74B43D73A097}"
+EndProject
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "IOB-WIN-PING", "IOB-WIN-PING\IOB-WIN-PING.csproj", "{6ADF1E82-124C-489C-99EF-A857C933D362}"
+EndProject
+Global
+ GlobalSection(SolutionConfigurationPlatforms) = preSolution
+ Debug|Any CPU = Debug|Any CPU
+ Debug|x86 = Debug|x86
+ Release|Any CPU = Release|Any CPU
+ Release|x86 = Release|x86
+ Remote_DEBUG|Any CPU = Remote_DEBUG|Any CPU
+ Remote_DEBUG|x86 = Remote_DEBUG|x86
+ EndGlobalSection
+ GlobalSection(ProjectConfigurationPlatforms) = postSolution
+ {58E399F3-9D4E-49D3-AB35-9ED536543D50}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {58E399F3-9D4E-49D3-AB35-9ED536543D50}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {58E399F3-9D4E-49D3-AB35-9ED536543D50}.Debug|x86.ActiveCfg = Debug|Any CPU
+ {58E399F3-9D4E-49D3-AB35-9ED536543D50}.Debug|x86.Build.0 = Debug|Any CPU
+ {58E399F3-9D4E-49D3-AB35-9ED536543D50}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {58E399F3-9D4E-49D3-AB35-9ED536543D50}.Release|Any CPU.Build.0 = Release|Any CPU
+ {58E399F3-9D4E-49D3-AB35-9ED536543D50}.Release|x86.ActiveCfg = Release|x86
+ {58E399F3-9D4E-49D3-AB35-9ED536543D50}.Release|x86.Build.0 = Release|x86
+ {58E399F3-9D4E-49D3-AB35-9ED536543D50}.Remote_DEBUG|Any CPU.ActiveCfg = Debug|Any CPU
+ {58E399F3-9D4E-49D3-AB35-9ED536543D50}.Remote_DEBUG|Any CPU.Build.0 = Debug|Any CPU
+ {58E399F3-9D4E-49D3-AB35-9ED536543D50}.Remote_DEBUG|x86.ActiveCfg = Remote_DEBUG|x86
+ {58E399F3-9D4E-49D3-AB35-9ED536543D50}.Remote_DEBUG|x86.Build.0 = Remote_DEBUG|x86
+ {90512E12-29FC-460D-94CC-648C2A072DBD}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {90512E12-29FC-460D-94CC-648C2A072DBD}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {90512E12-29FC-460D-94CC-648C2A072DBD}.Debug|x86.ActiveCfg = Debug|x86
+ {90512E12-29FC-460D-94CC-648C2A072DBD}.Debug|x86.Build.0 = Debug|x86
+ {90512E12-29FC-460D-94CC-648C2A072DBD}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {90512E12-29FC-460D-94CC-648C2A072DBD}.Release|Any CPU.Build.0 = Release|Any CPU
+ {90512E12-29FC-460D-94CC-648C2A072DBD}.Release|x86.ActiveCfg = Release|x86
+ {90512E12-29FC-460D-94CC-648C2A072DBD}.Release|x86.Build.0 = Release|x86
+ {90512E12-29FC-460D-94CC-648C2A072DBD}.Remote_DEBUG|Any CPU.ActiveCfg = Debug|Any CPU
+ {90512E12-29FC-460D-94CC-648C2A072DBD}.Remote_DEBUG|Any CPU.Build.0 = Debug|Any CPU
+ {90512E12-29FC-460D-94CC-648C2A072DBD}.Remote_DEBUG|x86.ActiveCfg = Release|x86
+ {9BA331BB-9BF1-40E0-AC03-74B43D73A097}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {9BA331BB-9BF1-40E0-AC03-74B43D73A097}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {9BA331BB-9BF1-40E0-AC03-74B43D73A097}.Debug|x86.ActiveCfg = Debug|Any CPU
+ {9BA331BB-9BF1-40E0-AC03-74B43D73A097}.Debug|x86.Build.0 = Debug|Any CPU
+ {9BA331BB-9BF1-40E0-AC03-74B43D73A097}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {9BA331BB-9BF1-40E0-AC03-74B43D73A097}.Release|Any CPU.Build.0 = Release|Any CPU
+ {9BA331BB-9BF1-40E0-AC03-74B43D73A097}.Release|x86.ActiveCfg = Release|Any CPU
+ {9BA331BB-9BF1-40E0-AC03-74B43D73A097}.Release|x86.Build.0 = Release|Any CPU
+ {9BA331BB-9BF1-40E0-AC03-74B43D73A097}.Remote_DEBUG|Any CPU.ActiveCfg = Debug|Any CPU
+ {9BA331BB-9BF1-40E0-AC03-74B43D73A097}.Remote_DEBUG|Any CPU.Build.0 = Debug|Any CPU
+ {9BA331BB-9BF1-40E0-AC03-74B43D73A097}.Remote_DEBUG|x86.ActiveCfg = Release|Any CPU
+ {9BA331BB-9BF1-40E0-AC03-74B43D73A097}.Remote_DEBUG|x86.Build.0 = Release|Any CPU
+ {6ADF1E82-124C-489C-99EF-A857C933D362}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {6ADF1E82-124C-489C-99EF-A857C933D362}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {6ADF1E82-124C-489C-99EF-A857C933D362}.Debug|x86.ActiveCfg = Debug|Any CPU
+ {6ADF1E82-124C-489C-99EF-A857C933D362}.Debug|x86.Build.0 = Debug|Any CPU
+ {6ADF1E82-124C-489C-99EF-A857C933D362}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {6ADF1E82-124C-489C-99EF-A857C933D362}.Release|Any CPU.Build.0 = Release|Any CPU
+ {6ADF1E82-124C-489C-99EF-A857C933D362}.Release|x86.ActiveCfg = Release|Any CPU
+ {6ADF1E82-124C-489C-99EF-A857C933D362}.Release|x86.Build.0 = Release|Any CPU
+ {6ADF1E82-124C-489C-99EF-A857C933D362}.Remote_DEBUG|Any CPU.ActiveCfg = Release|Any CPU
+ {6ADF1E82-124C-489C-99EF-A857C933D362}.Remote_DEBUG|Any CPU.Build.0 = Release|Any CPU
+ {6ADF1E82-124C-489C-99EF-A857C933D362}.Remote_DEBUG|x86.ActiveCfg = Release|Any CPU
+ {6ADF1E82-124C-489C-99EF-A857C933D362}.Remote_DEBUG|x86.Build.0 = Release|Any CPU
+ EndGlobalSection
+ GlobalSection(SolutionProperties) = preSolution
+ HideSolutionNode = FALSE
+ EndGlobalSection
+ GlobalSection(ExtensibilityGlobals) = postSolution
+ SolutionGuid = {801DCDC5-B7D3-4EA5-B543-783D2C91765F}
+ EndGlobalSection
+EndGlobal
diff --git a/IOB-WIN-FORM/IOB-WIN-FORM.csproj b/IOB-WIN-FORM/IOB-WIN-FORM.csproj
index bec16da8..a597dc11 100644
--- a/IOB-WIN-FORM/IOB-WIN-FORM.csproj
+++ b/IOB-WIN-FORM/IOB-WIN-FORM.csproj
@@ -60,7 +60,12 @@
-
+
+ ..\packages\System.IO.4.3.0\lib\net462\System.IO.dll
+
+
+ ..\packages\System.IO.Compression.4.3.0\lib\net46\System.IO.Compression.dll
+
@@ -116,7 +121,7 @@
-
+
diff --git a/IOB-WIN-FORM/Iob/Generic.cs b/IOB-WIN-FORM/Iob/Generic.cs
index 9a6ecf85..256d0c1f 100644
--- a/IOB-WIN-FORM/Iob/Generic.cs
+++ b/IOB-WIN-FORM/Iob/Generic.cs
@@ -6079,7 +6079,7 @@ namespace IOB_WIN_FORM.Iob
{
List reqPOdlList = new List();
// per prima cosa recupero elenco PODL da gestire....
- var rawListPODL = callUrl(urlGetCurrPODL, false);
+ var rawListPODL = callUrl(urlGetNextPODL, false);
if (!string.IsNullOrEmpty(rawListPODL))
{
try
@@ -6093,7 +6093,7 @@ namespace IOB_WIN_FORM.Iob
}
else
{
- lg.Error($"Errore: chiamata elenco PODL ({urlGetCurrPODL}) ha restituito valore vuoto");
+ lg.Error($"Errore: chiamata elenco PODL ({urlGetNextPODL}) ha restituito valore vuoto");
}
return reqPOdlList;
@@ -6799,7 +6799,7 @@ namespace IOB_WIN_FORM.Iob
List reqPOdlList = new List();
// per prima cosa recupero elenco PODL da gestire....
- var rawListPODL = callUrl(urlGetCurrPODL, false);
+ var rawListPODL = callUrl(urlGetNextPODL, false);
if (!string.IsNullOrEmpty(rawListPODL))
{
try
@@ -6813,7 +6813,7 @@ namespace IOB_WIN_FORM.Iob
}
else
{
- lg.Error($"Errore: chiamata elenco PODL ({urlGetCurrPODL}) ha restituito valore vuoto");
+ lg.Error($"Errore: chiamata elenco PODL ({urlGetNextPODL}) ha restituito valore vuoto");
}
// proseguo se ne ho trovati...
if (reqPOdlList.Count > 0)
diff --git a/IOB-WIN-FORM/Iob/Simula.cs b/IOB-WIN-FORM/Iob/Simula.cs
index 143a4120..43b07a89 100644
--- a/IOB-WIN-FORM/Iob/Simula.cs
+++ b/IOB-WIN-FORM/Iob/Simula.cs
@@ -1427,7 +1427,7 @@ namespace IOB_WIN_FORM.Iob
// recupera dati da server tramite chiamate REST a MP/IO/IOB...
var rawListArt = callUrl(urlGetCurrArt, false);
var rawListDOSS = callUrl(urlGetCurrDOSS, false);
- var rawListPODL = callUrl(urlGetCurrPODL, false);
+ var rawListPODL = callUrl(urlGetNextPODL, false);
var rawLVFasi = callUrl(urlGetListValFasiPodl, false);
if (!string.IsNullOrEmpty(rawListArt))
{
@@ -1475,7 +1475,7 @@ namespace IOB_WIN_FORM.Iob
}
else
{
- lg.Error($"Errore: chiamata elenco PODL ({urlGetCurrPODL}) ha restituito valore vuoto");
+ lg.Error($"Errore: chiamata elenco PODL ({urlGetNextPODL}) ha restituito valore vuoto");
}
if (!string.IsNullOrEmpty(rawLVFasi))
{
@@ -1563,7 +1563,7 @@ namespace IOB_WIN_FORM.Iob
// recupera dati da server tramite chiamate REST a MP/IO/IOB...
var rawListArt = callUrl(urlGetCurrArt, false);
var rawListDOSS = callUrl(urlGetCurrDOSS, false);
- var rawListPODL = callUrl(urlGetCurrPODL, false);
+ var rawListPODL = callUrl(urlGetNextPODL, false);
if (!string.IsNullOrEmpty(rawListArt))
{
try
@@ -1610,7 +1610,7 @@ namespace IOB_WIN_FORM.Iob
}
else
{
- lg.Error($"Errore: chiamata elenco PODL ({urlGetCurrPODL}) ha restituito valore vuoto");
+ lg.Error($"Errore: chiamata elenco PODL ({urlGetNextPODL}) ha restituito valore vuoto");
}
answ = okArt && okPodl && okDoss;
diff --git a/IOB-WIN-FORM/app.config b/IOB-WIN-FORM/app.config
index dbf050b1..aecb7c71 100644
--- a/IOB-WIN-FORM/app.config
+++ b/IOB-WIN-FORM/app.config
@@ -1,64 +1,65 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/IOB-WIN-FORM/packages.config b/IOB-WIN-FORM/packages.config
index 40162ebf..ae63e745 100644
--- a/IOB-WIN-FORM/packages.config
+++ b/IOB-WIN-FORM/packages.config
@@ -6,5 +6,7 @@
+
+
\ No newline at end of file
diff --git a/IOB-WIN-MBUS.sln b/IOB-WIN-MBUS.sln
index 221674f9..0199bb2c 100644
--- a/IOB-WIN-MBUS.sln
+++ b/IOB-WIN-MBUS.sln
@@ -14,7 +14,7 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "IOB-UT-NEXT", "IOB-UT-NEXT\
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "IOB-WIN-FORM", "IOB-WIN-FORM\IOB-WIN-FORM.csproj", "{9BA331BB-9BF1-40E0-AC03-74B43D73A097}"
EndProject
-Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "IOB-WIN-PING", "IOB-WIN-PING\IOB-WIN-PING.csproj", "{6ADF1E82-124C-489C-99EF-A857C933D362}"
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "IOB-WIN-MBUS", "IOB-WIN-MBUS\IOB-WIN-MBUS.csproj", "{8A4954B2-1492-4CEF-8F6C-619E397718CF}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
@@ -57,22 +57,22 @@ Global
{9BA331BB-9BF1-40E0-AC03-74B43D73A097}.Release|Any CPU.Build.0 = Release|Any CPU
{9BA331BB-9BF1-40E0-AC03-74B43D73A097}.Release|x86.ActiveCfg = Release|Any CPU
{9BA331BB-9BF1-40E0-AC03-74B43D73A097}.Release|x86.Build.0 = Release|Any CPU
- {9BA331BB-9BF1-40E0-AC03-74B43D73A097}.Remote_DEBUG|Any CPU.ActiveCfg = Debug|Any CPU
- {9BA331BB-9BF1-40E0-AC03-74B43D73A097}.Remote_DEBUG|Any CPU.Build.0 = Debug|Any CPU
+ {9BA331BB-9BF1-40E0-AC03-74B43D73A097}.Remote_DEBUG|Any CPU.ActiveCfg = Release|Any CPU
+ {9BA331BB-9BF1-40E0-AC03-74B43D73A097}.Remote_DEBUG|Any CPU.Build.0 = Release|Any CPU
{9BA331BB-9BF1-40E0-AC03-74B43D73A097}.Remote_DEBUG|x86.ActiveCfg = Release|Any CPU
{9BA331BB-9BF1-40E0-AC03-74B43D73A097}.Remote_DEBUG|x86.Build.0 = Release|Any CPU
- {6ADF1E82-124C-489C-99EF-A857C933D362}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
- {6ADF1E82-124C-489C-99EF-A857C933D362}.Debug|Any CPU.Build.0 = Debug|Any CPU
- {6ADF1E82-124C-489C-99EF-A857C933D362}.Debug|x86.ActiveCfg = Debug|Any CPU
- {6ADF1E82-124C-489C-99EF-A857C933D362}.Debug|x86.Build.0 = Debug|Any CPU
- {6ADF1E82-124C-489C-99EF-A857C933D362}.Release|Any CPU.ActiveCfg = Release|Any CPU
- {6ADF1E82-124C-489C-99EF-A857C933D362}.Release|Any CPU.Build.0 = Release|Any CPU
- {6ADF1E82-124C-489C-99EF-A857C933D362}.Release|x86.ActiveCfg = Release|Any CPU
- {6ADF1E82-124C-489C-99EF-A857C933D362}.Release|x86.Build.0 = Release|Any CPU
- {6ADF1E82-124C-489C-99EF-A857C933D362}.Remote_DEBUG|Any CPU.ActiveCfg = Release|Any CPU
- {6ADF1E82-124C-489C-99EF-A857C933D362}.Remote_DEBUG|Any CPU.Build.0 = Release|Any CPU
- {6ADF1E82-124C-489C-99EF-A857C933D362}.Remote_DEBUG|x86.ActiveCfg = Release|Any CPU
- {6ADF1E82-124C-489C-99EF-A857C933D362}.Remote_DEBUG|x86.Build.0 = Release|Any CPU
+ {8A4954B2-1492-4CEF-8F6C-619E397718CF}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {8A4954B2-1492-4CEF-8F6C-619E397718CF}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {8A4954B2-1492-4CEF-8F6C-619E397718CF}.Debug|x86.ActiveCfg = Debug|Any CPU
+ {8A4954B2-1492-4CEF-8F6C-619E397718CF}.Debug|x86.Build.0 = Debug|Any CPU
+ {8A4954B2-1492-4CEF-8F6C-619E397718CF}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {8A4954B2-1492-4CEF-8F6C-619E397718CF}.Release|Any CPU.Build.0 = Release|Any CPU
+ {8A4954B2-1492-4CEF-8F6C-619E397718CF}.Release|x86.ActiveCfg = Release|Any CPU
+ {8A4954B2-1492-4CEF-8F6C-619E397718CF}.Release|x86.Build.0 = Release|Any CPU
+ {8A4954B2-1492-4CEF-8F6C-619E397718CF}.Remote_DEBUG|Any CPU.ActiveCfg = Release|Any CPU
+ {8A4954B2-1492-4CEF-8F6C-619E397718CF}.Remote_DEBUG|Any CPU.Build.0 = Release|Any CPU
+ {8A4954B2-1492-4CEF-8F6C-619E397718CF}.Remote_DEBUG|x86.ActiveCfg = Release|Any CPU
+ {8A4954B2-1492-4CEF-8F6C-619E397718CF}.Remote_DEBUG|x86.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
diff --git a/IOB-WIN-MBUS/AdapterFormNext.cs b/IOB-WIN-MBUS/AdapterFormNext.cs
index d4b03e39..086d6891 100644
--- a/IOB-WIN-MBUS/AdapterFormNext.cs
+++ b/IOB-WIN-MBUS/AdapterFormNext.cs
@@ -1,12 +1,12 @@
using IOB_UT_NEXT;
-using IOB_WIN_PING.Iob;
+using IOB_WIN_MBUS.Iob;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
-namespace IOB_WIN_PING
+namespace IOB_WIN_MBUS
{
public class AdapterFormNext: IOB_WIN_FORM.AdapterForm
{
@@ -28,8 +28,53 @@ namespace IOB_WIN_PING
switch (tipoScelto)
{
- case tipoAdapter.PingWatchdog:
- iobObj = new IOB_WIN_FORM.Iob.PingWatchDog(this, IOBConf);
+ case tipoAdapter.MODBUS_TCP:
+ iobObj = new IobModbusTCP.ModbusTCP(this, IOBConf);
+ btnStart.Enabled = true;
+ break;
+
+ case tipoAdapter.MODBUS_TCP_CEDAX:
+ iobObj = new IobModbusTCP.ModbusTCPCedax(this, IOBConf);
+ btnStart.Enabled = true;
+ break;
+
+ case tipoAdapter.MODBUS_TCP_CENTERFRIGO:
+ iobObj = new IobModbusTCP.ModbusTCPCenterfrigo(this, IOBConf);
+ btnStart.Enabled = true;
+ break;
+
+ case tipoAdapter.MODBUS_TCP_FIMAT:
+ iobObj = new IobModbusTCP.ModbusTCPFimat(this, IOBConf);
+ btnStart.Enabled = true;
+ break;
+
+ case tipoAdapter.MODBUS_TCP_HAM:
+ iobObj = new IobModbusTCP.ModbusTCPHam(this, IOBConf);
+ btnStart.Enabled = true;
+ break;
+
+ case tipoAdapter.MODBUS_TCP_HELPI:
+ iobObj = new IobModbusTCP.ModbusTCPHelpi(this, IOBConf);
+ btnStart.Enabled = true;
+ break;
+
+ case tipoAdapter.MODBUS_TCP_IMAS_AEROMEC:
+ iobObj = new IobModbusTCP.ModbusTCPImaxAeromec(this, IOBConf);
+ btnStart.Enabled = true;
+ break;
+
+ case tipoAdapter.MODBUS_TCP_RIMOR:
+ iobObj = new IobModbusTCP.ModbusTCPRimor(this, IOBConf);
+ btnStart.Enabled = true;
+ break;
+
+ case tipoAdapter.MODBUS_TCP_SAIM:
+ iobObj = new IobModbusTCP.ModbusTCPSaim(this, IOBConf);
+ btnStart.Enabled = true;
+ break;
+
+ case tipoAdapter.MODBUS_TCP_ZETAPACK:
+ iobObj = new IobModbusTCP.ModbusTCPZetapack(this, IOBConf);
btnStart.Enabled = true;
break;
diff --git a/IOB-WIN-MBUS/App.config b/IOB-WIN-MBUS/App.config
index 93faf2cd..576c6d12 100644
--- a/IOB-WIN-MBUS/App.config
+++ b/IOB-WIN-MBUS/App.config
@@ -8,7 +8,7 @@
-
+
@@ -108,38 +108,51 @@
-
+
+
-
+
+
+
+
+
+
+
+
+
-
+
+
+
+
+
+
+
+
+
-
+
-
-
+
+
-
-
-
-
-
-
+
+
diff --git a/IOB-WIN-MBUS/DATA/CONF/3026-MBus.ini b/IOB-WIN-MBUS/DATA/CONF/3026-MBus.ini
new file mode 100644
index 00000000..5eb3be65
--- /dev/null
+++ b/IOB-WIN-MBUS/DATA/CONF/3026-MBus.ini
@@ -0,0 +1,78 @@
+;Configurazione IOB-WIN
+[IOB]
+;Impianto IMAX Aeromec - Jetco (non va, sostituito con OPC-UA)
+CNCTYPE=MODBUS_TCP_IMAX_AEROMEC
+PING_MS_TIMEOUT=1000
+MinDeltaSec=5
+
+[MACHINE]
+VENDOR=IMAX
+MODEL=Filtro Aria
+
+[CNC]
+IP=192.168.0.80
+PORT=502
+
+[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=40001
+ADDR_WRITE=40001
+SIZE_READ=30
+SIZE_WRITE=0
+HR_BASE_ADDR=40000
+DELTA_BASE=0
+
+
+[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
+PZCOUNT_MODE=STD.DB85.DBRE16
+DISABLE_PZCOUNT=TRUE
+ENABLE_SEND_PZC_BLOCK=TRUE
+MIN_SEND_PZC_BLOCK=0
+MAX_SEND_PZC_BLOCK=100
+; GEST DATI DYN
+ENABLE_DYN_DATA=TRUE
+FORCE_DYN_DATA=TRUE
+; gestione delta minimo accettabile tra min/MAX
+DELTA_VAL=0.1
+
+; clock base (da 10ms)
+timerIntMs=10
+
+; conf parametri memoria READ/WRITE
+PARAM_CONF=3026.json
+
+NO_PING=FALSE
+; conf blocchi memoria x READ
+MEM_BLOCK=3026_MBlock.json
+; conf aree allarme
+ALARM_CONF=3026_alarm.json
+
+; rimozione check limiti min/max dynData
+disDynDataRangeCheck=true
+
+[BRANCH]
+NAME=master
\ No newline at end of file
diff --git a/IOB-WIN-MBUS/DATA/CONF/3026-MBus.json b/IOB-WIN-MBUS/DATA/CONF/3026-MBus.json
new file mode 100644
index 00000000..2ecd5729
--- /dev/null
+++ b/IOB-WIN-MBUS/DATA/CONF/3026-MBus.json
@@ -0,0 +1,110 @@
+{
+ "mMapWrite": {
+
+ },
+ "mMapRead": {
+ //"StatusWord": {
+ // "name": "StatusWord",
+ // "description": "Word di Status",
+ // "memAddr": "40002",
+ // "tipoMem": "Int",
+ // "index": 2,
+ // "size": 1,
+ // "func": "POINT",
+ // "period": 90,
+ // "factor": 1,
+ // "minVal": 0,
+ // "maxVal": 65536,
+ // "unit": "BMap"
+ //},
+ //"StatusDetWord": {
+ // "name": "StatusDetWord",
+ // "description": "Word di Status",
+ // "memAddr": "40005",
+ // "tipoMem": "Int",
+ // "index": 5,
+ // "size": 1,
+ // "func": "POINT",
+ // "period": 90,
+ // "factor": 1,
+ // "minVal": 0,
+ // "maxVal": 65536,
+ // "unit": "BMap"
+ //},
+ "FreqInverter": {
+ "name": "FreqInverter",
+ "description": "Frequenza Inverter",
+ "memAddr": "40011",
+ "tipoMem": "Real",
+ "index": 11,
+ "size": 2,
+ "func": "MEDIAN",
+ "period": 90,
+ "factor": 1,
+ "minVal": 0,
+ "maxVal": 999999999,
+ "unit": "Hz"
+ },
+ "CDOreManuten": {
+ "name": "CDOreManuten",
+ "description": "Residuo ore a prossimo service",
+ "memAddr": "40013",
+ "tipoMem": "Int",
+ "index": 13,
+ "size": 1,
+ "func": "MEDIAN",
+ "period": 90,
+ "factor": 1,
+ "minVal": 0,
+ "maxVal": 999999999,
+ "unit": "h"
+ },
+ "COreTAsp1": {
+ "name": "COreTAsp1",
+ "description": "Totale ore funzionamento impianto",
+ "memAddr": "40014",
+ "tipoMem": "Int",
+ "index": 14,
+ "size": 1,
+ "func": "MEDIAN",
+ "period": 90,
+ "factor": 1,
+ "minVal": 0,
+ "maxVal": 999999999,
+ "unit": "h"
+ },
+ "COrePAsp1": {
+ "name": "COrePAsp1",
+ "description": "Parziale ore funzionamento impianto da ultimo service",
+ "memAddr": "40015",
+ "tipoMem": "Int",
+ "index": 15,
+ "size": 1,
+ "func": "MEDIAN",
+ "period": 90,
+ "factor": 1,
+ "minVal": 0,
+ "maxVal": 999999999,
+ "unit": "h"
+ },
+ "AmpereReale": {
+ "name": "AmpereReale",
+ "description": "Assorbimento aspiratore 1",
+ "memAddr": "40016",
+ "tipoMem": "Real",
+ "index": 16,
+ "size": 2,
+ "func": "MEDIAN",
+ "period": 90,
+ "factor": 1,
+ "minVal": 0,
+ "maxVal": 999999999,
+ "unit": "A"
+ }
+ },
+ "optMemPar": {
+ "AutoBitCond": "40002.14=1",
+ "EStopBitCond": "40002.9=0",
+ "WorkBitCond": "40002.0=1"
+ }
+}
\ No newline at end of file
diff --git a/IOB-WIN-MBUS/DATA/CONF/3026-MBus_MBlock.json b/IOB-WIN-MBUS/DATA/CONF/3026-MBus_MBlock.json
new file mode 100644
index 00000000..1b6d6a80
--- /dev/null
+++ b/IOB-WIN-MBUS/DATA/CONF/3026-MBus_MBlock.json
@@ -0,0 +1,5 @@
+{
+ "ReadBlocks": {
+ "40000": 30
+ }
+}
\ No newline at end of file
diff --git a/IOB-WIN-MBUS/DATA/CONF/3026-MBus_alarm.json b/IOB-WIN-MBUS/DATA/CONF/3026-MBus_alarm.json
new file mode 100644
index 00000000..e7822f36
--- /dev/null
+++ b/IOB-WIN-MBUS/DATA/CONF/3026-MBus_alarm.json
@@ -0,0 +1,52 @@
+[
+ {
+ "description": "Allarmi Impianto",
+ "tipoMem": "DInt",
+ "memAddr": "40003",
+ "index": 3,
+ "size": 2,
+ "messages": [
+ "ALLARME VENTILATORE 1",
+ "ALLARME VENTILATORE 2",
+ "WARNING FILTRI INTASATI",
+ "WARNING LIVELLO FILTRO",
+ "ALLARME LIVELLO FILTRO",
+ "ALLARME TAGLIAFUOCO 1 ASPIRAZIONE ",
+ "ALLARME TAGLIAFUOCO 2 ASPIRAZIONE ",
+ "CUMULATIVO ALLARMI ALIMENTAZIONI (24V AC-DC)",
+ "ALLARME FUORIUSCITA IQUINANTE ",
+ "ALLARME TERMOVELOCIMETRICO",
+ "ALLARME RILEVATORE SCINTILLE",
+ "ALLARME SPORTELLO APERTO",
+ "ALLARME MOTORE VALVOLA STELLARE FILTRO",
+ "ALLARME MOTORE COCLEA ",
+ "ALLARME MOTORE VALVOLA STELLARE CALDAIA",
+ "ALLARME MOTORE ESTRATTORE FILTRO"
+ ]
+ },
+ {
+ "description": "Allarmi Impianto",
+ "tipoMem": "DInt",
+ "memAddr": "40004",
+ "index": 4,
+ "size": 2,
+ "messages": [
+ "ALLARME MOTORE ASPIRATORE TRAVASO",
+ "WARNING BY-PASS 1 ASPIRAZIONE",
+ "WARNING BY-PASS 2 ASPIRAZIONE",
+ "WARNING BY-PASS 3 ASPIRAZIONE",
+ "WARNING BY-PASS 4 ASPIRAZIONE",
+ "ALLARME TERMICO VIBRATORI",
+ "ALLARME INTASAMENTO ESTRATTORE",
+ "WARNING FILTRI INTASATI PLENUM",
+ "CUMULATIVO ALLARMI RECUPERATORE",
+ "WARNING SERRANDA 1 PARTENZA ASPIRAZIONE",
+ "WARNING SERRANDA 2 PARTENZA ASPIRAZIONE",
+ "WARNING SERRANDA 3 PARTENZA ASPIRAZIONE",
+ "ALLARME IMPLOSIONE TUBAZIONI",
+ "WARNING IMPLOSIONE TUBAZIONI",
+ "ALLARME VENTILATORE 3",
+ "ALLARME INTASAMENTO TASCHE"
+ ]
+ }
+]
\ No newline at end of file
diff --git a/IOB-WIN-MBUS/DATA/CONF/FINASSI_HELPI_01.ini b/IOB-WIN-MBUS/DATA/CONF/FINASSI_HELPI_01.ini
new file mode 100644
index 00000000..d3885d9a
--- /dev/null
+++ b/IOB-WIN-MBUS/DATA/CONF/FINASSI_HELPI_01.ini
@@ -0,0 +1,79 @@
+;Configurazione IOB-WIN
+[IOB]
+;Impianto Helpi x impacchettatrice - Finassi
+CNCTYPE=MODBUS_TCP_HELPI
+PING_MS_TIMEOUT=1000
+MinDeltaSec=5
+
+[MACHINE]
+VENDOR=HELPI
+MODEL=HELPI
+
+[CNC]
+IP=10.150.0.20
+PORT=502
+
+[SERVER]
+MPIP=http://10.150.0.1
+MPURL=/MP/IO
+CMDBASE=/IOB/input/
+CMDFLOG=/IOB/flog/
+CMDALIVE=/IOB
+CMDENABLED=/IOB/enabled/
+CMDADV1=?valore=
+CMDREBO=/sendReboot.aspx?idxMacchina=
+
+[MEMORY]
+ADDR_READ=41050
+ADDR_WRITE=41060
+SIZE_READ=60
+SIZE_WRITE=50
+CALC_BASE_ADDR=false
+HR_BASE_ADDR=0
+DELTA_BASE=0
+
+
+[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.Nome valore DynData
+PZCOUNT_MODE=STD.NumPacchi
+DISABLE_PZCOUNT=TRUE
+ENABLE_SEND_PZC_BLOCK=TRUE
+MIN_SEND_PZC_BLOCK=0
+MAX_SEND_PZC_BLOCK=100
+; GEST DATI DYN
+ENABLE_DYN_DATA=TRUE
+FORCE_DYN_DATA=TRUE
+; gestione delta minimo accettabile tra min/MAX
+DELTA_VAL=0.1
+
+; clock base (da 10ms)
+timerIntMs=20
+
+; conf parametri memoria READ/WRITE
+PARAM_CONF=FINASSI_HELPI_01.json
+
+NO_PING=FALSE
+; conf blocchi memoria x READ
+MEM_BLOCK=FINASSI_HELPI_01_MBlock.json
+; conf aree allarme
+ALARM_CONF=FINASSI_HELPI_01_alarm.json
+
+; rimozione check limiti min/max dynData
+disDynDataRangeCheck=true
+
+[BRANCH]
+NAME=master
\ No newline at end of file
diff --git a/IOB-WIN-MBUS/DATA/CONF/FINASSI_HELPI_01.json b/IOB-WIN-MBUS/DATA/CONF/FINASSI_HELPI_01.json
new file mode 100644
index 00000000..a06ad1d4
--- /dev/null
+++ b/IOB-WIN-MBUS/DATA/CONF/FINASSI_HELPI_01.json
@@ -0,0 +1,165 @@
+{
+ "mMapWrite": {
+ "NumRicetta": {
+ "name": "NumRicetta",
+ "description": "Numero Ricetta richiamata",
+ "memAddr": "41060",
+ "tipoMem": "Int",
+ "index": 41060,
+ "size": 1,
+ "minVal": 0,
+ "maxVal": 32767,
+ "unit": "#"
+ },
+ "SetRicetta": {
+ "name": "SetRicetta",
+ "description": "Richiesta applicazione Ricetta",
+ "memAddr": "41061",
+ "tipoMem": "Int",
+ "index": 41061,
+ "size": 1,
+ "minVal": 0,
+ "maxVal": 1,
+ "unit": "#"
+ },
+ "ODL": {
+ "name": "ODL",
+ "description": "Numero ODL richiesto",
+ "memAddr": "41062",
+ "tipoMem": "String",
+ "index": 41062,
+ "size": 16,
+ "unit": "#"
+ },
+ "LOTTO": {
+ "name": "LOTTO",
+ "description": "Numero LOTTO richiesto",
+ "memAddr": "41078",
+ "tipoMem": "String",
+ "index": 41078,
+ "size": 16,
+ "unit": "#"
+ },
+ "NumPacchi": {
+ "name": "NumPacchi",
+ "description": "Numero Pacchi Richiesti",
+ "memAddr": "41098",
+ "tipoMem": "IntLH",
+ "index": 41098,
+ "size": 2,
+ "unit": "#"
+ }
+ },
+ "mMapRead": {
+ "NumRicetta": {
+ "name": "NumRicetta",
+ "description": "Numero Ricetta richiamata",
+ "memAddr": "41060",
+ "tipoMem": "Int",
+ "index": 41060,
+ "size": 1,
+ "minVal": 0,
+ "maxVal": 32767,
+ "unit": "#",
+ "func": "POINT",
+ "period": 90,
+ "factor": 1
+ },
+ "SetRicetta": {
+ "name": "SetRicetta",
+ "description": "Richiesta applicazione Ricetta",
+ "memAddr": "41061",
+ "tipoMem": "Int",
+ "index": 41061,
+ "size": 1,
+ "minVal": 0,
+ "maxVal": 1,
+ "unit": "#",
+ "func": "POINT",
+ "period": 90,
+ "factor": 1
+ },
+ "ODL": {
+ "name": "ODL",
+ "description": "Numero ODL richiesto",
+ "memAddr": "41062",
+ "tipoMem": "String",
+ "index": 41062,
+ "size": 16,
+ "unit": "#",
+ "func": "POINT",
+ "period": 90
+ },
+ "LOTTO": {
+ "name": "LOTTO",
+ "description": "Numero LOTTO richiesto",
+ "memAddr": "41078",
+ "tipoMem": "String",
+ "index": 41078,
+ "size": 16,
+ "unit": "#",
+ "func": "POINT",
+ "period": 90
+ },
+ "NumPacchi": {
+ "name": "NumPacchi",
+ "description": "Numero Pacchi Richiesti",
+ "memAddr": "41098",
+ "tipoMem": "IntLH",
+ "index": 41098,
+ "size": 2,
+ "unit": "#",
+ "func": "POINT",
+ "period": 90,
+ "factor": 1
+ },
+ "NumPacchiFatti": {
+ "name": "NumPacchiFatti",
+ "description": "Numero Pacchi Fatti",
+ "memAddr": "41100",
+ "tipoMem": "IntLH",
+ "index": 41100,
+ "size": 2,
+ "unit": "#",
+ "func": "POINT",
+ "period": 90,
+ "factor": 1
+ },
+ "EpochStart": {
+ "name": "EpochStart",
+ "description": "DateTime inizio lavorazione formato EPOCH",
+ "memAddr": "41102",
+ "tipoMem": "IntLH",
+ "index": 41102,
+ "size": 2,
+ "unit": "EPOCH",
+ "func": "POINT",
+ "period": 90,
+ "factor": 1
+ },
+ "EpochStop": {
+ "name": "EpochStop",
+ "description": "DateTime fine lavorazione formato EPOCH",
+ "memAddr": "41104",
+ "tipoMem": "IntLH",
+ "index": 41104,
+ "size": 2,
+ "unit": "EPOCH",
+ "func": "POINT",
+ "period": 90,
+ "factor": 1
+ },
+ "PPM": {
+ "name": "PPM",
+ "description": "Velocita espressa come Pacchi Per Minuto",
+ "memAddr": "41106",
+ "tipoMem": "RealLH",
+ "index": 41106,
+ "size": 2,
+ "unit": "#",
+ "func": "POINT",
+ "period": 90,
+ "factor": 1
+ }
+ }
+}
\ No newline at end of file
diff --git a/IOB-WIN-MBUS/DATA/CONF/FINASSI_HELPI_01_MBlock.json b/IOB-WIN-MBUS/DATA/CONF/FINASSI_HELPI_01_MBlock.json
new file mode 100644
index 00000000..d59592df
--- /dev/null
+++ b/IOB-WIN-MBUS/DATA/CONF/FINASSI_HELPI_01_MBlock.json
@@ -0,0 +1,5 @@
+{
+ "ReadBlocks": {
+ "41050": 60
+ }
+}
\ No newline at end of file
diff --git a/IOB-WIN-MBUS/DATA/CONF/FINASSI_HELPI_01_alarm.json b/IOB-WIN-MBUS/DATA/CONF/FINASSI_HELPI_01_alarm.json
new file mode 100644
index 00000000..dee831f3
--- /dev/null
+++ b/IOB-WIN-MBUS/DATA/CONF/FINASSI_HELPI_01_alarm.json
@@ -0,0 +1,84 @@
+[
+ {
+ "description": "Allarmi Impianto 01",
+ "tipoMem": "DInt",
+ "memAddr": "41094",
+ "index": 1094,
+ "size": 4,
+ "messages": [
+ "AUSILIARI NON INSERITI",
+ "TERMICA SBOBINATORI",
+ "TERMICA VENTILATORE",
+ "TERMICA RESISTENZE TUNNEL",
+ "PULSANTE EMERGENZA PREMUTO",
+ "ANOMALIA PRESSIONE ARIA",
+ "SPORTELLO LATERALE SX APERTO",
+ "SPORTELLO LATERALE DX APERTO",
+ "SPORTELLO CARICO APERTO",
+ "##",
+ "EMERGENZA FINECORSA GUIDA INGRESSO",
+ "ANOMALIA BARRA SALDATURA",
+ "##TIMEOUT PROXIMITY SBOBINATORE INFERIORE",
+ "##TIMEOUT PROXIMITY SBOBINATORE SUPERIORE",
+ "ROTTURA FILM",
+ "ANOMALIA SONDA PT100 TUNNEL",
+ "ANOMALIA SONDA PT100 SALDATURA",
+ "ANOMALIA INVERTER BARRA SALDATURA",
+ "ANOMALIA INVERTER TAPPETO TUNNEL",
+ "ANOMALIA INVERTER NASTRO DI CARICO",
+ "ANOMALIA INVERTER PALA CARICO",
+ "SALDATURA NON INSERITA",
+ "TEMPERATURA TUNNEL FUORI RANGE",
+ "TEMPERATURA SALDATURA FUORI RANGE",
+ "LINEA INGRESSO INTASATA",
+ "MACCHINA A MONTE IN EMERGENZA",
+ "MACCHINA A VALLE FERMA",
+ "PRODOTTO IN USCITA PIENO",
+ "BYPASS SPORTELLI INSERITO",
+ "BARRA SALDANTE NON IN POSIZIONE, EFFETTUARE SALDATURA MANUALE",
+ "GESTIONALE: MACCHINA IN CICLO",
+ "GESTIONALE: RICETTA NON TROVATA"
+ ]
+ },
+ {
+ "description": "Allarmi Impianto 02",
+ "tipoMem": "DInt",
+ "memAddr": "41096",
+ "index": 1096,
+ "size": 4,
+ "messages": [
+ "PROBLEMA FC BYPASS EMERGENZA BARRA",
+ "PROBLEMA FC EMERGENZA BARRA",
+ "##",
+ "##",
+ "##",
+ "##",
+ "##",
+ "##",
+ "##",
+ "##",
+ "##",
+ "##",
+ "##",
+ "##",
+ "##",
+ "##",
+ "##",
+ "##",
+ "##",
+ "##",
+ "##",
+ "##",
+ "##",
+ "##",
+ "##",
+ "##",
+ "##",
+ "##",
+ "##",
+ "##",
+ "##",
+ "##"
+ ]
+ }
+]
\ No newline at end of file
diff --git a/IOB-WIN-MBUS/DATA/CONF/FTP-PING.ini b/IOB-WIN-MBUS/DATA/CONF/FTP-PING.ini
deleted file mode 100644
index efe46cca..00000000
--- a/IOB-WIN-MBUS/DATA/CONF/FTP-PING.ini
+++ /dev/null
@@ -1,59 +0,0 @@
-;Configurazione IOB-WIN
-[IOB]
-;Macchina TEST PING
-CNCTYPE=PingWatchdog
-PING_MS_TIMEOUT=500
-IOB_NAME=FTP_SONATEST
-
-[MACHINE]
-VENDOR=STEAMWARE
-MODEL=WATCHDOG
-
-[CNC]
-IP=10.74.82.204
-PORT=0000
-PING_IP=10.74.82.204
-GETPRGNAME=false
-
-[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 = 30
-MAX_COUNTER_BLINK = 30
-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
-
-; Tags manuali
-[TAGS]
-Customer=SteamWare
-HostOS=WIN
-HostName=IOB-WIN-SIMULA
-HostAddr=10.74.82.76
\ No newline at end of file
diff --git a/IOB-WIN-MBUS/DATA/CONF/GIACO_CEDAX_001.ini b/IOB-WIN-MBUS/DATA/CONF/GIACO_CEDAX_001.ini
new file mode 100644
index 00000000..3962ad5c
--- /dev/null
+++ b/IOB-WIN-MBUS/DATA/CONF/GIACO_CEDAX_001.ini
@@ -0,0 +1,85 @@
+;Configurazione IOB-WIN
+[IOB]
+;Impianto Cedax di Turi (test) - Giacovelli
+CNCTYPE=MODBUS_TCP_CEDAX
+PING_MS_TIMEOUT=1000
+MinDeltaSec=5
+
+[MACHINE]
+VENDOR=CEDAX
+MODEL=CEDAX Hydrocooler
+
+[CNC]
+IP=192.168.2.60
+PORT=502
+
+[SERVER]
+MPIP=http://192.168.1.14
+MPURL=/MP/IO
+CMDBASE=/IOB/input/
+CMDFLOG=/IOB/flog/
+CMDALIVE=/IOB
+CMDENABLED=/IOB/enabled/
+CMDADV1=?valore=
+CMDREBO=/sendReboot.aspx?idxMacchina=
+
+[MEMORY]
+ADDR_READ=41001
+ADDR_WRITE=41021
+SIZE_READ=20
+SIZE_WRITE=0
+HR_BASE_ADDR=40000
+
+
+[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
+PZCOUNT_MODE=STD.DB85.DBRE16
+DISABLE_PZCOUNT=TRUE
+ENABLE_SEND_PZC_BLOCK=TRUE
+MIN_SEND_PZC_BLOCK=0
+MAX_SEND_PZC_BLOCK=100
+; GEST DATI DYN
+ENABLE_DYN_DATA=TRUE
+FORCE_DYN_DATA=TRUE
+; gestione delta minimo accettabile tra min/MAX
+DELTA_VAL=0.1
+DISABLE_SEND_WDST=TRUE
+
+; clock base (da 10ms)
+timerIntMs=10
+
+; conf parametri memoria READ/WRITE
+PARAM_CONF=GIACO_CEDAX_001.json
+
+NO_PING=FALSE
+; conf blocchi memoria x READ
+MEM_BLOCK=GIACO_CEDAX_001_MBlock.json
+; conf aree allarme
+ALARM_CONF=GIACO_CEDAX_001_alarm.json
+
+; rimozione check limiti min/max dynData
+disDynDataRangeCheck=true
+
+[BRANCH]
+NAME=master
+
+; Tags manuali
+[TAGS]
+Customer=Giacovelli-Turi
+HostOS=WIN
+HostName=IOB-WIN-01
+HostAddr=192.168.137.11
diff --git a/IOB-WIN-MBUS/DATA/CONF/GIACO_CEDAX_001.json b/IOB-WIN-MBUS/DATA/CONF/GIACO_CEDAX_001.json
new file mode 100644
index 00000000..2e823f33
--- /dev/null
+++ b/IOB-WIN-MBUS/DATA/CONF/GIACO_CEDAX_001.json
@@ -0,0 +1,263 @@
+{
+ "mMapWrite": {
+ "Dose_Staz_1": {
+ "name": "Dose_Staz_1",
+ "description": "Dose Stazione 1",
+ "memAddr": "40024",
+ "tipoMem": "Int",
+ "index": 24,
+ "size": 1,
+ "func": "MEDIAN",
+ "period": 90,
+ "factor": 0.01,
+ "minVal": 0,
+ "maxVal": 999999999,
+ "unit": "%"
+ },
+ "Dose_Staz_2": {
+ "name": "Dose_Staz_2",
+ "description": "Dose Stazione 2",
+ "memAddr": "40025",
+ "tipoMem": "Int",
+ "index": 25,
+ "size": 1,
+ "func": "MEDIAN",
+ "period": 90,
+ "factor": 0.01,
+ "minVal": 0,
+ "maxVal": 999999999,
+ "unit": "%"
+ },
+ "Dose_Staz_3": {
+ "name": "Dose_Staz_3",
+ "description": "Dose Stazione 3",
+ "memAddr": "40026",
+ "tipoMem": "Int",
+ "index": 26,
+ "size": 1,
+ "func": "MEDIAN",
+ "period": 90,
+ "factor": 0.01,
+ "minVal": 0,
+ "maxVal": 999999999,
+ "unit": "%"
+ },
+ "Dose_Staz_4": {
+ "name": "Dose_Staz_4",
+ "description": "Dose Stazione 4",
+ "memAddr": "40027",
+ "tipoMem": "Int",
+ "index": 27,
+ "size": 1,
+ "func": "MEDIAN",
+ "period": 90,
+ "factor": 0.01,
+ "minVal": 0,
+ "maxVal": 999999999,
+ "unit": "%"
+ }
+ },
+ "mMapRead": {
+ "Stag_H2O": {
+ "name": "Stag_H2O",
+ "description": "Totale H2O Stagione",
+ "memAddr": "41001",
+ "tipoMem": "HLPInt",
+ "index": 1001,
+ "size": 2,
+ "func": "MEDIAN",
+ "period": 90,
+ "factor": 1,
+ "minVal": 0,
+ "maxVal": 999999999,
+ "unit": "l"
+ },
+ "Stag_Prod1": {
+ "name": "Stag_Prod1",
+ "description": "Totale Prodotto 1 Stagione",
+ "memAddr": "41003",
+ "tipoMem": "HLPInt",
+ "index": 1003,
+ "size": 2,
+ "func": "MEDIAN",
+ "period": 90,
+ "factor": 1,
+ "minVal": 0,
+ "maxVal": 999999999,
+ "unit": "l"
+ },
+ "Stag_Prod2": {
+ "name": "Stag_Prod2",
+ "description": "Totale Prodotto 2 Stagione",
+ "memAddr": "41005",
+ "tipoMem": "HLPInt",
+ "index": 1005,
+ "size": 2,
+ "func": "MEDIAN",
+ "period": 90,
+ "factor": 1,
+ "minVal": 0,
+ "maxVal": 999999999,
+ "unit": "l"
+ },
+ "Stag_Prod3": {
+ "name": "Stag_Prod3",
+ "description": "Totale Prodotto 3 Stagione",
+ "memAddr": "41007",
+ "tipoMem": "HLPInt",
+ "index": 1007,
+ "size": 2,
+ "func": "MEDIAN",
+ "period": 90,
+ "factor": 0.01,
+ "minVal": 0,
+ "maxVal": 999999999,
+ "unit": "l"
+ },
+ "Stag_Prod4": {
+ "name": "Stag_Prod4",
+ "description": "Totale Prodotto 4 Stagione",
+ "memAddr": "41009",
+ "tipoMem": "HLPInt",
+ "index": 1009,
+ "size": 2,
+ "func": "MEDIAN",
+ "period": 90,
+ "factor": 0.01,
+ "minVal": 0,
+ "maxVal": 999999999,
+ "unit": "l"
+ },
+ "Giorno_H2O": {
+ "name": "Giorno_H2O",
+ "description": "Totale H2O Giorno",
+ "memAddr": "41011",
+ "tipoMem": "HLPInt",
+ "index": 1011,
+ "size": 2,
+ "func": "MEDIAN",
+ "period": 90,
+ "factor": 1,
+ "minVal": 0,
+ "maxVal": 999999999,
+ "unit": "l"
+ },
+ "Giorno_Prod1": {
+ "name": "Giorno_Prod1",
+ "description": "Totale Prodotto 1 Giorno",
+ "memAddr": "41013",
+ "tipoMem": "HLPInt",
+ "index": 1013,
+ "size": 2,
+ "func": "MEDIAN",
+ "period": 90,
+ "factor": 1,
+ "minVal": 0,
+ "maxVal": 999999999,
+ "unit": "l"
+ },
+ "Giorno_Prod2": {
+ "name": "Giorno_Prod2",
+ "description": "Totale Prodotto 2 Giorno",
+ "memAddr": "41015",
+ "tipoMem": "HLPInt",
+ "index": 1015,
+ "size": 2,
+ "func": "MEDIAN",
+ "period": 90,
+ "factor": 1,
+ "minVal": 0,
+ "maxVal": 999999999,
+ "unit": "l"
+ },
+ "Giorno_Prod3": {
+ "name": "Giorno_Prod3",
+ "description": "Totale Prodotto 3 Giorno",
+ "memAddr": "41017",
+ "tipoMem": "HLPInt",
+ "index": 1017,
+ "size": 2,
+ "func": "MEDIAN",
+ "period": 90,
+ "factor": 0.01,
+ "minVal": 0,
+ "maxVal": 999999999,
+ "unit": "l"
+ },
+ "Giorno_Prod4": {
+ "name": "Giorno_Prod4",
+ "description": "Totale Prodotto 4 Giorno",
+ "memAddr": "41019",
+ "tipoMem": "HLPInt",
+ "index": 1019,
+ "size": 2,
+ "func": "MEDIAN",
+ "period": 90,
+ "factor": 0.01,
+ "minVal": 0,
+ "maxVal": 999999999,
+ "unit": "l"
+ },
+ "Dose_Staz_1": {
+ "name": "Dose_Staz_1",
+ "description": "Dose Stazione 1",
+ "memAddr": "40024",
+ "tipoMem": "Int",
+ "index": 24,
+ "size": 1,
+ "func": "MEDIAN",
+ "period": 90,
+ "factor": 0.01,
+ "minVal": 0,
+ "maxVal": 999999999,
+ "unit": "%"
+ },
+ "Dose_Staz_2": {
+ "name": "Dose_Staz_2",
+ "description": "Dose Stazione 2",
+ "memAddr": "40025",
+ "tipoMem": "Int",
+ "index": 25,
+ "size": 1,
+ "func": "MEDIAN",
+ "period": 90,
+ "factor": 0.01,
+ "minVal": 0,
+ "maxVal": 999999999,
+ "unit": "%"
+ },
+ "Dose_Staz_3": {
+ "name": "Dose_Staz_3",
+ "description": "Dose Stazione 3",
+ "memAddr": "40026",
+ "tipoMem": "Int",
+ "index": 26,
+ "size": 1,
+ "func": "MEDIAN",
+ "period": 90,
+ "factor": 0.01,
+ "minVal": 0,
+ "maxVal": 999999999,
+ "unit": "%"
+ },
+ "Dose_Staz_4": {
+ "name": "Dose_Staz_4",
+ "description": "Dose Stazione 4",
+ "memAddr": "40027",
+ "tipoMem": "Int",
+ "index": 27,
+ "size": 1,
+ "func": "MEDIAN",
+ "period": 90,
+ "factor": 0.01,
+ "minVal": 0,
+ "maxVal": 999999999,
+ "unit": "%"
+ }
+ },
+ "optKVP": {
+ "fluxLogReduce": true,
+ "fluxLogRedDeadBand": 1.0,
+ "fluxLogResendPeriod": 60
+ }
+}
\ No newline at end of file
diff --git a/IOB-WIN-MBUS/DATA/CONF/GIACO_CEDAX_001_MBlock.json b/IOB-WIN-MBUS/DATA/CONF/GIACO_CEDAX_001_MBlock.json
new file mode 100644
index 00000000..6ce9d4fd
--- /dev/null
+++ b/IOB-WIN-MBUS/DATA/CONF/GIACO_CEDAX_001_MBlock.json
@@ -0,0 +1,6 @@
+{
+ "ReadBlocks": {
+ "40016": 16,
+ "40999": 32
+ }
+}
\ No newline at end of file
diff --git a/IOB-WIN-MBUS/DATA/CONF/GIACO_CEDAX_001_alarm.json b/IOB-WIN-MBUS/DATA/CONF/GIACO_CEDAX_001_alarm.json
new file mode 100644
index 00000000..c684acec
--- /dev/null
+++ b/IOB-WIN-MBUS/DATA/CONF/GIACO_CEDAX_001_alarm.json
@@ -0,0 +1,27 @@
+[
+ {
+ "description": "Allarmi Impianto",
+ "tipoMem": "DInt",
+ "memAddr": "40999",
+ "index": 999,
+ "size": 2,
+ "messages": [
+ "##On Pompa 1",
+ "Allarme Pompa 1",
+ "##On Pompa 2",
+ "Allarme Pompa 2",
+ "##On Pompa 3",
+ "Allarme Pompa 3",
+ "##On Pompa 4",
+ "Allarme Pompa 4",
+ "##",
+ "##",
+ "##",
+ "##",
+ "##",
+ "##",
+ "##",
+ "##"
+ ]
+ }
+]
\ No newline at end of file
diff --git a/IOB-WIN-MBUS/DATA/CONF/GIACO_CEDAX_002.ini b/IOB-WIN-MBUS/DATA/CONF/GIACO_CEDAX_002.ini
new file mode 100644
index 00000000..1e773469
--- /dev/null
+++ b/IOB-WIN-MBUS/DATA/CONF/GIACO_CEDAX_002.ini
@@ -0,0 +1,85 @@
+;Configurazione IOB-WIN
+[IOB]
+;Impianto Cedax di Turi (test) - Giacovelli
+CNCTYPE=MODBUS_TCP_CEDAX
+PING_MS_TIMEOUT=1000
+MinDeltaSec=5
+
+[MACHINE]
+VENDOR=CEDAX
+MODEL=CEDAX Scarico
+
+[CNC]
+IP=192.168.2.61
+PORT=502
+
+[SERVER]
+MPIP=http://192.168.1.14
+MPURL=/MP/IO
+CMDBASE=/IOB/input/
+CMDFLOG=/IOB/flog/
+CMDALIVE=/IOB
+CMDENABLED=/IOB/enabled/
+CMDADV1=?valore=
+CMDREBO=/sendReboot.aspx?idxMacchina=
+
+[MEMORY]
+ADDR_READ=41001
+ADDR_WRITE=41021
+SIZE_READ=20
+SIZE_WRITE=0
+HR_BASE_ADDR=40000
+
+
+[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
+PZCOUNT_MODE=STD.DB85.DBRE16
+DISABLE_PZCOUNT=TRUE
+ENABLE_SEND_PZC_BLOCK=TRUE
+MIN_SEND_PZC_BLOCK=0
+MAX_SEND_PZC_BLOCK=100
+; GEST DATI DYN
+ENABLE_DYN_DATA=TRUE
+FORCE_DYN_DATA=TRUE
+; gestione delta minimo accettabile tra min/MAX
+DELTA_VAL=0.1
+DISABLE_SEND_WDST=TRUE
+
+; clock base (da 10ms)
+timerIntMs=10
+
+; conf parametri memoria READ/WRITE
+PARAM_CONF=GIACO_CEDAX_002.json
+
+NO_PING=TRUE
+; conf blocchi memoria x READ
+MEM_BLOCK=GIACO_CEDAX_002_MBlock.json
+; conf aree allarme
+ALARM_CONF=GIACO_CEDAX_002_alarm.json
+
+; rimozione check limiti min/max dynData
+disDynDataRangeCheck=true
+
+[BRANCH]
+NAME=master
+
+; Tags manuali
+[TAGS]
+Customer=Giacovelli-Turi
+HostOS=WIN
+HostName=IOB-WIN-01
+HostAddr=192.168.137.11
diff --git a/IOB-WIN-MBUS/DATA/CONF/GIACO_CEDAX_002.json b/IOB-WIN-MBUS/DATA/CONF/GIACO_CEDAX_002.json
new file mode 100644
index 00000000..c5cad0b4
--- /dev/null
+++ b/IOB-WIN-MBUS/DATA/CONF/GIACO_CEDAX_002.json
@@ -0,0 +1,291 @@
+{
+ "mMapWrite": {
+ "Dose_Staz_1": {
+ "name": "Dose_Staz_1",
+ "description": "Dose Stazione 1",
+ "memAddr": "40024",
+ "tipoMem": "Int",
+ "index": 24,
+ "size": 1,
+ "func": "MEDIAN",
+ "period": 90,
+ "factor": 0.01,
+ "minVal": 0,
+ "maxVal": 999999999,
+ "unit": "%"
+ },
+ "Dose_Staz_2": {
+ "name": "Dose_Staz_2",
+ "description": "Dose Stazione 2",
+ "memAddr": "40025",
+ "tipoMem": "Int",
+ "index": 25,
+ "size": 1,
+ "func": "MEDIAN",
+ "period": 90,
+ "factor": 0.01,
+ "minVal": 0,
+ "maxVal": 999999999,
+ "unit": "%"
+ },
+ "Dose_Staz_3": {
+ "name": "Dose_Staz_3",
+ "description": "Dose Stazione 3",
+ "memAddr": "40026",
+ "tipoMem": "Int",
+ "index": 26,
+ "size": 1,
+ "func": "MEDIAN",
+ "period": 90,
+ "factor": 0.01,
+ "minVal": 0,
+ "maxVal": 999999999,
+ "unit": "%"
+ },
+ "Dose_Staz_4": {
+ "name": "Dose_Staz_4",
+ "description": "Dose Stazione 4",
+ "memAddr": "40027",
+ "tipoMem": "Int",
+ "index": 27,
+ "size": 1,
+ "func": "MEDIAN",
+ "period": 90,
+ "factor": 0.01,
+ "minVal": 0,
+ "maxVal": 999999999,
+ "unit": "%"
+ }
+ },
+ "mMapRead": {
+ "A_Stag_H2O": {
+ "name": "A_Stag_H2O",
+ "description": "Linea A Totale H2O Stagione",
+ "memAddr": "41001",
+ "tipoMem": "HLPInt",
+ "index": 1001,
+ "size": 2,
+ "func": "MEDIAN",
+ "period": 90,
+ "factor": 1,
+ "minVal": 0,
+ "maxVal": 999999999,
+ "unit": "l"
+ },
+ "A_Stag_Prod1": {
+ "name": "A_Stag_Prod1",
+ "description": "Linea A Totale Prodotto 1 Stagione",
+ "memAddr": "40003",
+ "tipoMem": "HLPInt",
+ "index": 1003,
+ "size": 2,
+ "func": "MEDIAN",
+ "period": 90,
+ "factor": 0.01,
+ "minVal": 0,
+ "maxVal": 999999999,
+ "unit": "l"
+ },
+ "A_Stag_Prod2": {
+ "name": "A_Stag_Prod2",
+ "description": "Linea A Totale Prodotto 2 Stagione",
+ "memAddr": "40005",
+ "tipoMem": "HLPInt",
+ "index": 1005,
+ "size": 2,
+ "func": "MEDIAN",
+ "period": 90,
+ "factor": 0.01,
+ "minVal": 0,
+ "maxVal": 999999999,
+ "unit": "l"
+ },
+ "A_Giorno_H2O": {
+ "name": "A_Giorno_H2O",
+ "description": "Linea A Totale H2O Giorno",
+ "memAddr": "41007",
+ "tipoMem": "HLPInt",
+ "index": 1007,
+ "size": 2,
+ "func": "MEDIAN",
+ "period": 90,
+ "factor": 1,
+ "minVal": 0,
+ "maxVal": 999999999,
+ "unit": "l"
+ },
+ "A_Giorno_Prod1": {
+ "name": "A_Giorno_Prod1",
+ "description": "Linea A Totale Prodotto 1 Giorno",
+ "memAddr": "40009",
+ "tipoMem": "HLPInt",
+ "index": 1009,
+ "size": 2,
+ "func": "MEDIAN",
+ "period": 90,
+ "factor": 0.01,
+ "minVal": 0,
+ "maxVal": 999999999,
+ "unit": "l"
+ },
+ "A_Giorno_Prod2": {
+ "name": "A_Giorno_Prod2",
+ "description": "Linea A Totale Prodotto 2 Giorno",
+ "memAddr": "40011",
+ "tipoMem": "HLPInt",
+ "index": 1011,
+ "size": 2,
+ "func": "MEDIAN",
+ "period": 90,
+ "factor": 0.01,
+ "minVal": 0,
+ "maxVal": 999999999,
+ "unit": "l"
+ },
+ "B_Stag_H2O": {
+ "name": "B_Stag_H2O",
+ "description": "Linea B Totale H2O Stagione",
+ "memAddr": "41013",
+ "tipoMem": "HLPInt",
+ "index": 1013,
+ "size": 2,
+ "func": "MEDIAN",
+ "period": 90,
+ "factor": 1,
+ "minVal": 0,
+ "maxVal": 999999999,
+ "unit": "l"
+ },
+ "B_Stag_Prod1": {
+ "name": "B_Stag_Prod1",
+ "description": "Linea B Totale Prodotto 1 Stagione",
+ "memAddr": "40015",
+ "tipoMem": "HLPInt",
+ "index": 1015,
+ "size": 2,
+ "func": "MEDIAN",
+ "period": 90,
+ "factor": 0.01,
+ "minVal": 0,
+ "maxVal": 999999999,
+ "unit": "l"
+ },
+ "B_Stag_Prod2": {
+ "name": "B_Stag_Prod2",
+ "description": "Linea B Totale Prodotto 2 Stagione",
+ "memAddr": "40017",
+ "tipoMem": "HLPInt",
+ "index": 1009,
+ "size": 2,
+ "func": "MEDIAN",
+ "period": 90,
+ "factor": 0.01,
+ "minVal": 0,
+ "maxVal": 999999999,
+ "unit": "l"
+ },
+ "B_Giorno_H2O": {
+ "name": "B_Giorno_H2O",
+ "description": "Linea B Totale H2O Giorno",
+ "memAddr": "41019",
+ "tipoMem": "HLPInt",
+ "index": 1019,
+ "size": 2,
+ "func": "MEDIAN",
+ "period": 90,
+ "factor": 1,
+ "minVal": 0,
+ "maxVal": 999999999,
+ "unit": "l"
+ },
+ "B_Giorno_Prod1": {
+ "name": "B_Giorno_Prod1",
+ "description": "Linea B Totale Prodotto 1 Giorno",
+ "memAddr": "40021",
+ "tipoMem": "HLPInt",
+ "index": 1021,
+ "size": 2,
+ "func": "MEDIAN",
+ "period": 90,
+ "factor": 0.01,
+ "minVal": 0,
+ "maxVal": 999999999,
+ "unit": "l"
+ },
+ "B_Giorno_Prod2": {
+ "name": "B_Giorno_Prod2",
+ "description": "Linea B Totale Prodotto 2 Giorno",
+ "memAddr": "40023",
+ "tipoMem": "HLPInt",
+ "index": 1023,
+ "size": 2,
+ "func": "MEDIAN",
+ "period": 90,
+ "factor": 0.01,
+ "minVal": 0,
+ "maxVal": 999999999,
+ "unit": "l"
+ },
+ "Dose_Staz_1": {
+ "name": "Dose_Staz_1",
+ "description": "Dose Stazione 1",
+ "memAddr": "40024",
+ "tipoMem": "Int",
+ "index": 24,
+ "size": 1,
+ "func": "MEDIAN",
+ "period": 90,
+ "factor": 0.01,
+ "minVal": 0,
+ "maxVal": 999999999,
+ "unit": "%"
+ },
+ "Dose_Staz_2": {
+ "name": "Dose_Staz_2",
+ "description": "Dose Stazione 2",
+ "memAddr": "40025",
+ "tipoMem": "Int",
+ "index": 25,
+ "size": 1,
+ "func": "MEDIAN",
+ "period": 90,
+ "factor": 0.01,
+ "minVal": 0,
+ "maxVal": 999999999,
+ "unit": "%"
+ },
+ "Dose_Staz_3": {
+ "name": "Dose_Staz_3",
+ "description": "Dose Stazione 3",
+ "memAddr": "40026",
+ "tipoMem": "Int",
+ "index": 26,
+ "size": 1,
+ "func": "MEDIAN",
+ "period": 90,
+ "factor": 0.01,
+ "minVal": 0,
+ "maxVal": 999999999,
+ "unit": "%"
+ },
+ "Dose_Staz_4": {
+ "name": "Dose_Staz_4",
+ "description": "Dose Stazione 4",
+ "memAddr": "40027",
+ "tipoMem": "Int",
+ "index": 27,
+ "size": 1,
+ "func": "MEDIAN",
+ "period": 90,
+ "factor": 0.01,
+ "minVal": 0,
+ "maxVal": 999999999,
+ "unit": "%"
+ }
+ },
+ "optKVP": {
+ "fluxLogReduce": true,
+ "fluxLogRedDeadBand": 1.0,
+ "fluxLogResendPeriod": 60
+ }
+}
\ No newline at end of file
diff --git a/IOB-WIN-MBUS/DATA/CONF/GIACO_CEDAX_002_MBlock.json b/IOB-WIN-MBUS/DATA/CONF/GIACO_CEDAX_002_MBlock.json
new file mode 100644
index 00000000..6ce9d4fd
--- /dev/null
+++ b/IOB-WIN-MBUS/DATA/CONF/GIACO_CEDAX_002_MBlock.json
@@ -0,0 +1,6 @@
+{
+ "ReadBlocks": {
+ "40016": 16,
+ "40999": 32
+ }
+}
\ No newline at end of file
diff --git a/IOB-WIN-MBUS/DATA/CONF/GIACO_CEDAX_002_alarm.json b/IOB-WIN-MBUS/DATA/CONF/GIACO_CEDAX_002_alarm.json
new file mode 100644
index 00000000..c684acec
--- /dev/null
+++ b/IOB-WIN-MBUS/DATA/CONF/GIACO_CEDAX_002_alarm.json
@@ -0,0 +1,27 @@
+[
+ {
+ "description": "Allarmi Impianto",
+ "tipoMem": "DInt",
+ "memAddr": "40999",
+ "index": 999,
+ "size": 2,
+ "messages": [
+ "##On Pompa 1",
+ "Allarme Pompa 1",
+ "##On Pompa 2",
+ "Allarme Pompa 2",
+ "##On Pompa 3",
+ "Allarme Pompa 3",
+ "##On Pompa 4",
+ "Allarme Pompa 4",
+ "##",
+ "##",
+ "##",
+ "##",
+ "##",
+ "##",
+ "##",
+ "##"
+ ]
+ }
+]
\ No newline at end of file
diff --git a/IOB-WIN-MBUS/DATA/CONF/GIACO_CEDAX_003.ini b/IOB-WIN-MBUS/DATA/CONF/GIACO_CEDAX_003.ini
new file mode 100644
index 00000000..aecf1286
--- /dev/null
+++ b/IOB-WIN-MBUS/DATA/CONF/GIACO_CEDAX_003.ini
@@ -0,0 +1,85 @@
+;Configurazione IOB-WIN
+[IOB]
+;Impianto Cedax di Turi (test) - Giacovelli
+CNCTYPE=MODBUS_TCP_CEDAX
+PING_MS_TIMEOUT=1000
+MinDeltaSec=5
+
+[MACHINE]
+VENDOR=CEDAX
+MODEL=CEDAX Lavorazione
+
+[CNC]
+IP=192.168.2.62
+PORT=502
+
+[SERVER]
+MPIP=http://192.168.1.14
+MPURL=/MP/IO
+CMDBASE=/IOB/input/
+CMDFLOG=/IOB/flog/
+CMDALIVE=/IOB
+CMDENABLED=/IOB/enabled/
+CMDADV1=?valore=
+CMDREBO=/sendReboot.aspx?idxMacchina=
+
+[MEMORY]
+ADDR_READ=41001
+ADDR_WRITE=41021
+SIZE_READ=20
+SIZE_WRITE=0
+HR_BASE_ADDR=40000
+
+
+[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
+PZCOUNT_MODE=STD.DB85.DBRE16
+DISABLE_PZCOUNT=TRUE
+ENABLE_SEND_PZC_BLOCK=TRUE
+MIN_SEND_PZC_BLOCK=0
+MAX_SEND_PZC_BLOCK=100
+; GEST DATI DYN
+ENABLE_DYN_DATA=TRUE
+FORCE_DYN_DATA=TRUE
+; gestione delta minimo accettabile tra min/MAX
+DELTA_VAL=0.1
+DISABLE_SEND_WDST=TRUE
+
+; clock base (da 10ms)
+timerIntMs=10
+
+; conf parametri memoria READ/WRITE
+PARAM_CONF=GIACO_CEDAX_003.json
+
+NO_PING=TRUE
+; conf blocchi memoria x READ
+MEM_BLOCK=GIACO_CEDAX_003_MBlock.json
+; conf aree allarme
+ALARM_CONF=GIACO_CEDAX_003_alarm.json
+
+; rimozione check limiti min/max dynData
+disDynDataRangeCheck=true
+
+[BRANCH]
+NAME=master
+
+; Tags manuali
+[TAGS]
+Customer=Giacovelli-Turi
+HostOS=WIN
+HostName=IOB-WIN-01
+HostAddr=192.168.137.11
diff --git a/IOB-WIN-MBUS/DATA/CONF/GIACO_CEDAX_003.json b/IOB-WIN-MBUS/DATA/CONF/GIACO_CEDAX_003.json
new file mode 100644
index 00000000..4dc5983f
--- /dev/null
+++ b/IOB-WIN-MBUS/DATA/CONF/GIACO_CEDAX_003.json
@@ -0,0 +1,207 @@
+{
+ "mMapWrite": {
+ "Dose_Staz_1": {
+ "name": "Dose_Staz_1",
+ "description": "Dose Stazione 1",
+ "memAddr": "40024",
+ "tipoMem": "Int",
+ "index": 24,
+ "size": 1,
+ "func": "MEDIAN",
+ "period": 90,
+ "factor": 0.01,
+ "minVal": 0,
+ "maxVal": 999999999,
+ "unit": "%"
+ },
+ "Dose_Staz_2": {
+ "name": "Dose_Staz_2",
+ "description": "Dose Stazione 2",
+ "memAddr": "40025",
+ "tipoMem": "Int",
+ "index": 25,
+ "size": 1,
+ "func": "MEDIAN",
+ "period": 90,
+ "factor": 0.01,
+ "minVal": 0,
+ "maxVal": 999999999,
+ "unit": "%"
+ },
+ "Dose_Staz_3": {
+ "name": "Dose_Staz_3",
+ "description": "Dose Stazione 3",
+ "memAddr": "40026",
+ "tipoMem": "Int",
+ "index": 26,
+ "size": 1,
+ "func": "MEDIAN",
+ "period": 90,
+ "factor": 0.01,
+ "minVal": 0,
+ "maxVal": 999999999,
+ "unit": "%"
+ }
+ },
+ "mMapRead": {
+ "Stag_H2O": {
+ "name": "Stag_H2O",
+ "description": "Totale H2O Stagione",
+ "memAddr": "41001",
+ "tipoMem": "HLPInt",
+ "index": 1001,
+ "size": 2,
+ "func": "MEDIAN",
+ "period": 90,
+ "factor": 1,
+ "minVal": 0,
+ "maxVal": 999999999,
+ "unit": "l"
+ },
+ "Stag_Prod1": {
+ "name": "Stag_Prod1",
+ "description": "Totale Prodotto 1 Stagione",
+ "memAddr": "40003",
+ "tipoMem": "HLPInt",
+ "index": 1003,
+ "size": 2,
+ "func": "MEDIAN",
+ "period": 90,
+ "factor": 1,
+ "minVal": 0,
+ "maxVal": 999999999,
+ "unit": "l"
+ },
+ "Stag_Prod2": {
+ "name": "Stag_Prod2",
+ "description": "Totale Prodotto 2 Stagione",
+ "memAddr": "40005",
+ "tipoMem": "HLPInt",
+ "index": 1005,
+ "size": 2,
+ "func": "MEDIAN",
+ "period": 90,
+ "factor": 1,
+ "minVal": 0,
+ "maxVal": 999999999,
+ "unit": "l"
+ },
+ "Stag_Prod3": {
+ "name": "Stag_Prod3",
+ "description": "Totale Prodotto 3 Stagione",
+ "memAddr": "40007",
+ "tipoMem": "HLPInt",
+ "index": 1007,
+ "size": 2,
+ "func": "MEDIAN",
+ "period": 90,
+ "factor": 0.01,
+ "minVal": 0,
+ "maxVal": 999999999,
+ "unit": "l"
+ },
+ "Giorno_H2O": {
+ "name": "Giorno_H2O",
+ "description": "Totale H2O Giorno",
+ "memAddr": "41009",
+ "tipoMem": "HLPInt",
+ "index": 1009,
+ "size": 2,
+ "func": "MEDIAN",
+ "period": 90,
+ "factor": 1,
+ "minVal": 0,
+ "maxVal": 999999999,
+ "unit": "l"
+ },
+ "Giorno_Prod1": {
+ "name": "Giorno_Prod1",
+ "description": "Totale Prodotto 1 Giorno",
+ "memAddr": "40011",
+ "tipoMem": "HLPInt",
+ "index": 1011,
+ "size": 2,
+ "func": "MEDIAN",
+ "period": 90,
+ "factor": 1,
+ "minVal": 0,
+ "maxVal": 999999999,
+ "unit": "l"
+ },
+ "Giorno_Prod2": {
+ "name": "Giorno_Prod2",
+ "description": "Totale Prodotto 2 Giorno",
+ "memAddr": "40013",
+ "tipoMem": "HLPInt",
+ "index": 1013,
+ "size": 2,
+ "func": "MEDIAN",
+ "period": 90,
+ "factor": 1,
+ "minVal": 0,
+ "maxVal": 999999999,
+ "unit": "l"
+ },
+ "Giorno_Prod3": {
+ "name": "Giorno_Prod3",
+ "description": "Totale Prodotto 3 Giorno",
+ "memAddr": "40015",
+ "tipoMem": "HLPInt",
+ "index": 1015,
+ "size": 2,
+ "func": "MEDIAN",
+ "period": 90,
+ "factor": 0.01,
+ "minVal": 0,
+ "maxVal": 999999999,
+ "unit": "l"
+ },
+ "Dose_Staz_1": {
+ "name": "Dose_Staz_1",
+ "description": "Dose Stazione 1",
+ "memAddr": "40024",
+ "tipoMem": "Int",
+ "index": 24,
+ "size": 1,
+ "func": "MEDIAN",
+ "period": 90,
+ "factor": 0.01,
+ "minVal": 0,
+ "maxVal": 999999999,
+ "unit": "%"
+ },
+ "Dose_Staz_2": {
+ "name": "Dose_Staz_2",
+ "description": "Dose Stazione 2",
+ "memAddr": "40025",
+ "tipoMem": "Int",
+ "index": 25,
+ "size": 1,
+ "func": "MEDIAN",
+ "period": 90,
+ "factor": 0.01,
+ "minVal": 0,
+ "maxVal": 999999999,
+ "unit": "%"
+ },
+ "Dose_Staz_3": {
+ "name": "Dose_Staz_3",
+ "description": "Dose Stazione 3",
+ "memAddr": "40026",
+ "tipoMem": "Int",
+ "index": 26,
+ "size": 1,
+ "func": "MEDIAN",
+ "period": 90,
+ "factor": 0.01,
+ "minVal": 0,
+ "maxVal": 999999999,
+ "unit": "%"
+ }
+ },
+ "optKVP": {
+ "fluxLogReduce": true,
+ "fluxLogRedDeadBand": 1.0,
+ "fluxLogResendPeriod": 60
+ }
+}
\ No newline at end of file
diff --git a/IOB-WIN-MBUS/DATA/CONF/GIACO_CEDAX_003_MBlock.json b/IOB-WIN-MBUS/DATA/CONF/GIACO_CEDAX_003_MBlock.json
new file mode 100644
index 00000000..6ce9d4fd
--- /dev/null
+++ b/IOB-WIN-MBUS/DATA/CONF/GIACO_CEDAX_003_MBlock.json
@@ -0,0 +1,6 @@
+{
+ "ReadBlocks": {
+ "40016": 16,
+ "40999": 32
+ }
+}
\ No newline at end of file
diff --git a/IOB-WIN-MBUS/DATA/CONF/GIACO_CEDAX_003_alarm.json b/IOB-WIN-MBUS/DATA/CONF/GIACO_CEDAX_003_alarm.json
new file mode 100644
index 00000000..c684acec
--- /dev/null
+++ b/IOB-WIN-MBUS/DATA/CONF/GIACO_CEDAX_003_alarm.json
@@ -0,0 +1,27 @@
+[
+ {
+ "description": "Allarmi Impianto",
+ "tipoMem": "DInt",
+ "memAddr": "40999",
+ "index": 999,
+ "size": 2,
+ "messages": [
+ "##On Pompa 1",
+ "Allarme Pompa 1",
+ "##On Pompa 2",
+ "Allarme Pompa 2",
+ "##On Pompa 3",
+ "Allarme Pompa 3",
+ "##On Pompa 4",
+ "Allarme Pompa 4",
+ "##",
+ "##",
+ "##",
+ "##",
+ "##",
+ "##",
+ "##",
+ "##"
+ ]
+ }
+]
\ No newline at end of file
diff --git a/IOB-WIN-MBUS/DATA/CONF/GIACO_CENTERFRIGO.ini b/IOB-WIN-MBUS/DATA/CONF/GIACO_CENTERFRIGO.ini
new file mode 100644
index 00000000..4430f388
--- /dev/null
+++ b/IOB-WIN-MBUS/DATA/CONF/GIACO_CENTERFRIGO.ini
@@ -0,0 +1,95 @@
+;Configurazione IOB-WIN
+[IOB]
+;Impianto Cedax di Turi (test) - Giacovelli
+CNCTYPE=MODBUS_TCP_CENTERFRIGO
+PING_MS_TIMEOUT=1000
+MinDeltaSec=5
+
+[MACHINE]
+VENDOR=Centerfrigo
+MODEL=Impianto Turi
+
+[CNC]
+IP=192.168.4.161
+PORT=502
+
+[SERVER]
+MPIP=http://192.168.1.14
+MPURL=/MP/IO
+CMDBASE=/IOB/input/
+CMDFLOG=/IOB/flog/
+CMDALIVE=/IOB
+CMDENABLED=/IOB/enabled/
+CMDADV1=?valore=
+CMDREBO=/sendReboot.aspx?idxMacchina=
+
+[MEMORY]
+ADDR_READ=40001
+ADDR_WRITE=41000
+SIZE_READ=2400
+SIZE_WRITE=0
+HR_BASE_ADDR=40000
+DELTA_BASE=0
+
+[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
+PZCOUNT_MODE=STD.DB85.DBRE16
+DISABLE_PZCOUNT=TRUE
+ENABLE_SEND_PZC_BLOCK=TRUE
+MIN_SEND_PZC_BLOCK=0
+MAX_SEND_PZC_BLOCK=100
+; GEST DATI DYN
+ENABLE_DYN_DATA=TRUE
+FORCE_DYN_DATA=TRUE
+; gestione delta minimo accettabile tra min/MAX
+DELTA_VAL=0.1
+DISABLE_SEND_WDST=TRUE
+
+; clock base (da 10ms)
+timerIntMs=100
+minWait=50
+maxWait=150
+
+AUTO_CHANGE_ODL=TRUE
+CHANGE_ODL_MODE=DAILY
+
+; conf parametri memoria READ/WRITE
+PARAM_CONF=GIACO_CENTERFRIGO.json
+
+NO_PING=FALSE
+; conf blocchi memoria x READ
+MEM_BLOCK=GIACO_CENTERFRIGO_MBlock.json
+; conf aree allarme
+ALARM_CONF=GIACO_CENTERFRIGO_alarm.json
+
+; rimozione check limiti min/max dynData
+disDynDataRangeCheck=true
+
+; conf file import
+FILE_IMPORT_FOLDER=C:\GiacenzeTuri
+FILE_IMPORT_TYPE=*.xlsx
+FILE_ARCHIVE_FOLDER=C:\GiacenzeTuri\archivio
+
+[BRANCH]
+NAME=master
+
+; Tags manuali
+[TAGS]
+Customer=Giacovelli-Turi
+HostOS=WIN
+HostName=IOB-WIN-01
+HostAddr=192.168.137.11
diff --git a/IOB-WIN-MBUS/DATA/CONF/GIACO_CENTERFRIGO.json b/IOB-WIN-MBUS/DATA/CONF/GIACO_CENTERFRIGO.json
new file mode 100644
index 00000000..9665b9db
--- /dev/null
+++ b/IOB-WIN-MBUS/DATA/CONF/GIACO_CENTERFRIGO.json
@@ -0,0 +1,463 @@
+{
+ "mMapWrite": {
+ "SetPoint_Tunnel_Req": {
+ "name": "SetPoint_Tunnel_Req",
+ "description": "Setpoint Tunnel",
+ "memAddr": "44010",
+ "tipoMem": "RealLH",
+ "index": 4010,
+ "size": 2,
+ "factor": 1,
+ "minVal": -5,
+ "maxVal": 15,
+ "unit": "°C"
+ },
+ "SetPoint_Cella_01_Req": {
+ "name": "SetPoint_Cella_01_Req",
+ "description": "Setpoint Cella 01",
+ "memAddr": "44012",
+ "tipoMem": "RealLH",
+ "index": 4012,
+ "size": 2,
+ "factor": 1,
+ "minVal": -5,
+ "maxVal": 15,
+ "unit": "°C"
+ },
+ "SetPoint_Cella_02_Req": {
+ "name": "SetPoint_Cella_02_Req",
+ "description": "Setpoint Cella 02",
+ "memAddr": "44014",
+ "tipoMem": "RealLH",
+ "index": 4014,
+ "size": 2,
+ "factor": 1,
+ "minVal": -5,
+ "maxVal": 15,
+ "unit": "°C"
+ },
+ "SetPoint_Cella_03_Req": {
+ "name": "SetPoint_Cella_03_Req",
+ "description": "Setpoint Cella 03",
+ "memAddr": "44016",
+ "tipoMem": "RealLH",
+ "index": 4016,
+ "size": 2,
+ "factor": 1,
+ "minVal": -5,
+ "maxVal": 15,
+ "unit": "°C"
+ },
+ "SetPoint_Cella_04_Req": {
+ "name": "SetPoint_Cella_04_Req",
+ "description": "Setpoint Cella 04",
+ "memAddr": "44018",
+ "tipoMem": "RealLH",
+ "index": 4018,
+ "size": 2,
+ "factor": 1,
+ "minVal": -5,
+ "maxVal": 15,
+ "unit": "°C"
+ }
+ },
+ "mMapRead": {
+ "Temp_Tunnel": {
+ "name": "Temp_Tunnel",
+ "description": "Temperatura Tunnel",
+ "memAddr": "41520",
+ "tipoMem": "Real",
+ "index": 1520,
+ "size": 2,
+ "func": "MEDIAN",
+ "period": 60,
+ "factor": 1,
+ "minVal": -100,
+ "maxVal": 100,
+ "unit": "°C"
+ },
+ "SetPoint_Tunnel": {
+ "name": "SetPoint_Tunnel",
+ "description": "Setpoint Tunnel",
+ "memAddr": "41560",
+ "tipoMem": "Real",
+ "index": 1560,
+ "size": 2,
+ "func": "MEDIAN",
+ "period": 60,
+ "factor": 1,
+ "minVal": -100,
+ "maxVal": 100,
+ "unit": "°C"
+ },
+ "Temp_Cella_01": {
+ "name": "Temp_Cella_01",
+ "description": "Temperatura Cella 01",
+ "memAddr": "41660",
+ "tipoMem": "Real",
+ "index": 1660,
+ "size": 2,
+ "func": "MEDIAN",
+ "period": 60,
+ "factor": 1,
+ "minVal": -100,
+ "maxVal": 100,
+ "unit": "°C"
+ },
+ "SetPoint_Cella_01": {
+ "name": "SetPoint_Cella_01",
+ "description": "Setpoint Cella 01",
+ "memAddr": "41700",
+ "tipoMem": "Real",
+ "index": 1700,
+ "size": 2,
+ "func": "MEDIAN",
+ "period": 60,
+ "factor": 1,
+ "minVal": -100,
+ "maxVal": 100,
+ "unit": "°C"
+ },
+ "Temp_Cella_02": {
+ "name": "Temp_Cella_02",
+ "description": "Temperatura Cella 02",
+ "memAddr": "41810",
+ "tipoMem": "Real",
+ "index": 1810,
+ "size": 2,
+ "func": "MEDIAN",
+ "period": 60,
+ "factor": 1,
+ "minVal": -100,
+ "maxVal": 100,
+ "unit": "°C"
+ },
+ "SetPoint_Cella_02": {
+ "name": "SetPoint_Cella_02",
+ "description": "Setpoint Cella 02",
+ "memAddr": "41840",
+ "tipoMem": "Real",
+ "index": 1840,
+ "size": 2,
+ "func": "MEDIAN",
+ "period": 60,
+ "factor": 1,
+ "minVal": -100,
+ "maxVal": 100,
+ "unit": "°C"
+ },
+ "Temp_Cella_03": {
+ "name": "Temp_Cella_03",
+ "description": "Temperatura Cella 03",
+ "memAddr": "41930",
+ "tipoMem": "Real",
+ "index": 1930,
+ "size": 2,
+ "func": "MEDIAN",
+ "period": 60,
+ "factor": 1,
+ "minVal": -100,
+ "maxVal": 100,
+ "unit": "°C"
+ },
+ "SetPoint_Cella_03": {
+ "name": "SetPoint_Cella_03",
+ "description": "Setpoint Cella 03",
+ "memAddr": "41960",
+ "tipoMem": "Real",
+ "index": 1960,
+ "size": 2,
+ "func": "MEDIAN",
+ "period": 60,
+ "factor": 1,
+ "minVal": -100,
+ "maxVal": 100,
+ "unit": "°C"
+ },
+ "Temp_Cella_04": {
+ "name": "Temp_Cella_04",
+ "description": "Temperatura Cella 04",
+ "memAddr": "42050",
+ "tipoMem": "Real",
+ "index": 2050,
+ "size": 2,
+ "func": "MEDIAN",
+ "period": 60,
+ "factor": 1,
+ "minVal": -100,
+ "maxVal": 100,
+ "unit": "°C"
+ },
+ "SetPoint_Cella_04": {
+ "name": "SetPoint_Cella_04",
+ "description": "Setpoint Cella 04",
+ "memAddr": "41840",
+ "tipoMem": "Real",
+ "index": 1840,
+ "size": 2,
+ "func": "MEDIAN",
+ "period": 60,
+ "factor": 1,
+ "minVal": -100,
+ "maxVal": 100,
+ "unit": "°C"
+ },
+ //"Temp_Sala_Bassa": {
+ // "name": "Temp_Sala_Bassa",
+ // "description": "Temperatura Sala Zona Bassa",
+ // "memAddr": "42290",
+ // "tipoMem": "Real",
+ // "index": 2290,
+ // "size": 2,
+ // "func": "MEDIAN",
+ // "period": 60,
+ // "factor": 1,
+ // "minVal": -100,
+ // "maxVal": 100,
+ // "unit": "°C"
+ //},
+ //"SetPoint_Sala_Bassa": {
+ // "name": "SetPoint_Sala_Bassa",
+ // "description": "Setpoint Sala Zona Bassa",
+ // "memAddr": "42330",
+ // "tipoMem": "Real",
+ // "index": 2330,
+ // "size": 2,
+ // "func": "MEDIAN",
+ // "period": 60,
+ // "factor": 1,
+ // "minVal": -100,
+ // "maxVal": 100,
+ // "unit": "°C"
+ //},
+ //"Temp_Sala_Alta": {
+ // "name": "Temp_Sala_Alta",
+ // "description": "Temperatura Sala Zona Alta",
+ // "memAddr": "42420",
+ // "tipoMem": "Real",
+ // "index": 2420,
+ // "size": 2,
+ // "func": "MEDIAN",
+ // "period": 60,
+ // "factor": 1,
+ // "minVal": -100,
+ // "maxVal": 100,
+ // "unit": "°C"
+ //},
+ //"SetPoint_Sala_Alta": {
+ // "name": "SetPoint_Sala_Alta",
+ // "description": "Setpoint Sala Zona Alta",
+ // "memAddr": "42460",
+ // "tipoMem": "Real",
+ // "index": 2460,
+ // "size": 2,
+ // "func": "MEDIAN",
+ // "period": 60,
+ // "factor": 1,
+ // "minVal": -100,
+ // "maxVal": 100,
+ // "unit": "°C"
+ //},
+ "Temp_Hydrocooler": {
+ "name": "Temp_Hydrocooler",
+ "description": "Temperatura Hydrocooler",
+ "memAddr": "42550",
+ "tipoMem": "Real",
+ "index": 2550,
+ "size": 2,
+ "func": "MEDIAN",
+ "period": 60,
+ "factor": 1,
+ "minVal": -100,
+ "maxVal": 100,
+ "unit": "°C"
+ },
+ "SetPoint_Hydrocooler": {
+ "name": "SetPoint_Hydrocooler",
+ "description": "Setpoint Hydrocooler",
+ "memAddr": "42580",
+ "tipoMem": "Real",
+ "index": 2580,
+ "size": 2,
+ "func": "MEDIAN",
+ "period": 60,
+ "factor": 1,
+ "minVal": -100,
+ "maxVal": 100,
+ "unit": "°C"
+ },
+ "Temp_Calibr_01": {
+ "name": "Temp_Calibr_01",
+ "description": "Temperatura Calibratrice 01",
+ "memAddr": "42670",
+ "tipoMem": "Real",
+ "index": 2670,
+ "size": 2,
+ "func": "MEDIAN",
+ "period": 60,
+ "factor": 1,
+ "minVal": -100,
+ "maxVal": 100,
+ "unit": "°C"
+ },
+ "SetPoint_Calibr_01": {
+ "name": "SetPoint_Calibr_01",
+ "description": "SetPoint Calibratrice 01",
+ "memAddr": "42710",
+ "tipoMem": "Real",
+ "index": 2710,
+ "size": 2,
+ "func": "MEDIAN",
+ "period": 60,
+ "factor": 1,
+ "minVal": -100,
+ "maxVal": 100,
+ "unit": "°C"
+ },
+ "Temp_Calibr_02": {
+ "name": "Temp_Calibr_02",
+ "description": "Temperatura Calibratrice 02",
+ "memAddr": "42800",
+ "tipoMem": "Real",
+ "index": 2800,
+ "size": 2,
+ "func": "MEDIAN",
+ "period": 60,
+ "factor": 1,
+ "minVal": -100,
+ "maxVal": 100,
+ "unit": "°C"
+ },
+ "SetPoint_Calibr_02": {
+ "name": "SetPoint_Calibr_02",
+ "description": "SetPoint Calibratrice 02",
+ "memAddr": "42830",
+ "tipoMem": "Real",
+ "index": 2830,
+ "size": 2,
+ "func": "MEDIAN",
+ "period": 60,
+ "factor": 1,
+ "minVal": -100,
+ "maxVal": 100,
+ "unit": "°C"
+ },
+ "Temp_Calibr_03": {
+ "name": "Temp_Calibr_03",
+ "description": "Temperatura Calibratrice 03",
+ "memAddr": "42920",
+ "tipoMem": "Real",
+ "index": 2920,
+ "size": 2,
+ "func": "MEDIAN",
+ "period": 60,
+ "factor": 1,
+ "minVal": -100,
+ "maxVal": 100,
+ "unit": "°C"
+ },
+ "SetPoint_Calibr_03": {
+ "name": "SetPoint_Calibr_03",
+ "description": "SetPoint Calibratrice 03",
+ "memAddr": "42950",
+ "tipoMem": "Real",
+ "index": 2950,
+ "size": 2,
+ "func": "MEDIAN",
+ "period": 60,
+ "factor": 1,
+ "minVal": -100,
+ "maxVal": 100,
+ "unit": "°C"
+ },
+ "Temp_Calibr_04": {
+ "name": "Temp_Calibr_04",
+ "description": "Temperatura Calibratrice 04",
+ "memAddr": "43050",
+ "tipoMem": "Real",
+ "index": 3050,
+ "size": 2,
+ "func": "MEDIAN",
+ "period": 60,
+ "factor": 1,
+ "minVal": -100,
+ "maxVal": 100,
+ "unit": "°C"
+ },
+ "SetPoint_Calibr_04": {
+ "name": "SetPoint_Calibr_04",
+ "description": "SetPoint Calibratrice 04",
+ "memAddr": "43080",
+ "tipoMem": "Real",
+ "index": 3080,
+ "size": 2,
+ "func": "MEDIAN",
+ "period": 60,
+ "factor": 1,
+ "minVal": -100,
+ "maxVal": 100,
+ "unit": "°C"
+ },
+ "Temp_Serbatoi": {
+ "name": "Temp_Serbatoi",
+ "description": "Temperatura Searbatoi",
+ "memAddr": "43170",
+ "tipoMem": "Real",
+ "index": 3170,
+ "size": 2,
+ "func": "MEDIAN",
+ "period": 60,
+ "factor": 1,
+ "minVal": -100,
+ "maxVal": 100,
+ "unit": "°C"
+ },
+ "SetPoint_Searbatoi": {
+ "name": "SetPoint_Searbatoi",
+ "description": "SetPoint Searbatoi",
+ "memAddr": "43200",
+ "tipoMem": "Real",
+ "index": 3200,
+ "size": 2,
+ "func": "MEDIAN",
+ "period": 60,
+ "factor": 1,
+ "minVal": -100,
+ "maxVal": 100,
+ "unit": "°C"
+ },
+ "Temp_Serpentine": {
+ "name": "Temp_Serpentine",
+ "description": "Temperatura Serpentine",
+ "memAddr": "43290",
+ "tipoMem": "Real",
+ "index": 3290,
+ "size": 2,
+ "func": "MEDIAN",
+ "period": 60,
+ "factor": 1,
+ "minVal": -100,
+ "maxVal": 100,
+ "unit": "°C"
+ },
+ "SetPoint_Serpentine": {
+ "name": "SetPoint_Serpentine",
+ "description": "SetPoint Serpentine",
+ "memAddr": "43320",
+ "tipoMem": "Real",
+ "index": 3320,
+ "size": 2,
+ "func": "MEDIAN",
+ "period": 60,
+ "factor": 1,
+ "minVal": -100,
+ "maxVal": 100,
+ "unit": "°C"
+ }
+ },
+ "optKVP": {
+ "fluxLogReduce": true,
+ "fluxLogRedDeadBand": 1.0,
+ "fluxLogResendPeriod": 60
+ }
+}
\ No newline at end of file
diff --git a/IOB-WIN-MBUS/DATA/CONF/GIACO_CENTERFRIGO_MBlock.json b/IOB-WIN-MBUS/DATA/CONF/GIACO_CENTERFRIGO_MBlock.json
new file mode 100644
index 00000000..da89c677
--- /dev/null
+++ b/IOB-WIN-MBUS/DATA/CONF/GIACO_CENTERFRIGO_MBlock.json
@@ -0,0 +1,25 @@
+{
+ "ReadBlocks": {
+ "41500": 32,
+ "41532": 32,
+ "41616": 32,
+ "41650": 32,
+ "41682": 32,
+ "41800": 32,
+ "41832": 32,
+ "41920": 44,
+ "42040": 44,
+ "42160": 8,
+ "42290": 44,
+ "42410": 32,
+ "42442": 32,
+ "42540": 44,
+ "42660": 32,
+ "42692": 32,
+ "42790": 44,
+ "42910": 44,
+ "43040": 44,
+ "43160": 44,
+ "43280": 44
+ }
+}
\ No newline at end of file
diff --git a/IOB-WIN-MBUS/DATA/CONF/GIACO_CENTERFRIGO_MBlock_all.json b/IOB-WIN-MBUS/DATA/CONF/GIACO_CENTERFRIGO_MBlock_all.json
new file mode 100644
index 00000000..a20a124c
--- /dev/null
+++ b/IOB-WIN-MBUS/DATA/CONF/GIACO_CENTERFRIGO_MBlock_all.json
@@ -0,0 +1,27 @@
+{
+ "ReadBlocks": {
+ "41060": 4,
+ "41300": 4,
+ "41500": 32,
+ "41532": 32,
+ "41650": 32,
+ "41682": 32,
+ "41800": 32,
+ "41832": 32,
+ "41920": 44,
+ "42040": 44,
+ "42160": 8,
+ "42290": 44,
+ "42410": 32,
+ "42442": 32,
+ "42540": 44,
+ "42660": 32,
+ "42692": 32,
+ "42790": 44,
+ "42910": 44,
+ "43040": 44,
+ "43160": 44,
+ "43280": 44,
+ "43400": 4
+ }
+}
\ No newline at end of file
diff --git a/IOB-WIN-MBUS/DATA/CONF/GIACO_CENTERFRIGO_alarm.json b/IOB-WIN-MBUS/DATA/CONF/GIACO_CENTERFRIGO_alarm.json
new file mode 100644
index 00000000..2220b2a4
--- /dev/null
+++ b/IOB-WIN-MBUS/DATA/CONF/GIACO_CENTERFRIGO_alarm.json
@@ -0,0 +1,227 @@
+[
+ {
+ "description": "Centrale Frigorifera",
+ "tipoMem": "DInt",
+ "memAddr": "41508",
+ "index": 1508,
+ "size": 2,
+ "messages": [
+ "##",
+ "##",
+ "##",
+ "##",
+ "##",
+ "##",
+ "##",
+ "ALLARME CENTRALE FRIGORIFERA",
+ "ALLARME GENERICO IMPIANTO",
+ "##",
+ "##",
+ "##",
+ "##",
+ "##",
+ "##",
+ "##"
+ ]
+ },
+ {
+ "description": "Allarmi Tunnel",
+ "tipoMem": "DInt",
+ "memAddr": "41654",
+ "index": 1654,
+ "size": 2,
+ "messages": [
+ "ALLARME ALTA TEMPERATURA AMBIENTE TUNNEL",
+ "##",
+ "##",
+ "##",
+ "##",
+ "##",
+ "##",
+ "##",
+ "##",
+ "##",
+ "ALLARME CUMULATIVO TUNNEL",
+ "##",
+ "##",
+ "##",
+ "##",
+ "##"
+ ]
+ },
+ {
+ "description": "Allarmi Cella 01",
+ "tipoMem": "DInt",
+ "memAddr": "41804",
+ "index": 1804,
+ "size": 2,
+ "messages": [
+ "ALLARME ALTA TEMPERATURA AMBIENTE CELLA 01",
+ "##",
+ "##",
+ "##",
+ "##",
+ "##",
+ "##",
+ "##",
+ "##",
+ "##",
+ "ALLARME CUMULATIVO CELLA 01",
+ "##",
+ "##",
+ "##",
+ "##",
+ "##"
+ ]
+ },
+ {
+ "description": "Allarmi Cella 02",
+ "tipoMem": "DInt",
+ "memAddr": "41924",
+ "index": 1924,
+ "size": 2,
+ "messages": [
+ "ALLARME ALTA TEMPERATURA AMBIENTE CELLA 02",
+ "##",
+ "##",
+ "##",
+ "##",
+ "##",
+ "##",
+ "##",
+ "##",
+ "##",
+ "ALLARME CUMULATIVO CELLA 02",
+ "##",
+ "##",
+ "##",
+ "##",
+ "##"
+ ]
+ },
+ {
+ "description": "Allarmi Cella 03",
+ "tipoMem": "DInt",
+ "memAddr": "42044",
+ "index": 2044,
+ "size": 2,
+ "messages": [
+ "ALLARME ALTA TEMPERATURA AMBIENTE CELLA 03",
+ "##",
+ "##",
+ "##",
+ "##",
+ "##",
+ "##",
+ "##",
+ "##",
+ "##",
+ "ALLARME CUMULATIVO CELLA 03",
+ "##",
+ "##",
+ "##",
+ "##",
+ "##"
+ ]
+ },
+// {
+// "description": "Allarmi Cella 04",
+// "tipoMem": "DInt",
+// "memAddr": "42164",
+// "index": 2164,
+// "size": 2,
+// "messages": [
+// "ALLARME ALTA TEMPERATURA AMBIENTE CELLA 04",
+// "##",
+// "##",
+// "##",
+// "##",
+// "##",
+// "##",
+// "##",
+// "##",
+// "##",
+// "ALLARME CUMULATIVO CELLA 04",
+// "##",
+// "##",
+// "##",
+// "##",
+// "##"
+// ]
+// },
+ {
+ "description": "Allarmi Sala Bassa",
+ "tipoMem": "DInt",
+ "memAddr": "42414",
+ "index": 2414,
+ "size": 2,
+ "messages": [
+ "ALLARME ALTA TEMPERATURA AMBIENTE SALA BASSA",
+ "##",
+ "##",
+ "##",
+ "##",
+ "##",
+ "##",
+ "##",
+ "##",
+ "##",
+ "ALLARME CUMULATIVO SALA BASSA",
+ "##",
+ "##",
+ "##",
+ "##",
+ "##"
+ ]
+ },
+ {
+ "description": "Allarmi Sala Alta",
+ "tipoMem": "DInt",
+ "memAddr": "42544",
+ "index": 2544,
+ "size": 2,
+ "messages": [
+ "ALLARME ALTA TEMPERATURA AMBIENTE SALA ALTA",
+ "##",
+ "##",
+ "##",
+ "##",
+ "##",
+ "##",
+ "##",
+ "##",
+ "##",
+ "ALLARME CUMULATIVO SALA ALTA",
+ "##",
+ "##",
+ "##",
+ "##",
+ "##"
+ ]
+ },
+ {
+ "description": "Allarmi Hydrocooler",
+ "tipoMem": "DInt",
+ "memAddr": "42664",
+ "index": 2664,
+ "size": 2,
+ "messages": [
+ "ALLARME ALTA TEMPERATURA AMBIENTE HYDROCOOLER",
+ "##",
+ "##",
+ "##",
+ "##",
+ "##",
+ "##",
+ "##",
+ "##",
+ "##",
+ "ALLARME CUMULATIVO HYDROCOOLER",
+ "##",
+ "##",
+ "##",
+ "##",
+ "##"
+ ]
+ }
+]
\ No newline at end of file
diff --git a/IOB-WIN-MBUS/DATA/CONF/GIACO_SAIM_001.ini b/IOB-WIN-MBUS/DATA/CONF/GIACO_SAIM_001.ini
new file mode 100644
index 00000000..876967d5
--- /dev/null
+++ b/IOB-WIN-MBUS/DATA/CONF/GIACO_SAIM_001.ini
@@ -0,0 +1,97 @@
+;Configurazione IOB-WIN
+[IOB]
+;Impianto SAIM 01 Locorotondo - Giacovelli
+CNCTYPE=MODBUS_TCP_SAIM
+PING_MS_TIMEOUT=1000
+MinDeltaSec=5
+
+[MACHINE]
+VENDOR=SAIM
+MODEL=Trattamento Ozono
+
+[CNC]
+IP=192.168.18.12
+PORT=502
+
+[SERVER]
+MPIP=http://192.168.1.14
+MPURL=/MP/IO
+CMDBASE=/IOB/input/
+CMDFLOG=/IOB/flog/
+CMDALIVE=/IOB
+CMDENABLED=/IOB/enabled/
+CMDADV1=?valore=
+CMDREBO=/sendReboot.aspx?idxMacchina=
+
+[MEMORY]
+ADDR_READ=40000
+ADDR_WRITE=40000
+SIZE_READ=200
+SIZE_WRITE=0
+HR_BASE_ADDR=40000
+;DELTA_BASE=1
+DELTA_BASE=0
+MODBUS_EXT_REG=0
+INDEX_LUT_CORR=-1
+
+[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
+PZCOUNT_MODE=STD.DB85.DBRE16
+DISABLE_PZCOUNT=TRUE
+ENABLE_SEND_PZC_BLOCK=TRUE
+MIN_SEND_PZC_BLOCK=0
+MAX_SEND_PZC_BLOCK=100
+; GEST DATI DYN
+ENABLE_DYN_DATA=TRUE
+FORCE_DYN_DATA=TRUE
+; gestione delta minimo accettabile tra min/MAX
+DELTA_VAL=0
+DISABLE_SEND_WDST=TRUE
+
+; clock base (da 10ms)
+timerIntMs=10
+
+AUTO_CHANGE_ODL=TRUE
+CHANGE_ODL_MODE=DAILY
+
+; conf parametri memoria READ/WRITE
+PARAM_CONF=GIACO_SAIM_001.json
+
+NO_PING=FALSE
+; conf blocchi memoria x READ
+MEM_BLOCK=GIACO_SAIM_001_MBlock.json
+; conf aree allarme
+;ALARM_CONF=GIACO_SAIM_001_alarm.json
+
+; rimozione check limiti min/max dynData
+disDynDataRangeCheck=true
+
+; conf file import
+FILE_IMPORT_FOLDER=C:\GiacenzeLocorotondo
+FILE_IMPORT_TYPE=*.xlsx
+FILE_ARCHIVE_FOLDER=C:\GiacenzeLocorotondo\SAIM002
+EXCL_TOOL_PATH=C:\Steamware\IOB-WIN-NEXT\Tools
+
+[BRANCH]
+NAME=master
+
+; Tags manuali
+[TAGS]
+Customer=Giacovelli-Loco
+HostOS=WIN
+HostName=MAPO-GTW-LOC
+HostAddr=192.168.1.93
diff --git a/IOB-WIN-MBUS/DATA/CONF/GIACO_SAIM_001.json b/IOB-WIN-MBUS/DATA/CONF/GIACO_SAIM_001.json
new file mode 100644
index 00000000..5add3d95
--- /dev/null
+++ b/IOB-WIN-MBUS/DATA/CONF/GIACO_SAIM_001.json
@@ -0,0 +1,595 @@
+{
+ "mMapWrite": {
+ "PPM_min_C1": {
+ "name": "PPM_min_C1",
+ "description": "PPM min Camera 1",
+ "memAddr": "40031",
+ "tipoMem": "Int",
+ "index": 31,
+ "size": 1,
+ "factor": 0.01,
+ "minVal": 0,
+ "maxVal": 1000,
+ "unit": "PPM"
+ },
+ "PPM_max_C1": {
+ "name": "PPM_max_C1",
+ "description": "PPM MAX Camera 1",
+ "memAddr": "40032",
+ "tipoMem": "Int",
+ "index": 32,
+ "size": 1,
+ "factor": 0.01,
+ "minVal": 0,
+ "maxVal": 1000,
+ "unit": "PPM"
+ },
+ "PPM_min_C2": {
+ "name": "PPM_min_C2",
+ "description": "PPM min Camera 2",
+ "memAddr": "40033",
+ "tipoMem": "Int",
+ "index": 33,
+ "size": 1,
+ "factor": 0.01,
+ "minVal": 0,
+ "maxVal": 1000,
+ "unit": "PPM"
+ },
+ "PPM_max_C2": {
+ "name": "PPM_max_C2",
+ "description": "PPM MAX Camera 2",
+ "memAddr": "40034",
+ "tipoMem": "Int",
+ "index": 34,
+ "size": 1,
+ "factor": 0.01,
+ "minVal": 0,
+ "maxVal": 1000,
+ "unit": "PPM"
+ },
+ "PPM_min_C3": {
+ "name": "PPM_min_C3",
+ "description": "PPM min Camera 3",
+ "memAddr": "40035",
+ "tipoMem": "Int",
+ "index": 35,
+ "size": 1,
+ "factor": 0.01,
+ "minVal": 0,
+ "maxVal": 1000,
+ "unit": "PPM"
+ },
+ "PPM_max_C3": {
+ "name": "PPM_max_C3",
+ "description": "PPM MAX Camera 3",
+ "memAddr": "40036",
+ "tipoMem": "Int",
+ "index": 36,
+ "size": 1,
+ "factor": 0.01,
+ "minVal": 0,
+ "maxVal": 1000,
+ "unit": "PPM"
+ },
+ "PPM_min_C4": {
+ "name": "PPM_min_C4",
+ "description": "PPM min Camera 4",
+ "memAddr": "40037",
+ "tipoMem": "Int",
+ "index": 37,
+ "size": 1,
+ "factor": 0.01,
+ "minVal": 0,
+ "maxVal": 1000,
+ "unit": "PPM"
+ },
+ "PPM_max_C4": {
+ "name": "PPM_max_C4",
+ "description": "PPM MAX Camera 4",
+ "memAddr": "40038",
+ "tipoMem": "Int",
+ "index": 38,
+ "size": 1,
+ "factor": 0.01,
+ "minVal": 0,
+ "maxVal": 1000,
+ "unit": "PPM"
+ },
+ "PPM_min_C5": {
+ "name": "PPM_min_C5",
+ "description": "PPM min Camera 5",
+ "memAddr": "40039",
+ "tipoMem": "Int",
+ "index": 39,
+ "size": 1,
+ "factor": 0.01,
+ "minVal": 0,
+ "maxVal": 1000,
+ "unit": "PPM"
+ },
+ "PPM_max_C5": {
+ "name": "PPM_max_C5",
+ "description": "PPM MAX Camera 5",
+ "memAddr": "40040",
+ "tipoMem": "Int",
+ "index": 40,
+ "size": 1,
+ "factor": 0.01,
+ "minVal": 0,
+ "maxVal": 1000,
+ "unit": "PPM"
+ },
+ "PPM_min_C6": {
+ "name": "PPM_min_C6",
+ "description": "PPM min Camera 6",
+ "memAddr": "40041",
+ "tipoMem": "Int",
+ "index": 41,
+ "size": 1,
+ "factor": 0.01,
+ "minVal": 0,
+ "maxVal": 1000,
+ "unit": "PPM"
+ },
+ "PPM_max_C6": {
+ "name": "PPM_max_C6",
+ "description": "PPM MAX Camera 6",
+ "memAddr": "40042",
+ "tipoMem": "Int",
+ "index": 42,
+ "size": 1,
+ "factor": 0.01,
+ "minVal": 0,
+ "maxVal": 1000,
+ "unit": "PPM"
+ }
+ },
+ "mMapRead": {
+ "PPM_min_C1": {
+ "name": "PPM_min_C1",
+ "description": "PPM min Camera 1",
+ "memAddr": "40031",
+ "tipoMem": "Int",
+ "index": 31,
+ "size": 1,
+ "factor": 0.01,
+ "minVal": 0,
+ "maxVal": 1000,
+ "unit": "PPM"
+ },
+ "PPM_max_C1": {
+ "name": "PPM_max_C1",
+ "description": "PPM MAX Camera 1",
+ "memAddr": "40032",
+ "tipoMem": "Int",
+ "index": 32,
+ "size": 1,
+ "factor": 0.01,
+ "minVal": 0,
+ "maxVal": 1000,
+ "unit": "PPM"
+ },
+ "PPM_min_C2": {
+ "name": "PPM_min_C2",
+ "description": "PPM min Camera 2",
+ "memAddr": "40033",
+ "tipoMem": "Int",
+ "index": 33,
+ "size": 1,
+ "factor": 0.01,
+ "minVal": 0,
+ "maxVal": 1000,
+ "unit": "PPM"
+ },
+ "PPM_max_C2": {
+ "name": "PPM_max_C2",
+ "description": "PPM MAX Camera 2",
+ "memAddr": "40034",
+ "tipoMem": "Int",
+ "index": 34,
+ "size": 1,
+ "factor": 0.01,
+ "minVal": 0,
+ "maxVal": 1000,
+ "unit": "PPM"
+ },
+ "PPM_min_C3": {
+ "name": "PPM_min_C3",
+ "description": "PPM min Camera 3",
+ "memAddr": "40035",
+ "tipoMem": "Int",
+ "index": 35,
+ "size": 1,
+ "factor": 0.01,
+ "minVal": 0,
+ "maxVal": 1000,
+ "unit": "PPM"
+ },
+ "PPM_max_C3": {
+ "name": "PPM_max_C3",
+ "description": "PPM MAX Camera 3",
+ "memAddr": "40036",
+ "tipoMem": "Int",
+ "index": 36,
+ "size": 1,
+ "factor": 0.01,
+ "minVal": 0,
+ "maxVal": 1000,
+ "unit": "PPM"
+ },
+ "PPM_min_C4": {
+ "name": "PPM_min_C4",
+ "description": "PPM min Camera 4",
+ "memAddr": "40037",
+ "tipoMem": "Int",
+ "index": 37,
+ "size": 1,
+ "factor": 0.01,
+ "minVal": 0,
+ "maxVal": 1000,
+ "unit": "PPM"
+ },
+ "PPM_max_C4": {
+ "name": "PPM_max_C4",
+ "description": "PPM MAX Camera 4",
+ "memAddr": "40038",
+ "tipoMem": "Int",
+ "index": 38,
+ "size": 1,
+ "factor": 0.01,
+ "minVal": 0,
+ "maxVal": 1000,
+ "unit": "PPM"
+ },
+ "PPM_min_C5": {
+ "name": "PPM_min_C5",
+ "description": "PPM min Camera 5",
+ "memAddr": "40039",
+ "tipoMem": "Int",
+ "index": 39,
+ "size": 1,
+ "factor": 0.01,
+ "minVal": 0,
+ "maxVal": 1000,
+ "unit": "PPM"
+ },
+ "PPM_max_C5": {
+ "name": "PPM_max_C5",
+ "description": "PPM MAX Camera 5",
+ "memAddr": "40040",
+ "tipoMem": "Int",
+ "index": 40,
+ "size": 1,
+ "factor": 0.01,
+ "minVal": 0,
+ "maxVal": 1000,
+ "unit": "PPM"
+ },
+ "PPM_min_C6": {
+ "name": "PPM_min_C6",
+ "description": "PPM min Camera 6",
+ "memAddr": "40041",
+ "tipoMem": "Int",
+ "index": 41,
+ "size": 1,
+ "factor": 0.01,
+ "minVal": 0,
+ "maxVal": 1000,
+ "unit": "PPM"
+ },
+ "PPM_max_C6": {
+ "name": "PPM_max_C6",
+ "description": "PPM MAX Camera 6",
+ "memAddr": "40042",
+ "tipoMem": "Int",
+ "index": 42,
+ "size": 1,
+ "factor": 0.01,
+ "minVal": 0,
+ "maxVal": 1000,
+ "unit": "PPM"
+ },
+ "Sonda01": {
+ "name": "Sonda01",
+ "description": "Sonda 01",
+ "memAddr": "30110",
+ "tipoMem": "Int",
+ "index": 110,
+ "size": 1,
+ "func": "MAX",
+ "period": 90,
+ "factor": 0.01,
+ "minVal": 0,
+ "maxVal": 999999999,
+ "unit": "#"
+ },
+ "Sonda02": {
+ "name": "Sonda02",
+ "description": "Sonda 02",
+ "memAddr": "30120",
+ "tipoMem": "Int",
+ "index": 120,
+ "size": 1,
+ "func": "MAX",
+ "period": 90,
+ "factor": 0.01,
+ "minVal": 0,
+ "maxVal": 999999999,
+ "unit": "#"
+ },
+ "Sonda03": {
+ "name": "Sonda03",
+ "description": "Sonda 03",
+ "memAddr": "30130",
+ "tipoMem": "Int",
+ "index": 130,
+ "size": 1,
+ "func": "MAX",
+ "period": 90,
+ "factor": 0.01,
+ "minVal": 0,
+ "maxVal": 999999999,
+ "unit": "#"
+ },
+ "Sonda04": {
+ "name": "Sonda04",
+ "description": "Sonda 04",
+ "memAddr": "30140",
+ "tipoMem": "Int",
+ "index": 140,
+ "size": 1,
+ "func": "MAX",
+ "period": 90,
+ "factor": 0.01,
+ "minVal": 0,
+ "maxVal": 999999999,
+ "unit": "#"
+ },
+ "Sonda05": {
+ "name": "Sonda05",
+ "description": "Sonda 05",
+ "memAddr": "30150",
+ "tipoMem": "Int",
+ "index": 150,
+ "size": 1,
+ "func": "MAX",
+ "period": 90,
+ "factor": 0.01,
+ "minVal": 0,
+ "maxVal": 999999999,
+ "unit": "#"
+ },
+ "Sonda06": {
+ "name": "Sonda06",
+ "description": "Sonda 06",
+ "memAddr": "30160",
+ "tipoMem": "Int",
+ "index": 160,
+ "size": 1,
+ "func": "MAX",
+ "period": 90,
+ "factor": 0.01,
+ "minVal": 0,
+ "maxVal": 999999999,
+ "unit": "#"
+ },
+ "Amper01": {
+ "name": "Amper01",
+ "description": "Amper 01",
+ "memAddr": "30010",
+ "tipoMem": "Int",
+ "index": 10,
+ "size": 1,
+ "func": "MAX",
+ "period": 90,
+ "factor": 1,
+ "minVal": 0,
+ "maxVal": 999999999,
+ "unit": "#"
+ },
+ "Amper02": {
+ "name": "Amper02",
+ "description": "Amper 02",
+ "memAddr": "30011",
+ "tipoMem": "Int",
+ "index": 11,
+ "size": 1,
+ "func": "MAX",
+ "period": 90,
+ "factor": 1,
+ "minVal": 0,
+ "maxVal": 999999999,
+ "unit": "#"
+ },
+ "Amper03": {
+ "name": "Amper03",
+ "description": "Amper 03",
+ "memAddr": "30012",
+ "tipoMem": "Int",
+ "index": 12,
+ "size": 1,
+ "func": "MAX",
+ "period": 90,
+ "factor": 1,
+ "minVal": 0,
+ "maxVal": 999999999,
+ "unit": "#"
+ },
+ "Amper04": {
+ "name": "Amper04",
+ "description": "Amper 04",
+ "memAddr": "30013",
+ "tipoMem": "Int",
+ "index": 13,
+ "size": 1,
+ "func": "MAX",
+ "period": 90,
+ "factor": 1,
+ "minVal": 0,
+ "maxVal": 999999999,
+ "unit": "#"
+ },
+ "Amper05": {
+ "name": "Amper05",
+ "description": "Amper 05",
+ "memAddr": "30014",
+ "tipoMem": "Int",
+ "index": 14,
+ "size": 1,
+ "func": "MAX",
+ "period": 90,
+ "factor": 1,
+ "minVal": 0,
+ "maxVal": 999999999,
+ "unit": "#"
+ },
+ "Amper06": {
+ "name": "Amper06",
+ "description": "Amper 06",
+ "memAddr": "30015",
+ "tipoMem": "Int",
+ "index": 15,
+ "size": 1,
+ "func": "MAX",
+ "period": 90,
+ "factor": 1,
+ "minVal": 0,
+ "maxVal": 999999999,
+ "unit": "#"
+ },
+ "Amper07": {
+ "name": "Amper07",
+ "description": "Amper 07",
+ "memAddr": "30016",
+ "tipoMem": "Int",
+ "index": 16,
+ "size": 1,
+ "func": "MAX",
+ "period": 90,
+ "factor": 1,
+ "minVal": 0,
+ "maxVal": 999999999,
+ "unit": "#"
+ },
+ "Amper08": {
+ "name": "Amper08",
+ "description": "Amper 08",
+ "memAddr": "30017",
+ "tipoMem": "Int",
+ "index": 17,
+ "size": 1,
+ "func": "MAX",
+ "period": 90,
+ "factor": 1,
+ "minVal": 0,
+ "maxVal": 999999999,
+ "unit": "#"
+ },
+ "ContCam01": {
+ "name": "ContCam01",
+ "description": "Cont Camera 01",
+ "memAddr": "30021",
+ "tipoMem": "Int",
+ "index": 21,
+ "size": 1,
+ "func": "MAX",
+ "period": 90,
+ "factor": 1,
+ "minVal": 0,
+ "maxVal": 999999999,
+ "unit": "#"
+ },
+ "ContCam02": {
+ "name": "ContCam02",
+ "description": "Cont Camera 02",
+ "memAddr": "30022",
+ "tipoMem": "Int",
+ "index": 22,
+ "size": 1,
+ "func": "MAX",
+ "period": 90,
+ "factor": 1,
+ "minVal": 0,
+ "maxVal": 999999999,
+ "unit": "#"
+ },
+ "ContCam03": {
+ "name": "ContCam03",
+ "description": "Cont Camera 03",
+ "memAddr": "30023",
+ "tipoMem": "Int",
+ "index": 23,
+ "size": 1,
+ "func": "MAX",
+ "period": 90,
+ "factor": 1,
+ "minVal": 0,
+ "maxVal": 999999999,
+ "unit": "#"
+ },
+ "ContCam04": {
+ "name": "ContCam04",
+ "description": "Cont Camera 04",
+ "memAddr": "30024",
+ "tipoMem": "Int",
+ "index": 24,
+ "size": 1,
+ "func": "MAX",
+ "period": 90,
+ "factor": 1,
+ "minVal": 0,
+ "maxVal": 999999999,
+ "unit": "#"
+ },
+ "ContCam05": {
+ "name": "ContCam05",
+ "description": "Cont Camera 05",
+ "memAddr": "30025",
+ "tipoMem": "Int",
+ "index": 25,
+ "size": 1,
+ "func": "MAX",
+ "period": 90,
+ "factor": 1,
+ "minVal": 0,
+ "maxVal": 999999999,
+ "unit": "#"
+ },
+ "ContCam06": {
+ "name": "ContCam06",
+ "description": "Cont Camera 06",
+ "memAddr": "30026",
+ "tipoMem": "Int",
+ "index": 26,
+ "size": 1,
+ "func": "MAX",
+ "period": 90,
+ "factor": 1,
+ "minVal": 0,
+ "maxVal": 999999999,
+ "unit": "#"
+ }
+ },
+ "optMemPar": {
+ "AlarmBitCond": "10002.0=1",
+ "WorkBitCond": "10001.0=1"
+ },
+ "fileDecod": {
+ "Product": 3,
+ "Variety": 9,
+ "Supplier": 8,
+ "ExtDoc": 2,
+ "DateRif": 14,
+ "QtyTot": 22,
+ "NumPack": 21,
+ "NumPed": 17,
+ "PackPed": 18,
+ "PesoPack": 20
+ },
+ "optKVP": {
+ "fluxLogReduce": true,
+ "fluxLogRedDeadBand": 1.0,
+ "fluxLogResendPeriod": 60
+ }
+}
\ No newline at end of file
diff --git a/IOB-WIN-MBUS/DATA/CONF/GIACO_SAIM_001_MBlock.json b/IOB-WIN-MBUS/DATA/CONF/GIACO_SAIM_001_MBlock.json
new file mode 100644
index 00000000..6b5b471c
--- /dev/null
+++ b/IOB-WIN-MBUS/DATA/CONF/GIACO_SAIM_001_MBlock.json
@@ -0,0 +1,10 @@
+{
+ "ReadBlocks": {
+ "10000": 10,
+ "10100": 10,
+ "30000": 50,
+ "30100": 40,
+ "30140": 30,
+ "40030": 20
+ }
+}
\ No newline at end of file
diff --git a/IOB-WIN-MBUS/DATA/CONF/GIACO_SAIM_002.ini b/IOB-WIN-MBUS/DATA/CONF/GIACO_SAIM_002.ini
new file mode 100644
index 00000000..2a4818ed
--- /dev/null
+++ b/IOB-WIN-MBUS/DATA/CONF/GIACO_SAIM_002.ini
@@ -0,0 +1,97 @@
+;Configurazione IOB-WIN
+[IOB]
+;Impianto SAIM 02 Locorotondo - Giacovelli
+CNCTYPE=MODBUS_TCP_SAIM
+PING_MS_TIMEOUT=1000
+MinDeltaSec=5
+
+[MACHINE]
+VENDOR=SAIM
+MODEL=Trattamento Ozono
+
+[CNC]
+IP=192.168.18.13
+PORT=502
+
+[SERVER]
+MPIP=http://192.168.1.14
+MPURL=/MP/IO
+CMDBASE=/IOB/input/
+CMDFLOG=/IOB/flog/
+CMDALIVE=/IOB
+CMDENABLED=/IOB/enabled/
+CMDADV1=?valore=
+CMDREBO=/sendReboot.aspx?idxMacchina=
+
+[MEMORY]
+ADDR_READ=40000
+ADDR_WRITE=40000
+SIZE_READ=200
+SIZE_WRITE=0
+HR_BASE_ADDR=40000
+;DELTA_BASE=1
+DELTA_BASE=0
+MODBUS_EXT_REG=0
+INDEX_LUT_CORR=-1
+
+[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
+PZCOUNT_MODE=STD.DB85.DBRE16
+DISABLE_PZCOUNT=TRUE
+ENABLE_SEND_PZC_BLOCK=TRUE
+MIN_SEND_PZC_BLOCK=0
+MAX_SEND_PZC_BLOCK=100
+; GEST DATI DYN
+ENABLE_DYN_DATA=TRUE
+FORCE_DYN_DATA=TRUE
+; gestione delta minimo accettabile tra min/MAX
+DELTA_VAL=0
+DISABLE_SEND_WDST=TRUE
+
+; clock base (da 10ms)
+timerIntMs=10
+
+AUTO_CHANGE_ODL=TRUE
+CHANGE_ODL_MODE=DAILY
+
+; conf parametri memoria READ/WRITE
+PARAM_CONF=GIACO_SAIM_002.json
+
+NO_PING=FALSE
+; conf blocchi memoria x READ
+MEM_BLOCK=GIACO_SAIM_002_MBlock.json
+; conf aree allarme
+;ALARM_CONF=GIACO_SAIM_002_alarm.json
+
+; rimozione check limiti min/max dynData
+disDynDataRangeCheck=true
+
+; conf file import
+FILE_IMPORT_FOLDER=C:\GiacenzeLocorotondo\SAIM002
+FILE_IMPORT_TYPE=*.xlsx
+FILE_ARCHIVE_FOLDER=C:\GiacenzeLocorotondo\archivio
+EXCL_TOOL_PATH=C:\Steamware\IOB-WIN-NEXT\Tools
+
+[BRANCH]
+NAME=master
+
+; Tags manuali
+[TAGS]
+Customer=Giacovelli-Loco
+HostOS=WIN
+HostName=MAPO-GTW-LOC
+HostAddr=192.168.1.93
diff --git a/IOB-WIN-MBUS/DATA/CONF/GIACO_SAIM_002.json b/IOB-WIN-MBUS/DATA/CONF/GIACO_SAIM_002.json
new file mode 100644
index 00000000..bc046c79
--- /dev/null
+++ b/IOB-WIN-MBUS/DATA/CONF/GIACO_SAIM_002.json
@@ -0,0 +1,389 @@
+{
+ "mMapWrite": {
+ "PPM_min_C1": {
+ "name": "PPM_min_C1",
+ "description": "PPM min Camera 1",
+ "memAddr": "40031",
+ "tipoMem": "Int",
+ "index": 31,
+ "size": 1,
+ "factor": 0.01,
+ "minVal": 0,
+ "maxVal": 1000,
+ "unit": "PPM"
+ },
+ "PPM_max_C1": {
+ "name": "PPM_max_C1",
+ "description": "PPM MAX Camera 1",
+ "memAddr": "40032",
+ "tipoMem": "Int",
+ "index": 32,
+ "size": 1,
+ "factor": 0.01,
+ "minVal": 0,
+ "maxVal": 1000,
+ "unit": "PPM"
+ },
+ "PPM_min_C2": {
+ "name": "PPM_min_C2",
+ "description": "PPM min Camera 2",
+ "memAddr": "40033",
+ "tipoMem": "Int",
+ "index": 33,
+ "size": 1,
+ "factor": 0.01,
+ "minVal": 0,
+ "maxVal": 1000,
+ "unit": "PPM"
+ },
+ "PPM_max_C2": {
+ "name": "PPM_max_C2",
+ "description": "PPM MAX Camera 2",
+ "memAddr": "40034",
+ "tipoMem": "Int",
+ "index": 34,
+ "size": 1,
+ "factor": 0.01,
+ "minVal": 0,
+ "maxVal": 1000,
+ "unit": "PPM"
+ },
+ "PPM_min_C3": {
+ "name": "PPM_min_C3",
+ "description": "PPM min Camera 3",
+ "memAddr": "40035",
+ "tipoMem": "Int",
+ "index": 35,
+ "size": 1,
+ "factor": 0.01,
+ "minVal": 0,
+ "maxVal": 1000,
+ "unit": "PPM"
+ },
+ "PPM_max_C3": {
+ "name": "PPM_max_C3",
+ "description": "PPM MAX Camera 3",
+ "memAddr": "40036",
+ "tipoMem": "Int",
+ "index": 36,
+ "size": 1,
+ "factor": 0.01,
+ "minVal": 0,
+ "maxVal": 1000,
+ "unit": "PPM"
+ },
+ "PPM_min_C4": {
+ "name": "PPM_min_C4",
+ "description": "PPM min Camera 4",
+ "memAddr": "40037",
+ "tipoMem": "Int",
+ "index": 37,
+ "size": 1,
+ "factor": 0.01,
+ "minVal": 0,
+ "maxVal": 1000,
+ "unit": "PPM"
+ },
+ "PPM_max_C4": {
+ "name": "PPM_max_C4",
+ "description": "PPM MAX Camera 4",
+ "memAddr": "40038",
+ "tipoMem": "Int",
+ "index": 38,
+ "size": 1,
+ "factor": 0.01,
+ "minVal": 0,
+ "maxVal": 1000,
+ "unit": "PPM"
+ }
+ },
+ "mMapRead": {
+ "PPM_min_C1": {
+ "name": "PPM_min_C1",
+ "description": "PPM min Camera 1",
+ "memAddr": "40031",
+ "tipoMem": "Int",
+ "index": 31,
+ "size": 1,
+ "factor": 0.01,
+ "minVal": 0,
+ "maxVal": 1000,
+ "unit": "PPM"
+ },
+ "PPM_max_C1": {
+ "name": "PPM_max_C1",
+ "description": "PPM MAX Camera 1",
+ "memAddr": "40032",
+ "tipoMem": "Int",
+ "index": 32,
+ "size": 1,
+ "factor": 0.01,
+ "minVal": 0,
+ "maxVal": 1000,
+ "unit": "PPM"
+ },
+ "PPM_min_C2": {
+ "name": "PPM_min_C2",
+ "description": "PPM min Camera 2",
+ "memAddr": "40033",
+ "tipoMem": "Int",
+ "index": 33,
+ "size": 1,
+ "factor": 0.01,
+ "minVal": 0,
+ "maxVal": 1000,
+ "unit": "PPM"
+ },
+ "PPM_max_C2": {
+ "name": "PPM_max_C2",
+ "description": "PPM MAX Camera 2",
+ "memAddr": "40034",
+ "tipoMem": "Int",
+ "index": 34,
+ "size": 1,
+ "factor": 0.01,
+ "minVal": 0,
+ "maxVal": 1000,
+ "unit": "PPM"
+ },
+ "PPM_min_C3": {
+ "name": "PPM_min_C3",
+ "description": "PPM min Camera 3",
+ "memAddr": "40035",
+ "tipoMem": "Int",
+ "index": 35,
+ "size": 1,
+ "factor": 0.01,
+ "minVal": 0,
+ "maxVal": 1000,
+ "unit": "PPM"
+ },
+ "PPM_max_C3": {
+ "name": "PPM_max_C3",
+ "description": "PPM MAX Camera 3",
+ "memAddr": "40036",
+ "tipoMem": "Int",
+ "index": 36,
+ "size": 1,
+ "factor": 0.01,
+ "minVal": 0,
+ "maxVal": 1000,
+ "unit": "PPM"
+ },
+ "PPM_min_C4": {
+ "name": "PPM_min_C4",
+ "description": "PPM min Camera 4",
+ "memAddr": "40037",
+ "tipoMem": "Int",
+ "index": 37,
+ "size": 1,
+ "factor": 0.01,
+ "minVal": 0,
+ "maxVal": 1000,
+ "unit": "PPM"
+ },
+ "PPM_max_C4": {
+ "name": "PPM_max_C4",
+ "description": "PPM MAX Camera 4",
+ "memAddr": "40038",
+ "tipoMem": "Int",
+ "index": 38,
+ "size": 1,
+ "factor": 0.01,
+ "minVal": 0,
+ "maxVal": 1000,
+ "unit": "PPM"
+ },
+ "Sonda01": {
+ "name": "Sonda01",
+ "description": "Sonda 01",
+ "memAddr": "30110",
+ "tipoMem": "Int",
+ "index": 110,
+ "size": 1,
+ "func": "MAX",
+ "period": 90,
+ "factor": 0.01,
+ "minVal": 0,
+ "maxVal": 999999999,
+ "unit": "#"
+ },
+ "Sonda02": {
+ "name": "Sonda02",
+ "description": "Sonda 02",
+ "memAddr": "30120",
+ "tipoMem": "Int",
+ "index": 120,
+ "size": 1,
+ "func": "MAX",
+ "period": 90,
+ "factor": 0.01,
+ "minVal": 0,
+ "maxVal": 999999999,
+ "unit": "#"
+ },
+ "Sonda03": {
+ "name": "Sonda03",
+ "description": "Sonda 03",
+ "memAddr": "30130",
+ "tipoMem": "Int",
+ "index": 130,
+ "size": 1,
+ "func": "MAX",
+ "period": 90,
+ "factor": 0.01,
+ "minVal": 0,
+ "maxVal": 999999999,
+ "unit": "#"
+ },
+ "Sonda04": {
+ "name": "Sonda04",
+ "description": "Sonda 04",
+ "memAddr": "30140",
+ "tipoMem": "Int",
+ "index": 140,
+ "size": 1,
+ "func": "MAX",
+ "period": 90,
+ "factor": 0.01,
+ "minVal": 0,
+ "maxVal": 999999999,
+ "unit": "#"
+ },
+
+ "Amper01": {
+ "name": "Amper01",
+ "description": "Amper 01",
+ "memAddr": "30010",
+ "tipoMem": "Int",
+ "index": 10,
+ "size": 1,
+ "func": "MAX",
+ "period": 90,
+ "factor": 1,
+ "minVal": 0,
+ "maxVal": 999999999,
+ "unit": "#"
+ },
+ "Amper02": {
+ "name": "Amper02",
+ "description": "Amper 02",
+ "memAddr": "30011",
+ "tipoMem": "Int",
+ "index": 11,
+ "size": 1,
+ "func": "MAX",
+ "period": 90,
+ "factor": 1,
+ "minVal": 0,
+ "maxVal": 999999999,
+ "unit": "#"
+ },
+ "Amper03": {
+ "name": "Amper03",
+ "description": "Amper 03",
+ "memAddr": "30012",
+ "tipoMem": "Int",
+ "index": 12,
+ "size": 1,
+ "func": "MAX",
+ "period": 90,
+ "factor": 1,
+ "minVal": 0,
+ "maxVal": 999999999,
+ "unit": "#"
+ },
+ "Amper04": {
+ "name": "Amper04",
+ "description": "Amper 04",
+ "memAddr": "30013",
+ "tipoMem": "Int",
+ "index": 13,
+ "size": 1,
+ "func": "MAX",
+ "period": 90,
+ "factor": 1,
+ "minVal": 0,
+ "maxVal": 999999999,
+ "unit": "#"
+ },
+
+ "ContCam01": {
+ "name": "ContCam01",
+ "description": "Cont Camera 01",
+ "memAddr": "30021",
+ "tipoMem": "Int",
+ "index": 21,
+ "size": 1,
+ "func": "MAX",
+ "period": 90,
+ "factor": 1,
+ "minVal": 0,
+ "maxVal": 999999999,
+ "unit": "#"
+ },
+ "ContCam02": {
+ "name": "ContCam02",
+ "description": "Cont Camera 02",
+ "memAddr": "30022",
+ "tipoMem": "Int",
+ "index": 22,
+ "size": 1,
+ "func": "MAX",
+ "period": 90,
+ "factor": 1,
+ "minVal": 0,
+ "maxVal": 999999999,
+ "unit": "#"
+ },
+ "ContCam03": {
+ "name": "ContCam03",
+ "description": "Cont Camera 03",
+ "memAddr": "30023",
+ "tipoMem": "Int",
+ "index": 23,
+ "size": 1,
+ "func": "MAX",
+ "period": 90,
+ "factor": 1,
+ "minVal": 0,
+ "maxVal": 999999999,
+ "unit": "#"
+ },
+ "ContCam04": {
+ "name": "ContCam04",
+ "description": "Cont Camera 04",
+ "memAddr": "30024",
+ "tipoMem": "Int",
+ "index": 24,
+ "size": 1,
+ "func": "MAX",
+ "period": 90,
+ "factor": 1,
+ "minVal": 0,
+ "maxVal": 999999999,
+ "unit": "#"
+ }
+ },
+ "optMemPar": {
+ "AlarmBitCond": "10002.0=1",
+ "WorkBitCond": "10001.0=1"
+ },
+ "fileDecod": {
+ "Product": 3,
+ "Variety": 9,
+ "Supplier": 8,
+ "ExtDoc": 2,
+ "DateRif": 14,
+ "QtyTot": 22,
+ "NumPack": 21,
+ "NumPed": 17,
+ "PackPed": 18,
+ "PesoPack": 20
+ },
+ "optKVP": {
+ "fluxLogReduce": true,
+ "fluxLogRedDeadBand": 1.0,
+ "fluxLogResendPeriod": 60
+ }
+}
\ No newline at end of file
diff --git a/IOB-WIN-MBUS/DATA/CONF/GIACO_SAIM_002_MBlock.json b/IOB-WIN-MBUS/DATA/CONF/GIACO_SAIM_002_MBlock.json
new file mode 100644
index 00000000..7abba0a8
--- /dev/null
+++ b/IOB-WIN-MBUS/DATA/CONF/GIACO_SAIM_002_MBlock.json
@@ -0,0 +1,9 @@
+{
+ "ReadBlocks": {
+ "10000": 10,
+ "10100": 10,
+ "30000": 30,
+ "30100": 50,
+ "40030": 10
+ }
+}
\ No newline at end of file
diff --git a/IOB-WIN-MBUS/DATA/CONF/GIACO_SAIM_003.ini b/IOB-WIN-MBUS/DATA/CONF/GIACO_SAIM_003.ini
new file mode 100644
index 00000000..e33f8813
--- /dev/null
+++ b/IOB-WIN-MBUS/DATA/CONF/GIACO_SAIM_003.ini
@@ -0,0 +1,88 @@
+;Configurazione IOB-WIN
+[IOB]
+;Impianto SAIM 03 Locorotondo - Giacovelli
+CNCTYPE=MODBUS_TCP_SAIM
+PING_MS_TIMEOUT=1000
+MinDeltaSec=5
+
+[MACHINE]
+VENDOR=SAIM
+MODEL=Trattamento Ozono
+
+[CNC]
+IP=192.168.18.10
+PORT=502
+
+[SERVER]
+MPIP=http://192.168.1.14
+MPURL=/MP/IO
+CMDBASE=/IOB/input/
+CMDFLOG=/IOB/flog/
+CMDALIVE=/IOB
+CMDENABLED=/IOB/enabled/
+CMDADV1=?valore=
+CMDREBO=/sendReboot.aspx?idxMacchina=
+
+[MEMORY]
+ADDR_READ=40000
+ADDR_WRITE=40000
+SIZE_READ=200
+SIZE_WRITE=0
+HR_BASE_ADDR=40000
+;DELTA_BASE=1
+DELTA_BASE=0
+MODBUS_EXT_REG=0
+INDEX_LUT_CORR=-1
+
+[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
+PZCOUNT_MODE=STD.DB85.DBRE16
+DISABLE_PZCOUNT=TRUE
+ENABLE_SEND_PZC_BLOCK=TRUE
+MIN_SEND_PZC_BLOCK=0
+MAX_SEND_PZC_BLOCK=100
+; GEST DATI DYN
+ENABLE_DYN_DATA=TRUE
+FORCE_DYN_DATA=TRUE
+; gestione delta minimo accettabile tra min/MAX
+DELTA_VAL=0
+
+; clock base (da 10ms)
+timerIntMs=10
+
+AUTO_CHANGE_ODL=TRUE
+CHANGE_ODL_MODE=DAILY
+
+; conf parametri memoria READ/WRITE
+PARAM_CONF=GIACO_SAIM_003.json
+
+NO_PING=FALSE
+; conf blocchi memoria x READ
+MEM_BLOCK=GIACO_SAIM_003_MBlock.json
+; conf aree allarme
+;ALARM_CONF=GIACO_SAIM_003_alarm.json
+
+; rimozione check limiti min/max dynData
+disDynDataRangeCheck=true
+
+; conf file import
+FILE_IMPORT_FOLDER=C:\GiacenzeLocorotondo
+FILE_IMPORT_TYPE=*.xlsx
+FILE_ARCHIVE_FOLDER=C:\GiacenzeLocorotondo\SAIM002
+
+[BRANCH]
+NAME=master
\ No newline at end of file
diff --git a/IOB-WIN-MBUS/DATA/CONF/GIACO_SAIM_003.json b/IOB-WIN-MBUS/DATA/CONF/GIACO_SAIM_003.json
new file mode 100644
index 00000000..38e260fe
--- /dev/null
+++ b/IOB-WIN-MBUS/DATA/CONF/GIACO_SAIM_003.json
@@ -0,0 +1,590 @@
+{
+ "mMapWrite": {
+ "PPM_min_C1": {
+ "name": "PPM_min_C1",
+ "description": "PPM min Camera 1",
+ "memAddr": "40031",
+ "tipoMem": "Int",
+ "index": 31,
+ "size": 1,
+ "factor": 0.01,
+ "minVal": 0,
+ "maxVal": 1000,
+ "unit": "PPM"
+ },
+ "PPM_max_C1": {
+ "name": "PPM_max_C1",
+ "description": "PPM MAX Camera 1",
+ "memAddr": "40032",
+ "tipoMem": "Int",
+ "index": 32,
+ "size": 1,
+ "factor": 0.01,
+ "minVal": 0,
+ "maxVal": 1000,
+ "unit": "PPM"
+ },
+ "PPM_min_C2": {
+ "name": "PPM_min_C2",
+ "description": "PPM min Camera 2",
+ "memAddr": "40033",
+ "tipoMem": "Int",
+ "index": 33,
+ "size": 1,
+ "factor": 0.01,
+ "minVal": 0,
+ "maxVal": 1000,
+ "unit": "PPM"
+ },
+ "PPM_max_C2": {
+ "name": "PPM_max_C2",
+ "description": "PPM MAX Camera 2",
+ "memAddr": "40034",
+ "tipoMem": "Int",
+ "index": 34,
+ "size": 1,
+ "factor": 0.01,
+ "minVal": 0,
+ "maxVal": 1000,
+ "unit": "PPM"
+ },
+ "PPM_min_C3": {
+ "name": "PPM_min_C3",
+ "description": "PPM min Camera 3",
+ "memAddr": "40035",
+ "tipoMem": "Int",
+ "index": 35,
+ "size": 1,
+ "factor": 0.01,
+ "minVal": 0,
+ "maxVal": 1000,
+ "unit": "PPM"
+ },
+ "PPM_max_C3": {
+ "name": "PPM_max_C3",
+ "description": "PPM MAX Camera 3",
+ "memAddr": "40036",
+ "tipoMem": "Int",
+ "index": 36,
+ "size": 1,
+ "factor": 0.01,
+ "minVal": 0,
+ "maxVal": 1000,
+ "unit": "PPM"
+ },
+ "PPM_min_C4": {
+ "name": "PPM_min_C4",
+ "description": "PPM min Camera 4",
+ "memAddr": "40037",
+ "tipoMem": "Int",
+ "index": 37,
+ "size": 1,
+ "factor": 0.01,
+ "minVal": 0,
+ "maxVal": 1000,
+ "unit": "PPM"
+ },
+ "PPM_max_C4": {
+ "name": "PPM_max_C4",
+ "description": "PPM MAX Camera 4",
+ "memAddr": "40038",
+ "tipoMem": "Int",
+ "index": 38,
+ "size": 1,
+ "factor": 0.01,
+ "minVal": 0,
+ "maxVal": 1000,
+ "unit": "PPM"
+ },
+ "PPM_min_C5": {
+ "name": "PPM_min_C5",
+ "description": "PPM min Camera 5",
+ "memAddr": "40039",
+ "tipoMem": "Int",
+ "index": 39,
+ "size": 1,
+ "factor": 0.01,
+ "minVal": 0,
+ "maxVal": 1000,
+ "unit": "PPM"
+ },
+ "PPM_max_C5": {
+ "name": "PPM_max_C5",
+ "description": "PPM MAX Camera 5",
+ "memAddr": "40040",
+ "tipoMem": "Int",
+ "index": 40,
+ "size": 1,
+ "factor": 0.01,
+ "minVal": 0,
+ "maxVal": 1000,
+ "unit": "PPM"
+ },
+ "PPM_min_C6": {
+ "name": "PPM_min_C6",
+ "description": "PPM min Camera 6",
+ "memAddr": "40041",
+ "tipoMem": "Int",
+ "index": 41,
+ "size": 1,
+ "factor": 0.01,
+ "minVal": 0,
+ "maxVal": 1000,
+ "unit": "PPM"
+ },
+ "PPM_max_C6": {
+ "name": "PPM_max_C6",
+ "description": "PPM MAX Camera 6",
+ "memAddr": "40042",
+ "tipoMem": "Int",
+ "index": 42,
+ "size": 1,
+ "factor": 0.01,
+ "minVal": 0,
+ "maxVal": 1000,
+ "unit": "PPM"
+ }
+ },
+ "mMapRead": {
+ "PPM_min_C1": {
+ "name": "PPM_min_C1",
+ "description": "PPM min Camera 1",
+ "memAddr": "40031",
+ "tipoMem": "Int",
+ "index": 31,
+ "size": 1,
+ "factor": 0.01,
+ "minVal": 0,
+ "maxVal": 1000,
+ "unit": "PPM"
+ },
+ "PPM_max_C1": {
+ "name": "PPM_max_C1",
+ "description": "PPM MAX Camera 1",
+ "memAddr": "40032",
+ "tipoMem": "Int",
+ "index": 32,
+ "size": 1,
+ "factor": 0.01,
+ "minVal": 0,
+ "maxVal": 1000,
+ "unit": "PPM"
+ },
+ "PPM_min_C2": {
+ "name": "PPM_min_C2",
+ "description": "PPM min Camera 2",
+ "memAddr": "40033",
+ "tipoMem": "Int",
+ "index": 33,
+ "size": 1,
+ "factor": 0.01,
+ "minVal": 0,
+ "maxVal": 1000,
+ "unit": "PPM"
+ },
+ "PPM_max_C2": {
+ "name": "PPM_max_C2",
+ "description": "PPM MAX Camera 2",
+ "memAddr": "40034",
+ "tipoMem": "Int",
+ "index": 34,
+ "size": 1,
+ "factor": 0.01,
+ "minVal": 0,
+ "maxVal": 1000,
+ "unit": "PPM"
+ },
+ "PPM_min_C3": {
+ "name": "PPM_min_C3",
+ "description": "PPM min Camera 3",
+ "memAddr": "40035",
+ "tipoMem": "Int",
+ "index": 35,
+ "size": 1,
+ "factor": 0.01,
+ "minVal": 0,
+ "maxVal": 1000,
+ "unit": "PPM"
+ },
+ "PPM_max_C3": {
+ "name": "PPM_max_C3",
+ "description": "PPM MAX Camera 3",
+ "memAddr": "40036",
+ "tipoMem": "Int",
+ "index": 36,
+ "size": 1,
+ "factor": 0.01,
+ "minVal": 0,
+ "maxVal": 1000,
+ "unit": "PPM"
+ },
+ "PPM_min_C4": {
+ "name": "PPM_min_C4",
+ "description": "PPM min Camera 4",
+ "memAddr": "40037",
+ "tipoMem": "Int",
+ "index": 37,
+ "size": 1,
+ "factor": 0.01,
+ "minVal": 0,
+ "maxVal": 1000,
+ "unit": "PPM"
+ },
+ "PPM_max_C4": {
+ "name": "PPM_max_C4",
+ "description": "PPM MAX Camera 4",
+ "memAddr": "40038",
+ "tipoMem": "Int",
+ "index": 38,
+ "size": 1,
+ "factor": 0.01,
+ "minVal": 0,
+ "maxVal": 1000,
+ "unit": "PPM"
+ },
+ "PPM_min_C5": {
+ "name": "PPM_min_C5",
+ "description": "PPM min Camera 5",
+ "memAddr": "40039",
+ "tipoMem": "Int",
+ "index": 39,
+ "size": 1,
+ "factor": 0.01,
+ "minVal": 0,
+ "maxVal": 1000,
+ "unit": "PPM"
+ },
+ "PPM_max_C5": {
+ "name": "PPM_max_C5",
+ "description": "PPM MAX Camera 5",
+ "memAddr": "40040",
+ "tipoMem": "Int",
+ "index": 40,
+ "size": 1,
+ "factor": 0.01,
+ "minVal": 0,
+ "maxVal": 1000,
+ "unit": "PPM"
+ },
+ "PPM_min_C6": {
+ "name": "PPM_min_C6",
+ "description": "PPM min Camera 6",
+ "memAddr": "40041",
+ "tipoMem": "Int",
+ "index": 41,
+ "size": 1,
+ "factor": 0.01,
+ "minVal": 0,
+ "maxVal": 1000,
+ "unit": "PPM"
+ },
+ "PPM_max_C6": {
+ "name": "PPM_max_C6",
+ "description": "PPM MAX Camera 6",
+ "memAddr": "40042",
+ "tipoMem": "Int",
+ "index": 42,
+ "size": 1,
+ "factor": 0.01,
+ "minVal": 0,
+ "maxVal": 1000,
+ "unit": "PPM"
+ },
+ "Sonda01": {
+ "name": "Sonda01",
+ "description": "Sonda 01",
+ "memAddr": "30110",
+ "tipoMem": "Int",
+ "index": 110,
+ "size": 1,
+ "func": "MAX",
+ "period": 90,
+ "factor": 0.01,
+ "minVal": 0,
+ "maxVal": 999999999,
+ "unit": "#"
+ },
+ "Sonda02": {
+ "name": "Sonda02",
+ "description": "Sonda 02",
+ "memAddr": "30120",
+ "tipoMem": "Int",
+ "index": 120,
+ "size": 1,
+ "func": "MAX",
+ "period": 90,
+ "factor": 0.01,
+ "minVal": 0,
+ "maxVal": 999999999,
+ "unit": "#"
+ },
+ "Sonda03": {
+ "name": "Sonda03",
+ "description": "Sonda 03",
+ "memAddr": "30130",
+ "tipoMem": "Int",
+ "index": 130,
+ "size": 1,
+ "func": "MAX",
+ "period": 90,
+ "factor": 0.01,
+ "minVal": 0,
+ "maxVal": 999999999,
+ "unit": "#"
+ },
+ "Sonda04": {
+ "name": "Sonda04",
+ "description": "Sonda 04",
+ "memAddr": "30140",
+ "tipoMem": "Int",
+ "index": 140,
+ "size": 1,
+ "func": "MAX",
+ "period": 90,
+ "factor": 0.01,
+ "minVal": 0,
+ "maxVal": 999999999,
+ "unit": "#"
+ },
+ "Sonda05": {
+ "name": "Sonda05",
+ "description": "Sonda 05",
+ "memAddr": "30150",
+ "tipoMem": "Int",
+ "index": 150,
+ "size": 1,
+ "func": "MAX",
+ "period": 90,
+ "factor": 0.01,
+ "minVal": 0,
+ "maxVal": 999999999,
+ "unit": "#"
+ },
+ "Sonda06": {
+ "name": "Sonda06",
+ "description": "Sonda 06",
+ "memAddr": "30160",
+ "tipoMem": "Int",
+ "index": 160,
+ "size": 1,
+ "func": "MAX",
+ "period": 90,
+ "factor": 0.01,
+ "minVal": 0,
+ "maxVal": 999999999,
+ "unit": "#"
+ },
+ "Amper01": {
+ "name": "Amper01",
+ "description": "Amper 01",
+ "memAddr": "30010",
+ "tipoMem": "Int",
+ "index": 10,
+ "size": 1,
+ "func": "MAX",
+ "period": 90,
+ "factor": 1,
+ "minVal": 0,
+ "maxVal": 999999999,
+ "unit": "#"
+ },
+ "Amper02": {
+ "name": "Amper02",
+ "description": "Amper 02",
+ "memAddr": "30011",
+ "tipoMem": "Int",
+ "index": 11,
+ "size": 1,
+ "func": "MAX",
+ "period": 90,
+ "factor": 1,
+ "minVal": 0,
+ "maxVal": 999999999,
+ "unit": "#"
+ },
+ "Amper03": {
+ "name": "Amper03",
+ "description": "Amper 03",
+ "memAddr": "30012",
+ "tipoMem": "Int",
+ "index": 12,
+ "size": 1,
+ "func": "MAX",
+ "period": 90,
+ "factor": 1,
+ "minVal": 0,
+ "maxVal": 999999999,
+ "unit": "#"
+ },
+ "Amper04": {
+ "name": "Amper04",
+ "description": "Amper 04",
+ "memAddr": "30013",
+ "tipoMem": "Int",
+ "index": 13,
+ "size": 1,
+ "func": "MAX",
+ "period": 90,
+ "factor": 1,
+ "minVal": 0,
+ "maxVal": 999999999,
+ "unit": "#"
+ },
+ "Amper05": {
+ "name": "Amper05",
+ "description": "Amper 05",
+ "memAddr": "30014",
+ "tipoMem": "Int",
+ "index": 14,
+ "size": 1,
+ "func": "MAX",
+ "period": 90,
+ "factor": 1,
+ "minVal": 0,
+ "maxVal": 999999999,
+ "unit": "#"
+ },
+ "Amper06": {
+ "name": "Amper06",
+ "description": "Amper 06",
+ "memAddr": "30015",
+ "tipoMem": "Int",
+ "index": 15,
+ "size": 1,
+ "func": "MAX",
+ "period": 90,
+ "factor": 1,
+ "minVal": 0,
+ "maxVal": 999999999,
+ "unit": "#"
+ },
+ "Amper07": {
+ "name": "Amper07",
+ "description": "Amper 07",
+ "memAddr": "30016",
+ "tipoMem": "Int",
+ "index": 16,
+ "size": 1,
+ "func": "MAX",
+ "period": 90,
+ "factor": 1,
+ "minVal": 0,
+ "maxVal": 999999999,
+ "unit": "#"
+ },
+ "Amper08": {
+ "name": "Amper08",
+ "description": "Amper 08",
+ "memAddr": "30017",
+ "tipoMem": "Int",
+ "index": 17,
+ "size": 1,
+ "func": "MAX",
+ "period": 90,
+ "factor": 1,
+ "minVal": 0,
+ "maxVal": 999999999,
+ "unit": "#"
+ },
+ "ContCam01": {
+ "name": "ContCam01",
+ "description": "Cont Camera 01",
+ "memAddr": "30021",
+ "tipoMem": "Int",
+ "index": 21,
+ "size": 1,
+ "func": "MAX",
+ "period": 90,
+ "factor": 1,
+ "minVal": 0,
+ "maxVal": 999999999,
+ "unit": "#"
+ },
+ "ContCam02": {
+ "name": "ContCam02",
+ "description": "Cont Camera 02",
+ "memAddr": "30022",
+ "tipoMem": "Int",
+ "index": 22,
+ "size": 1,
+ "func": "MAX",
+ "period": 90,
+ "factor": 1,
+ "minVal": 0,
+ "maxVal": 999999999,
+ "unit": "#"
+ },
+ "ContCam03": {
+ "name": "ContCam03",
+ "description": "Cont Camera 03",
+ "memAddr": "30023",
+ "tipoMem": "Int",
+ "index": 23,
+ "size": 1,
+ "func": "MAX",
+ "period": 90,
+ "factor": 1,
+ "minVal": 0,
+ "maxVal": 999999999,
+ "unit": "#"
+ },
+ "ContCam04": {
+ "name": "ContCam04",
+ "description": "Cont Camera 04",
+ "memAddr": "30024",
+ "tipoMem": "Int",
+ "index": 24,
+ "size": 1,
+ "func": "MAX",
+ "period": 90,
+ "factor": 1,
+ "minVal": 0,
+ "maxVal": 999999999,
+ "unit": "#"
+ },
+ "ContCam05": {
+ "name": "ContCam05",
+ "description": "Cont Camera 05",
+ "memAddr": "30025",
+ "tipoMem": "Int",
+ "index": 25,
+ "size": 1,
+ "func": "MAX",
+ "period": 90,
+ "factor": 1,
+ "minVal": 0,
+ "maxVal": 999999999,
+ "unit": "#"
+ },
+ "ContCam06": {
+ "name": "ContCam06",
+ "description": "Cont Camera 06",
+ "memAddr": "30026",
+ "tipoMem": "Int",
+ "index": 26,
+ "size": 1,
+ "func": "MAX",
+ "period": 90,
+ "factor": 1,
+ "minVal": 0,
+ "maxVal": 999999999,
+ "unit": "#"
+ }
+ },
+ "optMemPar": {
+ "AlarmBitCond": "10002.0=0",
+ "WorkBitCond": "10001.0=1"
+ },
+ "fileDecod": {
+ "Product": 3,
+ "Variety": 9,
+ "Supplier": 8,
+ "ExtDoc": 2,
+ "DateRif": 14,
+ "QtyTot": 22,
+ "NumPack": 21,
+ "NumPed": 17,
+ "PackPed": 18,
+ "PesoPack": 20
+ }
+}
\ No newline at end of file
diff --git a/IOB-WIN-MBUS/DATA/CONF/GIACO_SAIM_003_MBlock.json b/IOB-WIN-MBUS/DATA/CONF/GIACO_SAIM_003_MBlock.json
new file mode 100644
index 00000000..6b5b471c
--- /dev/null
+++ b/IOB-WIN-MBUS/DATA/CONF/GIACO_SAIM_003_MBlock.json
@@ -0,0 +1,10 @@
+{
+ "ReadBlocks": {
+ "10000": 10,
+ "10100": 10,
+ "30000": 50,
+ "30100": 40,
+ "30140": 30,
+ "40030": 20
+ }
+}
\ No newline at end of file
diff --git a/IOB-WIN-MBUS/DATA/CONF/GIACO_ZPACK_L1_P1.ini b/IOB-WIN-MBUS/DATA/CONF/GIACO_ZPACK_L1_P1.ini
new file mode 100644
index 00000000..cbe3fda0
--- /dev/null
+++ b/IOB-WIN-MBUS/DATA/CONF/GIACO_ZPACK_L1_P1.ini
@@ -0,0 +1,86 @@
+;Configurazione IOB-WIN
+[IOB]
+;Impianto Zetapack di Locorotondo (test) - Giacovelli
+CNCTYPE=MODBUS_TCP_ZETAPACK
+PING_MS_TIMEOUT=1000
+MinDeltaSec=5
+
+[MACHINE]
+VENDOR=Zetapack
+MODEL=Calibratrice Linea 1
+
+[CNC]
+IP=192.168.16.11
+PORT=8000
+
+[SERVER]
+MPIP=http://192.168.1.14
+MPURL=/MP/IO
+CMDBASE=/IOB/input/
+CMDFLOG=/IOB/flog/
+CMDALIVE=/IOB
+CMDENABLED=/IOB/enabled/
+CMDADV1=?valore=
+CMDREBO=/sendReboot.aspx?idxMacchina=
+
+[MEMORY]
+ADDR_READ=40001
+ADDR_WRITE=40001
+SIZE_READ=10
+SIZE_WRITE=0
+HR_BASE_ADDR=40000
+DELTA_BASE=0
+
+
+[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
+PZCOUNT_MODE=STD.DB85.DBRE16
+DISABLE_PZCOUNT=TRUE
+ENABLE_SEND_PZC_BLOCK=TRUE
+MIN_SEND_PZC_BLOCK=0
+MAX_SEND_PZC_BLOCK=100
+; GEST DATI DYN
+ENABLE_DYN_DATA=TRUE
+FORCE_DYN_DATA=TRUE
+; gestione delta minimo accettabile tra min/MAX
+DELTA_VAL=0.1
+DISABLE_SEND_WDST=TRUE
+
+; clock base (da 10ms)
+timerIntMs=10
+
+; conf parametri memoria READ/WRITE
+PARAM_CONF=GIACO_ZPACK_L1_P1.json
+
+NO_PING=FALSE
+; conf blocchi memoria x READ
+MEM_BLOCK=GIACO_ZPACK_L1_P1_MBlock.json
+; conf aree allarme
+ALARM_CONF=GIACO_ZPACK_L1_P1_alarm.json
+
+; rimozione check limiti min/max dynData
+disDynDataRangeCheck=true
+
+[BRANCH]
+NAME=master
+
+; Tags manuali
+[TAGS]
+Customer=Giacovelli-Loco
+HostOS=WIN
+HostName=MAPO-GTW-LOC
+HostAddr=192.168.1.93
diff --git a/IOB-WIN-MBUS/DATA/CONF/GIACO_ZPACK_L1_P1.json b/IOB-WIN-MBUS/DATA/CONF/GIACO_ZPACK_L1_P1.json
new file mode 100644
index 00000000..1c48bdfd
--- /dev/null
+++ b/IOB-WIN-MBUS/DATA/CONF/GIACO_ZPACK_L1_P1.json
@@ -0,0 +1,67 @@
+{
+ "mMapWrite": {
+ "setComm": {
+ "name": "setComm",
+ "description": "Commessa",
+ "memAddr": "40050",
+ "tipoMem": "String",
+ "index": 50,
+ "size": 24
+ }
+ },
+ "mMapRead": {
+ "AmpMot1": {
+ "name": "AmpMot1",
+ "description": "Assorbimento (MAX) motore 1 - calibratrice",
+ "memAddr": "40003",
+ "tipoMem": "Int",
+ "index": 3,
+ "size": 1,
+ "func": "MAX",
+ "period": 90,
+ "factor": 0.01,
+ "minVal": 0,
+ "maxVal": 999,
+ "unit": "%"
+ },
+ "AmpMot2": {
+ "name": "AmpMot2",
+ "description": "Assorbimento (MAX) Motore 2 - nastro dosi",
+ "memAddr": "40004",
+ "tipoMem": "Int",
+ "index": 4,
+ "size": 1,
+ "func": "MAX",
+ "period": 90,
+ "factor": 0.01,
+ "minVal": 0,
+ "maxVal": 999,
+ "unit": "%"
+ },
+ "AmpMot3": {
+ "name": "AmpMot3",
+ "description": "Assorbimento (MAX) motore 3 - curva ingresso",
+ "memAddr": "40005",
+ "tipoMem": "Int",
+ "index": 5,
+ "size": 1,
+ "func": "MAX",
+ "period": 90,
+ "factor": 0.01,
+ "minVal": 0,
+ "maxVal": 999,
+ "unit": "%"
+ }
+ },
+ "optMemPar": {
+ "AlarmIntCond": "40000|0=0",
+ "ManualIntCond": "40000|0=1",
+ "EStopBitCond": "40001.0=1",
+ "WorkIntCond": "40000|0=2,4,5"
+ },
+ "paramsEndThresh": {
+ "AmpMot1": 1,
+ "AmpMot2": 1,
+ "AmpMot3": 1
+ }
+}
\ No newline at end of file
diff --git a/IOB-WIN-MBUS/DATA/CONF/GIACO_ZPACK_L1_P1_MBlock.json b/IOB-WIN-MBUS/DATA/CONF/GIACO_ZPACK_L1_P1_MBlock.json
new file mode 100644
index 00000000..ccd2b5e4
--- /dev/null
+++ b/IOB-WIN-MBUS/DATA/CONF/GIACO_ZPACK_L1_P1_MBlock.json
@@ -0,0 +1,5 @@
+{
+ "ReadBlocks": {
+ "40000": 10
+ }
+}
\ No newline at end of file
diff --git a/IOB-WIN-MBUS/DATA/CONF/GIACO_ZPACK_L1_P1_alarm.json b/IOB-WIN-MBUS/DATA/CONF/GIACO_ZPACK_L1_P1_alarm.json
new file mode 100644
index 00000000..3503d427
--- /dev/null
+++ b/IOB-WIN-MBUS/DATA/CONF/GIACO_ZPACK_L1_P1_alarm.json
@@ -0,0 +1,52 @@
+[
+ {
+ "description": "Allarmi Impianto",
+ "tipoMem": "DInt",
+ "memAddr": "40000",
+ "index": 0,
+ "size": 2,
+ "messages": [
+ "##",
+ "##",
+ "##",
+ "##",
+ "##",
+ "##",
+ "##",
+ "##",
+ "EMERGENZA GENERALE",
+ "TERMICO SCATTATO",
+ "FAULT INVERTER",
+ "FAULT STEPPER",
+ "CARTER APERTI",
+ "PORTA SX APERTA",
+ "PORTA DX APERTA",
+ "CARTER APERTI"
+ ]
+ },
+ {
+ "description": "Allarmi Impianto",
+ "tipoMem": "DInt",
+ "memAddr": "40002",
+ "index": 2,
+ "size": 2,
+ "messages": [
+ "TOUT BF NASTRO 1",
+ "TOUT BF NASTRO 2",
+ "TOUT BF NASTRO 3",
+ "TOUT BF NASTRO 4",
+ "TOUT BF NASTRO 5",
+ "TOUT BF NASTRO 6",
+ "ALL MOTORULLO 1",
+ "ALL MOTORULLO 2",
+ "ALL MOTORULLO 3",
+ "ALL MOTORULLO 4",
+ "ALL MOTORULLO 5",
+ "ALL MOTORULLO 6",
+ "",
+ "",
+ "",
+ ""
+ ]
+ }
+]
\ No newline at end of file
diff --git a/IOB-WIN-MBUS/DATA/CONF/GIACO_ZPACK_L1_P2.ini b/IOB-WIN-MBUS/DATA/CONF/GIACO_ZPACK_L1_P2.ini
new file mode 100644
index 00000000..b76f291b
--- /dev/null
+++ b/IOB-WIN-MBUS/DATA/CONF/GIACO_ZPACK_L1_P2.ini
@@ -0,0 +1,86 @@
+;Configurazione IOB-WIN
+[IOB]
+;Impianto Zetapack di Locorotondo (test) - Giacovelli
+CNCTYPE=MODBUS_TCP_ZETAPACK
+PING_MS_TIMEOUT=1000
+MinDeltaSec=5
+
+[MACHINE]
+VENDOR=Zetapack
+MODEL=Banco Linea 1
+
+[CNC]
+IP=192.168.16.12
+PORT=502
+
+[SERVER]
+MPIP=http://192.168.1.14
+MPURL=/MP/IO
+CMDBASE=/IOB/input/
+CMDFLOG=/IOB/flog/
+CMDALIVE=/IOB
+CMDENABLED=/IOB/enabled/
+CMDADV1=?valore=
+CMDREBO=/sendReboot.aspx?idxMacchina=
+
+[MEMORY]
+ADDR_READ=40001
+ADDR_WRITE=40001
+SIZE_READ=10
+SIZE_WRITE=0
+HR_BASE_ADDR=40000
+DELTA_BASE=0
+
+
+[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
+PZCOUNT_MODE=STD.DB85.DBRE16
+DISABLE_PZCOUNT=TRUE
+ENABLE_SEND_PZC_BLOCK=TRUE
+MIN_SEND_PZC_BLOCK=0
+MAX_SEND_PZC_BLOCK=100
+; GEST DATI DYN
+ENABLE_DYN_DATA=TRUE
+FORCE_DYN_DATA=TRUE
+; gestione delta minimo accettabile tra min/MAX
+DELTA_VAL=0.1
+DISABLE_SEND_WDST=TRUE
+
+; clock base (da 10ms)
+timerIntMs=10
+
+; conf parametri memoria READ/WRITE
+PARAM_CONF=GIACO_ZPACK_L1_P2.json
+
+NO_PING=FALSE
+; conf blocchi memoria x READ
+MEM_BLOCK=GIACO_ZPACK_L1_P2_MBlock.json
+; conf aree allarme
+ALARM_CONF=GIACO_ZPACK_L1_P2_alarm.json
+
+; rimozione check limiti min/max dynData
+disDynDataRangeCheck=true
+
+[BRANCH]
+NAME=master
+
+; Tags manuali
+[TAGS]
+Customer=Giacovelli-Loco
+HostOS=WIN
+HostName=MAPO-GTW-LOC
+HostAddr=192.168.1.93
diff --git a/IOB-WIN-MBUS/DATA/CONF/GIACO_ZPACK_L1_P2.json b/IOB-WIN-MBUS/DATA/CONF/GIACO_ZPACK_L1_P2.json
new file mode 100644
index 00000000..2267bfce
--- /dev/null
+++ b/IOB-WIN-MBUS/DATA/CONF/GIACO_ZPACK_L1_P2.json
@@ -0,0 +1,112 @@
+{
+ "mMapWrite": {
+ "setComm": {
+ "name": "setComm",
+ "description": "Commessa",
+ "memAddr": "40050",
+ "tipoMem": "String",
+ "index": 50,
+ "size": 24
+ }
+ },
+ "mMapRead": {
+ "AmpMot1": {
+ "name": "AmpMot1",
+ "description": "Assorbimento (MAX) motore 1 - catena linea1 motore 1 tazze A4.2",
+ "memAddr": "40003",
+ "tipoMem": "Int",
+ "index": 3,
+ "size": 1,
+ "func": "MAX",
+ "period": 90,
+ "factor": 0.01,
+ "minVal": 0,
+ "maxVal": 999,
+ "unit": "%"
+ },
+ "AmpMot2": {
+ "name": "AmpMot2",
+ "description": "Assorbimento (MAX) motore 2 - catena linea2 motore 2 tazze A4.2",
+ "memAddr": "40004",
+ "tipoMem": "Int",
+ "index": 4,
+ "size": 1,
+ "func": "MAX",
+ "period": 90,
+ "factor": 0.01,
+ "minVal": 0,
+ "maxVal": 999,
+ "unit": "%"
+ },
+ "AmpMot3": {
+ "name": "AmpMot3",
+ "description": "Assorbimento (MAX) motore 3 - nastro uscita cesti motore 3 A2.4",
+ "memAddr": "40005",
+ "tipoMem": "Int",
+ "index": 5,
+ "size": 1,
+ "func": "MAX",
+ "period": 90,
+ "factor": 0.01,
+ "minVal": 0,
+ "maxVal": 999,
+ "unit": "%"
+ },
+ "AmpMot4": {
+ "name": "AmpMot4",
+ "description": "Assorbimento (MAX) motore 4 - curva uscita cesti motore 4 A2.4",
+ "memAddr": "40006",
+ "tipoMem": "Int",
+ "index": 6,
+ "size": 1,
+ "func": "MAX",
+ "period": 90,
+ "factor": 0.01,
+ "minVal": 0,
+ "maxVal": 999,
+ "unit": "%"
+ },
+ "AmpMot5": {
+ "name": "AmpMot5",
+ "description": "Assorbimento (MAX) motore 5 - nastro ingresso casse vuote motore 5 A2.4",
+ "memAddr": "40007",
+ "tipoMem": "Int",
+ "index": 7,
+ "size": 1,
+ "func": "MAX",
+ "period": 90,
+ "factor": 0.01,
+ "minVal": 0,
+ "maxVal": 999,
+ "unit": "%"
+ },
+ "ContCasse": {
+ "name": "ContCasse",
+ "description": "Conteggio Casse (Auto con cassa)",
+ "memAddr": "41070",
+ "tipoMem": "DInt",
+ "index": 1070,
+ "size": 2,
+ "func": "MAX",
+ "period": 90,
+ "factor": 1,
+ "minVal": 0,
+ "maxVal": 999999,
+ "unit": "%"
+ }
+ },
+ "optMemPar": {
+ "AlarmIntCond": "40000|0=0",
+ "ManualIntCond": "40000|0=1",
+ "EStopBitCond": "40001.0=1",
+ "WorkIntCond": "40000|0=2,4"
+ },
+ "paramsEndThresh": {
+ "AmpMot1": 1,
+ "AmpMot2": 1,
+ "AmpMot3": 1,
+ "AmpMot4": 1,
+ "AmpMot5": 1,
+ "ContCasse": 2
+ }
+}
\ No newline at end of file
diff --git a/IOB-WIN-MBUS/DATA/CONF/GIACO_ZPACK_L1_P2_MBlock.json b/IOB-WIN-MBUS/DATA/CONF/GIACO_ZPACK_L1_P2_MBlock.json
new file mode 100644
index 00000000..ccd2b5e4
--- /dev/null
+++ b/IOB-WIN-MBUS/DATA/CONF/GIACO_ZPACK_L1_P2_MBlock.json
@@ -0,0 +1,5 @@
+{
+ "ReadBlocks": {
+ "40000": 10
+ }
+}
\ No newline at end of file
diff --git a/IOB-WIN-MBUS/DATA/CONF/GIACO_ZPACK_L1_P2_alarm.json b/IOB-WIN-MBUS/DATA/CONF/GIACO_ZPACK_L1_P2_alarm.json
new file mode 100644
index 00000000..3503d427
--- /dev/null
+++ b/IOB-WIN-MBUS/DATA/CONF/GIACO_ZPACK_L1_P2_alarm.json
@@ -0,0 +1,52 @@
+[
+ {
+ "description": "Allarmi Impianto",
+ "tipoMem": "DInt",
+ "memAddr": "40000",
+ "index": 0,
+ "size": 2,
+ "messages": [
+ "##",
+ "##",
+ "##",
+ "##",
+ "##",
+ "##",
+ "##",
+ "##",
+ "EMERGENZA GENERALE",
+ "TERMICO SCATTATO",
+ "FAULT INVERTER",
+ "FAULT STEPPER",
+ "CARTER APERTI",
+ "PORTA SX APERTA",
+ "PORTA DX APERTA",
+ "CARTER APERTI"
+ ]
+ },
+ {
+ "description": "Allarmi Impianto",
+ "tipoMem": "DInt",
+ "memAddr": "40002",
+ "index": 2,
+ "size": 2,
+ "messages": [
+ "TOUT BF NASTRO 1",
+ "TOUT BF NASTRO 2",
+ "TOUT BF NASTRO 3",
+ "TOUT BF NASTRO 4",
+ "TOUT BF NASTRO 5",
+ "TOUT BF NASTRO 6",
+ "ALL MOTORULLO 1",
+ "ALL MOTORULLO 2",
+ "ALL MOTORULLO 3",
+ "ALL MOTORULLO 4",
+ "ALL MOTORULLO 5",
+ "ALL MOTORULLO 6",
+ "",
+ "",
+ "",
+ ""
+ ]
+ }
+]
\ No newline at end of file
diff --git a/IOB-WIN-MBUS/DATA/CONF/GIACO_ZPACK_L2_P1.ini b/IOB-WIN-MBUS/DATA/CONF/GIACO_ZPACK_L2_P1.ini
new file mode 100644
index 00000000..fa6becd7
--- /dev/null
+++ b/IOB-WIN-MBUS/DATA/CONF/GIACO_ZPACK_L2_P1.ini
@@ -0,0 +1,86 @@
+;Configurazione IOB-WIN
+[IOB]
+;Impianto Zetapack di Locorotondo (test) - Giacovelli
+CNCTYPE=MODBUS_TCP_ZETAPACK
+PING_MS_TIMEOUT=1000
+MinDeltaSec=5
+
+[MACHINE]
+VENDOR=Zetapack
+MODEL=Calibratrice Linea 2
+
+[CNC]
+IP=192.168.16.21
+PORT=8000
+
+[SERVER]
+MPIP=http://192.168.1.14
+MPURL=/MP/IO
+CMDBASE=/IOB/input/
+CMDFLOG=/IOB/flog/
+CMDALIVE=/IOB
+CMDENABLED=/IOB/enabled/
+CMDADV1=?valore=
+CMDREBO=/sendReboot.aspx?idxMacchina=
+
+[MEMORY]
+ADDR_READ=40001
+ADDR_WRITE=40001
+SIZE_READ=10
+SIZE_WRITE=0
+HR_BASE_ADDR=40000
+DELTA_BASE=0
+
+
+[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
+PZCOUNT_MODE=STD.DB85.DBRE16
+DISABLE_PZCOUNT=TRUE
+ENABLE_SEND_PZC_BLOCK=TRUE
+MIN_SEND_PZC_BLOCK=0
+MAX_SEND_PZC_BLOCK=100
+; GEST DATI DYN
+ENABLE_DYN_DATA=TRUE
+FORCE_DYN_DATA=TRUE
+; gestione delta minimo accettabile tra min/MAX
+DELTA_VAL=0.1
+DISABLE_SEND_WDST=TRUE
+
+; clock base (da 10ms)
+timerIntMs=10
+
+; conf parametri memoria READ/WRITE
+PARAM_CONF=GIACO_ZPACK_L2_P1.json
+
+NO_PING=FALSE
+; conf blocchi memoria x READ
+MEM_BLOCK=GIACO_ZPACK_L2_P1_MBlock.json
+; conf aree allarme
+ALARM_CONF=GIACO_ZPACK_L2_P1_alarm.json
+
+; rimozione check limiti min/max dynData
+disDynDataRangeCheck=true
+
+[BRANCH]
+NAME=master
+
+; Tags manuali
+[TAGS]
+Customer=Giacovelli-Loco
+HostOS=WIN
+HostName=MAPO-GTW-LOC
+HostAddr=192.168.1.93
diff --git a/IOB-WIN-MBUS/DATA/CONF/GIACO_ZPACK_L2_P1.json b/IOB-WIN-MBUS/DATA/CONF/GIACO_ZPACK_L2_P1.json
new file mode 100644
index 00000000..ea8e2abd
--- /dev/null
+++ b/IOB-WIN-MBUS/DATA/CONF/GIACO_ZPACK_L2_P1.json
@@ -0,0 +1,67 @@
+{
+ "mMapWrite": {
+ "setComm": {
+ "name": "setComm",
+ "description": "Commessa",
+ "memAddr": "40050",
+ "tipoMem": "String",
+ "index": 50,
+ "size": 20
+ }
+ },
+ "mMapRead": {
+ "AmpMot1": {
+ "name": "AmpMot1",
+ "description": "Assorbimento (MAX) motore 1 - calibratrice",
+ "memAddr": "40003",
+ "tipoMem": "Int",
+ "index": 3,
+ "size": 1,
+ "func": "MAX",
+ "period": 90,
+ "factor": 0.01,
+ "minVal": 0,
+ "maxVal": 999,
+ "unit": "%"
+ },
+ "AmpMot2": {
+ "name": "AmpMot2",
+ "description": "Assorbimento (MAX) motore 2 - nastro dosi",
+ "memAddr": "40004",
+ "tipoMem": "Int",
+ "index": 4,
+ "size": 1,
+ "func": "MAX",
+ "period": 90,
+ "factor": 0.01,
+ "minVal": 0,
+ "maxVal": 999,
+ "unit": "%"
+ },
+ "AmpMot3": {
+ "name": "AmpMot3",
+ "description": "Assorbimento (MAX) motore 3 - curva ingresso",
+ "memAddr": "40005",
+ "tipoMem": "Int",
+ "index": 5,
+ "size": 1,
+ "func": "MAX",
+ "period": 90,
+ "factor": 0.01,
+ "minVal": 0,
+ "maxVal": 999,
+ "unit": "%"
+ }
+ },
+ "optMemPar": {
+ "AlarmIntCond": "40000|0=0",
+ "ManualIntCond": "40000|0=1",
+ "EStopBitCond": "40001.0=1",
+ "WorkIntCond": "40000|0=2,4,5"
+ },
+ "paramsEndThresh": {
+ "AmpMot1": 1,
+ "AmpMot2": 1,
+ "AmpMot3": 1
+ }
+}
\ No newline at end of file
diff --git a/IOB-WIN-MBUS/DATA/CONF/GIACO_ZPACK_L2_P1_MBlock.json b/IOB-WIN-MBUS/DATA/CONF/GIACO_ZPACK_L2_P1_MBlock.json
new file mode 100644
index 00000000..ccd2b5e4
--- /dev/null
+++ b/IOB-WIN-MBUS/DATA/CONF/GIACO_ZPACK_L2_P1_MBlock.json
@@ -0,0 +1,5 @@
+{
+ "ReadBlocks": {
+ "40000": 10
+ }
+}
\ No newline at end of file
diff --git a/IOB-WIN-MBUS/DATA/CONF/GIACO_ZPACK_L2_P1_alarm.json b/IOB-WIN-MBUS/DATA/CONF/GIACO_ZPACK_L2_P1_alarm.json
new file mode 100644
index 00000000..3503d427
--- /dev/null
+++ b/IOB-WIN-MBUS/DATA/CONF/GIACO_ZPACK_L2_P1_alarm.json
@@ -0,0 +1,52 @@
+[
+ {
+ "description": "Allarmi Impianto",
+ "tipoMem": "DInt",
+ "memAddr": "40000",
+ "index": 0,
+ "size": 2,
+ "messages": [
+ "##",
+ "##",
+ "##",
+ "##",
+ "##",
+ "##",
+ "##",
+ "##",
+ "EMERGENZA GENERALE",
+ "TERMICO SCATTATO",
+ "FAULT INVERTER",
+ "FAULT STEPPER",
+ "CARTER APERTI",
+ "PORTA SX APERTA",
+ "PORTA DX APERTA",
+ "CARTER APERTI"
+ ]
+ },
+ {
+ "description": "Allarmi Impianto",
+ "tipoMem": "DInt",
+ "memAddr": "40002",
+ "index": 2,
+ "size": 2,
+ "messages": [
+ "TOUT BF NASTRO 1",
+ "TOUT BF NASTRO 2",
+ "TOUT BF NASTRO 3",
+ "TOUT BF NASTRO 4",
+ "TOUT BF NASTRO 5",
+ "TOUT BF NASTRO 6",
+ "ALL MOTORULLO 1",
+ "ALL MOTORULLO 2",
+ "ALL MOTORULLO 3",
+ "ALL MOTORULLO 4",
+ "ALL MOTORULLO 5",
+ "ALL MOTORULLO 6",
+ "",
+ "",
+ "",
+ ""
+ ]
+ }
+]
\ No newline at end of file
diff --git a/IOB-WIN-MBUS/DATA/CONF/GIACO_ZPACK_L2_P2.ini b/IOB-WIN-MBUS/DATA/CONF/GIACO_ZPACK_L2_P2.ini
new file mode 100644
index 00000000..c1ae9e69
--- /dev/null
+++ b/IOB-WIN-MBUS/DATA/CONF/GIACO_ZPACK_L2_P2.ini
@@ -0,0 +1,86 @@
+;Configurazione IOB-WIN
+[IOB]
+;Impianto Zetapack di Locorotondo (test) - Giacovelli
+CNCTYPE=MODBUS_TCP_ZETAPACK
+PING_MS_TIMEOUT=1000
+MinDeltaSec=5
+
+[MACHINE]
+VENDOR=Zetapack
+MODEL=Banco Linea 2
+
+[CNC]
+IP=192.168.16.22
+PORT=502
+
+[SERVER]
+MPIP=http://192.168.1.14
+MPURL=/MP/IO
+CMDBASE=/IOB/input/
+CMDFLOG=/IOB/flog/
+CMDALIVE=/IOB
+CMDENABLED=/IOB/enabled/
+CMDADV1=?valore=
+CMDREBO=/sendReboot.aspx?idxMacchina=
+
+[MEMORY]
+ADDR_READ=40001
+ADDR_WRITE=40001
+SIZE_READ=10
+SIZE_WRITE=0
+HR_BASE_ADDR=40000
+DELTA_BASE=0
+
+
+[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
+PZCOUNT_MODE=STD.DB85.DBRE16
+DISABLE_PZCOUNT=TRUE
+ENABLE_SEND_PZC_BLOCK=TRUE
+MIN_SEND_PZC_BLOCK=0
+MAX_SEND_PZC_BLOCK=100
+; GEST DATI DYN
+ENABLE_DYN_DATA=TRUE
+FORCE_DYN_DATA=TRUE
+; gestione delta minimo accettabile tra min/MAX
+DELTA_VAL=0.1
+DISABLE_SEND_WDST=TRUE
+
+; clock base (da 10ms)
+timerIntMs=10
+
+; conf parametri memoria READ/WRITE
+PARAM_CONF=GIACO_ZPACK_L2_P2.json
+
+NO_PING=FALSE
+; conf blocchi memoria x READ
+MEM_BLOCK=GIACO_ZPACK_L2_P2_MBlock.json
+; conf aree allarme
+ALARM_CONF=GIACO_ZPACK_L2_P2_alarm.json
+
+; rimozione check limiti min/max dynData
+disDynDataRangeCheck=true
+
+[BRANCH]
+NAME=master
+
+; Tags manuali
+[TAGS]
+Customer=Giacovelli-Loco
+HostOS=WIN
+HostName=MAPO-GTW-LOC
+HostAddr=192.168.1.93
diff --git a/IOB-WIN-MBUS/DATA/CONF/GIACO_ZPACK_L2_P2.json b/IOB-WIN-MBUS/DATA/CONF/GIACO_ZPACK_L2_P2.json
new file mode 100644
index 00000000..8a3bfab3
--- /dev/null
+++ b/IOB-WIN-MBUS/DATA/CONF/GIACO_ZPACK_L2_P2.json
@@ -0,0 +1,112 @@
+{
+ "mMapWrite": {
+ "setComm": {
+ "name": "setComm",
+ "description": "Commessa",
+ "memAddr": "40050",
+ "tipoMem": "String",
+ "index": 50,
+ "size": 20
+ }
+ },
+ "mMapRead": {
+ "AmpMot1": {
+ "name": "AmpMot1",
+ "description": "Assorbimento (MAX) motore 1 - catena linea1 motore 1 tazze A4.2",
+ "memAddr": "40003",
+ "tipoMem": "Int",
+ "index": 3,
+ "size": 1,
+ "func": "MAX",
+ "period": 90,
+ "factor": 0.01,
+ "minVal": 0,
+ "maxVal": 999,
+ "unit": "%"
+ },
+ "AmpMot2": {
+ "name": "AmpMot2",
+ "description": "Assorbimento (MAX) motore 2 - catena linea2 motore 2 tazze A4.2",
+ "memAddr": "40004",
+ "tipoMem": "Int",
+ "index": 4,
+ "size": 1,
+ "func": "MAX",
+ "period": 90,
+ "factor": 0.01,
+ "minVal": 0,
+ "maxVal": 999,
+ "unit": "%"
+ },
+ "AmpMot3": {
+ "name": "AmpMot3",
+ "description": "Assorbimento (MAX) motore 3 - nastro uscita cesti motore 3 A2.4",
+ "memAddr": "40005",
+ "tipoMem": "Int",
+ "index": 5,
+ "size": 1,
+ "func": "MAX",
+ "period": 90,
+ "factor": 0.01,
+ "minVal": 0,
+ "maxVal": 999,
+ "unit": "%"
+ },
+ "AmpMot4": {
+ "name": "AmpMot4",
+ "description": "Assorbimento (MAX) motore 4 - curva uscita cesti motore 4 A2.4",
+ "memAddr": "40006",
+ "tipoMem": "Int",
+ "index": 6,
+ "size": 1,
+ "func": "MAX",
+ "period": 90,
+ "factor": 0.01,
+ "minVal": 0,
+ "maxVal": 999,
+ "unit": "%"
+ },
+ "AmpMot5": {
+ "name": "AmpMot5",
+ "description": "Assorbimento (MAX) motore 5 - nastro ingresso casse vuote motore 5 A2.4",
+ "memAddr": "40007",
+ "tipoMem": "Int",
+ "index": 7,
+ "size": 1,
+ "func": "MAX",
+ "period": 90,
+ "factor": 0.01,
+ "minVal": 0,
+ "maxVal": 999,
+ "unit": "%"
+ },
+ "ContCasse": {
+ "name": "ContCasse",
+ "description": "Conteggio Casse (Auto con cassa)",
+ "memAddr": "41070",
+ "tipoMem": "DInt",
+ "index": 1070,
+ "size": 2,
+ "func": "MAX",
+ "period": 90,
+ "factor": 1,
+ "minVal": 0,
+ "maxVal": 999999,
+ "unit": "%"
+ }
+ },
+ "optMemPar": {
+ "AlarmIntCond": "40000|0=0",
+ "ManualIntCond": "40000|0=1",
+ "EStopBitCond": "40001.0=1",
+ "WorkIntCond": "40000|0=2,4"
+ },
+ "paramsEndThresh": {
+ "AmpMot1": 1,
+ "AmpMot2": 1,
+ "AmpMot3": 1,
+ "AmpMot4": 1,
+ "AmpMot5": 1,
+ "ContCasse": 2
+ }
+}
\ No newline at end of file
diff --git a/IOB-WIN-MBUS/DATA/CONF/GIACO_ZPACK_L2_P2_MBlock.json b/IOB-WIN-MBUS/DATA/CONF/GIACO_ZPACK_L2_P2_MBlock.json
new file mode 100644
index 00000000..ccd2b5e4
--- /dev/null
+++ b/IOB-WIN-MBUS/DATA/CONF/GIACO_ZPACK_L2_P2_MBlock.json
@@ -0,0 +1,5 @@
+{
+ "ReadBlocks": {
+ "40000": 10
+ }
+}
\ No newline at end of file
diff --git a/IOB-WIN-MBUS/DATA/CONF/GIACO_ZPACK_L2_P2_alarm.json b/IOB-WIN-MBUS/DATA/CONF/GIACO_ZPACK_L2_P2_alarm.json
new file mode 100644
index 00000000..3503d427
--- /dev/null
+++ b/IOB-WIN-MBUS/DATA/CONF/GIACO_ZPACK_L2_P2_alarm.json
@@ -0,0 +1,52 @@
+[
+ {
+ "description": "Allarmi Impianto",
+ "tipoMem": "DInt",
+ "memAddr": "40000",
+ "index": 0,
+ "size": 2,
+ "messages": [
+ "##",
+ "##",
+ "##",
+ "##",
+ "##",
+ "##",
+ "##",
+ "##",
+ "EMERGENZA GENERALE",
+ "TERMICO SCATTATO",
+ "FAULT INVERTER",
+ "FAULT STEPPER",
+ "CARTER APERTI",
+ "PORTA SX APERTA",
+ "PORTA DX APERTA",
+ "CARTER APERTI"
+ ]
+ },
+ {
+ "description": "Allarmi Impianto",
+ "tipoMem": "DInt",
+ "memAddr": "40002",
+ "index": 2,
+ "size": 2,
+ "messages": [
+ "TOUT BF NASTRO 1",
+ "TOUT BF NASTRO 2",
+ "TOUT BF NASTRO 3",
+ "TOUT BF NASTRO 4",
+ "TOUT BF NASTRO 5",
+ "TOUT BF NASTRO 6",
+ "ALL MOTORULLO 1",
+ "ALL MOTORULLO 2",
+ "ALL MOTORULLO 3",
+ "ALL MOTORULLO 4",
+ "ALL MOTORULLO 5",
+ "ALL MOTORULLO 6",
+ "",
+ "",
+ "",
+ ""
+ ]
+ }
+]
\ No newline at end of file
diff --git a/IOB-WIN-MBUS/DATA/CONF/IMI_RIMOR_SAB_01.ini b/IOB-WIN-MBUS/DATA/CONF/IMI_RIMOR_SAB_01.ini
new file mode 100644
index 00000000..7c050d85
--- /dev/null
+++ b/IOB-WIN-MBUS/DATA/CONF/IMI_RIMOR_SAB_01.ini
@@ -0,0 +1,82 @@
+;Configurazione IOB-WIN
+[IOB]
+;Impianto Rimor sabbiatura - IMI Remosa
+CNCTYPE=MODBUS_TCP_RIMOR
+PING_MS_TIMEOUT=1000
+MinDeltaSec=5
+IOB_NAME=IMI_RIMOR_SAB
+DIS_EXE_TASK=FALSE
+DIS_STATE_CH=FALSE
+
+[MACHINE]
+VENDOR=RIMOR
+MODEL=Sabbiatura - PLC
+
+[CNC]
+IP=192.168.10.5
+PORT=502
+
+[SERVER]
+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=400000
+ADDR_WRITE=400000
+SIZE_READ=10
+SIZE_WRITE=0
+HR_BASE_ADDR=400000
+DELTA_BASE=-1
+MODBUS_EXT_REG=1
+
+
+[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
+PZCOUNT_MODE=STD.DB85.DBRE16
+DISABLE_PZCOUNT=TRUE
+ENABLE_SEND_PZC_BLOCK=TRUE
+MIN_SEND_PZC_BLOCK=0
+MAX_SEND_PZC_BLOCK=100
+; GEST DATI DYN
+ENABLE_DYN_DATA=TRUE
+FORCE_DYN_DATA=TRUE
+; gestione delta minimo accettabile tra min/MAX
+DELTA_VAL=0.1
+
+; clock base (da 10ms)
+timerIntMs=10
+
+; conf parametri memoria READ/WRITE
+PARAM_CONF=IMI_RIMOR_SAB_01.json
+
+NO_PING=FALSE
+; conf blocchi memoria x READ
+MEM_BLOCK=IMI_RIMOR_SAB_01_MBlock.json
+; conf aree allarme
+ALARM_CONF=IMI_RIMOR_SAB_01_alarm.json
+
+; rimozione check limiti min/max dynData
+disDynDataRangeCheck=true
+
+[BRANCH]
+NAME=master
\ No newline at end of file
diff --git a/IOB-WIN-MBUS/DATA/CONF/IMI_RIMOR_SAB_01.json b/IOB-WIN-MBUS/DATA/CONF/IMI_RIMOR_SAB_01.json
new file mode 100644
index 00000000..83205204
--- /dev/null
+++ b/IOB-WIN-MBUS/DATA/CONF/IMI_RIMOR_SAB_01.json
@@ -0,0 +1,217 @@
+{
+ "mMapWrite": {
+ "setProg": {
+ "name": "setProg",
+ "description": "Qty",
+ "memAddr": "421006",
+ "tipoMem": "Int",
+ "index": 21006,
+ "size": 1
+ }
+ },
+ "mMapRead": {
+ "StatoLavorazione": {
+ "name": "01) StatoLavorazione",
+ "description": "Stato Lavorazione",
+ "memAddr": "421004",
+ "tipoMem": "Int",
+ "index": 21004,
+ "size": 1,
+ "func": "MAX",
+ "period": 90,
+ "factor": 1,
+ "minVal": 0,
+ "maxVal": 999999,
+ "unit": "#"
+ },
+ "DurataLavorazione": {
+ "name": "02) DurataLavorazione",
+ "description": "Durata Lavorazione",
+ "memAddr": "421002",
+ "tipoMem": "Int",
+ "index": 21002,
+ "size": 1,
+ "func": "MAX",
+ "period": 90,
+ "factor": 1,
+ "minVal": 0,
+ "maxVal": 999999,
+ "unit": "h/m"
+ },
+ "OreFunzFiltro1": {
+ "name": "OreFunzFiltro1",
+ "description": "03) Filtro 1 Ore funzionamento",
+ "memAddr": "420201",
+ "tipoMem": "Int",
+ "index": 20201,
+ "size": 1,
+ "func": "MAX",
+ "period": 90,
+ "factor": 1,
+ "minVal": 0,
+ "maxVal": 999999,
+ "unit": "h"
+ },
+ "MinFunzFiltro1": {
+ "name": "MinFunzFiltro1",
+ "description": "04) Filtro 1 Minuti funzionamento",
+ "memAddr": "420205",
+ "tipoMem": "Int",
+ "index": 20205,
+ "size": 1,
+ "func": "MAX",
+ "period": 90,
+ "factor": 1,
+ "minVal": 0,
+ "maxVal": 999999,
+ "unit": "m"
+ },
+ "OreFunzFiltroPar1": {
+ "name": "OreFunzFiltroPar1",
+ "description": "Filtro 1 (c) Ore funzionamento (contatore parziale azzerabile)",
+ "memAddr": "420203",
+ "tipoMem": "Int",
+ "index": 20203,
+ "size": 1,
+ "func": "MAX",
+ "period": 90,
+ "factor": 1,
+ "minVal": 0,
+ "maxVal": 999999,
+ "unit": "h"
+ },
+ "MinFunzFiltroPar1": {
+ "name": "MinFunzFiltroPar1",
+ "description": "Filtro 1 (d) Minuti funzionamento (contatore parziale azzerabile)",
+ "memAddr": "420206",
+ "tipoMem": "Int",
+ "index": 20206,
+ "size": 1,
+ "func": "MAX",
+ "period": 90,
+ "factor": 1,
+ "minVal": 0,
+ "maxVal": 999999,
+ "unit": "m"
+ },
+ "OreFunzFiltro2": {
+ "name": "OreFunzFiltro2",
+ "description": "Filtro 2 (a) Ore funzionamento ",
+ "memAddr": "420301",
+ "tipoMem": "Int",
+ "index": 20301,
+ "size": 1,
+ "func": "MAX",
+ "period": 90,
+ "factor": 1,
+ "minVal": 0,
+ "maxVal": 999999,
+ "unit": "h"
+ },
+ "MinFunzFiltro2": {
+ "name": "MinFunzFiltro2",
+ "description": "Filtro 2 (b) Minuti funzionamento",
+ "memAddr": "420305",
+ "tipoMem": "Int",
+ "index": 20305,
+ "size": 1,
+ "func": "MAX",
+ "period": 90,
+ "factor": 1,
+ "minVal": 0,
+ "maxVal": 999999,
+ "unit": "m"
+ },
+ "OreFunzFiltroPar2": {
+ "name": "OreFunzFiltroPar2",
+ "description": "Filtro 2 (c) Ore funzionamento (contatore parziale azzerabile)",
+ "memAddr": "420303",
+ "tipoMem": "Int",
+ "index": 20303,
+ "size": 1,
+ "func": "MAX",
+ "period": 90,
+ "factor": 1,
+ "minVal": 0,
+ "maxVal": 999999,
+ "unit": "h"
+ },
+ "MinFunzFiltroPar2": {
+ "name": "MinFunzFiltroPar2",
+ "description": "Filtro 2 (d) Minuti funzionamento (contatore parziale azzerabile)",
+ "memAddr": "420306",
+ "tipoMem": "Int",
+ "index": 20306,
+ "size": 1,
+ "func": "MAX",
+ "period": 90,
+ "factor": 1,
+ "minVal": 0,
+ "maxVal": 999999,
+ "unit": "m"
+ },
+ "OreFunzAspiratore": {
+ "name": "OreFunzAspiratore",
+ "description": "Aspiratore (a) Ore funzionamento",
+ "memAddr": "420401",
+ "tipoMem": "Int",
+ "index": 20401,
+ "size": 1,
+ "func": "MAX",
+ "period": 90,
+ "factor": 1,
+ "minVal": 0,
+ "maxVal": 999999,
+ "unit": "h"
+ },
+ "MinFunzAspiratore": {
+ "name": "MinFunzAspiratore",
+ "description": "Aspiratore (b) Minuti funzionamento",
+ "memAddr": "420405",
+ "tipoMem": "Int",
+ "index": 20405,
+ "size": 1,
+ "func": "MAX",
+ "period": 90,
+ "factor": 1,
+ "minVal": 0,
+ "maxVal": 999999,
+ "unit": "m"
+ },
+ "OreFunzAspiratorePar": {
+ "name": "OreFunzAspiratorePar",
+ "description": "Aspiratore (c) Ore funzionamento (contatore parziale azzerabile)",
+ "memAddr": "420403",
+ "tipoMem": "Int",
+ "index": 20403,
+ "size": 1,
+ "func": "MAX",
+ "period": 90,
+ "factor": 1,
+ "minVal": 0,
+ "maxVal": 999999,
+ "unit": "h"
+ },
+ "MinFunzAspiratorePar": {
+ "name": "MinFunzAspiratorePar",
+ "description": "Aspiratore (d) Minuti funzionamento (contatore parziale azzerabile)",
+ "memAddr": "420406",
+ "tipoMem": "Int",
+ "index": 20406,
+ "size": 1,
+ "func": "MAX",
+ "period": 90,
+ "factor": 1,
+ "minVal": 0,
+ "maxVal": 999999,
+ "unit": "m"
+ }
+ },
+ "optMemPar": {
+ "EndOrdIntCond": "421002|1=1",
+ //"AlarmIntCond": "421002|1=1",
+ "ManualIntCond": "421002|1=3",
+ //"EStopBitCond": "100040.0=1",
+ "WorkIntCond": "421002|1=2,4"
+ }
+}
\ No newline at end of file
diff --git a/IOB-WIN-MBUS/DATA/CONF/IMI_RIMOR_SAB_01_MBlock.json b/IOB-WIN-MBUS/DATA/CONF/IMI_RIMOR_SAB_01_MBlock.json
new file mode 100644
index 00000000..b6d653ec
--- /dev/null
+++ b/IOB-WIN-MBUS/DATA/CONF/IMI_RIMOR_SAB_01_MBlock.json
@@ -0,0 +1,13 @@
+{
+ "ReadBlocks": {
+ //"100040": 20,
+ //"332760": 20,
+ "400000": 10,
+ "400100": 60,
+ "400200": 20,
+ "420200": 20,
+ "420300": 20,
+ "420400": 20,
+ "421000": 20
+ }
+}
\ No newline at end of file
diff --git a/IOB-WIN-MBUS/DATA/CONF/IMI_RIMOR_SAB_01_alarm.json b/IOB-WIN-MBUS/DATA/CONF/IMI_RIMOR_SAB_01_alarm.json
new file mode 100644
index 00000000..7dd02384
--- /dev/null
+++ b/IOB-WIN-MBUS/DATA/CONF/IMI_RIMOR_SAB_01_alarm.json
@@ -0,0 +1,52 @@
+[
+ {
+ "description": "Allarmi Impianto",
+ "tipoMem": "DInt",
+ "memAddr": "40000",
+ "index": 0,
+ "size": 2,
+ "messages": [
+ "##",
+ "##",
+ "##",
+ "##",
+ "##",
+ "##",
+ "##",
+ "##",
+ "##EMERGENZA GENERALE",
+ "##TERMICO SCATTATO",
+ "##FAULT INVERTER",
+ "##FAULT STEPPER",
+ "##CARTER APERTI",
+ "##PORTA SX APERTA",
+ "##PORTA DX APERTA",
+ "##CARTER APERTI"
+ ]
+ },
+ {
+ "description": "Allarmi Impianto",
+ "tipoMem": "DInt",
+ "memAddr": "40002",
+ "index": 2,
+ "size": 2,
+ "messages": [
+ "##TOUT BF NASTRO 1",
+ "##TOUT BF NASTRO 2",
+ "##TOUT BF NASTRO 3",
+ "##TOUT BF NASTRO 4",
+ "##TOUT BF NASTRO 5",
+ "##TOUT BF NASTRO 6",
+ "##ALL MOTORULLO 1",
+ "##ALL MOTORULLO 2",
+ "##ALL MOTORULLO 3",
+ "##ALL MOTORULLO 4",
+ "##ALL MOTORULLO 5",
+ "##ALL MOTORULLO 6",
+ "##",
+ "##",
+ "##",
+ "##"
+ ]
+ }
+]
\ No newline at end of file
diff --git a/IOB-WIN-MBUS/DATA/CONF/IMI_RIMOR_SAB_02.ini b/IOB-WIN-MBUS/DATA/CONF/IMI_RIMOR_SAB_02.ini
new file mode 100644
index 00000000..4f730267
--- /dev/null
+++ b/IOB-WIN-MBUS/DATA/CONF/IMI_RIMOR_SAB_02.ini
@@ -0,0 +1,80 @@
+;Configurazione IOB-WIN
+[IOB]
+;Impianto Rimor sabbiatura - IMI Remosa
+CNCTYPE=MODBUS_TCP_RIMOR
+PING_MS_TIMEOUT=1000
+MinDeltaSec=5
+IOB_NAME=IMI_RIMOR_SAB
+DIS_EXE_TASK=FALSE
+DIS_STATE_CH=TRUE
+
+[MACHINE]
+VENDOR=RIMOR
+MODEL=Sabbiatura - HMI
+
+[CNC]
+IP=192.168.10.6
+PORT=502
+
+[SERVER]
+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=40000
+ADDR_WRITE=40000
+SIZE_READ=10
+SIZE_WRITE=0
+HR_BASE_ADDR=40000
+DELTA_BASE=-1
+MODBUS_EXT_REG=0
+
+
+[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
+PZCOUNT_MODE=STD.DB85.DBRE16
+DISABLE_PZCOUNT=TRUE
+ENABLE_SEND_PZC_BLOCK=TRUE
+MIN_SEND_PZC_BLOCK=0
+MAX_SEND_PZC_BLOCK=100
+; GEST DATI DYN
+ENABLE_DYN_DATA=TRUE
+FORCE_DYN_DATA=TRUE
+; gestione delta minimo accettabile tra min/MAX
+DELTA_VAL=0.1
+
+; clock base (da 10ms)
+timerIntMs=10
+
+; conf parametri memoria READ/WRITE
+PARAM_CONF=IMI_RIMOR_SAB_02.json
+
+NO_PING=FALSE
+; conf blocchi memoria x READ
+MEM_BLOCK=IMI_RIMOR_SAB_02_MBlock.json
+
+; rimozione check limiti min/max dynData
+disDynDataRangeCheck=true
+
+[BRANCH]
+NAME=master
\ No newline at end of file
diff --git a/IOB-WIN-MBUS/DATA/CONF/IMI_RIMOR_SAB_02.json b/IOB-WIN-MBUS/DATA/CONF/IMI_RIMOR_SAB_02.json
new file mode 100644
index 00000000..afdbefe5
--- /dev/null
+++ b/IOB-WIN-MBUS/DATA/CONF/IMI_RIMOR_SAB_02.json
@@ -0,0 +1,74 @@
+{
+ "mMapWrite": {
+ "setArt": {
+ "name": "setArt",
+ "description": "Articolo",
+ "memAddr": "40901",
+ "tipoMem": "String",
+ "index": 901,
+ "size": 12
+ },
+ "setComm": {
+ "name": "setComm",
+ "description": "Commessa",
+ "memAddr": "40921",
+ "tipoMem": "String",
+ "index": 921,
+ "size": 12
+ },
+ "setProg": {
+ "name": "setProg",
+ "description": "Qty",
+ "memAddr": "40941",
+ "tipoMem": "String",
+ "index": 941,
+ "size": 30
+ }
+ },
+ "mMapRead": {
+ "setArt": {
+ "name": "setArt",
+ "description": "Articolo",
+ "memAddr": "40901",
+ "tipoMem": "String",
+ "index": 901,
+ "size": 12,
+ "func": "POINT",
+ "period": 90,
+ "factor": 1,
+ "minVal": 0,
+ "maxVal": 999999,
+ "unit": ""
+ },
+ "setComm": {
+ "name": "setComm",
+ "description": "Commessa",
+ "memAddr": "40921",
+ "tipoMem": "String",
+ "index": 921,
+ "size": 12,
+ "func": "POINT",
+ "period": 90,
+ "factor": 1,
+ "minVal": 0,
+ "maxVal": 0,
+ "unit": ""
+ },
+ "setProg": {
+ "name": "setProg",
+ "description": "Qty",
+ "memAddr": "40941",
+ "tipoMem": "String",
+ "index": 941,
+ "size": 30,
+ "func": "POINT",
+ "period": 90,
+ "factor": 1,
+ "minVal": 0,
+ "maxVal": 0,
+ "unit": ""
+ }
+ },
+ "optMemPar": {
+ }
+}
\ No newline at end of file
diff --git a/IOB-WIN-MBUS/DATA/CONF/IMI_RIMOR_SAB_02_MBlock.json b/IOB-WIN-MBUS/DATA/CONF/IMI_RIMOR_SAB_02_MBlock.json
new file mode 100644
index 00000000..ca6572f2
--- /dev/null
+++ b/IOB-WIN-MBUS/DATA/CONF/IMI_RIMOR_SAB_02_MBlock.json
@@ -0,0 +1,5 @@
+{
+ "ReadBlocks": {
+ "40900": 70
+ }
+}
\ No newline at end of file
diff --git a/IOB-WIN-MBUS/DATA/CONF/IMI_RIMOR_VER_01.ini b/IOB-WIN-MBUS/DATA/CONF/IMI_RIMOR_VER_01.ini
new file mode 100644
index 00000000..aa448b70
--- /dev/null
+++ b/IOB-WIN-MBUS/DATA/CONF/IMI_RIMOR_VER_01.ini
@@ -0,0 +1,82 @@
+;Configurazione IOB-WIN
+[IOB]
+;Impianto Rimor verniciatura - IMI Remosa
+CNCTYPE=MODBUS_TCP_RIMOR
+PING_MS_TIMEOUT=1000
+MinDeltaSec=5
+IOB_NAME=IMI_RIMOR_VER
+DIS_EXE_TASK=FALSE
+DIS_STATE_CH=FALSE
+
+[MACHINE]
+VENDOR=RIMOR
+MODEL=Verniciatura - PLC
+
+[CNC]
+IP=192.168.10.7
+PORT=502
+
+[SERVER]
+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=400000
+ADDR_WRITE=400000
+SIZE_READ=10
+SIZE_WRITE=0
+HR_BASE_ADDR=400000
+DELTA_BASE=-1
+MODBUS_EXT_REG=1
+
+
+[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
+PZCOUNT_MODE=STD.DB85.DBRE16
+DISABLE_PZCOUNT=TRUE
+ENABLE_SEND_PZC_BLOCK=TRUE
+MIN_SEND_PZC_BLOCK=0
+MAX_SEND_PZC_BLOCK=100
+; GEST DATI DYN
+ENABLE_DYN_DATA=TRUE
+FORCE_DYN_DATA=TRUE
+; gestione delta minimo accettabile tra min/MAX
+DELTA_VAL=0.1
+
+; clock base (da 10ms)
+timerIntMs=10
+
+; conf parametri memoria READ/WRITE
+PARAM_CONF=IMI_RIMOR_VER_01.json
+
+NO_PING=FALSE
+; conf blocchi memoria x READ
+MEM_BLOCK=IMI_RIMOR_VER_01_MBlock.json
+; conf aree allarme
+ALARM_CONF=IMI_RIMOR_VER_01_alarm.json
+
+; rimozione check limiti min/max dynData
+disDynDataRangeCheck=true
+
+[BRANCH]
+NAME=master
\ No newline at end of file
diff --git a/IOB-WIN-MBUS/DATA/CONF/IMI_RIMOR_VER_01.json b/IOB-WIN-MBUS/DATA/CONF/IMI_RIMOR_VER_01.json
new file mode 100644
index 00000000..f0085acb
--- /dev/null
+++ b/IOB-WIN-MBUS/DATA/CONF/IMI_RIMOR_VER_01.json
@@ -0,0 +1,217 @@
+{
+ "mMapWrite": {
+ "setProg": {
+ "name": "setProg",
+ "description": "Qty",
+ "memAddr": "406202",
+ "tipoMem": "Int",
+ "index": 6202,
+ "size": 1
+ }
+ },
+ "mMapRead": {
+ "OreFunzFiltro1": {
+ "name": "OreFunzFiltro1",
+ "description": "Ore funzionamento filtro 1",
+ "memAddr": "406297",
+ "tipoMem": "Int",
+ "index": 6297,
+ "size": 1,
+ "func": "MAX",
+ "period": 90,
+ "factor": 1,
+ "minVal": 0,
+ "maxVal": 999999,
+ "unit": "h"
+ },
+ "MinFunzFiltro1": {
+ "name": "MinFunzFiltro1",
+ "description": "Minuti funzionamento filtro 1",
+ "memAddr": "406301",
+ "tipoMem": "Int",
+ "index": 6301,
+ "size": 1,
+ "func": "MAX",
+ "period": 90,
+ "factor": 1,
+ "minVal": 0,
+ "maxVal": 999999,
+ "unit": "m"
+ },
+ "OreFunzFiltroPar1": {
+ "name": "OreFunzFiltroPar1",
+ "description": "Ore funzionamento filtro 1 (contatore parziale azzerabile)",
+ "memAddr": "406299",
+ "tipoMem": "Int",
+ "index": 6299,
+ "size": 1,
+ "func": "MAX",
+ "period": 90,
+ "factor": 1,
+ "minVal": 0,
+ "maxVal": 999999,
+ "unit": "h"
+ },
+ "MinFunzFiltroPar1": {
+ "name": "MinFunzFiltroPar1",
+ "description": "Minuti funzionamento filtro 1 (contatore parziale azzerabile)",
+ "memAddr": "406302",
+ "tipoMem": "Int",
+ "index": 6302,
+ "size": 1,
+ "func": "MAX",
+ "period": 90,
+ "factor": 1,
+ "minVal": 0,
+ "maxVal": 999999,
+ "unit": "m"
+ },
+ "OreFunzFiltro2": {
+ "name": "OreFunzFiltro2",
+ "description": "Ore funzionamento filtro 2",
+ "memAddr": "406303",
+ "tipoMem": "Int",
+ "index": 6303,
+ "size": 1,
+ "func": "MAX",
+ "period": 90,
+ "factor": 1,
+ "minVal": 0,
+ "maxVal": 999999,
+ "unit": "h"
+ },
+ "MinFunzFiltro2": {
+ "name": "MinFunzFiltro2",
+ "description": "Minuti funzionamento filtro 2",
+ "memAddr": "406307",
+ "tipoMem": "Int",
+ "index": 6307,
+ "size": 1,
+ "func": "MAX",
+ "period": 90,
+ "factor": 1,
+ "minVal": 0,
+ "maxVal": 999999,
+ "unit": "m"
+ },
+ "OreFunzFiltroPar2": {
+ "name": "OreFunzFiltroPar2",
+ "description": "Ore funzionamento filtro 1 (contatore parziale azzerabile)",
+ "memAddr": "406305",
+ "tipoMem": "Int",
+ "index": 6305,
+ "size": 1,
+ "func": "MAX",
+ "period": 90,
+ "factor": 1,
+ "minVal": 0,
+ "maxVal": 999999,
+ "unit": "h"
+ },
+ "MinFunzFiltroPar2": {
+ "name": "MinFunzFiltroPar2",
+ "description": "Minuti funzionamento filtro 1 (contatore parziale azzerabile)",
+ "memAddr": "406308",
+ "tipoMem": "Int",
+ "index": 6308,
+ "size": 1,
+ "func": "MAX",
+ "period": 90,
+ "factor": 1,
+ "minVal": 0,
+ "maxVal": 999999,
+ "unit": "m"
+ },
+ "OreFunzAgitatori": {
+ "name": "OreFunzAgitatori",
+ "description": "Ore funzionamento Agitatori",
+ "memAddr": "406309",
+ "tipoMem": "Int",
+ "index": 6309,
+ "size": 1,
+ "func": "MAX",
+ "period": 90,
+ "factor": 1,
+ "minVal": 0,
+ "maxVal": 999999,
+ "unit": "h"
+ },
+ "MinFunzAgitatori": {
+ "name": "MinFunzAgitatori",
+ "description": "Minuti funzionamento Agitatori",
+ "memAddr": "406313",
+ "tipoMem": "Int",
+ "index": 6313,
+ "size": 1,
+ "func": "MAX",
+ "period": 90,
+ "factor": 1,
+ "minVal": 0,
+ "maxVal": 999999,
+ "unit": "m"
+ },
+ "OreFunzAgitatoriPar": {
+ "name": "OreFunzAgitatoriPar",
+ "description": "Ore funzionamento Agitatori (contatore parziale azzerabile)",
+ "memAddr": "406311",
+ "tipoMem": "Int",
+ "index": 6311,
+ "size": 1,
+ "func": "MAX",
+ "period": 90,
+ "factor": 1,
+ "minVal": 0,
+ "maxVal": 999999,
+ "unit": "h"
+ },
+ "MinFunzAgitatoriPar": {
+ "name": "MinFunzAgitatoriPar",
+ "description": "Minuti funzionamento Agitatori (contatore parziale azzerabile)",
+ "memAddr": "406314",
+ "tipoMem": "Int",
+ "index": 6314,
+ "size": 1,
+ "func": "MAX",
+ "period": 90,
+ "factor": 1,
+ "minVal": 0,
+ "maxVal": 999999,
+ "unit": "m"
+ },
+ "DurataLavorazione": {
+ "name": "DurataLavorazione",
+ "description": "Durata Lavorazione",
+ "memAddr": "406198",
+ "tipoMem": "Int",
+ "index": 6198,
+ "size": 1,
+ "func": "MAX",
+ "period": 90,
+ "factor": 1,
+ "minVal": 0,
+ "maxVal": 999999,
+ "unit": "h/m"
+ },
+ "StatoLavorazione": {
+ "name": "StatoLavorazione",
+ "description": "Stato Lavorazione",
+ "memAddr": "406200",
+ "tipoMem": "Int",
+ "index": 6200,
+ "size": 1,
+ "func": "MAX",
+ "period": 90,
+ "factor": 1,
+ "minVal": 0,
+ "maxVal": 999999,
+ "unit": "#"
+ }
+ },
+ "optMemPar": {
+ "EndOrdIntCond": "406198|1=1",
+ //"AlarmIntCond": "406200|0=1",
+ "ManualIntCond": "406198|1=3",
+ //"EStopBitCond": "100040.0=1",
+ "WorkIntCond": "406198|1=2,4"
+ }
+}
\ No newline at end of file
diff --git a/IOB-WIN-MBUS/DATA/CONF/IMI_RIMOR_VER_01_MBlock.json b/IOB-WIN-MBUS/DATA/CONF/IMI_RIMOR_VER_01_MBlock.json
new file mode 100644
index 00000000..5f6dfcf1
--- /dev/null
+++ b/IOB-WIN-MBUS/DATA/CONF/IMI_RIMOR_VER_01_MBlock.json
@@ -0,0 +1,10 @@
+{
+ "ReadBlocks": {
+ //"100040": 20,
+ //"332760": 20,
+ "406190": 20,
+ "406290": 30,
+ "404200": 60,
+ "404300": 10
+ }
+}
\ No newline at end of file
diff --git a/IOB-WIN-MBUS/DATA/CONF/IMI_RIMOR_VER_01_alarm.json b/IOB-WIN-MBUS/DATA/CONF/IMI_RIMOR_VER_01_alarm.json
new file mode 100644
index 00000000..7dd02384
--- /dev/null
+++ b/IOB-WIN-MBUS/DATA/CONF/IMI_RIMOR_VER_01_alarm.json
@@ -0,0 +1,52 @@
+[
+ {
+ "description": "Allarmi Impianto",
+ "tipoMem": "DInt",
+ "memAddr": "40000",
+ "index": 0,
+ "size": 2,
+ "messages": [
+ "##",
+ "##",
+ "##",
+ "##",
+ "##",
+ "##",
+ "##",
+ "##",
+ "##EMERGENZA GENERALE",
+ "##TERMICO SCATTATO",
+ "##FAULT INVERTER",
+ "##FAULT STEPPER",
+ "##CARTER APERTI",
+ "##PORTA SX APERTA",
+ "##PORTA DX APERTA",
+ "##CARTER APERTI"
+ ]
+ },
+ {
+ "description": "Allarmi Impianto",
+ "tipoMem": "DInt",
+ "memAddr": "40002",
+ "index": 2,
+ "size": 2,
+ "messages": [
+ "##TOUT BF NASTRO 1",
+ "##TOUT BF NASTRO 2",
+ "##TOUT BF NASTRO 3",
+ "##TOUT BF NASTRO 4",
+ "##TOUT BF NASTRO 5",
+ "##TOUT BF NASTRO 6",
+ "##ALL MOTORULLO 1",
+ "##ALL MOTORULLO 2",
+ "##ALL MOTORULLO 3",
+ "##ALL MOTORULLO 4",
+ "##ALL MOTORULLO 5",
+ "##ALL MOTORULLO 6",
+ "##",
+ "##",
+ "##",
+ "##"
+ ]
+ }
+]
\ No newline at end of file
diff --git a/IOB-WIN-MBUS/DATA/CONF/IMI_RIMOR_VER_02.ini b/IOB-WIN-MBUS/DATA/CONF/IMI_RIMOR_VER_02.ini
new file mode 100644
index 00000000..7f3ebe1a
--- /dev/null
+++ b/IOB-WIN-MBUS/DATA/CONF/IMI_RIMOR_VER_02.ini
@@ -0,0 +1,80 @@
+;Configurazione IOB-WIN
+[IOB]
+;Impianto Rimor verniciatura - IMI Remosa
+CNCTYPE=MODBUS_TCP_RIMOR
+PING_MS_TIMEOUT=1000
+MinDeltaSec=5
+IOB_NAME=IMI_RIMOR_VER
+DIS_EXE_TASK=FALSE
+DIS_STATE_CH=TRUE
+
+[MACHINE]
+VENDOR=RIMOR
+MODEL=Verniciatura - HMI
+
+[CNC]
+IP=192.168.10.8
+PORT=502
+
+[SERVER]
+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=40000
+ADDR_WRITE=40000
+SIZE_READ=10
+SIZE_WRITE=0
+HR_BASE_ADDR=40000
+DELTA_BASE=-1
+MODBUS_EXT_REG=0
+
+
+[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
+PZCOUNT_MODE=STD.DB85.DBRE16
+DISABLE_PZCOUNT=TRUE
+ENABLE_SEND_PZC_BLOCK=TRUE
+MIN_SEND_PZC_BLOCK=0
+MAX_SEND_PZC_BLOCK=100
+; GEST DATI DYN
+ENABLE_DYN_DATA=TRUE
+FORCE_DYN_DATA=TRUE
+; gestione delta minimo accettabile tra min/MAX
+DELTA_VAL=0.1
+
+; clock base (da 10ms)
+timerIntMs=10
+
+; conf parametri memoria READ/WRITE
+PARAM_CONF=IMI_RIMOR_VER_02.json
+
+NO_PING=FALSE
+; conf blocchi memoria x READ
+MEM_BLOCK=IMI_RIMOR_VER_02_MBlock.json
+
+; rimozione check limiti min/max dynData
+disDynDataRangeCheck=true
+
+[BRANCH]
+NAME=master
\ No newline at end of file
diff --git a/IOB-WIN-MBUS/DATA/CONF/IMI_RIMOR_VER_02.json b/IOB-WIN-MBUS/DATA/CONF/IMI_RIMOR_VER_02.json
new file mode 100644
index 00000000..afdbefe5
--- /dev/null
+++ b/IOB-WIN-MBUS/DATA/CONF/IMI_RIMOR_VER_02.json
@@ -0,0 +1,74 @@
+{
+ "mMapWrite": {
+ "setArt": {
+ "name": "setArt",
+ "description": "Articolo",
+ "memAddr": "40901",
+ "tipoMem": "String",
+ "index": 901,
+ "size": 12
+ },
+ "setComm": {
+ "name": "setComm",
+ "description": "Commessa",
+ "memAddr": "40921",
+ "tipoMem": "String",
+ "index": 921,
+ "size": 12
+ },
+ "setProg": {
+ "name": "setProg",
+ "description": "Qty",
+ "memAddr": "40941",
+ "tipoMem": "String",
+ "index": 941,
+ "size": 30
+ }
+ },
+ "mMapRead": {
+ "setArt": {
+ "name": "setArt",
+ "description": "Articolo",
+ "memAddr": "40901",
+ "tipoMem": "String",
+ "index": 901,
+ "size": 12,
+ "func": "POINT",
+ "period": 90,
+ "factor": 1,
+ "minVal": 0,
+ "maxVal": 999999,
+ "unit": ""
+ },
+ "setComm": {
+ "name": "setComm",
+ "description": "Commessa",
+ "memAddr": "40921",
+ "tipoMem": "String",
+ "index": 921,
+ "size": 12,
+ "func": "POINT",
+ "period": 90,
+ "factor": 1,
+ "minVal": 0,
+ "maxVal": 0,
+ "unit": ""
+ },
+ "setProg": {
+ "name": "setProg",
+ "description": "Qty",
+ "memAddr": "40941",
+ "tipoMem": "String",
+ "index": 941,
+ "size": 30,
+ "func": "POINT",
+ "period": 90,
+ "factor": 1,
+ "minVal": 0,
+ "maxVal": 0,
+ "unit": ""
+ }
+ },
+ "optMemPar": {
+ }
+}
\ No newline at end of file
diff --git a/IOB-WIN-MBUS/DATA/CONF/IMI_RIMOR_VER_02_MBlock.json b/IOB-WIN-MBUS/DATA/CONF/IMI_RIMOR_VER_02_MBlock.json
new file mode 100644
index 00000000..ca6572f2
--- /dev/null
+++ b/IOB-WIN-MBUS/DATA/CONF/IMI_RIMOR_VER_02_MBlock.json
@@ -0,0 +1,5 @@
+{
+ "ReadBlocks": {
+ "40900": 70
+ }
+}
\ No newline at end of file
diff --git a/IOB-WIN-MBUS/DATA/CONF/PING.ini b/IOB-WIN-MBUS/DATA/CONF/PING.ini
deleted file mode 100644
index 1a4c140e..00000000
--- a/IOB-WIN-MBUS/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-MBUS/DATA/CONF/PIZ04.ini b/IOB-WIN-MBUS/DATA/CONF/PIZ04.ini
new file mode 100644
index 00000000..91904208
--- /dev/null
+++ b/IOB-WIN-MBUS/DATA/CONF/PIZ04.ini
@@ -0,0 +1,80 @@
+;Configurazione IOB-WIN
+[IOB]
+;Impianto HAM Noceto per Pizzaferri
+CNCTYPE=MODBUS_TCP_HAM
+PING_MS_TIMEOUT=1000
+
+[MACHINE]
+VENDOR=HAM
+MODEL=HAM
+
+[CNC]
+IP=hampizzaferri.dyndns.org
+PORT=502
+
+[SERVER]
+;MPIP=https://localhost:44339
+MPIP=https://gwms.egalware.com
+MPURL=/pizzaferri/api
+CMDBASE=/IOB/input/
+CMDFLOG=/IOB/flog/
+CMDALIVE=/IOB
+CMDENABLED=/IOB/enabled/
+CMDADV1=?valore=
+CMDREBO=/IOB/sendReboot?idxMacchina=
+
+[MEMORY]
+ADDR_READ=40000
+ADDR_WRITE=40400
+SIZE_READ=64
+SIZE_WRITE=358
+
+HR_BASE_ADDR=40000
+;DELTA_BASE=1
+DELTA_BASE=0
+INDEX_LUT_CORR=-1
+
+
+[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
+PZCOUNT_MODE=STD.DB85.DBRE16
+DISABLE_PZCOUNT=TRUE
+ENABLE_SEND_PZC_BLOCK=TRUE
+MIN_SEND_PZC_BLOCK=0
+MAX_SEND_PZC_BLOCK=100
+; GEST DATI DYN
+ENABLE_DYN_DATA=TRUE
+FORCE_DYN_DATA=TRUE
+; gestione delta minimo accettabile tra min/MAX
+DELTA_VAL=0.1
+
+; clock base (da 10ms)
+timerIntMs=150
+
+MAX_ERROR_READ=10
+
+; conf parametri memoria READ/WRITE
+PARAM_CONF=PIZ04.json
+
+NO_PING=FALSE
+; conf blocchi memoria x READ
+MEM_BLOCK=PIZ04_MBlock.json
+; conf aree allarme
+ALARM_CONF=PIZ04_alarm.json
+
+[BRANCH]
+NAME=master
\ No newline at end of file
diff --git a/IOB-WIN-MBUS/DATA/CONF/PIZ04.json b/IOB-WIN-MBUS/DATA/CONF/PIZ04.json
new file mode 100644
index 00000000..2e7c7820
--- /dev/null
+++ b/IOB-WIN-MBUS/DATA/CONF/PIZ04.json
@@ -0,0 +1,290 @@
+{
+ "mMapWrite": {
+ "SetLowTempGNC01": {
+ "name": "SetLowTempGNC01",
+ "description": "Set point di avviso per bassa temperatura all'uscita del vaporizzatore GNC 01",
+ "memAddr": "40453",
+ "tipoMem": "Real",
+ "index": 453,
+ "size": 2,
+ "minVal": -200,
+ "maxVal": 200,
+ "unit": "C"
+ },
+ "SetHighTempGNC01": {
+ "name": "SetHighTempGNC01",
+ "description": "Set point di avviso per alta temperatura all'uscita del vaporizzatore GNC 01",
+ "memAddr": "40455",
+ "tipoMem": "Real",
+ "index": 455,
+ "size": 2,
+ "minVal": -200,
+ "maxVal": 200,
+ "unit": "C"
+ },
+ "SetLowTempGNC02": {
+ "name": "SetLowTempGNC02",
+ "description": "Set point di avviso per bassa temperatura all'uscita del vaporizzatore GNC 02",
+ "memAddr": "40457",
+ "tipoMem": "Real",
+ "index": 457,
+ "size": 2,
+ "minVal": -200,
+ "maxVal": 200,
+ "unit": "C"
+ },
+ "SetHighTempGNC02": {
+ "name": "SetHighTempGNC02",
+ "description": "Set point di avviso per alta temperatura all'uscita del vaporizzatore GNC 02",
+ "memAddr": "40459",
+ "tipoMem": "Real",
+ "index": 459,
+ "size": 2,
+ "minVal": -200,
+ "maxVal": 200,
+ "unit": "C"
+ },
+ "SetLowTempAmb01": {
+ "name": "SetLowTempAmb01",
+ "description": "Set point di avviso per bassa temperatura ambiente nell'impianto 01",
+ "memAddr": "40421",
+ "tipoMem": "Real",
+ "index": 421,
+ "size": 2,
+ "minVal": -200,
+ "maxVal": 200,
+ "unit": "C"
+ },
+ "SetHighTempAmb01": {
+ "name": "SetHighTempAmb01",
+ "description": "Set point di avviso per alta temperatura ambiente nell'impianto 01",
+ "memAddr": "40423",
+ "tipoMem": "Real",
+ "index": 423,
+ "size": 2,
+ "minVal": -200,
+ "maxVal": 200,
+ "unit": "C"
+ },
+ "SetLowTempAmb02": {
+ "name": "SetLowTempAmb02",
+ "description": "Set point di avviso per bassa temperatura ambiente nell'impianto 02",
+ "memAddr": "40425",
+ "tipoMem": "Real",
+ "index": 425,
+ "size": 2,
+ "minVal": -200,
+ "maxVal": 200,
+ "unit": "C"
+ },
+ "SetHighTempAmb02": {
+ "name": "SetHighTempAmb02",
+ "description": "Set point di avviso per alta temperatura ambiente nell'impianto 02",
+ "memAddr": "40427",
+ "tipoMem": "Real",
+ "index": 427,
+ "size": 2,
+ "minVal": -200,
+ "maxVal": 200,
+ "unit": "C"
+ }
+ },
+ "mMapRead": {
+ "Level": {
+ "name": "Level",
+ "description": "Livello Serbatoio",
+ "memAddr": "40001",
+ "tipoMem": "Real",
+ "index": 1,
+ "size": 2,
+ "func": "MEDIAN",
+ "period": 90,
+ "factor": 360,
+ "minVal": 0,
+ "maxVal": 100,
+ "unit": "Kg"
+ },
+ "MainPress": {
+ "name": "MainPress",
+ "description": "Pressione Serbatoio",
+ "memAddr": "40003",
+ "tipoMem": "Real",
+ "index": 3,
+ "size": 2,
+ "func": "MEDIAN",
+ "period": 90,
+ "factor": 1,
+ "minVal": 0,
+ "maxVal": 400,
+ "unit": "bar"
+ },
+ "PressBH": {
+ "name": "PressBH",
+ "description": "Pressione media all'interno dell'accumulo GNC (pacco bombole) di alta pressione",
+ "memAddr": "40019",
+ "tipoMem": "Real",
+ "index": 19,
+ "size": 2,
+ "func": "MEDIAN",
+ "period": 90,
+ "factor": 1,
+ "minVal": 0,
+ "maxVal": 400,
+ "unit": "bar"
+ },
+ "PressBL": {
+ "name": "PressBL",
+ "description": "Pressione media all'interno dell'accumulo GNC (pacco bombole) di media pressione",
+ "memAddr": "40021",
+ "tipoMem": "Real",
+ "index": 21,
+ "size": 2,
+ "func": "MEDIAN",
+ "period": 90,
+ "factor": 1,
+ "minVal": 0,
+ "maxVal": 400,
+ "unit": "bar"
+ },
+ "TempGNC": {
+ "name": "TempGNC",
+ "description": "Temperatura all'uscita del vaporizzatore GNC",
+ "memAddr": "40027",
+ "tipoMem": "Real",
+ "index": 27,
+ "size": 2,
+ "func": "MEDIAN",
+ "period": 90,
+ "factor": 1,
+ "minVal": -200,
+ "maxVal": 200,
+ "unit": "C"
+ },
+ "TempAmb": {
+ "name": "TempAmb",
+ "description": "Temperatura ambiente nell'impianto",
+ "memAddr": "40011",
+ "tipoMem": "Real",
+ "index": 11,
+ "size": 2,
+ "func": "MEDIAN",
+ "period": 90,
+ "factor": 1,
+ "minVal": -200,
+ "maxVal": 200,
+ "unit": "C"
+ },
+ "SetLowTempGNC01": {
+ "name": "SetLowTempGNC01",
+ "description": "Set point di avviso per bassa temperatura all'uscita del vaporizzatore GNC 01",
+ "memAddr": "40453",
+ "tipoMem": "Real",
+ "index": 453,
+ "size": 2,
+ "func": "MEDIAN",
+ "period": 90,
+ "factor": 1,
+ "minVal": -200,
+ "maxVal": 200,
+ "unit": "C"
+ },
+ "SetHighTempGNC01": {
+ "name": "SetHighTempGNC01",
+ "description": "Set point di avviso per alta temperatura all'uscita del vaporizzatore GNC 01",
+ "memAddr": "40455",
+ "tipoMem": "Real",
+ "index": 455,
+ "size": 2,
+ "func": "MEDIAN",
+ "period": 90,
+ "factor": 1,
+ "minVal": -200,
+ "maxVal": 200,
+ "unit": "C"
+ },
+ "SetLowTempGNC02": {
+ "name": "SetLowTempGNC02",
+ "description": "Set point di avviso per bassa temperatura all'uscita del vaporizzatore GNC 02",
+ "memAddr": "40457",
+ "tipoMem": "Real",
+ "index": 457,
+ "size": 2,
+ "func": "MEDIAN",
+ "period": 90,
+ "factor": 1,
+ "minVal": -200,
+ "maxVal": 200,
+ "unit": "C"
+ },
+ "SetHighTempGNC02": {
+ "name": "SetHighTempGNC02",
+ "description": "Set point di avviso per alta temperatura all'uscita del vaporizzatore GNC 02",
+ "memAddr": "40459",
+ "tipoMem": "Real",
+ "index": 459,
+ "size": 2,
+ "func": "MEDIAN",
+ "period": 90,
+ "factor": 1,
+ "minVal": -200,
+ "maxVal": 200,
+ "unit": "C"
+ },
+ "SetLowTempAmb01": {
+ "name": "SetLowTempAmb01",
+ "description": "Set point di avviso per bassa temperatura ambiente nell'impianto 01",
+ "memAddr": "40421",
+ "tipoMem": "Real",
+ "index": 421,
+ "size": 2,
+ "func": "MEDIAN",
+ "period": 90,
+ "factor": 1,
+ "minVal": -200,
+ "maxVal": 200,
+ "unit": "C"
+ },
+ "SetHighTempAmb01": {
+ "name": "SetHighTempAmb01",
+ "description": "Set point di avviso per alta temperatura ambiente nell'impianto 01",
+ "memAddr": "40423",
+ "tipoMem": "Real",
+ "index": 423,
+ "size": 2,
+ "func": "MEDIAN",
+ "period": 90,
+ "factor": 1,
+ "minVal": -200,
+ "maxVal": 200,
+ "unit": "C"
+ },
+ "SetLowTempAmb02": {
+ "name": "SetLowTempAmb02",
+ "description": "Set point di avviso per bassa temperatura ambiente nell'impianto 02",
+ "memAddr": "40425",
+ "tipoMem": "Real",
+ "index": 425,
+ "size": 2,
+ "func": "MEDIAN",
+ "period": 90,
+ "factor": 1,
+ "minVal": -200,
+ "maxVal": 200,
+ "unit": "C"
+ },
+ "SetHighTempAmb02": {
+ "name": "SetHighTempAmb02",
+ "description": "Set point di avviso per alta temperatura ambiente nell'impianto 02",
+ "memAddr": "40427",
+ "tipoMem": "Real",
+ "index": 427,
+ "size": 2,
+ "func": "MEDIAN",
+ "period": 90,
+ "factor": 1,
+ "minVal": -200,
+ "maxVal": 200,
+ "unit": "C"
+ }
+ }
+}
\ No newline at end of file
diff --git a/IOB-WIN-MBUS/DATA/CONF/PIZ04_MBlock.json b/IOB-WIN-MBUS/DATA/CONF/PIZ04_MBlock.json
new file mode 100644
index 00000000..0074e94e
--- /dev/null
+++ b/IOB-WIN-MBUS/DATA/CONF/PIZ04_MBlock.json
@@ -0,0 +1,7 @@
+{
+ "ReadBlocks": {
+ "40000": 64,
+ "40420": 64,
+ "40900": 8
+ }
+}
\ No newline at end of file
diff --git a/IOB-WIN-MBUS/DATA/CONF/PIZ04_alarm.json b/IOB-WIN-MBUS/DATA/CONF/PIZ04_alarm.json
new file mode 100644
index 00000000..bcb583bc
--- /dev/null
+++ b/IOB-WIN-MBUS/DATA/CONF/PIZ04_alarm.json
@@ -0,0 +1,52 @@
+[
+ {
+ "description": "Allarmi Impianto",
+ "tipoMem": "DInt",
+ "memAddr": "40901",
+ "index": 901,
+ "size": 2,
+ "messages": [
+ "Basso livello serbatoio",
+ "Alto livello serbatoio",
+ "Errore trasmettitore livello",
+ "Bassa pressione serbatoio",
+ "Alta pressione serbatoio",
+ "##",
+ "##",
+ "Allarme rilevatore gas 1",
+ "##",
+ "##",
+ "Allarme rilevatore gas 2",
+ "##",
+ "##",
+ "Allarme rilevatore gas 3",
+ "##",
+ "##"
+ ]
+ },
+ {
+ "description": "Emergenza",
+ "tipoMem": "DInt",
+ "memAddr": "40907",
+ "index": 907,
+ "size": 2,
+ "messages": [
+ "##",
+ "Pulsante di Emergenza Premuto",
+ "##",
+ "##",
+ "##",
+ "##",
+ "##",
+ "##",
+ "##",
+ "##",
+ "##",
+ "##",
+ "##",
+ "##",
+ "##",
+ "##"
+ ]
+ }
+]
\ No newline at end of file
diff --git a/IOB-WIN-MBUS/DATA/CONF/PIZ05.ini b/IOB-WIN-MBUS/DATA/CONF/PIZ05.ini
new file mode 100644
index 00000000..8a9cdda0
--- /dev/null
+++ b/IOB-WIN-MBUS/DATA/CONF/PIZ05.ini
@@ -0,0 +1,80 @@
+;Configurazione IOB-WIN
+[IOB]
+;Impianto HAM Baganzola per Pizzaferri
+CNCTYPE=MODBUS_TCP_HAM
+PING_MS_TIMEOUT=1000
+
+[MACHINE]
+VENDOR=HAM
+MODEL=HAM
+
+[CNC]
+IP=hambaganzola.dyndns.org
+PORT=502
+
+[SERVER]
+;MPIP=https://localhost:44339
+MPIP=https://gwms.egalware.com
+MPURL=/pizzaferri/api
+CMDBASE=/IOB/input/
+CMDFLOG=/IOB/flog/
+CMDALIVE=/IOB
+CMDENABLED=/IOB/enabled/
+CMDADV1=?valore=
+CMDREBO=/IOB/sendReboot?idxMacchina=
+
+[MEMORY]
+ADDR_READ=40000
+ADDR_WRITE=40400
+SIZE_READ=64
+SIZE_WRITE=358
+
+HR_BASE_ADDR=40000
+;DELTA_BASE=1
+DELTA_BASE=0
+INDEX_LUT_CORR=-1
+
+
+[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
+PZCOUNT_MODE=STD.DB85.DBRE16
+DISABLE_PZCOUNT=TRUE
+ENABLE_SEND_PZC_BLOCK=TRUE
+MIN_SEND_PZC_BLOCK=0
+MAX_SEND_PZC_BLOCK=100
+; GEST DATI DYN
+ENABLE_DYN_DATA=TRUE
+FORCE_DYN_DATA=TRUE
+; gestione delta minimo accettabile tra min/MAX
+DELTA_VAL=0.1
+
+; clock base (da 10ms)
+timerIntMs=150
+
+MAX_ERROR_READ=10
+
+; conf parametri memoria READ/WRITE
+PARAM_CONF=PIZ05.json
+
+NO_PING=FALSE
+; conf blocchi memoria x READ
+MEM_BLOCK=PIZ05_MBlock.json
+; conf aree allarme
+ALARM_CONF=PIZ05_alarm.json
+
+[BRANCH]
+NAME=master
\ No newline at end of file
diff --git a/IOB-WIN-MBUS/DATA/CONF/PIZ05.json b/IOB-WIN-MBUS/DATA/CONF/PIZ05.json
new file mode 100644
index 00000000..1ffd2f6c
--- /dev/null
+++ b/IOB-WIN-MBUS/DATA/CONF/PIZ05.json
@@ -0,0 +1,290 @@
+{
+ "mMapWrite": {
+ "SetLowTempGNC01": {
+ "name": "SetLowTempGNC01",
+ "description": "Set point di avviso per bassa temperatura all'uscita del vaporizzatore GNC 01",
+ "memAddr": "40453",
+ "tipoMem": "Real",
+ "index": 453,
+ "size": 2,
+ "minVal": -200,
+ "maxVal": 200,
+ "unit": "C"
+ },
+ "SetHighTempGNC01": {
+ "name": "SetHighTempGNC01",
+ "description": "Set point di avviso per alta temperatura all'uscita del vaporizzatore GNC 01",
+ "memAddr": "40455",
+ "tipoMem": "Real",
+ "index": 455,
+ "size": 2,
+ "minVal": -200,
+ "maxVal": 200,
+ "unit": "C"
+ },
+ "SetLowTempGNC02": {
+ "name": "SetLowTempGNC02",
+ "description": "Set point di avviso per bassa temperatura all'uscita del vaporizzatore GNC 02",
+ "memAddr": "40457",
+ "tipoMem": "Real",
+ "index": 457,
+ "size": 2,
+ "minVal": -200,
+ "maxVal": 200,
+ "unit": "C"
+ },
+ "SetHighTempGNC02": {
+ "name": "SetHighTempGNC02",
+ "description": "Set point di avviso per alta temperatura all'uscita del vaporizzatore GNC 02",
+ "memAddr": "40459",
+ "tipoMem": "Real",
+ "index": 459,
+ "size": 2,
+ "minVal": -200,
+ "maxVal": 200,
+ "unit": "C"
+ },
+ "SetLowTempAmb01": {
+ "name": "SetLowTempAmb01",
+ "description": "Set point di avviso per bassa temperatura ambiente nell'impianto 01",
+ "memAddr": "40421",
+ "tipoMem": "Real",
+ "index": 421,
+ "size": 2,
+ "minVal": -200,
+ "maxVal": 200,
+ "unit": "C"
+ },
+ "SetHighTempAmb01": {
+ "name": "SetHighTempAmb01",
+ "description": "Set point di avviso per alta temperatura ambiente nell'impianto 01",
+ "memAddr": "40423",
+ "tipoMem": "Real",
+ "index": 423,
+ "size": 2,
+ "minVal": -200,
+ "maxVal": 200,
+ "unit": "C"
+ },
+ "SetLowTempAmb02": {
+ "name": "SetLowTempAmb02",
+ "description": "Set point di avviso per bassa temperatura ambiente nell'impianto 02",
+ "memAddr": "40425",
+ "tipoMem": "Real",
+ "index": 425,
+ "size": 2,
+ "minVal": -200,
+ "maxVal": 200,
+ "unit": "C"
+ },
+ "SetHighTempAmb02": {
+ "name": "SetHighTempAmb02",
+ "description": "Set point di avviso per alta temperatura ambiente nell'impianto 02",
+ "memAddr": "40427",
+ "tipoMem": "Real",
+ "index": 427,
+ "size": 2,
+ "minVal": -200,
+ "maxVal": 200,
+ "unit": "C"
+ }
+ },
+ "mMapRead": {
+ "Level": {
+ "name": "Level",
+ "description": "Livello Serbatoio",
+ "memAddr": "40001",
+ "tipoMem": "Real",
+ "index": 1,
+ "size": 2,
+ "func": "MEDIAN",
+ "period": 90,
+ "factor": 270,
+ "minVal": -1,
+ "maxVal": 101,
+ "unit": "Kg"
+ },
+ "MainPress": {
+ "name": "MainPress",
+ "description": "Pressione Serbatoio",
+ "memAddr": "40003",
+ "tipoMem": "Real",
+ "index": 3,
+ "size": 2,
+ "func": "MEDIAN",
+ "period": 90,
+ "factor": 1,
+ "minVal": 0,
+ "maxVal": 400,
+ "unit": "bar"
+ },
+ "PressBH": {
+ "name": "PressBH",
+ "description": "Pressione media all'interno dell'accumulo GNC (pacco bombole) di alta pressione",
+ "memAddr": "40019",
+ "tipoMem": "Real",
+ "index": 19,
+ "size": 2,
+ "func": "MEDIAN",
+ "period": 90,
+ "factor": 1,
+ "minVal": 0,
+ "maxVal": 400,
+ "unit": "bar"
+ },
+ "PressBL": {
+ "name": "PressBL",
+ "description": "Pressione media all'interno dell'accumulo GNC (pacco bombole) di media pressione",
+ "memAddr": "40021",
+ "tipoMem": "Real",
+ "index": 21,
+ "size": 2,
+ "func": "MEDIAN",
+ "period": 90,
+ "factor": 1,
+ "minVal": 0,
+ "maxVal": 400,
+ "unit": "bar"
+ },
+ "TempGNC": {
+ "name": "TempGNC",
+ "description": "Temperatura all'uscita del vaporizzatore GNC",
+ "memAddr": "40027",
+ "tipoMem": "Real",
+ "index": 27,
+ "size": 2,
+ "func": "MEDIAN",
+ "period": 90,
+ "factor": 1,
+ "minVal": -200,
+ "maxVal": 301,
+ "unit": "C"
+ },
+ "TempAmb": {
+ "name": "TempAmb",
+ "description": "Temperatura ambiente nell'impianto",
+ "memAddr": "40011",
+ "tipoMem": "Real",
+ "index": 11,
+ "size": 2,
+ "func": "MEDIAN",
+ "period": 90,
+ "factor": 1,
+ "minVal": -200,
+ "maxVal": 301,
+ "unit": "C"
+ },
+ "SetLowTempGNC01": {
+ "name": "SetLowTempGNC01",
+ "description": "Set point di avviso per bassa temperatura all'uscita del vaporizzatore GNC 01",
+ "memAddr": "40453",
+ "tipoMem": "Real",
+ "index": 453,
+ "size": 2,
+ "func": "MEDIAN",
+ "period": 90,
+ "factor": 1,
+ "minVal": -200,
+ "maxVal": 200,
+ "unit": "C"
+ },
+ "SetHighTempGNC01": {
+ "name": "SetHighTempGNC01",
+ "description": "Set point di avviso per alta temperatura all'uscita del vaporizzatore GNC 01",
+ "memAddr": "40455",
+ "tipoMem": "Real",
+ "index": 455,
+ "size": 2,
+ "func": "MEDIAN",
+ "period": 90,
+ "factor": 1,
+ "minVal": -200,
+ "maxVal": 200,
+ "unit": "C"
+ },
+ "SetLowTempGNC02": {
+ "name": "SetLowTempGNC02",
+ "description": "Set point di avviso per bassa temperatura all'uscita del vaporizzatore GNC 02",
+ "memAddr": "40457",
+ "tipoMem": "Real",
+ "index": 457,
+ "size": 2,
+ "func": "MEDIAN",
+ "period": 90,
+ "factor": 1,
+ "minVal": -200,
+ "maxVal": 200,
+ "unit": "C"
+ },
+ "SetHighTempGNC02": {
+ "name": "SetHighTempGNC02",
+ "description": "Set point di avviso per alta temperatura all'uscita del vaporizzatore GNC 02",
+ "memAddr": "40459",
+ "tipoMem": "Real",
+ "index": 459,
+ "size": 2,
+ "func": "MEDIAN",
+ "period": 90,
+ "factor": 1,
+ "minVal": -200,
+ "maxVal": 200,
+ "unit": "C"
+ },
+ "SetLowTempAmb01": {
+ "name": "SetLowTempAmb01",
+ "description": "Set point di avviso per bassa temperatura ambiente nell'impianto 01",
+ "memAddr": "40421",
+ "tipoMem": "Real",
+ "index": 421,
+ "size": 2,
+ "func": "MEDIAN",
+ "period": 90,
+ "factor": 1,
+ "minVal": -200,
+ "maxVal": 200,
+ "unit": "C"
+ },
+ "SetHighTempAmb01": {
+ "name": "SetHighTempAmb01",
+ "description": "Set point di avviso per alta temperatura ambiente nell'impianto 01",
+ "memAddr": "40423",
+ "tipoMem": "Real",
+ "index": 423,
+ "size": 2,
+ "func": "MEDIAN",
+ "period": 90,
+ "factor": 1,
+ "minVal": -200,
+ "maxVal": 200,
+ "unit": "C"
+ },
+ "SetLowTempAmb02": {
+ "name": "SetLowTempAmb02",
+ "description": "Set point di avviso per bassa temperatura ambiente nell'impianto 02",
+ "memAddr": "40425",
+ "tipoMem": "Real",
+ "index": 425,
+ "size": 2,
+ "func": "MEDIAN",
+ "period": 90,
+ "factor": 1,
+ "minVal": -200,
+ "maxVal": 200,
+ "unit": "C"
+ },
+ "SetHighTempAmb02": {
+ "name": "SetHighTempAmb02",
+ "description": "Set point di avviso per alta temperatura ambiente nell'impianto 02",
+ "memAddr": "40427",
+ "tipoMem": "Real",
+ "index": 427,
+ "size": 2,
+ "func": "MEDIAN",
+ "period": 90,
+ "factor": 1,
+ "minVal": -200,
+ "maxVal": 200,
+ "unit": "C"
+ }
+ }
+}
\ No newline at end of file
diff --git a/IOB-WIN-MBUS/DATA/CONF/PIZ05_MBlock.json b/IOB-WIN-MBUS/DATA/CONF/PIZ05_MBlock.json
new file mode 100644
index 00000000..0074e94e
--- /dev/null
+++ b/IOB-WIN-MBUS/DATA/CONF/PIZ05_MBlock.json
@@ -0,0 +1,7 @@
+{
+ "ReadBlocks": {
+ "40000": 64,
+ "40420": 64,
+ "40900": 8
+ }
+}
\ No newline at end of file
diff --git a/IOB-WIN-MBUS/DATA/CONF/PIZ05_alarm.json b/IOB-WIN-MBUS/DATA/CONF/PIZ05_alarm.json
new file mode 100644
index 00000000..bcb583bc
--- /dev/null
+++ b/IOB-WIN-MBUS/DATA/CONF/PIZ05_alarm.json
@@ -0,0 +1,52 @@
+[
+ {
+ "description": "Allarmi Impianto",
+ "tipoMem": "DInt",
+ "memAddr": "40901",
+ "index": 901,
+ "size": 2,
+ "messages": [
+ "Basso livello serbatoio",
+ "Alto livello serbatoio",
+ "Errore trasmettitore livello",
+ "Bassa pressione serbatoio",
+ "Alta pressione serbatoio",
+ "##",
+ "##",
+ "Allarme rilevatore gas 1",
+ "##",
+ "##",
+ "Allarme rilevatore gas 2",
+ "##",
+ "##",
+ "Allarme rilevatore gas 3",
+ "##",
+ "##"
+ ]
+ },
+ {
+ "description": "Emergenza",
+ "tipoMem": "DInt",
+ "memAddr": "40907",
+ "index": 907,
+ "size": 2,
+ "messages": [
+ "##",
+ "Pulsante di Emergenza Premuto",
+ "##",
+ "##",
+ "##",
+ "##",
+ "##",
+ "##",
+ "##",
+ "##",
+ "##",
+ "##",
+ "##",
+ "##",
+ "##",
+ "##"
+ ]
+ }
+]
\ No newline at end of file
diff --git a/IOB-WIN-MBUS/DATA/CONF/PIZ09.ini b/IOB-WIN-MBUS/DATA/CONF/PIZ09.ini
new file mode 100644
index 00000000..e3056e40
--- /dev/null
+++ b/IOB-WIN-MBUS/DATA/CONF/PIZ09.ini
@@ -0,0 +1,80 @@
+;Configurazione IOB-WIN
+[IOB]
+;Impianto HAM Guardamiglio per Pizzaferri
+CNCTYPE=MODBUS_TCP_HAM
+PING_MS_TIMEOUT=1000
+
+[MACHINE]
+VENDOR=HAM
+MODEL=HAM
+
+[CNC]
+IP=hamguardamiglio.dyndns.org
+PORT=502
+
+[SERVER]
+;MPIP=https://localhost:44339
+MPIP=https://gwms.egalware.com
+MPURL=/pizzaferri/api
+CMDBASE=/IOB/input/
+CMDFLOG=/IOB/flog/
+CMDALIVE=/IOB
+CMDENABLED=/IOB/enabled/
+CMDADV1=?valore=
+CMDREBO=/IOB/sendReboot?idxMacchina=
+
+[MEMORY]
+ADDR_READ=40000
+ADDR_WRITE=40400
+SIZE_READ=64
+SIZE_WRITE=358
+
+HR_BASE_ADDR=40000
+;DELTA_BASE=1
+DELTA_BASE=0
+INDEX_LUT_CORR=-1
+
+
+[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
+PZCOUNT_MODE=STD.DB85.DBRE16
+DISABLE_PZCOUNT=TRUE
+ENABLE_SEND_PZC_BLOCK=TRUE
+MIN_SEND_PZC_BLOCK=0
+MAX_SEND_PZC_BLOCK=100
+; GEST DATI DYN
+ENABLE_DYN_DATA=TRUE
+FORCE_DYN_DATA=TRUE
+; gestione delta minimo accettabile tra min/MAX
+DELTA_VAL=0.1
+
+; clock base (da 10ms)
+timerIntMs=150
+
+MAX_ERROR_READ=10
+
+; conf parametri memoria READ/WRITE
+PARAM_CONF=PIZ09.json
+
+NO_PING=FALSE
+; conf blocchi memoria x READ
+MEM_BLOCK=PIZ09_MBlock.json
+; conf aree allarme
+ALARM_CONF=PIZ09_alarm.json
+
+[BRANCH]
+NAME=master
\ No newline at end of file
diff --git a/IOB-WIN-MBUS/DATA/CONF/PIZ09.json b/IOB-WIN-MBUS/DATA/CONF/PIZ09.json
new file mode 100644
index 00000000..b0690480
--- /dev/null
+++ b/IOB-WIN-MBUS/DATA/CONF/PIZ09.json
@@ -0,0 +1,148 @@
+{
+ "mMapWrite": {
+ "SetLowTempAmb01": {
+ "name": "SetLowTempAmb01",
+ "description": "Set point di avviso per bassa temperatura ambiente nell'impianto 01",
+ "memAddr": "40421",
+ "tipoMem": "Real",
+ "index": 421,
+ "size": 2,
+ "minVal": -200,
+ "maxVal": 200,
+ "unit": "C"
+ },
+ "SetHighTempAmb01": {
+ "name": "SetHighTempAmb01",
+ "description": "Set point di avviso per alta temperatura ambiente nell'impianto 01",
+ "memAddr": "40423",
+ "tipoMem": "Real",
+ "index": 423,
+ "size": 2,
+ "minVal": -200,
+ "maxVal": 200,
+ "unit": "C"
+ },
+ "SetLowTempAmb02": {
+ "name": "SetLowTempAmb02",
+ "description": "Set point di avviso per bassa temperatura ambiente nell'impianto 02",
+ "memAddr": "40425",
+ "tipoMem": "Real",
+ "index": 425,
+ "size": 2,
+ "minVal": -200,
+ "maxVal": 200,
+ "unit": "C"
+ },
+ "SetHighTempAmb02": {
+ "name": "SetHighTempAmb02",
+ "description": "Set point di avviso per alta temperatura ambiente nell'impianto 02",
+ "memAddr": "40427",
+ "tipoMem": "Real",
+ "index": 427,
+ "size": 2,
+ "minVal": -200,
+ "maxVal": 200,
+ "unit": "C"
+ }
+ },
+ "mMapRead": {
+ "Level": {
+ "name": "Level",
+ "description": "Livello Serbatoio",
+ "memAddr": "40001",
+ "tipoMem": "Real",
+ "index": 1,
+ "size": 2,
+ "func": "MEDIAN",
+ "period": 90,
+ "factor": 360,
+ "minVal": 0,
+ "maxVal": 100,
+ "unit": "Kg"
+ },
+ "MainPress": {
+ "name": "MainPress",
+ "description": "Pressione Serbatoio",
+ "memAddr": "40003",
+ "tipoMem": "Real",
+ "index": 3,
+ "size": 2,
+ "func": "MEDIAN",
+ "period": 90,
+ "factor": 1,
+ "minVal": 0,
+ "maxVal": 400,
+ "unit": "bar"
+ },
+ "TempSerb": {
+ "name": "TempSerb",
+ "description": "Temperatura prodotto all'interno del serbatoio",
+ "memAddr": "40049",
+ "tipoMem": "Real",
+ "index": 49,
+ "size": 2,
+ "func": "MEDIAN",
+ "period": 90,
+ "factor": 1,
+ "minVal": -200,
+ "maxVal": 200,
+ "unit": "C"
+ },
+ "SetLowTempAmb01": {
+ "name": "SetLowTempAmb01",
+ "description": "Set point di avviso per bassa temperatura ambiente nell'impianto 01",
+ "memAddr": "40421",
+ "tipoMem": "Real",
+ "index": 421,
+ "size": 2,
+ "func": "MEDIAN",
+ "period": 90,
+ "factor": 1,
+ "minVal": -200,
+ "maxVal": 200,
+ "unit": "C"
+ },
+ "SetHighTempAmb01": {
+ "name": "SetHighTempAmb01",
+ "description": "Set point di avviso per alta temperatura ambiente nell'impianto 01",
+ "memAddr": "40423",
+ "tipoMem": "Real",
+ "index": 423,
+ "size": 2,
+ "func": "MEDIAN",
+ "period": 90,
+ "factor": 1,
+ "minVal": -200,
+ "maxVal": 200,
+ "unit": "C"
+ },
+ "SetLowTempAmb02": {
+ "name": "SetLowTempAmb02",
+ "description": "Set point di avviso per bassa temperatura ambiente nell'impianto 02",
+ "memAddr": "40425",
+ "tipoMem": "Real",
+ "index": 425,
+ "size": 2,
+ "func": "MEDIAN",
+ "period": 90,
+ "factor": 1,
+ "minVal": -200,
+ "maxVal": 200,
+ "unit": "C"
+ },
+ "SetHighTempAmb02": {
+ "name": "SetHighTempAmb02",
+ "description": "Set point di avviso per alta temperatura ambiente nell'impianto 02",
+ "memAddr": "40427",
+ "tipoMem": "Real",
+ "index": 427,
+ "size": 2,
+ "func": "MEDIAN",
+ "period": 90,
+ "factor": 1,
+ "minVal": -200,
+ "maxVal": 200,
+ "unit": "C"
+ }
+ }
+}
\ No newline at end of file
diff --git a/IOB-WIN-MBUS/DATA/CONF/PIZ09_MBlock.json b/IOB-WIN-MBUS/DATA/CONF/PIZ09_MBlock.json
new file mode 100644
index 00000000..a259a433
--- /dev/null
+++ b/IOB-WIN-MBUS/DATA/CONF/PIZ09_MBlock.json
@@ -0,0 +1,7 @@
+{
+ "ReadBlocks": {
+ "40000": 64,
+ "40420": 64,
+ "40900": 8
+ }
+}
\ No newline at end of file
diff --git a/IOB-WIN-MBUS/DATA/CONF/PIZ09_alarm.json b/IOB-WIN-MBUS/DATA/CONF/PIZ09_alarm.json
new file mode 100644
index 00000000..e24aa3f0
--- /dev/null
+++ b/IOB-WIN-MBUS/DATA/CONF/PIZ09_alarm.json
@@ -0,0 +1,54 @@
+[
+ {
+ "blinkVal": 100,
+ "description": "Allarmi Impianto",
+ "tipoMem": "DInt",
+ "memAddr": "40901",
+ "index": 901,
+ "size": 2,
+ "messages": [
+ "Basso livello serbatoio",
+ "Alto livello serbatoio",
+ "Errore trasmettitore livello",
+ "Bassa pressione serbatoio",
+ "Alta pressione serbatoio",
+ "##",
+ "##",
+ "Allarme rilevatore gas 1",
+ "##",
+ "##",
+ "Allarme rilevatore gas 2",
+ "##",
+ "##",
+ "Allarme rilevatore gas 3",
+ "##",
+ "##"
+ ]
+ },
+ {
+ "blinkVal": 100,
+ "description": "Emergenza",
+ "tipoMem": "DInt",
+ "memAddr": "40907",
+ "index": 907,
+ "size": 2,
+ "messages": [
+ "##",
+ "Pulsante di Emergenza Premuto",
+ "##",
+ "##",
+ "##",
+ "##",
+ "##",
+ "##",
+ "##",
+ "##",
+ "##",
+ "##",
+ "##",
+ "##",
+ "##",
+ "##"
+ ]
+ }
+]
\ No newline at end of file
diff --git a/IOB-WIN-MBUS/DATA/CONF/PIZ10.ini b/IOB-WIN-MBUS/DATA/CONF/PIZ10.ini
new file mode 100644
index 00000000..b66b6292
--- /dev/null
+++ b/IOB-WIN-MBUS/DATA/CONF/PIZ10.ini
@@ -0,0 +1,88 @@
+;Configurazione IOB-WIN
+[IOB]
+;Impianto HAM Guardamiglio per Pizzaferri
+CNCTYPE=MODBUS_TCP_HAM
+PING_MS_TIMEOUT=1000
+
+[MACHINE]
+VENDOR=HAM
+MODEL=HAM
+
+[CNC]
+IP=192.168.10.100
+;IP=hamsantilario.dyndns.org
+PORT=502
+
+[SERVER]
+;MPIP=https://localhost:44339
+MPIP=https://gwms.egalware.com
+MPURL=/pizzaferri/api
+CMDBASE=/IOB/input/
+CMDFLOG=/IOB/flog/
+CMDALIVE=/IOB
+CMDENABLED=/IOB/enabled/
+CMDADV1=?valore=
+CMDREBO=/IOB/sendReboot?idxMacchina=
+
+[MEMORY]
+ADDR_READ=40000
+ADDR_WRITE=40400
+SIZE_READ=64
+SIZE_WRITE=358
+
+HR_BASE_ADDR=40000
+;DELTA_BASE=1
+DELTA_BASE=0
+INDEX_LUT_CORR=-1
+
+
+[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
+PZCOUNT_MODE=STD.DB85.DBRE16
+DISABLE_PZCOUNT=TRUE
+ENABLE_SEND_PZC_BLOCK=TRUE
+MIN_SEND_PZC_BLOCK=0
+MAX_SEND_PZC_BLOCK=100
+; GEST DATI DYN
+ENABLE_DYN_DATA=TRUE
+FORCE_DYN_DATA=TRUE
+; gestione delta minimo accettabile tra min/MAX
+DELTA_VAL=0.1
+
+; clock base (da 10ms)
+timerIntMs=50
+
+MAX_ERROR_READ=10
+
+; conf parametri memoria READ/WRITE
+PARAM_CONF=PIZ10.json
+
+NO_PING=FALSE
+; conf blocchi memoria x READ
+MEM_BLOCK=PIZ10_MBlock.json
+; conf aree allarme
+ALARM_CONF=PIZ10_alarm.json
+
+[BRANCH]
+NAME=master
+
+; Tags manuali
+[TAGS]
+Customer=Pizzaferri
+HostOS=WIN
+HostName=PIZZAFERRI-IOB-WIN-03
+HostAddr=192.168.10.50
diff --git a/IOB-WIN-MBUS/DATA/CONF/PIZ10.json b/IOB-WIN-MBUS/DATA/CONF/PIZ10.json
new file mode 100644
index 00000000..b5584dee
--- /dev/null
+++ b/IOB-WIN-MBUS/DATA/CONF/PIZ10.json
@@ -0,0 +1,176 @@
+{
+ "mMapWrite": {
+ "SetLowTempAmb01": {
+ "name": "SetLowTempAmb01",
+ "description": "Set point di avviso per bassa temperatura ambiente nell'impianto 01",
+ "memAddr": "40421",
+ "tipoMem": "Real",
+ "index": 421,
+ "size": 2,
+ "minVal": -200,
+ "maxVal": 200,
+ "unit": "C"
+ },
+ "SetHighTempAmb01": {
+ "name": "SetHighTempAmb01",
+ "description": "Set point di avviso per alta temperatura ambiente nell'impianto 01",
+ "memAddr": "40423",
+ "tipoMem": "Real",
+ "index": 423,
+ "size": 2,
+ "minVal": -200,
+ "maxVal": 200,
+ "unit": "C"
+ },
+ "SetLowTempAmb02": {
+ "name": "SetLowTempAmb02",
+ "description": "Set point di avviso per bassa temperatura ambiente nell'impianto 02",
+ "memAddr": "40425",
+ "tipoMem": "Real",
+ "index": 425,
+ "size": 2,
+ "minVal": -200,
+ "maxVal": 200,
+ "unit": "C"
+ },
+ "SetHighTempAmb02": {
+ "name": "SetHighTempAmb02",
+ "description": "Set point di avviso per alta temperatura ambiente nell'impianto 02",
+ "memAddr": "40427",
+ "tipoMem": "Real",
+ "index": 427,
+ "size": 2,
+ "minVal": -200,
+ "maxVal": 200,
+ "unit": "C"
+ }
+ },
+ "mMapRead": {
+ "Level": {
+ "name": "Level",
+ "description": "Livello Serbatoio",
+ "memAddr": "40001",
+ "tipoMem": "Real",
+ "index": 1,
+ "size": 2,
+ "func": "MEDIAN",
+ "period": 90,
+ "factor": 360,
+ "minVal": 0,
+ "maxVal": 100,
+ "unit": "Kg"
+ },
+ "MainPress": {
+ "name": "MainPress",
+ "description": "Pressione Serbatoio",
+ "memAddr": "40003",
+ "tipoMem": "Real",
+ "index": 3,
+ "size": 2,
+ "func": "MEDIAN",
+ "period": 90,
+ "factor": 1,
+ "minVal": 0,
+ "maxVal": 400,
+ "unit": "bar"
+ },
+ "TempSerb": {
+ "name": "TempSerb",
+ "description": "Temperatura prodotto all'interno del serbatoio",
+ "memAddr": "40049",
+ "tipoMem": "Real",
+ "index": 49,
+ "size": 2,
+ "func": "MEDIAN",
+ "period": 90,
+ "factor": 1,
+ "minVal": -200,
+ "maxVal": 200,
+ "unit": "C"
+ },
+ "SetLowTempAmb01": {
+ "name": "SetLowTempAmb01",
+ "description": "Set point di avviso per bassa temperatura ambiente nell'impianto 01",
+ "memAddr": "40421",
+ "tipoMem": "Real",
+ "index": 421,
+ "size": 2,
+ "func": "MEDIAN",
+ "period": 90,
+ "factor": 1,
+ "minVal": -200,
+ "maxVal": 200,
+ "unit": "C"
+ },
+ "SetHighTempAmb01": {
+ "name": "SetHighTempAmb01",
+ "description": "Set point di avviso per alta temperatura ambiente nell'impianto 01",
+ "memAddr": "40423",
+ "tipoMem": "Real",
+ "index": 423,
+ "size": 2,
+ "func": "MEDIAN",
+ "period": 90,
+ "factor": 1,
+ "minVal": -200,
+ "maxVal": 200,
+ "unit": "C"
+ },
+ "SetLowTempAmb02": {
+ "name": "SetLowTempAmb02",
+ "description": "Set point di avviso per bassa temperatura ambiente nell'impianto 02",
+ "memAddr": "40425",
+ "tipoMem": "Real",
+ "index": 425,
+ "size": 2,
+ "func": "MEDIAN",
+ "period": 90,
+ "factor": 1,
+ "minVal": -200,
+ "maxVal": 200,
+ "unit": "C"
+ },
+ "SetHighTempAmb02": {
+ "name": "SetHighTempAmb02",
+ "description": "Set point di avviso per alta temperatura ambiente nell'impianto 02",
+ "memAddr": "40427",
+ "tipoMem": "Real",
+ "index": 427,
+ "size": 2,
+ "func": "MEDIAN",
+ "period": 90,
+ "factor": 1,
+ "minVal": -200,
+ "maxVal": 200,
+ "unit": "C"
+ },
+ "PressBH": {
+ "name": "PressBH",
+ "description": "Pressione media all'interno dell'accumulo GNC (pacco bombole) di alta pressione",
+ "memAddr": "40019",
+ "tipoMem": "Real",
+ "index": 19,
+ "size": 2,
+ "func": "MEDIAN",
+ "period": 90,
+ "factor": 1,
+ "minVal": 0,
+ "maxVal": 400,
+ "unit": "bar"
+ },
+ "PressBL": {
+ "name": "PressBL",
+ "description": "Pressione media all'interno dell'accumulo GNC (pacco bombole) di media pressione",
+ "memAddr": "40021",
+ "tipoMem": "Real",
+ "index": 21,
+ "size": 2,
+ "func": "MEDIAN",
+ "period": 90,
+ "factor": 1,
+ "minVal": 0,
+ "maxVal": 400,
+ "unit": "bar"
+ }
+ }
+}
\ No newline at end of file
diff --git a/IOB-WIN-MBUS/DATA/CONF/PIZ10_MBlock.json b/IOB-WIN-MBUS/DATA/CONF/PIZ10_MBlock.json
new file mode 100644
index 00000000..a259a433
--- /dev/null
+++ b/IOB-WIN-MBUS/DATA/CONF/PIZ10_MBlock.json
@@ -0,0 +1,7 @@
+{
+ "ReadBlocks": {
+ "40000": 64,
+ "40420": 64,
+ "40900": 8
+ }
+}
\ No newline at end of file
diff --git a/IOB-WIN-MBUS/DATA/CONF/PIZ10_alarm.json b/IOB-WIN-MBUS/DATA/CONF/PIZ10_alarm.json
new file mode 100644
index 00000000..e24aa3f0
--- /dev/null
+++ b/IOB-WIN-MBUS/DATA/CONF/PIZ10_alarm.json
@@ -0,0 +1,54 @@
+[
+ {
+ "blinkVal": 100,
+ "description": "Allarmi Impianto",
+ "tipoMem": "DInt",
+ "memAddr": "40901",
+ "index": 901,
+ "size": 2,
+ "messages": [
+ "Basso livello serbatoio",
+ "Alto livello serbatoio",
+ "Errore trasmettitore livello",
+ "Bassa pressione serbatoio",
+ "Alta pressione serbatoio",
+ "##",
+ "##",
+ "Allarme rilevatore gas 1",
+ "##",
+ "##",
+ "Allarme rilevatore gas 2",
+ "##",
+ "##",
+ "Allarme rilevatore gas 3",
+ "##",
+ "##"
+ ]
+ },
+ {
+ "blinkVal": 100,
+ "description": "Emergenza",
+ "tipoMem": "DInt",
+ "memAddr": "40907",
+ "index": 907,
+ "size": 2,
+ "messages": [
+ "##",
+ "Pulsante di Emergenza Premuto",
+ "##",
+ "##",
+ "##",
+ "##",
+ "##",
+ "##",
+ "##",
+ "##",
+ "##",
+ "##",
+ "##",
+ "##",
+ "##",
+ "##"
+ ]
+ }
+]
\ No newline at end of file
diff --git a/IOB-WIN-MBUS/DATA/CONF/Tend_FIMAT_01.ini b/IOB-WIN-MBUS/DATA/CONF/Tend_FIMAT_01.ini
new file mode 100644
index 00000000..f7bb0592
--- /dev/null
+++ b/IOB-WIN-MBUS/DATA/CONF/Tend_FIMAT_01.ini
@@ -0,0 +1,80 @@
+;Configurazione IOB-WIN
+[IOB]
+;Impianto Rimor verniciatura - IMI Remosa
+CNCTYPE=MODBUS_TCP_FIMAT
+PING_MS_TIMEOUT=1000
+MinDeltaSec=5
+;IOB_NAME=Tend_Fimat
+DIS_EXE_TASK=FALSE
+DIS_STATE_CH=FALSE
+
+[MACHINE]
+VENDOR=FIMAT
+MODEL=Impianto mix colori - PLC
+
+[CNC]
+IP=192.168.10.49
+PORT=502
+
+[SERVER]
+MPIP=http://192.168.10.7
+MPURL=/MP/IO
+CMDBASE=/IOB/input/
+CMDFLOG=/IOB/flog/
+CMDALIVE=/IOB
+CMDENABLED=/IOB/enabled/
+CMDADV1=?valore=
+CMDREBO=/sendReboot.aspx?idxMacchina=
+
+[MEMORY]
+ADDR_READ=40000
+ADDR_WRITE=40000
+SIZE_READ=10
+SIZE_WRITE=0
+HR_BASE_ADDR=40000
+DELTA_BASE=0
+INDEX_LUT_CORR=0
+MODBUS_EXT_REG=0
+
+
+[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
+PZCOUNT_MODE=STD.DB85.DBRE16
+DISABLE_PZCOUNT=TRUE
+ENABLE_SEND_PZC_BLOCK=TRUE
+MIN_SEND_PZC_BLOCK=0
+MAX_SEND_PZC_BLOCK=100
+; GEST DATI DYN
+ENABLE_DYN_DATA=TRUE
+FORCE_DYN_DATA=TRUE
+; gestione delta minimo accettabile tra min/MAX
+DELTA_VAL=0.1
+; clock base (da 10ms)
+timerIntMs=10
+; conf parametri memoria READ/WRITE
+PARAM_CONF=Tend_FIMAT_01.json
+NO_PING=FALSE
+; conf blocchi memoria x READ
+MEM_BLOCK=Tend_FIMAT_01_MBlock.json
+; conf aree allarme
+ALARM_CONF=Tend_FIMAT_01_alarm.json
+; rimozione check limiti min/max dynData
+disDynDataRangeCheck=true
+
+
+[BRANCH]
+NAME=master
\ No newline at end of file
diff --git a/IOB-WIN-MBUS/DATA/CONF/Tend_FIMAT_01.json b/IOB-WIN-MBUS/DATA/CONF/Tend_FIMAT_01.json
new file mode 100644
index 00000000..fd1d7891
--- /dev/null
+++ b/IOB-WIN-MBUS/DATA/CONF/Tend_FIMAT_01.json
@@ -0,0 +1,342 @@
+{
+ "mMapWrite": {},
+ "mMapRead": {
+ "StatoMacchina": {
+ "name": "StatoMacchina",
+ "description": "Stato della Macchina",
+ "memAddr": "40001",
+ "tipoMem": "Int",
+ "index": 1,
+ "size": 1,
+ "func": "MAX",
+ "period": 90,
+ "factor": 1,
+ "minVal": 0,
+ "maxVal": 10,
+ "unit": "#"
+ },
+ "ElencoAnomalie": {
+ "name": "ElencoAnomalie",
+ "description": "Elenco Anomalie",
+ "memAddr": "40002",
+ "tipoMem": "Int",
+ "index": 2,
+ "size": 1,
+ "func": "MAX",
+ "period": 90,
+ "factor": 1,
+ "minVal": 0,
+ "maxVal": 10,
+ "unit": "#"
+ },
+ "ElencoAttivita": {
+ "name": "ElencoAttivita",
+ "description": "Elenco Attivita",
+ "memAddr": "40003",
+ "tipoMem": "Int",
+ "index": 3,
+ "size": 1,
+ "func": "MAX",
+ "period": 90,
+ "factor": 1,
+ "minVal": 0,
+ "maxVal": 10,
+ "unit": "#"
+ },
+ "StatoRicircolo": {
+ "name": "StatoRicircolo",
+ "description": "Stato Ricircolo Serbatoi",
+ "memAddr": "40004",
+ "tipoMem": "Int",
+ "index": 4,
+ "size": 1,
+ "func": "MAX",
+ "period": 90,
+ "factor": 1,
+ "minVal": 0,
+ "maxVal": 10,
+ "unit": "#"
+ },
+ "NumAllarmi": {
+ "name": "NumAllarmi",
+ "description": "Numero Allarmi Presenti",
+ "memAddr": "40005",
+ "tipoMem": "Int",
+ "index": 5,
+ "size": 1,
+ "func": "MAX",
+ "period": 90,
+ "factor": 1,
+ "minVal": 0,
+ "maxVal": 1000,
+ "unit": "#"
+ },
+ "NumAllarmiNR": {
+ "name": "NumAllarmiNR",
+ "description": "NUmero Allarmi Non Riconosciuti",
+ "memAddr": "40006",
+ "tipoMem": "Int",
+ "index": 6,
+ "size": 1,
+ "func": "MAX",
+ "period": 90,
+ "factor": 1,
+ "minVal": 0,
+ "maxVal": 1000,
+ "unit": "#"
+ },
+ "ModoPreparazione": {
+ "name": "ModoPreparazione",
+ "description": "Modo Preparazione Ricetta",
+ "memAddr": "40007",
+ "tipoMem": "Int",
+ "index": 7,
+ "size": 1,
+ "func": "MAX",
+ "period": 90,
+ "factor": 1,
+ "minVal": 0,
+ "maxVal": 10,
+ "unit": "#"
+ },
+ "NumRicette": {
+ "name": "NumRicette",
+ "description": "Numero Ricette in coda",
+ "memAddr": "40008",
+ "tipoMem": "Int",
+ "index": 8,
+ "size": 1,
+ "func": "MAX",
+ "period": 90,
+ "factor": 1,
+ "minVal": 0,
+ "maxVal": 1000,
+ "unit": "#"
+ },
+ "StatoImport": {
+ "name": "StatoImport",
+ "description": "Stato Importazione file ricette XML da esterno",
+ "memAddr": "40009",
+ "tipoMem": "Int",
+ "index": 9,
+ "size": 1,
+ "func": "MAX",
+ "period": 90,
+ "factor": 1,
+ "minVal": 0,
+ "maxVal": 10,
+ "unit": "#"
+ },
+ "LivSerb01": {
+ "name": "LivSerb01",
+ "description": "Livello Servatoio 01",
+ "memAddr": "40020",
+ "tipoMem": "Int",
+ "index": 20,
+ "size": 1,
+ "func": "MAX",
+ "period": 90,
+ "factor": 1,
+ "minVal": 0,
+ "maxVal": 1000,
+ "unit": "#"
+ },
+ "LivSerb02": {
+ "name": "LivSerb02",
+ "description": "Livello Servatoio 02",
+ "memAddr": "40021",
+ "tipoMem": "Int",
+ "index": 21,
+ "size": 1,
+ "func": "MAX",
+ "period": 90,
+ "factor": 1,
+ "minVal": 0,
+ "maxVal": 1000,
+ "unit": "#"
+ },
+ "LivSerb03": {
+ "name": "LivSerb03",
+ "description": "Livello Servatoio 03",
+ "memAddr": "40022",
+ "tipoMem": "Int",
+ "index": 22,
+ "size": 1,
+ "func": "MAX",
+ "period": 90,
+ "factor": 1,
+ "minVal": 0,
+ "maxVal": 1000,
+ "unit": "#"
+ },
+ "LivSerb04": {
+ "name": "LivSerb04",
+ "description": "Livello Servatoio 04",
+ "memAddr": "40023",
+ "tipoMem": "Int",
+ "index": 23,
+ "size": 1,
+ "func": "MAX",
+ "period": 90,
+ "factor": 1,
+ "minVal": 0,
+ "maxVal": 1000,
+ "unit": "#"
+ },
+ "LivSerb05": {
+ "name": "LivSerb05",
+ "description": "Livello Servatoio 05",
+ "memAddr": "40024",
+ "tipoMem": "Int",
+ "index": 24,
+ "size": 1,
+ "func": "MAX",
+ "period": 90,
+ "factor": 1,
+ "minVal": 0,
+ "maxVal": 1000,
+ "unit": "#"
+ },
+ "LivSerb06": {
+ "name": "LivSerb06",
+ "description": "Livello Servatoio 06",
+ "memAddr": "40025",
+ "tipoMem": "Int",
+ "index": 25,
+ "size": 1,
+ "func": "MAX",
+ "period": 90,
+ "factor": 1,
+ "minVal": 0,
+ "maxVal": 1000,
+ "unit": "#"
+ },
+ "LivSerb07": {
+ "name": "LivSerb07",
+ "description": "Livello Servatoio 07",
+ "memAddr": "40026",
+ "tipoMem": "Int",
+ "index": 26,
+ "size": 1,
+ "func": "MAX",
+ "period": 90,
+ "factor": 1,
+ "minVal": 0,
+ "maxVal": 1000,
+ "unit": "#"
+ },
+ "LivSerb08": {
+ "name": "LivSerb08",
+ "description": "Livello Servatoio 08",
+ "memAddr": "40027",
+ "tipoMem": "Int",
+ "index": 27,
+ "size": 1,
+ "func": "MAX",
+ "period": 90,
+ "factor": 1,
+ "minVal": 0,
+ "maxVal": 1000,
+ "unit": "#"
+ },
+ "LivSerb09": {
+ "name": "LivSerb09",
+ "description": "Livello Servatoio 09",
+ "memAddr": "40028",
+ "tipoMem": "Int",
+ "index": 28,
+ "size": 1,
+ "func": "MAX",
+ "period": 90,
+ "factor": 1,
+ "minVal": 0,
+ "maxVal": 1000,
+ "unit": "#"
+ },
+ "LivSerb10": {
+ "name": "LivSerb10",
+ "description": "Livello Servatoio 10",
+ "memAddr": "40029",
+ "tipoMem": "Int",
+ "index": 29,
+ "size": 1,
+ "func": "MAX",
+ "period": 90,
+ "factor": 1,
+ "minVal": 0,
+ "maxVal": 1000,
+ "unit": "#"
+ },
+ "LivSerb11": {
+ "name": "LivSerb11",
+ "description": "Livello Servatoio 11",
+ "memAddr": "40030",
+ "tipoMem": "Int",
+ "index": 30,
+ "size": 1,
+ "func": "MAX",
+ "period": 90,
+ "factor": 1,
+ "minVal": 0,
+ "maxVal": 1000,
+ "unit": "#"
+ },
+ "LivSerb12": {
+ "name": "LivSerb12",
+ "description": "Livello Servatoio 12",
+ "memAddr": "40031",
+ "tipoMem": "Int",
+ "index": 31,
+ "size": 1,
+ "func": "MAX",
+ "period": 90,
+ "factor": 1,
+ "minVal": 0,
+ "maxVal": 1000,
+ "unit": "#"
+ }
+ },
+ "optMemPar": {
+ "AlarmIntCond": "40000|1=2",
+ "ManualBitCond": "40002.1=1",
+ "EStopBitCond": "40002.0=1",
+ "WorkIntCond": "40000|1=3",
+ //"VarInt2Translate": "40001,40007",
+ //"VarBit2Translate": "40003"
+ },
+ "optKVP": {
+ "hasRecipe": true,
+ "maxPodlQty": 530,
+ "useLocalRecipe": true,
+ "path-locBase": "E:\\MesData\\",
+ "path-remBase": "C:\\MesData\\Remote",
+ "path-00-Arch": "ArchivioRicette\\FIMAT",
+ "path-01-Temp": "01-Temp\\FIMAT",
+ "path-02-Sent": "02-Inviate\\FIMAT",
+ "path-03-Recv": "03-Ricevute\\FIMAT",
+ "path-04-remReq": "Y:\\",
+ "path-05-remExe": "Z:\\",
+ "path-06-remRec": "R:\\",
+ "path-outReport": "C:\\MesData\\Report",
+ "path-confSetup": "E:\\MesData\\Setup\\setupConsumi.json",
+ "replace-": "{{PODL}}",
+ "replace-": "Kg{{Qty}} | {{Note}}"
+ },
+ "itemTranslation": {
+ "40001_0": "Stato non aggiornato per mancanza comunicazione da computer",
+ "40001_1": "Stato non aggiornato per mancanza comunicazione da PLC",
+ "40001_2": "Presenza di anomalie od attivita che limitano il funzionamento",
+ "40001_3": "Macchina impegnata per attivita normale in corso",
+ "40001_4": "Macchina libera e pronta al funzionamento",
+ "40003.0": "Posizione di dosaggio impegnata",
+ "40003.1": "Bidone con ricetta terminata od annullata da rimuovere da posizione di dosaggio",
+ "40003.2": "Ricetta in preparazione",
+ "40003.3": "Lavaggio valvole in corso",
+ "40003.4": "Avvio caricamento nuova ricetta in corso",
+ "40007_0": "Nessuno",
+ "40007_1": "Singola ricetta",
+ "40007_2": "Coda (modo non ancora avviato)",
+ "40007_3": "Coda (modo avviato)",
+ "40007_4": "Correzione"
+ }
+}
\ No newline at end of file
diff --git a/IOB-WIN-MBUS/DATA/CONF/Tend_FIMAT_01_MBlock.json b/IOB-WIN-MBUS/DATA/CONF/Tend_FIMAT_01_MBlock.json
new file mode 100644
index 00000000..45d868ce
--- /dev/null
+++ b/IOB-WIN-MBUS/DATA/CONF/Tend_FIMAT_01_MBlock.json
@@ -0,0 +1,5 @@
+{
+ "ReadBlocks": {
+ "40000": 40
+ }
+}
\ No newline at end of file
diff --git a/IOB-WIN-MBUS/DATA/CONF/Tend_FIMAT_01_alarm.json b/IOB-WIN-MBUS/DATA/CONF/Tend_FIMAT_01_alarm.json
new file mode 100644
index 00000000..17b29fa9
--- /dev/null
+++ b/IOB-WIN-MBUS/DATA/CONF/Tend_FIMAT_01_alarm.json
@@ -0,0 +1,19 @@
+[
+ {
+ "description": "Anomalie Macchina",
+ "tipoMem": "Int",
+ "memAddr": "40002",
+ "index": 2,
+ "size": 1,
+ "messages": [
+ "Emergenza Premuta",
+ "##Macchina in Manuale",
+ "Azzeramento asse non ancora eseguito o anomalia al posizionamento valvole",
+ "Anomalia alla bilancia (errore, mancanza comunicazione o fuori scala)",
+ "Anomalia ad elemento di dosaggio",
+ "##Richiesta Sospensione attività",
+ "##Azzeramento peso in corso",
+ "##"
+ ]
+ }
+]
\ No newline at end of file
diff --git a/IOB-WIN-MBUS/ILLink/ILLink.Descriptors.LibraryBuild.xml b/IOB-WIN-MBUS/ILLink/ILLink.Descriptors.LibraryBuild.xml
new file mode 100644
index 00000000..a42d7f0e
--- /dev/null
+++ b/IOB-WIN-MBUS/ILLink/ILLink.Descriptors.LibraryBuild.xml
@@ -0,0 +1,8 @@
+
+
+
+
+
+
+
+
diff --git a/IOB-WIN-MBUS/IOB-WIN-MBUS.csproj b/IOB-WIN-MBUS/IOB-WIN-MBUS.csproj
index 40368b2c..40bdc37b 100644
--- a/IOB-WIN-MBUS/IOB-WIN-MBUS.csproj
+++ b/IOB-WIN-MBUS/IOB-WIN-MBUS.csproj
@@ -4,10 +4,10 @@
Debug
AnyCPU
- {EEBE38BD-29EE-45DE-9AF4-8FA34B58D8BA}
+ {8A4954B2-1492-4CEF-8F6C-619E397718CF}
WinExe
- IOB_WIN_MTC
- IOB-WIN-MTC
+ IOB_WIN_MBUS
+ IOB-WIN-MBUS
v4.6.2
512
true
@@ -34,24 +34,21 @@
prompt
4
-
- true
- bin\Remote_DEBUG\
- DEBUG;TRACE
- full
- x86
- 7.3
- prompt
-
+
+ ..\packages\EasyModbusTCP.5.6.0\lib\net40\EasyModbus.dll
+
..\packages\MapoSDK.6.14.2411.518\lib\MapoSDK.dll
-
- ..\packages\Microsoft.Bcl.AsyncInterfaces.6.0.0\lib\net461\Microsoft.Bcl.AsyncInterfaces.dll
+
+ ..\packages\Microsoft.Bcl.AsyncInterfaces.9.0.0\lib\net462\Microsoft.Bcl.AsyncInterfaces.dll
-
- ..\packages\Microsoft.Extensions.Logging.Abstractions.6.0.0\lib\net461\Microsoft.Extensions.Logging.Abstractions.dll
+
+ ..\packages\Microsoft.Extensions.DependencyInjection.Abstractions.9.0.0\lib\net462\Microsoft.Extensions.DependencyInjection.Abstractions.dll
+
+
+ ..\packages\Microsoft.Extensions.Logging.Abstractions.9.0.0\lib\net462\Microsoft.Extensions.Logging.Abstractions.dll
..\packages\Newtonsoft.Json.13.0.3\lib\net45\Newtonsoft.Json.dll
@@ -59,42 +56,42 @@
..\packages\NLog.5.3.4\lib\net46\NLog.dll
-
- ..\packages\Pipelines.Sockets.Unofficial.2.2.8\lib\net461\Pipelines.Sockets.Unofficial.dll
-
- ..\packages\StackExchange.Redis.2.8.24\lib\net461\StackExchange.Redis.dll
+ ..\packages\StackExchange.Redis.2.1.30\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.9.0.0\lib\net462\System.Diagnostics.DiagnosticSource.dll
+
+
+ ..\packages\System.Diagnostics.PerformanceCounter.4.7.0\lib\net461\System.Diagnostics.PerformanceCounter.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.4\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.4.5.3\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
+
+ ..\packages\System.Threading.Channels.9.0.0\lib\net462\System.Threading.Channels.dll
-
- ..\packages\System.Threading.Channels.5.0.0\lib\net461\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
@@ -113,12 +110,24 @@
Form
+
+
+
+
+
+
+
+
+
+
+
Form
+
Always
@@ -133,33 +142,104 @@
True
Resources.resx
- True
-
- Always
-
App.config
- True
PreserveNewest
App.config
- True
PreserveNewest
+
+
+
+
+
+
+
+
+
+ Always
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Always
Always
-
- Always
-
-
- Always
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Always
@@ -172,6 +252,10 @@
Always
+
+
+
+
Always
@@ -181,6 +265,9 @@
Always
+
+ Always
+
@@ -203,7 +290,6 @@
Designer
- true
PreserveNewest
@@ -235,23 +321,4 @@
-
-
-
- This project references NuGet package(s) that are missing on this computer. Use NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}.
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/IOB-WIN-MBUS/Iob/GenericNext.cs b/IOB-WIN-MBUS/Iob/GenericNext.cs
index 89815943..19d9739d 100644
--- a/IOB-WIN-MBUS/Iob/GenericNext.cs
+++ b/IOB-WIN-MBUS/Iob/GenericNext.cs
@@ -1,6 +1,6 @@
using IOB_UT_NEXT;
-namespace IOB_WIN_PING.Iob
+namespace IOB_WIN_MBUS.Iob
{
public class GenericNext : IOB_WIN_FORM.Iob.Generic
{
diff --git a/IOB-WIN-MBUS/IobModbustTCP/ModbusTCP.cs b/IOB-WIN-MBUS/IobModbustTCP/ModbusTCP.cs
new file mode 100644
index 00000000..cfbe8586
--- /dev/null
+++ b/IOB-WIN-MBUS/IobModbustTCP/ModbusTCP.cs
@@ -0,0 +1,2285 @@
+using EasyModbus;
+using IOB_UT_NEXT;
+using MapoSDK;
+using Newtonsoft.Json;
+using System;
+using System.Collections.Generic;
+using System.Diagnostics;
+using System.IO;
+using System.Linq;
+using System.Net.NetworkInformation;
+using System.Threading;
+using System.Windows.Forms;
+
+namespace IOB_WIN_MBUS.IobModbusTCP
+{
+ /* --------------------------------------------------------------------------------
+ * Controlli ModBusTCP (primo: COMECA)
+ * - protocollo ModBus TCP
+ *
+ * -------------------------------------------------------------------------------- */
+
+ public class ModbusTCP : Iob.GenericNext
+ {
+ #region Public Constructors
+
+ ///
+ /// Classe base con i metodi x ModBusTCP
+ ///
+ ///
+ ///
+ public ModbusTCP(AdapterFormNext caller, IobConfiguration IOBConf) : base(caller, IOBConf)
+ {
+ lgInfo("NEW IOB ModBus TCP");
+
+ DateTime adesso = DateTime.Now;
+ memMap = new plcMemMapExt();
+ if (IOBConf != null)
+ {
+ // gestione invio ritardato contapezzi
+ pzCountDelay = utils.CRI("pzCountDelay");
+ lastPzCountSend = adesso;
+ lastWarnODL = adesso;
+ // inizializzo parametri...
+ parametri = new connParamModBusTCP()
+ {
+ ipAdrr = "127.0.0.1",
+ port = 502,
+ pingMsTimeout = IOBConf.pingMsTimeout,
+ holdRegBaseAddr = 40001,
+ memAddrRead = "40001",
+ memAddrWrite = "41001",
+ memSizeRead = 0,
+ memSizeWrite = 0
+ };
+ setParamPlc();
+
+ // salvo info su conf IOB...
+ string iobConfSer = "";
+ try
+ {
+ iobConfSer = JsonConvert.SerializeObject(IOBConf, Formatting.Indented);
+ }
+ catch
+ { }
+ // finito!
+ lgInfoStartup($"Init IOB, con {iobConfSer}");
+ }
+ else
+ {
+ lgError("Impossibile avviare, IOBConf nullo/non valido!");
+ }
+ }
+
+ #endregion Public Constructors
+
+ #region Public Methods
+
+ ///
+ /// Metodo dispose x il currPLC contenuto
+ ///
+ public void Dispose()
+ {
+ currPLC.Disconnect();
+ }
+
+ ///
+ /// Processo i task richiesti e li elimino dalla coda 1:1
+ ///
+ ///
+ public override Dictionary executeTasks(Dictionary task2exe)
+ {
+ lgInfo($"Chiamata executeTasks specifica ModBus TCP: {task2exe.Count} task ricevuti");
+ // Verificare il protocollo: dovrebeb togliere SOLO i task eseguiti...
+ Dictionary taskDone = new Dictionary();
+ string taskVal = "";
+ if (task2exe != null)
+ {
+ // cerco task specifici
+ foreach (var item in task2exe)
+ {
+ taskVal = "";
+ // converto richiesta in enum...
+ taskType tName = taskType.nihil;
+ Enum.TryParse(item.Key, out tName);
+ // controllo sulla KEY
+ switch (tName)
+ {
+ case taskType.nihil:
+ case taskType.fixStopSetup:
+ case taskType.forceResetPzCount:
+ case taskType.forceSetPzCount:
+ case taskType.sendWatchDogMes2Plc:
+ case taskType.startSetup:
+ case taskType.stopSetup:
+ taskVal = $"taskReq: {tName} | key: {item.Key} | val: {item.Value} | SKIPPED | NO EXEC";
+ break;
+
+ case taskType.setProg:
+ case taskType.setPzComm:
+ case taskType.setArt:
+ case taskType.setComm:
+ // cerco se ho configurato parametri x invio...
+ if (memMap.mMapWrite.ContainsKey(item.Key))
+ {
+ memMap.mMapWrite[item.Key].value = item.Value;
+ // preparo obj oparametro da scrivere...
+ List updatedPar = new List();
+ objItem newParam = new objItem()
+ {
+ uid = item.Key,
+ name = item.Key,
+ value = item.Value,
+ reqValue = "",
+ writable = true,
+ lastRequest = DateTime.Now,
+ displOrdinal = memMap.mMapWrite[item.Key].displOrdinal
+ };
+ updatedPar.Add(newParam);
+ // richiamo scrittura parametri su PLC
+ plcWriteParams(ref updatedPar);
+ taskVal = $"REQUEST SET val: {item.Key} --> {item.Value}";
+ }
+ else
+ {
+ taskVal = $"taskReq: {tName} | key: {item.Key} | val: {item.Value} | NOT FOUND IN mMapWrite List | NO EXEC";
+ }
+ break;
+
+ case taskType.setParameter:
+ // richiedo da URL i parametri WRITE da popolare
+ lgDebug("Chiamata processMemWriteRequests");
+
+ taskVal = processMemWriteRequests();
+ // se restituiscce "" faccio altra prova...
+ if (string.IsNullOrEmpty(taskVal))
+ {
+ // i parametri me li aspetto come stringa composta paramName|paramvalue
+ if (item.Value.Contains("|"))
+ {
+ string[] paramsJob = item.Value.Split('|');
+ taskVal = $"REQUEST SET PARAMETERS: {paramsJob[0]} --> {paramsJob[1]}";
+ }
+ else
+ {
+ taskVal = $"WRONG REQUEST FOR SET PARAMETERS: {item.Value} doesnt contain pipe for splitting key/value";
+ }
+ }
+
+ break;
+
+ case taskType.processOtherInfo:
+ bool okProc = processOtherInfo(item.Key, item.Value);
+ taskVal = okProc ? $"OK processOtherInfo | {item.Key} | {item.Value}" : $"ERROR processOtherInfo | {item.Key} | {item.Value}";
+ break;
+
+ case taskType.syncDbData:
+ processDataSync();
+ break;
+
+ default:
+ taskVal = "SKIPPED | NO EXEC";
+ break;
+ }
+ // aggiungo task!
+ taskDone.Add(item.Key, taskVal);
+ }
+ }
+ return taskDone;
+ }
+
+ ///
+ /// Decodifica tipo indirizzo dal codice vedere ad esempio https://www.fernhillsoftware.com/help/drivers/modbus/data-address-format.html
+ ///
+ ///
+ ///
+ public modBusAddrType getAddrType(string memAddr)
+ {
+ modBusAddrType answ = modBusAddrType.Coil;
+ // leggo prima cifra...
+ answ = (modBusAddrType)Enum.Parse(typeof(modBusAddrType), memAddr.Substring(0, 1));
+ return answ;
+ }
+
+ ///
+ /// Recupero dati dinamici... ATTENZIONE factor usato come FONDOSCALA
+ ///
+ /// Esempio:
+ /// - RealVal : 0 - 28000
+ /// - ReadVal : 0 - 100
+ /// - Factor : 28000 / 100 = 280
+ ///
+ public override Dictionary getDynData()
+ {
+ Random rnd = new Random();
+ int minWait = 50;
+ int maxWait = 50;
+ int.TryParse(getOptPar("minWait"), out minWait);
+ int.TryParse(getOptPar("maxWait"), out maxWait);
+ // valore non presente in vers default... se gestito fare override
+ Dictionary outVal = new Dictionary();
+ if (utils.CRB("enableTSVC"))
+ {
+ // processing SOLO SE ho in memoria abbastanza dati...
+ if (RawInput.Length < parametri.memSizeRead)
+ {
+ lgError($"Impossibile processare getDynData x ModBus TCP PLC, vettore memoria troppo piccolo: {RawInput.Length} byte / {parametri.memSizeRead} byte presenti/richiesti)");
+ }
+ else
+ {
+ Dictionary readErrorList = new Dictionary();
+ Dictionary readErrorListRepeat = new Dictionary();
+ bool useLUT = memSetR != null && memSetR.Count > 0;
+ // se configurato leggo IN BLOCCHI da memoria...
+ if (useLUT)
+ {
+ foreach (var item in memSetR)
+ {
+ // verifico il tipo di dati da leggere e salvare... FIXME TODO FARE !!!
+ readMemoryBlock(item.Key, item.Value);
+ int waitTime = rnd.Next(minWait, maxWait);
+ Thread.Sleep(waitTime);
+ }
+ }
+ // procedo ...
+ try
+ {
+ // processo x ogni valore configurato...
+ if (memMap.mMapRead.Count > 0)
+ {
+ var memItemList = memMap.mMapRead;
+
+ readErrorList = getDataDictionary(memItemList, useLUT, ref outVal);
+ // se qualcosa è andato storto riprovo a caricare SOLO gli errori... 1
+ // sola volta
+ if (readErrorList.Count > 0)
+ {
+ lgDebug($"Attesa prima di rilettura | LUT: {useLUT}");
+ // attendo 3 sec
+ Thread.Sleep(3000);
+ lgDebug($"Effettuo rilettura per {readErrorList.Count} variabili | LUT: {useLUT}");
+ readErrorListRepeat = getDataDictionary(readErrorList, useLUT, ref outVal);
+ }
+ // se avessi ancora errori --> disconnetto
+ if (readErrorListRepeat.Count > maxErrorRead)
+ {
+ lgError($"Trovati valori non validi al secondo tentativo | LUT: {useLUT} --> invalido valori letti e resetto adapter con tryDisconnect!");
+ tryDisconnect();
+ // invalido output
+ outVal = new Dictionary();
+ tryConnect();
+ }
+ else
+ {
+ lastReadPLC = DateTime.Now;
+ }
+ }
+ else
+ {
+ lgDebug($"getDynData: {memMap.mMapRead.Count} record in mMapRead | LUT: {useLUT}");
+ }
+ }
+ catch (Exception exc)
+ {
+ lgError(exc, $"Errore in getDynData x ModBus TCP PLC --> ciclo disconnect/reconnect | LUT: {useLUT}{Environment.NewLine}{exc}");
+ tryDisconnect();
+ outVal = new Dictionary();
+ tryConnect();
+ }
+ }
+ }
+ else
+ {
+ lgDebug($"Non processo getDynData: enableTSVC = false");
+ }
+ if (periodicLog || outVal.Count > 0)
+ {
+ lgDebug($"Esito getDynData: {outVal.Count} valori VALIDI in outVal");
+ }
+ return outVal;
+ }
+
+ public override void processContapezzi()
+ {
+ if ((enablePzCountByApp || enablePzCountByIob) && !(disablePzCountByIob))
+ {
+ if (cIobConf.optPar.Count > 0 && !string.IsNullOrWhiteSpace(getOptPar("PZCOUNT_MODE")))
+ {
+ // cerco in lastDynData...
+ string pzCountKey = getOptPar("PZCOUNT_MODE").Replace("STD.", "");
+ if (lastDynData.ContainsKey(pzCountKey))
+ {
+ string rawVal = lastDynData[pzCountKey];
+ double cntDouble = -1;
+ if (!string.IsNullOrEmpty(rawVal))
+ {
+ double.TryParse(rawVal, out cntDouble);
+ if (cntDouble >= 0)
+ {
+ contapezziPLC = (int)cntDouble;
+ }
+ }
+ }
+ }
+ }
+ else
+ {
+ lgTrace($"processContapezzi escluso: enablePzCountByApp = {enablePzCountByApp} | enablePzCountByIob: {enablePzCountByIob} | disablePzCountByIob: {disablePzCountByIob}");
+ }
+ }
+
+ ///
+ /// Lettura valori Coils (1...)
+ ///
+ ///
+ ///
+ ///
+ public bool[] readCoil(int startAddr, int qty)
+ {
+ bool[] answ = new bool[1];
+ try
+ {
+ if (currPLC.Connected)
+ {
+ answ = currPLC.ReadCoils(startAddr, qty);
+ }
+ }
+ catch (Exception exc)
+ {
+ lgError($"Errore in readCoil{Environment.NewLine}{exc}");
+ }
+ return answ;
+ }
+
+ ///
+ /// Lettura valori DiscreteInputs (2...)
+ ///
+ ///
+ ///
+ ///
+ public bool[] readDiscrInputs(int startAddr, int qty)
+ {
+ bool[] answ = new bool[1];
+ try
+ {
+ if (currPLC.Connected)
+ {
+ answ = currPLC.ReadDiscreteInputs(startAddr, qty);
+ }
+ }
+ catch (Exception exc)
+ {
+ lgError($"Errore in readDiscrInputs{Environment.NewLine}{exc}");
+ }
+ return answ;
+ }
+
+ ///
+ /// Lettura valori Holding Register (3...)
+ ///
+ ///
+ ///
+ ///
+ public int[] readHoldReg(int startAddr, int qty)
+ {
+ int[] answ = new int[2];
+ try
+ {
+ if (currPLC.Connected)
+ {
+ answ = currPLC.ReadHoldingRegisters(startAddr, qty);
+ }
+ }
+ catch (Exception exc)
+ {
+ lgError($"Errore in readHoldReg{Environment.NewLine}{exc}");
+ }
+ return answ;
+ }
+
+ ///
+ /// Lettura valori Input Register (4...)
+ ///
+ ///
+ ///
+ ///
+ public int[] readInputReg(int startAddr, int qty)
+ {
+ int[] answ = new int[2];
+ try
+ {
+ if (currPLC.Connected)
+ {
+ answ = currPLC.ReadInputRegisters(startAddr, qty);
+ }
+ }
+ catch (Exception exc)
+ {
+ lgError($"Errore in readInputReg{Environment.NewLine}{exc}");
+ }
+ return answ;
+ }
+
+ ///
+ /// Effettua lettura semafori principale Parametri da
+ /// aggiornare x display in form
+ ///
+ public override void readSemafori(ref newDisplayData currDispData)
+ {
+ if (!cIobConf.disableStateCh)
+ {
+ // NON eseguo x NON indicare data ora ultima lettura se NON fatta davvero
+ //base.readSemafori(ref currDispData);
+ byte[] MemBlock = new byte[2];
+ try
+ {
+ currDispData.semIn = Semaforo.SV;
+
+ if (verboseLog)
+ {
+ lgDebug("inizio read semafori");
+ }
+
+ if (verboseLog)
+ {
+ lgTrace(string.Format("RawInput[0]: {0}", utils.binaryForm(RawInput[0])));
+ }
+
+ // salvo il solo BYTE dell'input decifrando il semaforo...
+ decodeToBaseBitmap();
+ decodeOtherData();
+ // riporto bitmap...
+ reportRawInput(ref currDispData);
+ }
+ catch (Exception exc)
+ {
+ currDispData.semIn = Semaforo.SR;
+ lgError($"Eccezione in readSemafori{Environment.NewLine}{exc}");
+ }
+ }
+ }
+
+ ///
+ /// Override connessione
+ ///
+ public override void tryConnect()
+ {
+ bool doLog = (verboseLog || periodicLog);
+ lgInfo("ModBus TCP: tryConnect step 01");
+ if (!connectionOk)
+ {
+ // SE è necessario refresh...
+ if (needRefresh)
+ {
+ lgInfo("ModBus TCP: tryConnect step 02");
+
+ // reimposto parametri PLC se necessario...
+ setParamPlc();
+ }
+ lgInfo("ModBus TCP: tryConnect step 03");
+
+ // controllo che il ping sia stato tentato almeno pingTestSec fa...
+ if (DateTime.Now.Subtract(lastPING).TotalSeconds > utils.CRI("pingTestSec"))
+ {
+ if (doLog)
+ {
+ lgInfo("ModBus TCP: ConnKO - tryConnect");
+ }
+ lgInfo("ModBus TCP: tryConnect step 04");
+
+ // in primis salvo data ping...
+ lastPING = DateTime.Now;
+ // se passa il ping faccio il resto...
+ if (testPingMachine == IPStatus.Success)
+ {
+ string szStatusConnection = "ND";
+ try
+ {
+ // ora provo connessione...
+ parentForm.commPlcActive = true;
+ currPLC.Connect();
+ szStatusConnection = "OPEN";
+ parentForm.commPlcActive = false;
+ connectionOk = currPLC.Connected;
+ lgInfo($"StatusConnection: {szStatusConnection}");
+ // refresh stato allarmi!!!
+ if (connectionOk)
+ {
+ //queueInEnabCurr = true;
+ lgInfo($"Connessione OK: {connectionOk}");
+ if (adpRunning)
+ {
+ lgInfo($"AdpRunning: {adpRunning}");
+ }
+ }
+ else
+ {
+ lgError("Impossibile procedere, connessione mancante...");
+ }
+ }
+ catch (Exception exc)
+ {
+ lgFatal($"Errore in TryConnect adapter ModBusTCP | szStatusConnection {szStatusConnection}{Environment.NewLine}{exc}");
+ connectionOk = false;
+ needRefresh = true;
+ }
+ }
+ else
+ {
+ // loggo no risposta ping ...
+ connectionOk = false;
+ if (doLog)
+ {
+ lgError($"Attenzione: ModBusTCP controllo PING fallito per IP {cIobConf.cncPingAddr}");
+ }
+ }
+ }
+ }
+ // se non è ancora connesso faccio procesisng memoria caso disconnesso...
+ if (!connectionOk)
+ {
+ // processo semafori ed invio...
+ processMemoryDiscon();
+ }
+ }
+
+ ///
+ /// Override disconnessione
+ ///
+ public override void tryDisconnect()
+ {
+ if (currPLC != null && currPLC.Connected)
+ {
+ lgInfo("Richiesta disconnessione adapter ModBusTCP!");
+ try
+ {
+ if (currPLC.Connected)
+ {
+ currPLC.Disconnect();
+ }
+ lgInfo("Effettuata disconnessione adapter ModBusTCP!");
+ }
+ catch (Exception exc)
+ {
+ lgFatal($"Errore nella disconnessione dall'adapter ModBusTCP{Environment.NewLine}{exc}");
+ }
+ }
+ connectionOk = false;
+ queueInEnabCurr = false;
+ // resetto last ping...
+ lastPING = DateTime.Now.AddMinutes(-1);
+ }
+
+ ///
+ /// Scrittura di un singolo valore COIL (1...)
+ ///
+ ///
+ ///
+ ///
+ public bool writeCoil(int startAddr, bool currValue)
+ {
+ bool answ = false;
+ if (currPLC.Connected)
+ {
+ try
+ {
+ currPLC.WriteSingleCoil(startAddr, currValue);
+ answ = true;
+ }
+ catch
+ { }
+ }
+ return answ;
+ }
+
+ ///
+ /// Scrittura di un valore Holding Register (4...)
+ ///
+ ///
+ /// Valore in formato INT da registri
+ ///
+ public bool writeHoldingReg(int startAddr, int[] currRegVal)
+ {
+ bool answ = false;
+ if (currPLC.Connected)
+ {
+ try
+ {
+ currPLC.WriteMultipleRegisters(startAddr + deltaBase + indexLutCorr, currRegVal);
+ answ = true;
+ }
+ catch
+ { }
+ }
+ return answ;
+ }
+
+ #endregion Public Methods
+
+ #region Protected Fields
+
+ ///
+ /// Copia locale dei valori in COIL (OUT) | 0.000/09.999, oppure 0.000/65.536 = 0xFFFF, come
+ /// array chiave (int) valori int[] letti tramite ModBus, da convertire secondo tipo
+ ///
+ protected Dictionary CoilLUT = new Dictionary();
+
+ protected ModbusClient currPLC;
+
+ ///
+ /// Copia locale dei valori in Discrete Inputs (IN) | 10.000/19.999, oppure 100.000/165.536
+ /// = 1xFFFF, come array chiave (int) valori int[] letti tramite ModBus, da convertire
+ /// secondo tipo
+ ///
+ protected Dictionary DiscreteInputLUT = new Dictionary();
+
+ ///
+ /// Copia locale dei valori in Holding Registers | 40.000/49.999, oppure 400.000/465.536 =
+ /// 4xFFFF, come array chiave (int) valori int[] letti tramite ModBus, da convertire secondo tipo
+ ///
+ protected Dictionary HoldingRegisterLUT = new Dictionary();
+
+ ///
+ /// Copia locale dei valori in Input Registers | 30.000/39.999, oppure 300.000/365.536 =
+ /// 3xFFFF, come array chiave (int) valori int[] letti tramite ModBus, da convertire secondo tipo
+ ///
+ protected Dictionary InputRegisterLUT = new Dictionary();
+
+ ///
+ /// Ultimo controllo ping x evitare ping flood...
+ ///
+ protected DateTime lastPingConn = DateTime.Now.AddMinutes(-10);
+
+ ///
+ /// Esito ultimo ping
+ ///
+ protected bool lastPingOk = false;
+
+ ///
+ /// num max di errori lettura permessi prima di disconnettere
+ ///
+ protected int maxErrorRead = 10;
+
+ ///
+ /// Setup blocchi memorie read (indirizzo inizio, size)
+ ///
+ protected Dictionary memSetR = new Dictionary();
+
+ ///
+ /// parametri di connessione
+ ///
+ protected connParamModBusTCP parametri;
+
+ ///
+ /// Oggetto cronometro x test vari...
+ ///
+ protected Stopwatch sw = new Stopwatch();
+
+ #endregion Protected Fields
+
+ #region Protected Properties
+
+ ///
+ /// Dizionario delle ultime operazioni di scrittura per OGNI memoria (in modo che fa log
+ /// ogni x sec...)
+ ///
+ protected Dictionary lastMemWrite { get; set; } = new Dictionary();
+
+ #endregion Protected Properties
+
+ #region Protected Methods
+
+ ///
+ /// Classe di base implementazione traduzione di una LUT da memoria come valore BIT
+ /// (multipli) a valore esplicito x FLog
+ ///
+ protected override void checkTranslateBit()
+ {
+ // verifico se devo processare decodifica di qualche valore...
+ if (OptVar2TranslBit != null && OptVar2TranslBit.Count > 0)
+ {
+ Dictionary valUpdated = new Dictionary();
+ // ciclo x ogni valore da tradurre
+ foreach (var item in OptVar2TranslBit)
+ {
+ int reqAddr = 0;
+ // traduco in int...
+ int.TryParse(item.Key, out reqAddr);
+ int lutAddr = reqAddr + indexLutCorr;
+ int valInt = 0;
+ int[] listInt = new int[2];
+ // cerco valore nella LUT... se è pari cerco "direttamente" altrimenti dal pari
+ // inferiore e 2° INT[]
+ if (lutAddr % 2 == 0)
+ {
+ listInt = HoldingRegisterLUT[lutAddr];
+ valInt = listInt[0];
+ }
+ else
+ {
+ lutAddr--;
+ listInt = HoldingRegisterLUT[lutAddr];
+ valInt = listInt[1];
+ }
+ // gestisco a bitmap --> salvo valore INT x check..
+ string sVal = $"{valInt}";
+ // se è variato rispetto precedente --> calcolo valori string, accodo in FLog e salvo...
+ if (item.Value != sVal)
+ {
+ valUpdated.Add(item.Value, valInt);
+ }
+ }
+ // se ho valori aggiornati --> aggiorno dictionary e invio
+ if (valUpdated.Count > 0)
+ {
+ DateTime locTStamp = DateTime.Now;
+ foreach (var item in valUpdated)
+ {
+ // salvo il valore modificato
+ OptVar2TranslInt[item.Key] = $"{item.Value}";
+ List listVal = new List();
+ // si tratta di valori bit --> devo cercare OGNI bit attivo (0..8 --> 0.255)
+ for (int i = 0; i < 8; i++)
+ {
+ if (BitUtils.isActive(item.Value, i))
+ {
+ // traduco ed accodo...
+ listVal.Add(itemTranslation($"{item.Key}.{i}"));
+ }
+ }
+ // costruisco stringa finale...
+ string trad = string.Join(",", listVal);
+ string sVal = $"Change {item.Key}: {locTStamp.ToString()} | Val: {item.Value} | trad: {trad}";
+ accodaFLog(sVal, qEncodeFLog(item.Key, trad));
+ }
+ }
+ }
+ }
+
+ ///
+ /// Classe di base implementazione traduzione di una LUT da memoria come valore INT a valore
+ /// esplicito x FLog
+ ///
+ protected override void checkTranslateInt()
+ {
+ if (OptVar2TranslInt != null && OptVar2TranslInt.Count > 0)
+ {
+ Dictionary valUpdated = new Dictionary();
+ // ciclo x ogni valore da tradurre
+ foreach (var item in OptVar2TranslInt)
+ {
+ int reqAddr = 0;
+ // traduco in int...
+ int.TryParse(item.Key, out reqAddr);
+ int lutAddr = reqAddr + indexLutCorr;
+ int valInt = 0;
+ int[] listInt = new int[2];
+ // cerco valore nella LUT... se è pari cerco "direttamente" altrimenti dal pari
+ // inferiore e 2° INT[]
+ if (lutAddr % 2 == 0)
+ {
+ listInt = HoldingRegisterLUT[lutAddr];
+ valInt = listInt[0];
+ }
+ else
+ {
+ lutAddr--;
+ listInt = HoldingRegisterLUT[lutAddr];
+ valInt = listInt[1];
+ }
+ // cerco traduzione...
+ string trad = itemTranslation(item.Key, $"{valInt}");
+ // se è variato rispetto precedente --> accodo in FLog e salvo...
+ if (item.Value != trad)
+ {
+ valUpdated.Add(item.Value, trad);
+ }
+ }
+ // se ho valori aggiornati --> aggiorno dictionary e invio
+ if (valUpdated.Count > 0)
+ {
+ string sVal = "";
+ DateTime locTStamp = DateTime.Now;
+ foreach (var item in valUpdated)
+ {
+ OptVar2TranslInt[item.Key] = item.Value;
+ sVal = $"Change {item.Key}: {locTStamp.ToString()} | Val: {item.Value}";
+ accodaFLog(sVal, qEncodeFLog(item.Key, item.Value));
+ }
+ }
+ }
+ }
+
+ ///
+ /// Decodifica il resto dell'area x i dati accessori (allarmi, ...)
+ ///
+ protected virtual void decodeOtherData()
+ {
+ }
+
+ ///
+ /// Effettua decodifica aree memoria alla bitmap usata x MAPO/GWMS
+ /// - per macchine base (GWMS) IN REALTA' non gestito lo stato macchina.... previsto comunque
+ ///
+ protected virtual void decodeToBaseBitmap()
+ {
+ // init a zero...
+ B_input = 0;
+ }
+
+ ///
+ /// Recupero allarmi specifico x ModbusTCP (16 e 32 bit...)
+ ///
+ ///
+ ///
+ protected override int getAlarmStatus(BaseAlarmConf item)
+ {
+ int answ = 0;
+ int[] listInt = new int[2];
+ // verifico se usare LUT
+ bool useLUT = memSetR != null && memSetR.Count > 0;
+ if (useLUT)
+ {
+ int lutAddress = parametri.holdRegBaseAddr + item.index + deltaBase + indexLutCorr;
+ if (HoldingRegisterLUT.ContainsKey(lutAddress))
+ {
+ try
+ {
+ listInt = HoldingRegisterLUT[lutAddress];
+ }
+ catch (Exception exc)
+ {
+ lgError($"Errore in lettura da HoldingRegisterLUT per indirizzo {lutAddress} | item {item.memAddr}{Environment.NewLine}{exc}");
+ }
+ }
+ }
+ else
+ {
+ listInt = readInputReg(item.index, item.size);
+ }
+ answ = ModbusClient.ConvertRegistersToInt(listInt);
+ return answ;
+ }
+
+ ///
+ /// Override metodo x scrittura parametri su PLC
+ ///
+ ///
+ protected override void plcWriteParams(ref List updatedPar)
+ {
+ dataConf currMem = null;
+ int byteSize = 0;
+ int[] CurrVal = new int[1];
+ string memAddrWrite = "";
+ bool fatto = false;
+ string serObj = "";
+ if (updatedPar != null)
+ {
+ // controllo i parametri... ne gestisco 4...
+ foreach (var item in updatedPar)
+ {
+ try
+ {
+ memAddrWrite = "";
+ int valInt = 0;
+ uint valUInt = 0;
+ double valDouble = 0;
+ // cerco in area memMapWrite...
+ if (memMap.mMapWrite.ContainsKey(item.uid))
+ {
+ // recupero!
+ currMem = memMap.mMapWrite[item.uid];
+ byteSize = currMem.size;
+ memAddrWrite = currMem.memAddr;
+ CurrVal = new int[byteSize];
+ // faccio preliminarmente upsertKey...
+ upsertKey(currMem.name, currMem.value);
+ serObj = JsonConvert.SerializeObject(item, Formatting.Indented);
+ lgInfo($"Inizio processing plcWriteParams per {currMem.name} | valore richiesto {currMem.value}{Environment.NewLine}---------------UPDATED PARAM---------------{Environment.NewLine}{serObj}{Environment.NewLine}---------------");
+ serObj = JsonConvert.SerializeObject(currMem, Formatting.Indented);
+ lgInfo($"---------------MEMORY CONTENT---------------{Environment.NewLine}{serObj}{Environment.NewLine}---------------");
+ switch (currMem.tipoMem)
+ {
+ case plcDataType.Boolean:
+ break;
+
+ case plcDataType.Int:
+ valInt = getScaledInt(currMem, true);
+ if (byteSize == 1)
+ {
+ CurrVal[0] = valInt;
+ }
+ else
+ {
+ CurrVal = ModbusClient.ConvertIntToRegisters(valInt);
+ }
+
+ fatto = writeHoldingReg(currMem.index, CurrVal);
+ break;
+
+ case plcDataType.IntLH:
+ valInt = getScaledInt(currMem, true);
+ if (byteSize == 1)
+ {
+ CurrVal[1] = valInt;
+ }
+ else
+ {
+ CurrVal = ModbusClient.ConvertIntToRegisters(valInt);
+ Array.Reverse(CurrVal);
+ }
+
+ fatto = writeHoldingReg(currMem.index, CurrVal);
+ break;
+
+ case plcDataType.DInt:
+ valUInt = getScaledUInt(currMem, true);
+ CurrVal = ModbusClient.ConvertLongToRegisters(valInt);
+ fatto = writeHoldingReg(currMem.index, CurrVal);
+ break;
+
+ case plcDataType.DIntLH:
+ valUInt = getScaledUInt(currMem, true);
+ CurrVal = ModbusClient.ConvertLongToRegisters(valInt);
+ Array.Reverse(CurrVal);
+ fatto = writeHoldingReg(currMem.index, CurrVal);
+ break;
+
+ //case plcDataType.Word:
+ // valUInt = getScaledUInt(currMem);
+ // saveWordOnMemBlock(ref MemBlock, 0, valInt.ToString());
+ // break;
+
+ //case plcDataType.DWord:
+ // valUInt = getScaledUInt(currMem);
+ // saveDWordOnMemBlock(ref MemBlock, 0, valInt.ToString());
+ // break;
+
+ case plcDataType.Real:
+ case plcDataType.RealLH:
+ valDouble = getScaledDouble(currMem);
+ CurrVal = ModbusClient.ConvertFloatToRegisters((float)valDouble, ModbusClient.RegisterOrder.LowHigh);
+ fatto = writeHoldingReg(currMem.index, CurrVal);
+ break;
+
+ case plcDataType.FloatBADC:
+ case plcDataType.RealHL:
+ valDouble = getScaledDouble(currMem);
+ CurrVal = ModbusClient.ConvertFloatToRegisters((float)valDouble, ModbusClient.RegisterOrder.HighLow);
+ fatto = writeHoldingReg(currMem.index, CurrVal);
+ break;
+
+ case plcDataType.String:
+ CurrVal = ModbusClient.ConvertStringToRegisters(currMem.value.PadRight(currMem.size * 2));
+ var regLen = ModbusClient.ConvertIntToRegisters(currMem.size * 2 - 2);
+ Array.Copy(regLen, 0, CurrVal, CurrVal.Length - regLen.Length, regLen.Length);
+ //CurrVal[CurrVal.Length - 2] = regLen[1];
+ //CurrVal[CurrVal.Length - 1] = regLen[0];
+ fatto = writeHoldingReg(currMem.index, CurrVal);
+ break;
+
+ default:
+ break;
+ }
+ lgInfo($"---------------MemBlock data---------------{Environment.NewLine}CurrVal: {CurrVal}{Environment.NewLine}--------------- END data ---------------");
+ if (!string.IsNullOrEmpty(memAddrWrite))
+ {
+ // se fatto --> aggiorno!
+ if (fatto)
+ {
+ item.value = item.reqValue;
+ item.reqValue = "";
+ item.lastRead = DateTime.Now;
+ item.UM = currMem.unit;
+ }
+ }
+ else
+ {
+ lgError($"Errore: memAddrWrite vuoto!");
+ }
+ }
+ else
+ {
+ lgError($"Errore uid non trovato in area write memory: {item.uid}, ci sono {memMap.mMapWrite.Count} in area write");
+ }
+ }
+ catch (Exception exc)
+ {
+ lgError($"Eccezione in fase di plcWriteParams per item {item.uid} con valore {item.value}{Environment.NewLine}{exc}");
+ }
+ }
+ }
+ }
+
+ ///
+ /// Imposto parametri PLC
+ ///
+ protected override void setParamPlc()
+ {
+ DateTime adesso = DateTime.Now;
+ // Creo oggetto connessione NC
+ parentForm.commPlcActive = true;
+ lgInfo($"Start init Adapter ModBus TCP all'IP {cIobConf.cncIpAddr} | port: {cIobConf.cncPort} | --> IOB {cIobConf.codIOB}");
+ // SE è necessario refresh...
+ if (needRefresh)
+ {
+ lgInfo("Refreshing connection...");
+ if (parametri != null)
+ {
+ try
+ {
+ parametri.ipAdrr = cIobConf.cncIpAddr;
+ parametri.port = int.Parse(cIobConf.cncPort);
+ // leggo file init...
+ lgInfoStartup("Reading ini file...");
+ IniFile fIni = new IniFile(cIobConf.iniFileName);
+ // ora leggo valori speciali
+ parametri.memAddrRead = fIni.ReadString("MEMORY", "ADDR_READ", "");
+ parametri.memAddrWrite = fIni.ReadString("MEMORY", "ADDR_WRITE", "");
+ parametri.memSizeRead = fIni.ReadInteger("MEMORY", "SIZE_READ", 0);
+ parametri.memSizeWrite = fIni.ReadInteger("MEMORY", "SIZE_WRITE", 0);
+ parametri.holdRegBaseAddr = fIni.ReadInteger("MEMORY", "HR_BASE_ADDR", 40001);
+ parametri.useCalcBaseAddr = fIni.ReadBoolean("MEMORY", "CALC_BASE_ADDR", true);
+ // valore delta base e shift
+ deltaBase = fIni.ReadInteger("MEMORY", "DELTA_BASE", 0);
+ indexLutCorr = fIni.ReadInteger("MEMORY", "INDEX_LUT_CORR", 0);
+ // verifico eventuale parametro memoria estesa (non 0...10'000 ma 0...xFFFF=65536)
+ modbusExtReg = fIni.ReadBoolean("MEMORY", "MODBUS_EXT_REG");
+ // salvo vettori memoria...
+ lgInfoStartup("Set RawInput dimensions...");
+ RawInput = new byte[parametri.memSizeRead];
+ RawOutput = new byte[parametri.memSizeWrite];
+ // salvo parametri conn!
+ lgInfoStartup($"Parametri memoria: memAddrRead: {parametri.memAddrRead} | memAddrWrite: {parametri.memAddrWrite} | memSizeRead: {parametri.memSizeRead} | memSizeWrite: {parametri.memSizeWrite} | deltaBase: {deltaBase}");
+ }
+ catch (Exception exc)
+ {
+ lgError(exc, "Errore in parse parametri da IOBConf");
+ }
+
+ // carico conf vettore memoria...
+ loadMemConf();
+ fixDefaultPar();
+ // avvio conf blocchi memoria
+ setupMemBlocks();
+ // aggiungo DELTA x calcolo min/MAX...
+ string deltaValStr = getOptPar("DELTA_VAL");
+ if (!string.IsNullOrEmpty(deltaValStr))
+ {
+ double.TryParse(deltaValStr.Replace(".", ","), out deltaVal);
+ }
+ bool enableByApp = utils.CRB("enableContapezzi");
+ bool enableByIob = (getOptPar("ENABLE_PZCOUNT") == "TRUE");
+ bool disableByIob = (getOptPar("DISABLE_PZCOUNT") == "TRUE");
+
+ var strMaxError = getOptPar("MAX_ERROR_READ");
+ int.TryParse(strMaxError, out maxErrorRead);
+
+ if ((enableByApp || enableByIob) && !(disableByIob))
+ {
+ lgInfoStartup("ModBus TCP: inizio gestione contapezzi");
+ try
+ {
+ // verifico quale modalità sia richiesta: STD (6711) oppure BIT (Custom,
+ // con indicazione area)
+ if (cIobConf.optPar.Count > 0 && !string.IsNullOrWhiteSpace(getOptPar("PZCOUNT_MODE")))
+ {
+ if (getOptPar("PZCOUNT_MODE").StartsWith("STD"))
+ {
+ lgInfoStartup("Init contapezzi ModBusTCP: pzCntReload(true)");
+ pzCntReload(true);
+ // refresh associazione Macchina - IOB
+ SendM2IOB();
+ // invio altri dati accessori...
+ SendMachineConf();
+ // per adesso imposto lettura PLC == contapezzi (poi farà vera lettura...)
+ contapezziPLC = contapezziIOB;
+ }
+ else
+ {
+ contapezziIOB = 0;
+ lgDebug("Contapezzi STD disabilitato: modalità {0}", getOptPar("PZCOUNT_MODE"));
+ }
+ }
+ else
+ {
+ contapezziIOB = 0;
+ lgError("Parametro mancante PZCOUNT_MODE");
+ }
+ }
+ catch (Exception exc)
+ {
+ lgError(exc, "Errore in contapezzi ModBusTCP");
+ }
+ }
+ // verifico se sia connessa...
+ if (!connectionOk)
+ {
+ // ora tento avvio PLC... SE PING OK...
+ lastPING = adesso;
+ IPStatus esitoPing = testPingMachine;
+ if (esitoPing == IPStatus.Success)
+ {
+ needRefresh = false;
+ try
+ {
+ //Ip-Address and Port of Modbus-TCP-Server
+ currPLC = new ModbusClient(parametri.ipAdrr, parametri.port);
+ currPLC.ConnectionTimeout = 5000;
+
+ currPLC.ConnectedChanged += CurrPLC_ConnectedChanged;
+
+ // disconnetto e connetto...
+ if (isVerboseLog)
+ {
+ lgInfoStartup("ModBus TCP: tryDisconnect");
+ }
+ tryDisconnect();
+
+ // tolgo needRefresh x evitare un loop... (tryConnect richiama setParamPlc)
+ needRefresh = false;
+ lgInfoStartup("ModBus TCP: tryConnect");
+ tryConnect();
+ lgInfoStartup("End init Adapter ModBusTCP");
+ if (isVerboseLog)
+ {
+ lgInfo("ModBus TCP CONNESSIONE AVVENUTA");
+ }
+ }
+ catch (Exception exc)
+ {
+ lgError(exc, "Errore in INIT ModBusTCP");
+ }
+ }
+ else
+ {
+ lgError($"ModBusTCP IOB | Errore in ping: esito {esitoPing}");
+ }
+ }
+ parentForm.commPlcActive = false;
+ }
+ else
+ {
+ lgError("Parametri null!");
+ }
+ }
+ }
+
+ ///
+ /// effettua il setup dei memblock da gestire (NON leggo intera memoria ma tanti blocchi...)
+ ///
+ protected void setupMemBlocks()
+ {
+ // se configurato -_> deserializzo
+ string confFile = getOptPar("MEM_BLOCK");
+ if (!string.IsNullOrEmpty(confFile))
+ {
+ string jsonFileName = $"{Application.StartupPath}/DATA/CONF/{confFile}";
+ lgInfo($"Apertura file {jsonFileName}");
+ using (StreamReader reader = new StreamReader(jsonFileName))
+ {
+ string jsonData = reader.ReadToEnd();
+ if (!string.IsNullOrEmpty(jsonData))
+ {
+ lgInfo($"File json MemBlock composto da {jsonData.Length} caratteri");
+ try
+ {
+ var currMem = JsonConvert.DeserializeObject(jsonData);
+ memSetR = currMem.ReadBlocks;
+ }
+ catch (Exception exc)
+ {
+ lgError($"Errore in setupMemBlock{Environment.NewLine}{exc}");
+ }
+ }
+ }
+ }
+ }
+
+ ///
+ /// Testa la condition modbus da LUT + configurazione, valori tipo BIT
+ ///
+ ///
+ ///
+ protected bool testBitCondition(string cKey)
+ {
+ bool answ = false;
+ if (OptCheckCondBit.ContainsKey(cKey))
+ {
+ int currStatus = 0;
+ int[] listInt = new int[2];
+ listInt = HoldingRegisterLUT[OptCheckCondBit[cKey].BaseAddr];
+ currStatus = ModbusClient.ConvertRegistersToInt(listInt);
+ // controllo valore del bit richiesto
+ answ = ((currStatus & (1 << OptCheckCondBit[cKey].BitNum)) == OptCheckCondBit[cKey].ValOk);
+ lgTrace($"testBitCondition for {cKey} | BaseAddr: {OptCheckCondBit[cKey].BaseAddr} | BitNum: {OptCheckCondBit[cKey].BitNum} | ValOk: {OptCheckCondBit[cKey].ValOk}");
+ }
+ else
+ {
+ lgTrace($"testBitCondition error: {cKey} not found");
+ }
+ return answ;
+ }
+
+ ///
+ /// Effettua ciclo letture di ogni area configurata
+ ///
+ /// indirizzo di partenza
+ /// num valori da leggere
+ protected void testBlockReadExt(int baseAddr, int numVals)
+ {
+ int baseHold = deltaBase;
+ int[] readTestInt = new int[2];
+ bool[] readTestBool = new bool[2];
+ modbusMemType currMemType = modbusMemType.NotDefined;
+ // valori setup secondo conf memoria: memoria estesa... 0 ... xFFFF per ogni set da 100'000...
+ int maxVal = modbusExtReg ? 65536 : 10000;
+ int baseMult = modbusExtReg ? 100000 : 10000;
+ lgTrace($"-------------------- Inizio test lettura EXT {baseAddr} --------------------");
+ try
+ {
+ stopwatch.Restart();
+ // calcolo tipo memoria
+ currMemType = getMemType(baseAddr, maxVal, baseMult);
+ switch (currMemType)
+ {
+ case modbusMemType.Coil:
+ readTestBool = currPLC.ReadCoils(baseAddr - baseHold, numVals);
+ break;
+
+ case modbusMemType.DiscreteInput:
+ readTestBool = currPLC.ReadDiscreteInputs(baseAddr - 1 * baseMult + baseHold, numVals);
+ break;
+
+ case modbusMemType.InputRegister:
+ readTestInt = currPLC.ReadInputRegisters(baseAddr - 3 * baseMult + baseHold, numVals);
+ break;
+
+ case modbusMemType.HoldingRegister:
+ readTestInt = currPLC.ReadHoldingRegisters(baseAddr - 4 * baseMult + baseHold, numVals);
+ break;
+
+ case modbusMemType.NotDefined:
+ default:
+ break;
+ }
+ stopwatch.Stop();
+ lgTrace($"Stats lettura | {readTestInt.Length} val | {stopwatch.ElapsedMilliseconds}ms");
+ }
+ catch
+ { }
+
+ switch (currMemType)
+ {
+ case modbusMemType.Coil:
+ case modbusMemType.DiscreteInput:
+ for (int i = 0; i < readTestBool.Length; i++)
+ {
+ lgTrace($"{currMemType} | {baseAddr + i:000} | Val: {readTestBool[i]}");
+ }
+ break;
+
+ case modbusMemType.InputRegister:
+ case modbusMemType.HoldingRegister:
+ for (int i = 0; i < readTestInt.Length / 2; i++)
+ {
+ int[] thisSet = new int[2];
+ Array.Copy(readTestInt, i * 2, thisSet, 0, 2);
+ lgTrace($"{currMemType} | {baseAddr + i * 2:000} | Valori: {thisSet[0]} / {thisSet[1]} | Val Int: {ModbusClient.ConvertRegistersToInt(thisSet)} | Val Real: {ModbusClient.ConvertRegistersToFloat(thisSet):N6}");
+ }
+ // provo anche come stringa intera
+ lgTrace($"{currMemType} | {baseAddr:000} | Val string: {ModbusClient.ConvertRegistersToString(readTestInt, 0, readTestInt.Length)}");
+ break;
+
+ case modbusMemType.NotDefined:
+ default:
+ lgTrace($"Errore: tipo memoria non definitito per {baseAddr} / {numVals}");
+ break;
+ }
+ lgTrace($"-------------------- Completato test lettura {baseAddr} --------------------");
+ }
+
+ ///
+ /// Test connessione CNC
+ ///
+ ///
+ protected bool testCncConn()
+ {
+ bool answ = currPLC.Connected;
+ if (!answ)
+ {
+ // riduco i controlli ping.. li faccio solo ogni 5 ping period se precedente positivo...
+ DateTime adesso = DateTime.Now;
+ if (lastPingOk && adesso.Subtract(lastPingConn).TotalMilliseconds < 5 * parametri.pingMsTimeout)
+ {
+ answ = lastPingOk;
+ }
+ else
+ {
+ IPStatus pingStatus = testPingMachine;
+
+ // se non ok riprovo 1 volta dopo attesa
+ if (pingStatus != IPStatus.Success)
+ {
+ Thread.Sleep(2 * cIobConf.pingMsTimeout);
+ pingStatus = testPingMachine;
+ }
+ // se non passa ancora errore!
+ if (pingStatus != IPStatus.Success)
+ {
+ lgError($"Errore in testCncConn | reply Status {pingStatus} | IP: {parametri.ipAdrr} | T.Out: {parametri.pingMsTimeout}ms");
+ }
+ // se passa il ping faccio il resto...
+ else
+ {
+ if (!currPLC.Connected)
+ {
+ currPLC.Connect();
+ }
+
+ if (!currPLC.Available(500))
+ {
+ lgError($"PLC ModBus NON disponibile: {currPLC.IPAddress} | {currPLC.Port}");
+ }
+ else
+ {
+ if (!currPLC.Connected)
+ {
+ lgError($"PLC ModBus NON connesso:{currPLC.IPAddress} | {currPLC.Port}");
+ }
+ else
+ {
+ // tutto ok
+ parentForm.updateComStats("Connection OK");
+ answ = true;
+ }
+ }
+ }
+ // salvo stato ping
+ lastPingConn = adesso;
+ }
+ lastPingOk = answ;
+ }
+
+ return answ;
+ }
+
+ ///
+ /// Testa la condition modbus da LUT + configurazione, valori tipo BIT tramite DiscreteInput
+ /// (0x02 - 10000+)
+ ///
+ ///
+ ///
+ protected bool testDisInBitCondition(string cKey)
+ {
+ bool answ = false;
+ if (OptCheckCondBit.ContainsKey(cKey))
+ {
+ if (DiscreteInputLUT.Count > 0)
+ {
+ int idxMem = OptCheckCondBit[cKey].BaseAddr + indexLutCorr;
+ if (DiscreteInputLUT.ContainsKey(idxMem))
+ {
+ answ = DiscreteInputLUT[idxMem] == (OptCheckCondBit[cKey].ValOk != 0);
+ lgTrace($"testDisInBitCondition for {cKey} | BaseAddr: {OptCheckCondBit[cKey].BaseAddr} | BitNum: {OptCheckCondBit[cKey].BitNum} | ValOk: {OptCheckCondBit[cKey].ValOk} | actual: {answ}");
+ }
+ }
+ }
+ else
+ {
+ lgTrace($"testDiscrInputBitCondition error: {cKey} not found");
+ }
+ return answ;
+ }
+
+ ///
+ /// Testa la condition modbus da LUT + configurazione, valori tipo INT
+ ///
+ ///
+ ///
+ protected bool testIntCondition(string cKey)
+ {
+ bool answ = false;
+ if (OptCheckCondInt.ContainsKey(cKey))
+ {
+ int currStatus = 0;
+ int[] listInt = new int[2];
+ listInt = HoldingRegisterLUT[OptCheckCondInt[cKey].BaseAddr];
+ // leggo da conf OptCheckCondInt[cKey].IntIndex
+ if (OptCheckCondInt[cKey].IntIndex < 2)
+ {
+ currStatus = listInt[OptCheckCondInt[cKey].IntIndex];
+ }
+ else
+ {
+ currStatus = ModbusClient.ConvertRegistersToInt(listInt);
+ }
+ //answ = (currStatus == OptCheckCondInt[cKey].ValOk);
+ // controllo se il valore sia in elenco di quelli validi...
+ answ = OptCheckCondInt[cKey].ValOk.Contains(currStatus);
+ lgTrace($"testIntCondition for {cKey} | BaseAddr: {OptCheckCondInt[cKey].BaseAddr} | currStatus: {currStatus} | ValOk: {string.Join(",", OptCheckCondInt[cKey].ValOk)}");
+ }
+ else
+ {
+ lgTrace($"testIntCondition error: {cKey} not found");
+ }
+ return answ;
+ }
+
+ ///
+ /// Test di lettura dei blocchi di memoria ESTESO (considerato memorie xFFFF e tutti e 4 i
+ /// tipi di dati modbus)
+ ///
+ protected void testReadExt()
+ {
+ foreach (var item in memSetR)
+ {
+ testBlockReadExt(item.Key, item.Value);
+ }
+ }
+
+ #endregion Protected Methods
+
+ #region Private Fields
+
+ ///
+ /// Valore delta x gestione min/MAX e valore rilevato
+ ///
+ private double deltaVal = 0;
+
+ #endregion Private Fields
+
+ #region Private Properties
+
+ ///
+ /// Valore da gestire come delta degli indirizzi configurati
+ ///
+ private int deltaBase { get; set; } = 0;
+
+ ///
+ /// Valore da gestire come delta degli index x lettura LUT
+ ///
+ private int indexLutCorr { get; set; } = 0;
+
+ ///
+ /// Indica se usare gli indirizzi estesi per ogni blocco: false = 0...10'000 true =
+ /// 0...65'536 (= xFFFF)
+ ///
+ private bool modbusExtReg { get; set; } = false;
+
+ #endregion Private Properties
+
+ #region Private Methods
+
+ ///
+ /// converte valore in tipo desiderato
+ ///
+ ///
+ ///
+ ///
+ ///
+ private static double convertFromReg(int[] listInt, int size, plcDataType tipoMem)
+ {
+ double valore = 0;
+ //verifico se sia INT o real x convertire...
+ switch (tipoMem)
+ {
+ case plcDataType.Real:
+ case plcDataType.RealLH:
+ case plcDataType.FloatABCD:
+ if (size == 4)
+ {
+ valore = ModbusClient.ConvertRegistersToDouble(listInt);
+ }
+ else if (size == 2)
+ {
+ valore = ModbusClient.ConvertRegistersToFloat(listInt, ModbusClient.RegisterOrder.LowHigh);
+ }
+ break;
+
+ case plcDataType.RealHL:
+ case plcDataType.FloatCDAB:
+ if (size == 4)
+ {
+ //// inverto array...
+ //Array.Reverse(listInt);
+ //valore = ModbusClient.ConvertRegistersToDouble(listInt);
+ valore = ModbusClient.ConvertRegistersToDouble(listInt, ModbusClient.RegisterOrder.HighLow);
+ }
+ else if (size == 2)
+ {
+ //// inverto array...
+ //Array.Reverse(listInt);
+ //valore = ModbusClient.ConvertRegistersToFloat(listInt);
+ valore = ModbusClient.ConvertRegistersToFloat(listInt, ModbusClient.RegisterOrder.HighLow);
+ }
+ break;
+
+ // caso speciale x Cedax, che usa HighVal moltiplicato x 32768...
+ case plcDataType.HLPInt:
+ if (size == 4)
+ {
+ valore = ModbusClient.ConvertRegistersToLong(listInt);
+ }
+ else if (size == 2)
+ {
+ int fact = Int16.MaxValue + 1;
+ valore = listInt[1] * fact + listInt[0];
+ }
+ break;
+
+ case plcDataType.Int:
+ default:
+ if (size == 4)
+ {
+ valore = ModbusClient.ConvertRegistersToLong(listInt);
+ }
+ else if (size == 2)
+ {
+ valore = ModbusClient.ConvertRegistersToInt(listInt);
+ }
+ else if (size == 1)
+ {
+ valore = listInt[0];
+ }
+ break;
+
+ case plcDataType.IntLH:
+ case plcDataType.DIntLH:
+ if (size == 4)
+ {
+ Array.Reverse(listInt);
+ valore = ModbusClient.ConvertRegistersToLong(listInt);
+ }
+ else if (size == 2)
+ {
+ Array.Reverse(listInt);
+ valore = ModbusClient.ConvertRegistersToInt(listInt);
+ }
+ break;
+ }
+ return valore;
+ }
+
+ private static double getScaledDouble(dataConf currMem)
+ {
+ double valDouble;
+ // prima faccio eventuale fattore di scala...
+ double.TryParse(currMem.value, out valDouble);
+ if (currMem.factor != 1)
+ {
+ valDouble = valDouble * (double)currMem.factor;
+ }
+
+ return valDouble;
+ }
+
+ ///
+ /// Effettua scalatura valore secondo fattore Read --> * (moltiplico) Write --> / (divido)
+ ///
+ ///
+ ///
+ ///
+ private static int getScaledInt(dataConf currMem, bool isWrite = false)
+ {
+ int valInt = 0;
+ double temp;
+ // prima faccio eventuale fattore di scala...
+ double.TryParse(currMem.value.Replace(".", ","), out temp);
+ //int.TryParse(currMem.value, out valInt);
+ if (currMem.factor != 1)
+ {
+ if (isWrite)
+ {
+ valInt = (int)(temp * 10 / currMem.factor) / 10;
+ }
+ else
+ {
+ valInt = (int)(temp * 10 * currMem.factor) / 10;
+ }
+ }
+ else
+ {
+ valInt = (int)temp;
+ }
+
+ return valInt;
+ }
+
+ ///
+ /// Effettua scalatura valore secondo fattore Read --> * (moltiplico) Write --> / (divido)
+ ///
+ ///
+ ///
+ private static uint getScaledUInt(dataConf currMem, bool isWrite = false)
+ {
+ uint valUInt;
+ // prima faccio eventuale fattore di scala...
+ uint.TryParse(currMem.value, out valUInt);
+ if (currMem.factor != 1)
+ {
+ if (isWrite)
+ {
+ valUInt = valUInt / (uint)currMem.factor;
+ }
+ else
+ {
+ valUInt = valUInt * (uint)currMem.factor;
+ }
+ }
+
+ return valUInt;
+ }
+
+ ///
+ /// se si disconnette --> processo tentativo riconnessione..
+ ///
+ ///
+ private void CurrPLC_ConnectedChanged(object sender)
+ {
+ if (!currPLC.Connected)
+ {
+ tryDisconnect();
+ }
+ }
+
+ ///
+ /// Recupero dati da singole letture
+ ///
+ /// Valori da processare
+ /// Impiego della LookUpTable x diminuire accessi
+ /// Dizionario valori in uscita
+ /// Errori di lettura
+ private Dictionary getDataDictionary(Dictionary memItemList, bool useLUT, ref Dictionary outVal)
+ {
+ Dictionary readErrorList = new Dictionary();
+ // inizializzo i valori
+ bool[] listBool = new bool[1];
+ int[] listInt = new int[2];
+ // procedo x ogni valore configurato...
+ foreach (var item in memItemList)
+ {
+ try
+ {
+ listInt = new int[item.Value.size];
+ // attesa 50 ms prima di procedere x evitare burst dati
+ if (!useLUT)
+ {
+ Thread.Sleep(50);
+ }
+ string valString = "";
+ double valore = 0;
+ double valoreScal = 0;
+ bool dataOk = false;
+ // in primis DEVO determinare di quale TIPO di valore ho bisogno... dalla PRIMA
+ // cifra di memAddr...
+ modBusAddrType memAddrType = getAddrType(item.Value.memAddr);
+ // in base al tipo leggo array...
+ switch (memAddrType)
+ {
+ case modBusAddrType.Coil:
+ listBool = readCoil(item.Value.index, item.Value.size);
+ valore = listBool[0] ? 1 : 0;
+ break;
+
+ case modBusAddrType.DiscreteInput:
+ listBool = readDiscrInputs(item.Value.index, item.Value.size);
+ valore = listBool[0] ? 1 : 0;
+ break;
+
+ case modBusAddrType.InputRegister:
+ if (useLUT)
+ {
+ int lutAddress = (parametri.holdRegBaseAddr / 4 * 3) + item.Value.index + deltaBase + indexLutCorr;
+ // se size = 1 --> devo cambiare modo recupero
+ if (item.Value.size == 1)
+ {
+ //if (item.Value.index % 2 == 0)
+ if (lutAddress % 2 == 0)
+ {
+ //Array.Copy(HoldingRegisterLUT[lutAddress], listInt, 1);
+ Array.Copy(InputRegisterLUT[lutAddress], 0, listInt, 0, 1);
+ }
+ else
+ {
+ lutAddress--;
+ Array.Copy(InputRegisterLUT[lutAddress], 1, listInt, 0, 1);
+ }
+ }
+ else
+ {
+ if (InputRegisterLUT.ContainsKey(lutAddress))
+ {
+ try
+ {
+ if (listInt.Length == 2)
+ {
+ listInt = InputRegisterLUT[lutAddress];
+ }
+ else
+ {
+ // faccio ciclo x copiare 2 alla volta...
+ for (int i = 0; i < listInt.Length; i += 2)
+ {
+ Array.Copy(InputRegisterLUT[lutAddress + i], 0, listInt, i, 2);
+ }
+ }
+ }
+ catch (Exception exc)
+ {
+ lgError($"Errore in lettura da InputRegisterLUT per indirizzo {lutAddress} | item {item.Key}{Environment.NewLine}{exc}");
+ }
+ }
+ }
+ }
+ else
+ {
+ listInt = readInputReg(item.Value.index, item.Value.size);
+ }
+ if (item.Value.tipoMem == plcDataType.String)
+ {
+ // valore string...
+ valString = ModbusClient.ConvertRegistersToString(listInt, 0, item.Value.size);
+ }
+ else
+ {
+ // valori numerici...
+ valore = convertFromReg(listInt, item.Value.size, item.Value.tipoMem);
+ }
+
+ break;
+
+ case modBusAddrType.HoldingRegister:
+ if (useLUT)
+ {
+ int lutAddress = parametri.holdRegBaseAddr + item.Value.index + deltaBase + indexLutCorr;
+ // se size = 1 --> devo cambiare modo recupero
+ if (item.Value.size == 1)
+ {
+ //if (item.Value.index % 2 == 0)
+ if (lutAddress % 2 == 0)
+ {
+ Array.Copy(HoldingRegisterLUT[lutAddress], 0, listInt, 0, 1);
+ }
+ else
+ {
+ lutAddress--;
+ Array.Copy(HoldingRegisterLUT[lutAddress], 1, listInt, 0, 1);
+ }
+ }
+ else
+ {
+ if (HoldingRegisterLUT.ContainsKey(lutAddress))
+ {
+ try
+ {
+ if (listInt.Length == 2)
+ {
+ listInt = HoldingRegisterLUT[lutAddress];
+ }
+ else
+ {
+ // faccio ciclo x copiare 2 alla volta...
+ for (int i = 0; i < listInt.Length; i += 2)
+ {
+ Array.Copy(HoldingRegisterLUT[lutAddress + i], 0, listInt, i, 2);
+ }
+ }
+ }
+ catch (Exception exc)
+ {
+ lgError($"Errore in lettura da HoldingRegisterLUT per indirizzo {lutAddress} | item {item.Key}{Environment.NewLine}{exc}");
+ }
+ }
+ }
+ }
+ else
+ {
+ listInt = readHoldReg(item.Value.index - 1, item.Value.size);
+ }
+ if (item.Value.tipoMem == plcDataType.String)
+ {
+ // valore string...
+ valString = ModbusClient.ConvertRegistersToString(listInt, 0, item.Value.size);
+ valString = valString.Replace("\n", "").Replace("\r", "").Replace("\0", string.Empty).Trim();
+ }
+ else
+ {
+ valore = convertFromReg(listInt, item.Value.size, item.Value.tipoMem);
+ }
+ break;
+
+ default:
+ break;
+ }
+ if (item.Value.tipoMem == plcDataType.String)
+ {
+ saveValueString(ref outVal, item.Key, valString);
+ lgDebug($"getDataDictionary: valore ricevuto | {item.Key} | val: {valString}");
+ }
+ else
+ {
+ // verifica limite... con delta da impianto
+ dataOk = (valore >= (item.Value.minVal + deltaVal) && valore <= (item.Value.maxVal - deltaVal));
+ if (dataOk || disDynDataRangeCheck)
+ {
+ // verifica valori EPOCH x convertirli in datetime...
+ if (item.Value.unit == "EPOCH")
+ {
+ valString = TimeUtils.epochConvert(valore).ToString("yyyy-MM-dd HH:mm:ss");
+ saveValueString(ref outVal, item.Key, valString);
+ lgDebug($"getDataDictionary: valore EPOCH ricevuto | {item.Key} | val: {valore} | valString: {valString}");
+ }
+ else
+ {
+ // moltiplico x fattore conversione...
+ valoreScal = valore * item.Value.factor;
+ saveValue(ref outVal, item.Key, valoreScal);
+ lgDebug($"getDataDictionary: valore ricevuto | {item.Key} | val: {valore} | valoreScal: {valoreScal}");
+ }
+ }
+ else
+ {
+ lgError($"getDataDictionary: valore scartato x limiti min/max | {item.Key} | val: {valore} | valoreScal: {valoreScal} | min-max: {item.Value.minVal}-{item.Value.maxVal} | deltaVal: {deltaVal}");
+ readErrorList.Add(item.Key, item.Value);
+ lgDebug($"--> rimesso in coda lettura | parametro: {item.Key} | index: {item.Value.index} | size: {item.Value.size}");
+ }
+ }
+ }
+ catch (Exception exc)
+ {
+ lgError($"Eccezione in lettura variabile | item: {item.Key} | mem: {item.Value.memAddr}{Environment.NewLine}{exc}");
+ }
+ }
+
+ return readErrorList;
+ }
+
+ ///
+ /// Calcola tipo memoria modbus dato indirizzo, dati parametri maxVal (slot) + base moltiplica
+ ///
+ /// Indirizzo memoria
+ /// Valore massimo ammesso
+ /// Base moltiplica slot memoria
+ ///
+ private modbusMemType getMemType(int baseAddr, int maxVal, int baseMult)
+ {
+ modbusMemType currMemType = modbusMemType.NotDefined;
+ // determino tipo di memoria
+ if (baseAddr < maxVal)
+ {
+ currMemType = modbusMemType.Coil;
+ }
+ else if (baseAddr < baseMult + maxVal)
+ {
+ currMemType = modbusMemType.DiscreteInput;
+ }
+ else if (baseAddr < 3 * baseMult + maxVal)
+ {
+ currMemType = modbusMemType.InputRegister;
+ }
+ else
+ {
+ currMemType = modbusMemType.HoldingRegister;
+ }
+ return currMemType;
+ }
+
+ ///
+ /// Verifica SE sia il caso di fare il log della memoria indicata
+ ///
+ ///
+ ///
+ private void maybeLogWrite(string memAddrWrite, string logValue)
+ {
+ bool doWrite = true;
+ DateTime adesso = DateTime.Now;
+ if (!lastMemWrite.ContainsKey(memAddrWrite))
+ {
+ lastMemWrite.Add(memAddrWrite, adesso.AddMinutes(-1));
+ }
+ // ora mi leggo valore ultimas crittura e confronto con adesso
+ try
+ {
+ doWrite = (lastMemWrite[memAddrWrite].AddSeconds(vetoSeconds) < adesso);
+ }
+ catch (Exception exc)
+ {
+ lgError($"Eccezione in maybeLogWrite{Environment.NewLine}{exc}");
+ }
+ // se encessario --> LOG!
+ if (doWrite)
+ {
+ lgInfo(logValue);
+ lastMemWrite[memAddrWrite] = adesso;
+ }
+ }
+
+ ///
+ /// Effettua lettura blocco memoria indicato e lo salva in copia locale in CoilLUT
+ ///
+ /// Indirizzo di partenza
+ /// Num registri da leggere (max 120)
+ private bool readMemBlockCoil(int startAddr, int numReg, int baseAddr)
+ {
+ bool allOk = false;
+ if (currPLC.Connected)
+ {
+ allOk = true;
+ // fix massima lunghezza pacchetto
+ if (numReg > 120)
+ {
+ lgError($"Attenzione richiesta lettura blocco troppo grande: numReg {numReg} --> 120");
+ numReg = 120;
+ }
+
+ bool[] rawData = new bool[2];
+ try
+ {
+ stopwatch.Restart();
+ rawData = currPLC.ReadCoils(startAddr - baseAddr, numReg);
+ stopwatch.Stop();
+ lgTrace($"Lettura in blocco Colis | startAddr: {startAddr} | numReg {numReg} | rawData.lenght: {rawData.Length} | {stopwatch.ElapsedMilliseconds}ms");
+ lastReadPLC = DateTime.Now;
+ // salvo in LUT i dati...
+ if (rawData.Length > 0)
+ {
+ for (int i = 0; i < rawData.Length; i++)
+ {
+ if (rawData.Length >= i)
+ {
+ // salvo nel registro...
+ int currAddr = startAddr + i;
+ if (CoilLUT.ContainsKey(currAddr))
+ {
+ CoilLUT[currAddr] = rawData[i];
+ }
+ else
+ {
+ CoilLUT.Add(currAddr, rawData[i]);
+ }
+ }
+ else
+ {
+ currReadErrors++;
+ allOk = false;
+ lgError($"CoilLUT | Impossibile copiare dati, array di origine troppo corto: rawData.lenght: {rawData.Length} | base addr richiesto i: {i} | errori currReadErrors: {currReadErrors}");
+ }
+ }
+ }
+ }
+ catch (Exception exc)
+ {
+ currReadErrors++;
+ allOk = false;
+ lgError($"Eccezione in readMemBlockCoil | startAddr: {startAddr} | baseAddr: {baseAddr} | numReg: {numReg} | currReadErrors: {currReadErrors} |{Environment.NewLine}{exc}");
+ }
+ }
+ else
+ {
+ lgError($"readMemBlockCoil | Attenzione, PLC disconnesso... currReadErrors: {currReadErrors}");
+ tryDisconnect();
+ }
+ return allOk;
+ }
+
+ ///
+ /// Effettua lettura blocco memoria indicato e lo salva in copia locale in DiscreteInputLUT
+ ///
+ /// Indirizzo di partenza
+ /// Num registri da leggere (max 120)
+ private bool readMemBlockDiscreteIn(int startAddr, int numReg, int baseAddr)
+ {
+ bool allOk = false;
+ if (currPLC.Connected)
+ {
+ allOk = true;
+ // fix massima lunghezza pacchetto
+ if (numReg > 120)
+ {
+ lgError($"Attenzione richiesta lettura blocco troppo grande: numReg {numReg} --> 120");
+ numReg = 120;
+ }
+
+ bool[] rawData = new bool[2];
+ try
+ {
+ stopwatch.Restart();
+ int memAddr = startAddr - baseAddr;
+ rawData = currPLC.ReadDiscreteInputs(memAddr, numReg);
+ stopwatch.Stop();
+ lgTrace($"Lettura in blocco DiscreteInput | startAddr: {startAddr} | numReg {numReg} | rawData.lenght: {rawData.Length} | {stopwatch.ElapsedMilliseconds}ms");
+ lastReadPLC = DateTime.Now;
+ // salvo in LUT i dati...
+ if (rawData.Length > 0)
+ {
+ for (int i = 0; i < rawData.Length; i++)
+ {
+ if (rawData.Length >= i)
+ {
+ // salvo nel registro...
+ int currAddr = startAddr + i;
+ if (DiscreteInputLUT.ContainsKey(currAddr))
+ {
+ DiscreteInputLUT[currAddr] = rawData[i];
+ }
+ else
+ {
+ DiscreteInputLUT.Add(currAddr, rawData[i]);
+ }
+ }
+ else
+ {
+ currReadErrors++;
+ allOk = false;
+ lgError($"DiscreteInputLUT | Impossibile copiare dati, array di origine troppo corto: rawData.lenght: {rawData.Length} | base addr richiesto i: {i} | errori currReadErrors: {currReadErrors}");
+ }
+ }
+ }
+ }
+ catch (Exception exc)
+ {
+ currReadErrors++;
+ allOk = false;
+ lgError($"Eccezione in readMemBlockDiscreteIn | startAddr: {startAddr} | baseAddr: {baseAddr} | numReg: {numReg} | currReadErrors: {currReadErrors} |{Environment.NewLine}{exc}");
+ }
+ }
+ else
+ {
+ lgError($"readMemBlockDiscreteIn | Attenzione, PLC disconnesso... currReadErrors: {currReadErrors}");
+ tryDisconnect();
+ }
+ return allOk;
+ }
+
+ ///
+ /// Effettua lettura blocco memoria indicato e lo salva in copia locale in HoldingRegisterLUT
+ ///
+ /// Indirizzo di partenza
+ /// Num registri da leggere (max 120)
+ /// Indirizzo di base (da sottrarre all'indirizzo richiesto)
+ private bool readMemBlockHoldingReg(int startAddr, int numReg, int baseAddr)
+ {
+ bool allOk = false;
+ if (currPLC.Connected)
+ {
+ allOk = true;
+ // fix massima lunghezza pacchetto
+ if (numReg > 120)
+ {
+ lgError($"Attenzione richiesta lettura blocco troppo grande: numReg {numReg} --> 120");
+ numReg = 120;
+ }
+ // si lavora rispetto all'indirizzo base 40001
+ int[] rawData = new int[2];
+ try
+ {
+ stopwatch.Restart();
+ int memAddr = startAddr - baseAddr;
+ rawData = currPLC.ReadHoldingRegisters(memAddr, numReg);
+ stopwatch.Stop();
+ lgTrace($"Lettura in blocco HoldingRegisters| startAddr: {startAddr} | numReg {numReg} | rawData.lenght: {rawData.Length} | {stopwatch.ElapsedMilliseconds}ms");
+ lastReadPLC = DateTime.Now;
+ // se leggo tutti zero --> indico +5 read error!
+ bool allZero = (rawData.Where(x => x > 0).Count() == 0);
+ if (allZero)
+ {
+ currReadErrors += 5;
+ allOk = false;
+ }
+ // salvo in LUT la versione ESPLOSA 2 byte alla volta...
+ if (allOk && rawData.Length > 0)
+ {
+ for (int i = 0; i < rawData.Length / 2; i++)
+ {
+ int[] thisSet = new int[2];
+ if (rawData.Length >= (i + 1) * 2)
+ {
+ Array.Copy(rawData, i * 2, thisSet, 0, 2);
+ // salvo nel registro...
+ int currAddr = startAddr + i * 2;
+ if (HoldingRegisterLUT.ContainsKey(currAddr))
+ {
+ HoldingRegisterLUT[currAddr] = thisSet;
+ }
+ else
+ {
+ HoldingRegisterLUT.Add(currAddr, thisSet);
+ }
+ }
+ else
+ {
+ currReadErrors++;
+ allOk = false;
+ lgError($"Impossibile copiare dati, array di origine troppo corto: rawData.lenght: {rawData.Length} | base addr richiesto i*2: {i * 2} | errori currReadErrors: {currReadErrors}");
+ }
+ }
+ }
+ }
+ catch (Exception exc)
+ {
+ // eccezione aggiunge 10 read errors!
+ currReadErrors += 10;
+ allOk = false;
+ lgError($"Eccezione in readMemBlockHoldingReg | startAddr: {startAddr} | baseAddr: {baseAddr} | numReg: {numReg} | currReadErrors: {currReadErrors} |{Environment.NewLine}{exc}");
+ }
+ }
+ else
+ {
+ lgError($"readMemBlockHoldingReg | Attenzione, PLC disconnesso... currReadErrors: {currReadErrors}");
+ tryDisconnect();
+ }
+ return allOk;
+ }
+
+ ///
+ /// Effettua lettura blocco memoria indicato e lo salva in copia locale in InputRegisterLUT
+ ///
+ /// Indirizzo di partenza
+ /// Num registri da leggere (max 120)
+ private bool readMemBlockInputReg(int startAddr, int numReg, int baseAddr)
+ {
+ bool allOk = false;
+ if (currPLC.Connected)
+ {
+ allOk = true;
+ // fix massima lunghezza pacchetto
+ if (numReg > 120)
+ {
+ lgError($"Attenzione richiesta lettura blocco troppo grande: numReg {numReg} --> 120");
+ numReg = 120;
+ }
+ // si lavora rispetto all'indirizzo base 40001
+ int[] rawData = new int[2];
+ try
+ {
+ stopwatch.Restart();
+ int memAddr = startAddr - baseAddr;
+ rawData = currPLC.ReadInputRegisters(memAddr, numReg);
+ stopwatch.Stop();
+ lgTrace($"Lettura in blocco InputRegisters| startAddr: {startAddr} | numReg {numReg} | rawData.lenght: {rawData.Length} | {stopwatch.ElapsedMilliseconds}ms");
+ lastReadPLC = DateTime.Now;
+ // salvo in LUT la versione ESPLOSA 2 byte alla volta...
+ if (rawData.Length > 0)
+ {
+ for (int i = 0; i < rawData.Length / 2; i++)
+ {
+ int[] thisSet = new int[2];
+ if (rawData.Length >= (i + 1) * 2)
+ {
+ Array.Copy(rawData, i * 2, thisSet, 0, 2);
+ // salvo nel registro...
+ int currAddr = startAddr + i * 2;
+ if (InputRegisterLUT.ContainsKey(currAddr))
+ {
+ InputRegisterLUT[currAddr] = thisSet;
+ }
+ else
+ {
+ InputRegisterLUT.Add(currAddr, thisSet);
+ }
+ }
+ else
+ {
+ currReadErrors++;
+ allOk = false;
+ lgError($"Impossibile copiare dati, array di origine troppo corto: rawData.lenght: {rawData.Length} | base addr richiesto i*2: {i * 2} | errori currReadErrors: {currReadErrors}");
+ }
+ }
+ }
+ }
+ catch (Exception exc)
+ {
+ currReadErrors++;
+ allOk = false;
+ lgError($"Eccezione in readMemBlockInputReg | startAddr: {startAddr} | baseAddr: {baseAddr} | numReg: {numReg} | currReadErrors: {currReadErrors} |{Environment.NewLine}{exc}");
+ }
+ }
+ else
+ {
+ lgError($"readMemBlockInputReg | Attenzione, PLC disconnesso... currReadErrors: {currReadErrors}");
+ tryDisconnect();
+ }
+ return allOk;
+ }
+
+ ///
+ /// Verifica il tipo di memoria e di conseguenza effettua chiama la procedura di lettura
+ ///
+ /// Indirizzo di partenza
+ /// Num registri da leggere (max 120)
+ private void readMemoryBlock(int startAddr, int numReg)
+ {
+ bool allOk = false;
+ modbusMemType currMemType = modbusMemType.NotDefined;
+ // valori setup secondo conf memoria: memoria estesa... 0 ... xFFFF per ogni set da 100'000...
+ int maxVal = modbusExtReg ? 65536 : 10000;
+ int baseMult = modbusExtReg ? 100000 : 10000;
+ int baseAddr = parametri.holdRegBaseAddr;
+ // calcolo tipo memoria
+ currMemType = getMemType(startAddr, maxVal, baseMult);
+ // in base al tipo di memoria procedo
+ switch (currMemType)
+ {
+ case modbusMemType.Coil:
+ if (parametri.useCalcBaseAddr)
+ {
+ baseAddr = 0 * baseMult;
+ }
+ allOk = readMemBlockCoil(startAddr, numReg, baseAddr);
+ break;
+
+ case modbusMemType.DiscreteInput:
+ if (parametri.useCalcBaseAddr)
+ {
+ baseAddr = 1 * baseMult;
+ }
+ allOk = readMemBlockDiscreteIn(startAddr, numReg, baseAddr);
+ break;
+
+ case modbusMemType.InputRegister:
+ if (parametri.useCalcBaseAddr)
+ {
+ baseAddr = 3 * baseMult;
+ }
+ allOk = readMemBlockInputReg(startAddr, numReg, baseAddr);
+ break;
+
+ case modbusMemType.HoldingRegister:
+ if (parametri.useCalcBaseAddr)
+ {
+ baseAddr = 4 * baseMult;
+ }
+ allOk = readMemBlockHoldingReg(startAddr, numReg, baseAddr);
+ break;
+
+ case modbusMemType.NotDefined:
+ default:
+ break;
+ }
+
+ // se tutto ok --> riduco contatore errori di 2...
+ if (allOk)
+ {
+ currReadErrors = currReadErrors >= 2 ? currReadErrors - 2 : 0;
+ }
+ else
+ {
+ // se > max errori --> disconnetto
+ if (currReadErrors > maxReadErrors)
+ {
+ lgError($"Superato limite errori Read ({currReadErrors}) --> tryDisconnect");
+ currReadErrors = 0;
+ tryDisconnect();
+ }
+ else
+ {
+ // altrimenti pausa forzata
+ Thread.Sleep(1000);
+ }
+ }
+ }
+
+ #endregion Private Methods
+ }
+}
\ No newline at end of file
diff --git a/IOB-WIN-MBUS/IobModbustTCP/ModbusTCPCedax.cs b/IOB-WIN-MBUS/IobModbustTCP/ModbusTCPCedax.cs
new file mode 100644
index 00000000..c56b2585
--- /dev/null
+++ b/IOB-WIN-MBUS/IobModbustTCP/ModbusTCPCedax.cs
@@ -0,0 +1,100 @@
+using IOB_UT_NEXT;
+using System;
+
+namespace IOB_WIN_MBUS.IobModbusTCP
+{
+ /* --------------------------------------------------------------------------------
+ * Controlli ModBusTCP Hunitronix Cedax
+ * - protocollo ModBus TCP
+ * - specifico comportamento impianti Unitronix Cedax
+ * - nessuna gestione allarmi
+ *
+ * STRUTTURA MEMORIA a banchi di UInt16, convertiti successivamente in int EVENTUALMENTE divisi per 10/100/1000
+ * ATTENZIONE: gestione LSB / MSB, il byte MSB (alto) DEVE essere moltiplicato x 32768 (Uint16Max/2) e sommato al byte basso
+ * lettura: xxx byte,
+ * scrittura yyy byte
+ * G:\Drive condivisi\30_Clienti\Giacovelli - WIL\PLC CEDAX
+ *
+ * -------------------------------------------------------------------------------- */
+
+ public class ModbusTCPCedax : ModbusTCP
+ {
+ #region Public Constructors
+
+ ///
+ /// Classe base con i metodi x ModBusTCP
+ ///
+ ///
+ ///
+ public ModbusTCPCedax(AdapterFormNext caller, IobConfiguration IOBConf) : base(caller, IOBConf)
+ {
+ lgInfo("NEW IOB ModBus TCP Cedax");
+
+ // provo lettura una prima volta i dati DYN
+ if (currPLC != null && currPLC.Connected)
+ {
+ try
+ {
+ processDynData();
+ }
+ catch (Exception exc)
+ {
+ lgError($"Eccezione in processDynData iniziale x ModBus TCP Cedax:{Environment.NewLine}{exc}");
+ }
+ }
+ }
+
+ #endregion Public Constructors
+
+ #region Protected Methods
+
+ ///
+ /// Effettua decodifica aree memoria alla bitmap usata x MAPO
+ ///
+ protected override void decodeToBaseBitmap()
+ {
+ // init a zero...
+ B_input = 0;
+
+ /* -----------------------------------------------------
+ * bitmap MAPO STANDARD 60
+ * B0: POWER_ON
+ * B1: RUN
+ * B2: pzCount
+ * B3: allarme
+ * B4: manuale
+ * B5: slowTC
+ * B6: WarmUpCoolDown
+ * B7: EmergArmata
+ *
+ ----------------------------------------------------- */
+
+ var MemInt = new byte[2];
+
+ int byteSignals = 0;
+ // bit 0 (poweron) imposto a 1 SE connected...
+ if (currPLC.Connected)
+ {
+ byteSignals += (1 << 0);
+ }
+
+ // processo dagli stati + gravi...
+ if (hasAlarms())
+ {
+ byteSignals += (1 << 3);
+ }
+ else
+ {
+ byteSignals += (1 << 1);
+ }
+
+ // segnalo NON emergenza
+ byteSignals += (1 << 7);
+
+ // salvo!
+ B_input = byteSignals;
+ }
+
+ #endregion Protected Methods
+ }
+}
\ No newline at end of file
diff --git a/IOB-WIN-MBUS/IobModbustTCP/ModbusTCPCenterfrigo.cs b/IOB-WIN-MBUS/IobModbustTCP/ModbusTCPCenterfrigo.cs
new file mode 100644
index 00000000..ba59e6c3
--- /dev/null
+++ b/IOB-WIN-MBUS/IobModbustTCP/ModbusTCPCenterfrigo.cs
@@ -0,0 +1,116 @@
+using IOB_UT_NEXT;
+using System;
+
+namespace IOB_WIN_MBUS.IobModbusTCP
+{
+ /* --------------------------------------------------------------------------------
+ * Controlli ModBusTCP Centerfrigo
+ * - protocollo ModBus TCP
+ * - specifico comportamento impianti Centerfrigo
+ * - gestione allarmi
+ * - gestione stati salvati come dynData
+ * - gestione valori analogici
+ *
+ * STRUTTURA MEMORIA a banchi di UInt16, convertiti successivamente in int EVENTUALMENTE divisi per 10/100/1000
+ * lettura: xxx byte,
+ * scrittura yyy byte
+ * G:\Drive condivisi\30_Clienti\Giacovelli - WIL\CenterFrigo
+ *
+ * ATTENZIONE! leggere al max 44 byte alla volta
+ *
+ * -------------------------------------------------------------------------------- */
+
+ public class ModbusTCPCenterfrigo : ModbusTCP
+ {
+ #region Public Constructors
+
+ ///
+ /// Classe base con i metodi x ModBusTCP
+ ///
+ ///
+ ///
+ public ModbusTCPCenterfrigo(AdapterFormNext caller, IobConfiguration IOBConf) : base(caller, IOBConf)
+ {
+ lgInfo("NEW IOB ModBus TCP Centerfrigo");
+
+ // provo lettura una prima volta i dati DYN
+ if (currPLC != null && currPLC.Connected)
+ {
+ try
+ {
+ processDynData();
+ }
+ catch (Exception exc)
+ {
+ lgError($"Eccezione in processDynData iniziale x ModBus TCP Cedax:{Environment.NewLine}{exc}");
+ }
+ }
+ }
+
+ #endregion Public Constructors
+
+ #region Protected Methods
+
+ ///
+ /// Effettua decodifica aree memoria alla bitmap usata x MAPO
+ ///
+ protected override void decodeToBaseBitmap()
+ {
+ // init a zero...
+ B_input = 0;
+
+ /* -----------------------------------------------------
+ * bitmap MAPO STANDARD 60
+ * B0: POWER_ON
+ * B1: RUN
+ * B2: pzCount
+ * B3: allarme
+ * B4: manuale
+ * B5: slowTC
+ * B6: WarmUpCoolDown
+ * B7: EmergArmata
+ *
+ ----------------------------------------------------- */
+
+ var MemInt = new byte[2];
+
+ int byteSignals = 0;
+ // bit 0 (poweron) imposto a 1 SE connected...
+ if (currPLC.Connected)
+ {
+ byteSignals += (1 << 0);
+ }
+
+ // processo dagli stati + gravi...
+ if (hasAlarms())
+ {
+ byteSignals += (1 << 3);
+ }
+ else
+ {
+ byteSignals += (1 << 1);
+ }
+
+ // segnalo NON emergenza
+ byteSignals += (1 << 7);
+
+ // salvo!
+ B_input = byteSignals;
+ }
+
+ ///
+ /// Effettua sync dati
+ ///
+ protected override void processDataSync()
+ {
+ // richiesta check autoODL
+ processAutoOdl();
+ // richiesta generazione quotidiana dossiers
+ processAutoDossier();
+ // effettua gestione import file...
+ processFileImport();
+ }
+
+ #endregion Protected Methods
+ }
+}
\ No newline at end of file
diff --git a/IOB-WIN-MBUS/IobModbustTCP/ModbusTCPFimat.cs b/IOB-WIN-MBUS/IobModbustTCP/ModbusTCPFimat.cs
new file mode 100644
index 00000000..7f84317e
--- /dev/null
+++ b/IOB-WIN-MBUS/IobModbustTCP/ModbusTCPFimat.cs
@@ -0,0 +1,216 @@
+using IOB_UT_NEXT;
+using System;
+using System.Globalization;
+using System.IO;
+
+namespace IOB_WIN_MBUS.IobModbusTCP
+{
+ /* --------------------------------------------------------------------------------
+ * Controlli ModBusTCP FIMAT
+ * - protocollo ModBus TCP
+ * - gestione stato via Modbus
+ * - resto gestioen via file
+ *
+ * G:\Drive condivisi\30_Clienti\Tenditalia\Macchina Fimat
+ *
+ * -------------------------------------------------------------------------------- */
+
+ public class ModbusTCPFimat : ModbusTCP
+ {
+ #region Public Constructors
+
+ ///
+ /// Classe base con i metodi x ModBusTCP
+ ///
+ ///
+ ///
+ public ModbusTCPFimat(AdapterFormNext caller, IobConfiguration IOBConf) : base(caller, IOBConf)
+ {
+ lgInfo("NEW IOB ModBus TCP FIMAT");
+
+ setupSpecialParams();
+ // provo lettura una prima volta i dati DYN
+ if (currPLC != null && currPLC.Connected)
+ {
+ try
+ {
+ processDynData();
+ if (EnableTest)
+ {
+ testReadExt();
+ }
+ }
+ catch (Exception exc)
+ {
+ lgError($"Eccezione in processDynData iniziale x ModBus TCP FIMAT:{Environment.NewLine}{exc}");
+ }
+ }
+ if (EnableTest)
+ {
+ processDataSync();
+ }
+ }
+
+ #endregion Public Constructors
+
+ #region Protected Fields
+
+ ///
+ /// Quantità massima PODL prima di fare split ordine (default 999'999)
+ ///
+ protected int maxPodlQty = 999999;
+
+ #endregion Protected Fields
+
+ #region Protected Properties
+
+ ///
+ /// Restituisce controllo IN ALLARME
+ ///
+ protected bool AlarmState
+ {
+ get
+ {
+ return testIntCondition("AlarmIntCond");
+ }
+ }
+
+ ///
+ /// Restituisce status di ESTOP triggered (triggered = premuta, altrimenti armed)
+ ///
+ protected bool EStopTriggered
+ {
+ get
+ {
+ return testBitCondition("EStopBitCond");
+ }
+ }
+
+ ///
+ /// Restituisce status di Manuale, hard coded
+ ///
+ protected bool ManualState
+ {
+ get
+ {
+ return testBitCondition("ManualBitCond");
+ }
+ }
+
+ ///
+ /// Restituisce status di WORK (auto + lavora), hard coded
+ ///
+ protected bool WorkState
+ {
+ get
+ {
+ return testIntCondition("WorkIntCond");
+ }
+ }
+
+ #endregion Protected Properties
+
+ #region Protected Methods
+
+ ///
+ /// Effettua decodifica aree memoria alla bitmap usata x MAPO
+ ///
+ protected override void decodeToBaseBitmap()
+ {
+ // init a zero...
+ B_input = 0;
+
+ /* -----------------------------------------------------
+ * bitmap MAPO STANDARD 60
+ * B0: POWER_ON
+ * B1: RUN
+ * B2: pzCount
+ * B3: allarme
+ * B4: manuale
+ * B5: slowTC
+ * B6: WarmUpCoolDown
+ * B7: EmergArmata
+ *
+ ----------------------------------------------------- */
+
+ var MemInt = new byte[2];
+
+ int byteSignals = 0;
+ // bit 0 (poweron) imposto a 1 SE connected...
+ if (currPLC.Connected)
+ {
+ byteSignals += (1 << 0);
+ }
+ // se ho qualcosa nella holding register...
+ if (HoldingRegisterLUT != null && HoldingRegisterLUT.Count > 0)
+ {
+ // se emergenza NON premuta (triggered) indico OK (armata...) FARE !!! togliere true
+ if (!EStopTriggered)
+ {
+ byteSignals += (1 << 7);
+ }
+
+ // impiego controlli da setup IntConditions... processo dagli stati + gravi...
+ if (AlarmState || hasAlarms())
+ {
+ byteSignals += (1 << 3);
+ }
+ else if (ManualState)
+ {
+ byteSignals += (1 << 4);
+ }
+ else if (WorkState)
+ {
+ byteSignals += (1 << 1);
+ }
+
+ checkTranslateBit();
+ checkTranslateInt();
+ }
+ else
+ {
+ lgInfo("HoldingRegisterLUT vuoto!");
+ }
+
+ // salvo!
+ B_input = byteSignals;
+ }
+
+ ///
+ /// Effettua sync dati x PODL attivi
+ ///
+ protected override void processDataSync()
+ {
+ if (hasRecipe)
+ {
+ lgTrace("processDataSync: START");
+ DateTime adesso = DateTime.Now;
+ Calendar cal = new CultureInfo("it-IT").Calendar;
+ int week = cal.GetWeekOfYear(adesso, CalendarWeekRule.FirstFourDayWeek, DayOfWeek.Monday);
+ string tempPath = Path.Combine(pathList["path-locBase"], pathList["path-01-Temp"]);
+ string archPath = Path.Combine(pathList["path-locBase"], pathList["path-02-Sent"], $"{adesso:yyyy}", $"{week:00}");
+ string remoPath = Path.Combine(pathList["path-locBase"], pathList["path-04-remReq"]);
+ baseUtils.checkDir(tempPath);
+ baseUtils.checkDir(archPath);
+ try
+ {
+ // recupero elenco PODL da processare, check PODL già inviati, save locale
+ bool create = RecipeReqWriteLocal(tempPath, useLocalRecipe);
+ // invio ricette a impianto
+ bool trasmitted = RecipeSend(tempPath, archPath, remoPath);
+ }
+ catch (Exception exc)
+ {
+ lgError($"Eccezione in processDataSync{Environment.NewLine}{exc}");
+ }
+ lgTrace("processDataSync: Completed");
+ }
+ else
+ {
+ lgTrace("processDataSync: NO exec, hasRecipe=false");
+ }
+ }
+
+ #endregion Protected Methods
+ }
+}
\ No newline at end of file
diff --git a/IOB-WIN-MBUS/IobModbustTCP/ModbusTCPHam.cs b/IOB-WIN-MBUS/IobModbustTCP/ModbusTCPHam.cs
new file mode 100644
index 00000000..2b342351
--- /dev/null
+++ b/IOB-WIN-MBUS/IobModbustTCP/ModbusTCPHam.cs
@@ -0,0 +1,92 @@
+using IOB_UT_NEXT;
+using System;
+
+namespace IOB_WIN_MBUS.IobModbusTCP
+{
+ /* --------------------------------------------------------------------------------
+ * Controlli ModBusTCP COMECA
+ * - protocollo ModBus TCP HAM
+ * - specifico comportamento impianti HAM Pizzaferri
+ *
+ * STRUTTURA MEMORIA a banchi di byte, convertiti successivamente in bit/int/real:
+ * lettura: xxx byte,
+ * scrittura yyy byte
+ * G:\Drive condivisi\30_Clienti\Pizzaferri\Impianti\HAM
+ *
+ * -------------------------------------------------------------------------------- */
+
+ public class ModbusTCPHam : ModbusTCP
+ {
+ #region Public Constructors
+
+ ///
+ /// Classe base con i metodi x ModBusTCP
+ ///
+ ///
+ ///
+ public ModbusTCPHam(AdapterFormNext caller, IobConfiguration IOBConf) : base(caller, IOBConf)
+ {
+ lgInfo("NEW IOB ModBus TCP HAM");
+
+ // provo lettura una prima volta i dati DYN
+ if (currPLC != null && currPLC.Connected)
+ {
+ try
+ {
+ processDynData();
+ }
+ catch (Exception exc)
+ {
+ lgError($"Eccezione in processDynData iniziale x ModBus TCP HAM:{Environment.NewLine}{exc}");
+ }
+ }
+ }
+
+ #endregion Public Constructors
+
+ #region Protected Methods
+
+ ///
+ /// Effettua decodifica aree memoria alla bitmap usata x MAPO/GWMS
+ /// - per lo scopo specifico IN REALTA' non conta lo stato macchina.... ma lo inviamo lo stesso
+ ///
+ protected override void decodeToBaseBitmap()
+ {
+ // init a zero...
+ B_input = 0;
+
+ /* -----------------------------------------------------
+ * bitmap MAPO STANDARD
+ * B0: POWER_ON
+ * B1: RUN
+ * B2: pzCount
+ * B3: allarme
+ *
+ ----------------------------------------------------- */
+
+ var MemInt = new byte[2];
+
+ int byteSignals = 0;
+ // bit 0 (poweron) imposto a 1 SE connected...
+ if (currPLC.Connected)
+ {
+ byteSignals += (1 << 0);
+ }
+
+ // processo dagli stati + gravi...
+ if (hasAlarms())
+ {
+ byteSignals += (1 << 3);
+ }
+ else
+ {
+ byteSignals += (1 << 1);
+ }
+
+ // salvo!
+ B_input = byteSignals;
+ }
+
+ #endregion Protected Methods
+ }
+}
\ No newline at end of file
diff --git a/IOB-WIN-MBUS/IobModbustTCP/ModbusTCPHelpi.cs b/IOB-WIN-MBUS/IobModbustTCP/ModbusTCPHelpi.cs
new file mode 100644
index 00000000..96ecd39e
--- /dev/null
+++ b/IOB-WIN-MBUS/IobModbustTCP/ModbusTCPHelpi.cs
@@ -0,0 +1,193 @@
+using EasyModbus;
+using IOB_UT_NEXT;
+using System;
+using System.Linq;
+
+namespace IOB_WIN_MBUS.IobModbusTCP
+{
+ /* --------------------------------------------------------------------------------
+ * Controlli ModBusTCP Helpi
+ * - protocollo ModBus TCP
+ * - specifico comportamento impianti confezionatrici Helpi
+ *
+ * NRicetta UINT 16bit 41060 W
+ * ApplicaRicetta UINT 16bit 41061 R/W
+ * IDOrdine STRING [30] 41062 W
+ * Lotto STRING [30] 41078 W
+ * CodiceAllarmi_1 DWORD 32bit 41094 R
+ * CodiceAllarmi_2 DWORD 32bit 41096 R
+ * NPacchi UDINT 32bit 41098 W
+ * NPacchiFatti UDINT 32bit 41100 R
+ * EpochStart UDINT 32bit 41102 R
+ * EpochStop UDINT 32bit 41104 R
+ * PPM REAL 32bit 41106 R
+ * StatusLavoro UINT 16bit 41108 R
+ *
+ * StatusLavoro indica lo stato della macchina:
+ * 0. macchina completamente ferma
+ * 1. macchina in riscaldamento
+ * 2. macchina pronta
+ * 3. macchina in manuale
+ * 4. macchina in ciclo
+ *
+ * G:\Drive condivisi\30_Clienti\Cereria Finassi\PLC Helpi
+ *
+ * -------------------------------------------------------------------------------- */
+
+ public class ModbusTCPHelpi : ModbusTCP
+ {
+ #region Public Constructors
+
+ ///
+ /// Classe base con i metodi x ModBusTCP
+ ///
+ ///
+ ///
+ public ModbusTCPHelpi(AdapterFormNext caller, IobConfiguration IOBConf) : base(caller, IOBConf)
+ {
+ lgInfo("NEW IOB ModBus TCP Helpi");
+
+ // provo lettura una prima volta i dati DYN
+ if (currPLC != null && currPLC.Connected)
+ {
+ try
+ {
+ processDynData();
+ }
+ catch (Exception exc)
+ {
+ lgError($"Eccezione in processDynData iniziale x ModBus TCP Helpi:{Environment.NewLine}{exc}");
+ }
+ }
+
+ //// test lettura
+ //testCncConn();
+ //testBlockRead(401001, 20);
+ }
+
+ #endregion Public Constructors
+
+ #region Protected Properties
+
+ ///
+ /// Restituisce status di emergenza, hard coded dall'area di allarmi
+ ///
+ protected bool EStop
+ {
+ get
+ {
+ bool answ = false;
+ int currStatus = 0;
+ // hard coded
+ int statusReg = 41094;
+ // deve avere allarmi (è un allarme EStop)
+ if (hasAlarms())
+ {
+ int[] listInt = new int[2];
+ listInt = HoldingRegisterLUT[statusReg];
+ currStatus = ModbusClient.ConvertRegistersToInt(listInt);
+ // hard coded il 5° bit
+ answ = ((currStatus & (1 << 4)) > 0);
+ }
+ return answ;
+ }
+ }
+
+ ///
+ /// Restituisce status di lavorazione, hard coded dall'area di memoria 41108
+ ///
+ protected int StatusLavoro
+ {
+ get
+ {
+ int answ = 0;
+ // hard coded
+ int statusReg = 41108;
+ if (HoldingRegisterLUT.ContainsKey(statusReg))
+ {
+ int[] listInt = new int[2];
+ listInt = HoldingRegisterLUT[statusReg];
+ var dataList = listInt.ToList();
+ dataList.Reverse();
+ listInt = dataList.ToArray();
+ answ = ModbusClient.ConvertRegistersToInt(listInt);
+ }
+ return answ;
+ }
+ }
+
+ #endregion Protected Properties
+
+ #region Protected Methods
+
+ ///
+ /// Effettua decodifica aree memoria alla bitmap usata x MAPO
+ ///
+ protected override void decodeToBaseBitmap()
+ {
+ // init a zero...
+ B_input = 0;
+
+ /* -----------------------------------------------------
+ * bitmap MAPO STANDARD, tipo 60 con warm up /cool down
+ * B0: POWER_ON
+ * B1: RUN
+ * B2: pzCount
+ * B3: allarme
+ * B4: manuale
+ * B5: TC Lento
+ * B6: WarmUp/CoolDown
+ * B7: Emergenza armata
+ *
+ ----------------------------------------------------- */
+
+ var MemInt = new byte[2];
+
+ int byteSignals = 0;
+ // bit 0 (poweron) imposto a 1 SE connected...
+ if (currPLC.Connected)
+ {
+ byteSignals += (1 << 0);
+ }
+
+ // processo dagli stati + gravi...
+ if (!EStop)
+ {
+ byteSignals += (1 << 7);
+ }
+ if (hasAlarms())
+ {
+ byteSignals += (1 << 3);
+ }
+
+ // verifico gli stati specifici x decodificare... 41108
+ switch (StatusLavoro)
+ {
+ // resta FERMA (pronta)
+ case 0:
+ default:
+ break;
+
+ case 1:
+ byteSignals += (1 << 6);
+ break;
+
+ // spostato 2 in lavora
+ //case 2:
+ case 3:
+ byteSignals += (1 << 4);
+ break;
+
+ case 2:
+ case 4:
+ byteSignals += (1 << 1);
+ break;
+ }
+
+ // salvo!
+ B_input = byteSignals;
+ }
+
+ #endregion Protected Methods
+ }
+}
\ No newline at end of file
diff --git a/IOB-WIN-MBUS/IobModbustTCP/ModbusTCPImaxAeromec.cs b/IOB-WIN-MBUS/IobModbustTCP/ModbusTCPImaxAeromec.cs
new file mode 100644
index 00000000..814545ae
--- /dev/null
+++ b/IOB-WIN-MBUS/IobModbustTCP/ModbusTCPImaxAeromec.cs
@@ -0,0 +1,202 @@
+using EasyModbus;
+using IOB_UT_NEXT;
+using System;
+
+namespace IOB_WIN_MBUS.IobModbusTCP
+{
+ /* --------------------------------------------------------------------------------
+ * Controlli ModBusTCP IMAS Aeromeccanica
+ * - protocollo ModBus TCP
+ * - specifico comportamento impianti filtrazione IMAS Aeromeccanica
+ * - gestione allarmi
+ *
+ * STRUTTURA MEMORIA a banchi di UInt16, convertiti successivamente in int EVENTUALMENTE divisi per 10/100/1000
+ * G:\Drive condivisi\30_Clienti\Jetco\Manuali CNC-PLC\Aspiratori
+ *
+ * -------------------------------------------------------------------------------- */
+
+ public class ModbusTCPImaxAeromec : ModbusTCP
+ {
+ #region Public Constructors
+
+ ///
+ /// Classe base con i metodi x ModBusTCP
+ ///
+ ///
+ ///
+ public ModbusTCPImaxAeromec(AdapterFormNext caller, IobConfiguration IOBConf) : base(caller, IOBConf)
+ {
+ lgInfo("NEW IOB ModBus TCP IMAS Aeromec");
+
+ // provo lettura una prima volta i dati DYN
+ if (currPLC != null && currPLC.Connected)
+ {
+ try
+ {
+ processDynData();
+ }
+ catch (Exception exc)
+ {
+ lgError($"Eccezione in processDynData iniziale x ModBus TCP IMAS Aeromec:{Environment.NewLine}{exc}");
+ }
+ }
+ }
+
+ #endregion Public Constructors
+
+ #region Protected Properties
+
+ ///
+ /// Restituisce status di AUTOmatico, hard coded
+ ///
+ protected bool Auto
+ {
+ get
+ {
+ return testCondition("WorkBitCond");
+#if false
+ bool answ = false;
+ int currStatus = 0;
+ // hard coded
+ int statusReg = 40002;
+ int[] listInt = new int[2];
+ listInt = HoldingRegisterLUT[statusReg];
+ currStatus = ModbusClient.ConvertRegistersToInt(listInt);
+ // hard coded il 5° bit
+ answ = ((currStatus & (1 << 14)) > 0);
+ return answ;
+#endif
+ }
+ }
+
+ ///
+ /// Restituisce status di ESTOP triggered (triggered = premuta, altrimenti armed)
+ ///
+ protected bool EStopTriggered
+ {
+ get
+ {
+ return testCondition("EStopBitCond");
+ }
+ }
+
+ ///
+ /// Restituisce status di LAVORA, hard coded
+ ///
+ protected bool Work
+ {
+ get
+ {
+ return testCondition("WorkBitCond");
+#if false
+
+ bool answ = false;
+ int currStatus = 0;
+ // hard coded
+ int statusReg = 40002;
+ int[] listInt = new int[2];
+ listInt = HoldingRegisterLUT[statusReg];
+ currStatus = ModbusClient.ConvertRegistersToInt(listInt);
+ // hard coded il 5° bit
+ answ = ((currStatus & (1 << 0)) > 0);
+ return answ;
+#endif
+ }
+ }
+
+ #endregion Protected Properties
+
+ #region Protected Methods
+
+ ///
+ /// Effettua decodifica aree memoria alla bitmap usata x MAPO
+ ///
+ protected override void decodeToBaseBitmap()
+ {
+ // init a zero...
+ B_input = 0;
+
+ /* -----------------------------------------------------
+ * bitmap MAPO STANDARD 60
+ * B0: POWER_ON
+ * B1: RUN
+ * B2: pzCount
+ * B3: allarme
+ * B4: manuale
+ * B5: slowTC
+ * B6: WarmUpCoolDown
+ * B7: EmergArmata
+ *
+ ----------------------------------------------------- */
+
+ var MemInt = new byte[2];
+
+ int byteSignals = 0;
+ // bit 0 (poweron) imposto a 1 SE connected...
+ if (currPLC.Connected)
+ {
+ byteSignals += (1 << 0);
+ }
+ if (HoldingRegisterLUT != null && HoldingRegisterLUT.Count > 0)
+ {
+ // se emergenza NON premuta (triggered) indico OK (armata...)
+ if (!EStopTriggered)
+ {
+ byteSignals += (1 << 7);
+ }
+
+ // processo dagli stati + gravi...
+ if (hasAlarms())
+ {
+ byteSignals += (1 << 3);
+ }
+ if (Work)
+ {
+ byteSignals += (1 << 1);
+ }
+ if (!Auto)
+ {
+ byteSignals += (1 << 4);
+ }
+ }
+ else
+ {
+ lgInfo("HoldingRegisterLUT vuoto!");
+ }
+
+ // salvo!
+ B_input = byteSignals;
+ }
+
+ #endregion Protected Methods
+
+ #region Private Methods
+
+ ///
+ /// Testa la condition modbus da LUT + configurazione
+ ///
+ ///
+ ///
+ private bool testCondition(string cKey)
+ {
+ bool answ = false;
+ if (OptCheckCondBit.ContainsKey(cKey))
+ {
+ int currStatus = 0;
+ int[] listInt = new int[2];
+ listInt = HoldingRegisterLUT[OptCheckCondBit[cKey].BaseAddr];
+ currStatus = ModbusClient.ConvertRegistersToInt(listInt);
+ // hard coded il 9° bit a zero
+ answ = ((currStatus & (1 << OptCheckCondBit[cKey].BitNum)) == OptCheckCondBit[cKey].ValOk);
+ lgTrace($"testCondition for {cKey} | BaseAddr: {OptCheckCondBit[cKey].BaseAddr} | BitNum: {OptCheckCondBit[cKey].BitNum} | ValOk: {OptCheckCondBit[cKey].ValOk}");
+ }
+ else
+ {
+ lgTrace($"testCondition error: {cKey} not found");
+ }
+ return answ;
+ }
+
+ #endregion Private Methods
+ }
+}
\ No newline at end of file
diff --git a/IOB-WIN-MBUS/IobModbustTCP/ModbusTCPRimor.cs b/IOB-WIN-MBUS/IobModbustTCP/ModbusTCPRimor.cs
new file mode 100644
index 00000000..b5946683
--- /dev/null
+++ b/IOB-WIN-MBUS/IobModbustTCP/ModbusTCPRimor.cs
@@ -0,0 +1,246 @@
+using IOB_UT_NEXT;
+using System;
+
+namespace IOB_WIN_MBUS.IobModbusTCP
+{
+ /* --------------------------------------------------------------------------------
+ * Controlli ModBusTCP Rimor
+ * - protocollo ModBus TCP
+ * - specifico comportamento sabbiatura e ossitaglio x IMI Remosa
+ * - gestione stato
+ * - gestione allarmi
+ * - gestione parametri (ore/minuti funzionamento)
+ *
+ * G:\Drive condivisi\30_Clienti\IMI-Remosa\Richieste nuove integrazioni\RIMOR
+ *
+ * -------------------------------------------------------------------------------- */
+
+ public class ModbusTCPRimor : ModbusTCP
+ {
+ #region Public Constructors
+
+ ///
+ /// Classe base con i metodi x ModBusTCP
+ ///
+ ///
+ ///
+ public ModbusTCPRimor(AdapterFormNext caller, IobConfiguration IOBConf) : base(caller, IOBConf)
+ {
+ lgInfo("NEW IOB ModBus TCP Rimor");
+
+ // provo lettura una prima volta i dati DYN
+ if (currPLC != null && currPLC.Connected)
+ {
+ try
+ {
+ processDynData();
+ if (EnableTest)
+ {
+ processDataSync();
+ testReadExt();
+ }
+ }
+ catch (Exception exc)
+ {
+ lgError($"Eccezione in processDynData iniziale x ModBus TCP Rimor:{Environment.NewLine}{exc}");
+ }
+ }
+ }
+
+ #endregion Public Constructors
+
+ #region Protected Properties
+
+ ///
+ /// Restituisce controllo IN ALLARME
+ ///
+ protected bool AlarmState
+ {
+ get
+ {
+ bool answ = false;
+ if (memMap.optMemPar.ContainsKey("AlarmBitCond"))
+ {
+ answ = testDisInBitCondition("AlarmBitCond");
+ }
+ else if (memMap.optMemPar.ContainsKey("AlarmIntCond"))
+ {
+ answ = testIntCondition("AlarmIntCond");
+ }
+ return answ;
+ }
+ }
+
+ ///
+ /// Restituisce status di END ORDINE (chiusura ODL se aperto) HARD coded
+ ///
+ protected bool EndOrderState
+ {
+ get
+ {
+ bool answ = false;
+ if (memMap.optMemPar.ContainsKey("EndOrdBitCond"))
+ {
+ answ = testDisInBitCondition("EndOrdBitCond");
+ }
+ else if (memMap.optMemPar.ContainsKey("EndOrdIntCond"))
+ {
+ answ = testIntCondition("EndOrdIntCond");
+ }
+ return answ;
+ }
+ }
+
+ ///
+ /// Restituisce status di ESTOP triggered (triggered = premuta, altrimenti armed)
+ ///
+ protected bool EStopTriggered
+ {
+ get
+ {
+ bool answ = false;
+ if (memMap.optMemPar.ContainsKey("EStopBitCond"))
+ {
+ answ = testDisInBitCondition("EStopBitCond");
+ }
+ else if (memMap.optMemPar.ContainsKey("EStopIntCond"))
+ {
+ answ = testIntCondition("EStopIntCond");
+ }
+ return answ;
+ }
+ }
+
+ ///
+ /// Restituisce status di Manuale, hard coded
+ ///
+ protected bool ManualState
+ {
+ get
+ {
+ bool answ = false;
+ if (memMap.optMemPar.ContainsKey("ManualBitCond"))
+ {
+ answ = testDisInBitCondition("ManualBitCond");
+ }
+ else if (memMap.optMemPar.ContainsKey("ManualIntCond"))
+ {
+ answ = testIntCondition("ManualIntCond");
+ }
+ return answ;
+ }
+ }
+
+ ///
+ /// Restituisce status di WORK (auto + lavora), hard coded
+ ///
+ protected bool WorkState
+ {
+ get
+ {
+ bool answ = false;
+ if (memMap.optMemPar.ContainsKey("WorkBitCond"))
+ {
+ answ = testDisInBitCondition("WorkBitCond");
+ }
+ else if (memMap.optMemPar.ContainsKey("WorkIntCond"))
+ {
+ answ = testIntCondition("WorkIntCond");
+ }
+ return answ;
+ }
+ }
+
+ #endregion Protected Properties
+
+ #region Protected Methods
+
+ ///
+ /// Effettua decodifica aree memoria alla bitmap usata x MAPO
+ ///
+ protected override void decodeToBaseBitmap()
+ {
+ // init a zero...
+ B_input = 0;
+
+ /* -----------------------------------------------------
+ * bitmap MAPO STANDARD 60
+ * B0: POWER_ON
+ * B1: RUN
+ * B2: pzCount
+ * B3: allarme
+ * B4: manuale
+ * B5: slowTC
+ * B6: WarmUpCoolDown
+ * B7: EmergArmata
+ *
+ ----------------------------------------------------- */
+
+ var MemInt = new byte[2];
+
+ int byteSignals = 0;
+ // bit 0 (poweron) imposto a 1 SE connected...
+ if (currPLC.Connected)
+ {
+ byteSignals += (1 << 0);
+ }
+ // se ho qualcosa nella holding register...
+ if (HoldingRegisterLUT != null && HoldingRegisterLUT.Count > 0)
+ {
+ // se emergenza NON premuta (triggered) indico OK (armata...) FARE !!! togliere true
+ //if (!EStopTriggered)
+ if (true)
+ {
+ byteSignals += (1 << 7);
+ }
+
+ // impiego controlli da setup IntConditions... processo dagli stati + gravi...
+ if (AlarmState || hasAlarms())
+ {
+ byteSignals += (1 << 3);
+ }
+ else if (ManualState)
+ {
+ byteSignals += (1 << 4);
+ }
+ else if (WorkState)
+ {
+ byteSignals += (1 << 1);
+ }
+
+ // controllo SE avesse ODL attivo ma fosse in condizione end ordine --> mando
+ // chiusura ODL
+ if (currIdxODL > 0)
+ {
+ if (EndOrderState)
+ {
+ // invio chiusura ODL
+ tryCloseCurrODL();
+ }
+ }
+ }
+ else
+ {
+ lgInfo("HoldingRegisterLUT vuoto!");
+ }
+
+ // salvo!
+ B_input = byteSignals;
+ }
+
+ ///
+ /// Effettua sync dati
+ ///
+ protected override void processDataSync()
+ {
+ // richiesta check autoODL
+ processAutoOdl();
+ // richiesta generazione quotidiana dossiers
+ processAutoDossier();
+ // effettua gestione import file...
+ processFileImport();
+ }
+
+ #endregion Protected Methods
+ }
+}
\ No newline at end of file
diff --git a/IOB-WIN-MBUS/IobModbustTCP/ModbusTCPSaim.cs b/IOB-WIN-MBUS/IobModbustTCP/ModbusTCPSaim.cs
new file mode 100644
index 00000000..12c9b744
--- /dev/null
+++ b/IOB-WIN-MBUS/IobModbustTCP/ModbusTCPSaim.cs
@@ -0,0 +1,196 @@
+using IOB_UT_NEXT;
+using System;
+
+namespace IOB_WIN_MBUS.IobModbusTCP
+{
+ /* --------------------------------------------------------------------------------
+ * Controlli ModBusTCP SAIM
+ * - protocollo ModBus TCP
+ * - specifico comportamento impianti sanificazione ad ozono SAIM (Giacovelli)
+ * - gestione allarmi
+ *
+ * STRUTTURA MEMORIA a banchi di UInt16, convertiti successivamente in int EVENTUALMENTE divisi per 10/100/1000
+ * G:\Drive condivisi\30_Clienti\Giacovelli - WIL\SAIM
+ *
+ * -------------------------------------------------------------------------------- */
+
+ public class ModbusTCPSaim : ModbusTCP
+ {
+ #region Public Constructors
+
+ ///
+ /// Classe base con i metodi x ModBusTCP
+ ///
+ ///
+ ///
+ public ModbusTCPSaim(AdapterFormNext caller, IobConfiguration IOBConf) : base(caller, IOBConf)
+ {
+ lgInfo("NEW IOB ModBus TCP Saim");
+
+ // provo lettura una prima volta i dati DYN
+ if (currPLC != null && currPLC.Connected)
+ {
+ try
+ {
+ processDynData();
+ if (EnableTest)
+ {
+ processDataSync();
+ testReadExt();
+ }
+ }
+ catch (Exception exc)
+ {
+ lgError($"Eccezione in processDynData iniziale x ModBus TCP SAIM:{Environment.NewLine}{exc}");
+ }
+ }
+ }
+
+ #endregion Public Constructors
+
+ #region Protected Properties
+
+ ///
+ /// Restituisce controllo IN ALLARME
+ ///
+ protected bool AlarmState
+ {
+ get
+ {
+ return testDisInBitCondition("AlarmBitCond");
+ }
+ }
+
+ ///
+ /// Restituisce status di ESTOP triggered (triggered = premuta, altrimenti armed)
+ ///
+ protected bool EStopTriggered
+ {
+ get
+ {
+ return testDisInBitCondition("EStopBitCond");
+ }
+ }
+
+ ///
+ /// Restituisce status di Manuale, hard coded
+ ///
+ protected bool ManualState
+ {
+ get
+ {
+ return testDisInBitCondition("ManualBitCond");
+ }
+ }
+
+ ///
+ /// Restituisce status di LAVORA, hard coded
+ ///
+ protected bool Work
+ {
+ get
+ {
+ return testDisInBitCondition("WorkBitCond");
+ }
+ }
+
+ ///
+ /// Restituisce status di WORK (auto + lavora), hard coded
+ ///
+ protected bool WorkState
+ {
+ get
+ {
+ return testDisInBitCondition("WorkBitCond");
+ }
+ }
+
+ #endregion Protected Properties
+
+ #region Protected Methods
+
+ ///
+ /// Effettua decodifica aree memoria alla bitmap usata x MAPO
+ ///
+ protected override void decodeToBaseBitmap()
+ {
+ // init a zero...
+ B_input = 0;
+
+ /* -----------------------------------------------------
+ * bitmap MAPO STANDARD 60
+ * B0: POWER_ON
+ * B1: RUN
+ * B2: pzCount
+ * B3: allarme
+ * B4: manuale
+ * B5: slowTC
+ * B6: WarmUpCoolDown
+ * B7: EmergArmata
+ *
+ ----------------------------------------------------- */
+
+ var MemInt = new byte[2];
+
+ int byteSignals = 0;
+ // bit 0 (poweron) imposto a 1 SE connected...
+ if (currPLC.Connected)
+ {
+ byteSignals += (1 << 0);
+ }
+ // se ho qualcosa nella holding register...
+ if (HoldingRegisterLUT != null && HoldingRegisterLUT.Count > 0)
+ {
+ // se emergenza NON premuta (triggered) indico OK (armata...) FARE !!! togliere true
+ //if (!EStopTriggered)
+ if (true)
+ {
+ byteSignals += (1 << 7);
+ }
+
+ // impiego controlli da setup IntConditions... processo dagli stati + gravi...
+ if (AlarmState || hasAlarms())
+ {
+ byteSignals += (1 << 3);
+ }
+ else if (ManualState)
+ {
+ byteSignals += (1 << 4);
+ }
+ else if (WorkState)
+ {
+ byteSignals += (1 << 1);
+ }
+ }
+ else
+ {
+ lgInfo("HoldingRegisterLUT vuoto!");
+ }
+
+ // salvo!
+ B_input = byteSignals;
+ }
+
+ ///
+ /// Effettua sync dati
+ ///
+ protected override void processDataSync()
+ {
+ // richiesta check autoODL
+ processAutoOdl();
+ // richiesta generazione quotidiana dossiers
+ processAutoDossier();
+ try
+ {
+ // effettua gestione import file...
+ processFileImport();
+ }
+ catch (Exception exc)
+ {
+ lgError($"Eccezione in processFileImport{Environment.NewLine}{exc}");
+ }
+ }
+
+ #endregion Protected Methods
+ }
+}
\ No newline at end of file
diff --git a/IOB-WIN-MBUS/IobModbustTCP/ModbusTCPZetapack.cs b/IOB-WIN-MBUS/IobModbustTCP/ModbusTCPZetapack.cs
new file mode 100644
index 00000000..19a667ee
--- /dev/null
+++ b/IOB-WIN-MBUS/IobModbustTCP/ModbusTCPZetapack.cs
@@ -0,0 +1,171 @@
+using IOB_UT_NEXT;
+using System;
+
+namespace IOB_WIN_MBUS.IobModbusTCP
+{
+ /* --------------------------------------------------------------------------------
+ * Controlli ModBusTCP Zetapack
+ * - protocollo ModBus TCP
+ * - specifico comportamento impianti imballaggio Zetapack (Giacovelli)
+ * - gestione allarmi
+ *
+ * STRUTTURA MEMORIA a banchi di UInt16, convertiti successivamente in int EVENTUALMENTE divisi per 10/100/1000
+ * G:\Drive condivisi\30_Clienti\Giacovelli - WIL\Zetapack PLC
+ *
+ * -------------------------------------------------------------------------------- */
+
+ public class ModbusTCPZetapack : ModbusTCP
+ {
+ #region Public Constructors
+
+ ///
+ /// Classe base con i metodi x ModBusTCP
+ ///
+ ///
+ ///
+ public ModbusTCPZetapack(AdapterFormNext caller, IobConfiguration IOBConf) : base(caller, IOBConf)
+ {
+ lgInfo("NEW IOB ModBus TCP Zetapack");
+
+ // provo lettura una prima volta i dati DYN
+ if (currPLC != null && currPLC.Connected)
+ {
+ try
+ {
+ processDynData();
+ }
+ catch (Exception exc)
+ {
+ lgError($"Eccezione in processDynData iniziale x ModBus TCP Zetapack:{Environment.NewLine}{exc}");
+ }
+ }
+ }
+
+ #endregion Public Constructors
+
+ #region Protected Properties
+
+ ///
+ /// Restituisce controllo IN ALLARME
+ ///
+ protected bool AlarmState
+ {
+ get
+ {
+ return testIntCondition("AlarmIntCond");
+ }
+ }
+
+ ///
+ /// Restituisce status di ESTOP triggered (triggered = premuta, altrimenti armed)
+ ///
+ protected bool EStopTriggered
+ {
+ get
+ {
+ return testBitCondition("EStopBitCond");
+ }
+ }
+
+ ///
+ /// Restituisce status di Manuale, hard coded
+ ///
+ protected bool ManualState
+ {
+ get
+ {
+ return testIntCondition("ManualIntCond");
+ }
+ }
+
+ ///
+ /// Restituisce status di LAVORA, hard coded
+ ///
+ protected bool Work
+ {
+ get
+ {
+ return testIntCondition("WorkIntCond");
+ }
+ }
+
+ ///
+ /// Restituisce status di WORK (auto + lavora), hard coded
+ ///
+ protected bool WorkState
+ {
+ get
+ {
+ return testIntCondition("WorkIntCond");
+ }
+ }
+
+ #endregion Protected Properties
+
+ #region Protected Methods
+
+ ///
+ /// Effettua decodifica aree memoria alla bitmap usata x MAPO
+ ///
+ protected override void decodeToBaseBitmap()
+ {
+ // init a zero...
+ B_input = 0;
+
+ /* -----------------------------------------------------
+ * bitmap MAPO STANDARD 60
+ * B0: POWER_ON
+ * B1: RUN
+ * B2: pzCount
+ * B3: allarme
+ * B4: manuale
+ * B5: slowTC
+ * B6: WarmUpCoolDown
+ * B7: EmergArmata
+ *
+ ----------------------------------------------------- */
+
+ var MemInt = new byte[2];
+
+ int byteSignals = 0;
+ // bit 0 (poweron) imposto a 1 SE connected...
+ if (currPLC.Connected)
+ {
+ byteSignals += (1 << 0);
+ }
+ // se ho qualcosa nella holding register...
+ if (HoldingRegisterLUT != null && HoldingRegisterLUT.Count > 0)
+ {
+ // se emergenza NON premuta (triggered) indico OK (armata...) FARE !!! togliere true
+ //if (!EStopTriggered)
+ if (true)
+ {
+ byteSignals += (1 << 7);
+ }
+
+ // impiego controlli da setup IntConditions... processo dagli stati + gravi...
+ if (AlarmState || hasAlarms())
+ {
+ byteSignals += (1 << 3);
+ }
+ else if (ManualState)
+ {
+ byteSignals += (1 << 4);
+ }
+ else if (WorkState)
+ {
+ byteSignals += (1 << 1);
+ }
+ }
+ else
+ {
+ lgInfo("HoldingRegisterLUT vuoto!");
+ }
+
+ // salvo!
+ B_input = byteSignals;
+ }
+
+ #endregion Protected Methods
+ }
+}
\ No newline at end of file
diff --git a/IOB-WIN-MBUS/MainFormNext.cs b/IOB-WIN-MBUS/MainFormNext.cs
index 422d8335..53621b4f 100644
--- a/IOB-WIN-MBUS/MainFormNext.cs
+++ b/IOB-WIN-MBUS/MainFormNext.cs
@@ -1,12 +1,12 @@
using IOB_UT_NEXT;
-using IOB_WIN_PING.Iob;
+using IOB_WIN_MBUS.Iob;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
-namespace IOB_WIN_PING
+namespace IOB_WIN_MBUS
{
public class MainFormNext : IOB_WIN_FORM.MainForm
{
diff --git a/IOB-WIN-MBUS/Program.cs b/IOB-WIN-MBUS/Program.cs
index 5671848f..78308bc8 100644
--- a/IOB-WIN-MBUS/Program.cs
+++ b/IOB-WIN-MBUS/Program.cs
@@ -1,7 +1,7 @@
using System;
using System.Windows.Forms;
-namespace IOB_WIN_PING
+namespace IOB_WIN_MBUS
{
internal static class Program
{
diff --git a/IOB-WIN-MBUS/Properties/AssemblyInfo.cs b/IOB-WIN-MBUS/Properties/AssemblyInfo.cs
index 8f5a1a70..c0c478b3 100644
--- a/IOB-WIN-MBUS/Properties/AssemblyInfo.cs
+++ b/IOB-WIN-MBUS/Properties/AssemblyInfo.cs
@@ -5,10 +5,10 @@ using System.Runtime.InteropServices;
// General Information about an assembly is controlled through the following
// set of attributes. Change these attribute values to modify the information
// associated with an assembly.
-[assembly: AssemblyTitle("IOB-WIN-MTC")]
+[assembly: AssemblyTitle("IOB-WIN-MBUS")]
[assembly: AssemblyDescription("")]
[assembly: AssemblyConfiguration("")]
-[assembly: AssemblyProduct("IOB-WIN-MTC")]
+[assembly: AssemblyProduct("IOB-WIN-MBUS")]
[assembly: AssemblyTrademark("")]
[assembly: AssemblyCulture("")]
@@ -18,5 +18,4 @@ using System.Runtime.InteropServices;
[assembly: ComVisible(false)]
// The following GUID is for the ID of the typelib if this project is exposed to COM
-[assembly: Guid("eebe38bd-29ee-45de-9af4-8fa34b58d8ba")]
-
+[assembly: Guid("8a4954b2-1492-4cef-8f6c-619e397718cf")]
diff --git a/IOB-WIN-MBUS/Properties/Resources.Designer.cs b/IOB-WIN-MBUS/Properties/Resources.Designer.cs
index 0f013ea4..711619f6 100644
--- a/IOB-WIN-MBUS/Properties/Resources.Designer.cs
+++ b/IOB-WIN-MBUS/Properties/Resources.Designer.cs
@@ -8,7 +8,7 @@
//
//------------------------------------------------------------------------------
-namespace IOB_WIN_MTC.Properties
+namespace IOB_WIN_MBUS.Properties
{
@@ -44,7 +44,7 @@ namespace IOB_WIN_MTC.Properties
{
if ((resourceMan == null))
{
- global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("IOB_WIN_MTC.Properties.Resources", typeof(Resources).Assembly);
+ global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("IOB_WIN_MBUS.Properties.Resources", typeof(Resources).Assembly);
resourceMan = temp;
}
return resourceMan;
diff --git a/IOB-WIN-MBUS/Properties/Settings.Designer.cs b/IOB-WIN-MBUS/Properties/Settings.Designer.cs
index 894a7528..9a350d02 100644
--- a/IOB-WIN-MBUS/Properties/Settings.Designer.cs
+++ b/IOB-WIN-MBUS/Properties/Settings.Designer.cs
@@ -8,7 +8,7 @@
//
//------------------------------------------------------------------------------
-namespace IOB_WIN_MTC.Properties
+namespace IOB_WIN_MBUS.Properties
{
diff --git a/IOB-WIN-MBUS/connParamModBusTCP.cs b/IOB-WIN-MBUS/connParamModBusTCP.cs
new file mode 100644
index 00000000..f4cd7e9c
--- /dev/null
+++ b/IOB-WIN-MBUS/connParamModBusTCP.cs
@@ -0,0 +1,64 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+
+namespace IOB_WIN_MBUS
+{
+ ///
+ /// Implementazione classe connessione ModBus TCP,
+ /// comprensiva dei parametri delle aree di memoria
+ ///
+ public class connParamModBusTCP
+ {
+ #region Public Fields
+
+ ///
+ /// Indirizzo di base degli Holding Register
+ ///
+ public int holdRegBaseAddr = 40001;
+
+ ///
+ /// Indirizzo IP del PLC
+ ///
+ public string ipAdrr = "";
+
+ ///
+ /// Base area x lettura
+ ///
+ public string memAddrRead = "";
+
+ ///
+ /// Base area x scrittura
+ ///
+ public string memAddrWrite = "";
+
+ ///
+ /// Size memoria lettura
+ ///
+ public int memSizeRead = 0;
+
+ ///
+ /// Size memoria scrittura
+ ///
+ public int memSizeWrite = 0;
+
+ ///
+ /// Timeout ping
+ ///
+ public int pingMsTimeout = 250;
+
+ ///
+ /// Porta di comunicazione
+ ///
+ public int port;
+
+ ///
+ /// Indica se usare baseAddress calcolati o da config
+ ///
+ public bool useCalcBaseAddr = true;
+
+ #endregion Public Fields
+ }
+}
\ No newline at end of file
diff --git a/IOB-WIN-MBUS/packages.config b/IOB-WIN-MBUS/packages.config
index bc12d868..58de7159 100644
--- a/IOB-WIN-MBUS/packages.config
+++ b/IOB-WIN-MBUS/packages.config
@@ -1,20 +1,24 @@
+
-
-
+
+
+
-
-
+
+
+
+
-
-
-
-
+
+
+
+
-
-
+
+
\ No newline at end of file
diff --git a/IOB-WIN-NEXT/AdapterFormNext.cs b/IOB-WIN-NEXT/AdapterFormNext.cs
index 3f446aa1..20f9af6c 100644
--- a/IOB-WIN-NEXT/AdapterFormNext.cs
+++ b/IOB-WIN-NEXT/AdapterFormNext.cs
@@ -89,6 +89,7 @@ namespace IOB_WIN_NEXT
btnStart.Enabled = true;
break;
+#if false
case tipoAdapter.MODBUS_TCP:
iobObj = new IobModbusTCP.ModbusTCP(this, IOBConf);
btnStart.Enabled = true;
@@ -137,7 +138,8 @@ namespace IOB_WIN_NEXT
case tipoAdapter.MODBUS_TCP_ZETAPACK:
iobObj = new IobModbusTCP.ModbusTCPZetapack(this, IOBConf);
btnStart.Enabled = true;
- break;
+ break;
+#endif
case tipoAdapter.OMRON:
iobObj = new Iob.Omron(this, IOBConf);
diff --git a/IOB-WIN-NEXT/IOB-WIN-NEXT.csproj b/IOB-WIN-NEXT/IOB-WIN-NEXT.csproj
index 0e55dab8..6910a93b 100644
--- a/IOB-WIN-NEXT/IOB-WIN-NEXT.csproj
+++ b/IOB-WIN-NEXT/IOB-WIN-NEXT.csproj
@@ -416,14 +416,6 @@
-
-
-
-
-
-
-
-
@@ -433,8 +425,6 @@
-
-
@@ -453,7 +443,7 @@
-
+
@@ -470,7 +460,6 @@
-
@@ -504,28 +493,6 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
@@ -535,35 +502,6 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
@@ -574,32 +512,12 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
@@ -673,24 +591,12 @@
-
-
-
-
-
-
-
-
-
-
-
-
@@ -842,6 +748,7 @@
+
diff --git a/IOB-WIN-NEXT/specialConfig.cs b/IOB-WIN-NEXT/connParamS7.cs
similarity index 99%
rename from IOB-WIN-NEXT/specialConfig.cs
rename to IOB-WIN-NEXT/connParamS7.cs
index 0327121e..05a3deb8 100644
--- a/IOB-WIN-NEXT/specialConfig.cs
+++ b/IOB-WIN-NEXT/connParamS7.cs
@@ -2,6 +2,7 @@
namespace IOB_WIN_NEXT
{
+#if false
///
/// Implementazione classe connessione ModBus TCP,
/// comprensiva dei parametri delle aree di memoria
@@ -56,7 +57,8 @@ namespace IOB_WIN_NEXT
public int port;
#endregion Public Fields
- }
+ }
+#endif
///
/// Implementazione classe connessione SIEMENS con S7.net, comprensiva dei parametri delle aree
diff --git a/IOB-WIN-OPC-UA/DATA/CONF/MAIN.ini b/IOB-WIN-OPC-UA/DATA/CONF/MAIN.ini
index cdcdc38e..b32b160f 100644
--- a/IOB-WIN-OPC-UA/DATA/CONF/MAIN.ini
+++ b/IOB-WIN-OPC-UA/DATA/CONF/MAIN.ini
@@ -22,6 +22,7 @@ CLI_INST=SteamWareSim
;STARTLIST=Tend_RAMA_10_47
;STARTLIST=SIMUL_01
;STARTLIST=2014
-STARTLIST=3026
+;STARTLIST=3026
+STARTLIST=2015
MAXCNC=10
\ No newline at end of file
diff --git a/IOB-WIN-OPC-UA/IOB-WIN-OPC-UA.csproj b/IOB-WIN-OPC-UA/IOB-WIN-OPC-UA.csproj
index c0ce9287..a77f7ab5 100644
--- a/IOB-WIN-OPC-UA/IOB-WIN-OPC-UA.csproj
+++ b/IOB-WIN-OPC-UA/IOB-WIN-OPC-UA.csproj
@@ -196,14 +196,14 @@
-
-
-
+
Always
-
+
Always
+
+
diff --git a/IOB-WIN-OPC-UA/postBuildTgt.bat b/IOB-WIN-OPC-UA/postBuildTgt.bat
index 60470a8b..bc5723d1 100644
--- a/IOB-WIN-OPC-UA/postBuildTgt.bat
+++ b/IOB-WIN-OPC-UA/postBuildTgt.bat
@@ -88,8 +88,8 @@ REM IOBVPN4MACHINE
REM ROBOCOPY %2 \\10.51.90.5\Steamware\IOB-WIN-OPC-UA-DEB /MIR
REM ROBOCOPY %2 \\10.51.90.5\Steamware\IOB-WIN-OPC-UA-DEB /MIR /log:RobocopyTransfer.log
REM ROBOCOPY %2 Z:\IOB-WIN-OPC-UA-DEB /MIR
-REM ROBOCOPY %2 \\10.51.90.10\Steamware\IOB-WIN-OPC-UA-DEB /MIR
-ROBOCOPY %2 \\10.51.90.9\Steamware\IOB-WIN-OPC-UA-DEB /MIR
+ROBOCOPY %2 \\10.51.90.10\Steamware\IOB-WIN-OPC-UA-DEB /MIR
+REM ROBOCOPY %2 \\10.51.90.9\Steamware\IOB-WIN-OPC-UA-DEB /MIR
goto END
diff --git a/IOB-WIN-SIEMENS.sln b/IOB-WIN-SIEMENS.sln
new file mode 100644
index 00000000..221674f9
--- /dev/null
+++ b/IOB-WIN-SIEMENS.sln
@@ -0,0 +1,83 @@
+
+Microsoft Visual Studio Solution File, Format Version 12.00
+# Visual Studio Version 17
+VisualStudioVersion = 17.2.32505.173
+MinimumVisualStudioVersion = 10.0.40219.1
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "VersGen", "VersGen\VersGen.csproj", "{58E399F3-9D4E-49D3-AB35-9ED536543D50}"
+EndProject
+Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution Items", "{B52E3E86-1B82-4F4D-982C-0C8909CD2A28}"
+ ProjectSection(SolutionItems) = preProject
+ .editorconfig = .editorconfig
+ EndProjectSection
+EndProject
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "IOB-UT-NEXT", "IOB-UT-NEXT\IOB-UT-NEXT.csproj", "{90512E12-29FC-460D-94CC-648C2A072DBD}"
+EndProject
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "IOB-WIN-FORM", "IOB-WIN-FORM\IOB-WIN-FORM.csproj", "{9BA331BB-9BF1-40E0-AC03-74B43D73A097}"
+EndProject
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "IOB-WIN-PING", "IOB-WIN-PING\IOB-WIN-PING.csproj", "{6ADF1E82-124C-489C-99EF-A857C933D362}"
+EndProject
+Global
+ GlobalSection(SolutionConfigurationPlatforms) = preSolution
+ Debug|Any CPU = Debug|Any CPU
+ Debug|x86 = Debug|x86
+ Release|Any CPU = Release|Any CPU
+ Release|x86 = Release|x86
+ Remote_DEBUG|Any CPU = Remote_DEBUG|Any CPU
+ Remote_DEBUG|x86 = Remote_DEBUG|x86
+ EndGlobalSection
+ GlobalSection(ProjectConfigurationPlatforms) = postSolution
+ {58E399F3-9D4E-49D3-AB35-9ED536543D50}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {58E399F3-9D4E-49D3-AB35-9ED536543D50}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {58E399F3-9D4E-49D3-AB35-9ED536543D50}.Debug|x86.ActiveCfg = Debug|Any CPU
+ {58E399F3-9D4E-49D3-AB35-9ED536543D50}.Debug|x86.Build.0 = Debug|Any CPU
+ {58E399F3-9D4E-49D3-AB35-9ED536543D50}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {58E399F3-9D4E-49D3-AB35-9ED536543D50}.Release|Any CPU.Build.0 = Release|Any CPU
+ {58E399F3-9D4E-49D3-AB35-9ED536543D50}.Release|x86.ActiveCfg = Release|x86
+ {58E399F3-9D4E-49D3-AB35-9ED536543D50}.Release|x86.Build.0 = Release|x86
+ {58E399F3-9D4E-49D3-AB35-9ED536543D50}.Remote_DEBUG|Any CPU.ActiveCfg = Debug|Any CPU
+ {58E399F3-9D4E-49D3-AB35-9ED536543D50}.Remote_DEBUG|Any CPU.Build.0 = Debug|Any CPU
+ {58E399F3-9D4E-49D3-AB35-9ED536543D50}.Remote_DEBUG|x86.ActiveCfg = Remote_DEBUG|x86
+ {58E399F3-9D4E-49D3-AB35-9ED536543D50}.Remote_DEBUG|x86.Build.0 = Remote_DEBUG|x86
+ {90512E12-29FC-460D-94CC-648C2A072DBD}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {90512E12-29FC-460D-94CC-648C2A072DBD}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {90512E12-29FC-460D-94CC-648C2A072DBD}.Debug|x86.ActiveCfg = Debug|x86
+ {90512E12-29FC-460D-94CC-648C2A072DBD}.Debug|x86.Build.0 = Debug|x86
+ {90512E12-29FC-460D-94CC-648C2A072DBD}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {90512E12-29FC-460D-94CC-648C2A072DBD}.Release|Any CPU.Build.0 = Release|Any CPU
+ {90512E12-29FC-460D-94CC-648C2A072DBD}.Release|x86.ActiveCfg = Release|x86
+ {90512E12-29FC-460D-94CC-648C2A072DBD}.Release|x86.Build.0 = Release|x86
+ {90512E12-29FC-460D-94CC-648C2A072DBD}.Remote_DEBUG|Any CPU.ActiveCfg = Debug|Any CPU
+ {90512E12-29FC-460D-94CC-648C2A072DBD}.Remote_DEBUG|Any CPU.Build.0 = Debug|Any CPU
+ {90512E12-29FC-460D-94CC-648C2A072DBD}.Remote_DEBUG|x86.ActiveCfg = Release|x86
+ {9BA331BB-9BF1-40E0-AC03-74B43D73A097}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {9BA331BB-9BF1-40E0-AC03-74B43D73A097}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {9BA331BB-9BF1-40E0-AC03-74B43D73A097}.Debug|x86.ActiveCfg = Debug|Any CPU
+ {9BA331BB-9BF1-40E0-AC03-74B43D73A097}.Debug|x86.Build.0 = Debug|Any CPU
+ {9BA331BB-9BF1-40E0-AC03-74B43D73A097}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {9BA331BB-9BF1-40E0-AC03-74B43D73A097}.Release|Any CPU.Build.0 = Release|Any CPU
+ {9BA331BB-9BF1-40E0-AC03-74B43D73A097}.Release|x86.ActiveCfg = Release|Any CPU
+ {9BA331BB-9BF1-40E0-AC03-74B43D73A097}.Release|x86.Build.0 = Release|Any CPU
+ {9BA331BB-9BF1-40E0-AC03-74B43D73A097}.Remote_DEBUG|Any CPU.ActiveCfg = Debug|Any CPU
+ {9BA331BB-9BF1-40E0-AC03-74B43D73A097}.Remote_DEBUG|Any CPU.Build.0 = Debug|Any CPU
+ {9BA331BB-9BF1-40E0-AC03-74B43D73A097}.Remote_DEBUG|x86.ActiveCfg = Release|Any CPU
+ {9BA331BB-9BF1-40E0-AC03-74B43D73A097}.Remote_DEBUG|x86.Build.0 = Release|Any CPU
+ {6ADF1E82-124C-489C-99EF-A857C933D362}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {6ADF1E82-124C-489C-99EF-A857C933D362}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {6ADF1E82-124C-489C-99EF-A857C933D362}.Debug|x86.ActiveCfg = Debug|Any CPU
+ {6ADF1E82-124C-489C-99EF-A857C933D362}.Debug|x86.Build.0 = Debug|Any CPU
+ {6ADF1E82-124C-489C-99EF-A857C933D362}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {6ADF1E82-124C-489C-99EF-A857C933D362}.Release|Any CPU.Build.0 = Release|Any CPU
+ {6ADF1E82-124C-489C-99EF-A857C933D362}.Release|x86.ActiveCfg = Release|Any CPU
+ {6ADF1E82-124C-489C-99EF-A857C933D362}.Release|x86.Build.0 = Release|Any CPU
+ {6ADF1E82-124C-489C-99EF-A857C933D362}.Remote_DEBUG|Any CPU.ActiveCfg = Release|Any CPU
+ {6ADF1E82-124C-489C-99EF-A857C933D362}.Remote_DEBUG|Any CPU.Build.0 = Release|Any CPU
+ {6ADF1E82-124C-489C-99EF-A857C933D362}.Remote_DEBUG|x86.ActiveCfg = Release|Any CPU
+ {6ADF1E82-124C-489C-99EF-A857C933D362}.Remote_DEBUG|x86.Build.0 = Release|Any CPU
+ EndGlobalSection
+ GlobalSection(SolutionProperties) = preSolution
+ HideSolutionNode = FALSE
+ EndGlobalSection
+ GlobalSection(ExtensibilityGlobals) = postSolution
+ SolutionGuid = {801DCDC5-B7D3-4EA5-B543-783D2C91765F}
+ EndGlobalSection
+EndGlobal