Parker Hannifin acr-motion max api users guide Code Functions, MDI Mode Functions, AXStartMDI

Page 14

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 G-Code Filename to load in the Motion List

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

Image 14
Contents API Technical Assistance Parker Hannifin Corporation All Rights ReservedContents Acroloop I/O Layout Getting Started IntroductionAPI Command Groups Jogging & Homing MDI Mode CommandsError Message Virtual OverridesAXInitializeControl API Command DescriptionsDLL Initialization AXIsCardPresentFeedback & Status Functions AXUpdateParamsParameter Functions AXDownloadParameters2CardAXGetAxisVelocity Bit FunctionsAXGetDistanceToGoCoordinates AXBitOnAXGetInputs Bit Group FunctionsAXBitOff AXGetOutputsAXGetMcodeBits Jog and Homing FunctionsAXGetMasterFlags AXGetAdcInputsRet = AXJogPlusFast CurrentAxis AXHomeAxisRet = AXJogPlus CurrentAxis DescriptionAXLoadGCodeFile MDI Mode FunctionsCode Functions AX GetGCodeLineNumberAXExecuteMDI Virtual OverridesAXStopMDI AXSetFov AXSetRov AXSetSovAXSetGphView Graphics FunctionsAXInitializeGPH ViewPort LayoutAXSystemErr Error Message SystemAX SetGraphics AXClearSystemErrFeedHold Cycle FunctionsAXCycleStart This is not an API function but how we effect Feed holdThis is not an API function but how we effect a Reset ResetAuto/Step Mode Control Signals MapAPI Users Guide Map Mcode Bits