Completata review x trasmissione allarmi Torri
This commit is contained in:
@@ -68,8 +68,9 @@ CLI_INST=SteamWareSim
|
||||
;STARTLIST=PIZ08
|
||||
;STARTLIST=PIZ04
|
||||
;STARTLIST=PIZ05
|
||||
;STARTLIST=FOV062
|
||||
STARTLIST=SIM_PIZ03
|
||||
;STARTLIST=OPC_UA
|
||||
;STARTLIST=SIM_PIZ03
|
||||
;STARTLIST=FOV062
|
||||
STARTLIST=3013
|
||||
|
||||
MAXCNC=10
|
||||
@@ -4071,12 +4071,12 @@ namespace IOB_WIN_NEXT
|
||||
{
|
||||
try
|
||||
{
|
||||
string sVal = "";
|
||||
if (lastAlarm != currAlarms["CNC_ALARM"])
|
||||
{
|
||||
// salvo!
|
||||
lastAlarm = currAlarms["CNC_ALARM"];
|
||||
// per ogni valore del dizionario mostro ed accodo!
|
||||
string sVal = "";
|
||||
foreach (var item in currAlarms)
|
||||
{
|
||||
sVal = string.Format("[CNC_ALARM]{0}|{1}", item.Key, item.Value);
|
||||
@@ -4084,6 +4084,12 @@ namespace IOB_WIN_NEXT
|
||||
accodaFLog(sVal, qEncodeFLog(item.Key, item.Value));
|
||||
}
|
||||
}
|
||||
// accodo ALTRI allarmi NON CNC...
|
||||
foreach (var item in currAlarms.Where(X => X.Key != "CNC_ALARM"))
|
||||
{
|
||||
sVal = $"{item.Key} | {item.Value}";
|
||||
accodaFLog(sVal, qEncodeFLog(item.Key, item.Value));
|
||||
}
|
||||
}
|
||||
catch (Exception exc)
|
||||
{
|
||||
|
||||
@@ -226,8 +226,8 @@ namespace IOB_WIN_NEXT
|
||||
uint valDW = 0;
|
||||
var MemBlockPZ = new byte[4];
|
||||
bool fatto = S7ReadBB(ref MemBlockPZ, memAddrAlarms, 4);
|
||||
if (fatto)
|
||||
{
|
||||
//if (fatto)
|
||||
//{
|
||||
valDW = S7.Net.Types.DWord.FromByteArray(MemBlockPZ.ToArray());
|
||||
// se <> 0 --> log e accodo a dynData
|
||||
if (valDW != 0)
|
||||
@@ -244,7 +244,7 @@ namespace IOB_WIN_NEXT
|
||||
}
|
||||
trovato++;
|
||||
}
|
||||
}
|
||||
//}
|
||||
return trovato;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user