Parker Hannifin acr-motion max api User Manual

ACR-MotionMax
API
Users
Guide
API Users Guide Getting Started - 1
User Information

ACR series products and the information in this guide are the proprietary property of Parker Hannifin Corporation or its licensers, and may not be copied, disclosed, or used for any purpose not expressly authorized by the owner thereof.
Since Parker Hannifin constantly strives to improve all of its products, we reserve the right to change this guide, and software and hardware mentioned therein, at any time without notice.
In no event will the provider of the equipment be liable for any incidental, consequential, or special damages of any kind or nature whatsoever, including but not limited to lost profits arising from or in any way connected with the use of the equipment or this guide.
© 2004 Parker Hannifin Corporation All Rights Reserved
Technical Assistance
Contact your local automation technology center (ATC) or distributor.
North America and Asia
Parker Hannifin 5500 Business Park Drive Rohnert Park, CA 94928 Telephone: (800) 358-9070 or (707) 584-7558 Fax: (707) 584-3793 Email:
emn_support@parker.com
Internet: http://www.parkermotion.com
Europe (non-German speaking)
Parker Hannifin 21 Balena Close Poole, Dorset England BH17 7DX Telephone: +44 (0) 1202 69 9000 Fax: +44 (0) 1202 69 5750 Email: EMDTech.Help@parker.com
Germany, Austria, Switzerland
Parker Hannifin Postfach: 77607-1720 Robert-Bosch-Str. 22 D-77656 Offenburg Telephone: +49 (0) 781 509-0 Fax: +49 (0) 781 509-176
Email:
sales.hauser@parker.com
Italy
Parker Hannifin 20092 Cinisello Balsamo Milan, Italy via Gounod, 1 Telephone: +49 (0) 781 509-0 Fax: +49 (0) 781 509-176
Email: sales.sbc@parker.com
Technical Support E-mail
emn_support@parker.com
2 - Getting Started API Users Guide
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 Start DLL … this must be the first call to the DLL AX_IsCardPresent 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 Turns on any bit (Except Inputs) AX_BitOff Turns on any bit
Bit Group Functions
AX_GetInputs Extracts all 96 Inputs AX_GetOutputs Extracts all 96 Outputs AX_GetControlBits Extracts BITS [128-255] ACR-MOTIONMAX Control Signals AX_GetMasterFlags Extracts BITS [512-543] Master Flags AX_GetMcodeBits Extracts BITS [1920-2047] ACR-MOTIONMAX MCode Bits AX_GetAdcInputs Extracts ADC Channels (0-7) into Array
G-Code File Functions
AX_LoadGCodeFile Send DLL a G-Code Filename to load in the Motion List AX_GetGCodeLineNumber Extract Current Gcode Line Number being executed in cycle
6 - API Command Groups API Users Guide
Jogging & Homing
AX_JogMinus JOG SELECTED AXIS MINUS DIRECTION AX_JogPlus JOG SELECTED AXIS PLUS DIRECTION AX_JogMinusFast JOG SELECTED AXIS MINUS DIRECTION at Fast Rate AX_JogPlusFast JOG SELECTED AXIS PLUS DIRECTION at Fast Rate AX_JogStop STOP ALL JOGGING AX_HomeAxis HOME THE SELECTED AXIS
MDI Mode Commands
AX_StartMDI Start MDI Mode Signal to DLL AX_StopMDI Stop MDI Mode Signal to DLL AX_ExecuteMDI Execute MDI command String to DLL
Virtual Overrides
AX_SetFov Set Feedrate override manually with sliders AX_SetRov Set Rapid rate override manually with sliders AX_SetSov Set Spindle override manually with sliders
Graphics
AX_InitializeGPH Initialize Graphics Engine & pass handle of the control area AX_SetGphView Tell Graphics which ViewPort to plot AX_ZoomWindow Pass Zoom Coordinates (in Pixies) to the Graphics Engine AX_SetGraphics Turn Graphics Generator on/off
Error Message
AX_SystemErr Get the System errors from the DLL if any AX_ClearSystemErr Acknowledges & Clears the Error from the DLL
Cycle Functions
AX_CycleStart Starts Loaded G Code File Running Feedhold Stop the Program running until Cleared Reset Stop Current programs and effects a M30 Auto/Step Set this bit (133) to tell DLL to Cycle in Auto
Clear this bit to run in Step
API Users Guide API Command Groups - 7
Loading...
+ 15 hidden pages