www.advantech.com/products Online Download Common Motion API Introduction Architecture and Features of Common Motion API Advantech’s New Generation Motion Control Software System integrators often encounter difficulties when an engineer may not be familiar with the different syntaxes during the integration of various motion control cards. And what bother them the most is that when the system has to be upgraded, the problems often occur with rewriting the program as well as increasing the development time. To reduce these difficulties, Advantech has introduced a unified interface - Common Motion API- which provides a single syntax and interface, regardless of the types of motion control card the integrator chooses to use. The design can proceed under a single syntax interface to save development time and speed up the time to market. The ACM (Advantech Common Motion) architecture defines a single interface which consists of three types of operation objects, including Device, Axis and Group and each object has its own Property, Method and State. Features of Common Motion API ƒ ƒ Provides complete debugging tool utility - Hardware wiring testing - Software functional testing - Condition & status monitoring ƒ ƒ Provides the dedicated APIs for different applications ƒ ƒ Simplifies API calls process ƒ ƒ Improves the integration ƒ ƒ Supports scalable hardware - Supports the existing hardware and future hardware development Through the above advantages and the lower learning threshold, integrators can significantly reduce development time and follow-up maintenance work! 5 Compositions in Common Motion API 1. Easy-understanding Naming Rule Property ƒ ƒ FT_XXX: Feature Property ƒ ƒ CFG_XXX: Configuration Property ƒ ƒ PAR_XXX: Parameter Property 2. Object-oriented Interface 3 Categories of Property ƒ ƒ Feature Property ƒ ƒ Configuration Property ƒ ƒ Parameter Property 3. Clear Motion Control Unit ƒ ƒ Single-axis: Axis Object ƒ ƒ Multi-axis: Group Object ƒ ƒ DI/O, AI/O: Device Object Method ƒ ƒ Acm_DevXXX(): Use ‘Device’ as a control unit ƒ ƒ Acm_AxXXX(): Use ‘Axis’ as a control unit ƒ ƒ Acm_GpXXX(): Use ‘Group’ as a control unit 3 Categories of Method ƒ ƒ Use ‘Device’ as a control unit ƒ ƒ Use ‘Axis’ as a control unit ƒ ƒ Use ‘Group’ as a control unit 4. Simple Integer Type ƒ ƒ U/I/F stands for different types of integers and the following numbers stand for bits. New Type Windows Data Type Description U8 UCHAR 8-bit unsigned integer U16 USHORT 16-bit unsigned integer U32 ULONG 32-bit unsigned integer U64 ULONGLONG 64-bit unsigned integer I8 CHAR 8-bit signed integer I16 SHORT 16-bit signed integer I32 INT 32-bit signed integer I64 LONGLONG 64-bit signed integer F32 FLAOT 32-bit Floating point variable F64 DOUBLE 64-bit Floating point variable ƒ ƒ Example: U32 Acm_AxMoveRel (U32 AxisHandle, PF64 Distance) Event ƒ ƒ EVT_DevXXX ƒ ƒ EVT_AxXXX ƒ ƒ EVT_GpXXX 3 Categories of Event ƒ ƒ EVT_DevXXX ƒ ƒ EVT_AxXXX ƒ ƒ EVT_GpXXX 5. Detailed Error Classification No Error Code Classification Description 1 0 Success Set up successfully 2 0x01000001 ~0x01000fff Warning The parameter is incorrect but do not affect performance 3 0x80000xxx Function Error Cannot execute because the parameter is incorrect 4 0x80001xxx Communication Error Cannot execute because of communication errors 5 0x80002xxx Motion Error Cannot execute because of motion errors 6 0x80003xxx DAQ Error Cannot execute because of data acquisition errors Acm_DevOpen() Acm_AxOpen() Acm_GpAddAxis() Acm_DevClose() Acm_AxClose() Acm_GpRemAxis() Device Disable Device Object Axis Object Group Object Power & Energy Automation 8 5 4 4 10 Panel PCs 9 iDoor Technology Modules 8 Industrial monitors 7 Industrial IoT Gateways 6 Control Cabinet PCs High-Performance Control Panels Industrial Operator Panels 3 2 IntelligentMotionControl andMachineVision 1 WebAccess+ Solution 11 Control IPCs 12 Remote DA&C Systems 13 Wireless IoT Sensing Devices 14 15 RS-485 I/O Modules 16 Thin-Client Terminals Industrial Ethernet Solutions 17 IP Gateway and Serial Device Servers iNetworking 18 19 Ethernet I/O Modules Chapter 2 Table of Contents Table of Contents