commentato contapezzi, abilitata lettura mod G43

This commit is contained in:
Samuele E. Locatelli
2017-10-30 16:12:58 +01:00
parent 1019a11209
commit e66e0ea596
3 changed files with 52 additions and 19 deletions
+2
View File
@@ -7,6 +7,8 @@
<add key="appName" value="IOB-WIN" />
<add key="appVers" value="develop" />
<add key="enableTest" value="true" />
<add key="enableContapezzi" value="false" />
<add key="enableMode" value="true" />
<!--gestione TIMERS e periodi multipli x thread lenti-->
<add key="startTimerMs" value="250" />
<!-- ciclo corto x invio a server: ms -->
+42 -17
View File
@@ -318,29 +318,54 @@ namespace IOB_WIN
/// </summary>
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");
}
}
}
}
+8 -2
View File
@@ -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();
}
/// <summary>
/// Effettua processing contapezzi 8ed eventualmente alza il bit di contapezzo...)
/// Effettua processing contapezzi (ed eventualmente alza il bit di contapezzo...)
/// </summary>
public virtual void processContapezzi()
{ }
/// <summary>
/// Effettua processing mode/status (EDIT/MDI/...)
/// </summary>
public virtual void processMode()
{ }
#endregion
@@ -1591,7 +1597,7 @@ namespace IOB_WIN
}
return newString;
}
#endregion
}