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

Enumerations

enum  cnc_status : int32_t {
  statusOFFLINE = -2, statusSENDING_GCODE_TO_REMOTE_DEVICE = -3, statusINVALID = 0, statusCOMPILING = 1,
  statusCOMPILE_FINISHED = -1, statusSIMULATING = START_CNC_SIMULATION, statusSIMULATION_END = -10, statusSIMULATION_BREAK = -11,
  statusTEST = START_CNC_TEST, statusTEST_END = -20, statusTEST_BREAK = -21, statusTRAJECTORY_START = -30,
  statusTRAJECTORY_BREAK = -31, statusTRAJECTORY_END = -32, statusTRAJECTORY_BREAK_M0 = -33, statusFORWARD = START_CNC_FORWARD,
  statusFORWARD_NO_MFUNC = START_CNC_FORWARD_NO_MFUNC, statusBACKWARD = START_CNC_BACKWARD, statusFORWARD_SKIP_FIRST_M = START_CNC_FORWARD_SKIP_FIRST_M, statusCONNECTING = 40,
  statusCONNECT_MOVE = 41, statusHAND_MOVE = 50, statusOUT_OF_TRAJECTORY = -50, statusCALCULATING = START_CNC_CALCULATING,
  statusSTART_M_FUNCS = 70, statusSTOP_M_FUNCS = 80, statusCONNECT_INS_M_FUNCS = 90, statusNONSENSE = -1234
}
 StatusCNC return codes. More...
 
enum  connect_type : int32_t {
  connectBY_COORD = 0, connectBY_LINE_START = 1, connectBY_LINE_END = 2, connectBY_COORD_GO = 10,
  connectBY_LINE_START_GO = 11, connectBY_LINE_END_GO = 12, connectBY_M_FUNC_COUNT = 20, connectBY_M_FUNC_COUNT_REL = 21,
  connectBY_GCODE_INDEX = 30, connectBY_GCODE_INDEX_ACTUAL_COORD = 31, connectBY_GCODE_INDEX_END = 32, connectBY_COORD_GO_BUFFERED = 40,
  connectBY_LINE_START_GO_BUFFERED = 41, connectBY_LINE_END_GO_BUFFERED = 42
}
 Connection modes (ToolChainCore_ConnectCNCEx_Plane) More...
 
enum  axis_idx : int32_t {
  AXIS_NONE = -1, AXIS_X = 0, AXIS_Y, AXIS_Z,
  AXIS_C, AXIS_B, AXIS_U, AXIS_V,
  AXIS_W, AXIS_A, AXIS_O, AXIS_S = 100,
  AXIS_T, AXIS_IO, AXIS_S2, AXIS_XY = 200
}
 Axes numbers, together with special axis types. Assignment of the axes to array indexes is fixed, i.e. the first axis (index 0) is always X axis, etc... Special axes are used internally and have no relationship to array indexes. More...
 

Detailed Description

Constants declared as enumerations

Enumeration Type Documentation

◆ cnc_status

enum cnc_status : int32_t

StatusCNC return codes.

Enumerator
statusOFFLINE 

-2: remote device not connected (TGMmini, TGM_REMOTE)

statusSENDING_GCODE_TO_REMOTE_DEVICE 

-3: sending compiled G-code to TGMmini or TGM_REMOTE, percent progress in GCodeIndex

statusINVALID 

0: Initial state, no G-code loaded

statusCOMPILING 

1: Compile is in progress

statusCOMPILE_FINISHED 

-1: Compile finished (with success or error)

statusSIMULATING 

10: Simulation is in progress

statusSIMULATION_END 

-10: Simulation finished (OK or NOK)

statusSIMULATION_BREAK 

-11: Simulation broken by ToolChainCore_StopCNCEx

statusTEST 

20: Test is in progress

statusTEST_END 

-20: Test finished (OK or NOK)

statusTEST_BREAK 

-21: Test broken by ToolChainCore_StopCNCEx

statusTRAJECTORY_START 

-30: System is on start of trajectory

statusTRAJECTORY_BREAK 

-31: Stop on trajectory (interrupted by ToolChainCore_StopCNCEx or after connect or when the backward buffer is empty)

statusTRAJECTORY_END 

-32: End of trajectory, system stops

statusTRAJECTORY_BREAK_M0 

-33: Stop on trajectory by M0 function

statusFORWARD 

30: Normal forward movement on trajectory

statusFORWARD_NO_MFUNC 

31: Forward movement without M functions (which are skipped)

statusBACKWARD 

32: Backward movement on trajectory

statusFORWARD_SKIP_FIRST_M 

33: Forward movement. If the first part is M function, it is skipped. Following M functions are executed normally.

statusCONNECTING 

40: Calculation of connection point

statusCONNECT_MOVE 

41: Movement to connection point is in progress

statusHAND_MOVE 

50: Out of trajectory movement (ToolChainCore_GoToPosition)

statusOUT_OF_TRAJECTORY 

-50: System is stopped and positioned out of trajectory

statusCALCULATING 

60: Internal calculation is in progress

statusSTART_M_FUNCS 

70: Extra initial M functions are sending

statusSTOP_M_FUNCS 

80: Extra final M function are sending

statusCONNECT_INS_M_FUNCS 

90: Extra connecion M functions are sending

statusNONSENSE 

-1234: Invalid nonsense value

Definition at line 237 of file TGM_CNC.h.

◆ connect_type

enum connect_type : int32_t

Connection modes (ToolChainCore_ConnectCNCEx_Plane)

Enumerator
connectBY_COORD 

0: go to the nearest point of given position and stop
indexes of coords array: 0 - X pos, 1 - Y, 2 - Z, 3 - C, 4 - B, 5 - U, 6 - V, 7 - W, 8 - A, 9 - O

connectBY_LINE_START 

1: go to the begin (starting point) of G-code part located at given line
indexes of coords array:

  • 0 - line number
  • 1 - file index (ToolChainCore_FileToIdx),
  • 2 - maximal number of axes which will be moved to starting point of the G-code part. This is usually equal of number of axes of the machine, but for special purposes it could be lower
connectBY_LINE_END 

2: go to the end (ending point) of G-code part located at given line
indexes of coords array:

  • 0 - line number
  • 1 - file index (ToolChainCore_FileToIdx),
  • 2 - maximal number of axes which will be moved to starting point of the G-code part. This is usually equal of number of axes of the machine, but for special purposes it could be lower
connectBY_COORD_GO 

10: go to the nearest point of given position and continue.
After the movement to the connection point, the system fills its internal buffers to continue, which could take some time (depending of the G-code size).
indexes of coords array: 0 - X pos, 1 - Y, 2 - Z, 3 - C, 4 - B, 5 - U, 6 - V, 7 - W, 8 - A, 9 - O

connectBY_LINE_START_GO 

11: go to the begin (starting point) of G-code part located at give line
After the movement to the connection point, the system fills its internal buffers to continue, which could take some time (depending of the G-code size).
indexes of coords array:

  • 0 - line number
  • 1 - file index (ToolChainCore_FileToIdx),
  • 2 - maximal number of axes which will be moved to starting point of the G-code part. This is usually equal of number of axes of the machine, but for special purposes it could be lower
connectBY_LINE_END_GO 

12: go to the end (ending point) of G-code part located at give line
After the movement to the connection point, the system fills its internal buffers to continue, which could take some time (depending of the G-code size).
indexes of coords array:

  • 0 - line number
  • 1 - file index (ToolChainCore_FileToIdx),
  • 2 - maximal number of axes which will be moved to starting point of the G-code part. This is usually equal of number of axes of the machine, but for special purposes it could be lower
connectBY_M_FUNC_COUNT 

20: move to given n-th M function. The n-th repetition is counted absolute from beginning of the G-code.
indexes of coords array:

  • 0 - number of repetitions
  • 1 - M function number
  • 2 - maximal number of axes which will be moved to starting point of the G-code part.
connectBY_M_FUNC_COUNT_REL 

21: move to given n-th M function. The n-th repetition is counted relatively from actual G-code line number.
indexes of coords array:

  • 0 - number of repetitions
    • If G-code is at the beginning (status = -30), only positive values of repeats can be used (> 0).
    • If G-code is at the end (status = -32), only negative or zero values of repeats can be used (<=0).
    • If G-code is interrupted (status = -31):
      • If the number of repeats is 0, it will find the nearest previous M function with the relevant number (if standing right at the relevant M function, it will stay there).
      • If number of repeats equals +1, it will find the next nearest M function after the G-code line, where the machine is just standing.
      • If number of repeats equals -1, it will first find M function as in the case of 0 repeats and then yet another one preceding.
      • Similarly for higher numbers of repeats.
  • 1 - M function number
  • 2 - maximal number of axes which will be moved to starting point of the G-code part.
connectBY_GCODE_INDEX 

30: go to the begin (starting point) of the G-code part determined by its G-code index
G-code index is an unique number assigned by system to aech G-code part. It starts from zero and grows monotically- It is usually an even number, the odd numbers are used by the system to insert additional movements (during tool compensation calculation) . indexes of coords array:

  • 0 - G-code index
  • 1 - maximal number of axes which will be moved to starting point of the G-code part.
connectBY_GCODE_INDEX_ACTUAL_COORD 

31: go to the nearest point of the G-code part determined by its G-code index
G-code index is an unique number assigned by system to aech G-code part. It starts from zero and grows monotically- It is usually an even number, the odd numbers are used by the system to insert additional movements (during tool compensation calculation) . indexes of coords array:

  • 0 - G-code index
  • 1 - maximal number of axes which will be moved to starting point of the G-code part.
connectBY_GCODE_INDEX_END 

32: go to the end (ening point) of the G-code part determined by its G-code index
G-code index is an unique number assigned by system to aech G-code part. It starts from zero and grows monotically- It is usually an even number, the odd numbers are used by the system to insert additional movements (during tool compensation calculation) . indexes of coords array:

  • 0 - G-code index
  • 1 - maximal number of axes which will be moved to starting point of the G-code part.
connectBY_COORD_GO_BUFFERED 

40: go to the nearest point of given position and continue.
After the movement to the connection point the execution of the G-code parts continues immediately
indexes of coords array: 0 - X pos, 1 - Y, 2 - Z, 3 - C, 4 - B, 5 - U, 6 - V, 7 - W, 8 - A, 9 - O

connectBY_LINE_START_GO_BUFFERED 

41: go to the begin (starting point) of G-code part located at given line
After the movement to the connection point the execution of the G-code parts continues immediately
indexes of coords array:

  • 0 - line number
  • 1 - file index (ToolChainCore_FileToIdx),
  • 2 - maximal number of axes which will be moved to starting point of the G-code part. This is usually equal of number of axes of the machine, but for special purposes it could be lower
connectBY_LINE_END_GO_BUFFERED 

42: go to the end (ending point) of G-code part located at give line
After the movement to the connection point the execution of the G-code parts continues immediately
indexes of coords array:

  • 0 - line number
  • 1 - file index (ToolChainCore_FileToIdx),
  • 2 - maximal number of axes which will be moved to starting point of the G-code part. This is usually equal of number of axes of the machine, but for special purposes it could be lower

Definition at line 304 of file TGM_CNC.h.

◆ axis_idx

enum axis_idx : int32_t

Axes numbers, together with special axis types. Assignment of the axes to array indexes is fixed, i.e. the first axis (index 0) is always X axis, etc... Special axes are used internally and have no relationship to array indexes.

Enumerator
AXIS_NONE 

no axis is specified (marker for all axes)

AXIS_X 

0 - X axis

AXIS_Y 

1 - Y axis

AXIS_Z 

2 - Z axis

AXIS_C 

3 - C axis

AXIS_B 

4 - B axis

AXIS_U 

5 - U axis

AXIS_V 

6 - V axis

AXIS_W 

7 - W axis

AXIS_A 

8 - A axis

AXIS_O 

9 - O axis

AXIS_S 

100 - spindle

AXIS_T 

101 - tool

AXIS_IO 

102 - any I/O module

AXIS_S2 

103 - secondary spindle

AXIS_XY 

200 - XY plane

Definition at line 412 of file TGM_CNC.h.