From aa1e86fa89b48d1f8e4f8062bb5fe9dcbdda533b Mon Sep 17 00:00:00 2001 From: Dario Sassi Date: Thu, 1 Mar 2018 15:15:01 +0000 Subject: [PATCH] EgtMachKernel : - per macro di simulazione aggiunta variabile per step di simulazione EMT.SIMSTEP. --- OutputConst.h | 1 + Simulator.cpp | 10 ++++++---- 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/OutputConst.h b/OutputConst.h index c82191d..2c63d2e 100644 --- a/OutputConst.h +++ b/OutputConst.h @@ -129,6 +129,7 @@ static const std::string GVAR_AN = ".AN" ; // (num) valore del static const std::string GVAR_ANN = ".ANn" ; // (string) nome del N-esimo asse ausiliario per simulazione static const std::string GVAR_VMILL = ".VMILL" ; // (int) identificativo Zmap attivo static const std::string GVAR_SIM1ST = ".SIM1ST" ; // (bool) flag inizio simulazione +static const std::string GVAR_SIMSTEP = ".SIMSTEP" ; // (num) step di movimento durante la simulazione // Funzioni generazione static const std::string ON_START = "OnStart" ; diff --git a/Simulator.cpp b/Simulator.cpp index f4ac04f..7941d85 100644 --- a/Simulator.cpp +++ b/Simulator.cpp @@ -326,10 +326,12 @@ Simulator::GetMoveInfo( int& nGmove, double& dFeed) const bool Simulator::SetStep( double dStep) { - const double MIN_STEP = 0.1 ; - const double MAX_STEP = 100.0 ; - m_dStep = Clamp( dStep, MIN_STEP, MAX_STEP) ; - return true ; + const double MIN_STEP = 1.0 ; + const double MAX_STEP = 100.0 ; + m_dStep = Clamp( dStep, MIN_STEP, MAX_STEP) ; + // imposto step per movimenti gestiti nelle macro di simulazione + m_pMachine->LuaSetGlobVar( GLOB_VAR + GVAR_SIMSTEP, m_dStep) ; + return true ; } //----------------------------------------------------------------------------