TG Motion  version 421 - 4033/904 cnc 121
Real-time system for controlling servo drives and I/O modules
SIMPLE_GM_PARAMS_WIN32 Struct Reference

Describes one G-code part. More...

#include <TGM_CNC.h>

Public Attributes

P10DOUBLE m_s
 absolute initial position (original) of type P10DOUBLE
 
P10DOUBLE m_e
 absolute end position (original)
 
P10DOUBLE m_calcS
 absolute initial position recalculated (tool size compensation) or actual position (ToolChainCore_GetPos)
 
P10DOUBLE m_calcE
 absolute end position recalculated
 
P10DOUBLE m_zero
 actual zero offset (G54 - G57)
 
P10DOUBLE m_cc
 arc centre (m_cc.x m_cc.y m_cc.z) and radius (in m_cc.c variable), other m_cc variables not yet used
 
float m_pars [MAX_FUNC_ADDRESSES]
 
int32_t m_func
 
int32_t m_planeTool
 
uint32_t m_reserved
 Internal reseved value.
 
uint32_t m_editorLine
 Line in G-code.
 
int32_t m_fileIdx
 File index.
 
int32_t m_gCodeIndex
 
int32_t m_bFeedIsMin
 
float m_fp
 actual value of FP address (percent of F), usually 1.0
 

Detailed Description

Describes one G-code part.

Serves also for getting actual values of the system.

Definition at line 1013 of file TGM_CNC.h.

Member Data Documentation

◆ m_pars

float SIMPLE_GM_PARAMS_WIN32::m_pars[MAX_FUNC_ADDRESSES]

All addresses (26 letters of alphabet), as given in the text of CNC program or value is > 1e38 (address not included in the G-code function)
When calling as CALLBACK functions the following values are set:

  • F (m_pars[5]) - Feed
  • G (m_pars[6]) - G function number (copy of m_func)
  • I,J,K (m_pars[8,9,10]) - original arc centre (absolute)
  • N (m_pars[13]) - length of current section
  • R (m_pars[17]) - original arc radius
  • S (m_pars[18]) - spindle speed (positive M3, negative M4, 0 - M5) When calling ToolChainCore_GetPos the following values are set:
  • G (m_pars[6]) - no. of G function or -1, the latter means M function
  • M (m_pars[12]) - no. of M function. If (m_pars[6]) = -1, it is the waiting M function (<= 1000), otherwise it is no. of continuous M function that will be called at the end of the G-code part
  • N (m_pars[13]) - current length of work sections (changed after each G-code part, more accurate values are in GM_PARAMS_ENHANCED
  • P (m_pars[15]) - percentage filling of the interpolator buffer (0 - 100)
  • T (m_pars[19]) - current length of all fastfeeds (changed after each G00), accurate values are in GM_PARAMS_ENHANCED
  • X,Y,Z,C,B,U,V,W,A,O (m_pars[23,24,25,2,1,20,21,22,0,14]) original interpolator coordinates
  • I,J,K,L,Q,R,D,E,S,H (m_pars[8,9,10,11,16,17,3,4,18,7]) G92 offset

Definition at line 1021 of file TGM_CNC.h.

◆ m_func

int32_t SIMPLE_GM_PARAMS_WIN32::m_func

Number of G or M function. When calling ToolChainCore_GetPos numbers of M functions are raised by 10000. I.e. for m_func < 10000, the current function is G, for m_func > 10000, M function is running. Similar meaning is in m_pars[6] and m_pars[12], see above.

Definition at line 1040 of file TGM_CNC.h.

◆ m_planeTool

int32_t SIMPLE_GM_PARAMS_WIN32::m_planeTool

Low 16bits: Plane of circular interpolation (17: XY, 18: XZ, 19: YZ, -18: ZX). Value -18 is used only for lathe. Upper 16bits: Tool number

Definition at line 1044 of file TGM_CNC.h.

◆ m_gCodeIndex

int32_t SIMPLE_GM_PARAMS_WIN32::m_gCodeIndex

Counter of G or M functions. Usually even value, odd values are reserved for special inserted movements. Could be negative for special internal G-code markers.

Definition at line 1050 of file TGM_CNC.h.

◆ m_bFeedIsMin

int32_t SIMPLE_GM_PARAMS_WIN32::m_bFeedIsMin

lower 16bits: Feed is mm/per min (1) or mm/revolution (0) upper 16bits: correction type 40, 41, 42

Definition at line 1052 of file TGM_CNC.h.


The documentation for this struct was generated from the following file: