Parker Hannifin Home Theater Server acr motion max api users Manual User Manual

ACR-MotionMax  
API  
Users  
Guide  
API Users Guide  
Getting Started - 1  
 
Contents  
Getting Started ..................................................................................................................................... 5  
Introduction....................................................................................................................................................5  
Operating System ...........................................................................................................................................5  
Installation ......................................................................................................................................................5  
Installation Folders and Files........................................................................................................................5  
API Command Groups ........................................................................................................................ 6  
Command Groups..........................................................................................................................................6  
DLL Initialization.........................................................................................................................................................6  
Parameters ....................................................................................................................................................................6  
Feedback & Status........................................................................................................................................................6  
Bit Functions.................................................................................................................................................................6  
Bit Group Functions .....................................................................................................................................................6  
G-Code File Functions..................................................................................................................................................6  
Jogging & Homing .......................................................................................................................................................7  
MDI Mode Commands.................................................................................................................................................7  
Virtual Overrides ..........................................................................................................................................................7  
Graphics........................................................................................................................................................................7  
Error Message...............................................................................................................................................................7  
Cycle Functions ............................................................................................................................................................7  
API Command Descriptions................................................................................................................ 8  
(DLL Initialization) ......................................................................................................................................................8  
AX_InitializeControl ................................................................................................................................................8  
AX_IsCardPresent....................................................................................................................................................8  
(Parameter Functions)...................................................................................................................................................9  
AX_UpdateParams ...................................................................................................................................................9  
AX_DownloadParameters2Card ..............................................................................................................................9  
(Feedback & Status Functions).....................................................................................................................................9  
AX_GetEncoderCounts ............................................................................................................................................9  
AX_GetDistanceToGoCoordinates ........................................................................................................................10  
AX_GetAxisVelocity..............................................................................................................................................10  
(Bit Functions)............................................................................................................................................................10  
AX_BitOn...............................................................................................................................................................10  
AX_BitOff..............................................................................................................................................................11  
(Bit Group Functions).................................................................................................................................................11  
AX_GetInputs.........................................................................................................................................................11  
AX_GetOutputs......................................................................................................................................................11  
AX_GetControlBits ................................................................................................................................................11  
AX_GetMasterFlags...............................................................................................................................................12  
AX_GetMcodeBits .................................................................................................................................................12  
AX_GetAdcInputs..................................................................................................................................................12  
(Jog and Homing Functions).......................................................................................................................................12  
AX_JogMinus.........................................................................................................................................................12  
AX_JogPlus............................................................................................................................................................12  
AX_JogMinusFast..................................................................................................................................................12  
AX_JogPlusFast .....................................................................................................................................................12  
API Users Guide  
Getting Started - 3  
 
AX_JogStop............................................................................................................................................................12  
AX_HomeAxis .......................................................................................................................................................13  
Place VB Code in a button......................................................................................................................................14  
(G Code Functions).....................................................................................................................................................14  
AX_LoadGCodeFile...............................................................................................................................................14  
AX_ GetGCodeLineNumber ..................................................................................................................................14  
(MDI Mode Functions)...............................................................................................................................................14  
AX_StartMDI .........................................................................................................................................................14  
AX_StopMDI .........................................................................................................................................................15  
AX_ExecuteMDI....................................................................................................................................................15  
(Virtual Overrides)......................................................................................................................................................15  
AX_SetFov .............................................................................................................................................................15  
AX_SetRov.............................................................................................................................................................15  
AX_SetSov .............................................................................................................................................................15  
(Graphics Functions)...................................................................................................................................................16  
AX_InitializeGPH ..................................................................................................................................................16  
AX_SetGphView....................................................................................................................................................16  
AX_ SetGraphics ....................................................................................................................................................17  
(Error Message System)..............................................................................................................................................17  
AX_SystemErr........................................................................................................................................................17  
AX_ClearSystemErr ...............................................................................................................................................17  
(Cycle Functions)........................................................................................................................................................18  
AX_CycleStart........................................................................................................................................................18  
FeedHold.................................................................................................................................................................18  
Reset .......................................................................................................................................................................19  
Auto/Step Mode......................................................................................................................................................19  
I/O Map .............................................................................................................................................. 20  
Acroloop I/O Layout....................................................................................................................................20  
Control Signals ...........................................................................................................................................................20  
Mcode Bits..................................................................................................................................................................22  
4 - Getting Started  
API Users Guide  
 
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.0 or above) , 2000 or XP Pro  
Installation  
Parker-Hannifin API Installation will prompt you to create a folder…C:\Program Files\Parker\ACR-  
MotionMax. All references in this document will assume the users accepted the default folder.  
When the Installation is complete, a prompt to reboot the computer will be displayed. In order for all of the  
drivers to be properly activated, the computer must be rebooted before any calls to the MotionCore.DLL can be  
placed.  
Installation Folders and Files  
The Installation will generate the Axium Folder and several sub-folders.  
Docs – this folder contains this document and others  
ParFiles – this folder cantains all of the storage files incuding the configuration files  
Samples – this folder contains a Visual C++ and a Visual Basic sample.  
The MotionCore.DLL file was installed in the Windows\System32 folder. This is done so it is accessible from  
anywhere on the computer. Since the System32 folder is found in the Windows path, you do need to reference  
any drive and folder information to locate it.  
The ACR-MOTIONMAX.INI files is alos located in the Windows folder. This file contains the location of any  
files you create as well as the file location of the configuration files. This file can be edited with any text editor  
and cahnged to accommodate you specific application. The files looks like the following…  
[PATHS]  
Root=C:\Program Files\Parker\ACR-MotionMax  
Config=C:\Program Files\ Parker\ACR-MotionMax\ParFiles  
API Users Guide  
Getting Started - 5  
 
API Command Groups  
Command Groups  
DLL Initialization  
AX_InitializeControl  
AX_IsCardPresent  
Start DLL … this must be the first call to the DLL  
Checks for Servo Controller Presence  
Parameters  
AX_UpdateParams  
Force DLL to Reload All Parameters from Parameters.Cfg File  
AX_DownloadParameters2Card Force DLL to Update Params from Parameters.Cfg file to ServoCard  
Feedback & Status  
AX_GetEncoderCounts  
Extract Encoder information from DLL in array  
AX_GetDistanceToGoCoordinates Extract DISTANCE TO GO information from DLL into array  
AX_GetAxisVelocity  
Extract Master velocity from DLL  
Bit Functions  
AX_BitOn  
AX_BitOff  
Turns on any bit (Except Inputs)  
Turns on any bit  
Bit Group Functions  
AX_GetInputs  
AX_GetOutputs  
Extracts all 96 Inputs  
Extracts all 96 Outputs  
AX_GetControlBits  
AX_GetMasterFlags  
AX_GetMcodeBits  
AX_GetAdcInputs  
Extracts BITS [128-255] ACR-MOTIONMAX Control Signals  
Extracts BITS [512-543] Master Flags  
Extracts BITS [1920-2047] ACR-MOTIONMAX MCode Bits  
Extracts ADC Channels (0-7) into Array  
G-Code File Functions  
AX_LoadGCodeFile  
AX_GetGCodeLineNumber  
Send DLL a G-Code Filename to load in the Motion List  
Extract Current Gcode Line Number being executed in cycle  
6 - API Command Groups  
API Users Guide  
 
Jogging & Homing  
AX_JogMinus  
AX_JogPlus  
AX_JogMinusFast  
AX_JogPlusFast  
AX_JogStop  
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  
AX_HomeAxis  
HOME THE SELECTED AXIS  
MDI Mode Commands  
AX_StartMDI  
AX_StopMDI  
AX_ExecuteMDI  
Start MDI Mode Signal to DLL  
Stop MDI Mode Signal to DLL  
Execute MDI command String to DLL  
Virtual Overrides  
AX_SetFov  
AX_SetRov  
Set Feedrate override manually with sliders  
Set Rapid rate override manually with sliders  
Set Spindle override manually with sliders  
AX_SetSov  
Graphics  
AX_InitializeGPH  
AX_SetGphView  
AX_ZoomWindow  
AX_SetGraphics  
Initialize Graphics Engine & pass handle of the control area  
Tell Graphics which ViewPort to plot  
Pass Zoom Coordinates (in Pixies) to the Graphics Engine  
Turn Graphics Generator on/off  
Error Message  
AX_SystemErr  
AX_ClearSystemErr  
Get the System errors from the DLL if any  
Acknowledges & Clears the Error from the DLL  
Cycle Functions  
AX_CycleStart  
Feedhold  
Starts Loaded G Code File Running  
Stop the Program running until Cleared  
Stop Current programs and effects a M30  
Set this bit (133) to tell DLL to Cycle in Auto  
Clear this bit to run in Step  
Reset  
Auto/Step  
API Users Guide  
API Command Groups - 7  
 
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.DLL" (ByVal ProcHwnd As Long) As  
Integer  
AX_IsCardPresent  
Description  
Returns  
Arguments  
Checks if Servo Controller Card is present  
1 if Motion card exists, 0 if not.  
None  
Declaration  
Public Declare Function AX_IsCardPresent Lib "MotionCore.DLL" () As Integer  
VB Example:  
Private Sub frmMain_Initialize ()  
RetVal = Call AX_IsCardPresent ()  
If RetVal = 0 then  
Offline = True ‘MotionCard not found  
Else  
Offline = False ‘ MotionCard Found  
End if  
End Sub  
8 - API Command Descriptions  
API Users Guide  
 
(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.DLL" () As Integer  
AX_DownloadParameters2Card  
Description  
Returns  
Arguments  
Force DLL to Update Params from Parameters.Cfg file to ServoCard  
(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:  
Declare Function AX_DownloadParameters2Card Lib _  
"MotionCore.DLL" () As Integer  
(Feedback & Status Functions)  
AX_GetEncoderCounts  
Description  
Returns  
Arguments  
Extract Encoder information from DLL in array  
(Integer) 1 on Success, 0 on Failure  
Global EncoderArray (0 To 8) As Long  
VB Example:  
Private Sub IOTIMER_Timer ()  
Ret = AX_GetEncoderCounts(EncoderArray(0))  
'Get ABS Encoder Pos array  
API Users Guide  
API Command Descriptions - 9  
 
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.DLL" _  
(ByRef EncoderArray as Long) As Integer  
AX_GetDistanceToGoCoordinates  
Description  
Returns  
Arguments  
Extract Distance to Go information from DLL in array  
(Integer) 1 on Success, 0 on Failure  
Global DTGArray (0 To 8) As Long  
VB Example: Ret = AX_GetDistanceToGoCoordinates (DTGArray(0))  
Declaration:  
Public Declare Function AX_GetDistanceToGoCoordinates Lib _  
"MotionCore.DLL" (ByRef lDTGArray As Long) As Integer  
AX_GetAxisVelocity  
Description  
Returns  
Arguments  
Extract Master velocity from DLL  
(Integer) 1 on Success, 0 on Failure  
Global MasterVel (0 To 8) As Double  
VB Example:  
Ret = AX_GetAxisVelocity(mastervel(0))  
‘ Display Current Profile Feedrate  
'Get Master velocity  
FeedsReadout (3). Caption = Format (mastervel (0), "0000.00")  
Declaration:  
Public Declare Function AX_GetAxisVelocity Lib _  
"MotionCore.DLL" (ByRef DMasterVel as Double) As Integer  
(Bit Functions)  
AX_BitOn  
Description  
Returns  
Arguments  
Turns on any bit except the Inputs  
(Integer) 1 on Success, 0 on Failure  
Global BitNum as Integer  
VB Example: Call Ax_BitOn (512) ‘set Kill Moves to Card  
Declaration:  
Public Declare Function AX_BitOn Lib _  
"MotionCore.DLL" (ByVal BitNum as Integer) As Integer  
10 - API Command Descriptions  
API Users Guide  
 
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.DLL" (ByVal BitNum as Integer) As Integer  
(Bit Group Functions)  
AX_GetInputs  
Description  
Returns  
Arguments  
Extract all 96 Inputs as 0’s or 1’s to a 1 based string (See Control signals Map)  
(Integer) 1 on Success, 0 on Failure  
Global Inputs As String: Inputs = Space (97)  
VB Example: Ret = AX_GetInputs (Inputs)  
If Mid (Inputs, 2, 1) = 1 Then Estop = True  
Declaration:  
Public Declare Function AX_GetInputs Lib _  
“MotionCore.DLL" (ByVal Inputs as String) As Integer  
AX_GetOutputs  
Description  
Returns  
Arguments  
Extract all 96 Outputs as 0’s or 1’s to a 1 based string (See Control signals Map)  
(Integer) 1 on Success, 0 on Failure  
Global Outputs As String: Outputs = Space (97)  
VB Example: Ret = AX_GetOutputs (Outputs)  
If Mid (Outputs, 2, 1) = 1 Then Output 2 is on  
Declaration:  
Public Declare Function AX_GetInputs Lib _  
“MotionCore.DLL" (ByVal Outputs as String) As Integer  
AX_GetControlBits  
Description  
Returns  
Arguments  
GET INTERNAL CONTROL BITS [128 - 255] extracts all 128 BITS from DLL  
(Integer) 1 on Success, 0 on Failure  
Global ControlSignals As String: ControlSignals = Space (129)  
VB Example: Ret = AX_GetControlBits (ControlSignals)  
Declaration:  
Public Declare Function AX_GetControlBits Lib _  
"MotionCore.DLL" (ByVal ControlSignals As String) As Integer  
API Users Guide  
API Command Descriptions - 11  
 
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.DLL" (ByVal MasterFlags As String) As Integer  
AX_GetMcodeBits  
Description  
Returns  
Arguments  
GET M CODE BITS [1920 TO 2047] Extracts all BITS from DLL  
(Integer) 1 on Success, 0 on Failure  
Global MCodes As String: MCodes = Space (129)  
VB Example: Ret = AX_GetMcodeBits (MCodes)  
Declaration:  
Public Declare Function AX_GetMcodeBits Lib _  
"MotionCore.DLL" (ByVal MCodeBits as String) As Integer  
AX_GetAdcInputs  
Description  
Returns  
Arguments  
Get All 8 Analog to Digital Channel Inputs in an Array  
(Integer) 1 on Success, 0 on Failure  
Global ADCs (0 To 8) As Single  
VB Example: Ret = AX_GetAdcInputs (ADCs (0))  
Declaration:  
Public Declare Function AX_GetAdcInputs Lib _  
"MotionCore.DLL" (ByRef ADCs as Single) As Integer  
(Jog and Homing Functions)  
AX_JogMinus  
AX_JogPlus  
AX_JogMinusFast  
AX_JogPlusFast  
AX_JogStop  
Description  
Jogs the Selected Axis @ JogSpeed Defined in the Parameters.Cfg file  
12 - API Command Descriptions  
API Users Guide  
 
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)  
End Sub  
‘ Jog Axis Minus @ Normal Speed  
‘ 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  
End Sub  
‘ Stops All Jogging/All Axis  
Ret = AX_JogMinus (CurrentAxis)  
‘ Jog Axis Minus @ Normal Speed  
‘ Jog Axis Minus @ Normal Speed  
‘ Jog Axis Minus @ Fast Speed  
‘ Jog Axis Minus @ Fast Speed  
‘ Stops All Jogging  
Ret = AX_JogPlus (CurrentAxis)  
Ret = AX_JogMinusFast (CurrentAxis)  
Ret = AX_JogPlusFast (CurrentAxis)  
Ret = AX_JogStop  
Declaration:  
Public Declare Function AX_JogMinus Lib _  
"MotionCore.DLL" (ByVal CurrentAxis as Integer) As Integer  
Public Declare Function AX_JogPlus Lib _  
"MotionCore.DLL" (ByVal CurrentAxis as Integer) As Integer  
Public Declare Function AX_JogMinusFast Lib _  
"MotionCore.DLL" (ByVal CurrentAxis as Integer) As Integer  
Public Declare Function AX_JogPlusFast Lib _  
"MotionCore.DLL" (ByVal CurrentAxis as Integer) As Integer  
AX_HomeAxis  
Description  
Calls the Homing Subroutines located in Prog0 of our AcroBasic Template  
Axis0 is at prog0 line 100  
Axis1 is at Prog0 line 200  
Axis2 is at Prog0 line 300  
(Integer) 1 on Success, 0 on Failure  
Global CurrentAxis as Integer  
Returns  
Arguments  
0 = Axis0  
1=Axis1  
2=Axis2  
Declaration  
Public Declare Function AX_HomeAxis Lib _  
"MotionCore.DLL" (ByVal CurrentAxis as Integer) As Integer"  
VB Example: ret = AX_HomeAxis (CurrentAxis)  
‘Home the Selected Axis  
API Users Guide  
API Command Descriptions - 13  
 
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  
Returns  
Arguments  
Send DLL a G-Code Filename to load in the Motion List  
(Integer) 1 on File Load Success, 0 on Failure  
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  
Returns  
Arguments  
Extract Current Gcode Line Number being executed in cycle  
(Integer) 1 on Success, 0 on Failure  
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  
Returns  
Start MDI Mode Signal to DLL  
(Integer) 1 on Success, 0 on Failure  
None  
Arguments  
VB Example: Call AX_StartMDI: Sleep (100)  
14 - API Command Descriptions  
API Users Guide  
 
Declaration:  
Public Declare Function AX_StartMDI Lib "MotionCore.DLL" _  
() As Integer  
AX_StopMDI  
Description  
Returns  
End MDI Mode Signal to DLL  
(Integer) 1 on Success, 0 on Failure  
None  
Arguments  
VB Example: Call AX_StopMDI: Sleep (100)  
Declaration:  
Public Declare Function AX_StopMDI Lib "MotionCore.DLL" _  
() As Integer  
AX_ExecuteMDI  
Description  
Returns  
Arguments  
Send MDI Command String to DLL to Execute  
(Integer) 1 on Success, 0 on Failure  
Global MDICmdStr as String  
VB Example: Call AX_ExecuteMDI (MDICmdStr): Sleep (100)  
Declaration  
Public Declare Function AX_ExecuteMDI Lib "MotionCore.DLL" _  
(ByVal MDICmdStr as String) As Integer  
(Virtual Overrides)  
AX_SetFov  
AX_SetRov  
AX_SetSov  
Description  
Sets the Feed/Rapid/Spindle Speed Overrides for machines not using External Override POTS or  
Switches  
Returns  
Arguments  
(Integer) 1 on Success, 0 on Failure  
Global OverrideVal as Double  
VB Example:  
Call AX_SetFov (OVRSlider (0). value * 0.01)  
Call AX_SetRov (OVRSlider (0). value * 0.01)  
Call AX_SetSov (OVRSlider (0). value * 0.01)  
‘Set Feedrate OVR  
‘Set Rapid OVR  
‘Set Spindle Speed OVR  
Declaration  
Public Declare Function AX_SetFov Lib "MotionCore.DLL" _  
(ByVal FovVal as Double) As Integer  
API Users Guide  
API Command Descriptions - 15  
 
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. It is important to not move the window once it has been initialized as incorrect display of  
graphics could occur.  
Returns  
Arguments  
(Integer) 1 on Success, 0 on Failure  
Long … Handle (. hwnd) of the Graphics control  
VB Example: Ret = AX_InitializeGPH  
Declaration: Declare Function AX_InitializeGPH Lib _  
"MotionCore.DLL" (ByVal ProcHwnd As Long) As Integer  
AX_SetGphView  
Description  
Informs the Graphics Engine which View Port to Use.  
ViewPort Layout:  
0=Top  
1=Front  
2=Side  
3=NW  
4=NE  
5=NW  
6=SE  
7=SW  
ZoomAll -> Tells Engine to refresh ViewPort to outer boundaries. Depending on if Parameter  
“UseMachWindow=1” if not it uses the Saved ViewPort coordinates.  
Returns  
Arguments  
(Integer) 1 on Success, 0 on Failure  
viewpoint as Integer, ZoomAll As integer  
VB Example: Ret = AX_ SetGphView (0)  
‘set to top view  
Declaration:  
Public Declare Function AX_SetGphView Lib _  
"MotionCore.DLL" (ByVal viewpoint As Integer, ByVal ZoomAll as Integer) As Integer  
16 - API Command Descriptions  
API Users Guide  
 
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.DLL" _  
(ByVal iGraphicsOn As Integer) As Integer  
(Error Message System)  
AX_SystemErr  
Description  
Returns  
Arguments:  
'Get the System errors from the DLL if any  
(Integer) 1 on Success, 0 on Failure  
ByVal ErrMsg as String, ByVal ErrSource as String, ByRef ErrLineNum As Long  
VB Example: ErrMsg = Space (255) : ErrSource = Space(128)  
Call AX_SystemErr (ErrMsg, ErrSource, ErrLineNum)  
ErrMsg = Mid (ErrMsg, 1, lstrlen (ErrMsg))  
ErrSource = Mid (ErrSource, 1, lstrlen (ErrSource))  
frmErrMsg.ErrMsgTxt.Text = Trim(ErrMsg) & vbCrLf & "Source = " & Trim(ErrSource) & vbCrLf  
& "Line = " & ErrLineNum  
ErrDisplayOn = True  
Declaration:  
Public Declare Function AX_SystemErr Lib _  
"MotionCore.DLL" (ByVal ErrMsg As String, ByVal ErrSource As String, ByRef ErrLineNum As  
Long) As Integer  
AX_ClearSystemErr  
Description  
Acknowledgement from Vb to DLL side from user that he got the error MSG.  
This function also Clear the Error in the DLL Handler.If more errors are in the message  
Handler the Above Call will be Valid again.  
(Integer) 1 on Success, 0 on Failure  
None  
Returns  
Arguments:  
VB Example: Call AX_ClearSystemErr  
Declaration:  
Public Declare Function AX_SystemErr Lib _  
"MotionCore.DLL" (ByVal ErrMsg as String, ByVal ErrSource As String, ByRef ErrLineNum As  
Long) As Integer  
API Users Guide  
API Command Descriptions - 17  
 
(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.  
The System can run in 2 modes Auto/Step  
To Set control System in Auto Mode  
Call AX_BitOn (133) 'Set Auto/Step Mode Bit=1  
Call AX_BitOn (134) ' RunMode bit on  
To Set control System in Step Mode  
Call AX_BitOff (133) 'Set Auto/Step Mode Bit=0  
Call AX_BitOn (134) ' RunMode bit on  
FeedHold  
Description  
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 Feed hold  
Nothing  
None  
Returns  
Arguments:  
VB Example: Private Sub FHoldBtn_Click ()  
If FHoldBtn.value = 1 Then  
Call AX_BitOn (520) 'set feed hold to card  
Call AX_BitOn (131) 'set feed hold Control Signal bit  
CmdStart.Enabled = False 'Cycle Start Button  
INCYCLE = False  
Else  
Call AX_BitOff (518) 'Clear Feed hold to card  
Call AX_BitOff (519) 'Clear Feed hold to card  
Call AX_BitOff (520) 'Clear Feed hold to card  
Call AX_BitOff (131) 'Clear Feed hold Control Signal bit  
' program running bit  
If Mid (ControlSignals, 75, 1) = 1 Then  
CmdStart.Enabled = True 'Cycle Start Button  
End If  
End If  
End Sub  
18 - API Command Descriptions  
API Users Guide  
 
Reset  
Description  
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  
Returns  
Arguments:  
VB Example: Private Sub ResetBtn_Click ()  
Call AX_BitOn (130) 'set reset bit …Stop Program and reset to line 0  
Auto/Step Mode  
Description  
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  
None  
Returns  
Arguments:  
VB Example: To Set control System in Auto Mode  
Call AX_BitOn (133) 'Set Auto/Step Mode Bit=1  
Call AX_BitOn (134) ' RunMode bit on  
To Set control System in Step Mode  
Call AX_BitOff (133) 'Set Auto/Step Mode Bit=0  
Call AX_BitOn (134) ' RunMode bit on  
API Users Guide  
API Command Descriptions - 19  
 
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.  
Bit  
Description  
128  
129  
130  
131  
132  
133  
134  
Cycle Start  
Estop  
Reset  
Feedhold  
Dry Run  
Auto/Step  
OK to Run  
Set by AcroBasic to Signal that Cycle Start has been pressed.  
Signals that Estop is On or Off.  
Signals ACR-MOTIONMAX System to Do a Reset.  
Signals ACR-MOTIONMAX that Feedhold is on.  
Signals ACR-MOTIONMAX to run in Dry Run Mode  
Signals control to Run in Auto or Step mode Auto=1 Step =0  
If Not in Feed Hold, Estop, MDI Mode or Jog Mode (This Signal Is Set by ACR-  
MOTIONMAX)  
135  
136  
137  
138  
139  
140  
141  
142  
143  
144  
145  
146  
147  
148  
149  
150  
Jog Mode  
MDI Mode  
Offsets Mode  
In Cycle  
Edit Mode  
Set by ACR-MOTIONMAX when In Jog Mode  
Set by ACR-MOTIONMAX when in MDI Mode  
Set By ACR-MOTIONMAX when Control is in Offsets Screen  
Set by ACR-MOTIONMAX when Control Goes in Cycle  
Set by ACR-MOTIONMAX when Control Goes in edit Mode  
Set by ACR-MOTIONMAX when the Control has jogged in cycle  
Used by Mill max after a InCycle jog  
When=1 Optional Stop will be acted on else they will be ignored  
Set In ACR-MOTIONMAX when Software Starts and cleared When Program End  
Set In AcroBasic to Signal that a Homing operation is in progress  
Signal set by AcroBasic that Initialization succeeded to ACR-MOTIONMAX  
JoggedInCycle  
ReturnToPreJogPos  
OptionalStopActive  
Control Ready  
Homing Active  
Control Initialized  
Spindle Encoder Installed Used by ACR-MOTIONMAX for Rigid Tapping  
M Done  
S Done  
Set by AcroBasic to Signal that a M code has finished successfully  
Set By AcroBasic to Signal that a S code has finished successfully  
Set By AcroBasic to Signal that a T code has finished successfully  
Set By ACR-MOTIONMAX when a M Code has been Sent to be serviced by  
T Done  
M Strobe  
AcroBasic  
151  
S Strobe  
Set By ACR-MOTIONMAX when a S Code has been Sent to be serviced by  
AcroBasic  
20 - I/O Map  
API Users Guide  
 
152  
T Strobe  
Set By ACR-MOTIONMAX when a T Code has been Sent to be serviced by  
AcroBasic  
153  
154  
155  
156  
157  
158  
159  
160  
161  
162  
163  
164  
165  
166  
Tool Change Active  
Set by ACR-MOTIONMAX DLL to Signal M6 Sub needs to do a change  
Set By AcroBasic in M6 Code to signal a tool change has finished ok  
Set By AcroBasic to Signal that Z is at the Tool change Position  
Set in AcroBasic T Strobe Code to Signal that Magazine is Moving  
Set by AcroBasic to Signal that the seek operation is complete  
Set By ACR-MOTIONMAX to Signal bi-directional Magazine direction to Move  
Set By AcroBasic for Magazines that have Slow Down Capabilities  
Set By AcroBasic to Signal ACR-MOTIONMAX that Pendant is Enabled  
Set by AcroBasic to Signal ACR-MOTIONMAX that Axis is under Pendant Control  
Set by AcroBasic to Signal ACR-MOTIONMAX that Axis is under Pendant Control  
Set by AcroBasic to Signal ACR-MOTIONMAX that Axis is under Pendant Control  
Set by AcroBasic to Signal ACR-MOTIONMAX that Axis is under Pendant Control  
Set by AcroBasic to Signal ACR-MOTIONMAX that Axis is under Pendant Control  
Set by AcroBasic to Signal ACR-MOTIONMAX that X.1 Mode is selected for  
Tool Change Done  
Z @ T change Position  
Tool Seek Active  
Tool Seek Done  
Tool Seek Direction  
Tool Seek Speed  
MPG Enabled  
MPG X Select  
MPG Y Select  
MPG Z Select  
MPG 4 Select  
MPG 5 Select  
X.1 Mode Select  
Set by AcroBasic to Signal ACR-MOTIONMAX that X1 Mode is selected for  
Set by AcroBasic to Signal ACR-MOTIONMAX that X10 Mode is selected for  
Set by AcroBasic to Signal ACR-MOTIONMAX that X100 Mode is selected for  
Pendant Moves  
170  
171  
172  
173  
174  
175  
X Home Done  
Y Home Done  
Z Home Done  
4 Axis Home Done  
5th Axis Home Done  
Magazine Ref Done  
Set by AcroBasic to Signal ACR-MOTIONMAX that Axis has been Referenced  
Set by AcroBasic to Signal ACR-MOTIONMAX that Axis has been Referenced  
Set by AcroBasic to Signal ACR-MOTIONMAX that Axis has been Referenced  
Set by AcroBasic to Signal ACR-MOTIONMAX that Axis has been Referenced  
Set by AcroBasic to Signal ACR-MOTIONMAX that Axis has been Referenced  
Set by AcroBasic M18 to Signal ACR-MOTIONMAX that Magazine has been  
Set by AcroBasic when effecting a Gear change  
Set by ACR-MOTIONMAX to signal which Gear has been Requested (is a binary  
Set by ACR-MOTIONMAX to signal which Gear has been Requested (is a binary  
Set by ACR-MOTIONMAX to signal which Gear has been Requested (is a binary  
Set by AcroBasic to signal Spindle direction is for M3/M4 outputs 1 fwd 0 rev  
Set by AcroBasic to Signal that Spindle is at rest  
Set by AcroBasic to signal that spindle is running at the commanded speed  
Set By AcroBasic to signal that Spindle is at the orient Position  
Set by ACR-MOTIONMAX to signal that the spindle is Enabled  
Signal will be 1 when the ACR-MOTIONMAX Control is Rigid Tapping  
Signal will be 1 when ACR-MOTIONMAX is running a Tapping cycle  
Set by AcroBasic to ACR-MOTIONMAX informing control of 4th axis presence  
Set by AcroBasic to ACR-MOTIONMAX signaling that 4th Axis is locked  
Set by ACR-MOTIONMAX to signal that a contouring mode is active  
Set in AcroBasic to form logic to turn Spindle back on if paused  
Set by AcroBasic to ACR-MOTIONMAX of an existing OverTravel  
Set to Allow Virtual Estop Button on GUI  
Status Signal used by ACR-MOTIONMAX of VEstop  
API Users Guide  
I/O Map - 21  
 
199  
200  
202  
203  
Reserved for future use  
Reserved for future use  
Program Running  
Set by ACR-MOTIONMAX signals that a G Code program is running InCycle  
Set by ACR-MOTIONMAX when the current program has been altered  
Reserved for future use (Don’t Use)  
Program Modified  
204 to 212  
213  
214  
215  
216  
217  
218  
219  
220  
221  
222  
223  
224  
Digital FOV Bit0  
4 bit Code for External Feedrate Override Switches to  
Create logic 0 – 100 %  
Digital FOV Bit1  
Digital FOV Bit2  
Digital FOV Bit3  
Digital ROV Bit0  
Digital ROV Bit1  
Digital ROV Bit2  
Digital ROV Bit3  
Digital SOV Bit0  
Digital SOV Bit1  
Digital ROV Bit2  
Digital ROV Bit3  
4 bit Code for External Rapid Override Switches  
4 bit Code for External Rapid Override Switches  
225 to 248  
Scratch Pad bits (Bits for the User to use as status bits)  
249  
250  
Reserved  
User Error bit 0  
Used by ACR-MOTIONMAX for internal Error Messages display  
Bits 250 to 255 form a binary code for Error Messages to send to ACR-  
MOTIONMAX  
251  
252  
253  
254  
255  
User Error bit 1  
User Error bit 2  
User Error bit 3  
User Error bit 4  
User Error Bit 5  
See: Setting Up User Defined Error Messages  
Mcode Bits  
These bits (1920-2047) these bits are reserved and should not be used other than to set an Mcode Function  
M0-M126 that the Mcode Processor will process.  
22 - I/O Map  
API Users Guide  
 

MTD Outdoor Cart 45 01763 User Manual
NCR Credit Card Machine NCR 5992 User Manual
NetComm Network Card IG1000 User Manual
NETGEAR Network Card WMCE2001 100NAS User Manual
NETGEAR Network Router XAVNB2001 User Manual
Olympus MP3 Player 4100 User Manual
Optimus Portable CD Player CD 3590 User Manual
Palm Personal Computer OS Devices User Manual
Panasonic CD Player CQ VX999EW User Manual
Panasonic Power Supply AM 4PI User Manual