aggiunto blink comunicazione x OSAI/SIEMENS ove mancante...
This commit is contained in:
@@ -209,6 +209,7 @@ namespace MTC_Adapter
|
||||
string szStatusConnection = "";
|
||||
try
|
||||
{
|
||||
parentForm.commPlcActive = true;
|
||||
OSAI_ref.Disconnect(ref szStatusConnection);
|
||||
connectionOk = false;
|
||||
lg.Info(szStatusConnection);
|
||||
@@ -218,6 +219,7 @@ namespace MTC_Adapter
|
||||
{
|
||||
lg.Fatal(exc, "Errore nella disconnessione dall'adapter OSAI");
|
||||
}
|
||||
parentForm.commPlcActive = false;
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -234,6 +236,7 @@ namespace MTC_Adapter
|
||||
string szStatusConnection = "";
|
||||
try
|
||||
{
|
||||
parentForm.commPlcActive = true;
|
||||
OSAI_ref.Connect(ref szStatusConnection);
|
||||
lg.Info("szStatusConnection: " + szStatusConnection);
|
||||
connectionOk = true;
|
||||
@@ -263,6 +266,7 @@ namespace MTC_Adapter
|
||||
connectionOk = false;
|
||||
lg.Info(string.Format("Segnalo Adapter NON running, pausa di {0} msec prima di ulteriori tentativi di riconnessione", utils.CRI("waitRecMSec")));
|
||||
}
|
||||
parentForm.commPlcActive = false;
|
||||
}
|
||||
}
|
||||
/// <summary>
|
||||
@@ -558,18 +562,22 @@ namespace MTC_Adapter
|
||||
#if false
|
||||
// il codice è corretto (manca prima aprte codice + traduzione), se cerco di trovare oggett completo NON c'è, verificare con Andrea...
|
||||
sb1.AppendLine(string.Format("Allarmi CNC: {0}", allNcData.lastncerror));
|
||||
|
||||
|
||||
parentForm.commPlcActive = true;
|
||||
inizio = DateTime.Now;
|
||||
OSAI_ref.O_ReadCurrentErrorMsg(ref allarmiCNC);
|
||||
if (utils.CRB("recTime")) TimingData.addResult("R-CNC-ERROR-MSG", DateTime.Now.Subtract(inizio).Ticks);
|
||||
parentForm.commPlcActive = false;
|
||||
checkCNCAlarms();
|
||||
#endif
|
||||
#if false
|
||||
// provo altri metodi...
|
||||
parentForm.commPlcActive = true;
|
||||
CMSCncLib.OPENcontrol.MSGEMERGENCY emergCNC = new CMSCncLib.OPENcontrol.MSGEMERGENCY();
|
||||
OSAI_ref.O_ReadCurrentEmergMsg(ref emergCNC);
|
||||
CMSCncLib.OPENcontrol.MSGANOMALY anomCNC = new CMSCncLib.OPENcontrol.MSGANOMALY();
|
||||
OSAI_ref.O_ReadCurrentAnomalyMsg(ref anomCNC);
|
||||
parentForm.commPlcActive = false;
|
||||
#endif
|
||||
}
|
||||
else
|
||||
@@ -888,10 +896,12 @@ namespace MTC_Adapter
|
||||
|
||||
// NON ci sono nella documentazione metodi x recuperare posizione PuntaUtensile, in attesa news da OSAI/Andrea...
|
||||
#if false
|
||||
|
||||
|
||||
parentForm.commPlcActive = true;
|
||||
inizio = DateTime.Now;
|
||||
CMSCncLib.Focas1.ODB5AXMAN vettTTCoord = OSAI_ref.getPathTTCoord();
|
||||
if (utils.CRB("recTime")) TimingData.addResult("R-TTCoord", DateTime.Now.Subtract(inizio).Ticks);
|
||||
parentForm.commPlcActive = false;
|
||||
#endif
|
||||
|
||||
// ciclo su path
|
||||
|
||||
@@ -211,6 +211,7 @@ namespace MTC_Adapter
|
||||
string szStatusConnection = "";
|
||||
try
|
||||
{
|
||||
parentForm.commPlcActive = true;
|
||||
SIEMENS_ref.Connect(ref szStatusConnection);
|
||||
lg.Info("szStatusConnection: " + szStatusConnection);
|
||||
connectionOk = true;
|
||||
@@ -240,6 +241,7 @@ namespace MTC_Adapter
|
||||
connectionOk = false;
|
||||
lg.Info(string.Format("Segnalo Adapter NON running, pausa di {0} msec prima di ulteriori tentativi di riconnessione", utils.CRI("waitRecMSec")));
|
||||
}
|
||||
parentForm.commPlcActive = false;
|
||||
}
|
||||
}
|
||||
/// <summary>
|
||||
@@ -530,11 +532,13 @@ namespace MTC_Adapter
|
||||
//// 2017.05.09 gestione allarmi commentata
|
||||
//// il codice è corretto (manca prima aprte codice + traduzione), se cerco di trovare oggett completo NON c'è, verificare con Andrea...
|
||||
//sb1.AppendLine(string.Format("Allarmi CNC: {0}", allNcData.lastncerror));
|
||||
|
||||
|
||||
parentForm.commPlcActive = true;
|
||||
//inizio = DateTime.Now;
|
||||
//OSAI_ref.O_ReadCurrentErrorMsg(ref allarmiCNC);
|
||||
//if (utils.CRB("recTime")) TimingData.addResult("R-CNC-ERROR-MSG", DateTime.Now.Subtract(inizio).Ticks);
|
||||
//checkCNCAlarms();
|
||||
parentForm.commPlcActive = false;
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user