ACR-MotionMax API Users Guide API Users Guide Getting Started - 1
User Information ACR Series products are used to control electrical and mechanical components of motion control systems. You should test your motion system for safety under all potential conditions. Failure to do so can result in damage to equipment and/or serious injury to personnel.
Contents Getting Started ..................................................................................................................................... 5 Introduction ....................................................................................................................................................5 Operating System ...........................................................................................................................................5 Installation .................
AX_JogStop............................................................................................................................................................12 AX_HomeAxis .......................................................................................................................................................13 Place VB Code in a button......................................................................................................................................
Getting Started Introduction This Guide give basic instructions on the functionality and implementation of the MotionCore.DLL API. Only experience developers of motion control software should attempt to use this API. A working knowledge of the Parker/Acroloop AcroBasic language is also required to full implement a finished motion system. Operating System This 32 bit DLL is for use in MS Windows NT 4.0 (service pack 4.
API Command Groups Command Groups DLL Initialization AX_InitializeControl AX_IsCardPresent Parameters AX_UpdateParams AX_DownloadParameters2Card Start DLL … this must be the first call to the DLL Checks for Servo Controller Presence Force DLL to Reload All Parameters from Parameters.Cfg File Force DLL to Update Params from Parameters.
Jogging & Homing AX_JogMinus AX_JogPlus AX_JogMinusFast AX_JogPlusFast AX_JogStop AX_HomeAxis JOG SELECTED AXIS MINUS DIRECTION JOG SELECTED AXIS PLUS DIRECTION JOG SELECTED AXIS MINUS DIRECTION at Fast Rate JOG SELECTED AXIS PLUS DIRECTION at Fast Rate STOP ALL JOGGING HOME THE SELECTED AXIS MDI Mode Commands AX_StartMDI AX_StopMDI AX_ExecuteMDI Virtual Overrides AX_SetFov AX_SetRov AX_SetSov Graphics AX_InitializeGPH AX_SetGphView AX_ZoomWindow AX_SetGraphics Error Message AX_SystemErr AX_ClearSyste
API Command Descriptions (DLL Initialization) AX_InitializeControl Description Returns Arguments Sends Handle (. hwnd) of the Applications Main Form to the DLL to spawn its threads. (Integer) 1 on Success, 0 on Failure (Long) handle of the Applications Main Form VB Example: Private Sub frmForm_Initialize () Call AX_InitializeControl (frmMain.hwnd) End sub Declaration: Public Declare Function AX_InitializeControl Lib "MotionCore.
(Parameter Functions) AX_UpdateParams Description Returns Arguments Force DLL to Reload All Parameters from Parameters.Cfg File (Integer) 1 on Success, 0 on Failure None VB Example: Private Sub UpdateParamsBtn_Click () ‘ Force DLL to Reload All Parameters from Parameters.Cfg File Call AX_UpdateParams Sleep (10) ‘Force DLL to Update Params from Parameters.Cfg file to ServoCard Call AX_DownloadParameters2Card Sleep (10) Declaration: Public Declare Function AX_UpdateParams Lib _ "MotionCore.
AbsReadout (0).Caption = Format(((EncoderArray(0) * Val(Resolution0)) - WorkOffsetsArray(0)), "00.0000") AbsReadout(1).Caption = Format(((EncoderArray(1) * Val(Resolution1)) - WorkOffsetsArray(1)), "00.0000") AbsReadout(2).Caption = Format(((EncoderArray(2) * Val(Resolution2)) – WorkOffsetsArray(2) - CurLength), "00.0000") AbsReadout(3).Caption = Format(((EncoderArray(3) * Val(Resolution3)) - WorkOffsetsArray(3)), "000.000") End sub Declaration: Public Declare Function AX_GetEncoderCounts Lib "MotionCore.
AX_BitOff Description Returns Arguments Turns off any bit except the Inputs (Integer) 1 on Success, 0 on Failure Global BitNum as Integer VB Example: Call Ax_BitOff (512) ‘Clear Kill Moves to Card Declaration: Public Declare Function AX_BitOff Lib _ "MotionCore.
AX_GetMasterFlags Description Returns Arguments Get all 32 MASTERFLAGS bits from DLL (Integer) 1 on Success, 0 on Failure Global MasterFlags As String: MasterFlags = Space (33) VB Example: Ret = AX_GetMasterFlags (MasterFlags) Declaration: Public Declare Function AX_GetMasterFlags Lib _ "MotionCore.
Returns Arguments (Integer) 1 on Success, 0 on Failure Global CurrentAxis as Integer 0 = Axis0 1=Axis1 2=Axis2 VB Example: ‘ To Jog an Axis Place Code in “MouseDown” Event Private Sub JogPB_MouseDown (Button As Integer, Shift As Integer, X As Single, Y As Single) Ret = AX_JogMinus (CurrentAxis) ‘ Jog Axis Minus @ Normal Speed End Sub ‘ To Stop Jogging Place Code in “MouseUP” Event Private Sub JogPB_MouseUp (Button As Integer, Shift As Integer, X As Single, Y As Single) Ret = AX_JogStop ‘ Stops All Jogging
Place VB Code in a button 'Home X Axis Ret = AX_HomeAxis (0) HomingActiveLblTXT.Caption = " Homing ...
Declaration: AX_StopMDI Public Declare Function AX_StartMDI Lib "MotionCore.DLL" _ () As Integer Description Returns Arguments End MDI Mode Signal to DLL (Integer) 1 on Success, 0 on Failure None VB Example: Call AX_StopMDI: Sleep (100) Declaration: Public Declare Function AX_StopMDI Lib "MotionCore.
Public Declare Function AX_SetRov Lib "MotionCore.DLL" _ (ByVal RovVal as Double) As Integer Public Declare Function AX_SetSov Lib "MotionCore.DLL" _ (ByVal SovVal as Double) As Integer (Graphics Functions) AX_InitializeGPH Description Initialize Graphics Engine and give it the handle of the Control to plot to, this is typically a PictureBox control in VB. The DLL will extract the coordinates of the window in pixels, and use these coordinates form then on.
AX_ SetGraphics Description Returns Arguments: Pass Screen Coordinates (in Pixels) of the ZoomBox to the API for Zoom operations (Integer) 1 on Success, 0 on Failure ByVal iGraphicsOn As Integer VB Example: 'Turn Graphics On Call AX_SetGraphics (1) 'Turn Graphics Off Call AX_SetGraphics (0) Declaration: Public Declare Function AX_SetGraphics Lib "MotionCore.
(Cycle Functions) AX_CycleStart Description Cause DLL to Start running the current Loaded G code file from the Specified Line Returns Arguments: (Integer) 1 on Success, 0 on Failure Global Linenum as Long VB Example: Call AX_CycleStart (0) ‘ Start Program from first Line Declaration: Public Declare Function AX_CycleStart Lib _ "MotionCore.DLL" (ByVal Linenum as Long) As Integer Note: DLL Motion List is zero based.
Reset Description Returns Arguments: Setting these bits in an Option Button will effect a feed hold to the Card This is not an API function but how we effect a Reset Nothing None VB Example: Private Sub ResetBtn_Click () Call AX_BitOn (130) 'set reset bit …Stop Program and reset to line 0 Auto/Step Mode Description Returns Arguments: VB Example: API Users Guide Setting these bits in an Option Button will place control in Auto/Step mode This is not an API function but how we effect a Reset Nothing Non
I/O Map Acroloop I/O Layout Control Signals These bits [128-255] used by the DLL for communication with the VB and AcroBasic. The MotionCore.DLL depends on these bits so don’t use them in your Vb programs for any other purpose than as defined below. If you need to use some bits for your program logic, we have set aside some User Scratch Pad bits at bit locations (224-248) that you may use as desired.
152 T Strobe AcroBasic 153 Tool Change Active 154 Tool Change Done 155 Z @ T change Position 156 Tool Seek Active 157 Tool Seek Done 158 Tool Seek Direction 159 Tool Seek Speed 160 MPG Enabled 161 MPG X Select 162 MPG Y Select 163 MPG Z Select 164 MPG 4 Select 165 MPG 5 Select 166 X.
199 Reserved for future use 200 Reserved for future use 202 Program Running 203 Program Modified 204 to 212 213 Digital FOV Bit0 214 Digital FOV Bit1 215 Digital FOV Bit2 216 Digital FOV Bit3 217 Digital ROV Bit0 218 Digital ROV Bit1 219 Digital ROV Bit2 220 Digital ROV Bit3 221 Digital SOV Bit0 222 Digital SOV Bit1 223 Digital ROV Bit2 224 Digital ROV Bit3 225 to 248 249 Reserved 250 User Error bit 0 MOTIONMAX 251 User Error bit 1 252 User Error bit 2 253 User Error bit 3 254 User Error bit 4 255 User Erro