Update FANUC x testare valori nuova ghiringhelli JETCO

This commit is contained in:
Samuele Locatelli
2024-05-15 16:06:44 +02:00
parent 9b00843ced
commit ab2c19587c
3 changed files with 21 additions and 3 deletions
+2
View File
@@ -81,6 +81,8 @@ ENABLE_SEND_PZC_BLOCK=TRUE
MIN_SEND_PZC_BLOCK=0
MAX_SEND_PZC_BLOCK=100
DISABLE_SEND_WDST=TRUE
; bit da scrivere come trace ad ogni check
MEM_2_TRACE=|BIT4|
[BRANCH]
NAME=master
+15 -3
View File
@@ -93,6 +93,9 @@ namespace IOB_WIN_NEXT.Iob
}
}
// leggo conf x ricerca valori memoria da tracciare in log di continuo...
mem2trace = fIni.ReadString("MEMORY", "MEM_2_TRACE", "");
// è little endian (NON serve conversione)
hasBigEndian = false;
lgInfoStartup("Start init Adapter FANUC all'IP {0}:{1} per IOB {2}", IOBConf.cncIpAddr, IOBConf.cncPort, IOBConf.codIOB);
@@ -1269,9 +1272,13 @@ namespace IOB_WIN_NEXT.Iob
invSignal = false;
// cerco se sia inverse (primo char "!") --> registro e elimino char...
invSignal = bVal.StartsWith("!");
if(invSignal)
// se è da tracciare...
if (mem2trace.Contains($"|{bKey}|"))
{
lg.Trace($"Segnale invertito | bVal: {bVal}");
if (invSignal)
{
lgTrace($"Segnale invertito | bVal: {bVal}");
}
}
// tolgo comunque inversione...
bVal = bVal.Replace("!", "");
@@ -1317,7 +1324,6 @@ namespace IOB_WIN_NEXT.Iob
{
B_input += 1 << i;
}
lg.Trace($"Valore invertito | bVal: {bVal} | byte2check: {byte2check} | bitNum: {bitNum} | i: {i} | B_input: {B_input}");
}
else
{
@@ -1327,6 +1333,12 @@ namespace IOB_WIN_NEXT.Iob
B_input += 1 << i;
}
}
// se è da tracciare...
if (mem2trace.Contains($"|{bKey}|"))
{
lgTrace($"Valore | bKey: {bKey} | bVal: {bVal} | byte2check: {byte2check} | bitNum: {bitNum} | i: {i} | B_input: {B_input}");
}
}
}
}
+4
View File
@@ -1,7 +1,9 @@
using EgwProxy.Ftp;
using EgwProxy.MultiCncLib.App.Native;
using IOB_UT_NEXT;
using MapoSDK;
using MathNet.Numerics.Statistics;
using MTConnect.Clients;
using Newtonsoft.Json;
using Newtonsoft.Json.Linq;
using NLog;
@@ -93,6 +95,8 @@ namespace IOB_WIN_NEXT.Iob
}
}
protected string mem2trace = "";
#endregion Public Constructors
#region Public Events