EgtMacjìhKernel :
- aggiunto nella simulazione (SP e MP) il controllo che il numero di valori assegnati sia uguale al numero di assi correnti.
This commit is contained in:
+11
-1
@@ -1055,7 +1055,7 @@ SimulatorSP::ManageSingleMove( int& nStatus, double& dMove)
|
||||
case CamData::AS_OUTSTROKE : {
|
||||
DBLVECTOR OutAxes = pCamData->GetAxesVal() ;
|
||||
if ( ! m_pMchMgr->GetCurrIsRobot()) {
|
||||
for ( size_t i = OutAxes.size() ; i < 5 ; ++ i)
|
||||
for ( int i = int( OutAxes.size()) ; i <= 5 ; ++ i)
|
||||
OutAxes.emplace_back( 0) ;
|
||||
DBLVECTOR vAng( OutAxes.begin() + 3, OutAxes.end()) ;
|
||||
int nStat ;
|
||||
@@ -1075,6 +1075,16 @@ SimulatorSP::ManageSingleMove( int& nStatus, double& dMove)
|
||||
return false ;
|
||||
}
|
||||
DBLVECTOR AxesEnd = pCamData->GetAxesVal() ;
|
||||
// Controllo che il numero di valori corrisponda con quello degli assi
|
||||
int nEndsCnt = int( AxesEnd.size()) ;
|
||||
int nAxesCnt = int( m_AxesName.size()) ;
|
||||
if ( nEndsCnt != nAxesCnt) {
|
||||
nStatus = MCH_SIM_ERR ;
|
||||
m_pMchMgr->SetLastError( 1003, "Error : mismatch between the number of values and of axes") ;
|
||||
string sOut = "Error : " + ToString( nEndsCnt) + " values vs " + ToString( nAxesCnt) + " axes" ;
|
||||
LOG_ERROR( GetEMkLogger(), sOut.c_str())
|
||||
return false ;
|
||||
}
|
||||
// Tipo di movimento
|
||||
int nMoveType = pCamData->GetMoveType() ;
|
||||
// Se inizio di nuova entità, mascheratura movimento
|
||||
|
||||
Reference in New Issue
Block a user