Home
ADT-8840 User`s Manual
Contents
1. Turn off M9 M9 Turn off coolant coolant M10 Tighten tool MIO OUT5 Tighten tool Mil Loosen tool MII Loosen tool Tools bank M20 M20 OUT6 Tools bank advances advances Tools bank M21 M21 Tools bank retreat retreat Turn on bs il M32 d M32 OUT4 Turn on lubrication lubrication Tum off iens M33 E M33 Turn off lubrication lubrication MO Program end MO OUTO Output 500ms pulse MI Programend Output high level End signal M2 M2 Output low level OFF M6 Output 7 M6 OUT7 Universal output M7 Output 7 OFF M7 Universal output M12 Output 8 M12 OUTS8 Universal output M13 Output 8 OFF M13 Universal output M14 Output 9 M14 OUT9 Universal output M15 Output 9 OFF M15 Universal output Output 10 M16 ON M16 OUT10 Universal output Output 10 MI7 MI7 Universal output OFF Output 11 N M18 ON MI8 OUTI1 Universal output Output 11 M19 M19 Universal output OFF Output 12 M22 ON M22 OUT12 Universal output Output 12 E M23 M23 Universal output OFF Output 13 M24 ON M24 OUT13 Universal output Output 13 zl M25 M25 Universal output OFF Output 14 ne M26 ON M26 OUT14 Universal output Output 14 M27 M27 Universal output OFF M28 Output 15 M28 OUTI5 Universal output http www adtechcn com 34 Bicimlendirilmis Kenarlik Altta Kenarlik Yok
2. Output 15 M29 M29 Universal output OFF Output 16 M34 ON M34 OUT16 Universal output Output 16 M35 M35 Universal output OFF Output 17 M36 ON M36 OUT17 Universal output Output 17 M37 M37 Universal output OFF user can define them as Note For standard output the user can refer to the standards for milling machine The universal output in accordance with the actual situation Special commands L Logic judgment command for example L16 is used for examining the signal of point IN16 When there is input signal the execution will proceed continuously http www adtechcn com 35 Bicimlendirilmis Kenarlik Altta Kenarlik Yok Chapter V Definitions of ADT8840 s Library Functions 1 Basic parameters setup 1 4 DeviceAddr init Bi imlendirilmi Kenarl k Altta Kenarl k Yok Name void DeviceAddr init void Definition Initialization of device interface s address Input parameter None Output None parameter Return value None Note Initialization should be first performed before the motion function is used 1 2 TCP Conn Name int TCP Conn char ip addr char int err Definition TCP network connection Input parameter IP address MAC address MAC media access control ip_addr mac_addr Output parameter err to receive the wrong c
3. 4 Network configuration of host upper PC lt 5 Network connection and troubleshooting er EOM OAOT NR 7 Commissioning and observing program running through serial interface Chapter X Precautions and Troubleshooting ye liler YA eN e uz e 0 EKE E EN YE EK M NE REM http www adtechcn com 4 Bi imlendirilmi Kenarl k Altta Kenarl k Yok About the product ADT 8840 is a high performance and multifunctional Off Line Motion Control Card whose hardware consists of high speed microprocessor large scope customized IC chips and multilayer PCBs a structure that integrates the technological strengths of various manufacturers at home and abroad and features its high reliability improved performance and proven technology Embedded in the product are 4 path pulse direction signal output phase AB Z pulse input for encoders of four axes 34 path optical coupler output 4 path alarm input 18 path optical coupler output 4 path axis control output two path RS232 communication module USB interface and network interface ADT 8840 is designed on the basis of the control and transmission protocol for Ethernet and TCP IP protocol with which one system can support 64 control cards that control 256 server stepping motors With bandwid
4. 9 7 adt8840a upload sysfile Name int adt8840a upload sysfile int dev num int mode char file SYSPARA Definition Upload parameters of system configuration files http www adtechcn com 56 Bi imlendirilmi Kenarl k Altta Kenarl k Yok Input parameter int dev num device number int mode upload mode 0 upload the currently used parameters of control card to host 1 upload parameters from system files of control card to host char file file name of system parameters If null character string is input it means the default fine name system ini is used Output parameter None Return value 0 execution OK 1 transmission abnormity 4 disabled device interface Note None 9 8 adt8840a download sysfile Name int adt8840a download sysfile int dev num int mode SYSPARA syspara char file Definition Download parameters of system configuration to control card Input parameter int dev num device number int mode download mode 0 only download parameters to control card but not save the system configuration files 1 download parameters to control card and save the system configuration files char file file name of system parameters If null character string is input it means the default fine name system ini is used Output parameter None Return value 0 execution OK 1 transmiss
5. 168 168 2 168 5 5 Troubleshooting for network connection and Settings Administrator gt arp 192 168 0 124 0 2 Address au 06 au aan au 00 an 90 an 90 an 90 an 88 88 88 88 88 88 B 90 80 90 00 66 00 au 90 00 00 00 00 00 Be 90 Physical Address 2 1 1 24 eB8 4c bf e 67 1e 8c b0 f8 10 1b fc 8a 93 8a 1f c6 1c 62 89 16 ec 67 6a 7a 0e 1f 52 02 1a 92 3b fa 1a 92 3hb fa 1c Ba eb 1d 07 5d 1a 92 e1 02 12 1b fc 4b d2 39 1f c6 1c 62 8b 1f c6 3a e6 3c 24 8 9 27 1e 8c 7f e9 eb 15 58 c2 60 04 1f c6 43 4f id e8 4c 3b 02 dd 1e 8c bB8 d8 8c 14 78 83 1c 32 18 f3 22 58 8c 16 e6 68 09 67 4 1 2 ib fc eb 99 a8 1e 8c 11 81 64 14 78 83 a5 69 15 a ff 52 ab cd 88 81 ab cd 00 01 1e 8c b8 f5 15 f2 9e 6f 24 28 ed 94 ee c9 18 3 ff 4a 33 1a 92 e8 fd 85 14 2a d2 27 5 Figure 13 Type dynamic dynamic dynamic dynamic dyna dynamic dynamic dynamic dynamic dynamic dynamic dynamic dynamic dynamic dynamic dynamic dynamic dynamic dynamic dynamic dynamic dynamic dynamic dynamic dynamic dynamic dynamic dynamic static stat ic dynamic dynamic dynamic dynamic dynamic dynamic 1 Inconsistent IP address and network adapter address of device as they are not re configured Set the network items for the device again 2 IP address of the devic
6. Note Use through VB NET is similar to that of VB http www adtechcn com 62 lt 1 Bicimlendirilmis Kenarl k Altta Kenarlik Yok amp 3 Help for debugging in developing through application The function library of ADT 8840 provides help on debugging 1 Use the debugging tool to display the input parameters actually received by the control card and the execution results The displaying state of serial interface debugging is enabled or disabled through the function Uart_show with default as disabled If the state of serial interface debugging is enabled a number of system resources will be consumed which can affect the execution speed 2 When this option is enabled it will help the development personnel examine execution failures of the control card caused by the unauthorized parameter input Once the program becomes stable and mature the user can disable the return of execution results of the control card through the Mode option When the mode option is enabled the return value of the function will include the execution results of the control card 0 execution OK 1 execution failure 1 transmission abnormity 2 response overtime 3 abnormal data received 4 disabled device interface When disabled the return value of the function will not include the execution results of the control card 0 execution OK 1 transmission abnormity 4 disabled device interface amp 4 Average execut
7. int adt8840a set command pos int dev num int axis long Value Definition Set number of logic position counter Input parameter dev num device number axis axis number 1 4 Value scope 2147483648 42147483647 Output parameter None Return value 0 execution OK 1 transmission abnormity 4 disabled device interface Note Logic position counter can be written and read at any time 3 5 adt8840a set actual pos Name int adt8840a set actual pos int dev num int axis long Value Definition Set number of actual position counter Input parameter dev num device number axis axis number 1 4 Value scope 2147483648 42147483647 Output parameter None Return value 0 execution OK 1 transmission abnormity 4 disabled device interface Note Actual position counter can be written and read at any time http www adtechcn com 42 4 Motion parameters detection adt8840a get command pos Bi imlendirilmi Kenarl k Altta Kenarl k Yok Name int adt8840a get command pos int dev num nt axis long pos Definition Get the logic position for each axis Input parameter dev num device number axis axis number 1 4 Output parameter pos pointer of logic position value Return value 0 execution OK 1 execution failure 1 transmission abnormity 2 re
8. means pulses of a set number are output with a fixed velocity or acceleration deceleration This function is performed when the tool needs to move to a specific position or execute a specific action The mechanism of preset drive for acceleration deceleration is shown in the figure below When the number of remaining pulses is smaller than that of accumulated pulses the system will begin to decelerate and terminate its drive once the output of designated pulses is completed To perform preset drive for acceleration deceleration the following parameters should be set a b d e Drive velocity Start velocity Range R Acceleration deceleration A D Start velocity SV Drive velocity V Output pulse number P Velocity J Stop when the output of designated Automatic deceleration pulses is completed Time Preset drive When preset drive for acceleration deceleration is engaged the system will start automatic deceleration at the computed point as shown in the above figure http www adtechcn com 23 Bicimlendirilmis Kenarlik Altta Kenarlik Yok Bi imlendirilmi p 1 Char Char Yaz tipi Kalin Continuous drive In continuous drive mode the output of drive pulses will keep going till the stop commands of high position or external stop signal is enabled This function can be performed when home position search scanning or c
9. 0 negative limit enabled 1 negative limit disabled Logic 0 low level enabled 1 high level enabled Default values positive limit enabled negative limit enabled low level enabled Return value 0 correct return value 1 error Public Function Setup_LimitMode ByVal axis As Integer ByVal valuel As Integer ByVal value2 As Integer ByVal logic As Integer As Integer Setup LimitMode adt8840a set limit mode devnum 0 axis valuel value2 logic End Function mode of stopO signal kk This function is used to set the mode of stop0 signal Parameters axis axis number i Value O disabled 1 enabled Logic 0 low level enabled 1 high level enabled Default values disabled Return value 0 correct return value 1 error k k k k k k kk k k k Public Function Setup_Stop0Mode ByVal axis As Integer ByVal value As Integer ByVal logic As Integer As Integer http www adtechcn com 73 Bi imlendirilmi Kenarl k Altta Kenarl k Yok lt Setup StopOMode adt8840a set stop0 mode devnum 0 axis value logic End Function pooo 2k 2k 2k mode of stopl signal koe k k k k oe k k k k k k kk kkk This function is used to set the mode of stop1 signal Parameters axis axis number Value O disabled 1 enabled Logic 0 low level enabled 1 high level enable
10. btn CButton GetDlgItem IDC_BUTTON_BASEPARA btn gt EnableWindow TRUE else PRA RAR drive under btnz CButton GetDlgItem IDC BUTTON PMOVE btn gt EnableWindow FALSE btnz CButton GetDlgItem IDC BUTTON CMOVE btn gt EnableWindow FALSE btn CButton GetDlgItem IDC_BUTTON_INPMOVE btn gt EnableWindow FALSE btnz CButton GetDlgItem IDC BUTTON CLEARPOS btn gt EnableWindow FALSE btnz CButton GetDlgItem IDC BUTTON BASEPARA btn gt EnableWindow FALSE CDialog OnTimer nIDEvent 2 5 Stop module The stop module is mainly used to control sudden events during the drive process that require immediate stop of all axes motions The codes of stop module are provided at the button CmdStop where they can be accessed by clicking and described as follows void CVCExampleDlg OnButtonStop for int i 1 i lt MAXAXIS i g CirlCard StopRun i 1 http www adtechcn com 96 Chapter IX Network Configuration and Serial Interface Debugging 1 Overview ADT 884 is designed on the basis of the control and transmission protocol for Ethernet and TCP IP protocol With bandwidth of 10Mbps ADT 884 can be operated in the LAN whose bandwidth is 100Mbps At present ADT 884 and its supporting software can be used in an Ethernet based LAN or connected to PC s network interface with the crossover cables Without returned commands the minimum time interval of repeat execution that ADT
11. http www adtechcn com 77 Bi imlendirilmi Kenarl k Altta Kenarl k Yok Vick sk sk ole ok oe oe k oe e ee k k k k k interpolation of axis xX and ek kekik ok 2s 2 2 kkk ok ElseIf m_bX value vbChecked And m_bA value vbChecked Then Setup Speed 1 m_nStartV 0 Text m nSpeed 0 Text m nAdd 0 Text Interp Move2 1 4 m nPulse 0 Text m nPulse 3 Text Va ois e ook sk o k k oe kkk k kkk k k kk k interpolation of axis ZF A eoe eoe poe epo eke ElseIf m bY value vbChecked And m bZ value vbChecked Then Setup Speed 2 m nStartV 1 Text m nSpeed 1 Text m nAdd 1 Text Interp Move2 2 3 m nPulse 1 Text m nPulse 2 Text Vies kk kkk k k ote oe se o ck k oe k k k k kk interpolation of axis Y and ACERO reo k k k k k kk kk kk k lee k k k k K ElseIf m_bY value vbChecked And m_bA value vbChecked Then Setup_Speed 2 m_nStartV 1 Text m_nSpeed 1 Text m_nAdd 1 Text Interp_Move2 2 4 m_nPulse 1 Text m_nPulse 3 Text Volk sk sk kk k k k k k is ec k k k k k k k k k interpolation of axis Z and A Eres k k k k k kk kk k kk k k ee rek ElseIf m bZ value vbChecked And m bA value vbChecked Then Setup Speed 3 m nStartV 2 Text m nSpeed 2 Text m nAdd 2 Text Interp Move2 3 4 m nPulse 2 Text m nPulse 3 Text Else MsgBox Please select the interpolation axis prompt End If End Sub 1 4 Monitoring module The monitoring module is used to get the information on axis drive and display the i
12. 0 axis startv adt8840a_set_speed devnum 0 axis speed adt8840a_set_acc devnum 0 axis add End If End Function Vii ok ask function kkk ke ek ke akk ak k se This function is used for driving the single axis Parameters axis axis number pulse number of output pulse Return value 0 correct return value 1 error Public Function Axis Pmove ByVal axis As Integer ByVal pulse As Long As Integer Result adt8840a pmove devnum 0 axis pulse Axis Pmove Rresult End Function k kk k kkk ok 2 for continuous drive ek 2 eH eoo opo o he kk This function is used to drive a single continuous motion axis Parameters axis axis number value output direction Value 0 positive direction 1 negative direction Return value 0 correct return value 1 error Public Function Axis Cmove ByVal axis As Integer ByVal value As Long As Integer Result adt8840a continue move devnum 0 axis value Axis Cmove Result End Function http www adtechcn com 69 Bi imlendirilmi Kenarl k Altta Kenarl k Yok Vk see KE KEK ACTION for interpolation of any two axes 069 This function is used to drive any two axes for interpolation Parameters axisl axis2 axis number engaged in the interpolation pulsel pulse2 number of output pulses of the corresponding axis Return value 0 correct return value 1 error Public Function Inte
13. Altta Kenarl k Yok 6 4 adt8840a read 8bit Name int adt8840a read 8bit int dev num int ios int value Definition Keep reading the status of 8 input points int dev num device number Input parameter MEE int ios initial IO number Output int value the statuses of successive 8 input points which correspond to 0 7 respectively parameter 0 execution OK 1 execution failure 1 transmission abnormity 2 response overtime Return value M 3 abnormal data received 4 disabled device interface Note None 7 Interrupt function 7 1 adt8840a clear int Name int adt8840a clear int int dev num int mode Definition Mark for clearing interruption Input parameter dev num device number Output None parameter Return value 0 execution OK 1 transmission abnormity 4 disabled device interface Note None 7 2 adt8840a enable int Name int adt8840a enable int int dev num Definition Enable interrupt service in motion control Input parameter dev num device number Output None parameter Return value 0 execution OK 1 transmission abnormity 4 disabled device interface Note None 7 3 adt8840a disable int Name int adt8840a disable int int dev num Definition Disable interrupt service in motion control Input parameter dev num device number Output None parameter Return value 0 ex
14. Email 52 163 frs ES DEBERE MAN K RUPE SA Sr SESE MASA HARS hdi bee 188 0 123 ERA TPE 192 168 0 123 RAS Beet Aran RO Er eos com amp sxmenc s WWW MCUS1 COM FE DTR RIS ASer AAAH Ps e m EE AP OR SRR meee BRT AHAA CRE B 255 255 255 0 192 168 0 1 D 00 45 CD 00 01 23 E 0000 F 0000 A 192 168 0 123 BLA TEKKE 192 168 0 123 255 255 255 0 Sa AE 255 255 255 0 192 168 0 1 Sa PISS 192 168 0 1 D 00 00 01 23 LA O ab ed 0 1 23 z HAXE ARS BEN RAO SREO Er xasn _ WWW MCUSI COM 8 ACDKSISF ARLE H menle S P aras mk malh v ee M ARNT aka AHIA jwww mcuSi com s 110 R 1400 Com EHF 115200bps 8 1 Figure 5 0 DSR 0 RLSD 0 http www adtechcn com After the network configuration is completed successfully and saved prompt will appear in the 102 FE Bi imlendirilmi Kenarl k Altta Kenarl k Yok interface saying the control card must be re started to make the configuration effective After the control card is restarted in the power on information the user will find find network configuration files configuration is under way as shown in Figur
15. Name int adt8840a set limit mode int dev num int axis int v1 int v2 int logic Definition Set the mode for inputting nLMT signal for positive negative limit Input parameter dev num device number axis Axis number 1 4 vl 0 enabled at positive limit 1 disabled at positive limit v2 0 enabled at negative limit 1 disabled at negative limit logic 0 enabled at low level 1 enabled at high level Output parameter None Return value 0 execution OK 1 transmission abnormity 4 disabled device interface Note Enabled at positive negative limit and low level in initialization 1 10 8840 set pulse mode int adt8840a set pulse mode int dev numiint axis int value int Name V logic int dir_logic Definition Set the work mode for output pulse dev_num device number axis axis number 1 4 value 0 pulse pulse mode 1 pulse direction mode When positive logic setting is available for pulse direction Pulse output mode Drive direction Men Sue pucwsiga DRCCW Sigal Independent 2puke direction drive output Low Level output mode direction drive output Low Level UN SLL Low Level 1 puke ouputmode Input direction drive output High Level parameters logic 0 positive logic pulse 1 negative logic pulse positive logic negative logic m pulse
16. Power consumption 3 6W 5 0W Operating temperature 45 Storage temperature 40 55 C Humidity 4096 8096 Storage humidity 0 9596 Application Engraving and milling machine Spray coater welding machine Four axis robot http www adtechcn com lt Bi imlendirilmi Kenarl k Altta Kenarlik Yok Bi imlendirilmi fe 1 Char Char Yaz tipi Kalin Serial 1 ADT 8840 usa Serial 0 D Axis X Axis Y Axis Z Axis RJ45 NN Com Input 17 33 JB JA Illustration and definition for terminals 4 1 Definition of JA port 0 16 path input INCOM1 INO XSTOPO INI YSTOPO IN2 ZSTOPO IH3 ASTOPO INA XLMT INS XLMT ING YLMT IH7 YLMT INS ZLMT INS ZLMT IN10 ALMT INH11 ALMT IN12 IH13 In14 INIS IN16 OONAAARWN http www adtechcn com 9 Bi imlendirilmi Kenarl k Altta Kenarl k Yok positive limit i 11 Z negative limit E A negative limit i i i Regular input i http www adtechcn com 10 lt Bicimlendirilmis Kenarl k Altta Kenarlik Yok 4 2 Definition of JB port 17 33 path input IHCOLI2 INI7 INIS INIS9 IH20 IH21 IH22 IH23 rH24 IH25 IH26 IH27 IH28 IH29 IH30 IH31 IH32 IH33 see eee O NOO0ODUNA ONODORWNAO Line No Name Defini
17. Setup_Speed 1 m_nStartV 0 Text m_nSpeed 0 Text m_nAdd 0 Text Interp Move3 1 2 4 m_nPulse 0 Text m_nPulse 1 Text m_nPulse 3 Text Vick sk sk ole ok k k k ote oe oe o c oe oe oe k k k k k ce k k interpolation of axis X Z and A ek k k k sese sk ck k kk ck kk k ok oe oleo oe ElseIf m bX value vbChecked And m bZ value vbChecked And m bA value vbChecked Then Setup Speed 1 m nStartV 0 Text m nSpeed 0 Text m nAdd 0 Text Interp Move3 1 3 4 m nPulse 0 Text m nPulse 2 Text m nPulse 3 Text sk o k k k kkk interpolation of axis Z and A k k k k k k k k k k k k k ElseIf m_bY value vbChecked And m_bZ value vbChecked m_bA value vbChecked Then Setup_Speed 2 m_nStartV 1 Text m_nSpeed 1 Text m_nAdd 1 Text Interp_Move3 2 3 4 m_nPulse 1 Text m_nPulse 2 Text m_nPulse 3 Text Tal lee 2k ok ok a ok ak a kkk kkk tuo axis interpolation tE EEEk k EEEE kE EERE EE EAE REK sk k se k k k oe ois c k k k k k k kk k k interpolation of axis X and crees ese seo ElseIf m_bX value vbChecked And m bY value vbChecked Then Setup Speed 1 m nStartV 0 Text m nSpeed 0 Text m nAdd 0 Text Interp Move2 1 2 m nPulse 0 Text m nPulse 1 Text Volk sk sk k k interpolation of axis X and ak ak ak k k k gt k ElseIf m_bX value vbChecked And m_bZ value vbChecked Then Setup_Speed 1 m_nStartV 0 Text m_nSpeed 0 Text m_nAdd 0 Text Interp_Move2 1 3 m_nPulse 0 Text m_nPulse 2 Text
18. UT pulse U UU uU dir logic 0 positive logic for direction output signal 1 negative logic for direction output signal dir logic Positive logic for direction Negative logic for direction output signal output signal 0 Low i La Low http www adtechcn com 38 Bi imlendirilmi Kenarl k Altta Kenarl k Yok Output None parameters Return 0 execution OK 1 transmission abnormity 4 disabled device value interface Pulse direction mode positive logic pulse and positive logic for Note direction output signal in initialization 2 Drive status detection 2 1 adt8840a get status Bi imlendirilmi Kenarl k Altta Kenarl k Yok Name int adt8840a get status int dev num int axis int value Definition Get axis s drive status Input parameter dev num device number axis axis number 1 4 Output parameter Value pointer of drive status 0 drive end non 0 drive under way Return value 0 execution OK 1 execution failure 1 transmission abnormity 2 response overtime 3 abnormal data received 4 disabled device interface Note None 2 2 adt8840a get inp status Name int adt8840a get inp status int dev num int value Definition Get axis s interpolation drive status Input parameter dev num device number Out
19. Yok Bi imlendirilmi p 1 Char Char Yaz tipi Kal n lt 1 Bicimlendirilmis Kenarl k Altta Kenarlik Yok Standard Ethernet RJ45 network interface TCP IP protocol supported ensuring high speed and reliable data communication in environment interfered by electromagnetism Users can realize real time control over the distant equipment through the LAN Single section maximum communication distance reaches 185 meters subject to the electromagnetism environment and wiring with five sections at maximum Average responsive time of 2 5 4 seconds for commands from the host to the equipment high real time performance Some of the commonly used control commands are optimized to realize the combined effects of multiple basic commands Supporting some of G code machining commands off line or real time machining and control achieved through G code One host and multiple server mechanism allows users to control and oversee multiple devices 64 at maximum through one host PC after expanded with router or HUB subject to the performance of host and network Antivirus performance improved at the lower layer of the network to resist interference from virus like ARP and network administrator to improve communication reliability With USB1 1 interface application in ADT 884 can be upgraded to facilitate the on site operation whenever necessary Optimized structure with full optical c
20. and U http www adtechcn com 113 Bi imlendirilmi Kenarl k Altta Kenarl k Yok lt 1 Bicimlendirilmis Kenarl k Altta Kenarlik Yok 2 Check whether the millimeter r and pulse r values at each axis are accurate http www adtechcn com 114
21. fifo inp move4 54 software buffer adt8840a FS Remove Delete file 55 adt8840a Net Setup Network configuration for control card 55 adt8840a set speed mode Set speed mode 55 adt8840a set buff mode Set software buffer mode 56 adt8840a set pulsemm Set pulse equivalent 56 adt8840a get pulsemm Get pulse equivalent 56 System Upload parameters of system adt8840a upload sysfile 57 configuration files Download parameters of system adt8840a download sysfile 57 configuration to control card Function for returning to home position adt8840a go home 58 software buffer adt8840a stop all Stop all machining 58 Download G code program to control adt8840a download gfile 58 card Open and upload G code program files adt8840a upload gfile 59 in control card G Code adt8840a g code G code command 59 adt8840a run gfile Run G code files for machining 59 Query the machining status where adt8840a g status 60 G code files are run adt8840a get gbuff depth Query buffer depth of G command 60 G codes supported by ADT 8840 Type G code Definition Format Remarks Motion G00 G0 Inching GOOX Y ZW Select X Y Z or W http www adtechcn com G01 G1 Linear interpolation G90G01X Y G91 GOIX Z Linear interpolation for any two axes or three axes G02 G2 Positive arc interpolation G17 G02 X_Y_I_J_d K or J K or G17 G02 X_Y_R_ the circle center Take X and Y as o
22. int CCtrlCard Write Output int number int value Result adt8840a_write_bit devnum 0 number value return Result position counter ak This function is used to set the logic position and actual position Parameters axis axis number pos value of the position http www adtechcn com 85 Mode 0 set logic position non 0 set actual position Return value 0 correct return value 1 error int CCtrlCard Setup_Pos int axis long pos int mode if mode 0 Result adt8840a_set_command_pos devnum 0 axis pos else Result adt8840a set actual pos devnum 0 axis pos j return Result eoe eoe EEEE pulse output mode OKK K K kK kK K K K K K KK K K Kk K K K This function is used to set the work mode of pulse Parameters axis axis number value pulse s work mode 0 pulse pulse mode 1 pulse direction mode Return value 0 correct return value 1 error Default pulse s work mode pulse direction mode This program employs the positive logic pulse and positive logic for direction output signals which are the default values int CCtrlCard Setup_PulseMode int axis int value Result adt8840a_set_pulse_mode devnum 0 axis value 0 0 return Result This function is used to set the mode of limit inputting nLMT from positive negative direction Parameters axis axis number Valuel 0 positive limit enabled 1 positive limit disabled Va
23. interpolation Resultzadt8840a get inp status devnum amp value return Result http www adtechcn com 84 Bicimlendirilmis Kenarlik Altta Kenarlik Yok lt 1 Bicimlendirilmis Kenarl k Altta Kenarlik Yok Roe soe seo seo get current information on motion This function is used to get the current information logic position actual position and running speed Parameters axis axis number LogPos logic position ActPos actual position Speed running speed Return value 0 correct return value 1 error int CCtrlCard Get_CurrentInf int axis long amp LogPos long amp ActPos long amp Speed Result adt8840a get command pos devnum axis amp LogPos adt8840a get actual pos devnum axis amp ActPos adt8840a get speed devnum axis amp Speed return Result eoe soe spo soe kle elek keko read input point LELLLILLLLLLLLLLLLLLLLLLLLLLLLLLI This function is used to read the single input point Parameters number input point 0 39 Return value 0 low level 1 high level 1 error int CCtrlCard Read Input int number int amp value Result adt8840a_read_bit devnum number amp value return Result function for outputting single point signal This function is used to output single point single Parameters number output point 0 15 value 0 low level 1 high level Return value 0 correct return value 1 error
24. names of the four check boxes selected objective are X Y Z and A and the codes are described as follows http www adtechcn com 76 Bi imlendirilmi Kenarl k Altta Kenarl k Yok Private Sub InterpMove_Click Tis ski kkk ET oment of speed setup K K K K kK Kk K K KK Setting scope of start velocity and drive velocity 1 2M Setting scope of acceleration 1 125 64000125 ADT 8840 control card can realize interpolation of any two three or four axes Vos sk sk ole ok se k k ote oe oe o k oe ok k k k k oe ok ce oe oe oe k oec four axis interpolation ERE SALE EEE If m bX value vbChecked And m bY value vbChecked And m bZ value vbChecked And m_bA value vbChecked Then Setup Speed 1 m nStartV 0 Text m nSpeed 0 Text m nAdd 0 Text Interp Move4 m nPulse 0 Text m nPulse 1 Text m nPulse 2 Text m nPulse 3 Text three axis interpolation Vick sk sk oe ok oe s cote oe oe of oe k k interpolation of axis X Y and Zee le el ekok kok Elself m bX value vbChecked And m bY value vbChecked And m bZ value vbChecked Then Setup Speed 1 m nStartV 0 Text m nSpeed 0 Text m nAdd 0 Text Interp Move3 1 2 3 m nPulse 0 Text m nPulse 1 Text m nPulse 2 Text Volk sk sk oleo se s cl oe oe se oc oe oe oe k k k k k k kk interpolation of axis X Y and A Heck sek sk ok se oe k oe oe k k k k k oe e k k k k k ElseIf m_bX value vbChecked And m_bY value vbChecked And m_bA value vbChecked Then
25. the exclusiveness of IP address and network adapter s address in the LAN 3 1 Serial interface debugging First connect ADT 8840 to serial interface of PC through the communication cable and then run the serial interface debugging tool SSCOM32 EXE see the tool attachment Basically the software for serial interface debugging can be set as follows select proper serial interface number default COM1 set baud rate as 115200 data bit as 8 stop bit as 1 parity bit as None and flow control as None and select Send New String in the check box The operating interface of serial interface debugging tool is shown in the figure below OS Starting Enter Main Task 255 a Des E 192 168 0 1 EKLA PA 00 AB CD 00 01 23 nes SEMI Te CERE BERE istae BORED mo R3of ACerS SA MERAH BabA Mi ACER t il arx ERZ Ree fern e men eos gt sxmen WWW MCUS1 COM ig 115200 DTR ATS sene r emes T EGER Ake None FERAE None E 0000 jww mcuS1 com 5 0 R 648 COMLE F 115200bps 81 5 0 DSR 0RLSD 0 Figure 1 If the serial interface is properly connected some start up information will be displayed automatically by the serial interface debugging tool after ADT 8840 is el
26. the last segment represents the host number within the subnet what s said here is based on the normal situation There are also exceptions The IP address of the control card should be within the same subnet as that of the controlling host If they are not in the same subnet the value of mask should be properly adjusted it is recommended the control card and the host be within the same subnet Subnet mask it is four segment decimal value two neighboring segments of which are separated by the character The maximum value of each segment should not exceed 255 This code is used to distinguish the dividing domain subnet number from that of the host number Default mask it is four segment decimal value two neighboring segments of which are separated by the character The maximum value of each segment should not exceed 255 and the highest segment should not exceed or be equal to 223 or be equal to If the real gateway exists in the subnet the user should fill out the IP address of the real gateway If not the default gateway should be set as the first host number in the subnet like xxx xxx xxx l Network adapter s address MAC It is a six segment hexadecimal value two neighboring segments of which are separated by the character The maximum value of each segment should not exceed FF and the highest segment should not be equal to 01 http www adtechcn com 11 Bi imlendirilmi Kenarl k Altta Ke
27. upward when one positive pulse is output and 1 downward when one negative pulse is output The actual position counter counts the pulses coming from the external encoder The user can use the commands to select the pulse type as phase A B signal or independent 2 pulses of upward downward counted signals The counting direction can be set The data of the two counters can be written and read at any time whose counting ranges between 2 147 483 648 2 147 483 647 http www adtechcn com 27 Two phase pulse input mode Count upward Count downward Up down pulse input mode PPIN PHIN Interpolation The controller can perform the linear interpolation for any 2 4 axes During the interpolation process the interpolation computation is carried out under the pulse s basic time order of the designated axis X Therefore such parameters as the designated axis X s start velocity and drive velocity should be set before the interpolation command is executed Linear interpolation for 2 4 axes After the end point coordinates relative to the current position are set the system will begin to perform the linear interpolation The coordinates of linear interpolation is within a scope of 24 digit character with symbol The interpolation ranges from the current position of the axis to somewhere between 8 388 607 and 8 388 607 Minor axis Major axis Position precision of linear interpolati
28. 0 Male jack DB9 Line No Name Definition 1 NC Not connected 2 TXO Transmit data 3 RXO Receive data 4 GND Power s grounding 5 GND Power s grounding 6 NC Not connected 7 VDD5 0 Provide 5V power to external devices 8 VDD5 0 Provide 5V power to external devices 9 NC Not connected SI 0 is normally used for displaying the information of running during network configuration and debugging http www adtechcn com 4 9 SI 1 serial interface 1 Bi imlendirilmi Kenarl k Altta Kenarl k Yok Female jack DB9 Line No Name Definition 1 Not connected 2 TXI Transmit data 3 RXI Receive data 4 GND Power s grounding 5 GND Power s grounding 6 NC Not connected 7 VDD5 0 Provide 5V power to external devices 8 VDD5 0 Provide 5V power to external devices 9 NC Not connected SI 1 not used amp Connecting to power supply The mainboard of this device employs 24 VDC as its power source which should be supplied from the external switching power The wiring for the power supply is shown in the figure below 24VDC http www adtechcn com 19 Bi imlendirilmi Kenarl k Altta Kenarl k Yok amp Standard USB interface USB Standard Ethernet interface RJ45 When the host is directly connected to the Control Card crossover cables will be used for the connection In other words one end of the wir
29. 1 transmission abnormity 4 disabled device interface http www adtechcn com 55 Bi imlendirilmi Kenarl k Altta Kenarl k Yok Note None 9 4 adt8840a set buff mode Name int adt8840a set buff mode int dev num int buffmode Definition Set the software buffer mode Input parameter int dev num device number int mode 0 software buffer enabled 1 software buffer disabled Output parameter None Return value 0 execution OK 1 transmission abnormity 4 disabled device interface Note None 9 5 adt8840a set pulsemm Name int adt8840a set pulsemm int dev_num int axis int PulseMm Definition Set the pulse equivalent Input parameter int dev num device number int axis axis number int PulseMm pulse equivalent Output parameter None Return value 0 execution OK 1 transmission abnormity 4 disabled device interface Note None 9 6 adt8840a get pulsemm Name int adt8840a get pulsemm int dev numint axis int PulseMm Definition Get the pulse equivalent Input parameter int dev num device number int axis axis number 1 4 int PulseMm receive the pulse equivalent of the current axis Output parameter None Return value 0 execution OK 1 transmission abnormity 4 disabled device interface Note None
30. 8840 can achieve is 2 milliseconds With returned commands 4 milliseconds 2 Network environment and host s configuration ADT 8840 can be running on cross subnet basis in a LAN consisting of multiple subnets But it is recommended that device run in exclusive subnets where large capacity network tools should not be installed and run so as to avoid communication delay or failure caused by the network overload When the controlling host is engaged in real time control as many unrelated applications as possible should be closed to ensure the good response of the host Required configuration of host m X85 compatible PC CPU over P4 recommended with memory of 512M m At least one serial interface and one network interface m Windows XP or Windows 2000 OS 3 Search or network configuration through serial interface tool As the LAN of the client may vary in environment it can t be guaranteed that IP address of control card and address MAC of network adapter have exclusive values in the client s network before the product is delivered With only one IP address and one network adapter s address MAC before delivery all new control cards must be confirmed or network resources engaged http www adtechcn com 97 Bi imlendirilmi Kenarl k Altta Kenarl k Yok must be re configured through the serial interface debugging tool SSCOM32 EXE attached with ADT 8840 before connection to other systems so as to ensure
31. ADT 8840 ADT 8840 Four Axis Off Line Motion Control Card User s Manual 5191 Motion Control Total Solution ADTECH SHENZHEN CNC TECHNOLOGY CO LTD Add 5 F Building 27 29 Tianxia IC Industrial Park Yiyuan Road Nanshan District Shenzhen P C 518052 Tel 0755 26722719 20 line Fax 0755 26722718 E mail Adtech 21cn com O http www adtechcn com ADT 8840 Four Axis Off Line Motion Control User s Manual Declaration on Copyright The copyright of all parts in this Manual is reserved by ADTECH SHENZHEN CNC TECHNOLOGY CO LTD hereinafter referred to as ADTECH and without permission by ADTECH nobody shall reproduce copy transcribe or translate any part therein No part of this Manual shall be considered as warranty expression of standpoint or other implications in any form whatsoever If any information is disclosed either directly or indirectly any profit is lost or undertaking is terminated just because of the information indicated in this Manual or on the product it describes ADTECH and its employees shall bear no responsibility In addition the specifications and other materials mentioned in this Manual shall only be used for reference and the contents therein shall be subject to change without prior notice Trademark The product names are only mentioned in this Manual for the purpose of identification which may be the trademark of others or whose copyright is reserved by others We
32. Altta Kenarl k Yok motion process through the upper PC in a real time manner or compulsorily stop the motion the system will guit the previous drive and execute the new drive command motion control functions are of immediate return When the drive commands is sent out the motion process will be controlled by the control card At the time the user can oversee the whole Note When an axis is moving it is not allowed to send new drive command to it Otherwise Although the programming languages are of great variety they in nature share some common points In short programming languages can be summarized as three structures and one idea By three structures it means all programming languages are focused on seguence structure loop structure and branch structure By one idea it means the algorithm and module division are used to complete the design which is the key and critical part of programming To ensure the usability standardization expansibility and maintainability of the program the examples given below are presented from the perspective of design and divided into several modules as follows motion control module further packaging the library functions provided by the control card implementation module together with the code segment monitoring module and stop module The application of ADT 8840 s functions library in VB and VC programming languages will be briefly presented as follows If other l
33. EC A 250 The scope of acceleration A is 1 32000 For example if it is set acc 1 100 The acceleration should be 100 250 25000 Pps Sed http www adtechcn com 40 3 2 adt8840a set startv Bi imlendirilmi Kenarl k Altta Kenarl k Yok Name int adt8840a set startv int dev num int axis int Value Definition Set start velocity Input parameter dev num device number axis axis number 1 4 Value SV s value 1 2000000 Output parameter None Return value 0 execution OK 1 transmission abnormity 4 disabled device interface Note None 3 3 adt8840a set speed Name int adt8840a set speed int dev num int axis long Value Definition Set drive velocity Input parameter dev num device number axis axis number 1 4 Value V s value 1 2000000 Output parameter None Return value 0 execution OK 1 transmission abnormity 4 disabled device interface Note It is value that reaches the set speed domain in acceleration deceleration drive The set speed drive starts from this value If this value is set below the start velocity the system will not perform acceleration deceleration drive but set speed drive from the very beginning http www adtechcn com 4l 3 4 adt8840a_set_command_pos Bi imlendirilmi Kenarl k Altta Kenarl k Yok Name
34. FIFO Byte is used as the unit of data with 2048 bytes for maximum The number of the bytes is subject to the interpolation command fifo inp movel 3 byte fifo inp move2 4 byte fifo inp move3 5 byte fifo inp move4 6 byte Return value 0 execution OK 1 execution failure 1 transmission abnormity 2 response overtime 3 abnormal data received 4 disabled device interface Note Clearing FIFO first in first out is only to clear the data in the buffer and it won t stop the current motion 8 3 adt8840a fifo inp movel http www adtechcn com 52 Bi imlendirilmi Kenarl k Altta Kenarl k Yok Name int adt8840a fifo inp movel int dev num int 1 long pulsel long speed Definition Buffer single drive Input parameter dev num device number 1 axis number 1 4 pulsel relative distance that the axis travels speed moving speed Output parameter None Return value 0 execution OK 1 transmission abnormity 4 disabled device interface Note None 8 4 adt8840a fifo inp move2 Name int adt8840a fifo inp move2 int dev num int axis2 long pulsel long pulse2 long speed Definition Buffer two axis interpolation motion Input parameter dev num device number axisl axis2 axis number engaged in interpolation pulsel pulse2 relative distance that each axis travels speed interpol
35. IDC_LIMIT_Y IDC_LIMIT_Y2 Positive negative limit of axis Y IDC LIMIT ZIDC LIMIT Z2 Positive negative limit of axis Z IDC LIMIT W IDC LIMIT W2 Positive negative limit of axis A CButton btn int 0 for 120 i lt 12 i g CtriCard Read Input i value read signal note the status is not of the return value btnz CButton GetDlgItem nIDIN 1 1 btn gt SetCheck value 07 1 0 detection oe kk ak kk kk k Input of phase Z at the encoder as STOP1 Axis X s STOPI 38 Axis Y s STOP1 39 Axis Z s STOP1 40 Axis A s STOPI 41 UINT nIDIN2 IDC_STOP1_X IDC_STOP1_Y IDC_STOP1_Z IDC_STOP1_W for i 0 1 lt 4 i g_CtrlCard Read_Input 38 i value Read IN38 to signal IN41 btn CButton GetDlgItem nIDIN2 i btn gt SetCheck value 0 1 0 if devnum 0 amp amp status 0 0 amp amp status 1 0 amp amp status 2 0 amp amp status 3 0 Per RRR RR diye completed btn CButton GetDlgItemIDC BUTTON PMOVE http www adtechcn com 95 Bi imlendirilmi Kenarl k Altta Kenarl k Yok lt 1 Bicimlendirilmis Kenarl k Altta Kenarlik Yok btn gt EnableWindow TRUE btn CButton GetDlgItem IDC_BUTTON_CMOVE btn gt EnableWindow TRUE btnz CButton GetDlgltem IDC BUTTON INPMOVE btn gt EnableWindow TRUE btnz CButton GetDlgltem IDC BUTTON CLEARPOS btn gt EnableWindow TRUE
36. IT MODR eee 1 10 ADT8840A SET PULSE MODER eee lt 2 Drive status detection 40 http www adtechcn com 2 2 1 ADT8840A GET STATUS slime dei AYAN G NES NE LG BU DAY E EYL 2 2 ADT8840A GET INP STATUS 2 3 ADT8840A GET INT STATUS Sos Motlon parameters Setup ipo ed eee des e spore elei a ee S limak kiye 4l 3 1 ADT8840A SET ACC o e i o an an RE XR EV P E Ra SENS 40 3 2 amp DT8840A SET STARTV TREE SERRA YARAN ANDA a 41 33 ADT8840A SET SPBED cca ttov rendir Verri odi de v ea erae ve repa Peel be alla verte tu reae vedo epa 41 3 4 ADT8840A SET COMMAND POS erener 42 3 5 8840 SET ACTUAL POS 4 Motionparametersdetection eee 4 l ADT8840A GET COMMAND POS eee 43 4 2 ADT8840A GET ACTUAL POS ceccccscsncesevocecssevesesescaesieceenvesssvedcdededestoncesendcdeaedesesecesesdavsventdoovs 43 4 3 ADTS840A_ GET SPERED in eto eie seta sse vest uve sadede lada B d ER FTT ORE FW EYE FEE Ga d yaa 43 44 ADT8840A ALL COMMAND POS eee 44 4 5 AD T8840A ALI ACTUAL POS 44 4 6 ADT8840A ALL SPEED CSS BIS Gee succes ge saya Yaaa damara anam ayara yalayan ve ara LDAP 9 1 ADT8840A PMOVE ER Ne REOR RU e aee RR ROREM E 25 2 ADT8840 PMOVEL ie cretieee eee thee
37. Internet Protocol TCP IP gt click properties and you will open the properties http www adtechcn com 103 Bicimlendirilmis Kenarlik Altta Kenarlik Yok lt Bi imlendirilmi Kenarl k Altta Kenarlik Yok window for TCP IP protocol as shown in Figure 7 8 9 and 10 BEF SE http www adtechcn com 104 lt Bi imlendirilmi Kenarl k Altta Kenarlik Yok Ho 4 SEC Hi RE Figure 9 http www adtechcn com 105 lt Bi imlendirilmi Kenarl k Altta Kenarlik Yok A IBEX Kis rs E M YH NWLink NetBIOS YH NWLink IPX SPX NetBIOS Compatible Transpor Internet fit TCP IP http www adtechcn com 106 Internet BHR TCP IP 255 255 255 0 Figure 11 In the properties window for TCP IP protocol select use the IP address below Then the user can set the host s IP address subnet mask and default gateway in accordance with the subnet number of the LAN where the host is installed If no real gateway exists in the subnet the gateway can be set as the number of the first host in the subnet like 192 168 0 1 In actual use the subnet number should be consistent with that of the host If not the user can modify the network configuration files of the control card through the serial interface software tool to make them so Of course if the co
38. N47 Phase B s input for axis Z s encoder 15 ZECB IN47 Phase B s input for axis Z s encoder 4 7 Definition of axis A s port axis A s pulse and direction JCP4 PUCOM 5 gt gt APU EXT_VCCBO o APU 424V O 24VGND S 22ADR o ADR AECA o KAALARM gt gt OUT21 AECB gt o lt AECZ lt 2 2 DB 5 15 pin female jack same as lathe and milling machine Line No Name Definition APU Axis A s pulse signal http www adtechcn com Bi imlendirilmi Kenarl k Altta Kenarl k Yok 2 APU Axis A s pulse signal 3 ADR Axis As direction signal 4 ADR Axis A s direction signal 5 AALARM IN37 Regular input signal can be used as server alarm input of axis A Regular input signal can be used as server full capacity and other functions 7 AECZ IN41 Phase Z s input for axis A s encoder 8 AECZ IN41 Phase Z s input for axis A s encoder 9 EAT_VCCA Driver used for single end input 10 24V 24V power output to server 11 24VGND 24V power output to server 12 AECA IN48 Phase A s input for axis A s encoder 13 AECA IN48 Phase A s input for axis A s encoder 14 AECB IN49 Phase B s input for axis A s encoder 15 AECB IN49 Phase B s input for axis A s encoder 4 8 SI 0 serial interface
39. Speed 1 Add 1 g CtrlCard Interp Move2 2 3 Pulse 1 Pulse 2 else if m_bX amp amp m bY amp amp m bZ amp amp m bA interpolation of axis Y and W g CtrlCard Setup Speed 2 Startv 1 Speed 1 Add 1 g CtrlCard Interp Move2 2 4 Pulse 1 Pulse 3 else if m_bX amp amp m_bY amp amp m bZ amp amp m bA interpolation of axis Z and W g CtriCard Setup Speed 3 Startv 2 Speed 2 Add 2 g CtriCard Interp Move2 3 4 Pulse 2 Pulse 3 J PR 78 HR AR AR A A a a A a three axis interpolation 4 else if m_bX amp amp m_bY amp amp m_bZ amp amp m_bA interpolation of axis X Y and Z g CtrlCard Setup Speed 1 Startv 0 Speed 0 Add 0 g CtrlCard Interp Move3 1 2 3 Pulse 0 Pulse 1 Pulse 2 http www adtechcn com 92 else if m_bX amp amp m bY amp amp m bZ amp amp m_bA interpolation of axis X Y and Z g CtrlCard Setup Speed 1 Startv 0 Speed 0 Add 0 g CtrlCard Interp Move3 1 2 3 Pulse 0 Pulse 1 Pulse 2 else if m_bX amp amp m_bY amp amp m_bZ amp amp m_bA interpolation of axis X and W g CtriCard Setup 1 Startv 0 Speed 0 Add 0 g CtrlCard Interp Move3 1 2 4 Pulse 0 Pulse 1 Pulse 3 else if m_bX amp amp amp amp m bZ amp amp interpolation of axis X Z and W g CtriCard Setup 1 Startv 0 Speed 0 Add 0 g CtrlCard Interp Move3 1 3 4 P
40. System 9 1 adt8840a FS Remove Name int adt8840a FS Remove int dev num const char pFileName Definition Delete file int dev num device number Input parameter char pFileName file s path name Output None parameter 0 execution OK 1 execution failure 1 transmission abnormity 2 response overtime Return value 2 3 abnormal data received 4 disabled device interface Note None 9 2 adt8840a Net Setup Name int adt8840a Net Setup int dev num char IP char MASK char Gateway char MAC Definition Carry out network configuration for control card int dev num device number char IP IP address Input parameter char MASK subnet mask char Gateway IP address of gateway char MAC MAC address of control card Output None parameter 0 execution OK 1 execution failure 1 transmission abnormity 2 response overtime Return value ma 3 abnormal data received 4 disabled device interface To restore the default network configuration use the function adt8840a FS Remove Note delete the net txt files and then re electrify the system 9 3 adt8840a set speed mode Name int adt8840a set speed mode int dev num int mode Definition Set the speed mode int dev num device number Input parameter int mode 0 free mode 1 fixed mode Output None parameter Return value 0 execution OK
41. T nID3 IDC_RUNSPEED_X IDC_RUNSPEED_Y IDC_RUNSPEED_Z IDC_RUNSPEED_W CStatic bl CString str int status 4 for int i 1 i lt MAXAXIS 1 i g_CtrlCard Get_CurrentInf i log act spd get the logic position actual position running speed and drive status PRK di splay logic position Ibl CStatic GetDlgItem nID 1 i 1 str Format ld 09 Ibl gt SetWindowText str PreK display actual position IbIz CStatic GetDlgItem nID2 i 1 str Format ld act Ibl gt SetWindowText str Pree display running speed Ibl CStatic GetDl gItem nID3 i 1 without speed ratio actual speed obtained value str Format ld spd Ibl gt SetWindowText str get drive status g_CtrlCard Get_Status i status i 1 0 AR aE EAE SI oN a detection ok e ke ak ke ke Axis X s STOPO 0 Axis Y s STOPO 1 Axis Z s STOPO 2 Axis A s STOPO 3 Positive limit of axis X 4 Negative limit of axis X 5 Positive limit of axis Y 4 Negative limit of axis Y 5 Positive limit of axis 2 8 Oo Negative limit of axis Z 9 Positive limit of axis A 10 Negative limit of axis A 11 http www adtechcn com 94 Bi imlendirilmi Kenarl k Altta Kenarl k Yok UINT nIDINI 1 IDC STOPO X IDC STOPO Y X Y home position IDC STOPO ZJIDC STOPO W Z A home position IDC LIMIT X IDC LIMIT X2 Positive negative limit of axis Y
42. Therefore if the temperature is too high at the site the user should install a fan to disperse the heat 3 Never use the control card in an environment with high temperature high humidity dust and erosive gases 4 Use a rubber cushion as buffer where the vibration is violent 5 The conforming power for ADT8840 is 24VDC 6 The voltage of output circuit is 12VDC 24VDC and 24VDC is a recommended value Maintenance Caution before maintenance 1 Cut off the power supply for the main return circuit before any maintenance work is carried out 2 The operator should make sure the power supply is cut off to avoid unexpected accident http www adtechcn com 112 Bi imlendirilmi Kenarl k Altta Kenarl k Yok Caution before power on Check whether the wiring is correct before the system is electrified Pay attention to the mutual influence between the high and low voltage if you feel confused refer to the wiring diagram of the joint box 1 Check whether the driver s current is excessively high or low and subdivision setup is correct Check whether the motor and the corresponding axis are correctly set 3 Check whether the input and output circuits match each other Check whether the power switch of the control box is disconnected Regular check Under normal operation conditions daily average temperature 30 C load 80 running time 12 h day carry out daily or regular check for the items below e Check wh
43. adt8840a pmove devnum 0 axis value return Result eoe see eee EF CtON for interpolation of any two UX GE eek This function is used to drive any two axes for interpolation Parameters axis axis2 axis number engaged in the interpolation valuel value2 number of pulses Return value 0 correct return value 1 error int CCtrlCard Interp_Move2 int axis1 int axis2 long valuel long value2 Result adt8840a_inp_move2 devnum 0 1 axis2 valuel value2 return Result Roe ko seo function for interpolation of any three axes This function is used to drive any three axes for interpolation Parameters 1 axis2 axis3 axis number engaged in the interpolation valuel value2 value3 number of pulses Return value 0 correct return value 1 error int CCtrlCard Interp_Move3 int axis1 int axis2 int axis3 long valuel long value2 long value3 Result adt8840a_inp_move3 devnum 0 axisl axis2 axis3 valuel value2 value3 return Result pee tok tok kee eek function for interpolation of four axes 2 gt k kak k kk ak 2 akk ak kk k This function is used to drive the four axes XYZW for interpolation http www adtechcn com 83 Bi imlendirilmi Kenarl k Altta Kenarl k Yok Parameters valuel value2 value3 value4 number of output pulses Return value 0 correct return value 1 error Teese seo sese eoe spo
44. anguages are used the user can make reference from exemplified VB and VC procedures 1 VB programming 1 1 Preparation 1 Create a new project and save it as test vbp 2 By referring to the method mentioned earlier add adt8840 bas module to the project 1 2 Motion control module 1 Add a new module to the project and save it as ctrlcard bas 2 First self define the initialization functions of the control card in this module and initialize the library functions that need to be packaged into the initialization functions 3 Keep self defining other related motion control functions such as speed setting function single axis motion function and interpolation motion function 4 The source code of ctrlcard bas lek kakalak motion control module HAA HH A HH a a http www adtechcn com 67 To quickly develop application system with high usability expansibility and maintainability we have packaged all library functions by referring to the type on the basis of the function library of the control card The following example only involves one motion control card Public Result As Integer return value Const MAXAXIS 4 max axis number 2 2s 2 k EK I 7 FUNCTIONS 7 kkk akak akak akak ak ak kk k k kk k This function includes the library function commonly used in the initialization of the control card It is the basis of using their functions and must be used
45. ar interpolation Input parameter dev num device number axisl axis2 axis number engaged in interpolation pulsel pulse2 relative distance the axis travels Output parameter None Return value 0 execution OK 1 transmission abnormity 4 disabled device interface Note Supports interpolation of any two axes The interpolation speed is based on the minimum axis speed 5 8 adt8840a inp move3 Name int adt8840a inp move3 int dev num int mode int axisl int dev num int axis2 int dev num int mode int axis3 long pulsel long pulse2 long pulse3 Definition Tri axis linear interpolation Input parameter dev num device number axisl axis2 axis3 axis number engaged in interpolation pulsel pulse2 pulse3 relative distance the axis travels Output parameter None Return value 0 execution OK 1 transmission abnormity 4 disabled device interface Note Supports interpolation of any three axes The interpolation speed is based on the minimum axis speed 5 9 adt8840a inp 4 Name int adt8840a inp move4 int dev num long pulsel long pulse2 long pulse3 long pulse4 http www adtechcn com 47 Bi imlendirilmi Kenarl k Altta Kenarl k Yok Definition Four axis linear interpolation Input parameter dev num device number pulsel pulse2 pulse3 pulse4 relative distance the axi
46. ation speed Output parameter None Return value 0 execution OK 1 transmission abnormity 4 disabled device interface Note None 8 5 adt8840a fifo inp move3 Name int adt8840a fifo inp move3 int dev num int axis2 int dev num int axis3 long pulsel long pulse2 long pulse3 long speed Definition Buffer three axis interpolation motion Input parameter dev num device number axisl axis2 axis3 axis number engaged in interpolation pulsel pulse2 relative distance that each axis travels speed interpolation speed Output parameter None http www adtechcn com 53 Bi imlendirilmi Kenarl k Altta Kenarl k Yok Return value 0 execution OK 1 transmission abnormity 4 disabled device interface Note None 8 6 adt8840a fifo inp move4 Name int adt8840a fifo inp move4 int dev num long pulsel long pulse2 long pulse3 long pulse4 long speed Definition Buffer four axis interpolation motion Input parameter dev num device number pulsel pulse2 pulse3 pulse4 relative distance that each axis travels speed interpolation speed Output parameter None Return value 0 execution OK 1 transmission abnormity 4 disabled device interface Note None http www adtechcn com 54 Bi imlendirilmi Kenarl k Altta Kenarl k Yok 9
47. ation speed and it has noting to do with the sequence of the parameters Note The speed ratio of interpolation is only half that for single axis motion In http www adtechcn com 64 Bi imlendirilmi Kenarl k Altta Kenarl k Yok Bi imlendirilmi Kenarl k Altta Kenarl k Yok other words the interpolation speed is only half of that of the single axis motion with the same feunction http www adtechcn com 65 Signal STOP0 and STOP1 STOPO and STOP are signals each axis has Thus there are eight STOP signals totally which are mainly used when the machine needs to return to the home position To return to the home position one or multiple signals can be used in accordance with the situation However it should be noted that as this signal is defined as deceleration stop a deceleration switch can be added in front of the home position switch when the system returns to the home position at high speed That is to say two STOP signals are used one for home position switch and the other for deceleration switch It also works if only one signal is used In that case after the system stops when it receives the STOPS signal it will move reversely at uniform speed and stop when the signal is received again http www adtechcn com 66 Bicimlendirilmis Kenarlik Altta Kenarlik Yok Chapter Examples of Programming for Developing Motion Control Card Bi imlendirilmi Kenarl k
48. ative distance that axis 1 travels long pulse2 relative distance that axis 2 travels Output None parameter Return value 0 execution OK 1 transmission abnormity 4 disabled device interface The parameters needed by the velocity curve must be set before the drive command is Note written 5 3 adt8840a pmove3 Name int adt8840a pmove int dev num int axis long pulse Definition Preset drive http www adtechcn com 45 Bi imlendirilmi Kenarl k Altta Kenarl k Yok Input parameter dev num device number axis axis number 1 4 pulse Output pulses gt 0 Positive direction movement lt 0 Negative direction movement Scope 268435455 268435455 Output parameter None Return value 0 execution OK 1 transmission abnormity 4 disabled device interface Note The parameters needed by the velocity curve must be set before the drive command is written 5 4 adt8840a pmove4 Name int adt8840a_pmove int dev num int axis long pulse Definition Preset drive Input parameter dev num device number long pulsel relative distance that axis 1 travels long pulse2 relative distance that axis 2 travels long pulse3 relative distance that axis 3 travels long pulse4 relative distance that axis 4 travels Output parameter None Return value 0 execution OK 1 transmission abnormi
49. be a EESEE EFE ROTER tian er a lay yasayan azan S DIE 1 0 m 9 45 ADTOS40A PMOVEA iiie icit eyi hr or dei i ee rie E VE elisa ane tai 5 5 ADTS840A DEC tan eas ei en RN XR ge XEM ERR RN EN XN VENAE ENN EY EVE V RN CONVEN 5 6 ADT8840A SUDDEN STOP 5 o itte irre ren rre RR RERO ET 47 5 7 ADT8840A_INP_MOVE2 5 8 ADT8840A INP MOVE3 5 9 ADT8840A_INP_MOVEA4 5 10 8840 CONTINUE MOVE eee 48 RE e 8071 eR 48 Yal ADT8840 A ARC etre tette reiecit tereti eed er ete EN HR HT ONSE 49 6 Input and output of switch value ADTSSAYA READEBIT HH Pe EG 50 6 2 ADTS840A WRITE ree Ee ee eed eere eere aver ve eer rose 50 6 3 ADT8840A SUDDEN WRITE 290 6 4 8840 READ 8BIM eee 51 7 Mmtermitfuncton eee 52 LA ADTSSAYA CLEAR Yeis esere disi d ve va sl Sel S v ile i a iii a R 51 7 2 ADT8S40AENABLE INT E ETT oS FEE ET SERE EFE eMe ERIS 51 7 3 ADT8840A DISABLE INT ccsssccssssccsssssesssstesstecsssesesssssessssseuessceecesesesesesesauencsnsecssesesesanseaeee E 8 Hardware DUPFer cec rn cree m rr ren eoi rene e er elenen ya ar eee thee eee ETE 53 8 1 ADT8840A RESET FIFO 22 5 2 ADTS840A RBAD FIBOU
50. cceleration counter counts the number of pulses accumulated during the acceleration process When the number of remaining pulses is smaller than that of accumulated pulses the system will begin to decelerate automatically In deceleration the velocity will be lowered to the start value in a linear fashion To perform linear acceleration deceleration drive the following parameters should be set Range R Acceleration A acceleration deceleration Deceleration D individually set deceleration subject to temporary setting Start velocity SV Drive velocity V Output pulse number P for preset drive subject to temporary setting Velocity D eM SV To small number of output pulse to reach the drive velocity Linear acceleration deceleration drive Time Triangle prevention for preset drive In preset drive mode with linear acceleration and deceleration if the number of output pulses is smaller than that needed to reach the drive speed through acceleration a triangle shape wave will be generated At the time the triangle prevention function will be activated Triangle prevention function means in preset drive mode with linear acceleration and deceleration even if the number of output pulse is smaller than needed the system will stop acceleration and maintain the unchanged velocity after the number of pulses consumed during acceleration and deceleration is greater than 1 5 times of the total number of output pu
51. d Default values disabled Return value 0 correct return value 1 error Public Function Setup Stopl Mode ByVal axis As Integer ByVal value As Integer ByVal logic As Integer As Integer Setup Stopl Mode adt8840a set stopl mode devnum 0 axis value logic End Function 1 3 Implementation module 1 3 1 Interface configuration ADI 8840 DENO ADT 8840 FWE i92 188 0 123 Soe cp Eo REER Suna ik eas BAS RENE TRE AUR r ER stop stopt 0 0 r L 5 a 0 0 r 0 0 F Note 1 Speed setting to set start velocity drive velocity and acceleration of each axis position setting to set the drive pulse of each axis drive information to display the logic position actual position and running speed of each axis in a real time manner 2 Drive objective to select the drive objective to determine the axis that s engaged in the interaction or interpolation 3 Interaction used to send the single axis drive command to all axes selected as drive objective interpolation used to send the interpolation command to all axes selected as http www adtechcn com 74 Bi imlendirilmi Kenarl k Altta Kenarl k Yok lt 1 Bicimlendirilmis Kenarl k Altta Kenarlik Yok drive objective stop stop pulse output of all axes Pulse is taken as the
52. d through the function Close all Note The library functions namely DeviceAddr init and TCP Conn serve as the gate through which ADT 8840 passes Only after the motion control card is successful initialized by using these two functions can other functions be used effectively Speed setting 2 1 Uniform motion It is easy to carry out the setting What the user needs to do is to set the drive velocity with the same value as the start velocity No need to set other parameters The related functions are as follows adt8840a set startv adt8840a set speed 2 2 Acceleration and deceleration with symmetrical line This is the most commonly seen method The user should set the start velocity drive velocity and acceleration and automatic deceleration should be employed The related functions are as follows adt8840a set startv adt8840a set speed adt8840a set 2 3 Interpolation speed With ADT8840 the user can choose any two three or four axes for linear interpolation As for the interpolation speed the system will take the speed parameter of the front most as the speed of the long axis For example at adt8840a inp move2 0 3 1 100 200 It takes the speed parameter of the first axis axis X as the interpolation speed and it has noting to do with the sequence of the parameters And at adt8840a inp move3 0 3 4 2 100 200 500 It takes the speed parameter of the second axis axis Y as the interpol
53. dateData TRUE long Startv 2 m nStartvX m nStartvY m nStartvZ m nStartvA J start velocity long Speed 2 m nSpeedX m nSpeedY m nSpeedZ m nSpeedA drive velocity long Add m_nAddX m_nAddY m_nAddZ m_nAddA acceleration if m_bX J PR ASR AR a see a a a a set speed of axis g CtriCard Setup Speed 1 m nStartvX m nSpeedX m nAddX j bY sot speed of axis Y http www adtechcn com 90 Bi imlendirilmi Kenarl k Altta Kenarl k Yok lt 1 Bicimlendirilmis Kenarl k Altta Kenarlik Yok g CtrlCard Setup Speed 2 m nStartvY m nSpeedY m nAddY j if m_bZ J eos aR a a a a a set speed of axis Z pp g CtrlCard Setup Speed 3 m nStartvZ m nSpeedZ m_nAddZ if m_bA 1 PRB RAR a A a ae a a ae ok set speed of axis Aref g CtrlCard Setup Speed 4 m nStartvA m nSpeedA m nAddA j drive command a a soe drive of axis X if m_bX g CtrlCard Axis Pmove 1 m nPulseX EEEE drive of axis Y REEE Ekk if m_bY g CtrlCard Axis Pmove 2 m nPulseY J ree ee a a drive of axis Co eee eee eee ff if m_bZ g CtrlCard Axis Pmove 3 m nPulseZ J Free e toe sete drive of axis if m_bA g CtrlCard Axis Pmove 4 m nPulseA if m_bX amp amp m_bY amp amp Im bZ amp amp m_bA MessageBox Please select interaction axis prompt Int
54. e 6 fi sscom3 2 EERDE T Whttp www mcuSi com Emaik mea 0S Starting Enter Main_Task ACEP R IPH 192 168 0 123 255 255 255 0 192 168 0 1 EH O ab cd 0 1 23 HES SEMI TEES REE AWA HORROR Aer SAA MERAH BOE Rt eee aran SEN Er sos xmen Sb WWMW MCUBI COM EE ATs KIS SF A Binder Metre v amea 1000 o see RER VEAS mee M RANT ksa MISA None 0000 jwww meuSi com 5 0 R 617 115200bps 81 CTS 0DSR 0RLSD 0 Figure 6 The network configuration of ADT 8840 can also be realized through the function adt8840a Net Setup in the application after the network is successfully connected 4 Network configuration of host upper PC The network configuration of the controlling host should be modified through the dialogue box of properties designed for TCP IP protocol which can be opened under Windows environment by following the procedures below From Start menu or on the desktop make selections by following items below right click Network Neighborhood gt Properties gt click network connection window gt right click local area connection and click properties gt open the properties window gt activate the general options gt select
55. e is not in the same subnet as that of the host Set them in the same subnet or change the subnet mask 3 Multiple devices with the same IP addresses and network adapter addresses exist in the LAN Set the network items for the device again 4 Network cables are not matched to each other The device and controlling host should be http www adtechcn com 110 Bi imlendirilmi Kenarl k Altta Kenarl k Yok connected to each other through crossover cable while the device and the HUB or router can be connected to each other through either crossover cable or straight through cable 5 IP address and MAC address of the device don t exist at the time of network connection Use the serial interface software tool to get or modify the real IP address and MAC address of the control card and confirm their exclusiveness in the subnet 6 Unreliable physical connection check 7 Error of default gateway setting Set it correctly 8 Ifthe problem still exists after all abovementioned solutions are used you can power off the control card and power on it again 6 Information on network configuration IP address it is four segment decimal value two neighboring segments of which are separated by the character The maximum value of each segment should not exceed 255 and the highest segment should not exceed or be equal to 223 or be equal to 0 Normally the first three segments represent the subnet number whereas
56. e space of hardware buffer Even if the system is executing an interpolation command for motion an interpolation command can be written When a command is written into an empty hardware buffer the control card will immediately execute the first written command on a first in first out basis The system will stop once the execution of the current interpolation command is completed at the time the hardware buffer is empty The user should judge whether the buffer space is full when saving the interpolation commands into it If it is full no more command can be written Otherwise the commands might be lost With hardware buffer interpolation the pause between two interpolations can be effectively avoided Even if the computer runs slowly good effects can be obtained Note 1 When a hardware buffer interpolation command is being executed if the interpolation motion needs to be stopped immediately the operator must first clear the buffer and then stop the motion 2 When a hardware buffer interpolation command is being executed no other motion command should be executed simultaneously Otherwise motion confusion will arise 3 Interpolation buffer only works in even speed state not in acceleration and deceleration state Pulse output mode As shown in the table below two modes are available for the drive output pulses In independent 2 pulse output mode drive pulses are output from PU CW when it is a positive direction drive and f
57. e unit for all abovementioned data 2 3 2 The initialization codes of ADT 8840 are provided at the initialization item in the window The codes newly added by the user are described as follows SetDlgitemText IDC EDIT OPPIP 192 168 0 123 designate IP address of control card SetDIgItemText IDC EDIT MAC 00 AB CD 00 01 23 designate network adapter s address SetDIgItemText IDC EDIT INFO please initialize first DeviceAddr init initialize the device s interface address eee set the default start velocity as 100 m nStartvX 100 http www adtechcn com 89 Bi imlendirilmi Kenarl k Altta Kenarl k Yok m_nStartvY 100 m_nStartvZ 100 m_nStartvA 100 set the default drive velocity as 2000 m nSpeedX 2000 m nSpeedY 2000 m nSpeedZ 2000 m nSpeedA 2000 set the default acceleration as 2500 m nAddX 2500 m nAddY 2500 m nAddZ 2500 m nAddA 2500 set the default target position as 1000000 m nPulseX 1000000 m nPulseY 1000000 m nPulseZ 1000000 m nPulseA 1000000 UpdateData FALSE SetTimer MAINTIMER 100 NULL start the timer 2 3 3 nteraction codes are provided at the interaction button where they can be accessed by clicking and send out corresponding drive commands based on the selected objective The codes are described as follows interaction button acts void CVCExampleDlg OnButtonPmove Up
58. ectrified When a sound di is heard from the buzzer it means ADT 8840 has been successfully started and some system information and information about current network configuration can be displayed in the window of the debugging software At the same time the system prompts the user can press any key to enter the detection configuration mode Configured with some default values before delivery the http www adtechcn com 98 Bicimlendirilmis Kenarlik Altta Kenarlik Yok control card will display some ex factory network configurations at the time of start up provided the user didn t re configure them Defaults of network configurations are as follows IP address 192 168 0 123 Subnet masl 255 255 255 0 Default gateway 192 168 0 1 Address of network adapter MAC 00 AB CD 00 01 23 3 2 Network configuration of ADT 8840 The user can activate the window of serial interface software and press any key to enter the interface of configuration within 30 seconds after ADT 8840 is started as shown in Figure 2 Two commands for configuration mode appear in Figure 2 Format of command input and how to send enter the command by starting with the character and the character string prompted in the interface see Figure 2 Then click Send to complete the process If the user has not input the command within 30 seconds the system will automatically close the configuration mode so as to prevent the control card from unex
59. ecution OK 1 transmission abnormity 4 disabled device interface Note None http www adtechcn com 51 8 Hardware buffer 8 1 adt8840a reset fifo Bi imlendirilmi Kenarl k Altta Kenarl k Yok Name int adt8840a reset fifo int dev num Definition Reset buffer In other words clear all commands in the buffer Input parameter dev num device number Output parameter None Return value 0 execution OK 1 transmission abnormity 4 disabled device interface Note Clearing FIFO first in first out is only to clear the data in the buffer and it won t stop the current motion 8 2 adt8840a read fifo Name int adt8840a read fifo int dev num UINT value Definition Get to know buffer s space used Input parameter None Output parameter dev num device number value space used The value indicates the status of FIFO whose definitions are as follows D15 full D14 almost full D13 empty D12 almost empty Full FIFO is full and nor more data can be written normally not used Almost full The remaining space of FIFO is less than 8 used for judging whether more data can be placed into FIFO Empty There are no data in FIFO used for judging whether FIFO is empty Almost empty The remaining data in FIFO are less than 8 normally not used The above statuses can be judged by referring to the data saved in
60. erpolation codes are provided at the interpolation button where they can be accessed by clicking and send out corresponding drive commands based on the selected objective The codes are described as follows interpolation button acts void CVCExampleDlg OnButtonInpmove UpdateData long Startv m_nStartvX m_nStartv Y m_nStartvZ m_nStartvA start velocity long Speed m nSpeedX m nSpeedY m nSpeedZ m nSpeedA drive velocity long Add m nAddX m nAddY m nAddZ m nAddA Macceleration long Pulse m nPulseX m nPulseY m nPulseZ m nPulseAj number of axis drive pulses http www adtechcn com 91 lt 1 Bicimlendirilmis Kenarl k Altta Kenarlik Yok if m bX amp amp m bY amp amp m bZ amp amp m bA interpolation of axis X and Y g CtrlCard Setup Speed 1 Startv 0 Speed 0 Add 0 g CtrlCard Interp Move 2 1 2 Pulse 0 Pulse 1 else if m_bX amp amp m_bY amp amp m bZ amp amp m bA interpolation of axis X and Z g CtrlCard Setup_Speed 1 Startv 0 Speed 0 Add 0 g CtrlCard Interp Move 2 1 3 Pulse 0 Pulse 2 else if m_bX amp amp m_bY amp amp m_bZ amp amp m_bA interpolation of axis X and W g CtrlCard Setup Speed 1 Startv 0 Speed 0 Add 0 g CtrlCard Interp Move 2 1 4 Pulse 0 Pulse 3 else if m_bX amp amp m bY amp amp m bZ amp amp bA interpolation of axis Y and Z g CtriCard Setup SpeedQ Startv 1
61. es adopts standard 568B line order and the other 568A line order e zie 568A Male 566B Hale amp Connection for input signal Optical coupler input The INCOM terminal should be connected to the positive pole of the external power source and the input signal to the corresponding pin Among the terminals the shared terminal of INO IN16 is INCOMI the shared terminal of IN17 IN33 INCOM2 When in use the shared terminal should be connected to 24V power source For the input terminals the lower level is effective The current of single path input should not be over 15mA but not less than 5mA http www adtechcn com 20 lt 1 Bicimlendirilmis Kenarl k Altta Kenarlik Yok amp Connection for pulse output signal 1 Differential mode This mode is suitable for the stepping driver and most of the server drivers with independent pulse and direction input It is recommended this mode is used for it provides high anti interference capacity Driver of server motor 2 Single end mode This mode was used for the stepping motors with which the anodes of pulse and direction were connected together in early time Driver of stepping motor Note It is not suitable for stepping motors the cathodes of whose pulse and direction are connected together EXTVCC5 0A or EXTVCC5 0B is not used for other purposes except for the non differential connection method of the driver s p
62. ether the ambient temperature and humidity are conforming and there is too much dust or other foreign objects Daily check Daily Check whether there is abnormal vibration or sound Check whether the vents are jammed by yarns or other objects Troubleshooting Axis X Y Z or A doesn t act 1 Check basic parameter setup to see whether the output mode direction pulses per round and millimeters of axis X Y Z or A are correct 2 Check I O diagnosis of IO detection to see whether axis X Y Z or A has input limit signal If it does check the wiring 3 Check whether the wiring between the motor and driver and the driver and board card are correct and whether drover provide sufficient current to drive the motor If it is a servo system check whether its control mode is correct This software supports position control mode 4 Check whether axis X Y Z or A is overloaded Abnormal sounds heard from axis X Y Z or A 1 Check whether the speed for axis X Y Z or A is set too high Normally when the stepping motor is not loaded the speed should be uniformed as 5 6 r s If it is a servo system the value is slightly higher than this 2 Check whether the current provided by the driver is sufficient or excessively high Graphics generated by the system is not precise in size and has position deviation 1 Check whether there is a clearance or belt s ductility tolerance at axis X Y Z
63. f the endpoint of the arc and I To indicate the coordinates and J as the coordinates of the start point of the arc the relative to circle center To indicate the radius Take X and Y as of the endpoint of the arc and R the coordinates as the radius G03 G3 Reverse arc interpolation G17 G03 X_Y_I_J_d K or G17 G03 _ the circle center Take X and Y as of the endpoint of the arc and I To indicate the coordinates and J as the coordinates of the start point of the arc the relative to circle center To indicate the radius Take X and Y as of the endpoint of the arc and the coordinates as the radius Note can be used in i nterpolation commands for changing the interpolation speed Set time delay after P Delay G04 Delay G04 P_ ms Absolute es G90 90 1 _ _ Mode setting is of mode coordinates Mode commands default as Relative G91 G91 GOIX Z absolute value coordinates Spindle s 2 Turn off reverse rotation M3 positive M3 OUTI 2 start positive rotation rotation Spindle s Turn off positive rotation M4 reserve M4 OUT2 Output start reverse rotation rotation Stop positive and reverse M5 Spindle stops M5 rotation Turn on M8 M8 OUT3 Turn on coolant coolant http www adtechcn com 33 Bicimlendirilmis Kenarlik Altta Kenarlik Yok
64. ffer Drive adt8840a_dec_stop Deceleration stop 47 adt8840a_sudden_stop Sudden stop 47 adt8840a_inp_move2 Dual axis interpolation software buffer 48 adt8840a inp move3 Tri axis interpolation software buffer 48 adt8840a inp move4 Four axis interpolation software buffer 48 adt8840a continue move Continuous motion software buffer 49 ArcComp Arc parameters computation 49 adt8840a arc Arc machining 49 adt8840a read bit Read single input point 50 Switch adt8840a write bit Output single point 50 value adt8840a sudden write bit Output single point software buffer 5 adt8840a read 8bit Continuously read 8 input points status 51 http www adtechcn com 31 Bi imlendirilmi Kenarl k Altta Kenarl k Yok Bi imlendirilmi Kenarl k Altta Kenarl k Yok adt8840a Clear Int Clear interruption mark 51 Enable interruption service for motion adt8840a_Enable_ADT834INT 52 Interrupt control Disable interruption service for motion adt8840a_Disable_ADT834INT 52 control adt8840a_reset_fifo Reset buffer 52 adt8840a_read_fifo Get buffer status 52 1 hardware buffer interpolation adt8840a fifo inp movel 53 software buffer Hardware 2 axis hardware buffer interpolation buffer adt8840a fifo inp move 54 software buffer interpolation 3 axis hardware buffer interpolation adt8840a fifo inp move3 54 software buffer 4 axis hardware buffer interpolation adt8840a
65. first in the exemplified program Return value lt 0 it indicates the initialization failure Return value gt 0 it indicates the successful initialization Public Function Init_Card ByVal devnum As Integer As Integer when response mode is 1 responding to the serial interface reception is enabled when 0 disabled If devnum 0 Then For i 1 MAXAXIS Result adt8840a_set_command_pos devnum 0 i 0 reset logic position counter adt8840a_set_actual_pos devnum 0 i 0 reset actual position counter adt8840a set startv devnum 0 1 1000 set start velocity adt8840a set speed devnum 0 i 2000 set drive velocity adt8840a set acc devnum 0 i 625 set acceleration Next i Init_Card 1 Else Init_Card 1 End If End Function Judge from the parameter whether it is uniform speed or acceleration deceleration Set the start velocity drive velocity and acceleration Parameters axis axis number StartV start velocity Speed drive velocity http www adtechcn com 68 Bi imlendirilmi Kenarl k Altta Kenarl k Yok Add acceleration Return value 0 correct return value 1 error Public Function Setup_Speed ByVal axis As Integer ByVal startv As Long ByVal speed As Long ByVal add As Long As Integer If startv speed gt 0 Then Result adt8840a_set_startv devnum 0 axis startv adt8840a_set_speed devnum 0 axis startv Else Result adt8840a_set_startv devnum
66. hardware buffer commands are downloaded into the control card while the non hardware buffer commands are being executed the hardware buffer commands will also be saved in the software buffer Once all non hardware buffer commands are executed the hardware buffer commands will be saved in the hardware buffer Please note that the hardware buffer commands accumulated in the software buffer should not exceed the capacity of the hardware buffer The immediate execution mode refers to a machining method used when the buffer is closed In this mode the user can only transmit the commands in the way the single command is executed In other words when the control card is executing the motion commands the user must judge at the upper PC whether the current motion is completed Only when the completion of motion is detected can the next command be executed Otherwise the motion state might become confused In addition to the software buffer mode ADT 8840 also provides some interpolation functions with hardware buffer such as adt8840a fifo inp movel adt8840a fifo inp move2 adt8840a fifo inp move3 adt8840a fifo inp move4 Details on interpolation of hardware buffer will be provided in the follow up chapters of this Manual Position management Logic position counter and actual position counter The logic position counter counts the number of pulses based on the positive negative direction output In other words it counts 1
67. hereby declare that X INTEL and PENTIUM are the trademarks of Intel Corporation X WINDOWS and MS DOS are trademarks of Microsoft Corporation X ADT 8840 is the trademark of ADTECH X Marks not mentioned here belong to their respective companies that underwent the registration procedures rights reserved ADTECH SHENZHEN CNC TECHNOLOGY CO LTD http www adtechcn com 1 Bi imlendirilmi Kenarl k Altta Kenarl k Yok Contents Chapter I Overview the Prodcuts i ecccsevereassepecerocesoscenecsrossvereansspusenedabesepedcobesepedeaudsyacenacenesedodsesbersenlusteeviceeneevstecnen EE 1 ESI coUa E 8 e Outer GIMENSIONS costi ie 9 S Operating enyifODTHIeDlE sale sayi Vx epar x RE NUI 10 E Chapter Electric Wiring Illustration and definition for terminals Exevnrsnraupssmijie 20 S Standard USB interface USB rere 21 amp Standard Ethernet interface 45 21 Connection for inp t signal 2 nne a ina acan salya an ia aa aska 21 Connectionforpulseoutputsignal en 22 S Connection for output signal 0 titre riti ite ret
68. http www adtechcn com 108 Bi imlendirilmi Kenarl k Altta Kenarl k Yok m Connection with start shape topology The controlling host and the device are connected to each other via the switch or hub with standard 568A straight through cable In actual practice we recommend you take the related specification of industrial Ethernet as the criterion Device 2 Device 3 Device 4 Device 5 cg ET ei 0 8 rol ri Switch or hub Device 6 Controlling host Other hosts 5 4 Detect IP address and MAC address of all devices through host The IP address and network adapter s address of control card can also be detected through the command arp The detection details are as follows m Click the Start menu gt select Run gt input CMD to open the DOS window gt input arp a command gt press Enter In the displayed items Type and static are the IP address and MAC address of the device registered in the controlling host Check carefully to see whether IP address and MAC address are inconsistent See Figure 12 http www adtechcn com 109 Bicimlendirilmis Kenarlik Altta Kenarlik Yok C Documents Interface Internet 192 168 192 168 192 168 168 168 168 168 2 168 2 168 168 168 168 168 168 168 168 2 168 2 168 2 168 2 168 2 168 2 168 2 168 2 168 2 168 168 2 168 2 168 2 168 168 168 168 2 168
69. ieri rer ERR EORR 59 10 3 ADT8840A 10 4 ADT8840A RUN GFILE 1015 ADTS840A G STATUS sesle ali eres rye v a Ew rae oui eur ovens rab dads exa Ek EAE Tuy ay 10 6 ADT8840A GET GBUFF DEPTH ccsscccesssccesssccesssecsscecesseeeesseeeceeeecessescnseceeseseceseecesseeeeses 60 Chapter VI Making Use of Functions In Motion Control Library 62 1 Overview of ADT 8840Functionlibrary een 62 2 Use of dynamic link library under Windows environment sse 62 3 Help for commissioning in development of application 4 Average of execution time of function command sss Chapter VII Major Points on Development of Motion Control Card 63 RP Anti ali Zati Gm tes 63 7 DES SOU Sy E 63 Signals of STOP Qand STOP 1 65 Chapter Examples of programming for development of motion control card 66 lt 1 VB programming lt 2 VC programming Chapter IX Network configuration and interface commissioning SD OV CRVIEW E 2 Network environment and host s configuration esee 3 Search or perform network configurationthroughserialinterface
70. imlendirilmi Kenarl k Altta Kenarlik Yok 1 55 2 FB http www mcuSi com Emaik meuss rsaen gnmixl HA RAE o AGS 1 PIHE MAM S R 192 168 0 123 2 FEBRE HAMSA 255 255 255 0 3 RU MAM S R C 192 188 0 1 PEKMEZ HAMSA D O0 AB CD 00 01 23 5 RTEPIERBOR MAS E 0000 b EWR RE F 0000 j FIR AS EXPE FSO RRO ir 04 com z 5m WWW MCUS1 COM FE ADISA GAP WES T RLER setae 1000 mik f map mE V t TRHBMASE 000004 jwww meu51 com s 19 R 1867 COME 115200bps 81 CTS 0 DSR 0 RLSD 0 Figure 3 Figure 3 shows there are six commands for network configuration the top four of which provide the format of the command and indicate the command characters are associated with the content of configuration If the format of input command has error the error will be prompted in the screen If the input command is correct what is entered will be displayed again as shown in Figure 4 Before network configuration is saved the user must ensure IP address adder mask gateway IP and network adapter address have been correctly set Otherwise the system will prompt the related item has not been configured as shown in Figure 5 http www adtechcn com 101 li 2 EF EMET T EN http Tm mcu51 com
71. ion abnormity 4 disabled device interface Note The parameters can only be saved in fixed speed mode To restore the default network configuration use the function adt8840a FS Remove delete the system ini files and then re electrify the system 9 9 adt8840a go home Name int adt8840a go home int dev numHOMEMODE home para Definition Function for returning to home position Input parameter int dev num device number HOMEMODE home para structure of parameter for returning to the home position Output parameter None Return value 0 execution OK 1 transmission abnormity 4 disabled device interface Note None http www adtechcn com 57 Bi imlendirilmi Kenarl k Altta Kenarl k Yok 9 10 adt8840a stop all Name int adt8840a stop all int dev num Definition Function for returning to home position Input parameter int dev num device number Output None parameter Return value 0 execution OK 1 transmission abnormity 4 disabled device interface Note None http www adtechcn com 58 10 G code 10 1 adt8840a download gfile Bicimlendirilmis Kenarlik Altta Kenarlik Yok Name int adt8840a upload gfile int dev num Definition Download G code program dot from local PC to control card Input parameter int dev num device number Out
72. ion time of function command If the control card provides no execution results the average execution time of function commands will be 2 5 ms If it does 4 ms These time values are only used for reference and the actual execution time should be subject to the host and running state of the network When real time control is under way as many unrelated applications as possible in the host should be closed so as to ensure the stability of response Chapter VII Major Points on Developing Motion Control Card Some problems may arise in programming with this control card However most of the problems are caused by the incorrect understanding of the working principle of the card In the part below are situations users often come cross and the related explanations nitialization of card At the very beginning the program runs the user should initialize the device address through the function DeviceAddr init and then detect the network connection through TCP_Conn to see whether the connection of ADT8840 is conforming A device number will be returned once the connection is successful After that the user should set the pulse output mode and work mode of limit switch in accordance with the situation of the machine The function DeviceAddr_init should be used only when the application is about to http www adtechcn com 63 be initialized After the initialization is completed the all network resources should be release
73. ity 2 response overtime 3 abnormal data received 4 disabled device interface Note For the scope of input points and the related functions please refer to the corresponding operating instructions of controller s hardware 6 2 6 2 adt8840a write bit Name int adt8840a write bit int dev num int number int value Definition Output single point executed in line in software buffer Input parameter dev num device number number output point number Value 0 low 1 high Output parameter None Return value 0 execution OK 1 transmission abnormity 4 disabled device interface Note For the scope of output points and the related functions please refer to the corresponding operating instructions of controller s hardware 6 3 adt8840a sudden write bit Name int adt8840a sudden write bit int dev num int number int value Definition Output single point executed immediately Input parameter dev num device number number output point number Value 0 low 1 high Output parameter None Return value 0 execution OK 1 transmission abnormity 4 disabled device interface Note For the scope of output points and the related functions please refer to the corresponding operating instructions of control card s hardware http www adtechcn com 50 Bi imlendirilmi Kenarl k
74. l functions such as speed setting function single axis motion function and interpolation motion function 4 The codes of the header file CtrlCard h are decribed as follows ifndef ADT8840 CARD define _ ADT8840 CARD sioe spese spore pote kak kaka motion control module LLLLLLLLLLLLLLLLLLLLLLII To quickly develop application system with high usability expansibility and maintainability we have packaged all library functions by referring to the type on the basis of the function library of the control card The following example only involves one motion control card define MAXAXIS 4 max number of axes class CCtrlCard public int Setup_HardStop int value int logic int Setup_Stop1Mode int axis int value int logic int Setup_StopOMode int axis int value int logic http www adtechcn com 80 Bi imlendirilmi Kenarl k Altta Kenarl k Yok int Setup_LimitMode int axis int valuel int value2 int logic int Setup PulseMode int axis int value int Setup Pos int axis long pos int mode int Write Output int number int value int Read Input int number int amp value int Get CurrentInf int axis long amp LogPos long amp ActPos long amp Speed int Get Status int axis int amp value int mode int StopRun int axis int mode int Interp Move4 long valuel long value2 long value3 long value4 int Interp_Move3 int axis1 int axis2 int axis3 long valuel long
75. lses Therefore even when the number of output pulse is smaller than one half of that of output pulses the motion will be within the Set speed domain http www adtechcn com 25 lt 1 Bicimlendirilmis Kenarl k Altta Kenarlik Yok Velocity inicia E 2 Acceleration stops P Number of output pulses Pa Number of pulses consumed Pd during acceleration Time Triangle prevention for linear acceleration and deceleration Speed mode The speed mode of ADT 8840 falls into two categories namely self define mode and set speed mode The former is the default value in the system while the latter can be set through the function adt8840a set speed mode at the upper PC The self define mode means the user can set the function and change the motion velocity SV and acceleration through the motion parameters In this mode the data can be changed at any time and will not be saved in the system configuration files of ADT 8840 The unit of velocity parameters in this mode can be either pulse or To s reacl millimeter speed in millimeter is a figure converted on the basis of the equivalent pulses The default pulse equivalent of the four axes is 320p mm The set speed mode means the user can set the speed mode as a fixed value through the function adt8840a set speed mode after the operation velocity parameters are properly set The set velocity parameter
76. lue2 0 negative limit enabled 1 negative limit disabled Logic 0 low level enabled 1 high level enabled Default values positive limit enabled negative limit enabled low level enabled int CCtrlCard Setup_LimitMode int axis int valuel int value2 int logic Result adt8840a_set_limit_mode devnum axis valuel value2 logic http www adtechcn com 86 Bicimlendirilmis Kenarlik Altta Kenarlik Yok return Result oe Hg EF A HE ACK a mode of stop0 signal This function is used to set the mode of stopO signal Parameters axis axis number Value 0 disabled 1 enabled Logic 0 low level enabled 1 high level enabled Default values disabled Return value 0 correct return value 1 error int CCtrlCard Setup_StopOMode int axis int value int logic Result adt8840a_set_stopO_mode devnum 0 axis value return Result mode of stopl signal LLLLLLLLLLLLLLLLIILI LI This function is used to set the mode of stopl signal Parameters axis axis number Value 0 disabled enabled Logic 0 low level enabled I high level enabled Default values disabled Return value 0 correct return value 1 error int CCtrlCard Setup_Stop1Mode int axis int value int logic Result adt8840a_set_stop1_mode devnum 0 axis value logic return Result ever function for continuous drive of single kkk This f
77. n function for outputting single point signal eee This function is used to output single point single Parameters number output point 0 21 Value 0 low level 1 high level Return value 0 correct return value 1 error Public Function Write Output By Val number As Integer ByVal value As Integer As Integer Write Output adt8840a write bit devnum 0 number value End Function http www adtechcn com 72 EEA lee ERAT alse Output mode fefe es Ol EE EERE AE This function is used to set the work mode of pulse Parameters axis axis number value pulse s work mode 0 pulsetpulse mode 1 pulse direction mode Return value 0 correct return value 1 error Default pulse s work mode pulse direction mode This program employs the positive logic pulse and positive logic for direction output signals which are the default values LLLLLLLLLLLLLLLLLLLLLLLLLLLELLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLL Public Function Setup PulseMode ByVal axis As Integer ByVal value As Integer As Integer Setup PulseMode adt8840a set pulse mode devnum 0 axis value 0 0 End Function lek R eg gi Imt simal mode ek ION This function is used to set the mode of limit inputting nLMT from positive negative direction Parameters axis axis number Value1 0 positive limit enabled 1 positive limit disabled Value2
78. narl k Yok 7 Debugging and observing program running through serial interface ADT 8840 provides methods to help developers debug program through observation of the information on running After serial interface 0 is connected to PC run the serial interface debugging software SSCOM32 EXE Then the user can open or close the corresponding debugging information through the function Uart_show int dev_num unsigned int on off in the application The definitions of the related values are as follows on_off 0 close debugging information on off l display all debugging information on_off 2 only display non timed inquiry information Chapter X Precautions and Troubleshooting Precautions For your safety 1 Never attempt to open the machine shell without permission 2 Cut off the power to the control card if it will not be used for an extended period of time 3 Keep the control card away from dust and iron powder Instructions Improper use of the control card can lead to malfunction or even cause damage to it Please follow the instructions below when you use the control card 1 If the output relay is a non solid one the user must install a follow current diode in a parallel way on the coil Check whether the power supply for each part is conforming so as to prevent the control card from being damaged by nonconforming power source 2 The service life of the control card is subject to the ambient temperature
79. ncluded angle of start point cen 4 radius cen 5 arcing angle Return value 0 arc computation OK 1 arc computation failure http www adtechcn com 48 Bi imlendirilmi Kenarl k Altta Kenarl k Yok Note The coordinates of any three points in the plane can t be on the same point or line 5 12 adt8840a arc Name int adt8840a arc int dev_num int 1 int axis2 float cen Definition Arc machining parameter Input parameter int dev_num device number int 1 plane axis 1 int axis2 plane axis 2 float cen arc s parameter structure cen 0 coordinate X of center of circle cen 1 coordinate Y of center of circle cen 2 included angle of endpoint cen 3 included angle of start point cen 4 radius cen 5 arcing angle Output parameter None Return value 0 arc computation OK 1 arc computation failure Note None http www adtechcn com 49 6 Input and output of switch value 6 1 adt8840a read bit Bi imlendirilmi Kenarl k Altta Kenarl k Yok Name int adt8840a read bit int dev num int number int value Definition Read single input point Input parameter dev num device number number input point number Output parameter Value 0 low 1 high Return value 0 execution OK 1 execution failure 1 transmission abnorm
80. nformation on motion and at the same time prevent the system from sending new drive commands during the drive process The monitoring module performs its functions through the timer whose codes are described as follows Private Sub Timerl Timer Dim nLogPos As Long logic position Dim nActPos As Long actual position Dim nSpeed As Long running speed Dim nStatus 4 As Long drive status of axis Dim value As Integer status Fori 1To4 Get_CurrentInf i nLogPos nActPos nSpeed m_nLogPos i 1 Caption nLogPos m nActPos i 1 Caption nActPos m_nRunSpeed i 1 Caption nSpeed Get MovesStatus 1 nStatus i 1 0 detect limit signal and stopO signal http www adtechcn com 78 Bi imlendirilmi Kenarl k Altta Kenarl k Yok Read_Input i 1 2 4 value If value 0 Then m_bPLimit i 1 value 1 Else m_bPLimit i 1 value 0 End If detect positive limit XLMT 5 YLMT 7 ZLMT 9 WLMT 11 Read Input 1 1 2 5 value If value 0 Then m bNLimit i 1 value 1 Else m bNLimit i 1 value 0 End If detect stop 0 XSTOPO 0 YSTOPO 1 ZSTOPO 2 WSTOPO 3 Read Input i 1 value If value 0 Then m bStopO i 1 value 1 Else m bStopO i 1 value 0 End If detect stop 0 XSTOPI 38 YSTOPI 39 ZSTOPI 40 WSTOPI 41 Read Input i 37 value If value 0 Then m bStopl i 1 value 1 Else m bStopl i 1 value 0 End If Next i If nStatu
81. nput signal can be used as server full capacity and other functions 7 XECZ IN38 Phase Z s input for axis X s encoder 8 XECZ IN38 Phase Z s input for axis X s encoder 9 EXT_VCCA Driver used for single end input 10 24V 24V power output to server 11 24VGND 24V power output to server 12 XECA IN42 Phase A s input for axis X s encoder 13 XECA IN42 Phase A s input for axis X s encoder 14 XECB IN43 Phase B s input for axis X s encoder 15 XECB IN43 Phase B s input for axis X s encoder 4 5 Definition of axis Y s port axis Y s pulse and direction http www adtechcn com JCP2 c o gt gt Y PU o gt gt YPU o YDR o gt Y DR o lt Y ALARM o gt gt OUT19 o lt YECZ lt YECZ DB15 15 pin female jack same as lathe and milling machine Bicimlendirilmis Kenarlik Altta Kenarlik Yok Line No Name Definition 1 YPU Axis Y s pulse signal 2 YPU Axis Y s pulse signal 3 YDR Axis Y s direction signal 4 YDR Axis Y s direction signal 5 YALARM IN35 Regular input signal can be used as server alarm input of axis Y Regular input signal can be used as server full capacity and other 6 OUTI9 functions 7 YECZ IN39 Phase Z s input for axis Y s encoder 8 YECZ IN39 Phase Z s input for axis Y s encoder 9 EYT_VCCA Driver used for single end input 10 24V 24V po
82. nterface Note None 4 6 adt8840a all speed Name int adt8840a all speed int dev num long speed Definition Get the drive velocities of four axes Input parameter int dev num device number Output long pos receive the drive velocities of four axes parameter 0 execution OK 1 execution failure 1 transmission abnormity 2 response overtime Return value mE 3 abnormal data received 4 disabled device interface Note None http www adtechcn com 44 Bi imlendirilmi Kenarl k Altta Kenarl k Yok 5 Drive 5 1 adt8840a pmove Name int adt8840a_pmove int dev num int axis long pulse Definition Preset drive dev num device number axis axis number 1 4 pulse Output pulses Input parameter 2 gt 0 Positive direction movement lt 0 Negative direction movement Scope 268435455 268435455 Output None parameter Return value 0 execution OK 1 transmission abnormity 4 disabled device interface The parameters needed by the velocity curve must be set before the drive command is Note written 5 2 adt8840a pmoveX Name int adt8840a_pmove2 int dev_num int axis1 int axis2 long pulsel long pulse2 Definition Preset drive dev_num device number int axis axis number engaged in interpolation Input parameter int axis2 axis number engaged in interpolation long pulsel rel
83. ntrol card is connected to the host via the crossover cable the user can also modify the IP address of the host to accommodate host to the control card http www adtechcn com 107 lt 7 Bi imlendirilmi Kenarl k Altta Kenarl k Yok 5 Network connection and troubleshooting 5 1 Initialization of application In the start up process of the host s application the function DeviceAddr init must be used to initialize the interfaces of the devices which number 63 maximally When initialization is completed the function Close all should be used to close the application and release all connections and resources 5 2 Connection of control card In preparing the connection of the control card the application of the host must provide the two parameters namely the IP address of the control card and the MAC address to the function TCP Conn char ip addr char mac addr int err If the connection is successful TCP Conn will return a device number 0 63 If not it returns 1 int err is used to receive the returned results of some continuous operations The function Conn binds the device s IP address and MAC together so as to improve the anti virus performance of the system 5 3 Network topology m Point to point interconnection The host of the control card and the device are connected to each other through standard 568B crossover cable Controlling host Device 1
84. o 23 S Connection for communication signal eee 23 Chapter Features eese 000 eee eere asse sense ttn seen 24 7 Preset lc M cass 24 E 25 adduci 25 S Set speed drive Aaaa sl SERE RUE RUE 25 5 Speed mode 8 Buffer mode Position MAN ACCME aroen va Ger rrr ete i e e rr rti e e Hn si e Mnt 28 El loire nore ET Pulse output mode Hardware Ls 31 Signal corresponding to Server 31 Drive by extermall signal coconut mise peto ne aza li lee Chapter IV Basic Library Functions of ADT8840 eeeeeeeeeeeeeeeeeeee Chapter V Definitions of Functions in ADT8840 s Basic Library 1 Basic parameters Setup iieri rint erre iir E Ree er din D EVICBADDR INIT 1 2 beet te e ERE etes RR Cd KR SER RK 1 3 CLOSE NETCONN Yazsin sanada E Pe geye ERA IE a a UO EE tances EGRE TEE E LES AES DEO IE ELA KS GET SOCK QC 1 6 UART SHOW 1 7 ADT8840A_SET_STOPO_MODEC 1 8 8840 SET STOP MODK eee 1 9 ADT8840A SET LIM
85. ode 0 OK 1 existing connection 2 exceed the max connection number Return value Successful use of device No 0 63 1 use failure Note Network connection should be performed before the motion function is used 1 3 Close netconn Name void Close netconn int dev num Definition Close network connection Input parameter dev num device number Output None parameter Return value None 1 4 Close all Name void Close all void Definition Close network connection and resources Input parameter None http www adtechcn com 36 Bi imlendirilmi Kenarl k Altta Kenarl k Yok Output None parameter Return value None 1 5 Get sock Name unsigned int Get sock int dev num Definition Get the raw socket for network communication based on the device number Input parameter dev num device number Output parameter None Return value Non zero SOCKET value Oxffffffff means the device number is disabled 1 6 Uart show Name int Uart_show int dev num unsigned int on off Definition Switch for showing the debugging state of serial interface Input parameter dev num device number on off switch for showing the debugging state of serial interface 0 off 1 display all information 2 Only display the non timed inq
86. on ri TUUULM Minor axis we l TL TL TL T1 TL TL Tl Tl Major axis YP Example of drive pulse output at the endpoint X 20 Y 9 As shown in the figure above within the whole interpolation scope the position precision for the designated line is 0 5LSB The figure also shows the example of drive pulse output for linear interpolation Among the set values of endpoint the one with the greatest absolute value comes from the major axis which keeps outputting pulse during the interpolation drive while others are minor axes Depending on the results of interpolation arithmetic sometimes the pulses are output sometimes not http www adtechcn com 28 Bi imlendirilmi Kenarl k Altta Kenarl k Yok Hardware buffer interpolation As for the control card without the hardware interpolation function if the next interpolation is needed after the previous one is ended it can only inquire whether the previous interpolation is finished so that the next data of the next interpolation can be output If the upper PC runs slowly or a multipurpose operating system runs in the upper computer there will be pause between the two interpolations which not only affects the effects of interpolation but also makes it hard to raise the interpolation speed With the hardware buffer interpolation in ADT 8840 this problem can be properly solved for a great number of interpolation commands can be continuously saved in th
87. on is used to stop running including immediate stop and stop by deceleration Parameters axis axis number mode 0 immediate stop 1 stop by deceleration http www adtechcn com 70 Bi imlendirilmi Kenarl k Altta Kenarl k Yok Return value 0 correct return value 1 error Public Function StopRun ByVal axis As Integer ByVal mode As Integer As Integer If mode 0 Then Result adt8840a_sudden_stop devnum axis Else Result adt8840a_dec_stop devnum axis End If End Function Vk se spoke k kk KEKE KA CtION for position Setting FFE RE REEE ER EEEE This function is used to set the logic position and actual position Parameters axis axis number pos position value Mode set logic position 1 set actual position Return value 0 correct return value 1 error Public Function Setup_Pos ByVal axis As Integer ByVal pos As Long ByVal mode As Integer As Integer If mode 0 Then Result adt8840a_set_command_pos devnum 0 axis pos Else Result adt8840a_set_actual_pos devnum 0 axis pos End If End Function EERE EREE ii current information on 66653065 This function is used to get the current information on logic position actual position and running speed Parameters axis axis number logps ligic position i Actpos actual position speed running speed Return value 0 correct return value 1 error Public Function Get_CurrentInf ByVal axis As Integer LogPos As Long actpo
88. ontrol of motor speed is needed Velocity curve The drive pulses of each axis are output through the preset drive commands with positive negative direction or through the continuous drive commands And the velocity curves of preset speed linear acceleration deceleration and S shape acceleration deceleration can be generated through mode or parameter setting Set speed drive Set speed drive means drive pulses are output with an unchanged speed If the set drive velocity is lower than the start velocity there will be no acceleration deceleration drive but set speed drive When signals for home position search encoder s phase Z and the like are used if the system needs to stop immediately after the signal is found the system can perform set speed drive at a low velocity value from the very beginning without the need of acceleration deceleration drive To perform Set speed drive the following parameters should be set Range e Start velocity SV Drive velocity V Velocity SV o Re Time Set speed drive http www adtechcn com 24 Bi imlendirilmi Kenarl k Altta Kenarl k Yok lt 1 Bicimlendirilmis Kenarl k Altta Kenarlik Yok Linear acceleration deceleration drive Linear acceleration deceleration drive means the system accelerate to the set drive velocity from start velocity in a linear fashion In Set speed mode the a
89. ork connection and resources 37 Get the raw socket for network Get_sock 38 communication Switch for showing the debugging state Uart_show 38 of serial interface adt8840a_set_stop0_mode Stop mode software buffer 38 adt8840a_set_stop1_mode Stop mode software buffer 39 adt8840a_set_limit_mode Limit mode 39 adt8840a_set_pulse_mode Pulse mode 39 adt8840a_get_status Get single axis drive status 40 Drive status 2 adt8840a_get_inp_status Get interpolation drive status 41 detection adt8840a_get_int_status Get interruption status 41 adt8840a_set_acc Set acceleration software buffer 41 Motion adt8840a_set_startv Set start velocity software buffer 42 parameters adt8840a_set_speed Set drive velocity software buffer 42 setup adt8840a_set_command_pos Set logic counter software buffer 43 adt8840a_set_actual_pos Set actual counter software buffer 43 adt8840a_get_command_pos Get logic position 43 adt8840a_get_actual_pos Get actual position 44 Motion adt8840a_get_speed Get drive velocity 44 parameters adt8840a all command pos Get logic positions of four axes 44 detection adt8840a all actual pos Get actual positions of four axes 45 adt8840a all speed Get drive velocities of four axes 45 Single axis preset drive software adt8840a pmove 45 buffer Dual axis interactive drive software adt8840a_pmove2 46 buffer Tri axis interactive drive software adt8840a pmove3 46 buffer Fourl axis interactive drive software adt8840a pmove4 47 bu
90. ormal data received 4 disabled device interface http www adtechcn com 43 Bi imlendirilmi Kenarl k Altta Kenarl k Yok The unit of the parameter is the same as set value of drive velocity V Note With this function the drive velocity can be obtained at any time 4 4 adt8840a all command pos Name int adt8840a all command pos int dev num long pos Definition Get the logic positions of four axes Input parameter int dev num device number Output long pos receive the data of logic position for each axis pos 0 position of axis 1 parameter pos 1 position of axis 2 pos 2 position of axis 3 pos 3 position of axis 0 execution OK 1 execution failure 1 transmission abnormity 2 response overtime Return value be 3 abnormal data received 4 disabled device interface Note None 4 5 adt8840a all actual pos Name int adt8840a all actual pos int dev num long pos Definition Get the actual positions of four axes Input parameter int dev num device number Output long pos receive the data of actual position for each axis o pos 0 position of axis 1 parameter pos 1 position of axis 2 pos 2 position of axis 3 pos 3 position of axis 0 execution OK 1 execution failure 1 transmission abnormity 2 response overtime Return value 3 abnormal data received 4 disabled device i
91. oupler isolation control provides high interference resistance RS232 15 static protection Prompting buzzer hardware programmed as function library to facilitate development amp Specification Input of switch value Channel 32 full optical coupler separation Input voltage 5 24V High level gt 4 5V Low level lt 1 0V Isolation voltage 2500V DC Delay time for optical coupler input not over 0 1ms Counting input Channel 4AB phase encoding input full optical coupler isolation reuse with 8 input switch values Max counting frequency 2MHz http www adtechcn com 6 lt 1 Bicimlendirilmis Kenarl k Altta Kenarlik Yok Input voltage 5 24V High level gt 4 5V Low level 1 0V Isolation voltage 2500V DC Pulse output Channel 4 axis pulse 4 axis direction full optical coupler isolation Max pulse frequency 2MHz Output type 5V differential output Output mode pulse direction or pulse pulse Output of switch value Channel 18 full optical coupler separation Output type NPN collector open circuit 5 24 VDC rated current 0 5A with max current of 1 A for single path RS 232 communication rate bps 115200 Outer dimensions 110 0 i At d i 122 5 http www adtechcn com 7 Bi imlendirilmi Kenarl k Altta Kenarlik Yok Operating environment Power supply DC 24V
92. pectedly entering the test mode a situation caused by the serial interface interference When the system closes the test configuration mode if the user needs to access the test configuration mode again the control card should be electrified again after powered off Figure 2 shows the two commands used for test configuration http www adtechcn com 99 Bi imlendirilmi Kenarl k Altta Kenarl k Yok lt Bi imlendirilmi Kenarl k Altta Kenarlik Yok sscom3 2 EH EMET T FWhttp www mcuSi com Emaik nci ZENG RS FEIE Bi x TS FERE RENE AMD MORSE PATLAR SAA MERS BabA M ACER ARS t 1 iA 000004 2 jE Wace Ame 000006 3 31783086 AS REO RRO ir ABO a WWW MCUS1 COM VE DTR mz ADNS GFA SEF zir 00 mek ER Veee mih omas M eki ean None FERAE 000004 jwww meu5 1 com sit 781 comes 115200bps 8 1 5 0 DSR ORLSD 0 Figure 2 After the user enters the command 000004 in the test configuration interface and click Send or Enter the system will enter the state of network configuration for the control card The actual command related to the network configuration appears on the screen again as shown in Figure 3 http www adtechcn com 100 lt Bi
93. put parameter None Return value 0 execution OK 1 transmission abnormity 4 disabled device interface Note None 10 2 adt8840a upload gfile Name int adt8840a upload gfile int dev num char g code int code len Definition Open and upload G code program files in control card Input parameter int dev num device number char g code G code proram int code len length of G code proram Output parameter None Return value 0 execution OK 1 transmission abnormity 4 disabled device interface Note None 10 3 adt8840a code Name int adt8840a g code int dev num char G code Definition Send single G code command Input parameter int dev num device number char G code character string of G code command Output parameter None Return value 0 execution OK 1 transmission abnormity 4 disabled device interface Note None 10 4 adt8840a run gfile Name int adt8840a run gfile int dev num http www adtechcn com 59 Bi imlendirilmi Kenarl k Altta Kenarl k Yok Definition Run G code files in control card for machining Input parameter intdev num device number Output None parameter Return value 0 execution OK 1 transmission abnormity 4 disabled device interface Note None 10 5 adt8840a stat
94. put parameter Value pointer of interpolation status 0 interpolation end non 0 interpolation under way Return value 0 execution OK 1 execution failure 1 transmission abnormity 2 response overtime 3 abnormal data received 4 disabled device interface Note None http www adtechcn com 39 2 3 adt8840a get int status Bi imlendirilmi Kenarl k Altta Kenarl k Yok Name int adt8840a get int status int dev num int value Definition Get interruption status Input parameter None Output parameter Value pointer of interruption status 0 interruption end non 0 interruption under way Return value 0 execution OK 1 execution failure 1 transmission abnormity 2 response overtime 3 abnormal data received 4 disabled device interface Note None 3 Motion parameters setup 3 1 adt8840a set acc Name int adt8840a set acc int dev num int axis int Value Definition Set acceleration Input parameter dev num device number axis axis number 1 4 Value A s value 1 32000 Output parameter None Return value 0 execution OK 1 transmission abnormity 4 disabled device interface Note Parameters for linear acceleration and deceleration in linear acceleration drive When acceleration is set as A the following equation is used Acceleration PPS S
95. ram language tools commonly used under the environment such as VB and VC 2 1 Use from VC 1 Create a new project 2 Copy the file 8840 lib and adt8840 h under development kit VC in the disk to the path of the newly created project 3 Correct click file view in the work space of the newly created project and select Add Files to Project In the dialogue box of inserted file select Library Files lib as file type search out 8840 lib and select it then click to complete the loading of static library 4 Add include adt8840 h to the declaration part of the source program file header file or global header file StdAfx h After the above four steps the user can use the functions in the dynamic link library Note Use in VC NET is similar to that of VC 2 2 Use in VB 1 Create a new project 2 Copy the file adt8840 bas under development kit VB in the disk to the path of the newly created project 3 Select the menu command project add module select the tab page save now in the dialogue box search out the module file adt8840 bas and click the button for opening http www adtechcn com 61 Bi imlendirilmi Kenarl k Altta Kenarl k Yok lt 1 Bicimlendirilmis Kenarl k Altta Kenarlik Yok After the above three steps the user can use the functions in the dynamic link library for the progam
96. rom DR CCW when negative In 1 pulse output mode drive pulses are output from PU CW and direction signals are output from DR CCW When positive logic setting is available for pulse direction Bi imlendirilmi Kenarl k Altta Kenarl k Yok Wave shape of output signal Pulse output mode Drive direction PU CW Signal DR CCW Signal Independent 2 pulse direction drive output m Low Level output mode direction drive output Low Level sc direction drive output Low Level 1 pulse output mode direction drive output High Level http www adtechcn com 29 Bi imlendirilmi Kenarl k Altta Kenarl k Yok Hardware limit signal The hardware limit signal LMT LMT serves as the input signal that limits the drive pulse of both positive and negative direction drives When the limit signal and its logic level are both enabled the motion of the concerning axis will stop immediately Signal corresponding to server motor Input signals connected to the driver of the servo motor include INPOS in position signal and ALARM alarm signal For each signal the enabled state disabled state and the logic level can be set The input signal INPOS corresponds to the signal that indicates the positioning the server motor is completed If it is set as enabled after one drive is finished the system will wait for the enabled state of INPOS and then the ret
97. rp Move2 ByVal axisl As Integer ByVal axis2 As Integer ByVal pulsel As Long ByVal pulse2 As Long As Integer Result adt8840a inp move2 devnum 0 axisl axis2 pulsel pulse2 Interp Move2 Result End Function function for interpolation of any three axes This function is used to drive any three axes for interpolation Parameters 1 axis2 axis3 axis number engaged in the interpolation pulsel pulse2 pulse3 number of output pulses of the corresponding axis Return value 0 correct return value 1 error Public Function Interp Move3 ByVal axis As Integer ByVal axis2 As Integer ByVal axis3 As Integer ByVal pulsel As Long ByVal pulse2 As Long ByVal pulse3 As Long As Integer Result adt8840a inp move3 devnum 0 axisl axis2 axis3 pulsel pulse2 pulse3 Interp Move3 Result End Function Voi oi 2s ok 2s 2 2k kk EEK ACTION for interpolation of four UX ESE 06 k kkk k This function is used to drive the four axes XYZW for interpolation Parameters pulsel pulse2 pulse3 number of output pulses of the corresponding axis Return value 0 correct return value 1 error Public Function Interp_Move4 ByVal pulsel As Long ByVal pulse2 As Long ByVal pulse3 As Long ByVal pulse4 As Long As Integer Result adt8840a_inp_move4 devnum 0 pulsel pulse2 pulse3 pulse4 Interp Move4 Result End Function ok ok ok KEKE function for stopping ruining E EERE Ek EEA EERE kk This functi
98. s will be saved in system configuration files of ADT 8840 and used as correct and fixed data on motion for some other machining operations In set speed mode the functions for setting the motion parameters will be disabled except the G code and the follow up velocity in the interpolation commands of hardware buffer Buffer mode In upper PC the software buffer machining mode or immediate execution mode can be activated through the function adt8840a set buff mode The software buffer machining mode means the user can save the motion commands or IO operation commands in the buffer of ADT 8840 with which ADT 8840 can also transmit the commands during the motion in a real time manner This mode can ensure the continuity of machining With 512 commands on machining at maximum the buffer works in such a way that the commands in it flows on a first in first out basis In other words the executed commands will be deleted from the buffer and the remaining space is added by 1 after the deletion When the user http www adtechcn com 26 lt 1 Bicimlendirilmis Kenarl k Altta Kenarlik Yok downloads the commands from the buffer by batches it must know the remaining space in the buffer through the query command adt8840a get buff depth so as to avoid the overflow of software cache In this mode only when the current command is fully executed can the next command be executed When this mode is enabled if any
99. s 0 0 And nStatus 1 0 And nStatus 2 0 And nStatus 3 0 Then axis drive under way AxisPmove Enabled True InterpMove Enabled True BaseparaSet Enabled True ClearPos Enabled True AxisCmove Enabled True Else exis s drive end AxisPmove Enabled False InterpMove Enabled False BaseparaSet Enabled False ClearPos Enabled False AxisCmove Enabled False End If End Sub http www adtechcn com 79 Bi imlendirilmi Kenarl k Altta Kenarl k Yok 1 5 Stop module The stop module is mainly used to control sudden events during the drive process that require immediate stop of all axes motions The codes of stop module are provided at the button CmdStop where they can be accessed by clicking The codes are described as follows Private Sub Stop Click Fori 1To4 StopRun i 0 Next i End Sub amp 2 programming 2 1 Preparation 1 Create a new project and save it as VCExample dsw 2 By referring to the method mentioned earlier add static library 8840 lib to the project 2 2 Motion control module 1 Add a new category to the project for which the header file can be saved as CtrlCard h and source file as CtrlCard cpp 2 First self define the initialization functions of the control card in this module and initialize the library functions that need to be packaged into the initialization functions 3 Keep self defining other related motion contro
100. s As Long speed As Long As Integer Result adt8840a_get_command_pos devnum axis LogPos adt8840a_get_actual_pos devnum axis actpos adt8840a_get_speed devnum axis speed Get_CurrentInf Result http www adtechcn com 71 Bi imlendirilmi Kenarl k Altta Kenarl k Yok lt 1 Bicimlendirilmis Kenarl k Altta Kenarlik Yok End Function k function for getting to know the motion Status eH ae oe This function is used to get to know the drive status and interpolation status of each axis Parameters axis axis number value status 0 drive end non 0 drive under way Mode 0 get to know the drive status of single axis non 0 get to know the drive status of interpolation Return value 0 correct return value 1 error Public Function Get MoveStatus By Val axis As Integer value As Long ByVal mode As Integer As Integer If mode 0 Then GetMove Status adt8840a get status devnum axis value Else GetMove Status adt8840a get inp status devnum value End If End Function BEEE oe k 2k k k input Ol AES ERELER ERE EERE HERR EEE EEE This function is used to read the single input point Parameters number input point 0 49 Return value 0 low level 1 high level 1 error Public Function Read Input ByVal number As Integer value As Integer As Integer Read Input adt8840a read bit devnum number value End Functio
101. s eios ve essa tori es 52 8 3 8840 INP MOVEL essa sen 52 8 4 8840 FIFOINP MOVE20 een 53 8 5 8840 FIFO INP MOVB30 een 53 http www adtechcn com 3 Bi imlendirilmi Kenarl k Altta Kenarl k Yok 8 6 8840 FIFO MOVE4 eee 54 56 9 1 ADT8840A FS REMOVR ccs scccsssccsssssesesersssecesssesecesscessssteeesseeesssesesesesesanencetsessseseseseeessees 35 0 2 NDTG840A INET SSETUP Yedek eve a lal lal aa yle a 55 9 3 ADT8840A_SET SPEED MODEL i oyeserees sesxevsteseteNie e sese tede esesebetevo Veetebetete ege devono ieu ge deus 39 9 4 ADT8840A_SET_BUFF_MODE 9 5 ADT8840A_SET_PULSEMM sssccssssscessssesssssecsecsssesesssssesenseesensseecssesenssesenseeeseesesenssesesssenaees 9 6 ADT8840A2GET PULSEMM n RA r A EIAS ETEO EET TI E eN 9 7 ADT8840A_UPLOAD_SYSFILE 9 8 ADT8840A_DOWNLOAD_SYSFILE erener 5 0 0 SADISSAYA GO HOMEB ie es ederse t xr reu a re y v ra re e Ba ese vana Ru 8 0 10 ADTSS840A STOP A ESEE 58 OG Code ien Ie ame emi ol Eg 60 10 1 ADT8840A DOWNLOAD GFILE eee 59 10 2 ADTS840A UPEOAD GEILE saian rer
102. s travels Output parameter None Return value 0 execution OK 1 transmission abnormity 4 disabled device interface Note i The interpolation speed is based on the axis X s speed ii At present the four axis interpolation is performed through the fixed axis l 2 3 and axis 4 5 10 adt8840a continue move Name int adt8840a continue move int dev num int axis int dir Definition Single axis continuous motion Input parameter dev num device number axis axis number 1 4 dir motion direction Output parameter None Return value 0 execution OK 1 transmission abnormity 4 disabled device interface Note The parameters needed by the velocity curve must be set before the drive command is written 5 11 ArcComp Name BOOL ArcComp Definition Arc parameters computation Input parameter double fix Coordinates of any three point in the plane fix 0 coordinate of endpoint on axis X fix 1 coordinate of endpoint on axis Y fix 2 coordinate of midpoint on axis X fix 3 coordinate of midpoint on axis Y fix 4 coordinate of start point on axis X fix 5 coordinate of start point on axis Y Output parameter float cen arc s parameter structure cen 0 coordinate X of center of circle cen 1 coordinate Y of center of circle cen 2 included angle of endpoint cen 3 i
103. soe kefe sole spo spo spore int CCtrlCard Interp_Move4 long valuel long value2 long value3 long value4 Result adt8840a_inp_move4 devnum 0 valuel value2 value3 value4 return Result This function is used to stop running including immediate stop and stop by deceleration Parameters axis axis number mode deceleration method 0 immediate stop l stop by deceleration Return value 0 correct return value 1 error Teese reo soe soe segete ne 2 Ae FA spo spo 2 2 AE 2 2 26 int CCtrlCard StopRun int axis int mode if mode 0 immediate stop Result adt8840a_sudden_stop devnum axis else stop by deceleration Result adt8840a_dec_stop devnum axis return Result This function is used to get to know the drive status and interpolation status of each axis Parameters axis axis number value status pointer 0 drive end non 0 drive under way Mode 0 get to know the drive status of single axis 1 get to know the drive status of interpolation Return value 0 correct return value 1 error Teese 6 2A He sese sole spot spot ne tole totes le leke 2 elele 2 eke int CCtrlCard Get_Status int axis int amp value int mode if mode 0 get to know the drive status of single axis Result adt8840a_get_status devnum axis amp value else get to know the drive status of
104. sponse overtime 3 abnormal data received 4 disabled device interface With this function the logic position of the axis can be obtained at any time When the Note motor has not lost its step it represents the current position of the axis adt8840a get actual pos Name int adt8840a get actual pos int dev num int axis long pos Definition Get the logic position for each axis Input parameter dev num device number axis axis number 1 4 Output parameter pos pointer of actual position value Return value 0 execution OK 1 execution failure 1 transmission abnormity 2 response overtime 3 abnormal data received 4 disabled device interface With this function the actual position of the axis can be obtained at any time Even when the motor lost its step the user can know the current position of the axis Note The axis must be connected to encoder or grating ruler This number actually represents the number counted by the encoder or grating ruler adt8840a get speed Name int adt8840a get speed int dev num int axis long value Definition Get the current drive velocity of each axis Input parameter dev num device number axis axis number 1 4 Output parameter pos pointer of current drive velocity Return value 0 execution OK 1 execution failure 1 transmission abnormity 2 response overtime 3 abn
105. ted objective The names of the four check boxes selected objective are X Y Z and A and the codes are described as follows SEREREREREAEAE SE judement of speed setup 9 Setting scope of start velocity and drive velocity 1 2M Setting scope of acceleration 1x125 64000x125 Vos se 2fe 2fe ok se o oo sk ce o oe oe oe c k oe oe fs o oo se se oe oe oe k k k k k k k k k k If m bX value vbUnchecked And m bY value vbUnchecked And m bZ value vbUnchecked And m bA value vbUnchecked Then MsgBox Please select interaction axis End If If m bX value vbChecked Then Setup Speed 1 m nStartV 0 Text m nSpeed 0 Text m nAdd 0 Text End If If m_bY value vbChecked Then Setup Speed 2 m nStartV 1 Text m nSpeed 1 Text m nAdd 1 Text End If If m bZ value vbChecked Then Setup Speed 3 m nStartV 2 Text m_nSpeed 2 Text m nAdd 2 Text End If If m bA value vbChecked Then Setup Speed 4 m nStartV 3 Text m nSpeed 3 Text m nAdd 3 Text End If If m bX value vbChecked Then Axis Pmove 1 m nPulse 0 Text End If If m bY value vbChecked Then Axis Pmove 2 m nPulse 1 Text End If If m bZ value vbChecked Then Axis Pmove 3 m nPulse 2 Text End If If m bA value vbChecked Then Axis Pmove 4 m nPulse 3 Text End If End Sub 1 3 4 Interpolation codes are provided at the button InterpMove Click where they can be accessed by clicking and send out corresponding drive commands based on the selected objective The
106. th of 10Mbps ADT 8840 can be operated in a LAN whose bandwidth is 100Mbps At present ADT 8840 and its supporting software can be used in the LAN based on Ethernet or connected to PC s network interface with the crossover cables gt Features S3C44B0X CPU ARM from Samsung with major frequency of 66MHz Large scope programmable FPGA real time multipurpose control technology and hardware interpolation technology high reliability Compatible with highly segmented driver with high machining precision and steady running 2 4 axis random linear interpolation 2 axis software random arc interpolation Providing buffer for commands of software and hardware to improve efficiency and stability Linear acceleration deceleration Real time reading of logic position actual position and drive speed in running 34 path optical coupler isolation input Optical coupler isolation pulse input of phase A and B for encoders of 4 axes phase Z home position input can be used for inputting the switch value of 12 path Optical coupler isolation input with 18 path open collector with four axis output which can be used for omnipotent server control or server alarm deletion Embedded with 8M SDRAM and 32M Nand FLASH ROM a sufficient memory space that can satisfy the running of various complicated programs and machining http www adtechcn com 5 Bi imlendirilmi Kenarl k Altta Kenarl k
107. tion INCOM2 Shared input 2 please connect it to 12V 24V power Regular input 17 33 Please notice its order by refereeing to the silk printing on http www adtechcn com 11 lt 1 Bicimlendirilmis Kenarl k Altta Kenarlik Yok 4 3 Definition of JC port 18 path input 24V GND OUTO OUTI OUT2 OUT3 OUTA OUTS OUT6 OUT7 OUT8 OUT9 OUT10 OUT11 OUT12 OUT13 OUT14 OUT15 OUT16 OUT17 24V DOM REN 24VGND Shared output Regular output 0 17 Please note OUTI has been used as a pause resume tips signal http www adtechcn com 12 24 power input for loading requiring external 12 24 V power JCP1 PUCOM 5 gt gt xPU EXT VCCAO gt gt XPU 24V O 24VGND gt gt XDR gt gt XD R XECA gt o lt XALARM XECA gt o gt gt OUT18 gt lt XECZ XECB gt o lt XECZ 7 DB15 15 pin female jack same as lathe and milling machine http www adtechcn com 13 Bi imlendirilmi Kenarl k Altta Kenarl k Yok Bi imlendirilmi Kenarl k Altta Kenarl k Yok Line No Name Definition 1 XPU Axis X s pulse signal 2 XPU Axis X s pulse signal 3 XDR Axis X s direction signal 4 XDR Axis X s direction signal 5 XALARM IN34 Regular input signal can be used as server alarm input of axis X 2 Regular i
108. ty 4 disabled device interface Note The parameters needed by the velocity curve must be set before the drive command is written 5 5 adt8840a dec stop Name int adt8840a dec stop int dev num int axis Definition Drive deceleration stop Input parameter dev num device number axis axis number 1 4 Output parameter None Return value 0 execution OK 1 transmission abnormity 4 disabled device interface Note In the process of outputting drive pulses this command is used to stop the deceleration Even when the drive velocity is lower than the start velocity you can also use it to stop the deceleration immediately http www adtechcn com 46 5 6 adt8840a sudden stop Bicimlendirilmis Kenarlik Altta Kenarlik Yok Name int adt8840a_sudden_stop int dev num int axis Definition Sudden stop Input parameter dev num device number axis axis number 1 4 Output parameter None Return value 0 execution OK 1 transmission abnormity 4 disabled device interface Note It immediately stops the pulse output when the drive is under way even if the acceleration deceleration drive is engaged 5 7 adt8840a inp moveX Name int adt8840a inp move2 int dev num int axisl int dev num int mode int axis2 long pulsel long pulse2 Definition Dual axis line
109. uiry information Output parameter None Return value 0 execution OK 1 transmission abnormity 4 disabled device interface Note Starting the debugging of serial interface will consume a large number of system resources 1 7 adt8840a_set_stop0_mode Name int adt8840a_set_stop0_mode int dev numiint axis int value int logic Definition Set stop0 singal as enabled disabled and set its logic level dev_num device number axis Axis number 1 4 i ES value 0 disabled 1 Enabled logic 0 stop at low level 1 stop at high level Output None parameter Return value 0 execution OK 1 transmission abnormity 4 disabled device interface Note Signal in disabled state in initialization stop at low level Immediate stop STOP is the same 1 8 adt8840a set stopl mode Name int adt8840a set stopl mode int dev numiint axis int value int logic Definition Set stop singal as enabled disabled and set its logic level http www adtechcn com 37 dev_num device number axis Axis number 1 4 Input parameter value 0 disabled 1 Enabled logic 0 stop at low level 1 stop at high level Output None parameter Return value 0 execution OK 1 transmission abnormity 4 disabled device interface Note Signal in disabled state in initialization stop at low level 1 9 adt8840a set limit mode
110. ulse Otherwise the internal circuit of the ADT 8840 might be damaged Any two of the four pins namely PU PU DR and DR shall never be connected together Otherwise the internal circuit of the ADT 8840 might be damaged too http www adtechcn com 21 lt 1 Bicimlendirilmis Kenarl k Altta Kenarlik Yok amp Connection for output signal The switch value of this control system is output through the open collector with JC1 as both the shared terminal and GND of the loaded power source In actual use the operator should connect the Pin 20 of JCI to 24V and the output point is enabled at low level The load should be connected to somewhere between 24V and the output point The internal output circuit is safeguarded by mechanisms of over current protection over voltage protection short circuit protection overheat protection and follow current protection However if an external sensible load is connected like the relay you should connect a follow current diode at the two ends of the relay as shown in the figure below VDC OVDC EXTCOM or DOUTnGND Note Recommended voltage 24V preferably not over 30V Never reversely connect the negative and positive poles nor allow the load to have short circuit Otherwise the module might be damaged amp Connection for communication signal Control Card Communication mode RS232 http www adtechcn com 22 Preset drive Preset drive
111. ulse 0 Pulse 2 Pulse 3 else if m_bX amp amp m_bY amp amp m bZ amp amp m_bA interpolation of axis Y Z and W g CtrlCard Setup Speed 2 Startv 1 Speed 1 Add 1 g CtrlCard Interp Move3 2 3 4 Pulse 1 Pulse 2 Pulse 3 PRR AR A AR e a a sete four axis interpolation else if m_bX amp amp m bY amp amp m bZ amp amp m_bA interpolation of axis X Y Z and W g CtrlCard Setup_Speed 1 Startv 0 Speed 0 Add 0 g CtrlCard Interp Move4 Pulse 0 Pulse 1 Pulse 2 Pulse 3 else MessageBox Please select interaction axis prompt 2 4 Monitoring module The monitoring module is used to get the information on axis drive and display the information on motion and at the same time prevent the system from sending new drive commands during the drive process The monitoring module performs its functions through the timer whose codes are described as follows eek mop real time 1 get the logic position actual position running speed and drive status http www adtechcn com 93 Bi imlendirilmi Kenarl k Altta Kenarl k Yok read positive negative limit and stop0 void CVCExampleDlg OnTimer UINT nIDEvent long log 0 act 0 spd 0 UINT nID1 J IDC_POS_LOGX IDC_POS_LOGY IDC_POS_LOGZ IDC_POS_LOGW UINT nID2 J IDC_POS_ACTX IDC_POS_ACTY IDC_POS_ACTZ IDC_POS_ACTW UIN
112. um mode i 0 adt8840a_set_startv devnum mode i 0 adt8840a_set_speed devnum mode i 0 adt8840a_set_acc devnum mode i 0 if Result 0 return 1 else return Result else return 1 PERE SERERELEE ERE EEE ER TELE ES CL speed module Oetker Fal keel te lero ER ERE Ek Judge from the parameter whether it is uniform speed or acceleration deceleration Set the start velocity drive velocity and acceleration Parameters axis axis number StartV start velocity Speed drive velocity Add acceleration Return value 0 correct return value 1 error R22 sk 2 fe fl e e he spoke ese sk oko 2 2 he eee eee int CCtrlCard Setup_Speed int axis long startv long speed long add if startv speed gt 0 uniform motion Result adt8840a_set_startv devnum 0 axis startv adt8840a_set_speed devnum 0 axis startv else acceleration deceleration motion Result adt8840a_set_startv devnum 0 axis startv adt8840a_set_speed devnum 0 axis speed adt8840a_set_acc devnum 0 axis add return Result http www adtechcn com 82 Bicimlendirilmis Kenarlik Altta Kenarlik Yok PRR RSE n o1e AXiS function f gt 3 kk ak ak ak ak ak ak esie This function is used for driving the single axis Parameters axis axis number pulse number of output pulse Return value 0 correct return value 1 error int CCtrlCard Axis_Pmove int axis long value Result
113. unction is used for driving the single axis Parameters axis axis number pulse pulse direction Return value 0 correct return value 1 error int CCtrlCard Axis_Cmove int axis long value Result adt8840a_continue_move devnum 0 axis value return Result http www adtechcn com 87 Bicimlendirilmis Kenarlik Altta Kenarlik Yok Bi imlendirilmi Kenarl k Altta Kenarl k Yok htip www adtechcn com 88 2 3 Implementation module 2 3 1 Interface configuration Fe ADT 8840 DENO ADT 8840 o iG Fi BRE RBS Trib 192 168 0 123 7 prie 00 00 01 23 EEE f REA mee sek ems sess vam EU Fares ETER ERA PRG STOPO STOP1 1000000 1 Speed setting to set start velocity drive velocity and acceleration of each axis position setting to set the drive pulse of each axis drive information to display the logic position actual position and running speed of each axis in a real time manner 2 Drive objective to select the drive objective to determine the axis that s engaged in the interaction or interpolation 3 Interaction used to send the single axis drive command to all axes selected as drive objective interpolation used to send the interpolation command to all axes selected as drive objective stop stop pulse output of all axes Pulse is taken as th
114. unit for all abovementioned data 1 3 2 The initialization codes are in the uploaded events which are described as follows Private Sub Form Load DeviceAddr init initialize the device s interface address m MacAddr Text 00 AB CD 00 01 23 designate network adapter s address m IPAddr Text 192 168 0 123 designate IP address of control card m INFO Text please initialize first End Sub Private Sub InitiallDevice Click Init Board card initialization End Sub Private Sub Init Board Dim ip addr mac addr As String Dim sock As Integer err As Integer count As Integer devnum 1 ip addr 192 168 0 123 designate network adapter s address mac addr 00 AB CD 00 01 23 designate IP address of control card devnum TCP Conn ip addr mac addr err sockl Get sock devnum If sock1 2 1 Then m Device Text none m IPStatus Text connection failure m INFO Text please check the device s connection Else m Device Text 0 m IPStatus Text connection OK count Init Card devnum If count 1 Then MsgBox 8840 control card initialization completed m INFO Text device initialization completed InitiallDevice Enabled False Else m INFO Text device initialization failure End If End If End Sub http www adtechcn com 75 1 3 3 Interaction codes are provided at the button AxisPmove Click where they can be accessed by clicking and send out corresponding drive commands based on the selec
115. urn of drive state will end The joint ALARM receives alarm signal from the driver of the servo motor When it is set as enabled the system will monitor the state of ALARM If the signal is effective the drive will stop immediately The states of these input signals used for the driver of the motor can be read through universal 1 function The common output signal can be used for clearing of bias counter resetting of alarm state startup of server unit Drive by external signal Drive by external signal refers to the motion controlled by the external signals switch This mode is mainly used for the adjusting the machine in a manual way The currently used external manual signals include IN12 Manual stop Once responded 500 positive pulses are output from OUTO IN13 Manual return to the home position The system will automatically start or close STOPO If the user uses phase Z signal he should use IN13 in upper PC IN14 Manually run the files for machining These three signals are enabled by lower level Chapter IV Basic Library Functions of ADTS840 Type Function Definition Page Initialization of device interface s DeviceAddr init 37 Basic address parameters TCP Conn Network connection 37 Close netconn Close network connection 37 http www adtechcn com 30 Close_all Close netw
116. us Name int adt8840a status int dev_num int status Definition Query the machining status where G code files are run Input parameter int dev num device number Output int status G code machining status 0 machining not started 1 machining under way parameter 0 execution OK 1 execution failure 1 transmission abnormity 2 response overtime Return value 3 abnormal data received 4 disabled device interface Note None 10 6 adt8840a get gbuff depth Name int adt8840a get gbuff depth int dev_num int buff depth Definition Query buffer depth of G command Input parameter int dev num device number Output int buff depth number of G codes parameter 0 execution OK 1 execution failure 1 transmission abnormity 2 response overtime Return value 2 3 abnormal data received 4 disabled device interface Note None http www adtechcn com 60 Chapter VI Use of Library Functions for Motion Control amp 1 Overview of ADT 8840 s Function Library The function Library of ADT 8840 serves as interfaces with which the user can operate the control card to realize the corresponding functions 2 Use of dynamic link library under Windows environment Compiled by using VC the dynamic link library under Windows environment is located at development kit drive dynamic link in the disk and suits the prog
117. value2 long value3 int Interp Move2 int axis1 int axis2 long valuel long value2 int Axis Pmove int axis value int Axis Cmove int axis value int Setup Speed int axis long startv speed long add int Init Board int dec num CCtrlCard int Result return value h endif 5 The codes of source file CtrlCard cpp are described as follows include stdafx h include DEMO h include CtrlCard h include adt8840 h int devnum 1 CCtrlCard CCtrlCard kinijtialize functions k k k ak ak ak k aak akk k kk k This function includes the library function commonly used in the initialization of the control card It is the basis of using their functions and must be used first in the exemplified program Return value lt 0 it indicates the initialization failure Return value gt 0 it indicates the successful initialization 6 2A spese soe spo spo lele elele eE int CCtrlCard Init Board int devnum Eck sk ee sk sese ok oe oe sje ke oe sje oko eoe ok ose oko ee obe kkk lek eek elek int mode 0 when response mode is 1 responding to the serial interface reception is enabled when 0 disabled http www adtechcn com 81 Bicimlendirilmis Kenarlik Altta Kenarlik Yok if devnum 0 for int i 1 i lt MAXAXIS i Result adt8840a_set_command_pos devnum mode i 0 adt8840a_set_actual_pos devn
118. wer output to server 11 24VGND 24V power output to server 12 YECA IN44 Phase A s input for axis Y s encoder http www adtechcn com Bi imlendirilmi Kenarl k Altta Kenarl k Yok 13 YECA IN44 Phase A s input for axis Y s encoder 14 YECB IN45 Phase B s input for axis Y s encoder 15 YECB IN45 Phase B s input for axis Y s encoder 4 6 Definition of axis Z s port axis Z s pulse and direction JCP3 i 15 D 15 pin female jack same as lathe and milling machine Line No Name Definition 1 ZPU Axis Z s pulse signal 2 ZPU Axis Z s pulse signal 3 ZDR Axis Z s direction signal 4 ZDR Axis Z s direction signal 5 ZALARM IN36 Regular input signal can be used as server alarm input of axis Z Regular input signal can be used as server full capacity and other 6 OUT20 functions http www adtechcn com Bi imlendirilmi Kenarl k Altta Kenarl k Yok 7 ZECZ IN40 Phase Z s input for axis Z s encoder 8 ZECZ 1N40 Phase Z s input for axis Z s encoder 9 EZT VCCA Driver used for single end input 10 24V 24V power output to server 11 24VGND 24V power output to server 12 ZECA IN46 Phase A s input for axis Z s encoder 13 ZECA IN46 Phase A s input for axis Z s encoder 14 ZECB I
Download Pdf Manuals
Related Search
Related Contents
HART Intelligent Temperature Transmitter TT421 Mpman MP186 平成18年3月30日判決言渡 同日原本交付 裁判所書記官 口頭弁論 Guía de Activación リバース 混合機 Plustek SmartOffice PL806 取扱説明書 - 瀧住電機工業株式会社 M-Series Power Steering Service Manual PDF - OutdoorKing Copyright © All rights reserved.
Failed to retrieve file