TG Motion  version 502 - 4034/906 cnc 126
Structures

Classes

struct  cnc::SIMPLE_INFO
 Auxiliary G-code functions use this structure. More...
 
struct  cnc::P10DOUBLE
 This structure defines 10 coordinates of float64_t type (8 bytes) More...
 
struct  cnc::P10BOOL
 Structure similar to P10DOUBLE, using integers. More...
 
struct  cnc::ACTUAL_GM_VALUES
 Actual parameters. More...
 
struct  cnc::SIMPLE_GM_PARAMS_WIN32
 Describes one G-code part. More...
 
struct  cnc::CALLBACK_INFO
 Structure for transmitting information for the function ToolChainCore_GetLastError and for the callback functions AddOutputLogFunc, SetStatusBarTextFunc, MathWarningFunc. More...
 
struct  cnc::GCODE_FEED
 Definition of default feeds. More...
 
struct  cnc::AXIS_LIMITS
 Limits for one axis. More...
 
struct  cnc::GCODE_CORRECTION
 Definition of corrections. More...
 
struct  cnc::ARC_FEED_TABLE
 Table of speeds, relative arc speeds in relation to radius. More...
 
struct  cnc::INTERNAL_MFUNC_INSERT_TABLE
 Values of inserted M functions. More...
 
struct  cnc::GCODE_PARAMETERS
 Structure for setting G-code properties. More...
 
struct  cnc::GCODE_SIZE
 Initial position, end position and size. More...
 
struct  cnc::GCODE_INFO
 G-code size. More...
 
struct  cnc::DLL_INIT_STRUCT
 Initialization structure. Used by ToolChainCore_Init. More...
 
struct  cnc::MACHINE_PARAMETERS
 Machine parameters. More...
 
struct  cnc::MACHINE_STATUS
 Machine status. More...
 

Variables

constexpr uint32_t cnc::CORR_STRATEGY_G41_ALREADY_CORRECTED { 0U }
 G41, G42 means already corrected coordinate; G40 says that only the end of the following motion will be left uncorrected.
 
constexpr uint32_t cnc::CORR_STRATEGY_G41_STARTS_CORRECTION { 1U }
 G41, G42 only corrects the end of the following motion; G40 says the end of the previous motion will not be corrected.
 
constexpr uint32_t cnc::CORR_STRATEGY_MASK { 0xFFU }
 bits not used for correction strategy
 
constexpr uint32_t cnc::CORR_STRATEGY_OLD_VERSION { 0x80000000U }
 
constexpr uint32_t cnc::CORR_STRATEGY_G00_WITHOUT_CORR { 0x40000000U }
 If this bit is set, G00 is always without correction.
 
constexpr uint32_t cnc::CORR_STRATEGY_FORCE_TO_CONTINUE { 0x20000000U }
 
constexpr uint32_t cnc::CORR_STRATEGY_CHECK_ORIGINAL_GCODE { 0x02000000U }
 checks continuity of the G-code with the given tolerance (see GCODE_PARAMETERS::tolerance).
 
constexpr uint32_t cnc::CORR_STRATEGY_REMOVE_LAST_ARC { 0x01000000 }
 removes the last arc of a closed conture (in the case that the arc is the exit of the conture) if the equidistants do not cross
 
constexpr uint32_t cnc::CORR_STRATEGY_REMOVE_FIRST_ARC { 0x00800000U }
 removes the first arc of a closed conture (in the case that the arc is the approach of the conture) if the equidistants do not cross
 
constexpr uint32_t cnc::CORR_STRATEGY_NO_ADD_R { 0x00400000U }
 
constexpr uint32_t cnc::CORR_STRATEGY_REMOVE_SMALL_ARCS { 0x00200000U }
 
constexpr uint32_t cnc::CORR_STRATEGY_ALLOW_REVERSE_LINES { 0x00100000U }
 Allow more exact calculation of the tool compensation by reverse search with the buffer. Slows down the calculation.
 
constexpr uint32_t cnc::CORR_STRATEGY_REMOVE_CROSSES { 0x00080000U }
 After the calculation, if there are crossed parts (which are not crossed in the original G-code), these parts are removed.
 
constexpr uint32_t cnc::CORR_STRATEGY_CONNECT_WRONG_BY_G1 { 0x00040000U }
 After correction calculation, if there are unconnected parts, connect them by inserted G1.
 
constexpr uint32_t cnc::CORR_STRATEGY_CONNECT_WRONG_BY_MOVE { 0x00020000U }
 
constexpr uint32_t cnc::CORR_STRATEGY_ALLOW_FIRST_LAST_CROSS { 0x00010000U }
 Allow crossing of the first and last part of the closed conture. In that case, parts inside are not removed.
 
constexpr uint32_t cnc::CORR_STRATEGY_SEARCH_MASK { 0x00000700U }
 mask bits for search deep number
 
constexpr uint32_t cnc::CORR_STRATEGY_SEARCH_DEEP_10 { 0x00000100U }
 Search at least 10 parts for possible crosses.
 
constexpr uint32_t cnc::CORR_STRATEGY_SEARCH_DEEP_50 { 0x00000200U }
 Search at least 50 parts for possible crosses.
 
constexpr uint32_t cnc::CORR_STRATEGY_SEARCH_DEEP_100 { 0x00000300U }
 Search at least 100 parts for possible crosses.
 
constexpr uint32_t cnc::CORR_STRATEGY_SEARCH_DEEP_500 { 0x00000400U }
 Search at least 500 parts for possible crosses.
 
constexpr uint32_t cnc::CORR_STRATEGY_SEARCH_DEEP_1000 { 0x00000500U }
 Search at least 1000 parts for possible crosses.
 
constexpr uint32_t cnc::CORR_STRATEGY_SEARCH_DEEP_2000 { 0x00000600U }
 Search at least 2000 parts for possible crosses.
 
constexpr uint32_t cnc::CORR_STRATEGY_SEARCH_DEEP_ALL { 0x00000700U }
 Search all parts for possible crosses.
 
constexpr uint32_t cnc::CORR_STRATEGY_DEFAULT_DEEP { 1000U }
 Default deep search number. Search at least 1000 G-code parts for possible crosses.
 
constexpr uint32_t cnc::CORR_STRATEGY_MIN_DEEP { 10U }
 Minimal search number.
 
constexpr uint32_t cnc::F_BY_GCODE { 0U }
 Feed is fully defined in G-code.
 
constexpr uint32_t cnc::F_BY_PARAMETERS { 1U }
 All feeds are set by values in motion array.
 
constexpr uint32_t cnc::F_BY_PARAMETERS_FP_BY_GCODE { 2U }
 All feeds are set by values in motion array but can be overridden by FP address.
 
constexpr uint32_t cnc::DEF_GCODE_FEED_G00 { 0U }
 indexes to feed table (GCODE_PARAMETERS::motion) More...
 
constexpr uint32_t cnc::DEF_GCODE_FEED_G01 { 1U }
 linear interpolation G1
 
constexpr uint32_t cnc::DEF_GCODE_FEED_REVERSE { 2U }
 backward movement (cnc_status::BACKWARD_32)
 
constexpr uint32_t cnc::DEF_GCODE_FEED_CONNECT { 3U }
 connect to trajectory
 
constexpr uint32_t cnc::DEF_GCODE_FEED_WITHOUT_M { 4U }
 movement without M functions
 
constexpr uint32_t cnc::DEF_GCODE_FEED_GOTO_POSITION { 5U }
 goto position
 
constexpr uint32_t cnc::DEF_GCODE_FEED_NORMAL_STOP { 6U }
 stop (only deceleration is used)
 
constexpr uint32_t cnc::DEF_GCODE_FEED_EMERGENCY_STOP { 7U }
 emergency stop (only deceleration is used)
 
constexpr uint32_t cnc::DISABLE_OPCODE_CALL { 0x00000001U }
 
constexpr uint32_t cnc::DISABLE_ASSIGN_CALL { 0x00000002U }
 
constexpr uint32_t cnc::DISABLE_REFRESH_ALL_PARAMS_CALL { 0x00000004U }
 
constexpr uint32_t cnc::GCODE_ALLOWED_CIRC_CENTER_ACCURACY { 0U }
 index to GCODE_PARAMETERS::tolerance array
 
constexpr uint32_t cnc::GCODE_CROSSING_ACCURACY { 1U }
 index to GCODE_PARAMETERS::tolerance array
 
constexpr uint32_t cnc::GCODE_ANGULAR_PRECISION { 2U }
 index to GCODE_PARAMETERS::tolerance array
 
constexpr uint32_t cnc::GCODE_ANGULAR_DISTANCE_PRECISION { 3U }
 index to GCODE_PARAMETERS::tolerance array
 
constexpr uint32_t cnc::GCODE_MINIMAL_ALLOWED_ARC_R { 4U }
 index to GCODE_PARAMETERS::tolerance array
 
constexpr uint32_t cnc::GCODE_NO_ADD_R_MULTIPLIER { 5U }
 index to GCODE_PARAMETERS::tolerance array
 
constexpr uint32_t cnc::GCODE_SOURCE_PRECISION { 6U }
 index to GCODE_PARAMETERS::tolerance array
 
constexpr uint32_t cnc::GCODE_MINIMAL_ALLOWED_LINE_LENGTH { 7U }
 index to GCODE_PARAMETERS::tolerance array
 
constexpr uint32_t cnc::INTERPOLATOR_CONFIG0_USE_REL_SPEED_BY_TIME { 0x0000'0001 }
 
constexpr uint32_t cnc::INTERPOLATOR_CONFIG0_CONT_M_FUNC_IN_PLACE { 0x0000'0002 }
 
constexpr uint32_t cnc::INTERPOLATOR_CONFIG0_DO_NOT_STOP_BETWEEN_G00_G01 { 0x0001'0000 }
 
constexpr uint32_t cnc::INTERPOLATOR_CONFIG0_USE_FAST_FEED_IN_ALL_REGIMES { 0x0002'0000 }
 
constexpr uint32_t cnc::GCODE_SIZE_ORIGINAL_IDX { 0U }
 original G-code
 
constexpr uint32_t cnc::GCODE_SIZE_CORRECTED_IDX { 1U }
 compensated G-code
 
constexpr uint32_t cnc::GCODE_SIZE_ROTATED_IDX { 2U }
 original rotated G-code
 
constexpr uint32_t cnc::GCODE_SIZE_ROTATED_CORRECTED_IDX { 3U }
 compensated rotated G-code
 

Detailed Description

Variable Documentation

◆ CORR_STRATEGY_CONNECT_WRONG_BY_MOVE

constexpr uint32_t cnc::CORR_STRATEGY_CONNECT_WRONG_BY_MOVE { 0x00020000U }
constexpr

After correction calculation, if there are unconnected parts, connect them by move of starting point to endpoint of the previous part. Only for G1. G2/G3 are always connected by G1 if this bit is set.

◆ CORR_STRATEGY_FORCE_TO_CONTINUE

constexpr uint32_t cnc::CORR_STRATEGY_FORCE_TO_CONTINUE { 0x20000000U }
constexpr

In the case of wrong G-code (impossible to calculate tool compensation), do not throw an error and continue. Usable for simulation only.

◆ CORR_STRATEGY_NO_ADD_R

constexpr uint32_t cnc::CORR_STRATEGY_NO_ADD_R { 0x00400000U }
constexpr

if possible, do not connect two parts by and additional arc (with radius equal to tool radius), but uses its cross point. The allowed distance is specified as a multiple of tool radius (see GCODE_PARAMETERS::tolerance)

◆ CORR_STRATEGY_OLD_VERSION

constexpr uint32_t cnc::CORR_STRATEGY_OLD_VERSION { 0x80000000U }
constexpr

If this bit is set, the mode of compatibility with the old system is set. Specifically, the first G41/G42 is ignored, if there is no motion in front of it. Further, the G40 - G41/G42 pair is ignored, if they follow closely one by one (i.e. no motion between G40 and G41/G42).

◆ CORR_STRATEGY_REMOVE_SMALL_ARCS

constexpr uint32_t cnc::CORR_STRATEGY_REMOVE_SMALL_ARCS { 0x00200000U }
constexpr

After tool compensation calculation, there could be arcs with negative or very small radius. If the calculated radius of such arcs is smaller than a value given in GCODE_PARAMETERS::tolerance[GCODE_MINIMAL_ALLOWED_ARC_R], the arc will be removed. This bit is usually set.

◆ DEF_GCODE_FEED_G00

constexpr uint32_t cnc::DEF_GCODE_FEED_G00 { 0U }
constexpr

indexes to feed table (GCODE_PARAMETERS::motion)

rapid traverse G0

◆ DISABLE_ASSIGN_CALL

constexpr uint32_t cnc::DISABLE_ASSIGN_CALL { 0x00000002U }
constexpr

set this bit to GCODE_PARAMETERS::disableAdditionalProgramFlowInfo to speed up G-code execution

◆ DISABLE_OPCODE_CALL

constexpr uint32_t cnc::DISABLE_OPCODE_CALL { 0x00000001U }
constexpr

set this bit to GCODE_PARAMETERS::disableAdditionalProgramFlowInfo to speed up G-code execution

◆ DISABLE_REFRESH_ALL_PARAMS_CALL

constexpr uint32_t cnc::DISABLE_REFRESH_ALL_PARAMS_CALL { 0x00000004U }
constexpr

set this bit to GCODE_PARAMETERS::disableAdditionalProgramFlowInfo to speed up G-code execution

◆ INTERPOLATOR_CONFIG0_CONT_M_FUNC_IN_PLACE

constexpr uint32_t cnc::INTERPOLATOR_CONFIG0_CONT_M_FUNC_IN_PLACE { 0x0000'0002 }
constexpr

If set, continuous M function is executed exactly in the place where it is defined in the G-code (new behavior). If not set (old behavior), it is appended to the previous already existing G0, G1, G2, G3 or M function.

◆ INTERPOLATOR_CONFIG0_DO_NOT_STOP_BETWEEN_G00_G01

constexpr uint32_t cnc::INTERPOLATOR_CONFIG0_DO_NOT_STOP_BETWEEN_G00_G01 { 0x0001'0000 }
constexpr

set this bit to GCODE_PARAMETERS::interpolatorConfig0
if set, system does not stop between G00 <-> G01 (G02, G03)

◆ INTERPOLATOR_CONFIG0_USE_FAST_FEED_IN_ALL_REGIMES

constexpr uint32_t cnc::INTERPOLATOR_CONFIG0_USE_FAST_FEED_IN_ALL_REGIMES { 0x0002'0000 }
constexpr

set this bit to GCODE_PARAMETERS::interpolatorConfig0
if set, fast feed value is used for G00 in all regimes (30, 31, 32, 33)

◆ INTERPOLATOR_CONFIG0_USE_REL_SPEED_BY_TIME

constexpr uint32_t cnc::INTERPOLATOR_CONFIG0_USE_REL_SPEED_BY_TIME { 0x0000'0001 }
constexpr

set this bit to GCODE_PARAMETERS::interpolatorConfig0
controls relative speed strategy