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

Macros

#define CALLBACK_CALLTYPE   TOOLCHAIN_CALLTYPE
 Callbacks uses the same calling convention as exported functions.
 
#define APP_AddOutputLogFunc   1
 callback index number
 
#define APP_SetStatusBarTextFunc   2
 callback index number
 
#define APP_IsDebugModeFunc   3
 callback index number
 
#define APP_IsVerboseModeFunc   4
 callback index number
 
#define APP_GetLibPathFunc   5
 callback index number
 
#define APP_GetToolPathFunc   6
 callback index number
 
#define APP_GetSystemPathFunc   7
 callback index number
 
#define APP_GetFileTimeStampFunc   10
 callback index number
 
#define APP_DoYieldFunc   11
 callback index number
 
#define APP_ReadIniStringFunc   12
 callback index number
 
#define APP_ReadIniDoubleFunc   13
 callback index number
 
#define APP_ReadIniIntFunc   14
 callback index number
 
#define APP_DispRunInfoAndWaitFunc   15
 callback index number
 
#define APP_DispRunInfoFunc   16
 callback index number
 
#define APP_IsBreakpointFunc   17
 callback index number
 
#define APP_DispAndLocateErrorFunc   18
 callback index number
 
#define APP_DispLastInfoFunc   19
 callback index number
 
#define APP_IsStepModeFunc   20
 callback index number
 
#define APP_IsHandControlFunc   21
 callback index number
 
#define APP_SetRegimeFromUserKeyFunc   22
 callback index number
 
#define APP_ExecMenuCommandFromUserKeyFunc   23
 callback index number
 
#define APP_MaxFuncNumber   1000
 last function in APP group
 
#define DRV_InitializeFunc   1001
 callback index number
 
#define DRV_GFunc   1002
 callback index number
 
#define DRV_MFunc   1003
 callback index number
 
#define ConnectPointCalcStartFuncNumber   1004
 callback index number
 
#define ConnectPointCalcFunc_UseReturnValues   1
 Return value of ConnectPointCalcFunc or ConnectPointCalcEndFunc values are used.
 
#define ConnectPointCalcFuncNumber   1005
 callback index number
 
#define ConnectPointCalcEndFuncNumber   1006
 callback index number
 
#define DRV_MaxFuncNumber   2000
 last function number in DRV group
 
#define MATH_WarningFunc   2001
 callback index number
 
#define MATH_MaxFuncNumber   3000
 last function number in MATH group
 

Typedefs

typedef int32_t CALLBACK_CALLTYPE FuncPrototype(intptr_t dwUserData)
 Generic callback function prototype.
 
typedef int32_t CALLBACK_CALLTYPE AddOutputLogFunc(intptr_t dwUserData, int32_t tab, TGM_LPCTSTR info, CALLBACK_INFO *callBackInfo)
 Writes text to output log. More...
 
typedef int32_t CALLBACK_CALLTYPE SetStatusBarTextFunc(intptr_t dwUserData, int32_t pane, TGM_LPCTSTR strText, CALLBACK_INFO *callBackInfo)
 Display informational text in the status line of the application. More...
 
typedef int32_t CALLBACK_CALLTYPE IsDebugModeFunc(intptr_t dwUserData)
 Ask if debug regime is enabled. More...
 
typedef int32_t CALLBACK_CALLTYPE IsVerboseModeFunc(intptr_t dwUserData)
 Ask if verbose regime is enabled. More...
 
typedef TGM_LPCTSTR CALLBACK_CALLTYPE GetLibPathFunc(intptr_t dwUserData)
 Returns path to external G functions stored as G-code on the disk. More...
 
typedef TGM_LPCTSTR CALLBACK_CALLTYPE GetToolPathFunc(intptr_t dwUserData)
 Returns path to files describing tools geometry. Only for lathe. More...
 
typedef TGM_LPCTSTR CALLBACK_CALLTYPE GetSystemPathFunc(intptr_t dwUserData)
 Returns path to system files. Not yet used by CNC module. More...
 
typedef int64_t CALLBACK_CALLTYPE GetFileTimeStampFunc(intptr_t dwUserData, uint32_t fileIdx)
 returns time stamp of a given file (usually time in ms since epoch) More...
 
typedef int32_t CALLBACK_CALLTYPE DoYieldFunc(intptr_t dwUserData, int32_t messageOnly)
 Switch control to other thread. LOCAL_CORE_MODE_DLL only. More...
 
typedef void CALLBACK_CALLTYPE ReadIniStringFunc(intptr_t dwUserData, TGM_LPCTSTR section, TGM_LPCTSTR key, TGM_LPCTSTR defValue, TGM_LPTSTR buffer, uint32_t bufferSizeInCharacters)
 Read string from .INI file. More...
 
typedef double CALLBACK_CALLTYPE ReadIniDoubleFunc(intptr_t dwUserData, TGM_LPCTSTR section, TGM_LPCTSTR key, double defValue)
 Read double value from .INI file. More...
 
typedef int32_t CALLBACK_CALLTYPE ReadIniIntFunc(intptr_t dwUserData, TGM_LPCTSTR section, TGM_LPCTSTR key, int32_t defValue)
 Read integer value from .INI file. More...
 
typedef int32_t CALLBACK_CALLTYPE DispRunInfoAndWaitFunc(intptr_t dwUserData, uint32_t editorLine, int32_t fileIdx, TGM_LPCTSTR statusInfo, int32_t bNoBreakpoints, int32_t bForceToWait, const double *params, const uint32_t maxParams)
 Display info about the actual G-code part. More...
 
typedef int32_t CALLBACK_CALLTYPE DispRunInfoFunc(intptr_t dwUserData, uint32_t editorLine, int32_t fileIdx, TGM_LPCTSTR statusInfo, const SIMPLE_GM_PARAMS_WIN32 *pCmd)
 Display info about the actual G-code part. More...
 
typedef int32_t CALLBACK_CALLTYPE IsBreakpointFunc(intptr_t dwUserData, uint32_t editorLine, int32_t fileIdx)
 Determines if there is a breakpoint on given G-code file line. More...
 
typedef int32_t CALLBACK_CALLTYPE DispAndLocateErrorFunc(intptr_t dwUserData, uint32_t editorLine, int32_t fileIdx, TGM_LPCTSTR errString, CALLBACK_INFO *callBackInfo)
 This function is called in case of an error. More...
 
typedef int32_t CALLBACK_CALLTYPE DispLastInfoFunc(intptr_t dwUserData)
 Called when G-code execution finished (OK and NOK) More...
 
typedef int32_t CALLBACK_CALLTYPE IsStepModeFunc(intptr_t dwUserData)
 Ask if execute G-code step by step (part by part). Not yet used. More...
 
typedef int32_t CALLBACK_CALLTYPE IsHandControlFunc(intptr_t dwUserData)
 Ask if application is in hand control (service mode). Not yet used. More...
 
typedef int32_t CALLBACK_CALLTYPE SetRegimeFromUserKeyFunc(intptr_t dwUserData, int32_t key)
 Reserved. More...
 
typedef int32_t CALLBACK_CALLTYPE ExecMenuCommandFromUserKeyFunc(intptr_t dwUserData, int key)
 Reserved. More...
 
typedef int32_t CALLBACK_CALLTYPE DriverInitializeFunc(intptr_t dwUserData, double *params, uint32_t nParams, int32_t bTestMode)
 Called always before G-code execution. More...
 
typedef int32_t CALLBACK_CALLTYPE DriverGFunc(intptr_t dwUserData, const SIMPLE_GM_PARAMS_WIN32 *v)
 Called to simulate G function. More...
 
typedef int32_t CALLBACK_CALLTYPE DriverMFunc(intptr_t dwUserData, const SIMPLE_GM_PARAMS_WIN32 *v)
 Called to simulate M function. More...
 
typedef int32_t CALLBACK_CALLTYPE ConnectPointCalcStartFunc(intptr_t dwUserData, const int32_t nType, const uint32_t nCoords, const double *coords, const uint32_t bitCodedAxesForCalc)
 Initiate user connection calculation. More...
 
typedef int32_t CALLBACK_CALLTYPE ConnectPointCalcFunc(intptr_t dwUserData, const SIMPLE_GM_PARAMS_WIN32 *part, double *calcSquareDistanceFromCoords, P10DOUBLE *calcConnectPoint)
 Calculate distance from initial tool point to a give G-code part. More...
 
typedef int32_t CALLBACK_CALLTYPE ConnectPointCalcEndFunc(intptr_t dwUserData, SIMPLE_GM_PARAMS_WIN32 *partToBeConnectedTo, P10DOUBLE *connectPosToBeMovedTo)
 End of connection calculation. More...
 
typedef int32_t CALLBACK_CALLTYPE MathWarningFunc(intptr_t dwUserData, CALLBACK_INFO *pCallbackInfo)
 Called in case of warning issued during tool diameter compensation calculation. More...
 

Detailed Description

Typedef Documentation

◆ AddOutputLogFunc

typedef int32_t CALLBACK_CALLTYPE AddOutputLogFunc(intptr_t dwUserData, int32_t tab, TGM_LPCTSTR info, CALLBACK_INFO *callBackInfo)

Writes text to output log.

Parameters
dwUserDataUser data given by ToolChainCore_SetCallBack function
indicatesseverity of the text. Log output may be directed to:
tab value description
DEVICE_ERROR_OUT_TAB 0 errors tab
CNC_OUT_TAB 1 CNC tab (syntax errors, etc.)
M29_OUT_TAB 2 output of M29 function
STATUS_LINE_ONLY 3 display text only in status line
ACTIVATE_TAB 0x100 activate view
infoText to be displayed
callBackInfoPointer to CALLBACK_INFO with additional text informations
Returns
Always 0, ignored by CNC module

Definition at line 1922 of file TGM_CNC.h.

◆ SetStatusBarTextFunc

typedef int32_t CALLBACK_CALLTYPE SetStatusBarTextFunc(intptr_t dwUserData, int32_t pane, TGM_LPCTSTR strText, CALLBACK_INFO *callBackInfo)

Display informational text in the status line of the application.

Called during long operations like compilation, etc.

Parameters
dwUserDataUser data given by ToolChainCore_SetCallBack function
panealways 0
strTextText to be displayed in a status line of the application
callBackInfoPointer to CALLBACK_INFO with additional text information
Returns
Always 0, ignored by CNC module

Definition at line 1936 of file TGM_CNC.h.

◆ IsDebugModeFunc

typedef int32_t CALLBACK_CALLTYPE IsDebugModeFunc(intptr_t dwUserData)

Ask if debug regime is enabled.

Debug regime displays a lot of information to debug view (or terminal), produces helper files (results of compilation and G-code execution) and slow down the whole CNC module. Can be enabled also by .INI file.

Parameters
dwUserDataUser data given by ToolChainCore_SetCallBack function
Returns
1 for debug mode, 0 for normal mode

Definition at line 1949 of file TGM_CNC.h.

◆ IsVerboseModeFunc

typedef int32_t CALLBACK_CALLTYPE IsVerboseModeFunc(intptr_t dwUserData)

Ask if verbose regime is enabled.

Verbose regime adds additional information to debug mode, displayed in debug output or terminal. Slows down the CNC module significantly (especially for large G-code files) Can be enabled also by .INI file.

Parameters
dwUserDataUser data given by ToolChainCore_SetCallBack function
Returns
1 for verbose mode, 0 for normal mode

Definition at line 1959 of file TGM_CNC.h.

◆ GetLibPathFunc

typedef TGM_LPCTSTR CALLBACK_CALLTYPE GetLibPathFunc(intptr_t dwUserData)

Returns path to external G functions stored as G-code on the disk.

Parameters
dwUserDataUser data given by ToolChainCore_SetCallBack function
Returns
String with full path. UNICODE on PC, ANSI on TGMmini
Note
the path can be also set by ToolChainCore_Init function.

Definition at line 1967 of file TGM_CNC.h.

◆ GetToolPathFunc

typedef TGM_LPCTSTR CALLBACK_CALLTYPE GetToolPathFunc(intptr_t dwUserData)

Returns path to files describing tools geometry. Only for lathe.

Parameters
dwUserDataUser data given by ToolChainCore_SetCallBack function
Returns
Full path to directory with tool description files.
Note
It is not necessary to implement this callback.

Definition at line 1975 of file TGM_CNC.h.

◆ GetSystemPathFunc

typedef TGM_LPCTSTR CALLBACK_CALLTYPE GetSystemPathFunc(intptr_t dwUserData)

Returns path to system files. Not yet used by CNC module.

Parameters
dwUserDataUser data given by ToolChainCore_SetCallBack function
Returns
Path as UNICODE on PC or ANSI on TGMmini.
Note
It is not necessary to implement this callback.

Definition at line 1983 of file TGM_CNC.h.

◆ GetFileTimeStampFunc

typedef int64_t CALLBACK_CALLTYPE GetFileTimeStampFunc(intptr_t dwUserData, uint32_t fileIdx)

returns time stamp of a given file (usually time in ms since epoch)

Parameters
dwUserDataUser data given by ToolChainCore_SetCallBack function
fileIdxIndex of the file. File name and path must be taken by ToolChainCore_IdxToFile.
Returns
64bit time value
Note
It is not necessary to implement this callback.

Definition at line 1993 of file TGM_CNC.h.

◆ DoYieldFunc

typedef int32_t CALLBACK_CALLTYPE DoYieldFunc(intptr_t dwUserData, int32_t messageOnly)

Switch control to other thread. LOCAL_CORE_MODE_DLL only.

Parameters
dwUserDataUser data given by ToolChainCore_SetCallBack function
reserved
Returns
Always 0, ignored by CNC module
Note
It is not necessary to implement this callback.

Definition at line 2002 of file TGM_CNC.h.

◆ ReadIniStringFunc

typedef void CALLBACK_CALLTYPE ReadIniStringFunc(intptr_t dwUserData, TGM_LPCTSTR section, TGM_LPCTSTR key, TGM_LPCTSTR defValue, TGM_LPTSTR buffer, uint32_t bufferSizeInCharacters)

Read string from .INI file.

Follows Windows .INI file syntax.

Parameters
dwUserDataUser data given by ToolChainCore_SetCallBack function
sectionFile section (in square brackets)
keyKey name (text in front of the equal sign)
defValueDefault text value if key not found
bufferbuffer where to copy string from .INI file
bufferSizeInCharactersSize of the buffer in characters (not bytes)
Note
It is not necessary to implement this callback.

Definition at line 2015 of file TGM_CNC.h.

◆ ReadIniDoubleFunc

typedef double CALLBACK_CALLTYPE ReadIniDoubleFunc(intptr_t dwUserData, TGM_LPCTSTR section, TGM_LPCTSTR key, double defValue)

Read double value from .INI file.

Follows Windows .INI file syntax.

Parameters
dwUserDataUser data given by ToolChainCore_SetCallBack function
sectionFile section (in square brackets)
keyKey name (text in front of the equal sign)
defValueDefault value if key not found
Returns
Value from the .INI file
Note
It is not necessary to implement this callback.

Definition at line 2032 of file TGM_CNC.h.

◆ ReadIniIntFunc

typedef int32_t CALLBACK_CALLTYPE ReadIniIntFunc(intptr_t dwUserData, TGM_LPCTSTR section, TGM_LPCTSTR key, int32_t defValue)

Read integer value from .INI file.

Follows Windows .INI file syntax.

Parameters
dwUserDataUser data given by ToolChainCore_SetCallBack function
sectionFile section (in square brackets)
keyKey name (text in front of the equal sign)
defValueDefault value if key not found
Returns
Value from the .INI file
Note
It is not necessary to implement this callback.

Definition at line 2047 of file TGM_CNC.h.

◆ DispRunInfoAndWaitFunc

typedef int32_t CALLBACK_CALLTYPE DispRunInfoAndWaitFunc(intptr_t dwUserData, uint32_t editorLine, int32_t fileIdx, TGM_LPCTSTR statusInfo, int32_t bNoBreakpoints, int32_t bForceToWait, const double *params, const uint32_t maxParams)

Display info about the actual G-code part.

Allows to interrupt execution of the G-code.

Parameters
dwUserDataUser data given by ToolChainCore_SetCallBack function
editorLineActual line number in the G-code
fileIdxActual file index. Filename can be obtained by ToolChainCore_IdxToFile
statusInfoText to be displayed in the status line
bNoBreakpoints
bForceToWait
paramsArray of all the Pxx parameters
maxParamsNumber of parameters in the params array
Returns
Always 0, ignored by CNC module

Definition at line 2065 of file TGM_CNC.h.

◆ DispRunInfoFunc

typedef int32_t CALLBACK_CALLTYPE DispRunInfoFunc(intptr_t dwUserData, uint32_t editorLine, int32_t fileIdx, TGM_LPCTSTR statusInfo, const SIMPLE_GM_PARAMS_WIN32 *pCmd)

Display info about the actual G-code part.

This function should not be blocking. Just display the information and return.

Parameters
dwUserDataUser data given by ToolChainCore_SetCallBack function
editorLineActual line number in the G-code
fileIdxActual file index. Filename can be obtained by ToolChainCore_IdxToFile
statusInfoText to be displayed in the status line
pCmdActual processed G-code function
Returns
Always 0, ignored by CNC module

Definition at line 2084 of file TGM_CNC.h.

◆ IsBreakpointFunc

typedef int32_t CALLBACK_CALLTYPE IsBreakpointFunc(intptr_t dwUserData, uint32_t editorLine, int32_t fileIdx)

Determines if there is a breakpoint on given G-code file line.

CNC system has built-in support for exactly one breakpoint. If there is a need for multiple breakpoints, this callback must be implemented.

Parameters
dwUserDataUser data given by ToolChainCore_SetCallBack function
editorLineLine to be checked
fileIdxFile index of the G-code. File name can be get by ToolChainCore_IdxToFile.
Returns
1 if there is a breakpoint on given line and file, otherwise 0

Definition at line 2099 of file TGM_CNC.h.

◆ DispAndLocateErrorFunc

typedef int32_t CALLBACK_CALLTYPE DispAndLocateErrorFunc(intptr_t dwUserData, uint32_t editorLine, int32_t fileIdx, TGM_LPCTSTR errString, CALLBACK_INFO *callBackInfo)

This function is called in case of an error.

Set this callback very early during application startup, preferably before ToolChainCore_LoadFromIni function.

Parameters
dwUserDataUser data given by ToolChainCore_SetCallBack function
editorLineLine of text with error. Could be 0 for some type of errors.
fileIdxIndex of the G-code file with the error. Could be negative for some type of errors.
errStringError text, always in English. Translations to other languages can be made with the help of information given in callBackInfo parameter
callBackInfoPointer to CALLBACK_INFO with additional error information (error number, error arguments, etc...)
Returns
Always 0, ignored

Definition at line 2116 of file TGM_CNC.h.

◆ DispLastInfoFunc

typedef int32_t CALLBACK_CALLTYPE DispLastInfoFunc(intptr_t dwUserData)

Called when G-code execution finished (OK and NOK)

Parameters
dwUserDataUser data given by ToolChainCore_SetCallBack function
Returns
Always 0, ignored
Note
It is not necessary to implement this callback.

Definition at line 2128 of file TGM_CNC.h.

◆ IsStepModeFunc

typedef int32_t CALLBACK_CALLTYPE IsStepModeFunc(intptr_t dwUserData)

Ask if execute G-code step by step (part by part). Not yet used.

Parameters
dwUserDataUser data given by ToolChainCore_SetCallBack function
Returns
1 for step mode, 0 for normal mode

Definition at line 2135 of file TGM_CNC.h.

◆ IsHandControlFunc

typedef int32_t CALLBACK_CALLTYPE IsHandControlFunc(intptr_t dwUserData)

Ask if application is in hand control (service mode). Not yet used.

Parameters
dwUserDataUser data given by ToolChainCore_SetCallBack function
Returns
1 for hand control mode, 0 for normal mode

Definition at line 2142 of file TGM_CNC.h.

◆ SetRegimeFromUserKeyFunc

typedef int32_t CALLBACK_CALLTYPE SetRegimeFromUserKeyFunc(intptr_t dwUserData, int32_t key)

Reserved.

Parameters
dwUserDataUser data given by ToolChainCore_SetCallBack function
keyuser keyboard key code
Returns
1 - regime set, 0 - no change

Definition at line 2150 of file TGM_CNC.h.

◆ ExecMenuCommandFromUserKeyFunc

typedef int32_t CALLBACK_CALLTYPE ExecMenuCommandFromUserKeyFunc(intptr_t dwUserData, int key)

Reserved.

Parameters
dwUserDataUser data given by ToolChainCore_SetCallBack function
keyuser keyboard key code
Returns
1 - command executed, 0 - otherwise

Definition at line 2158 of file TGM_CNC.h.

◆ DriverInitializeFunc

typedef int32_t CALLBACK_CALLTYPE DriverInitializeFunc(intptr_t dwUserData, double *params, uint32_t nParams, int32_t bTestMode)

Called always before G-code execution.

In simulation or test mode (regimes 10 or 20), the driver callbacks are called. With help of these callbacks, complete simulation of G-code can be created in the application. The drive callbacks can be set after the call of ToolChainCore_LoadFromIni function.

Parameters
dwUserDataUser data given by ToolChainCore_SetCallBack function
pointerto array of doubles to be filled with desired values
nParamsNumber of items in the array
bTestModeIf set, actual regime is 20 (statusTEST), otherwise it is 10 (statusSIMULATING)
Returns
Always 0, ignored

Definition at line 2176 of file TGM_CNC.h.

◆ DriverGFunc

typedef int32_t CALLBACK_CALLTYPE DriverGFunc(intptr_t dwUserData, const SIMPLE_GM_PARAMS_WIN32 *v)

Called to simulate G function.

Parameters
dwUserDataUser data given by ToolChainCore_SetCallBack function
v| Pointer to SIMPLE_GM_PARAMS_WIN32 with relevant actual G function information
Returns
Always 0, ignored

Definition at line 2187 of file TGM_CNC.h.

◆ DriverMFunc

typedef int32_t CALLBACK_CALLTYPE DriverMFunc(intptr_t dwUserData, const SIMPLE_GM_PARAMS_WIN32 *v)

Called to simulate M function.

Parameters
dwUserDataUser data given by ToolChainCore_SetCallBack function
v| Pointer to SIMPLE_GM_PARAMS_WIN32 with relevant actual M function information
Returns
Always 0, ignored

Definition at line 2195 of file TGM_CNC.h.

◆ ConnectPointCalcStartFunc

typedef int32_t CALLBACK_CALLTYPE ConnectPointCalcStartFunc(intptr_t dwUserData, const int32_t nType, const uint32_t nCoords, const double *coords, const uint32_t bitCodedAxesForCalc)

Initiate user connection calculation.

This function is called at the start of connection calculation. It transfers the parameters given in the ToolChainCore_ConnectCNCEx_Plane function to the user application space.

Parameters
nTypeConnection type (see also enum connect_type). Only connectBY_COORD (0), connectBY_COORD_GO (10), connectBY_COORD_GO_BUFFERED(40) are used.
nCoordsNumber of valid values in the coords parameter. Input only.
coordsCoordinates of the point from which is the connection function calculated. It is a copy of coords parameter of the ToolChainCore_ConnectCNCEx_Plane function. Input only.
bitCodedAxesForCalcCopy of bitCodedAxesForCalc parameter of the ToolChainCore_ConnectCNCEx_Plane function.
Returns
Always 0, ignored

Definition at line 2209 of file TGM_CNC.h.

◆ ConnectPointCalcFunc

typedef int32_t CALLBACK_CALLTYPE ConnectPointCalcFunc(intptr_t dwUserData, const SIMPLE_GM_PARAMS_WIN32 *part, double *calcSquareDistanceFromCoords, P10DOUBLE *calcConnectPoint)

Calculate distance from initial tool point to a give G-code part.

This callback is periodically called for all the move parts of the G-code (G0, G1, G2, G3). The user application can modify the values calculated by the system. This could be useful for machines with axes which form non-cartesian space (e.g. some axes are linear, some are rotational).

Parameters
dwUserDataUser data given by ToolChainCore_SetCallBack function
partActual part to be calculated. Input only.
calcSquareDistanceFromCoordsThe system calculates the squared distance from coords to part and gives it in the calcSquareDistanceFromCoords parameter. The callback function can modify this value and return it back. The value could be > 1e38, in that case the distance is larger than the threshold given in GCODE_PARAMETERS::maxConnectionDistance.
calcConnectPointThe system calculates the point on the part which would be the coordinates where the tool shall go to as a result of the connection (in the case the part is used as the connection part). The callback function can modify this parameter and return back different values. Only nCoords are valid.
Returns
Depending on the return value, the system uses or ignores returned params:
Value Description
0 Returned values are ignored
1 The calculatedDistanceFromCoords and calculatedCrossPoint contain valid values and will be used

Definition at line 2240 of file TGM_CNC.h.

◆ ConnectPointCalcEndFunc

typedef int32_t CALLBACK_CALLTYPE ConnectPointCalcEndFunc(intptr_t dwUserData, SIMPLE_GM_PARAMS_WIN32 *partToBeConnectedTo, P10DOUBLE *connectPosToBeMovedTo)

End of connection calculation.

The user application can e.g. store all the movement parts passed in the ConnectPointCalcFunc and calculate the final connection point and part during this callback.

Parameters
dwUserDataUser data given by ToolChainCore_SetCallBack function
partToBeConnectedToChoosen part of the G-code where the connection shall proceed. The user application can modify this parameter and set to it any other valid part of the G-code.
connectPosToBeMovedToPosition where the tool should go. The point must be on the partToBeConnectedTo.
Returns
Depending on the return value, the system uses or ignores returned params:
Value Description
0 Returned values are ignored
1 The partToBeConnectedTo and connectPosToBeMovedTo contain valid values and will be used

Definition at line 2259 of file TGM_CNC.h.

◆ MathWarningFunc

typedef int32_t CALLBACK_CALLTYPE MathWarningFunc(intptr_t dwUserData, CALLBACK_INFO *pCallbackInfo)

Called in case of warning issued during tool diameter compensation calculation.

Depending on G-code, there could be very large number of calls of this function.

Parameters
dwUserDataUser data given by ToolChainCore_SetCallBack function
callBackInfoPointer to CALLBACK_INFO with informations about the warning
Returns
Always 0, ignored

Definition at line 2273 of file TGM_CNC.h.