EgtMachKernel 1.6x5 :
- ora OnSpecialApplyDisposition gestisce anche TcPos - aggiunta possibilità di richiamo OnPostApplyMachining al termine ricalcolo lavorazione - aggiunta funzione Lua EmtGetAxesPos - piccole migliorie a simulazione.
This commit is contained in:
+23
-10
@@ -657,6 +657,20 @@ Simulator::UpdateAxesPos( void)
|
||||
return true ;
|
||||
}
|
||||
|
||||
//----------------------------------------------------------------------------
|
||||
bool
|
||||
Simulator::ResetAuxAxes( void)
|
||||
{
|
||||
// pulisco dati assi ausiliari
|
||||
m_AuxAxesName.clear() ;
|
||||
m_AuxAxesToken.clear() ;
|
||||
m_AuxAxesInvert.clear() ;
|
||||
m_AuxAxesLinear.clear() ;
|
||||
m_AuxAxesVal.clear() ;
|
||||
m_AuxAxesEnd.clear() ;
|
||||
return true ;
|
||||
}
|
||||
|
||||
//----------------------------------------------------------------------------
|
||||
bool
|
||||
Simulator::OnOperationEnd( void)
|
||||
@@ -868,14 +882,6 @@ Simulator::OnPathEnd( void)
|
||||
bool
|
||||
Simulator::OnMoveStart( const CamData* pCamData)
|
||||
{
|
||||
// pulisco dati assi ausiliari
|
||||
m_AuxAxesName.clear() ;
|
||||
m_AuxAxesToken.clear() ;
|
||||
m_AuxAxesInvert.clear() ;
|
||||
m_AuxAxesLinear.clear() ;
|
||||
m_AuxAxesVal.clear() ;
|
||||
m_AuxAxesEnd.clear() ;
|
||||
|
||||
// recupero e assegno i dati
|
||||
// dati generali
|
||||
bool bOk = m_pMachine->LuaSetGlobVar( GLOB_VAR + GVAR_MOVEID, m_nEntId) ;
|
||||
@@ -899,16 +905,23 @@ Simulator::OnMoveStart( const CamData* pCamData)
|
||||
bOk = bOk && m_pMachine->LuaResetGlobVar( GLOB_VAR + GVAR_AUXAXES) ;
|
||||
|
||||
// verifico esistenza funzione
|
||||
if ( ! m_pMachine->LuaExistsFunction( ON_SIMUL_MOVE_START))
|
||||
if ( ! m_pMachine->LuaExistsFunction( ON_SIMUL_MOVE_START)) {
|
||||
ResetAuxAxes() ;
|
||||
return bOk ;
|
||||
}
|
||||
// chiamo la funzione
|
||||
bOk = bOk && m_pMachine->LuaCallFunction( ON_SIMUL_MOVE_START) ;
|
||||
if ( ! bOk)
|
||||
if ( ! bOk) {
|
||||
ResetAuxAxes() ;
|
||||
return false ;
|
||||
}
|
||||
|
||||
// forzo aggiornamento posizione assi (possono essere stati mossi nello script)
|
||||
UpdateAxesPos() ;
|
||||
|
||||
// reset assi ausiliari
|
||||
ResetAuxAxes() ;
|
||||
|
||||
// recupero i dati di ritorno
|
||||
int nNumAuxAxes = 0 ;
|
||||
if ( ! m_pMachine->LuaGetGlobVar( GLOB_VAR + GVAR_AUXAXES, nNumAuxAxes) || nNumAuxAxes == 0)
|
||||
|
||||
Reference in New Issue
Block a user