TG Motion  version 502 - 4034/906 cnc 126
Enumerations

Enumerations

enum class  cnc::cnc_status : int32_t {
  cnc::OFFLINE_M02 = -2 ,
  cnc::INVALID_00 = 0 ,
  cnc::COMPILING_01 = 1 ,
  cnc::COMPILE_FINISHED_M01 = -1 ,
  cnc::SIMULATING_10 = 10 ,
  cnc::SIMULATION_END_M10 = -10 ,
  cnc::SIMULATION_BREAK_M11 = -11 ,
  cnc::TEST_20 = 20 ,
  cnc::TEST_END_M20 = -20 ,
  cnc::TEST_BREAK_M21 = -21 ,
  cnc::TRAJECTORY_START_M30 = -30 ,
  cnc::TRAJECTORY_BREAK_M31 = -31 ,
  cnc::TRAJECTORY_END_M32 = -32 ,
  cnc::TRAJECTORY_BREAK_M0_M33 = -33 ,
  cnc::FORWARD_30 = 30 ,
  cnc::FORWARD_NO_MFUNC_31 = 31 ,
  cnc::BACKWARD_32 = 32 ,
  cnc::FORWARD_SKIP_FIRST_M_33 = 33 ,
  cnc::CONNECTING_40 = 40 ,
  cnc::CONNECT_MOVE_41 = 41 ,
  cnc::HAND_MOVE_50 = 50 ,
  cnc::OUT_OF_TRAJECTORY_M50 = -50 ,
  cnc::CALCULATING_60 = 60 ,
  cnc::START_M_FUNCS_70 = 70 ,
  cnc::STOP_M_FUNCS_80 = 80 ,
  cnc::CONNECT_INS_M_FUNCS_90 = 90 ,
  cnc::NONSENSE = -1234
}
 StatusCNC return codes. More...
 
enum class  cnc::connect_type : uint32_t {
  cnc::BY_COORD = 0 ,
  cnc::BY_LINE_START = 1 ,
  cnc::BY_LINE_END = 2 ,
  cnc::BY_COORD_GO = 10 ,
  cnc::BY_LINE_START_GO = 11 ,
  cnc::BY_LINE_END_GO = 12 ,
  cnc::BY_M_FUNC_COUNT = 20 ,
  cnc::BY_M_FUNC_COUNT_REL = 21 ,
  cnc::BY_GCODE_INDEX = 30 ,
  cnc::BY_GCODE_INDEX_ACTUAL_COORD = 31 ,
  cnc::BY_GCODE_INDEX_END = 32 ,
  cnc::BY_COORD_GO_BUFFERED = 40 ,
  cnc::BY_LINE_START_GO_BUFFERED = 41 ,
  cnc::BY_LINE_END_GO_BUFFERED = 42 ,
  cnc::BY_GCODE_INDEX_ACTUAL_COORD_GO_BUFFERED = 44 ,
  cnc::BY_COORD_ON_TRAJECTORY_WITH_GCODE_INDEX_GO_BUFFERED = 46
}
 Connection modes (ToolChainCore_ConnectCNCEx_Plane) More...
 
enum class  cnc::status_after_connect : uint32_t {
  cnc::KEEP_00 = 0 ,
  cnc::FORCE_OUT_OF_TRAJECTORY_02 = 2
}
 Specifies wanted status after successful connect for ToolChainCore_ConnectCNCEx_Plane. More...
 
enum class  cnc::axis_idx : int32_t {
  cnc::AXIS_NONE = -1 ,
  cnc::AXIS_X = 0 ,
  cnc::AXIS_Y = 1 ,
  cnc::AXIS_Z = 2 ,
  cnc::AXIS_C = 3 ,
  cnc::AXIS_B = 4 ,
  cnc::AXIS_U = 5 ,
  cnc::AXIS_V = 6 ,
  cnc::AXIS_W = 7 ,
  cnc::AXIS_A = 8 ,
  cnc::AXIS_O = 9 ,
  cnc::AXIS_S = 100 ,
  cnc::AXIS_T = 101 ,
  cnc::AXIS_IO = 102 ,
  cnc::AXIS_S2 = 103 ,
  cnc::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...
 
enum class  cnc::reset_status_cnc : uint32_t {
  cnc::TO_INVALID_00 = 0 ,
  cnc::TO_OUT_OF_TYRAJECTORY_01 = 1
}
 Values for ToolChainCore_ResetStatusCNC function. More...
 

Detailed Description

Constants declared as enumerations

Enumeration Type Documentation

◆ axis_idx

enum cnc::axis_idx : int32_t
strong

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

◆ cnc_status

enum cnc::cnc_status : int32_t
strong

StatusCNC return codes.

Enumerator
OFFLINE_M02 

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

INVALID_00 

0: Initial state, no G-code loaded

COMPILING_01 

1: Compile is in progress

COMPILE_FINISHED_M01 

-1: Compile finished (with success or error)

SIMULATING_10 

10: Simulation is in progress

SIMULATION_END_M10 

-10: Simulation finished (OK or NOK)

SIMULATION_BREAK_M11 

-11: Simulation broken by ToolChainCore_StopCNCEx

TEST_20 

20: Test is in progress

TEST_END_M20 

-20: Test finished (OK or NOK)

TEST_BREAK_M21 

-21: Test broken by ToolChainCore_StopCNCEx

TRAJECTORY_START_M30 

-30: System is on start of trajectory

TRAJECTORY_BREAK_M31 

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

TRAJECTORY_END_M32 

-32: End of trajectory, system stops

TRAJECTORY_BREAK_M0_M33 

-33: Stop on trajectory by M0 function

FORWARD_30 

30: Normal forward movement on trajectory

FORWARD_NO_MFUNC_31 

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

BACKWARD_32 

32: Backward movement on trajectory

FORWARD_SKIP_FIRST_M_33 

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

CONNECTING_40 

40: Calculation of connection point

CONNECT_MOVE_41 

41: Movement to connection point is in progress

HAND_MOVE_50 

50: Moving to any position (ToolChainCore_GoToPosition)

OUT_OF_TRAJECTORY_M50 

-50: System is stopped and positioned out of trajectory

CALCULATING_60 

60: Internal calculation is in progress

START_M_FUNCS_70 

70: Extra initial M functions are sending

STOP_M_FUNCS_80 

80: Extra final M function are sending

CONNECT_INS_M_FUNCS_90 

90: Extra connection M functions are sending

NONSENSE 

-1234: Invalid nonsense value

◆ connect_type

enum cnc::connect_type : uint32_t
strong

Connection modes (ToolChainCore_ConnectCNCEx_Plane)

Enumerator
BY_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

BY_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
BY_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
BY_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

BY_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
BY_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
BY_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.
BY_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.
BY_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 each G-code part. It starts from zero and grows monotonically- 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.
BY_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 each G-code part. It starts from zero and grows monotonically- 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.
BY_GCODE_INDEX_END 

32: go to the end (ending point) of the G-code part determined by its G-code index
G-code index is an unique number assigned by system to each G-code part. It starts from zero and grows monotonically- 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.
BY_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

BY_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
BY_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
BY_GCODE_INDEX_ACTUAL_COORD_GO_BUFFERED 

44: go to the nearest point of the G-code part determined by its G-code index
After the movement to the connection point the execution of the G-code parts continues immediately
G-code index is an unique number assigned by system to each G-code part. It starts from zero and grows monotonically- 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.
BY_COORD_ON_TRAJECTORY_WITH_GCODE_INDEX_GO_BUFFERED 

46: go to the exact point on trajectory given by coords and G-code index and continue movement.
The point must be on the trajectory with tolerance given by GCODE_PARAMETERS::tolerance[GCODE_SOURCE_PRECISION]. 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, 10 - G-code index of the part to connect

◆ reset_status_cnc

enum cnc::reset_status_cnc : uint32_t
strong

Values for ToolChainCore_ResetStatusCNC function.

Enumerator
TO_INVALID_00 

Clear compiled data, free memory and set CNC status to cnc_status::INVALID_00.

TO_OUT_OF_TYRAJECTORY_01 

Set CNC status to cnc_status::OUT_OF_TRAJECTORY_M50.

◆ status_after_connect

enum cnc::status_after_connect : uint32_t
strong

Specifies wanted status after successful connect for ToolChainCore_ConnectCNCEx_Plane.

Enumerator
KEEP_00 

keep the status calculated by system

FORCE_OUT_OF_TRAJECTORY_02 

set the status to cnc_status::OUT_OF_TRAJECTORY_M50