Merge branch 'release/FixSendParameters'
This commit is contained in:
Binary file not shown.
@@ -158,7 +158,7 @@ namespace IOB_WIN_NEXT
|
||||
|
||||
// è little endian (NON serve conversione)
|
||||
hasBigEndian = false;
|
||||
lgInfo("Start init Adapter FANUC all'IP {0}:{1} per IOB {2}", IOBConf.cncIpAddr, IOBConf.cncPort, IOBConf.codIOB);
|
||||
lgInfoStartup("Start init Adapter FANUC all'IP {0}:{1} per IOB {2}", IOBConf.cncIpAddr, IOBConf.cncPort, IOBConf.codIOB);
|
||||
|
||||
// Creo oggetto connessione NC
|
||||
parentForm.commPlcActive = true;
|
||||
|
||||
+68
-13
@@ -121,6 +121,17 @@ namespace IOB_WIN_NEXT
|
||||
/// </summary>
|
||||
protected DateTime lastPzCountSend;
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// Ultimo LOG registrazione avvio (x ridurre log notturni...)
|
||||
/// </summary>
|
||||
protected DateTime lastLogStartup = DateTime.Today.AddHours(-1);
|
||||
|
||||
/// <summary>
|
||||
/// Veto per registrazione completa log di startup (minuti)
|
||||
/// </summary>
|
||||
protected int vetoLogStartupDuration = 60;
|
||||
|
||||
/// <summary>
|
||||
/// Dizionario ultimi valori (double) delle TSVC
|
||||
/// </summary>
|
||||
@@ -445,6 +456,8 @@ namespace IOB_WIN_NEXT
|
||||
lg = LogManager.GetCurrentClassLogger();
|
||||
|
||||
lgInfo("Avvio preliminare AdapterGeneric");
|
||||
lastLogStartup = DateTime.Now;
|
||||
|
||||
// aggiungo altri defaults
|
||||
setDefaults(true);
|
||||
|
||||
@@ -454,7 +467,7 @@ namespace IOB_WIN_NEXT
|
||||
checkShrinkDir();
|
||||
|
||||
// concluso!
|
||||
lgInfo("Istanziata classe preliminare IOBGeneric");
|
||||
lgInfoStartup("Istanziata classe preliminare IOBGeneric");
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -2680,6 +2693,25 @@ namespace IOB_WIN_NEXT
|
||||
sendToLogWatch("INFO", message);
|
||||
}
|
||||
}
|
||||
protected void lgInfoStartup(string message, bool sendToForm = true)
|
||||
{
|
||||
lg.Factory.Configuration.Variables["codIOB"] = cIobConf.codIOB;
|
||||
DateTime adesso = DateTime.Now;
|
||||
if (adesso.Subtract(lastLogStartup).TotalMinutes > vetoLogStartupDuration)
|
||||
{
|
||||
lg.Info(message);
|
||||
// se supera di 5 minutis cadenza -_> reimposto veto...
|
||||
if (adesso.Subtract(lastLogStartup).TotalMinutes > vetoLogStartupDuration + 5)
|
||||
{
|
||||
lastLogStartup = adesso;
|
||||
}
|
||||
}
|
||||
|
||||
if (sendToForm)
|
||||
{
|
||||
sendToLogWatch("INFO", message);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Effettua logging INFO corretto impostanto anche la variabile IOB prima di scrivere...
|
||||
@@ -2692,6 +2724,26 @@ namespace IOB_WIN_NEXT
|
||||
lg.Info(message, args);
|
||||
sendToLogWatch("INFO", message, args);
|
||||
}
|
||||
/// <summary>
|
||||
/// Effettua logging INFO corretto impostanto anche la variabile IOB prima di scrivere...
|
||||
/// </summary>
|
||||
/// <param name="message"></param>
|
||||
/// <param name="args"></param>
|
||||
protected void lgInfoStartup(string message, params object[] args)
|
||||
{
|
||||
lg.Factory.Configuration.Variables["codIOB"] = cIobConf.codIOB;
|
||||
DateTime adesso = DateTime.Now;
|
||||
if (adesso.Subtract(lastLogStartup).TotalMinutes > vetoLogStartupDuration)
|
||||
{
|
||||
lg.Info(message, args);
|
||||
// se supera di 5 minutis cadenza -_> reimposto veto...
|
||||
if (adesso.Subtract(lastLogStartup).TotalMinutes > vetoLogStartupDuration + 5)
|
||||
{
|
||||
lastLogStartup = adesso;
|
||||
}
|
||||
}
|
||||
sendToLogWatch("INFO", message, args);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Effettua logging INFO corretto impostanto anche la variabile IOB prima di scrivere...
|
||||
@@ -2801,7 +2853,7 @@ namespace IOB_WIN_NEXT
|
||||
/// </summary>
|
||||
protected virtual void loadMemConf()
|
||||
{
|
||||
lgInfo("BEGIN loadMemConf");
|
||||
lgInfoStartup("BEGIN loadMemConf");
|
||||
// variabili x gestione send contapezzi in blocco
|
||||
string currPar = getOptPar("ENABLE_SEND_PZC_BLOCK");
|
||||
if (!string.IsNullOrEmpty(currPar))
|
||||
@@ -2824,12 +2876,12 @@ namespace IOB_WIN_NEXT
|
||||
if (!string.IsNullOrEmpty(jsonParams))
|
||||
{
|
||||
string jsonFileName = $"{Application.StartupPath}/DATA/CONF/{jsonParams}";
|
||||
lgInfo($"Apertura file {jsonFileName}");
|
||||
lgInfoStartup($"Apertura file {jsonFileName}");
|
||||
StreamReader reader = new StreamReader(jsonFileName);
|
||||
string jsonData = reader.ReadToEnd();
|
||||
if (!string.IsNullOrEmpty(jsonData))
|
||||
{
|
||||
lgInfo($"File json PARAMETRI composto da {jsonData.Length} caratteri");
|
||||
lgInfoStartup($"File json PARAMETRI composto da {jsonData.Length} caratteri");
|
||||
try
|
||||
{
|
||||
memMap = JsonConvert.DeserializeObject<plcMemMap>(jsonData);
|
||||
@@ -2848,7 +2900,7 @@ namespace IOB_WIN_NEXT
|
||||
}
|
||||
else
|
||||
{
|
||||
lgInfo("loadMemConf: non trovata opzione PARAM_CONF in file INI");
|
||||
lgInfoStartup("loadMemConf: non trovata opzione PARAM_CONF in file INI");
|
||||
}
|
||||
|
||||
// inizializzo LUT decodifica ALLARMI
|
||||
@@ -2856,12 +2908,12 @@ namespace IOB_WIN_NEXT
|
||||
if (!string.IsNullOrEmpty(jsonAlarms))
|
||||
{
|
||||
string jsonFileName = $"{Application.StartupPath}\\DATA\\CONF\\{jsonAlarms}";
|
||||
lgInfo($"Apertura file {jsonFileName}");
|
||||
lgInfoStartup($"Apertura file {jsonFileName}");
|
||||
StreamReader reader = new StreamReader(jsonFileName);
|
||||
string jsonData = reader.ReadToEnd();
|
||||
if (!string.IsNullOrEmpty(jsonData))
|
||||
{
|
||||
lgInfo($"File json ALLARMI composto da {jsonData.Length} caratteri");
|
||||
lgInfoStartup($"File json ALLARMI composto da {jsonData.Length} caratteri");
|
||||
try
|
||||
{
|
||||
alarmMaps = JsonConvert.DeserializeObject<List<BaseAlarmConf>>(jsonData);
|
||||
@@ -2880,11 +2932,11 @@ namespace IOB_WIN_NEXT
|
||||
}
|
||||
else
|
||||
{
|
||||
lgInfo("loadMemConf: non trovata opzione ALARM_CONF in file INI");
|
||||
lgInfoStartup("loadMemConf: non trovata opzione ALARM_CONF in file INI");
|
||||
}
|
||||
|
||||
// loggo
|
||||
lgInfo("DONE loadMemConf");
|
||||
lgInfoStartup("DONE loadMemConf");
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@@ -3193,9 +3245,12 @@ namespace IOB_WIN_NEXT
|
||||
};
|
||||
allParam.Add(currItem);
|
||||
}
|
||||
// invio su cloud parametri!
|
||||
rawData = JsonConvert.SerializeObject(allParam, Formatting.Indented);
|
||||
utils.callUrl($"{urlSaveAllParams}", rawData);
|
||||
// invio su cloud parametri SE sono connesso...
|
||||
if (connectionOk)
|
||||
{
|
||||
rawData = JsonConvert.SerializeObject(allParam, Formatting.Indented);
|
||||
utils.callUrl($"{urlSaveAllParams}", rawData);
|
||||
}
|
||||
lgInfo($"setupMemMap | salvata conf memoria R/W");
|
||||
}
|
||||
}
|
||||
@@ -3515,7 +3570,7 @@ namespace IOB_WIN_NEXT
|
||||
|
||||
case taskType.setParameter:
|
||||
// richiedo da URL i parametri WRITE da popolare
|
||||
lgInfo("Chiamata processMemWriteRequests");
|
||||
lgInfo("Chiamata setParameter --> processMemWriteRequests");
|
||||
taskVal = processMemWriteRequests();
|
||||
// se restituiscce "" faccio altra prova...
|
||||
if (string.IsNullOrEmpty(taskVal))
|
||||
|
||||
@@ -617,7 +617,7 @@ namespace IOB_WIN_NEXT
|
||||
{
|
||||
// Creo oggetto connessione NC
|
||||
parentForm.commPlcActive = true;
|
||||
lgInfo("Start init Adapter KAWASAKI all'IP {0} | --> IOB {1}", cIobConf.cncIpAddr, cIobConf.codIOB);
|
||||
lgInfoStartup("Start init Adapter KAWASAKI all'IP {0} | --> IOB {1}", cIobConf.cncIpAddr, cIobConf.codIOB);
|
||||
|
||||
// inizializzo correttamente aree memoria secondo CONF - iniFileName
|
||||
IniFile fIni = new IniFile(cIobConf.iniFileName);
|
||||
@@ -627,7 +627,7 @@ namespace IOB_WIN_NEXT
|
||||
// SE è necessario refresh...
|
||||
if (needRefresh)
|
||||
{
|
||||
lgInfo("Refreshing connection...");
|
||||
lgInfoStartup("Refreshing connection...");
|
||||
// ora tento avvio PLC... SE PING OK...
|
||||
if (testPingMachine == IPStatus.Success)
|
||||
{
|
||||
|
||||
@@ -106,7 +106,7 @@ namespace IOB_WIN_NEXT
|
||||
catch
|
||||
{ }
|
||||
// finito!
|
||||
lgInfo($"Init IOB, con {iobConfSer}");
|
||||
lgInfoStartup($"Init IOB, con {iobConfSer}");
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -639,7 +639,7 @@ namespace IOB_WIN_NEXT
|
||||
// SE è necessario refresh...
|
||||
if (needRefresh)
|
||||
{
|
||||
lgInfo("Refreshing connection...");
|
||||
lgInfoStartup("Refreshing connection...");
|
||||
if (parametri != null)
|
||||
{
|
||||
try
|
||||
@@ -647,7 +647,7 @@ namespace IOB_WIN_NEXT
|
||||
parametri.ipAdrr = cIobConf.cncIpAddr;
|
||||
parametri.port = int.Parse(cIobConf.cncPort);
|
||||
// leggo file init...
|
||||
lgInfo("Reading ini file...");
|
||||
lgInfoStartup("Reading ini file...");
|
||||
IniFile fIni = new IniFile(cIobConf.iniFileName);
|
||||
// ora leggo valori speciali
|
||||
parametri.memAddrRead = fIni.ReadString("MEMORY", "ADDR_READ", "");
|
||||
@@ -655,11 +655,11 @@ namespace IOB_WIN_NEXT
|
||||
parametri.memSizeRead = fIni.ReadInteger("MEMORY", "SIZE_READ", 0);
|
||||
parametri.memSizeWrite = fIni.ReadInteger("MEMORY", "SIZE_WRITE", 0);
|
||||
// salvo vettori memoria...
|
||||
lgInfo("Set RawInput dimensions...");
|
||||
lgInfoStartup("Set RawInput dimensions...");
|
||||
RawInput = new byte[parametri.memSizeRead];
|
||||
RawOutput = new byte[parametri.memSizeWrite];
|
||||
// salvo parametri conn!
|
||||
lgInfo(string.Format("Parametri memoria: memAddrRead: {0} | memAddrWrite: {1} | memSizeRead: {2} | memSizeWrite: {3}", parametri.memAddrRead, parametri.memAddrWrite, parametri.memSizeRead, parametri.memSizeWrite));
|
||||
lgInfoStartup(string.Format("Parametri memoria: memAddrRead: {0} | memAddrWrite: {1} | memSizeRead: {2} | memSizeWrite: {3}", parametri.memAddrRead, parametri.memAddrWrite, parametri.memSizeRead, parametri.memSizeWrite));
|
||||
}
|
||||
catch (Exception exc)
|
||||
{
|
||||
@@ -681,7 +681,7 @@ namespace IOB_WIN_NEXT
|
||||
bool disableByIob = (getOptPar("DISABLE_PZCOUNT") == "TRUE");
|
||||
if ((enableByApp || enableByIob) && !(disableByIob))
|
||||
{
|
||||
lgInfo("ModBus TCP: inizio gestione contapezzi");
|
||||
lgInfoStartup("ModBus TCP: inizio gestione contapezzi");
|
||||
try
|
||||
{
|
||||
// verifico quale modalità sia richiesta: STD (6711) oppure BIT (Custom, con indicazione area)
|
||||
@@ -689,7 +689,7 @@ namespace IOB_WIN_NEXT
|
||||
{
|
||||
if (getOptPar("PZCOUNT_MODE").StartsWith("STD"))
|
||||
{
|
||||
lgInfo("Init contapezzi ModBusTCP: pzCntReload(true)");
|
||||
lgInfoStartup("Init contapezzi ModBusTCP: pzCntReload(true)");
|
||||
pzCntReload(true);
|
||||
// refresh associazione Macchina - IOB
|
||||
sendM2IOB();
|
||||
@@ -730,15 +730,15 @@ namespace IOB_WIN_NEXT
|
||||
// disconnetto e connetto...
|
||||
if (isVerboseLog)
|
||||
{
|
||||
lgInfo("ModBus TCP: tryDisconnect");
|
||||
lgInfoStartup("ModBus TCP: tryDisconnect");
|
||||
}
|
||||
tryDisconnect();
|
||||
|
||||
// lo ripeto x evitare che ci sia un loop... e tryConnect richiami la procedura corrente...
|
||||
needRefresh = false;
|
||||
lgInfo("ModBus TCP: tryConnect");
|
||||
lgInfoStartup("ModBus TCP: tryConnect");
|
||||
tryConnect();
|
||||
lgInfo("End init Adapter ModBusTCP");
|
||||
lgInfoStartup("End init Adapter ModBusTCP");
|
||||
if (isVerboseLog)
|
||||
{
|
||||
lgInfo("ModBus TCP CONNESSIONE AVVENUTA");
|
||||
|
||||
@@ -89,7 +89,7 @@ namespace IOB_WIN_NEXT
|
||||
|
||||
// è little endian (NON serve conversione)
|
||||
hasBigEndian = false;
|
||||
lgInfo("Start init Adapter OSAI, tipo all'IP/NOME {0}, variante {1} per IOB {2}", IOBConf.cncIpAddr, IOBConf.tipoIob, IOBConf.codIOB);
|
||||
lgInfoStartup("Start init Adapter OSAI, tipo all'IP/NOME {0}, variante {1} per IOB {2}", IOBConf.cncIpAddr, IOBConf.tipoIob, IOBConf.codIOB);
|
||||
|
||||
// Creo oggetto x gestione connessione/comunicazione NC: secondo il tipo creo CNDEX o OPEN
|
||||
parentForm.commPlcActive = true;
|
||||
|
||||
@@ -49,10 +49,7 @@ namespace IOB_WIN_NEXT
|
||||
if (opcUaParams.SetupConf.SetupMode == IOB_UT_NEXT.MachineSetupMode.MECOLPRESS)
|
||||
{
|
||||
List<WriteValue> nodes2Write = new List<WriteValue>();
|
||||
// ora controllo la specifica condizione Mecolpress x il setup SE i parametri FOSSERO quelli di setup...
|
||||
dataConf currMem = null;
|
||||
// faccio un check tra i valori in memoria che devono corrispondere e se NON corrispondono --> metto valore in scrittura...
|
||||
bool needWrite = false;
|
||||
int numDiff = 0;
|
||||
foreach (var item in opcUaParams.SetupConf.checkParList)
|
||||
{
|
||||
|
||||
@@ -49,10 +49,7 @@ namespace IOB_WIN_NEXT
|
||||
if (opcUaParams.SetupConf.SetupMode == IOB_UT_NEXT.MachineSetupMode.MECOLPRESS)
|
||||
{
|
||||
List<WriteValue> nodes2Write = new List<WriteValue>();
|
||||
// ora controllo la specifica condizione Mecolpress x il setup SE i parametri FOSSERO quelli di setup...
|
||||
dataConf currMem = null;
|
||||
// faccio un check tra i valori in memoria che devono corrispondere e se NON corrispondono --> metto valore in scrittura...
|
||||
bool needWrite = false;
|
||||
int numDiff = 0;
|
||||
foreach (var item in opcUaParams.SetupConf.checkParList)
|
||||
{
|
||||
|
||||
+14
-14
@@ -116,7 +116,7 @@ namespace IOB_WIN_NEXT
|
||||
catch
|
||||
{ }
|
||||
// finito!
|
||||
lgInfo($"Init IOB, con {iobConfSer}");
|
||||
lgInfoStartup($"Init IOB, con {iobConfSer}");
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -546,11 +546,11 @@ namespace IOB_WIN_NEXT
|
||||
{
|
||||
// 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);
|
||||
lgInfoStartup("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);
|
||||
// SE è necessario refresh...
|
||||
if (needRefresh)
|
||||
{
|
||||
lgInfo("Refreshing connection...");
|
||||
lgInfoStartup("Refreshing connection...");
|
||||
if (parametri != null)
|
||||
{
|
||||
try
|
||||
@@ -560,7 +560,7 @@ namespace IOB_WIN_NEXT
|
||||
parametri.tipoCpu = (CpuType)Enum.Parse(typeof(CpuType), cIobConf.cpuType);
|
||||
parametri.ipAdrr = cIobConf.cncIpAddr;
|
||||
// leggo file init...
|
||||
lgInfo("Reading ini file...");
|
||||
lgInfoStartup("Reading ini file...");
|
||||
IniFile fIni = new IniFile(cIobConf.iniFileName);
|
||||
// ora leggo valori speciali
|
||||
parametri.memAddrRead = fIni.ReadString("MEMORY", "ADDR_READ", "");
|
||||
@@ -568,11 +568,11 @@ namespace IOB_WIN_NEXT
|
||||
parametri.memSizeRead = fIni.ReadInteger("MEMORY", "SIZE_READ", 0);
|
||||
parametri.memSizeWrite = fIni.ReadInteger("MEMORY", "SIZE_WRITE", 0);
|
||||
// salvo vettori memoria...
|
||||
lgInfo("Set RawInput dimensions...");
|
||||
lgInfoStartup("Set RawInput dimensions...");
|
||||
RawInput = new byte[parametri.memSizeRead];
|
||||
RawOutput = new byte[parametri.memSizeWrite];
|
||||
// salvo parametri conn!
|
||||
lgInfo(string.Format("Parametri memoria: memAddrRead: {0} | memAddrWrite: {1} | memSizeRead: {2} | memSizeWrite: {3}", parametri.memAddrRead, parametri.memAddrWrite, parametri.memSizeRead, parametri.memSizeWrite));
|
||||
lgInfoStartup(string.Format("Parametri memoria: memAddrRead: {0} | memAddrWrite: {1} | memSizeRead: {2} | memSizeWrite: {3}", parametri.memAddrRead, parametri.memAddrWrite, parametri.memSizeRead, parametri.memSizeWrite));
|
||||
}
|
||||
catch (Exception exc)
|
||||
{
|
||||
@@ -595,10 +595,10 @@ namespace IOB_WIN_NEXT
|
||||
tryDisconnect();
|
||||
// lo ripeto x evitare che ci sia un loop... e tryConnect richiami la procedura corrente...
|
||||
needRefresh = false;
|
||||
lgInfo("SIEMENS: tryConnect");
|
||||
lgInfoStartup("SIEMENS: tryConnect");
|
||||
lastConnectTry = DateTime.Now;
|
||||
tryConnect();
|
||||
lgInfo("End init Adapter SIEMENS");
|
||||
lgInfoStartup("End init Adapter SIEMENS");
|
||||
if (isVerboseLog)
|
||||
{
|
||||
lgInfo("S7+ CONNESSIONE AVVENUTA");
|
||||
@@ -1602,27 +1602,27 @@ namespace IOB_WIN_NEXT
|
||||
public override void tryConnect()
|
||||
{
|
||||
bool doLog = (verboseLog || periodicLog);
|
||||
lgInfo("SIEMENS: tryConnect step 01");
|
||||
lgInfoStartup("SIEMENS: tryConnect step 01");
|
||||
if (!connectionOk)
|
||||
{
|
||||
// SE è necessario refresh...
|
||||
if (needRefresh)
|
||||
{
|
||||
lgInfo("SIEMENS: tryConnect step 02");
|
||||
lgInfoStartup("SIEMENS: tryConnect step 02");
|
||||
|
||||
// reimporto parametri PLC se necessario...
|
||||
setParamPlc();
|
||||
}
|
||||
lgInfo("SIEMENS: tryConnect step 03");
|
||||
lgInfoStartup("SIEMENS: tryConnect step 03");
|
||||
|
||||
// controllo che il ping sia stato tentato almeno pingTestSec fa...
|
||||
if (DateTime.Now.Subtract(lastPING).TotalSeconds > utils.CRI("pingTestSec"))
|
||||
{
|
||||
if (doLog)
|
||||
{
|
||||
lgInfo("SIEMENS: ConnKO - tryConnect");
|
||||
lgInfoStartup("SIEMENS: ConnKO - tryConnect");
|
||||
}
|
||||
lgInfo("SIEMENS: tryConnect step 04");
|
||||
lgInfoStartup("SIEMENS: tryConnect step 04");
|
||||
|
||||
// in primis salvo data ping...
|
||||
lastPING = DateTime.Now;
|
||||
@@ -1638,7 +1638,7 @@ namespace IOB_WIN_NEXT
|
||||
szStatusConnection = "OPEN";
|
||||
parentForm.commPlcActive = false;
|
||||
connectionOk = true;
|
||||
lgInfo($"StatusConnection: {szStatusConnection}");
|
||||
lgInfoStartup($"StatusConnection: {szStatusConnection}");
|
||||
// refresh stato allarmi!!!
|
||||
if (connectionOk)
|
||||
{
|
||||
|
||||
@@ -253,13 +253,14 @@ namespace IOB_WIN_NEXT
|
||||
taskVal = $"VALUE DB1275.92 --> {counterMes2Plc}";
|
||||
break;
|
||||
|
||||
case taskType.endProd:
|
||||
case taskType.startSetup:
|
||||
// processo scrittura BIT x richiesta nuovo ordine a INIZIO setup --> è DINT!
|
||||
MemBlock = new byte[2];
|
||||
MemBlock[0] = (byte)1;
|
||||
MemBlock[1] = (byte)1;
|
||||
memAddrWrite = "DB1275.DBB94";
|
||||
lgInfo("Chiamata startSetup");
|
||||
lgInfo($"Chiamata startSetup | memAddrWrite: {memAddrWrite} | MemBlock: {MemBlock}");
|
||||
break;
|
||||
|
||||
case taskType.stopSetup:
|
||||
@@ -268,7 +269,7 @@ namespace IOB_WIN_NEXT
|
||||
MemBlock[0] = (byte)0;
|
||||
MemBlock[1] = (byte)0;
|
||||
memAddrWrite = "DB1275.DBB94";
|
||||
lgInfo("Chiamata stopSetup");
|
||||
lgInfo($"Chiamata stopSetup | memAddrWrite: {memAddrWrite} | MemBlock: {MemBlock}");
|
||||
break;
|
||||
|
||||
default:
|
||||
|
||||
@@ -622,7 +622,6 @@ namespace IOB_WIN_NEXT
|
||||
int byteSize = 0;
|
||||
byte[] MemBlock = new byte[1];
|
||||
string memAddrWrite = "";
|
||||
bool fatto = false;
|
||||
string serObj = "";
|
||||
if (updatedPar != null)
|
||||
{
|
||||
@@ -632,8 +631,6 @@ namespace IOB_WIN_NEXT
|
||||
try
|
||||
{
|
||||
memAddrWrite = "";
|
||||
int valInt = 0;
|
||||
uint valUInt = 0;
|
||||
// cerco in area memMapWrite...
|
||||
if (memMap.mMapWrite.ContainsKey(item.uid))
|
||||
{
|
||||
|
||||
@@ -40,20 +40,23 @@ namespace IOB_WIN_NEXT
|
||||
|
||||
private CancellationTokenSource cts;
|
||||
|
||||
//private Action<object> dispatcher;
|
||||
private System.Threading.Tasks.Task dispatchertask;
|
||||
|
||||
#if false
|
||||
//private Action<object> dispatcher;
|
||||
private int eventHandle;
|
||||
|
||||
private int SegnalazioniADSEventHandle, StatusChangedEventHandle, MessageQueuedEventHandle;
|
||||
|
||||
private int notifyposition;
|
||||
#endif
|
||||
private AdsStream notifyStream;
|
||||
|
||||
private object lockobj = new object();
|
||||
|
||||
private AdsStream newNotificationStream;
|
||||
|
||||
private int notifyposition;
|
||||
|
||||
private AdsStream notifyStream;
|
||||
|
||||
private int SegnalazioniADSEventHandle, StatusChangedEventHandle, MessageQueuedEventHandle;
|
||||
|
||||
private Symbol StatoMacchina;
|
||||
|
||||
@@ -135,7 +138,9 @@ namespace IOB_WIN_NEXT
|
||||
StatoMacchina.NotificationSettings = new AdsNotificationSettings(AdsTransMode.OnChange, 100, 100);
|
||||
StatoMacchina.ValueChanged += StatoMacchina_ValueChanged;
|
||||
|
||||
notifyposition = 0;
|
||||
#if false
|
||||
notifyposition = 0;
|
||||
#endif
|
||||
cts = new CancellationTokenSource();
|
||||
|
||||
//adsClient.AdsNotification += new AdsNotificationEventHandler(adsClient_AdsNotification);
|
||||
|
||||
Reference in New Issue
Block a user