Place VB Code in a button
'Home X Axis
Ret = AX_HomeAxis (0)
HomingActiveLblTXT.Caption = " Homing ... " & Axis0Letter Sleep (500)
WaitForX: DoEvents
If Mid (ControlSignals, 2, 1) = 1 Or Mid (ControlSignals, 3, 1) = 1 Then Goto HomeErr 'if Estop exit 'If X not home yet done yet loop
If Mid (ControlSignals, 43, 1) = 0 Then Goto WaitForX
(G Code Functions)
AX_LoadGCodeFile
Description Send DLL a
Returns (Integer) 1 on File Load Success, 0 on Failure
Arguments Global GCodeFilename as String
VB Example: Ret = AX_LoadGCodeFile (GCodeFilename) 'send file to DLL
Declaration Public Declare Function AX_LoadGCodeFile Lib _ "MotionCore.DLL" (ByVal filename As String) As Integer
Note: If File has Error the Error message System will pick it up to allow you to see what line caused the Error
AX_ GetGCodeLineNumber
Description Extract Current Gcode Line Number being executed in cycle
Returns (Integer) 1 on Success, 0 on Failure
Arguments Global gCodeLineNumber As Long
VB Example: Ret = AX_GetGCodeLineNumber (gCodeLineNumber) 'Get cur Line from DLL
Declaration Public Declare Function AX_GetGCodeLineNumber Lib _ "MotionCore.DLL" (ByRef gCodeLineNumber As Long) As Integer
(MDI Mode Functions)
AX_StartMDI
Description Start MDI Mode Signal to DLL
Returns (Integer) 1 on Success, 0 on Failure
Arguments None
VB Example: Call AX_StartMDI: Sleep (100)
14 - API Command Descriptions | API Users Guide |