EgtMachKernel 2.3f1 :
- allo script OnSetupHead aggiunto dato noto EMC.TCPOS.
This commit is contained in:
@@ -37,6 +37,7 @@ static const string EVAR_TOTDIAM = ".TOTDIAM" ; // (num) diametro di in
|
||||
static const string EVAR_TOTLEN = ".TOTLEN" ; // (num) lunghezza di ingombro dell'utensile
|
||||
static const string EVAR_DIST = ".DIST" ; // (num) distanza dell'utensile (per seghe a catena)
|
||||
static const string EVAR_EXITPOS = ".EXITPOS" ; // (point) posizione attuale dell'uscita
|
||||
static const string EVAR_TCPOS = ".TCPOS" ; // (string) posizione nell'attrezzaggio
|
||||
static const string EVAR_L1 = ".L1" ; // (num) valore del primo asse lineare
|
||||
static const string EVAR_L2 = ".L2" ; // (num) valore del secondo asse lineare
|
||||
static const string EVAR_L3 = ".L3" ; // (num) valore del terzo asse lineare
|
||||
@@ -229,6 +230,7 @@ Machine::SetCurrTool( const string& sTool, const string& sHead, int nExit)
|
||||
double dTOvLen = 0 ;
|
||||
double dTOvDiam = 0 ;
|
||||
double dTDist = 0 ;
|
||||
string sTcPos = "" ;
|
||||
// se definito
|
||||
if ( ! sTool.empty()) {
|
||||
// carico anche gli utensili su eventuali altre uscite della testa
|
||||
@@ -249,6 +251,8 @@ Machine::SetCurrTool( const string& sTool, const string& sHead, int nExit)
|
||||
! m_pMchMgr->TdbGetCurrToolParam( TPA_TOTDIAM, dTOvDiam))
|
||||
return false ;
|
||||
m_pMchMgr->TdbGetCurrToolParam( TPA_DIST, dTDist) ; // opzionale
|
||||
if ( ! m_pMchMgr->GetCurrSetupMgr().GetToolSetupPos( sTool, sTcPos))
|
||||
m_pMchMgr->TdbGetCurrToolParam( TPA_TCPOS, sTcPos) ;
|
||||
}
|
||||
// altrimenti casi speciali senza utensile
|
||||
else {
|
||||
@@ -261,6 +265,7 @@ Machine::SetCurrTool( const string& sTool, const string& sHead, int nExit)
|
||||
dTOvLen = 0 ;
|
||||
dTOvDiam = 0 ;
|
||||
dTDist = 0 ;
|
||||
sTcPos = "" ;
|
||||
m_pMchMgr->TdbSetCurrTool( "") ;
|
||||
}
|
||||
// assegno tutti i dati
|
||||
@@ -289,6 +294,7 @@ Machine::SetCurrTool( const string& sTool, const string& sHead, int nExit)
|
||||
bOk = bOk && LuaSetGlobVar( EMC_VAR + EVAR_TOTDIAM, dTOvDiam) ;
|
||||
bOk = bOk && LuaSetGlobVar( EMC_VAR + EVAR_TOTLEN, dTOvLen) ;
|
||||
bOk = bOk && LuaSetGlobVar( EMC_VAR + EVAR_DIST, dTDist) ;
|
||||
bOk = bOk && LuaSetGlobVar( EMC_VAR + EVAR_TCPOS, sTcPos) ;
|
||||
// chiamo funzione
|
||||
bOk = bOk && LuaCallFunction( ON_SET_HEAD) ;
|
||||
// reset variabili
|
||||
|
||||
Reference in New Issue
Block a user