Fix errore lettura conf BeckHoff
This commit is contained in:
@@ -58,7 +58,7 @@ namespace IOB_WIN_NEXT
|
||||
|
||||
private void AdsCli_ValueChanged(TcAdsClient sender, string key, string value)
|
||||
{
|
||||
lg.Info($"Status changed | sender: {sender} | key: {key} | value: {value}");
|
||||
lg.Info($"Monitored Value changed | sender: {sender} | key: {key} | value: {value}");
|
||||
}
|
||||
|
||||
#endregion Private Methods
|
||||
@@ -138,7 +138,7 @@ namespace IOB_WIN_NEXT
|
||||
// predispongo dataVal
|
||||
foreach (var item in memMap.mMapRead)
|
||||
{
|
||||
dataVal.Add(item.Key);
|
||||
dataVal.Add(item.Value.memAddr);
|
||||
}
|
||||
|
||||
// vera connessione!
|
||||
|
||||
@@ -52,15 +52,6 @@ namespace IOB_WIN_NEXT
|
||||
{
|
||||
tryConnect();
|
||||
}
|
||||
#if false
|
||||
// FIXME leggere conf da file parametri
|
||||
int port = 851;
|
||||
int.TryParse(IOBConf.cncPort, out port);
|
||||
string addr = !string.IsNullOrEmpty(IOBConf.cncIpAddr) ? IOBConf.cncIpAddr : "local";
|
||||
lgInfo($"Parametri TC client | addr: {addr} | port: {port}");
|
||||
AdsCli = new TcAdsClient(dataVal, addr, port);
|
||||
//AdsCli = new TcAdsClient(dataVal, "5.97.72.66.1.1", 851);
|
||||
#endif
|
||||
if (AdsCli != null)
|
||||
{
|
||||
readCurrVal();
|
||||
|
||||
Reference in New Issue
Block a user