EgtMachKernel :
- in simulazione aggiunta possibilità di gestire extra-corse di assi ausiliari in OnMoveStart - aggiunta funzione lua EmtSetOutstrokeInfo.
This commit is contained in:
+14
-3
@@ -891,11 +891,15 @@ Simulator::ManageMove( int& nStatus)
|
||||
// Se inizio di nuova entità
|
||||
if ( m_nEntId != GDB_ID_NULL && m_dCoeff < EPS_ZERO) {
|
||||
++ m_nEntInd ;
|
||||
if ( ! OnMoveStart( pCamData)) {
|
||||
int nErr ;
|
||||
if ( ! OnMoveStart( pCamData, nErr)) {
|
||||
if ( Stopped())
|
||||
return true ;
|
||||
else {
|
||||
nStatus = MCH_SIM_ERR ;
|
||||
if ( nErr == 1)
|
||||
nStatus = MCH_SIM_OUTSTROKE ;
|
||||
else
|
||||
nStatus = MCH_SIM_ERR ;
|
||||
return false ;
|
||||
}
|
||||
}
|
||||
@@ -1385,8 +1389,10 @@ Simulator::OnPathEndAux( int nInd, const string& sAE)
|
||||
|
||||
//----------------------------------------------------------------------------
|
||||
bool
|
||||
Simulator::OnMoveStart( const CamData* pCamData)
|
||||
Simulator::OnMoveStart( const CamData* pCamData, int& nErr)
|
||||
{
|
||||
// reset stato di errore da script
|
||||
nErr = 0 ;
|
||||
// recupero e assegno i dati
|
||||
// dati generali
|
||||
bool bOk = m_pMachine->LuaSetGlobVar( GLOB_VAR + GVAR_MOVEID, m_nEntId) ;
|
||||
@@ -1424,6 +1430,11 @@ Simulator::OnMoveStart( const CamData* pCamData)
|
||||
return false ;
|
||||
}
|
||||
|
||||
// verifico codice di errore
|
||||
m_pMachine->LuaGetGlobVar( GLOB_VAR + GVAR_ERR, nErr) ;
|
||||
if ( nErr != 0)
|
||||
return false ;
|
||||
|
||||
// forzo aggiornamento posizione assi (possono essere stati mossi nello script)
|
||||
UpdateAxesPos() ;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user