EgtMachKernel 2.5d1 :

- eliminata la necessità di testa dummy per disposizioni con comandi StartAux o EndAux e senza movimenti diretti.
This commit is contained in:
DarioS
2023-04-03 08:50:46 +02:00
parent 025eea9c0f
commit 6378dddcdf
5 changed files with 20 additions and 16 deletions
+2 -2
View File
@@ -1353,7 +1353,7 @@ Disposition::SpecialApply( bool bRecalc)
bOk = bOk && pMch->LuaResetGlobVar( EMC_VAR) ;
// segnalo errori ed esco
if ( ! bOk || nErr > 0) {
m_nShifts = - 1 ;
m_nShifts = -2 ;
string sOut = sMsg ;
if ( IsEmptyOrSpaces( sOut))
sOut = " Error in " + ON_SPECIAL_APPLY + " (" + ToString( nErr) + ")" ;
@@ -1393,7 +1393,7 @@ Disposition::SpecialUpdate( void)
// se disposizione vuota, esco
if ( m_nShifts <= 0) {
if ( m_nShifts < 0)
if ( m_nShifts == -2)
m_pMchMgr->SetWarning( 2052, "Warning in Disposition : No shifts") ;
return true ;
}
+9 -7
View File
@@ -56,14 +56,14 @@ class Disposition : public Operation
{ return true ; }
bool Save( int nBaseId, STRVECTOR& vString) const override ;
bool Load( const STRVECTOR& vString, int nBaseGdbId) override ;
public : // Operation
int GetType( void) const override
{ return OPER_DISP ; }
bool IsEmpty( void) const override
{ return ( m_nShifts == 0) ; }
int GetType( void) const override
{ return OPER_DISP ; }
bool IsEmpty( void) const override
{ return ( m_nShifts == 0) ; }
bool UpdateStatus( int nModif) override
{ m_nStatus |= nModif ; return true ; }
{ m_nStatus |= nModif ; return true ; }
protected : // Operation
const std::string& GetToolName( void) const override ;
@@ -71,7 +71,7 @@ class Disposition : public Operation
int GetExitNbr( void) const override ;
const std::string& GetToolTcPos( void) const override ;
int GetSolCh( void) const override
{ return 0 ; }
{ return 0 ; }
bool NeedPrevHome( void) const override ;
public :
@@ -111,6 +111,8 @@ class Disposition : public Operation
bool GetToolData( std::string& sName, std::string& sHead, int& nExit, std::string& sTcPos) const ;
bool GetSomeByHand( void) const
{ return m_bSomeByHand ; }
bool IsWithTool( void)
{ return ( m_nShifts != -1) ;}
private :
bool InsertMoveInfoInList( int nRawId, int nType, const Point3d& ptP, int nFlag) ;
BIN
View File
Binary file not shown.
+2 -2
View File
@@ -184,8 +184,8 @@ Processor::ProcessDisposition( int nOpId, int nOpInd)
bool bEmpty = pDisp->IsEmpty() ;
bool bSomeByHand = pDisp->GetSomeByHand() ;
// Se disposizione con movimenti macchina
if ( ! pDisp->IsEmpty()) {
// Se disposizione con movimenti autonomi e utensile associato
if ( ! pDisp->IsEmpty() && pDisp->IsWithTool()) {
// Recupero l'utensile della disposizione corrente
string sTool ; string sHead ; int nExit ; string sTcPos ;
if ( ! pDisp->GetToolData( sTool, sHead, nExit, sTcPos))
+7 -5
View File
@@ -687,11 +687,13 @@ Simulator::FindAndManageOperationStart( bool bStart, bool bFirst, int& nStatus)
}
// cambio fase
m_pMchMgr->SetCurrPhase( nPhase, ( nPhase == 1)) ;
// aggiorno utensile e assi conseguenti
int nErr ;
if ( ! UpdateTool( bFirst, nErr)) {
nStatus = CalcStatusOnError( nErr) ;
return false ;
// se previsto, aggiorno utensile e assi conseguenti
if ( pDisp->IsWithTool()) {
int nErr ;
if ( ! UpdateTool( bFirst, nErr)) {
nStatus = CalcStatusOnError( nErr) ;
return false ;
}
}
++ m_nOpInd ;
// richiamo gestione evento inizio disposizione