Completata review x trasmissione allarmi Torri

This commit is contained in:
Samuele E. Locatelli
2021-10-02 11:33:12 +02:00
parent 0e4d8d33e5
commit 40411f56dd
3 changed files with 13 additions and 6 deletions
+3 -2
View File
@@ -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
+7 -1
View File
@@ -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)
{
+3 -3
View File
@@ -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;
}