diff --git a/IOB-WIN-NEXT/DATA/CONF/MAIN.ini b/IOB-WIN-NEXT/DATA/CONF/MAIN.ini
index f8878734..39af00fa 100644
--- a/IOB-WIN-NEXT/DATA/CONF/MAIN.ini
+++ b/IOB-WIN-NEXT/DATA/CONF/MAIN.ini
@@ -47,6 +47,7 @@ CLI_INST=SteamWareSim
;NB: mettere copy always ai file di conf x fare test...
;STARTLIST=FTP_SONATEST
;STARTLIST=SIMUL_01
-STARTLIST=L020
+STARTLIST=VL27
+;STARTLIST=L020
MAXCNC=10
\ No newline at end of file
diff --git a/IOB-WIN-NEXT/IOB-WIN-NEXT.csproj b/IOB-WIN-NEXT/IOB-WIN-NEXT.csproj
index fa1d0b2a..99d0e358 100644
--- a/IOB-WIN-NEXT/IOB-WIN-NEXT.csproj
+++ b/IOB-WIN-NEXT/IOB-WIN-NEXT.csproj
@@ -551,8 +551,12 @@
PreserveNewest
-
-
+
+ Always
+
+
+ Always
+
Always
diff --git a/IOB-WIN-NEXT/Iob/Fanuc.cs b/IOB-WIN-NEXT/Iob/Fanuc.cs
index 06d95987..90d1553f 100644
--- a/IOB-WIN-NEXT/Iob/Fanuc.cs
+++ b/IOB-WIN-NEXT/Iob/Fanuc.cs
@@ -1,7 +1,9 @@
using EgwProxy.MultiCncLib.CNC;
using IOB_UT_NEXT;
+using KRcc;
using MapoSDK;
using Newtonsoft.Json;
+using Opc.Ua;
using System;
using System.Collections.Generic;
using System.Data.SqlTypes;
@@ -398,9 +400,14 @@ namespace IOB_WIN_NEXT.Iob
lgInfo($"Chiamata stopSetup: taskOk: {taskOk} | taskVal: {taskVal}");
break;
+ case taskType.setParameter:
+ lgInfo($"Chiamata setParameter | NO processing: taskOk: {taskOk} | taskVal: {taskVal}");
+ taskVal = "setParameter | SKIPPED | NO EXEC";
+ break;
+
default:
- taskVal = "SKIPPED | NO EXEC";
lgInfo($"Chiamata default senza processing: taskOk: {taskOk} | taskVal: {taskVal}");
+ taskVal = "SKIPPED | NO EXEC";
break;
}
// aggiungo task!
@@ -428,10 +435,16 @@ namespace IOB_WIN_NEXT.Iob
{
parentForm.commPlcActive = true;
// provo ad usare SEMPRE double...
+ short zeroVal = 0;
+ // in primis scrivo reset a zero...
+ answ = FANUC_ref.F_RW_Macro_Short(bWrite, memIndex, ref zeroVal);
+ // ora scrivo vero valore...
answ = FANUC_ref.F_RW_Macro_Short(bWrite, memIndex, ref Value);
}
- catch
- { }
+ catch (Exception exc)
+ {
+ lgError($"Eccezione in FanucMemMacroRW | Short{Environment.NewLine}{exc}");
+ }
}
}
parentForm.commPlcActive = false;
@@ -455,10 +468,16 @@ namespace IOB_WIN_NEXT.Iob
try
{
parentForm.commPlcActive = true;
+ short zeroVal = 0;
+ // in primis scrivo reset a zero...
+ answ = FANUC_ref.F_RW_Macro_Short(bWrite, memIndex, ref zeroVal);
+ // ora scrivo vero valore...
answ = FANUC_ref.F_RW_Macro_Double(bWrite, memIndex, ref Value);
}
- catch
- { }
+ catch (Exception exc)
+ {
+ lgError($"Eccezione in FanucMemMacroRW | Double{Environment.NewLine}{exc}");
+ }
}
}
parentForm.commPlcActive = false;
@@ -1076,11 +1095,10 @@ namespace IOB_WIN_NEXT.Iob
{
cntAddr = 9999;
}
-
// processo SET contapezzi (lavorati)
stopwatch.Restart();
double vTransf = (double)0;
- FANUC_ref.F_RW_Macro_Double(true, cntAddr, ref vTransf);
+ answ = FanucMemMacroRW(true, cntAddr, ref vTransf);
if (utils.CRB("recTime"))
{
TimingData.addResult(cIobConf.codIOB, "MACRO-SHORT", stopwatch.ElapsedTicks);
@@ -1199,8 +1217,10 @@ namespace IOB_WIN_NEXT.Iob
lgTrace($"MACRO | ART Write 01 | memName: {memAddr} | idx: {cntAddr}");
// processo SET contapezzi (lavorati)
stopwatch.Restart();
+ // comincio scrivendo reset a zero x cominciare...
+
double vTransf = (double)valReq;
- answ = FANUC_ref.F_RW_Macro_Double(true, cntAddr, ref vTransf);
+ answ = FanucMemMacroRW(true, cntAddr, ref vTransf);
lgTrace($"MACRO | ART Write 02 | memName: {memAddr} | valReq: {valReq} | vTransf: {vTransf}");
if (utils.CRB("recTime"))
{
@@ -1249,7 +1269,7 @@ namespace IOB_WIN_NEXT.Iob
// processo SET contapezzi (lavorati)
stopwatch.Restart();
double vTransf = (double)valReq;
- answ = FANUC_ref.F_RW_Macro_Double(true, cntAddr, ref vTransf);
+ answ = FanucMemMacroRW(true, cntAddr, ref vTransf);
lgTrace($"MACRO | Com Write 02 | memName: {memAddr} | valReq: {valReq} | vTransf: {vTransf}");
if (utils.CRB("recTime"))
{
@@ -1330,9 +1350,24 @@ namespace IOB_WIN_NEXT.Iob
lgTrace($"MACRO | Pz Write 01 | memName: {memAddr} | idx: {cntAddr}");
// processo SET contapezzi (lavorati)
stopwatch.Restart();
- double vTransf = (double)pzReq;
- answ = FANUC_ref.F_RW_Macro_Double(true, cntAddr, ref vTransf);
- lgTrace($"MACRO | Com Write 02 | memName: {memAddr} | pzReq: {pzReq} | vTransf: {vTransf}");
+ // se > 2^16 scrivo con INT, sennò con double...
+ short valTrShr = 0;
+ double valTrDbl = 0;
+ if (pzReq < Math.Pow(2, 16))
+ {
+ valTrShr = (short)pzReq;
+ answ = FanucMemMacroRW(true, cntAddr, ref valTrShr);
+ //answ = FANUC_ref.F_RW_Macro_Short(true, cntAddr, ref valTrShr);
+ lgTrace($"MACRO | Com Write 02 SHORT | memName: {memAddr} | pzReq: {pzReq} | valTrShr: {valTrShr}");
+ }
+ // sennò double!
+ else
+ {
+ valTrDbl = (double)pzReq;
+ answ = FanucMemMacroRW(true, cntAddr, ref valTrDbl);
+ //answ = FANUC_ref.F_RW_Macro_Double(true, cntAddr, ref valTrDbl);
+ lgTrace($"MACRO | Com Write 02 DOUBLE | memName: {memAddr} | pzReq: {pzReq} | valTrDbl: {valTrDbl}");
+ }
if (utils.CRB("recTime"))
{
TimingData.addResult(cIobConf.codIOB, "MACRO-SHORT", stopwatch.ElapsedTicks);
@@ -1382,7 +1417,7 @@ namespace IOB_WIN_NEXT.Iob
}
catch (Exception exc)
{
- lgError(exc, "Errore in SET PzReq Commessa FANUC");
+ lgError($"Errore in SET PzReq Commessa FANUC{Environment.NewLine}{exc}");
connectionOk = false;
}
answ = true;
diff --git a/IOB-WIN-NEXT/postBuildTgt.bat b/IOB-WIN-NEXT/postBuildTgt.bat
index b3f3386d..f9028e2e 100644
--- a/IOB-WIN-NEXT/postBuildTgt.bat
+++ b/IOB-WIN-NEXT/postBuildTgt.bat
@@ -70,7 +70,8 @@ REM IOB-WIN-SIM
REM ROBOCOPY . \\IOB-WIN-SIMULA\Steamware\IOB-WIN-NEXT-DEB /MIR
REM IOBVPN4MACHINE
-ROBOCOPY . \\10.51.90.5\Steamware\IOB-WIN-NEXT-DEB /MIR
+REM ROBOCOPY . \\10.51.90.5\Steamware\IOB-WIN-NEXT-DEB /MIR
+ROBOCOPY . \\10.51.90.6\Steamware\IOB-WIN-NEXT-DEB /MIR
goto END
diff --git a/TestPrelimCli/Mitsubishi/Program.cs b/TestPrelimCli/Mitsubishi/Program.cs
index 17fef761..a77ada93 100644
--- a/TestPrelimCli/Mitsubishi/Program.cs
+++ b/TestPrelimCli/Mitsubishi/Program.cs
@@ -102,6 +102,23 @@ namespace Mitsubishi
DoLog(sep);
DoLog("");
+ DoLog(sep);
+ DoLog("Test CycleTyme");
+ DoLog(sep);
+ // preparo memorie
+ int plTime = 0;
+ try
+ {
+ oEZNcAutCom.Status_GetCycleTime(out plTime);
+ DoLog($"GetCycleTime | Time: {plTime}");
+ }
+ catch (Exception exc)
+ {
+ DoLog($"{exc}");
+ }
+ DoLog(sep);
+ DoLog("");
+
DoLog(sep);
DoLog("Test Lettura posizioni");
DoLog(sep);
@@ -117,6 +134,7 @@ namespace Mitsubishi
DoLog(sep);
DoLog("Test scrittura Var500");
DoLog(sep);
+ // NB: max 7 char!!!
oEZNcAutCom.CommonVariable_SetName(500, "ODL");
oEZNcAutCom.CommonVariable_SetName(501, "CodArt");
oEZNcAutCom.CommonVariable_SetName(502, "NumPz");
@@ -248,7 +266,6 @@ namespace Mitsubishi
DoLog(sep);
DoLog("");
-
DoLog(sep);
DoLog("Test RunStatus");
DoLog(sep);