EgtMachKernel 2.2g6 :
- ora se OnSpecialApplyDisposition assegna un valore negativo a EMC.ERR è un warning e non un errore.
This commit is contained in:
+8
-2
@@ -39,6 +39,7 @@ using namespace std ;
|
||||
// 2010 = "Error in Disposition : link outstroke xxx"
|
||||
// 2051 = "Table Ref1 changed : (xyz) -> (XYZ)"
|
||||
// 2052 = "Warning in Disposition : No shifts"
|
||||
// 2053 = "Warning in OnSpecialApplyDisposition (xxx)"
|
||||
|
||||
//----------------------------------------------------------------------------
|
||||
static string DIS_TABLE = "Tab" ;
|
||||
@@ -1317,7 +1318,7 @@ Disposition::SpecialApply( bool bRecalc)
|
||||
static const string EVAR_TABNAME = ".TABNAME" ; // IN (string) nome della tavola macchina
|
||||
static const string EVAR_DISPID = ".DISPID" ; // IN (int) identificativo della disposizione
|
||||
static const string EVAR_PHASE = ".PHASE" ; // IN (int) indice fase
|
||||
static const string EVAR_ERROR = ".ERR" ; // OUT (int) codice di errore ( 0 = ok)
|
||||
static const string EVAR_ERROR = ".ERR" ; // OUT (int) codice di errore ( 0 = ok, > 0 errore, < 0 warning)
|
||||
static const string EVAR_HEAD = ".HEAD" ; // OUT (string) nome della testa
|
||||
static const string EVAR_EXIT = ".EXIT" ; // OUT (int) indice dell'uscita
|
||||
static const string EVAR_TCPOS = ".TCPOS" ; // OUT (string) nome della posizione nel TC
|
||||
@@ -1348,12 +1349,17 @@ Disposition::SpecialApply( bool bRecalc)
|
||||
// reset
|
||||
bOk = bOk && pMch->LuaResetGlobVar( EMC_VAR) ;
|
||||
// segnalo errori ed esco
|
||||
if ( ! bOk || nErr != 0) {
|
||||
if ( ! bOk || nErr > 0) {
|
||||
m_nShifts = - 1 ;
|
||||
string sOut = " Error in " + ON_SPECIAL_APPLY + " (" + ToString( nErr) + ")" ;
|
||||
m_pMchMgr->SetLastError( 2006, sOut) ;
|
||||
return false ;
|
||||
}
|
||||
// recupero eventuale warning
|
||||
else if ( nErr < 0) {
|
||||
string sOut = " Warning in " + ON_SPECIAL_APPLY + " (" + ToString( nErr) + ")" ;
|
||||
m_pMchMgr->SetWarning( 2053, sOut) ;
|
||||
}
|
||||
|
||||
// eseguo aggiornamento assi macchina e collegamento con operazione precedente
|
||||
if ( ! SpecialUpdate())
|
||||
|
||||
Reference in New Issue
Block a user