Merge branch 'release/UpdateMBus_01'
This commit is contained in:
@@ -26,6 +26,6 @@ CLI_INST=SteamWareSim
|
||||
;STARTLIST=PIZ04
|
||||
;STARTLIST=4001-ENR
|
||||
;STARTLIST=3029-ENR
|
||||
STARTLIST=3010-ENR
|
||||
STARTLIST=_FRER
|
||||
|
||||
MAXCNC=10
|
||||
@@ -15,7 +15,7 @@ VENDOR=FRER
|
||||
MODEL=MCIMIDETH
|
||||
|
||||
[CNC]
|
||||
IP=192.168.0.999
|
||||
IP=192.168.0.154
|
||||
PORT=502
|
||||
|
||||
[SERVER]
|
||||
@@ -66,16 +66,16 @@ FORCE_DYN_DATA=TRUE
|
||||
DELTA_VAL=0.1
|
||||
|
||||
; clock base (da 10ms)
|
||||
timerIntMs=10
|
||||
timerIntMs=50
|
||||
|
||||
; conf parametri memoria READ/WRITE
|
||||
PARAM_CONF=999999-ENR.json
|
||||
PARAM_CONF=_FRER.json
|
||||
|
||||
NO_PING=FALSE
|
||||
; conf blocchi memoria x READ
|
||||
MEM_BLOCK=999999-ENR_MBlock.json
|
||||
;; conf aree allarme
|
||||
;ALARM_CONF=999999-ENR_alarm.json
|
||||
MEM_BLOCK=_FRER_MBlock.json
|
||||
VETO_SIG_IN=true
|
||||
DISAB_KEEPALIVE=true
|
||||
|
||||
; rimozione check limiti min/max dynData
|
||||
disDynDataRangeCheck=true
|
||||
|
||||
@@ -11,7 +11,7 @@
|
||||
"index": 4096,
|
||||
"size": 2,
|
||||
"func": "MEDIAN",
|
||||
"period": 300,
|
||||
"period": 3600,
|
||||
"factor": 1,
|
||||
"minVal": 0,
|
||||
"maxVal": 500,
|
||||
@@ -25,7 +25,7 @@
|
||||
"index": 4098,
|
||||
"size": 2,
|
||||
"func": "MEDIAN",
|
||||
"period": 300,
|
||||
"period": 3600,
|
||||
"factor": 1,
|
||||
"minVal": 0,
|
||||
"maxVal": 500,
|
||||
@@ -39,7 +39,7 @@
|
||||
"index": 4100,
|
||||
"size": 2,
|
||||
"func": "MEDIAN",
|
||||
"period": 300,
|
||||
"period": 3600,
|
||||
"factor": 1,
|
||||
"minVal": 0,
|
||||
"maxVal": 500,
|
||||
@@ -53,7 +53,7 @@
|
||||
"index": 4102,
|
||||
"size": 2,
|
||||
"func": "MEDIAN",
|
||||
"period": 300,
|
||||
"period": 3600,
|
||||
"factor": 1,
|
||||
"minVal": 0,
|
||||
"maxVal": 500,
|
||||
@@ -67,7 +67,7 @@
|
||||
"index": 4104,
|
||||
"size": 2,
|
||||
"func": "MEDIAN",
|
||||
"period": 300,
|
||||
"period": 3600,
|
||||
"factor": 1,
|
||||
"minVal": 0,
|
||||
"maxVal": 500,
|
||||
@@ -81,7 +81,7 @@
|
||||
"index": 4106,
|
||||
"size": 2,
|
||||
"func": "MEDIAN",
|
||||
"period": 300,
|
||||
"period": 3600,
|
||||
"factor": 1,
|
||||
"minVal": 0,
|
||||
"maxVal": 500,
|
||||
@@ -95,7 +95,7 @@
|
||||
"index": 4108,
|
||||
"size": 2,
|
||||
"func": "MEDIAN",
|
||||
"period": 300,
|
||||
"period": 3600,
|
||||
"factor": 1,
|
||||
"minVal": 0,
|
||||
"maxVal": 500,
|
||||
@@ -109,7 +109,7 @@
|
||||
"index": 4110,
|
||||
"size": 2,
|
||||
"func": "MEDIAN",
|
||||
"period": 300,
|
||||
"period": 3600,
|
||||
"factor": 1,
|
||||
"minVal": 0,
|
||||
"maxVal": 500,
|
||||
@@ -123,7 +123,7 @@
|
||||
"index": 4112,
|
||||
"size": 2,
|
||||
"func": "MEDIAN",
|
||||
"period": 300,
|
||||
"period": 3600,
|
||||
"factor": 1,
|
||||
"minVal": 0,
|
||||
"maxVal": 500,
|
||||
@@ -137,7 +137,7 @@
|
||||
"index": 4114,
|
||||
"size": 2,
|
||||
"func": "MEDIAN",
|
||||
"period": 300,
|
||||
"period": 3600,
|
||||
"factor": 1,
|
||||
"minVal": 0,
|
||||
"maxVal": 500,
|
||||
@@ -151,7 +151,7 @@
|
||||
"index": 4116,
|
||||
"size": 2,
|
||||
"func": "MEDIAN",
|
||||
"period": 300,
|
||||
"period": 3600,
|
||||
"factor": 1,
|
||||
"minVal": 0,
|
||||
"maxVal": 500,
|
||||
@@ -165,7 +165,7 @@
|
||||
"index": 4118,
|
||||
"size": 2,
|
||||
"func": "MEDIAN",
|
||||
"period": 300,
|
||||
"period": 3600,
|
||||
"factor": 1,
|
||||
"minVal": 0,
|
||||
"maxVal": 500,
|
||||
@@ -179,7 +179,7 @@
|
||||
"index": 4134,
|
||||
"size": 2,
|
||||
"func": "MEDIAN",
|
||||
"period": 300,
|
||||
"period": 3600,
|
||||
"factor": 1,
|
||||
"minVal": 0,
|
||||
"maxVal": 500,
|
||||
@@ -193,7 +193,7 @@
|
||||
"index": 4142,
|
||||
"size": 2,
|
||||
"func": "MEDIAN",
|
||||
"period": 300,
|
||||
"period": 3600,
|
||||
"factor": 1,
|
||||
"minVal": 0,
|
||||
"maxVal": 500,
|
||||
@@ -207,7 +207,7 @@
|
||||
"index": 4150,
|
||||
"size": 2,
|
||||
"func": "MEDIAN",
|
||||
"period": 300,
|
||||
"period": 3600,
|
||||
"factor": 1,
|
||||
"minVal": 0,
|
||||
"maxVal": 500,
|
||||
@@ -220,8 +220,8 @@
|
||||
"tipoMem": "RealHL",
|
||||
"index": 4352,
|
||||
"size": 2,
|
||||
"func": "MAX",
|
||||
"period": 300,
|
||||
"func": "MEDIAN",
|
||||
"period": 3600,
|
||||
"factor": 1,
|
||||
"minVal": 0,
|
||||
"maxVal": 999999999,
|
||||
@@ -234,8 +234,8 @@
|
||||
"tipoMem": "RealHL",
|
||||
"index": 4354,
|
||||
"size": 2,
|
||||
"func": "MAX",
|
||||
"period": 300,
|
||||
"func": "MEDIAN",
|
||||
"period": 3600,
|
||||
"factor": 1,
|
||||
"minVal": 0,
|
||||
"maxVal": 999999999,
|
||||
@@ -248,8 +248,8 @@
|
||||
"tipoMem": "RealHL",
|
||||
"index": 4356,
|
||||
"size": 2,
|
||||
"func": "MAX",
|
||||
"period": 300,
|
||||
"func": "MEDIAN",
|
||||
"period": 3600,
|
||||
"factor": 1,
|
||||
"minVal": 0,
|
||||
"maxVal": 999999999,
|
||||
@@ -262,8 +262,8 @@
|
||||
"tipoMem": "RealHL",
|
||||
"index": 4358,
|
||||
"size": 2,
|
||||
"func": "MAX",
|
||||
"period": 300,
|
||||
"func": "MEDIAN",
|
||||
"period": 3600,
|
||||
"factor": 1,
|
||||
"minVal": 0,
|
||||
"maxVal": 999999999,
|
||||
@@ -276,8 +276,8 @@
|
||||
"tipoMem": "RealHL",
|
||||
"index": 4142,
|
||||
"size": 2,
|
||||
"func": "MAX",
|
||||
"period": 60,
|
||||
"func": "MEDIAN",
|
||||
"period": 600,
|
||||
"factor": 0.001,
|
||||
"minVal": 0,
|
||||
"maxVal": 999999999,
|
||||
@@ -291,17 +291,12 @@
|
||||
"tipoMem": "RealHL",
|
||||
"index": 4358,
|
||||
"size": 2,
|
||||
"func": "MAX",
|
||||
"period": 60,
|
||||
"func": "MEDIAN",
|
||||
"period": 600,
|
||||
"factor": 0.001,
|
||||
"minVal": 0,
|
||||
"minVal": 0.01,
|
||||
"maxVal": 999999999,
|
||||
"unit": "KWh"
|
||||
}
|
||||
}
|
||||
//"optKVP": {
|
||||
// "fluxLogReduce": true,
|
||||
// "fluxLogRedDeadBand": 1.0,
|
||||
// "fluxLogResendPeriod": 600
|
||||
//}
|
||||
}
|
||||
@@ -190,15 +190,9 @@
|
||||
<None Include="DATA\CONF\3009-ENR.ini" />
|
||||
<None Include="DATA\CONF\3009-ENR.json" />
|
||||
<None Include="DATA\CONF\3009-ENR_MBlock.json" />
|
||||
<None Include="DATA\CONF\3010-ENR.ini">
|
||||
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
|
||||
</None>
|
||||
<None Include="DATA\CONF\3010-ENR.json">
|
||||
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
|
||||
</None>
|
||||
<None Include="DATA\CONF\3010-ENR_MBlock.json">
|
||||
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
|
||||
</None>
|
||||
<None Include="DATA\CONF\3010-ENR.ini" />
|
||||
<None Include="DATA\CONF\3010-ENR.json" />
|
||||
<None Include="DATA\CONF\3010-ENR_MBlock.json" />
|
||||
<None Include="DATA\CONF\3011-ENR.ini" />
|
||||
<None Include="DATA\CONF\3011-ENR.json" />
|
||||
<None Include="DATA\CONF\3011-ENR_MBlock.json" />
|
||||
@@ -248,27 +242,15 @@
|
||||
<None Include="DATA\CONF\3028-ENR.ini" />
|
||||
<None Include="DATA\CONF\3028-ENR.json" />
|
||||
<None Include="DATA\CONF\3028-ENR_MBlock.json" />
|
||||
<None Include="DATA\CONF\3029-ENR.ini">
|
||||
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
||||
</None>
|
||||
<None Include="DATA\CONF\3029-ENR.json">
|
||||
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
||||
</None>
|
||||
<None Include="DATA\CONF\3029-ENR.ini" />
|
||||
<None Include="DATA\CONF\3029-ENR.json" />
|
||||
<None Include="DATA\CONF\3026-MBus.ini" />
|
||||
<None Include="DATA\CONF\3026-MBus.json" />
|
||||
<None Include="DATA\CONF\3026-MBus_alarm.json" />
|
||||
<None Include="DATA\CONF\3029-ENR_MBlock.json">
|
||||
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
||||
</None>
|
||||
<None Include="DATA\CONF\4001-ENR.ini">
|
||||
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
|
||||
</None>
|
||||
<None Include="DATA\CONF\4001-ENR.json">
|
||||
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
|
||||
</None>
|
||||
<None Include="DATA\CONF\4001-ENR_MBlock.json">
|
||||
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
|
||||
</None>
|
||||
<None Include="DATA\CONF\3029-ENR_MBlock.json" />
|
||||
<None Include="DATA\CONF\4001-ENR.ini" />
|
||||
<None Include="DATA\CONF\4001-ENR.json" />
|
||||
<None Include="DATA\CONF\4001-ENR_MBlock.json" />
|
||||
<None Include="DATA\CONF\4002-ENR.ini" />
|
||||
<None Include="DATA\CONF\4002-ENR.json" />
|
||||
<None Include="DATA\CONF\4002-ENR_MBlock.json" />
|
||||
@@ -442,9 +424,15 @@
|
||||
<None Include="DATA\CONF\Tend_FIMAT_01_MBlock.json">
|
||||
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
|
||||
</None>
|
||||
<None Include="DATA\CONF\_FRER.ini" />
|
||||
<None Include="DATA\CONF\_FRER.json" />
|
||||
<None Include="DATA\CONF\_FRER_MBlock.json" />
|
||||
<None Include="DATA\CONF\_FRER.ini">
|
||||
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
|
||||
</None>
|
||||
<None Include="DATA\CONF\_FRER.json">
|
||||
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
|
||||
</None>
|
||||
<None Include="DATA\CONF\_FRER_MBlock.json">
|
||||
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
|
||||
</None>
|
||||
<None Include="DATA\HIST\.placeholder">
|
||||
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
|
||||
</None>
|
||||
|
||||
@@ -58,6 +58,17 @@ namespace IOB_WIN_MBUS.IobModbusTCP
|
||||
};
|
||||
#endif
|
||||
setParamPlc();
|
||||
//
|
||||
string sMinWait = getOptPar("minWait");
|
||||
if (!string.IsNullOrEmpty(sMinWait))
|
||||
{
|
||||
int.TryParse(sMinWait, out minWait);
|
||||
}
|
||||
string sMaxWait = getOptPar("maxWait");
|
||||
if (!string.IsNullOrEmpty(sMaxWait))
|
||||
{
|
||||
int.TryParse(sMaxWait, out maxWait);
|
||||
}
|
||||
|
||||
// salvo info su conf IOB...
|
||||
string iobConfSer = "";
|
||||
@@ -75,7 +86,14 @@ namespace IOB_WIN_MBUS.IobModbusTCP
|
||||
lgError("Impossibile avviare, IOBConf nullo/non valido!");
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Min attesa chiamate consecutive ModBus
|
||||
/// </summary>
|
||||
private int minWait = 40;
|
||||
/// <summary>
|
||||
/// Max attesa chiamate consecutive ModBus
|
||||
/// </summary>
|
||||
private int maxWait = 60;
|
||||
#endregion Public Constructors
|
||||
|
||||
#region Public Methods
|
||||
@@ -217,18 +235,7 @@ namespace IOB_WIN_MBUS.IobModbusTCP
|
||||
public override Dictionary<string, string> getDynData()
|
||||
{
|
||||
Random rnd = new Random();
|
||||
int minWait = 40;
|
||||
int maxWait = 60;
|
||||
string sMinWait = getOptPar("minWait");
|
||||
if (!string.IsNullOrEmpty(sMinWait))
|
||||
{
|
||||
int.TryParse(sMinWait, out minWait);
|
||||
}
|
||||
string sMaxWait = getOptPar("minWait");
|
||||
if (!string.IsNullOrEmpty(sMaxWait))
|
||||
{
|
||||
int.TryParse(sMaxWait, out maxWait);
|
||||
}
|
||||
|
||||
// valore non presente in vers default... se gestito fare override
|
||||
Dictionary<string, string> outVal = new Dictionary<string, string>();
|
||||
if (utils.CRB("enableTSVC"))
|
||||
|
||||
Reference in New Issue
Block a user