![]() |
TG Motion
version 421 - 4033/904 cnc 121
Real-time system for controlling servo drives and I/O modules
|
Interface to interpolator. More...
#include <TGM.h>
Public Attributes | |
uint32_t | Number |
interpolator number | |
uint32_t | Number_Axes |
number of axes used for interpolation (2-10) | |
uint32_t | Bufer_Size |
size of the command buffer in items | |
volatile INTERPOLATOR_COMMANDS | Command |
command to interpolator | |
int32_t | Command_Parametr [12] |
parameters depending on INTERPOLATOR::Command value | |
int32_t | Command_Status |
volatile int32_t | Status |
volatile int32_t | Act_Part |
index of the actual part of the G code | |
uint32_t | Adrress_External_Position |
offset of TGM_Data address, where external sensor position is saved | |
volatile int32_t | M_Func |
int32_t | Act_GFunc |
actual G function number | |
int32_t | Act_MFunc |
actual M function number | |
int32_t | Last_ContMFunc |
last continuos M function number (M > 1000) | |
int32_t | Run_Flag |
int32_t | Tool_Number |
actual tool number, read only | |
CONT_MFUNC_HISTORY | Cont_MFunc_History |
continuous M funcs history | |
uint32_t | editorLine |
actual editor line | |
uint32_t | fileIdx |
actual file index | |
uint32_t | correction |
actual tool compensation (41 - left, 42 - right, any other value - off) | |
int32_t | IReserve [65 -(sizeof(CONT_MFUNC_HISTORY)/sizeof(int32_t))] |
reserved | |
double | Orig_Position [_N_INTERPOLATOR_AXES] |
direct position from interpolator | |
double | Position [_N_INTERPOLATOR_AXES] |
filtered position (IIR and/or Spline filtration) | |
double | PositionInc [_N_INTERPOLATOR_AXES] |
Position multiplied by INTERPOLATOR::Ratio. | |
double | Backlash [_N_INTERPOLATOR_AXES] |
actual backlash value for each axis | |
double | Offset [_N_INTERPOLATOR_AXES] |
offset values added to INTERPOLATOR::PositionInc | |
double | Speed [_N_INTERPOLATOR_AXES] |
actual speed of each axis after IIR and Spline calculations | |
double | Ratio [_N_INTERPOLATOR_AXES] |
conversion ratio (multiplier) from mm to increments | |
double | M_Funkce_Parametr [26] |
Parameters of the actual M functions. Some of the letters are reserved (G, M, N, P). | |
double | M_Func_Params_Reserved [6] |
reserved | |
double | Rel_Speed |
Realive speed of the movement, 0.01 - 2.0 (i.e 1 - 200 %) | |
double | Set_Speed |
wanted speed from the G-code | |
double | Act_Speed |
actual speed | |
double | Move_Distance |
actual total distance | |
double | DReserve [32+70] |
reserved | |
uint32_t | LookAheadBufferValidStart |
the first valid antry in INTERPOLATOR::LookAheadBuffer array, wraps around _MAX_LOOKHEAD_BUFFER_SIZE | |
uint32_t | LookAheadBufferValidEnd |
the last valid entry in INTERPOLATOR::LookAheadBuffer array | |
INTERPOLATOR_LOOK_AHEAD_BUFFER | LookAheadBuffer [_MAX_LOOKHEAD_BUFFER_SIZE] |
G-code parts to follow. The first entry in this table is always the actual G-code part. | |
Interface to interpolator.
Buffer_Size is specified in TgMotion.ini file, entry Interpolator[].Buffer_Size, e.g. Interpolator[0].Buffer_Size=2000
int32_t INTERPOLATOR::Command_Status |
volatile int32_t INTERPOLATOR::Status |
actual status of the interpolator
value | description |
---|---|
1 | movement on trajectory is under way |
3 | stop at the trajectory end |
4 | at least one part of the trajectory is in the buffer, start may be called |
6 | stopping on emergency ramp |
7 | interpolator stopped after emergency stop |
8 | interpolator was stopped during the buffer filling |
volatile int32_t INTERPOLATOR::M_Func |
int32_t INTERPOLATOR::Run_Flag |
additional running status
lower 16 bits indicate the status of the actual part:
value | description |
---|---|
0 | STOP (interpolator is inactive) |
1 | RUN (normal G-instruction is being executed) |
2 | WAIT_WINDOW (for turning) |
3 | WAIT_PULSE (for turning) |
4 | WAIT_MFUNC (M-function execution started |
5 | WAIT_MFUNC_WAIT_FOR_END (waiting for M-function termination) |
upper 16 bits for the speed progress status:
value | description |
---|---|
1 | no movement |
2 | acceleration |
3 | required movement speed has been reached |
4 | deceleration |
5 | next speed segment |
6 | deceleration on the last segment |
7 | deceleration on emergency ramp |