Merge branch 'release/FixLoadCOnfS7'
This commit is contained in:
@@ -56,12 +56,23 @@
|
||||
"period": 60,
|
||||
"factor": 10
|
||||
},
|
||||
"Contatore01": {
|
||||
"name": "Contatore01",
|
||||
"description": "Contapezzi 01",
|
||||
"memAddr": "DB6.DBB200",
|
||||
"tipoMem": "DInt",
|
||||
"index": 200,
|
||||
"size": 4,
|
||||
"func": "MAX",
|
||||
"period": 60,
|
||||
"factor": 1
|
||||
},
|
||||
"ContatoreParziale": {
|
||||
"name": "ContatoreParziale",
|
||||
"description": "Contapezzi Parziale",
|
||||
"description": "Contapezzi Parziale2",
|
||||
"memAddr": "DB6.DBB208",
|
||||
"tipoMem": "DInt",
|
||||
"index": 4,
|
||||
"index": 208,
|
||||
"size": 4,
|
||||
"func": "MAX",
|
||||
"period": 60,
|
||||
|
||||
@@ -521,6 +521,8 @@ namespace IOB_WIN_NEXT
|
||||
/// </summary>
|
||||
protected override void setParamPlc()
|
||||
{
|
||||
// carico conf vettore memoria...
|
||||
loadMemConf();
|
||||
// Creo oggetto connessione NC
|
||||
parentForm.commPlcActive = true;
|
||||
lgInfo("Start init Adapter SIEMENS all'IP {0} | CPU: {1} | R/S: {2}/{3} | --> IOB {4}", cIobConf.cncIpAddr, cIobConf.cpuType, cIobConf.rack, cIobConf.slot, cIobConf.codIOB);
|
||||
@@ -590,8 +592,10 @@ namespace IOB_WIN_NEXT
|
||||
lgError($"Errore in ping: esito {esitoPing}");
|
||||
}
|
||||
parentForm.commPlcActive = false;
|
||||
#if false
|
||||
// carico conf vettore memoria...
|
||||
loadMemConf();
|
||||
#endif
|
||||
|
||||
bool enableByApp = utils.CRB("enableContapezzi");
|
||||
bool enableByIob = (getOptPar("ENABLE_PZCOUNT") == "TRUE");
|
||||
|
||||
@@ -147,6 +147,7 @@ namespace IOB_WIN_NEXT
|
||||
/// <param name="task2exe"></param>
|
||||
public override Dictionary<string, string> executeTasks(Dictionary<string, string> task2exe)
|
||||
{
|
||||
lgInfo($"Chiamata executeTasks specifica IobSiemensComeca: {task2exe.Count} task ricevuti");
|
||||
// Verificare il protocollo: dovrebeb togliere SOLO i task eseguiti...
|
||||
Dictionary<string, string> taskDone = new Dictionary<string, string>();
|
||||
bool taskOk = false;
|
||||
|
||||
@@ -139,6 +139,7 @@ namespace IOB_WIN_NEXT
|
||||
/// <param name="task2exe"></param>
|
||||
public override Dictionary<string, string> executeTasks(Dictionary<string, string> task2exe)
|
||||
{
|
||||
lgInfo($"Chiamata executeTasks specifica IobSiemensComeca: {task2exe.Count} task ricevuti");
|
||||
// Verificare il protocollo: dovrebeb togliere SOLO i task eseguiti...
|
||||
Dictionary<string, string> taskDone = new Dictionary<string, string>();
|
||||
bool taskOk = false;
|
||||
@@ -196,27 +197,31 @@ namespace IOB_WIN_NEXT
|
||||
MemBlock = S7.Net.Types.Int.ToByteArray(valInt);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
lgError($"Errore: non trovata chiave write in memMap.mMapWrite per {item.Key}");
|
||||
}
|
||||
taskVal = item.Value;
|
||||
break;
|
||||
|
||||
case taskType.forceResetPzCount:
|
||||
// processo scrittura BIT su DB6.DBDW216
|
||||
MemBlock = new byte[1];
|
||||
MemBlock[0] = (byte)1;
|
||||
MemBlock = new byte[4];
|
||||
MemBlock = S7.Net.Types.DInt.ToByteArray(1);
|
||||
memAddrWrite = "DB6.DBDW216";
|
||||
break;
|
||||
|
||||
case taskType.startSetup:
|
||||
// processo scrittura BIT su DB6.DBDW216
|
||||
MemBlock = new byte[1];
|
||||
MemBlock[0] = (byte)1;
|
||||
MemBlock = new byte[4];
|
||||
MemBlock = S7.Net.Types.DInt.ToByteArray(1);
|
||||
memAddrWrite = "DB6.DBDW216";
|
||||
break;
|
||||
|
||||
case taskType.stopSetup:
|
||||
// processo scrittura BIT su DB6.DBDW216
|
||||
MemBlock = new byte[1];
|
||||
MemBlock[0] = (byte)0;
|
||||
MemBlock = new byte[4];
|
||||
MemBlock = S7.Net.Types.DInt.ToByteArray(0);
|
||||
memAddrWrite = "DB6.DBDW216";
|
||||
break;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user