4925ab462c
- in SimulatorSP e SimulatorMP aggiunta gestione lavorazioni in doppio per OnPathStart.
417 lines
28 KiB
C++
417 lines
28 KiB
C++
//----------------------------------------------------------------------------
|
|
// EgalTech 2016-2016
|
|
//----------------------------------------------------------------------------
|
|
// File : OutputConst.h Data : 30.04.16 Versione : 1.6p4
|
|
// Contenuto : Dichiarazione nomi variabili e funzioni per output Lua.
|
|
//
|
|
//
|
|
//
|
|
// Modifiche : 30.04.16 DS Creazione modulo.
|
|
//
|
|
//
|
|
//----------------------------------------------------------------------------
|
|
|
|
#pragma once
|
|
|
|
#include <string>
|
|
|
|
//----------------------------------------------------------------------------
|
|
// Massimo numero di assi macchina attivi
|
|
static const int MAX_AXES = 7 ;
|
|
// Variabili
|
|
static const std::string GLOB_VAR = "EMT" ; // tavola variabili globali
|
|
static const std::string GVAR_VER = ".VER" ; // (string) versione della Dll
|
|
static const std::string GVAR_ERR = ".ERR" ; // (int) codice di errore (0=ok)
|
|
static const std::string GVAR_USETO1 = ".USETO1" ; // (bool) flag per utilizzo origine tavola
|
|
static const std::string GVAR_MODAL = ".MODAL" ; // (bool) flag per emissione modale dei valori
|
|
static const std::string GVAR_INCHES = ".INCHES" ; // (bool) flag unità di misura (true=inches, false=mm)
|
|
static const std::string GVAR_SPLITARCS = ".SPLITARCS" ; // (int) flag spezzatura archi (0=mai, 1=piani generici, 2=piani diversi da XY, 3=sempre)
|
|
static const std::string GVAR_NUM = ".NUM" ; // (bool) flag numerazione
|
|
static const std::string GVAR_NUMTOK = ".Nt" ; // (string) token per numerazione
|
|
static const std::string GVAR_LINENBR = ".LINENBR" ; // (int) numero progressivo di linea
|
|
static const std::string GVAR_LINEINC = ".LINEINC" ; // (int) incremento per numero di linea
|
|
static const std::string GVAR_F = ".F" ; // (num) valore della feed
|
|
static const std::string GVAR_FT = ".Ft" ; // (string) token per feed
|
|
static const std::string GVAR_S = ".S" ; // (num) valore della speed
|
|
static const std::string GVAR_ST = ".St" ; // (string) token per speed
|
|
static const std::string GVAR_MACHNAME = ".MACHNAME" ; // (string) nome macchina
|
|
static const std::string GVAR_FILE = ".FILE" ; // (string) path file di output
|
|
static const std::string GVAR_INFO = ".INFO" ; // (string) informazioni iniziali
|
|
static const std::string GVAR_SETUP = ".SETUP" ; // (bool) flag definizione setup
|
|
static const std::string GVAR_DISPID = ".DISPID" ; // (int) identificativo disposizione
|
|
static const std::string GVAR_DISPIND = ".DISPIND" ; // (int) indice disposizione
|
|
static const std::string GVAR_PHASE = ".PHASE" ; // (int) indice fase
|
|
static const std::string GVAR_EMPTY = ".EMPTY" ; // (bool) flag disposizione passiva
|
|
static const std::string GVAR_SBH = ".SBH" ; // (bool) flag disposizione con operazioni manuali
|
|
static const std::string GVAR_TABNAME = ".TABNAME" ; // (string) nome tavola
|
|
static const std::string GVAR_TABORI1 = ".TABORI1" ; // (Point3d) prima origine di tavola
|
|
static const std::string GVAR_TAIND = ".TAIND" ; // (int) indice asse tavola
|
|
static const std::string GVAR_TANAME = ".TANAME" ; // (string) nome asse tavola
|
|
static const std::string GVAR_TAPOS = ".TAPOS" ; // (double) posizione asse tavola
|
|
static const std::string GVAR_TAMOVED = ".TAMOVED" ; // (bool) flag asse tavola con movimento
|
|
static const std::string GVAR_FIXID = ".FIXID" ; // (int) identificativo bloccaggio (fixture)
|
|
static const std::string GVAR_FIXIND = ".FIXIND" ; // (int) indice bloccaggio
|
|
static const std::string GVAR_FIXNAME = ".FIXNAME" ; // (string) nome bloccaggio
|
|
static const std::string GVAR_FIXPOS = ".FIXPOS" ; // (Point3d) posizione bloccaggio
|
|
static const std::string GVAR_FIXANG = ".FIXANG" ; // (num) angolo di rotazione bloccaggio
|
|
static const std::string GVAR_FIXMOB = ".FIXMOB" ; // (num) movimento eventuale parte mobile del bloccaggio
|
|
static const std::string GVAR_FIXTAL = ".FIXTAL" ; // (string) nome dell'asse di tavola a cui è fissato
|
|
static const std::string GVAR_RAWID = ".RAWID" ; // (int) identificativo grezzo
|
|
static const std::string GVAR_RAWIND = ".RAWIND" ; // (int) indice movimento del grezzo
|
|
static const std::string GVAR_RAWTYPE = ".RAWTYPE" ; // (int) tipo di movimento del grezzo
|
|
static const std::string GVAR_RAWPOS = ".RAWPOS" ; // (Point3d) posizione di movimento del grezzo
|
|
static const std::string GVAR_RAWFLAG = ".RAWFLAG" ; // (int) flag per movimento del grezzo
|
|
static const std::string GVAR_TOOL = ".TOOL" ; // (string) nome utensile
|
|
static const std::string GVAR_HEAD = ".HEAD" ; // (string) nome testa
|
|
static const std::string GVAR_EXIT = ".EXIT" ; // (int) indice uscita
|
|
static const std::string GVAR_TCPOS = ".TCPOS" ; // (string) eventuale posizione utensile nel TC
|
|
static const std::string GVAR_TTYPE = ".TTYPE" ; // (int) tipo utensile
|
|
static const std::string GVAR_TFLOAT = ".TFLOAT" ; // (bool) flag per utensile flottante
|
|
static const std::string GVAR_TCOMP = ".TCOMP" ; // (int) numero correttore utensile
|
|
static const std::string GVAR_TDIAM = ".TDIAM" ; // (num) diametro utensile
|
|
static const std::string GVAR_TTOTDIAM = ".TTOTDIAM" ; // (num) diametro totale utensile
|
|
static const std::string GVAR_TLEN = ".TLEN" ; // (num) lunghezza utensile
|
|
static const std::string GVAR_TTOTLEN = ".TTOTLEN" ; // (num) lunghezza totale utensile
|
|
static const std::string GVAR_TDIST = ".TDIST" ; // (num) distanza utensile (per mortasatrice/sega a catena)
|
|
static const std::string GVAR_TUSED = ".TUSED" ; // (bool) flag per indicare che l'utensile attrezzato è anche utilizzato
|
|
static const std::string GVAR_SMAX = ".SMAX" ; // (num) massima speed utensile
|
|
static const std::string GVAR_FIRST = ".FIRST" ; // (bool) flag per primo utensile
|
|
static const std::string GVAR_NEXTTOOL = ".NEXTTOOL" ; // (string) nome del prossimo utensile
|
|
static const std::string GVAR_NEXTHEAD = ".NEXTHEAD" ; // (string) nome testa del prossimo utensile
|
|
static const std::string GVAR_NEXTEXIT = ".NEXTEXIT" ; // (int) indice uscita su testa del prox utensile
|
|
static const std::string GVAR_NEXTTCPOS = ".NEXTTCPOS" ; // (string) eventuale posizione del prox utensile nel TC
|
|
static const std::string GVAR_MCHID = ".MCHID" ; // (int) identificativo lavorazione
|
|
static const std::string GVAR_MCHIND = ".MCHIND" ; // (int) indice lavorazione
|
|
static const std::string GVAR_MMIN = ".MMIN" ; // (Point3d) punto minimo di ingombro della lavorazione
|
|
static const std::string GVAR_MMAX = ".MMAX" ; // (Point3d) punto massimo di ingombro della lavorazione
|
|
static const std::string GVAR_MAXMIN = ".MAXMIN" ; // (double/s) minimo di ingombro degli assi della lavorazione
|
|
static const std::string GVAR_MAXMAX = ".MAXMAX" ; // (double/s) massimo di ingombro degli assi della lavorazione
|
|
static const std::string GVAR_PATHID = ".PATHID" ; // (int) identificativo percorso di lavorazione
|
|
static const std::string GVAR_PATHIND = ".PATHIND" ; // (int) indice percorso di lavorazione
|
|
static const std::string GVAR_DBLPATHID = ".DBLPATHID" ; // (int) identificativo eventuale percorso di lavorazione in doppio
|
|
static const std::string GVAR_START = ".START" ; // (Point3d) punto iniziale del percorso originale
|
|
static const std::string GVAR_END = ".END" ; // (Point3d) punto finale del percorso originale
|
|
static const std::string GVAR_EXTR = ".EXTR" ; // (Vector3d) versore estrusione
|
|
static const std::string GVAR_PMIN = ".PMIN" ; // (Point3d) punto minimo di ingombro del percorso di lavorazione
|
|
static const std::string GVAR_PMAX = ".PMAX" ; // (Point3d) punto massimo di ingombro del percorso di lavorazione
|
|
static const std::string GVAR_PAXMIN = ".PAXMIN" ; // (double/s) minimo di ingombro degli assi del percorso di lavorazione
|
|
static const std::string GVAR_PAXMAX = ".PAXMAX" ; // (double/s) massimo di ingombro degli assi del percorso di lavorazione
|
|
static const std::string GVAR_ELEV = ".ELEV" ; // (double) massima elevazione
|
|
static const std::string GVAR_DRACEX = ".DRACEX" ; // (int/s) vettore delle uscite selezionate (per gruppi a forare)
|
|
static const std::string GVAR_AUXTOT = ".AUXTOT" ; // (int) numero totale dati ausiliari inizio/fine percorso di lavorazione
|
|
static const std::string GVAR_AUXIND = ".AUXIND" ; // (int) indice dato ausiliario inizio/fine percorso di lavorazione
|
|
static const std::string GVAR_AUX = ".AUX" ; // (string) dato ausiliario inizio/fine percorso di lavorazione
|
|
static const std::string GVAR_MOVEID = ".MOVEID" ; // (int) identificativo movimento
|
|
static const std::string GVAR_MOVEIND = ".MOVEIND" ; // (int) indice movimento
|
|
static const std::string GVAR_MOVE = ".MOVE" ; // (int) tipo di movimento (0,1,2,3)
|
|
static const std::string GVAR_L1 = ".L1" ; // (num) valore del primo asse lineare
|
|
static const std::string GVAR_L2 = ".L2" ; // (num) valore del secondo asse lineare
|
|
static const std::string GVAR_L3 = ".L3" ; // (num) valore del terzo asse lineare
|
|
static const std::string GVAR_R1 = ".R1" ; // (num) valore del primo asse rotante
|
|
static const std::string GVAR_R2 = ".R2" ; // (num) valore del secondo asse rotante
|
|
static const std::string GVAR_R3 = ".R3" ; // (num) valore del terzo asse rotante
|
|
static const std::string GVAR_R4 = ".R4" ; // (num) valore del quarto asse rotante
|
|
static const std::string GVAR_R5 = ".R5" ; // (num) valore del quinto asse rotante
|
|
static const std::string GVAR_R6 = ".R6" ; // (num) valore del sesto asse rotante
|
|
static const std::string GVAR_R7 = ".R7" ; // (num) valore del settimo asse rotante
|
|
static const std::string GVAR_C1 = ".C1" ; // (num) valore del primo asse lineare per centro arco
|
|
static const std::string GVAR_C2 = ".C2" ; // (num) valore del secondo asse lineare per centro arco
|
|
static const std::string GVAR_C3 = ".C3" ; // (num) valore del terzo asse lineare per centro arco
|
|
static const std::string GVAR_M1 = ".M1" ; // (num) valore del primo asse lineare per punto medio arco
|
|
static const std::string GVAR_M2 = ".M2" ; // (num) valore del secondo asse lineare per punto medio arco
|
|
static const std::string GVAR_M3 = ".M3" ; // (num) valore del terzo asse lineare per punto medio arco
|
|
static const std::string GVAR_RR = ".RR" ; // (num) valore raggio per arco
|
|
static const std::string GVAR_AC = ".AC" ; // (num) valore angolo al centro per arco
|
|
static const std::string GVAR_L1P = ".L1p" ; // (num) valore precedente del primo asse lineare
|
|
static const std::string GVAR_L2P = ".L2p" ; // (num) valore precedente del secondo asse lineare
|
|
static const std::string GVAR_L3P = ".L3p" ; // (num) valore precedente del terzo asse lineare
|
|
static const std::string GVAR_R1P = ".R1p" ; // (num) valore precedente del primo asse rotante
|
|
static const std::string GVAR_R2P = ".R2p" ; // (num) valore precedente del secondo asse rotante
|
|
static const std::string GVAR_R3P = ".R3p" ; // (num) valore precedente del terzo asse rotante
|
|
static const std::string GVAR_R4P = ".R4p" ; // (num) valore precedente del quarto asse rotante
|
|
static const std::string GVAR_R5P = ".R5p" ; // (num) valore precedente del quinto asse rotante
|
|
static const std::string GVAR_R6P = ".R6p" ; // (num) valore precedente del sesto asse rotante
|
|
static const std::string GVAR_R7P = ".R7p" ; // (num) valore precedente del settimo asse rotante
|
|
static const std::string GVAR_MOVESUCC = ".MOVESUCC" ; // (int) tipo del movimento successivo (0,1,2,3)
|
|
static const std::string GVAR_L1S = ".L1s" ; // (num) valore successivo del primo asse lineare
|
|
static const std::string GVAR_L2S = ".L2s" ; // (num) valore successivo del secondo asse lineare
|
|
static const std::string GVAR_L3S = ".L3s" ; // (num) valore successivo del terzo asse lineare
|
|
static const std::string GVAR_R1S = ".R1s" ; // (num) valore successivo del primo asse rotante
|
|
static const std::string GVAR_R2S = ".R2s" ; // (num) valore successivo del secondo asse rotante
|
|
static const std::string GVAR_R3S = ".R3s" ; // (num) valore successivo del terzo asse rotante
|
|
static const std::string GVAR_R4S = ".R4s" ; // (num) valore successivo del quarto asse rotante
|
|
static const std::string GVAR_R5S = ".R5s" ; // (num) valore successivo del quinto asse rotante
|
|
static const std::string GVAR_R6S = ".R6s" ; // (num) valore successivo del sesto asse rotante
|
|
static const std::string GVAR_R7S = ".R7s" ; // (num) valore successivo del settimo asse rotante
|
|
static const std::string GVAR_L1T = ".L1t" ; // (string) token del primo asse lineare
|
|
static const std::string GVAR_L2T = ".L2t" ; // (string) token del secondo asse lineare
|
|
static const std::string GVAR_L3T = ".L3t" ; // (string) token del terzo asse lineare
|
|
static const std::string GVAR_R1T = ".R1t" ; // (string) token del primo asse rotante
|
|
static const std::string GVAR_R2T = ".R2t" ; // (string) token del secondo asse rotante
|
|
static const std::string GVAR_R3T = ".R3t" ; // (string) token del terzo asse rotante
|
|
static const std::string GVAR_R4T = ".R4t" ; // (string) token del quarto asse rotante
|
|
static const std::string GVAR_R5T = ".R5t" ; // (string) token del quinto asse rotante
|
|
static const std::string GVAR_R6T = ".R6t" ; // (string) token del sesto asse rotante
|
|
static const std::string GVAR_R7T = ".R7t" ; // (string) token del settimo asse rotante
|
|
static const std::string GVAR_C1T = ".C1t" ; // (string) token del primo asse lineare per centro arco
|
|
static const std::string GVAR_C2T = ".C2t" ; // (string) token del secondo asse lineare per centro arco
|
|
static const std::string GVAR_C3T = ".C3t" ; // (string) token del terzo asse lineare per centro arco
|
|
static const std::string GVAR_M1T = ".M1t" ; // (string) token del primo asse lineare per punto medio arco
|
|
static const std::string GVAR_M2T = ".M2t" ; // (string) token del secondo asse lineare per punto medio arco
|
|
static const std::string GVAR_M3T = ".M3t" ; // (string) token del terzo asse lineare per punto medio arco
|
|
static const std::string GVAR_RRT = ".RRt" ; // (string) token del raggio per arco
|
|
static const std::string GVAR_L1N = ".L1n" ; // (string) nome del primo asse lineare
|
|
static const std::string GVAR_L2N = ".L2n" ; // (string) nome del secondo asse lineare
|
|
static const std::string GVAR_L3N = ".L3n" ; // (string) nome del terzo asse lineare
|
|
static const std::string GVAR_R1N = ".R1n" ; // (string) nome del primo asse rotante
|
|
static const std::string GVAR_R2N = ".R2n" ; // (string) nome del secondo asse rotante
|
|
static const std::string GVAR_R3N = ".R3n" ; // (string) nome del terzo asse rotante
|
|
static const std::string GVAR_R4N = ".R4n" ; // (string) nome del quarto asse rotante
|
|
static const std::string GVAR_R5N = ".R5n" ; // (string) nome del quinto asse rotante
|
|
static const std::string GVAR_R6N = ".R6n" ; // (string) nome del sesto asse rotante
|
|
static const std::string GVAR_R7N = ".R7n" ; // (string) nome del settimo asse rotante
|
|
static const std::string GVAR_MASK = ".MASK" ; // (int) mask associato ai movimenti in rapido
|
|
static const std::string GVAR_FLAG = ".FLAG" ; // (int) flag associato ad ogni movimento
|
|
static const std::string GVAR_FLAG2 = ".FLAG2" ; // (int) secondo flag associato ad ogni movimento
|
|
static const std::string GVAR_INDEX = ".IDX" ; // (int) indice associato ad ogni movimento
|
|
static const std::string GVAR_TDIR = ".TDIR" ; // (Vector3d) versore utensile nel riferimento pezzo
|
|
static const std::string GVAR_CDIR = ".CDIR" ; // (Vector3d) versore correzione nel riferimento pezzo
|
|
static const std::string GVAR_ADIR = ".ADIR" ; // (Vector3d) versore ausiliario nel riferimento pezzo
|
|
static const std::string GVAR_TDIRP = ".TDIRp" ; // (Vector3d) precedente versore utensile nel riferimento pezzo
|
|
static const std::string GVAR_ENABAXES = ".EnabAxes" ; // (bool) flag abilitazione assi attivi per simulazione
|
|
static const std::string GVAR_SHOWAXES = ".ShowAxes" ; // (bool) flag visualizzazione assi attivi per simulazione
|
|
static const std::string GVAR_AUXAXES = ".AuxAxes" ; // (int) numero assi ausiliari per simulazione
|
|
static const std::string GVAR_AN = ".AN" ; // (num) valore del N-esimo asse ausiliario per simulazione
|
|
static const std::string GVAR_ANN = ".ANn" ; // (string) nome del N-esimo asse ausiliario per simulazione
|
|
static const std::string GVAR_ANM = ".ANm" ; // (string) asse master del N-esimo asse ausiliario per simulazione
|
|
static const std::string GVAR_VMILL = ".VMILL" ; // (int/s) identificativi Zmap attivi per Virtual Milling
|
|
static const std::string GVAR_CODET = ".CODET" ; // (int/s) identificativi Zmap attivi per Collision Detection
|
|
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
|
|
static const std::string GVAR_SIMUISTAT = ".SIMUISTAT" ; // (num) stato simulazione imposto da utente
|
|
static const std::string GVAR_SAFEDIST = ".SAFEDIST" ; // (num) distanza di sicurezza per verifica di collisione
|
|
static const std::string GVAR_SIMVMID = ".SIMVMID" ; // (int) identificativo grezzo Vmill in collisione
|
|
static const std::string GVAR_SIMCOBIND = ".SIMCOBIND" ; // (int) indice oggetto in collisione
|
|
static const std::string GVAR_TOOLTRACE = ".TOOLTRACE" ; // (int) identificativo gruppo di tracciatura utensile
|
|
static const std::string GVAR_MPSIM = ".MPSIM" ; // (bool) flag simulazione multiprocesso
|
|
static const std::string GVAR_MPSEST = ".MPSEST" ; // (string) path del file di stima speciale per simulazione multiprocesso
|
|
static const std::string GVAR_RECORD = ".RECORD" ; // (bool) flag modalità registrazione comandi in simulazione
|
|
static const std::string GVAR_OPERID = ".OPERID" ; // (int/s) identificativi ordinati operazioni per simulazione multiprocesso
|
|
// Funzioni generazione
|
|
static const std::string ON_START = "OnStart" ;
|
|
static const std::string ON_END = "OnEnd" ;
|
|
static const std::string ON_PROGRAM_START = "OnProgramStart" ;
|
|
static const std::string ON_PROGRAM_END = "OnProgramEnd" ;
|
|
static const std::string ON_TOOL_DATA = "OnToolData" ;
|
|
static const std::string ON_DISPOSITION_START = "OnDispositionStart" ;
|
|
static const std::string ON_DISPOSITION_END = "OnDispositionEnd" ;
|
|
static const std::string ON_TABLE_DATA = "OnTableData" ;
|
|
static const std::string ON_TABLE_AXIS_DATA = "OnTableAxisData" ;
|
|
static const std::string ON_FIXTURE_DATA = "OnFixtureData" ;
|
|
static const std::string ON_RAWMOVE_DATA = "OnRawMoveData" ;
|
|
static const std::string ON_TOOL_SELECT = "OnToolSelect" ;
|
|
static const std::string ON_TOOL_DESELECT = "OnToolDeselect" ;
|
|
static const std::string ON_MACHINING_START = "OnMachiningStart" ;
|
|
static const std::string ON_MACHINING_END = "OnMachiningEnd" ;
|
|
static const std::string ON_PATH_START = "OnPathStart" ;
|
|
static const std::string ON_PATH_END = "OnPathEnd" ;
|
|
static const std::string ON_PATH_START_AUX = "OnPathStartAux" ;
|
|
static const std::string ON_PATH_END_AUX = "OnPathEndAux" ;
|
|
static const std::string ON_RAPID = "OnRapid" ;
|
|
static const std::string ON_LINEAR = "OnLinear" ;
|
|
static const std::string ON_ARC = "OnArc" ;
|
|
// Funzioni stima
|
|
static const std::string ON_ESTIM_START = "OnEstimStart" ;
|
|
static const std::string ON_ESTIM_END = "OnEstimEnd" ;
|
|
static const std::string ON_ESTIM_PROGRAM_START = "OnEstimProgramStart" ;
|
|
static const std::string ON_ESTIM_PROGRAM_END = "OnEstimProgramEnd" ;
|
|
static const std::string ON_ESTIM_TOOL_DATA = "OnEstimToolData" ;
|
|
static const std::string ON_ESTIM_DISPOSITION_START = "OnEstimDispositionStart" ;
|
|
static const std::string ON_ESTIM_DISPOSITION_END = "OnEstimDispositionEnd" ;
|
|
static const std::string ON_ESTIM_TABLE_DATA = "OnEstimTableData" ;
|
|
static const std::string ON_ESTIM_TABLE_AXIS_DATA = "OnEstimTableAxisData" ;
|
|
static const std::string ON_ESTIM_FIXTURE_DATA = "OnEstimFixtureData" ;
|
|
static const std::string ON_ESTIM_RAWMOVE_DATA = "OnEstimRawMoveData" ;
|
|
static const std::string ON_ESTIM_TOOL_SELECT = "OnEstimToolSelect" ;
|
|
static const std::string ON_ESTIM_TOOL_DESELECT = "OnEstimToolDeselect" ;
|
|
static const std::string ON_ESTIM_MACHINING_START = "OnEstimMachiningStart" ;
|
|
static const std::string ON_ESTIM_MACHINING_END = "OnEstimMachiningEnd" ;
|
|
static const std::string ON_ESTIM_PATH_START = "OnEstimPathStart" ;
|
|
static const std::string ON_ESTIM_PATH_END = "OnEstimPathEnd" ;
|
|
static const std::string ON_ESTIM_PATH_START_AUX = "OnEstimPathStartAux" ;
|
|
static const std::string ON_ESTIM_PATH_END_AUX = "OnEstimPathEndAux" ;
|
|
static const std::string ON_ESTIM_RAPID = "OnEstimRapid" ;
|
|
static const std::string ON_ESTIM_LINEAR = "OnEstimLinear" ;
|
|
static const std::string ON_ESTIM_ARC = "OnEstimArc" ;
|
|
// Funzioni simulazione
|
|
static const std::string ON_SIMUL_INIT = "OnSimulInit" ;
|
|
static const std::string ON_SIMUL_EXIT = "OnSimulExit" ;
|
|
static const std::string ON_SIMUL_START = "OnSimulStart" ;
|
|
static const std::string ON_SIMUL_END = "OnSimulEnd" ;
|
|
static const std::string ON_SIMUL_DISPOSITION_STARTING = "OnSimulDispositionStarting" ;
|
|
static const std::string ON_SIMUL_DISPOSITION_START = "OnSimulDispositionStart" ;
|
|
static const std::string ON_SIMUL_DISPOSITION_END = "OnSimulDispositionEnd" ;
|
|
static const std::string ON_SIMUL_TOOL_SELECT = "OnSimulToolSelect" ;
|
|
static const std::string ON_SIMUL_TOOL_DESELECT = "OnSimulToolDeselect" ;
|
|
static const std::string ON_SIMUL_MACHINING_START = "OnSimulMachiningStart" ;
|
|
static const std::string ON_SIMUL_MACHINING_END = "OnSimulMachiningEnd" ;
|
|
static const std::string ON_SIMUL_PATH_START = "OnSimulPathStart" ;
|
|
static const std::string ON_SIMUL_PATH_END = "OnSimulPathEnd" ;
|
|
static const std::string ON_SIMUL_PATH_START_AUX = "OnSimulPathStartAux" ;
|
|
static const std::string ON_SIMUL_PATH_END_AUX = "OnSimulPathEndAux" ;
|
|
static const std::string ON_SIMUL_MOVE_START = "OnSimulMoveStart" ;
|
|
static const std::string ON_SIMUL_MOVE_END = "OnSimulMoveEnd" ;
|
|
static const std::string ON_SIMUL_COLLISION = "OnSimulCollision" ;
|
|
// Funzioni macchina
|
|
static const std::string ON_RESET_MACHINE = "OnResetMachine" ;
|
|
|
|
//----------------------------------------------------------------------------
|
|
inline std::string
|
|
GetGlobVarAxisValue( int nAx, const std::string& sVar = GLOB_VAR, bool bIsRobot = false)
|
|
{
|
|
if ( ! bIsRobot) {
|
|
switch ( nAx) {
|
|
case 1 : return ( sVar + GVAR_L1) ;
|
|
case 2 : return ( sVar + GVAR_L2) ;
|
|
case 3 : return ( sVar + GVAR_L3) ;
|
|
case 4 : return ( sVar + GVAR_R1) ;
|
|
case 5 : return ( sVar + GVAR_R2) ;
|
|
case 6 : return ( sVar + GVAR_R3) ;
|
|
case 7 : return ( sVar + GVAR_R4) ;
|
|
default : return "" ;
|
|
}
|
|
}
|
|
else {
|
|
switch ( nAx) {
|
|
case 1 : return ( sVar + GVAR_R1) ;
|
|
case 2 : return ( sVar + GVAR_R2) ;
|
|
case 3 : return ( sVar + GVAR_R3) ;
|
|
case 4 : return ( sVar + GVAR_R4) ;
|
|
case 5 : return ( sVar + GVAR_R5) ;
|
|
case 6 : return ( sVar + GVAR_R6) ;
|
|
case 7 : return ( sVar + GVAR_R7) ;
|
|
default : return "" ;
|
|
}
|
|
}
|
|
}
|
|
|
|
//----------------------------------------------------------------------------
|
|
inline std::string
|
|
GetGlobVarAxisPrev( int nAx, const std::string& sVar = GLOB_VAR, bool bIsRobot = false)
|
|
{
|
|
if ( ! bIsRobot) {
|
|
switch ( nAx) {
|
|
case 1 : return ( sVar + GVAR_L1P) ;
|
|
case 2 : return ( sVar + GVAR_L2P) ;
|
|
case 3 : return ( sVar + GVAR_L3P) ;
|
|
case 4 : return ( sVar + GVAR_R1P) ;
|
|
case 5 : return ( sVar + GVAR_R2P) ;
|
|
case 6 : return ( sVar + GVAR_R3P) ;
|
|
case 7 : return ( sVar + GVAR_R4P) ;
|
|
default : return "" ;
|
|
}
|
|
}
|
|
else {
|
|
switch ( nAx) {
|
|
case 1 : return ( sVar + GVAR_R1P) ;
|
|
case 2 : return ( sVar + GVAR_R2P) ;
|
|
case 3 : return ( sVar + GVAR_R3P) ;
|
|
case 4 : return ( sVar + GVAR_R4P) ;
|
|
case 5 : return ( sVar + GVAR_R5P) ;
|
|
case 6 : return ( sVar + GVAR_R6P) ;
|
|
case 7 : return ( sVar + GVAR_R7P) ;
|
|
default : return "" ;
|
|
}
|
|
}
|
|
}
|
|
|
|
//----------------------------------------------------------------------------
|
|
inline std::string
|
|
GetGlobVarAxisNext( int nAx, const std::string& sVar = GLOB_VAR, bool bIsRobot = false)
|
|
{
|
|
if ( ! bIsRobot) {
|
|
switch ( nAx) {
|
|
case 1 : return ( sVar + GVAR_L1S) ;
|
|
case 2 : return ( sVar + GVAR_L2S) ;
|
|
case 3 : return ( sVar + GVAR_L3S) ;
|
|
case 4 : return ( sVar + GVAR_R1S) ;
|
|
case 5 : return ( sVar + GVAR_R2S) ;
|
|
case 6 : return ( sVar + GVAR_R3S) ;
|
|
case 7 : return ( sVar + GVAR_R4S) ;
|
|
default : return "" ;
|
|
}
|
|
}
|
|
else {
|
|
switch ( nAx) {
|
|
case 1 : return ( sVar + GVAR_R1S) ;
|
|
case 2 : return ( sVar + GVAR_R2S) ;
|
|
case 3 : return ( sVar + GVAR_R3S) ;
|
|
case 4 : return ( sVar + GVAR_R4S) ;
|
|
case 5 : return ( sVar + GVAR_R5S) ;
|
|
case 6 : return ( sVar + GVAR_R6S) ;
|
|
case 7 : return ( sVar + GVAR_R7S) ;
|
|
default : return "" ;
|
|
}
|
|
}
|
|
}
|
|
|
|
//----------------------------------------------------------------------------
|
|
inline std::string
|
|
GetGlobVarAxisToken( int nAx, bool bIsRobot = false)
|
|
{
|
|
if ( ! bIsRobot) {
|
|
switch ( nAx) {
|
|
case 1 : return ( GLOB_VAR + GVAR_L1T) ;
|
|
case 2 : return ( GLOB_VAR + GVAR_L2T) ;
|
|
case 3 : return ( GLOB_VAR + GVAR_L3T) ;
|
|
case 4 : return ( GLOB_VAR + GVAR_R1T) ;
|
|
case 5 : return ( GLOB_VAR + GVAR_R2T) ;
|
|
case 6 : return ( GLOB_VAR + GVAR_R3T) ;
|
|
case 7 : return ( GLOB_VAR + GVAR_R4T) ;
|
|
default : return "" ;
|
|
}
|
|
}
|
|
else {
|
|
switch ( nAx) {
|
|
case 1 : return ( GLOB_VAR + GVAR_R1T) ;
|
|
case 2 : return ( GLOB_VAR + GVAR_R2T) ;
|
|
case 3 : return ( GLOB_VAR + GVAR_R3T) ;
|
|
case 4 : return ( GLOB_VAR + GVAR_R4T) ;
|
|
case 5 : return ( GLOB_VAR + GVAR_R5T) ;
|
|
case 6 : return ( GLOB_VAR + GVAR_R6T) ;
|
|
case 7 : return ( GLOB_VAR + GVAR_R7T) ;
|
|
default : return "" ;
|
|
}
|
|
}
|
|
}
|
|
|
|
//----------------------------------------------------------------------------
|
|
inline std::string
|
|
GetGlobVarAxisName( int nAx, bool bIsRobot = false)
|
|
{
|
|
if ( ! bIsRobot) {
|
|
switch ( nAx) {
|
|
case 1 : return ( GLOB_VAR + GVAR_L1N) ;
|
|
case 2 : return ( GLOB_VAR + GVAR_L2N) ;
|
|
case 3 : return ( GLOB_VAR + GVAR_L3N) ;
|
|
case 4 : return ( GLOB_VAR + GVAR_R1N) ;
|
|
case 5 : return ( GLOB_VAR + GVAR_R2N) ;
|
|
case 6 : return ( GLOB_VAR + GVAR_R3N) ;
|
|
case 7 : return ( GLOB_VAR + GVAR_R4N) ;
|
|
default : return "" ;
|
|
}
|
|
}
|
|
else {
|
|
switch ( nAx) {
|
|
case 1 : return ( GLOB_VAR + GVAR_R1N) ;
|
|
case 2 : return ( GLOB_VAR + GVAR_R2N) ;
|
|
case 3 : return ( GLOB_VAR + GVAR_R3N) ;
|
|
case 4 : return ( GLOB_VAR + GVAR_R4N) ;
|
|
case 5 : return ( GLOB_VAR + GVAR_R5N) ;
|
|
case 6 : return ( GLOB_VAR + GVAR_R6N) ;
|
|
case 7 : return ( GLOB_VAR + GVAR_R7N) ;
|
|
default : return "" ;
|
|
}
|
|
}
|
|
}
|