diff --git a/IOB-WIN/App.config b/IOB-WIN/App.config
index 8e331eb9..42a5beda 100644
--- a/IOB-WIN/App.config
+++ b/IOB-WIN/App.config
@@ -7,6 +7,8 @@
+
+
diff --git a/IOB-WIN/IobFanuc.cs b/IOB-WIN/IobFanuc.cs
index 14e59e02..98eed687 100644
--- a/IOB-WIN/IobFanuc.cs
+++ b/IOB-WIN/IobFanuc.cs
@@ -318,29 +318,54 @@ namespace IOB_WIN
///
public override void processContapezzi()
{
- base.processContapezzi();
-
- try
+ //base.processContapezzi();
+ if (utils.CRB("enableContapezzi"))
{
- object output = new object();
- // deve usare F_RW_Param_Integer
- FANUC_ref.F_RW_Param_Integer(false, 6711, 3, ref output);
- lg.Info(string.Format("Contapezzi 6711: {0}", output));
- FANUC_ref.F_RW_Param_Integer(false, 6712, 3, ref output);
- lg.Info(string.Format("Contapezzi 6712: {0}", output));
- FANUC_ref.F_RW_Param_Integer(false, 6713, 3, ref output);
- lg.Info(string.Format("Contapezzi 6713: {0}", output));
+ try
+ {
+ object output = new object();
+ // deve usare F_RW_Param_Integer
+ FANUC_ref.F_RW_Param_Integer(false, 6711, 3, ref output);
+ lg.Info(string.Format("Contapezzi 6711: {0}", output));
+ FANUC_ref.F_RW_Param_Integer(false, 6712, 3, ref output);
+ lg.Info(string.Format("Contapezzi 6712: {0}", output));
+ FANUC_ref.F_RW_Param_Integer(false, 6713, 3, ref output);
+ lg.Info(string.Format("Contapezzi 6713: {0}", output));
- // 6711: pezzi lavorati
- // 6712: pezzi lavorati totali
- // 6713: pezzi richiesti
+ // 6711: pezzi lavorati
+ // 6712: pezzi lavorati totali
+ // 6713: pezzi richiesti
- // output!
+ // output!
+ }
+ catch (Exception exc)
+ {
+ lg.Error(exc, "Errore in contapezzi FANUC");
+ }
}
- catch(Exception exc)
+ }
+
+ public override void processMode()
+ {
+ //base.processMode();
+ if (utils.CRB("enableMode"))
{
- lg.Error(exc, "Errore in contapezzi FANUC");
+ try
+ {
+ inizio = DateTime.Now;
+ int memIndex = 43;
+ byte[] MemBlock = new byte[1];
+ if (verboseLog) lg.Info("START ProcessMode");
+ FanucMemRW(R, FANUC.MemType.G, memIndex, ref MemBlock);
+ if (verboseLog) lg.Info("END ProcessMode");
+ if (utils.CRB("recTime")) TimingData.addResult(string.Format("R{0}-G43", MemBlock.Length), DateTime.Now.Subtract(inizio).Ticks);
+ lg.Info(string.Format("Mode G43: {0:X}", MemBlock[0]));
+ }
+ catch (Exception exc)
+ {
+ lg.Error(exc, "Errore in process Mode G43");
+ }
}
}
}
diff --git a/IOB-WIN/IobGeneric.cs b/IOB-WIN/IobGeneric.cs
index 1826315b..e8bffef2 100644
--- a/IOB-WIN/IobGeneric.cs
+++ b/IOB-WIN/IobGeneric.cs
@@ -398,6 +398,7 @@ namespace IOB_WIN
else if (ciclo == gatherCycle.MF)
{
processProgram();
+ processMode();
processContapezzi();
}
else if (ciclo == gatherCycle.LF)
@@ -1494,10 +1495,15 @@ namespace IOB_WIN
displayOutData();
}
///
- /// Effettua processing contapezzi 8ed eventualmente alza il bit di contapezzo...)
+ /// Effettua processing contapezzi (ed eventualmente alza il bit di contapezzo...)
///
public virtual void processContapezzi()
{ }
+ ///
+ /// Effettua processing mode/status (EDIT/MDI/...)
+ ///
+ public virtual void processMode()
+ { }
#endregion
@@ -1591,7 +1597,7 @@ namespace IOB_WIN
}
return newString;
}
-
+
#endregion
}