Adtech ADT-8940A1 User's Reference Manual

4-axis motion control card

Advertisement

Quick Links

ADT-8940A1
4-axis Motion Control Card
User's Reference Manual
28 August 2009
Rev 4.0
Adtech (Shenzhen) CNC Technology Co., Ltd
Add:Building 36 Majialong Industrial Area Nanshan District, Shenzhen
Post Code: 518052
Tel:
Fax: +
+86 755 2609 9116
86 755 2609 2719
E-mail:
export@adtechen.com
Technical support:
support@adtechen.com

Advertisement

Table of Contents
loading
Need help?

Need help?

Do you have a question about the ADT-8940A1 and is the answer not in the manual?

Questions and answers

Summary of Contents for Adtech ADT-8940A1

  • Page 1 ADT-8940A1 4-axis Motion Control Card User’s Reference Manual 28 August 2009 Rev 4.0 Adtech (Shenzhen) CNC Technology Co., Ltd Add:Building 36 Majialong Industrial Area Nanshan District, Shenzhen Post Code: 518052 Tel: Fax: + +86 755 2609 9116 86 755 2609 2719 E-mail: export@adtechen.com...
  • Page 2 Manual shall be disallowed unless otherwise approved by Adtech. Meanwhile, Adtech doesn’t provide any kind of warranty, expression on standing or implication. Adtech and its staffs are not liable for any direct/ indirect information disclosure, economic loss or progress termination caused by this User Manual and the product information inside.
  • Page 3 ADT8940A1 4-axis servo/ stepping motion control card Version Upgrading Record Version Revised in Descriptions V4.0 2009/08/28 The fourth version Remark: The three digits in the version number respectively mean: Hardware version number Major version number Minor version number - 2 - www.adtechcn.com...
  • Page 4: Table Of Contents

    ADT8940A1 4-axis servo/ stepping motion control card Contents CHAPTER 1 GENERAL INFORMATION...........- 6 -  INTRODUCTION................- 6 - MAIN FUNCTIONS................- 6 -  APPLICATION SCOPE..............- 7 - CHAPTER 2 HARDWARE INSTALLATION........- 8 -  PARTS..................... - 8 - ...
  • Page 5 ADT8940A1 4-axis servo/ stepping motion control card CHAPTER 6 LIST OF ADT8940A1 BASIC LIBRARY FUNCTIONS.- 33 - CHAPTER 7 DETAILS OF ADT8940A1 BASIC LIBRARY FUNCTIONS................... - 36 -  CATEGORY OF BASIC PARAMETER SETTING....... - 36 -  CATEGORY OF DRIVE STATUS CHECK........ - 39 - ...
  • Page 6 ADT8940A1 4-axis servo/ stepping motion control card  ABNORMAL SWITCH AMOUNT INPUT.........- 98 - APPENDIX A TYPICAL WIRING FOR MOTOR DRIVER... - 100 - APPENDIX B INTRODUCTION ON APPLICABLE LIBRARY.错误! 未定义书签。 - 5 - www.adtechcn.com...
  • Page 7: Chapter 1 General Information

    ADT8940A1 4-axis servo/ stepping motion control card Chapter 1 General information  INTRODUCTION ADT8940A1 Card is a kind of high-performance 4-axis servo/ stepping control card based on PCI bus and supporting Plug & Play, while one system can support up to 16 control cards and control up to 64 lines of servo/ stepping motors.
  • Page 8 ADT8940A1 4-axis servo/ stepping motion control card Frequency tolerance for pulse output is less than 0.1%.   The maximum pulse output frequency is 2MHz. Pulse output may be single (pulse+ direction) or double(pulse+ pulse)   All the 4 axes have position feedback input in 32-digit counting, giving the maximum counting range of -2,147,483,648~ +2,147,483,647.
  • Page 9: Chapter 2 Hardware Installation

    ADT8940A1 4-axis servo/ stepping motion control card Chapter 2 Hardware installation  PARTS ADT-8940A1 User Manual (this manual) ADT-8940A1 4-axis PCI bus high-performance motion control card ADT-8940A1 user CD ADT-DB37 1 pc ADT-D37GG 1 pc ADT-9137 37-pin signal connecting plate, 1 pcs...
  • Page 10: Chapter 3 Electrical Connection

    ADT8940A1 4-axis servo/ stepping motion control card Chapter 3 Electrical connection There are two input/ output interfaces inside an ADT8940A1 card, whereby J1 is for 62-pin socket and J2 is for 25-pin. J1 is the signal cable for pulse output of X, Y, Z and A axis, switch amount input and switch amount output (OUT0-OUT11);...
  • Page 11 ADT8940A1 4-axis servo/ stepping motion control card Line Signal Introduction number Used for single-port input, not available for external PCOM1 power supply XPU+/CW+ X pulse signal + XPU-/CW- X pulse signal - XDR+/CCW+ X direction signal + XDR-/CCW- X direction signal - YPU+/CW+ Y pulse signal + YPU-/CW-...
  • Page 12 ADT8940A1 4-axis servo/ stepping motion control card ZPU+/CW+ Z pulse signal + ZPU-/CW- Z pulse signal - ZDR+/CCW+ Z direction signal + ZDR-/CCW- Z direction signal - APU+/CW+ A pulse signal + APU-/CW- A pulse signal - ADR+/CCW+ A direction signal + ADR-/CCW- A direction signal - Common for pin20-27 pin (Input points...
  • Page 13 ADT8940A1 4-axis servo/ stepping motion control card STOP1- signal for Y, able to work as general input IN9 (YSTOP1) signal Positive direction of the Manually Signal for Y,able to IN10(YEXP+) work as general input signal negative direction of the Manually Signal for Y able to IN11(YEXP-) work as general input signal IN12(ZLMT-)
  • Page 14 ADT8940A1 4-axis servo/ stepping motion control card negative direction of the Manually Signal for A, able to IN23(AEXP-) work as general input signal OUT0 Output points for switch amount OUT1 Output points for switch amount OUT2 Output points for switch amount OUT3 Output points for switch amount General negative common for Output0-3 (Output...
  • Page 15: J2 Line

    ADT8940A1 4-axis servo/ stepping motion control card  J2 line Line Introduction Signal number XECA+ X-axis encoder A-phase input+ X-axis encoder A-phase input -, able to work as general input XECA- signal 32 XECB+ X-axis encoder B-phase input + X-axis encoder B-phase input -, able to work as general input XECB- signal 33 YECA+...
  • Page 16 ADT8940A1 4-axis servo/ stepping motion control card A-axis encoder A-phase input -, able to work as general input AECA- signal 38 AECB+ A-axis encoder B-phase input + A-axis encoder B-phase input -, able to work as general input AECB- signal 39 Common for pin18-25 (Input points for switch amount) INCOM4 X position lock signal;...
  • Page 17: Connection For Pulse/ Direction Input Signal

    ADT8940A1 4-axis servo/ stepping motion control card public ports of corresponding input signals. Voltage at the public ports can only be +5V . . . ; in case of using an external+12V power supply, users must serially connect a 1K resistance. Please refer to the following digital input connection part for wiring method.
  • Page 18: Connection For Encoder Input Signal

    ADT8940A1 4-axis servo/ stepping motion control card motor driver and terminal panel.  CONNECTION FOR ENCODER INPUT SIGNAL Encoder Wiring map for an open-collect output-type encoder. For +5V power supply, R is not required; for +12V power supply, R= 1KΩ; and for +24V power supply, R= 2KΩ Encoder Wiring map for a differential-driver output-type encoder ...
  • Page 19 ADT8940A1 4-axis servo/ stepping motion control card Public terminal for IN8-IN15: INCOM2 Public terminal for IN16-IN25: INCOM3 Public terminal for IN24-IN31: INCOM4 (2) To make input signals effective, users shall make sure: firstly, the photoelectric coupling public ports for corresponding input signals (INCOM1, INCOM2, INCOM3 or INCOM4) have been connected with anodes of 12V/ 24V power supply;...
  • Page 20 ADT8940A1 4-axis servo/ stepping motion control card  ADT-9112 terminal block wiring diagram: Remark: - 19 - www.adtechcn.com...
  • Page 21: Connection For Digitaloutput

    ADT8940A1 4-axis servo/ stepping motion control card When the jumper cap T1, T2 used in parallel, the four INCOM ports were unified Do not need to connected to the 24V power when the jumper cap connected. connecte the pin1、8、15、22 which are on P2 Wiring terminals to the +24 power. ...
  • Page 22 ADT8940A1 4-axis servo/ stepping motion control card 12-24V power supply For inductive loading such as relay, add continuous dioxide at the two ends of the loading, as shown in J4 Remark: (1) Public terminal for OUT0-OUT5: OUTCOM1 (2) To make output signals effective, users must make sure of connection between the output public port OUTCOM1 and cathode of external power supply (earthling cable) if using external power supply, or connection between internal power supply earthling (GND) and the ground if using internal power supply.
  • Page 23 ADT8940A1 4-axis servo/ stepping motion control card  ADT-9112 terminal block wiring diagram: Remark: General negative common for pin1, 5,9,13 on P4 has been grounded. Additionally, users can also connect them to ground. Please connect the load between the power supply and output contact.
  • Page 24: Chapter 4 Software Installation

    ADT8940A1 4-axis servo/ stepping motion control card output part of ADT-9112 terminal used power amplifier circuit design; output currents up do not to 500MA. can be direct-drive cylinders, solenoid valves and other devices, need to connecte it to the external +24 power. Chapter 4 Software installation ADT8940A1 card must be used with drive installed under Win95/ Win98/ NT/...
  • Page 25 ADT8940A1 4-axis servo/ stepping motion control card Just click “Next” to display the following picture: Click again “Next” to display the following picture: - 24 - www.adtechcn.com...
  • Page 26 ADT8940A1 4-axis servo/ stepping motion control card Then select “Specify a location” and Click again “Next” and Click “Browse” button to select DevelopmentPackage/ Drive/ CardDrive and find the ADT8940A1.INF file, then click “OK” to display the following interface: Click “Next” to display the following picture: - 25 - www.adtechcn.com...
  • Page 27: Drive Installation Under Winxp

    ADT8940A1 4-axis servo/ stepping motion control card Finally click “Finish” to complete installation.  DRIVE INSTALLATION UNDER WINXP Installation under is similar to that under Win2000, specifically: WinXP - 26 - www.adtechcn.com...
  • Page 28 ADT8940A1 4-axis servo/ stepping motion control card - 27 - www.adtechcn.com...
  • Page 29 ADT8940A1 4-axis servo/ stepping motion control card Click “Browse” button to select Drive/ CardDrive and find the ADT8940A1.INF file, then click “Next” to display the following interface: Then click “Finish” to complete installation. - 28 - www.adtechcn.com...
  • Page 30: Chapter 5 Functions

    ADT8940A1 4-axis servo/ stepping motion control card Chapter 5 Functions  Pulse output method Pulse output may be realized through either independent 2-pulse or 1-pulse. In case of independent 2-pulse, the positive direction drive has PU/CW outputting drive pulses, and the negative direction drive has DR/CCW outputting drive pulses. In case of 1-pulse, PU/CW outputs drive pulse and DR/CCW outputs direction signals.
  • Page 31: Quantitative Driving

    ADT8940A1 4-axis servo/ stepping motion control card only to speed of the long axis, for example: (1-X axis, 2-Y axis, 3-Z axis, and 4-W axis) Take four axes for linear interpolation, while Axis 1 outputs 1000 pulses, Axis 2 outputs 500, Axis 3 outputs 250 and Axis outputs 2000.
  • Page 32: Velocity Curve

    ADT8940A1 4-axis servo/ stepping motion control card pulses. Configure the following parameters to execute the quantitative driving of acceleration/deceleration: Acceleration/deceleration A/D Start velocity SV Driving velocity V Output pulse P Acceleration/deceleration quantitative driving automatically decelerates from the deceleration point as shown in the picture above. ...
  • Page 33 ADT8940A1 4-axis servo/ stepping motion control card Linear acceleration/deceleration driving Linear acceleration/deceleration driving is to accelerate from start velocity to specified driving velocity linearly. In quantitative driving, the acceleration counter records the accumulated pulses of acceleration. If left output pulses are less than acceleration pulses, it will decelerate (automatically).
  • Page 34: Position Lock

    ADT8940A1 4-axis servo/ stepping motion control card  Position lock Realize hardware position lock function with the IN signal on each axis. With one lock signal, the current position (either logical or actual) of all axes can be locked. The position lock is usefyl in mearsuring system. ...
  • Page 35 ADT8940A1 4-axis servo/ stepping motion control card drive status get_inp_status Get status of interpolation get_delay_status Delay status get_hardware_ver Hardware version set_acc Set acceleration set_startv Set starting speed Movement set_speed Set drive speed parameter set_command_pos Set logical position counter setting set_actual_pos Set real position counter set_symmetry_speed Set symmetry speed...
  • Page 36 ADT8940A1 4-axis servo/ stepping motion control card inp_move4 4-axis linear interpolation Switch read_bit Read single input point amount write_bit Output single output point category Symmetrical relative symmetry_relative_move movement of single-axis Symmetrical absolute symmetry_absolute_move movement of single-axis Relative movement of two-axis symmetry_relative_line2 symmetrical linear interpolation Two axes symmetric linear...
  • Page 37: Chapter 7 Details Of Adt8940A1 Basic Library Functions

    ADT8940A1 4-axis servo/ stepping motion control card get_lock_status get lock status get_lock_position get lock position clr_lock_status clean lock position fifo_inp_move1 single axis FIFO fifo_inp_move2 two axes FIFO fifo_inp_move3 three axes FIFO fifo_inp_move4 four axes FIFO hardware cache reset_fifo reset FIFO read_fifo_count read FIFO read_fifo_empty...
  • Page 38 ADT8940A1 4-axis servo/ stepping motion control card (2) Return =0 means no installation of ADT8940A1 card; (3) Return <0 means no installation of service if the value is -1 or PCI bus failure is the value is -2. Remark: Initialization functions are preliminary conditions to call other functions, thus must be called firstly so as to verify available cards and initialize some parameters.
  • Page 39 ADT8940A1 4-axis servo/ stepping motion control card Return 0: Correct 1: Wrong Default mode: Pulse + direction, with positive logic pulse and positive logic direction input signal Set mode of nLMT signal input along positive/ negative direction int set_limit_mode(int cardno, int axis, int v1,int v2,int logic); cardno Card number axis...
  • Page 40: Category Of Drive Status Check

    ADT8940A1 4-axis servo/ stepping motion control card Set mode of stop1 input signal int set_delay_time(int cardno, long time) cardno Card number time delay time (Uint:1/8us) Return 0: Correct 1: Wrong Remark: The time unit is 1/8us, with the maximum integer value as its maximum Set stop using the hardware int set_suddenstop_mode(int cardno, int v, int logical)
  • Page 41: Category Of Movement Parameter Setting

    ADT8940A1 4-axis servo/ stepping motion control card Return 0: Correct 1: Wrong Delay 2.3 Get status of int get_delay_status(int cardno) cardno Card number Return 0: delay completed 1: delay in process 2.4 Get hardware version int get_hardware_ver(int cardno) cardno Card number Return 256:...
  • Page 42 ADT8940A1 4-axis servo/ stepping motion control card Axis number axis value Speed(0-2M) Return 0: Correct 1: Wrong 3.4 Set logical position counter This is to set values for the logical position counter set_command_pos(int cardno,int axis,long value); Card number cardno axis Axis number value Range (-2147483648~+2147483647)
  • Page 43: Category Of Motion Parameter Check

    ADT8940A1 4-axis servo/ stepping motion control card such as set_acc,set_startv,set_speed etc.  CATEGORY OF MOTION PARAMETER CHECK The following functions can be called at any time 4.1 Get logic position of each axis get_command_pos(int cardno,int axis,long *pos) cardno Card number axis Axis number Indicator of logic position value...
  • Page 44: Category Of Drive

    ADT8940A1 4-axis servo/ stepping motion control card Its data unit is same as that for motion speed setting value V. This function can get the axis drive speed at any time. 4.4 Get status of output int get_out(int cardno, int number) cardno Card number axis...
  • Page 45 ADT8940A1 4-axis servo/ stepping motion control card stop, users shall make command only for the earliest interpolation axis, otherwise may fail to achieve expected results. 5.3 Sudden stop sudden_stop(int cardno,int axis) cardno Card number axis Axis number Return 0: Correct 1: Wrong This command will suddenly stop the pulse output in process, even though it is in acceleration/ deceleration drive.
  • Page 46: Category Of Switch Amount Input/ Output

    ADT8940A1 4-axis servo/ stepping motion control card nterpolation 5.6 4-axis i inp_move4(int cardno,long pulse1,long pulse2,long pulse3,long pulse4) cardno Card number pulse1,pulse2,pulse3,pulse4 Relative distance of movement along X-Y-Z-W axis Range (-8388608~+8388607) Return 0: Correct 1: Wrong  CATEGORY OF SWITCH AMOUNT INPUT/ OUTPUT 6.1 Read single input point read_bit(int cardno,int number) cardno...
  • Page 47 ADT8940A1 4-axis servo/ stepping motion control card 7.1 Single axis symmetric relative moving int symmetry_relative_move(int cardno, int axis1, long pulse1, long lspd ,long hspd, double tacc) cardno-card number axis1---axis number1 pulse1-- pulse of axis 1 lspd --- Low speed hspd --- High speed tacc--- Time of acceleration (Unit: sec) Return 0: Correct...
  • Page 48 ADT8940A1 4-axis servo/ stepping motion control card hspd --- High speed tacc--- Time of acceleration (Unit: sec) Return 0: Correct 1: Wrong 7.4 Two axes symmetric linear interpolation absolute moving int symmetry_absolute_line2(int cardno, int axis1, int axis2, long pulse1, long pulse2, long lspd ,long hspd, double tacc) cardno-card number axis1---axis number1...
  • Page 49 ADT8940A1 4-axis servo/ stepping motion control card 7.6 Three axes symmetric linear interpolation absolute moving int symmetry_absolute_line3(int cardno, int axis1, int axis2, int axis3, long pulse1, long pulse2, long pulse3, long lspd ,long hspd, double tacc) cardno-card number axis1---axis number1 axis2---axis number2 axis3---axis number3 pulse1-- pulse of axis 1...
  • Page 50: Category Of External Signal Driving

    ADT8940A1 4-axis servo/ stepping motion control card long pulse4,long lspd ,long hspd, double tacc); cardno-card number pulse1-- pulse of axis 1 pulse2-- pulse of axis 2 pulse3-- pulse of axis 3 pulse4-- pulse of axis 4 lspd --- Low speed hspd --- High speed tacc--- Time of acceleration (Unit: sec) Return...
  • Page 51: Category Of Lock Position

    ADT8940A1 4-axis servo/ stepping motion control card int manual_disable(int cardno, int axis) cardno-- card number axis --axis number Return 0:Correct 1:Wrong  CATEGORY OF LOCK POSITION 9.1 lock the logical position and real position for all axes int set_lock_position(int cardno, int axis,int mode,int regi,int logical) cardno —card number axis —reference axis...
  • Page 52: Category Of Hardware Cache

    ADT8940A1 4-axis servo/ stepping motion control card cardno card number axis axis number Return 0:Correct 1:Wrong  CATEGORY OF HARDWARE CACHE 10.1 Single axis FIFO Int fifo_inp_move1(int cardno,int axis1,long pulse1,long speed) cardno card number axis1 axis number(1-4) pulse1 pulses in FIFO cache speed FIFO speed Return...
  • Page 53 ADT8940A1 4-axis servo/ stepping motion control card pulse1 pulses in FIFO buffer pulse2 pulses in FIFO buffer pulse3 pulses in FIFO buffer speed FIFO speed Return 0:Correct 1:Wrong 10.4 Four axes FIFO int fifo_inp_move4(int cardno,long pulse1,long pulse2,long pulse3,long pulse4,long speed) cardno card number axis1...
  • Page 54: Chapter 8 Guide To Motion Control Function Library

    ADT8940A1 4-axis servo/ stepping motion control card 10.7 Read FIFO cache To determine whether it is empty int read_fifo_empty(int cardno) cardno card number Return 0:non -empty 1:empty 10.8 Read FIFO cache To determine whether it is full int read_fifo_full(int cardno) cardno card number Return...
  • Page 55 ADT8940A1 4-axis servo/ stepping motion control card click “OK” to finish loading of the static library; (4) Add #include “ADT8940A1.h“ in the declaim part of the source file, header or overall header “StdAfx.h”. After the above four steps, users can call functions in the dynamic link library. Remark: The calling method under VC.NET is similar.
  • Page 56 ADT8940A1 4-axis servo/ stepping motion control card After the above three steps, users can call functions in the dynamic link library. 3. Calling library functions under DOS Function libraries under DOS are edited in Borland C3.1 and saved in the DevelopmentPackage/C++ (or C) folder.
  • Page 57: Chapter 9 Briefing On Motion Control Development

    ADT8940A1 4-axis servo/ stepping motion control card High level Card number or input point out of limit Correct Other functions Wrong Remark: Return 1 means calling error, and the normal cause is wrong cardno (Card Number) or axis (Axis Number) passed during the process of calling library functions.
  • Page 58: Stop0, Stop1 Signal

    ADT8940A1 4-axis servo/ stepping motion control card set_speed  Remark: values used by functions will give the actual speed only after multiplying by the multiple rate. 2.2 Interpolation speed ADT8940A1 card can take any 2 axes, any 3 axes or all the 4 axes for linear interpolation.
  • Page 59: Chapter 10 Programming Samples In Motion Control Development

    ADT8940A1 4-axis servo/ stepping motion control card Chapter 10 Programming samples in motion control development All movement control functions return immedietly; once a drive command is made, the movement process will be controlled by the movement control card until completion; then the host computer software of users can real-time monitor the whole movement process or force to stop the process.
  • Page 60 ADT8940A1 4-axis servo/ stepping motion control card (1) Add a new module in the project and save as “ctrlcard.bas”; (2) At first, within the motion control module self-define initialization functions of the motion control card and initialize library functions to be sealed into initialization functions;...
  • Page 61 ADT8940A1 4-axis servo/ stepping motion control card End Function '/********************get version************************ get library version and hardware version para:libVer-library version,hardwareVer - hardware version '********************************************************* Public Function Get_Version(libver As Double, hardwarever As Double) As Integer Dim ver As Integer ver = get_lib_version(0) libver = (ver) hardwarever = get_hardware_ver(0) End Function...
  • Page 62 ADT8940A1 4-axis servo/ stepping motion control card End Function '/*********************single-axis motion********************** drive one axis motion para: axis-axis number,value-pulse of motion Return=0 correct,Return=1 wrong '*******************************************************/ Public Function Axis_Pmove(ByVal axis As Integer, ByVal pulse As Long) As Integer Result = pmove(0, axis, pulse) Axis_Pmove = Rresult End Function '/*******************2-axis interpolation********************...
  • Page 63 ADT8940A1 4-axis servo/ stepping motion control card End Function '/*******************4-axis interpolation**************************** 4-axis interpolation motion para:value1,value2,value3,value4-pulse of interpolation Return=0 correct,Return=1 wrong '***********************************************************/ Public Function Interp_Move4(ByVal pulse1 As Long, ByVal pulse2 As Long, ByVal pulse3 As Long, ByVal pulse4 As Long) As Integer Result = inp_move4(0, pulse1, pulse2, pulse3, pulse4) Interp_Move4 = Result End Function...
  • Page 64 ADT8940A1 4-axis servo/ stepping motion control card As Integer) As Integer If mode = 0 Then Result = set_command_pos(0, axis, pos) Else Result = set_actual_pos(0, axis, pos) End If End Function '/*****************get information of motion***************************** get logical-pos,actual-pos and motion-speed para : axis-axis number,LogPos-logic pos,ActPos-real pos,Speed-motion speed Return=0 correct,Return=1 wrong '************************************************************/...
  • Page 65 ADT8940A1 4-axis servo/ stepping motion control card GetMove_Status = get_inp_status(0, value) End If End Function '/***********************read input******************************* read status of input para:number-input port(0 ~ 39) Return:0 - low level,1 - high level,-1 - error '****************************************************************/ Public Function Read_Input(ByVal number As Integer) As Integer Read_Input = read_bit(0, number) End Function '/*********************output******************************...
  • Page 66 ADT8940A1 4-axis servo/ stepping motion control card Setup_PulseMode = set_pulse_mode(0, axis, value, 0, 0) End Function '/********************set nLMT mode********************** set the mode of nLMT signal input along positive/ negative direction para: axis-axis number value1 0 - positive limit effective 1: positive limit ineffective value2 0: negative limit effective 1: negative limit ineffective...
  • Page 67 ADT8940A1 4-axis servo/ stepping motion control card logic 0-low level effective 1-high level effective Defaule: ineffective Return 0:Correct 1: Wrong ' *********************************************************/ Public Function Setup_Stop1Mode(ByVal axis As Integer, ByVal value As Integer, ByVal logic As Integer) As Integer Setup_Stop1Mode = set_stop1_mode(0, axis, value, logic) End Function '/********************set hardware-stop mode ********************** set mode whether Hardware stop is effective,if hareware-version is 1 ,...
  • Page 68 ADT8940A1 4-axis servo/ stepping motion control card function Return 0: delay stop 1: delay in process ' *********************************************************/ Public Function Get_DelayStatus() As Integer Get_DelayStatus = get_delay_status(0) End Function '/************ Symmetrical relative movement of single-axis *************** 'function: Refer to the current position and perform quantitative movement in the symmetrical 'acceleration/deceleration 'para:...
  • Page 69 ADT8940A1 4-axis servo/ stepping motion control card 'return value 0: correct 1: wrong '*******************************************************************/ Public Function Sym_AbsoluteMove(ByVal axis As Integer, ByVal pulse As Long, ByVal lspd As Long, ByVal hspd As Long, ByVal tacc As Double) As Integer Result = symmetry_absolute_move(0, axis, pulse, lspd, hspd, tacc) Symmetry_AbsoluteMove = Result End Function '/***** Relative movement of two-axis symmetrical linear interpolation ********...
  • Page 70 ADT8940A1 4-axis servo/ stepping motion control card axis1---axis number1 axis2---axis number2 pulse1—pulse of axis 1 pulse2-- pulse of axis 2 lspd --- Low speed hspd --- High speed tacc--- Time of acceleration (Unit: sec) 'return value 0:correct 1:wrong '******************************************************************/ Public Function Sym_AbsoluteLine2(ByVal axis1 As Integer, ByVal axis2 As Integer, ByVal pulse1 As Long, ByVal pulse2 As Long, ByVal lspd As Long, ByVal hspd As Long, ByVal tacc As Double) As Integer Result = symmetry_absolute_line2(0, axis1, axis2, pulse1, pulse2, lspd, hspd,...
  • Page 71 ADT8940A1 4-axis servo/ stepping motion control card pulse3 As Long, ByVal lspd As Long, ByVal hspd As Long, ByVal tacc As Double) As Integer Result = symmetry_relative_line3(0, axis1, axis2, axis3, pulse1, pulse2, pulse3, lspd, hspd, tacc) Symmetry_RelativeLine3 = Result End Function '/******Three axes symmetric linear interpolation absolute moving ********** 'function: Refer to the position of zero point and perform linear interpolation in symmetric...
  • Page 72 ADT8940A1 4-axis servo/ stepping motion control card '/***** Four axes symmetric linear interpolation relative moving ****** 'function: Refer to current position and perform linear interpolation in symmetric 'acceleration/deceleration 'para: pulse1-- pulse of axis 1 pulse2-- pulse of axis 2 pulse3-- pulse of axis 3 pulse4-- pulse of axis 4 lspd --- Low speed hspd --- High speed...
  • Page 73 ADT8940A1 4-axis servo/ stepping motion control card 'return value 0:correct 1:wrong '******************************************************************/ Public Function Sym_AbsoluteLine4(ByVal pulse1 As Long, ByVal pulse2 As Long, ByVal pulse3 As Long, ByVal pulse4 As Long, ByVal lspd As Long, ByVal hspd As Long, ByVal tacc As Double) As Integer Result = symmetry_absolute_line4(0, pulse1, pulse2, pulse3, pulse4, lspd, hspd, tacc) Symmetry_AbsoluteLine4 = Result...
  • Page 74 ADT8940A1 4-axis servo/ stepping motion control card End Function '/*********** Shut down the enabling of external signal drive ******** 'function: Shut down the enabling of external signal drive 'para: cardno card number axis axis number 'Return 0:Correct 1:Wrong '******************************************************************/ Public Function Disable_Manu(ByVal axis As Integer) As Integer Result = manual_disable(0, axis) Disable_Manu = Result End Function...
  • Page 75 ADT8940A1 4-axis servo/ stepping motion control card 'function:get synchronous action state 'para: axis axis number status— 0|haven't run synchronous 1|run synchronous 'retutrn 0: correct 1: wrong 'Note: This function could tell whether the position lock has been executed '****************************************************************************/ Public Function Setup_LockPosition(ByVal axis As Integer, ByVal mode As Integer, ByVal regi As Integer, ByVal logical As Integer) As Integer Result = set_lock_position(0, axis, mode, regi, logical) Setup_LockPosition = Result...
  • Page 76 ADT8940A1 4-axis servo/ stepping motion control card Clr_LockStatus = Result End Function 1.3 Function realization module 1.31 Interface design Introduction: Speed setting part—used to set starting speed, motion speed and acceleration of every axis; position setting—used to set drive pulse for every axis; drive information—used to real-time display logical position, real position and operation speed of every axis;...
  • Page 77 ADT8940A1 4-axis servo/ stepping motion control card contents: Private Sub Init_Board() Dim count As Integer count = Init_Card If count < 1 Then MsgBox "Fail to initial ADT-8940A1 motion-card" Get_Version g_nLibVer, g_nHardwareVer CardVer.Caption = "Library Ver:" + CStr(g_nLibVer) + Chr(10) + "Hardware Ver:" + CStr(g_nHardwareVer) End Sub 1.3.3 Simultaneous movement codes are inside the click event of axisPmove button,...
  • Page 78 ADT8940A1 4-axis servo/ stepping motion control card m_dTacc(2).Text Axis_Pmove 3, m_nPulse(2).Text End If If m_bA.value = vbChecked Then Setup_Speed m_nStartV(3).Text, m_nSpeed(3).Text, m_nAdd(3).Text, m_dTacc(3).Text Axis_Pmove 4, m_nPulse(3).Text End If End Sub 1.3.4 Interpolation codes are inside the click event of InterpMove button, whereby various selected objects send corresponding drive commands.
  • Page 79 ADT8940A1 4-axis servo/ stepping motion control card '********************************XYW******************************** ElseIf m_bX.value = vbChecked And m_bY.value = vbChecked And m_bA.value = vbChecked Then Setup_Speed m_nStartV(0).Text, m_nSpeed(0).Text, m_nAdd(0).Text, m_dTacc(0).Text Interp_Move3 1, 2, 4, m_nPulse(0).Text, m_nPulse(1).Text, m_nPulse(3).Text '********************************XZW******************************** ElseIf m_bX.value = vbChecked And m_bZ.value = vbChecked And m_bA.value = vbChecked Then Setup_Speed m_nStartV(0).Text,...
  • Page 80: Monitoring Module

    ADT8940A1 4-axis servo/ stepping motion control card '********************************YW******************************** ElseIf m_bY.value = vbChecked And m_bA.value = vbChecked Then Setup_Speed m_nStartV(1).Text, m_nSpeed(1).Text, m_nAdd(1).Text, m_dTacc(1).Text Interp_Move2 2, 4, m_nPulse(1).Text, m_nPulse(3).Text '********************************ZW******************************** ElseIf m_bZ.value = vbChecked And m_bA.value = vbChecked Then Setup_Speed m_nStartV(2).Text, m_nSpeed(2).Text, m_nAdd(2).Text, m_dTacc(2).Text Interp_Move2 3, 4, m_nPulse(2).Text, m_nPulse(3).Text...
  • Page 81 ADT8940A1 4-axis servo/ stepping motion control card 'LMT-(XLMT+ : 1,YLMT+ :7,ZLMT+ :13,WLMT+ :19) If Read_Input((i - 1) * 6 + 1) = 0 Then m_bNLimit(i - 1).value = 1 Else m_bNLimit(i - 1).value = 0 End If 'stop0(XSTOP0 : 2,YSTOP0 :8,ZSTOP0 :14,WSTOP0 :20) If Read_Input((i - 1) * 6 + 2) = 0 Then m_bStop0(i - 1).value = 1 Else...
  • Page 82: Vc Programming Samples

    ADT8940A1 4-axis servo/ stepping motion control card This module is mainly used to control unexpected events during drive process and will immediately stop drive of all the axes. Codes of this stop module are within the click event of CmdStop button, with the following codes: Private Sub CmdStop_Click() For i = 1 To 4 StopRun i, 0...
  • Page 83 ADT8940A1 4-axis servo/ stepping motion control card class CCtrlCard public: int Get_DelayStatus(); int Setup_Delay(long time); int Setup_HardStop(int value, int logic); int Setup_Stop1Mode(int axis, int value, int logic); int Setup_Stop0Mode(int axis, int value, int logic); int Setup_LimitMode(int axis, int value1, int value2, int logic); int Setup_PulseMode(int axis, int value);...
  • Page 84 ADT8940A1 4-axis servo/ stepping motion control card int Manu_Pmove(int axis, long pulse); int Manu_Continue(int axis); int Manu_Disable(int axis); int Setup_LockPosition(int axis,int mode,int regi,int logical); int Get_LockStatus(int axis,int &v); int Get_LockPosition(int axis,long &pos); int Clr_LockPosition(int axis); CCtrlCard(); int Result; //return value # endif (5) Source codes of the source file CtrlCard.cpp are as follows: # include "stdafx.h"...
  • Page 85 ADT8940A1 4-axis servo/ stepping motion control card set_actual_pos (0, i, 0); //set real pos as 0 set_startv (0, i, 1000); //set start-speed set_speed (0, i, 1000); //set motion-speed set_acc(0, i, 625); //set acceleration return 1; /**********************set speed*********************** according as para,judge whether is constant-speed set start-speed ,motion-speed and acceleration para:axis -axis number...
  • Page 86 ADT8940A1 4-axis servo/ stepping motion control card int CCtrlCard::Axis_Pmove(int axis, long value) Result = pmove(0, axis, value); return Result; /******************* Any 2-axis interpolation function********************** This function is used to drive any 2 axis to carry on linear interpolation Return =0 means success, and Return =1 means error *********************************************************************************************/ int CCtrlCard::Interp_Move2(int axis1, int axis2, long value1, long value2) Result = inp_move2(0, axis1, axis2, value1, value2);...
  • Page 87 ADT8940A1 4-axis servo/ stepping motion control card int CCtrlCard::Interp_Move4(long value1, long value2, long value3, long value4) Result = inp_move4(0, value1, value2, value3, value4); return Result; /***************** Get information of movement********************************* This function is used to feedback the current logic position, real position and motion speed of the selected axis Return =0 means success, and Return =1 means error *********************************************************************************************/...
  • Page 88 ADT8940A1 4-axis servo/ stepping motion control card status***************************************************** This function is used to get single-axis drive status or interpolation drive status Return =0 means success, and Return =1 means error *********************************************************************************************/ int CCtrlCard::Get_Status(int axis, int &value, int mode) if (mode==0) //Get single-axis motion status Result=get_status(0,axis,&value);...
  • Page 89 ADT8940A1 4-axis servo/ stepping motion control card Remark: (1) Speed setting part—used to set starting speed, drive speed and acceleration of every axis; position setting—used to set drive pulse for every axis; motion information—used to real-time display logical position, real position and motion speed of every axis;...
  • Page 90 ADT8940A1 4-axis servo/ stepping motion control card CStatic *lbl; CString str; lbl=(CStatic*)GetDlgItem(IDC_INFO_VER); str.Format("Library Ver:%1.1f\nHardware Ver: %1.1f",LibVer,HardwareVer); lbl->SetWindowText(str); //******* set start-speed 1000 ********* m_nStartvX = 1000; m_nStartvY = 1000; m_nStartvZ = 1000; m_nStartvA = 1000; //*********set run-speed 2000******** m_nSpeedX = 2000; m_nSpeedY = 2000;...
  • Page 91 ADT8940A1 4-axis servo/ stepping motion control card selected targets; the codes are as follows: void CDEMODlg::OnButtonPmove() UpdateData(TRUE); Long Startv[]={m_nStartvX,m_nStartvY,m_nStartvZ,m_nStartvA}; //start-speed long Speed[]={m_nSpeedX,m_nSpeedY,m_nSpeedZ,m_nSpeedA}; //run-speed long Add[] ={m_nAddX,m_nAddY,m_nAddZ,m_nAddA}; //add if(m_bX) //*************set speed***************// g_CtrlCard.Setup_Speed(1, m_nStartvX, m_nSpeedX, m_nAddX); //*************X axis move***************// g_CtrlCard.Axis_Pmove(1, m_nPulseX); if(m_bY ) //*************set speed**************// g_CtrlCard.Setup_Speed(2, m_nStartvY, m_nSpeedY, m_nAddY);...
  • Page 92 ADT8940A1 4-axis servo/ stepping motion control card g_CtrlCard.Setup_Speed(4, m_nStartvA, m_nSpeedA, m_nAddA); //*************A axis move***************// g_CtrlCard.Axis_Pmove(4, m_nPulseA); 2.3.4 Interpolation codes are inside the click message of the inp_move button and will send various drive commands for various selected targets; the codes are as follows: void CDEMODlg::OnButton Inpmove...
  • Page 93 ADT8940A1 4-axis servo/ stepping motion control card else if(m_bY && m_bZ && m_bW){ //YZW Interpolation of 3 axis g_CtrlCard.Setup_Speed(2,startv[1],Speed[1],Add[1]); g_CtrlCard.Interp_Move3(2,3,4,Pos[1],Pos[2],Pos[3]); else if(m_bX && m_bY){ //XY Interpolation of 2 axis g_CtrlCard.Setup_Speed(1,startv[0],Speed[0],Add[0]); g_CtrlCard.Interp_Move2(1,2,Pos[0],Pos[1]); else if(m_bX && m_bZ){ //XZ Interpolation of the 2 axis g_CtrlCard.Setup_Speed(1,startv[0],Speed[0],Add[0]);...
  • Page 94 ADT8940A1 4-axis servo/ stepping motion control card The monitoring module is used to real-time get drive information of all the axes and display movement information, at the same time of controlling them in drive process without any new drive commands. This module is completed through timer messages, with the following codes: CDEMODlg void...
  • Page 95 ADT8940A1 4-axis servo/ stepping motion control card XSTOP0 -2 XSTOP1 -3 YLMT YLMT+ -7 -6 YSTOP0 -8 YSTOP1 -9 ZLMT ZLMT+ -13 -12 ZSTOP0 -14 ZLMT+ -15 ALMT -18 ALMT+ -19 ASTOP0 -20 ASTOP1 -21 //******************************************* UINT nIDIN[]={ IDC_LIMIT_X,IDC_LIMIT_X2, //XLMT+/XLMT- IDC_STOP0_X, IDC_STOP1_X , IDC_LIMIT_Y, IDC_LIMIT_Y2, //YLMT+/YLMT-...
  • Page 96 ADT8940A1 4-axis servo/ stepping motion control card btn=(CButton*)GetDlgItem(IDC_BUTTON_IOTEST); btn->EnableWindow(TRUE); btn=(CButton*)GetDlgItem(IDC_LINEINP_MOVE); btn->EnableWindow(TRUE); btn=(CButton*)GetDlgItem(IDC_COMP_MOVE); btn->EnableWindow(TRUE); else //**********running********** btn=(CButton*)GetDlgItem(IDC_BUTTON_PMOVE); btn->EnableWindow(FALSE); btn=(CButton*)GetDlgItem(IDC_BUTTON_INPMOVE); btn->EnableWindow(FALSE); btn=(CButton*)GetDlgItem(IDC_BUTTON_CLEARPOS); btn->EnableWindow(FALSE); btn=(CButton*)GetDlgItem(IDC_BUTTON_BASEPARA); btn->EnableWindow(FALSE); btn=(CButton*)GetDlgItem(IDC_BUTTON_IOTEST); btn->EnableWindow(FALSE); btn=(CButton*)GetDlgItem(IDC_LINEINP_MOVE); btn->EnableWindow(FALSE); btn=(CButton*)GetDlgItem(IDC_COMP_MOVE); btn->EnableWindow(FALSE); CDialog::OnTimer(nIDEvent); 2.5 Stop module This module is mainly used to control unexpected events during drive process and will immediately stop drive of all the axes.
  • Page 97: Chapter 11 Normal Failures And Solutions

    ADT8940A1 4-axis servo/ stepping motion control card Chapter 11 Normal failures and solutions  Movement control card detection failure During use of control card, if encountering failure to detect the control card, users may follow the following items to check: Check whether drive program for the control card has been installed step by step following installation guide and whether there is the dynamic library file for the control card under the system menu (System32 or System);...
  • Page 98 ADT8940A1 4-axis servo/ stepping motion control card servo driver; Check whether there is alarming status in the servo/ stepping motor driver;  in case of any alarm there, follow codes corresponding to alarms to check the reason. Check connection to the servo SON and whether there is excitation status ...
  • Page 99 ADT8940A1 4-axis servo/ stepping motion control card Enlarge position ring gain and speed ring gain in case of servo motor;  Check screw gap of the machine in the way of measuring the backward  gap of a screw through a micrometer and adjust the screw if there is any gap;...
  • Page 100 ADT8940A1 4-axis servo/ stepping motion control card Non-continuous signals Check whether there is disturbance by detecting signal status in the I/O  test interface; in case of disturbance, increase with Model 104 multiple layer capacitor or apply blocking cables; If the machine makes obvious shaking or unusual work stop during normal ...
  • Page 101: Appendix A Typical Wiring For Motor Driver

    ADT8940A1 4-axis servo/ stepping motion control card Check whether there is any damage to the output components;  Check whether there is damage with the photoelectric coupler. Users may  use multi-use meter to check whether the photoelectric coupler has been broken, and if yes, replace with a new one;...
  • Page 102 ADT8940A1 4-axis servo/ stepping motion control card All the following wiring takes X axis as example.  Stepping motor driver common anode wiring Movement control card  Stepping motor driver differential wiring Movement control card  Yaskawa servo driver wiring - 101 - www.adtechcn.com...
  • Page 103 ADT8940A1 4-axis servo/ stepping motion control card Movement control card C phase  Panasonic A4 servo driver wiring Movement control card C phase - 102 - www.adtechcn.com...

Table of Contents