update conf pizzaferri x COMECA
This commit is contained in:
@@ -1,35 +1,19 @@
|
||||
{
|
||||
"mMapWrite": {
|
||||
"setProg": {
|
||||
"name": "setProg",
|
||||
"description": "Programma",
|
||||
"tipoMem": "String",
|
||||
"memAddr": "DB6.DBB50",
|
||||
"index": 50,
|
||||
"size": 50
|
||||
"setTE04": {
|
||||
"name": "setTE04",
|
||||
"description": "Impostazione temperatura min TE04 Linea sfiato Gas",
|
||||
"tipoMem": "Real",
|
||||
"memAddr": "DB85.DBB280",
|
||||
"index": 280,
|
||||
"size": 4
|
||||
},
|
||||
"setComm": {
|
||||
"name": "setComm",
|
||||
"description": "Commessa",
|
||||
"tipoMem": "String",
|
||||
"memAddr": "DB6.DBB0",
|
||||
"index": 0,
|
||||
"size": 50
|
||||
},
|
||||
"setArt": {
|
||||
"name": "setArt",
|
||||
"description": "Articolo",
|
||||
"tipoMem": "String",
|
||||
"memAddr": "DB6.DBB100",
|
||||
"index": 100,
|
||||
"size": 50
|
||||
},
|
||||
"setPzComm": {
|
||||
"name": "setPzComm",
|
||||
"description": "Qty",
|
||||
"memAddr": "DB30.DBB212",
|
||||
"tipoMem": "DInt",
|
||||
"index": 212,
|
||||
"setTT17": {
|
||||
"name": "setTT17",
|
||||
"description": "Impostazione temperatura min TT17 Linea sfiato Gas Torcia Serbatoio",
|
||||
"tipoMem": "Real",
|
||||
"memAddr": "DB85.DBB284",
|
||||
"index": 284,
|
||||
"size": 4
|
||||
}
|
||||
},
|
||||
|
||||
@@ -1,35 +1,19 @@
|
||||
{
|
||||
"mMapWrite": {
|
||||
"setProg": {
|
||||
"name": "setProg",
|
||||
"description": "Programma",
|
||||
"tipoMem": "String",
|
||||
"memAddr": "DB6.DBB50",
|
||||
"index": 50,
|
||||
"size": 50
|
||||
"setTE04": {
|
||||
"name": "setTE04",
|
||||
"description": "Impostazione temperatura min TE04 Linea sfiato Gas",
|
||||
"tipoMem": "Real",
|
||||
"memAddr": "DB85.DBB280",
|
||||
"index": 280,
|
||||
"size": 4
|
||||
},
|
||||
"setComm": {
|
||||
"name": "setComm",
|
||||
"description": "Commessa",
|
||||
"tipoMem": "String",
|
||||
"memAddr": "DB6.DBB0",
|
||||
"index": 0,
|
||||
"size": 50
|
||||
},
|
||||
"setArt": {
|
||||
"name": "setArt",
|
||||
"description": "Articolo",
|
||||
"tipoMem": "String",
|
||||
"memAddr": "DB6.DBB100",
|
||||
"index": 100,
|
||||
"size": 50
|
||||
},
|
||||
"setPzComm": {
|
||||
"name": "setPzComm",
|
||||
"description": "Qty",
|
||||
"memAddr": "DB30.DBB212",
|
||||
"tipoMem": "DInt",
|
||||
"index": 212,
|
||||
"setTT17": {
|
||||
"name": "setTT17",
|
||||
"description": "Impostazione temperatura min TT17 Linea sfiato Gas Torcia Serbatoio",
|
||||
"tipoMem": "Real",
|
||||
"memAddr": "DB85.DBB284",
|
||||
"index": 284,
|
||||
"size": 4
|
||||
}
|
||||
},
|
||||
|
||||
@@ -174,57 +174,12 @@ namespace IOB_WIN_NEXT
|
||||
case taskType.forceSetPzCount:
|
||||
case taskType.setProg:
|
||||
case taskType.sendWatchDogMes2Plc:
|
||||
taskVal = $"taskReq: {tName} | key: {item.Key} | val: {item.Value} | SKIPPED | NO EXEC";
|
||||
break;
|
||||
|
||||
case taskType.startSetup:
|
||||
case taskType.stopSetup:
|
||||
case taskType.setPzComm:
|
||||
case taskType.setArt:
|
||||
case taskType.setComm:
|
||||
saveProdData(item);
|
||||
int byteSize = 0;
|
||||
// recupero dati da memMap... altrimenti NULLA
|
||||
if (memMap.mMapWrite.ContainsKey(item.Key))
|
||||
{
|
||||
dataConf currMem = memMap.mMapWrite[item.Key];
|
||||
byteSize = currMem.size;
|
||||
memAddrWrite = currMem.memAddr;
|
||||
MemBlock = new byte[byteSize];
|
||||
if (currMem.tipoMem == plcDataType.String)
|
||||
{
|
||||
saveStringOnMemBlock(ref MemBlock, item.Key, 0, byteSize);
|
||||
}
|
||||
else if (currMem.tipoMem == plcDataType.DInt)
|
||||
{
|
||||
int valDInt = 0;
|
||||
int.TryParse(item.Value, out valDInt);
|
||||
MemBlock = S7.Net.Types.DInt.ToByteArray(valDInt);
|
||||
}
|
||||
else if (currMem.tipoMem == plcDataType.Int)
|
||||
{
|
||||
short valInt = 0;
|
||||
short.TryParse(item.Value, out valInt);
|
||||
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.startSetup:
|
||||
// processo scrittura BIT su DB6.DBDW216
|
||||
MemBlock = new byte[1];
|
||||
MemBlock[0] = (byte)1;
|
||||
memAddrWrite = "DB6.DBDW216";
|
||||
break;
|
||||
|
||||
case taskType.stopSetup:
|
||||
// processo scrittura BIT su DB6.DBDW216
|
||||
MemBlock = new byte[1];
|
||||
MemBlock[0] = (byte)0;
|
||||
memAddrWrite = "DB6.DBDW216";
|
||||
taskVal = $"taskReq: {tName} | key: {item.Key} | val: {item.Value} | SKIPPED | NO EXEC";
|
||||
break;
|
||||
|
||||
case taskType.setParameter:
|
||||
|
||||
Reference in New Issue
Block a user