APS168x64.vb 130 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447
  1. Option Strict Off
  2. Option Explicit On
  3. Imports System
  4. Imports System.Runtime.InteropServices
  5. Module APS168
  6. ' Copyright Lib "APS168x64.dll" (C) 1995-2018 Adlink Technology INC.
  7. ' All rights reserved.
  8. 'APS type_def+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
  9. Structure STR_SAMP_DATA_4CH
  10. Dim tick As Int32
  11. Dim data_0 As Int32 'Total channel = 4
  12. Dim data_1 As Int32 'Total channel = 4
  13. Dim data_2 As Int32 'Total channel = 4
  14. Dim data_3 As Int32 'Total channel = 4
  15. End Structure
  16. Structure STR_SAMP_DATA_8CH
  17. Dim tick As Int32
  18. Dim data_0 As Int32 'Total channel = 4
  19. Dim data_1 As Int32 'Total channel = 4
  20. Dim data_2 As Int32 'Total channel = 4
  21. Dim data_3 As Int32 'Total channel = 4
  22. Dim data_4 As Int32 'Total channel = 4
  23. Dim data_5 As Int32 'Total channel = 4
  24. Dim data_6 As Int32 'Total channel = 4
  25. Dim data_7 As Int32 'Total channel = 4
  26. End Structure
  27. Structure MOVE_PARA 'Speed pattern
  28. Dim i16_accType As Short 'Axis parameter
  29. Dim i16_decType As Short 'Axis parameter
  30. Dim i32_acc As Integer 'Axis parameter
  31. Dim i32_dec As Integer 'Axis parameter
  32. Dim i32_initSpeed As Integer 'Axis parameter
  33. Dim i32_maxSpeed As Integer 'Axis parameter
  34. Dim i32_endSpeed As Integer 'Axis parameter
  35. End Structure
  36. Structure POINT_DATA
  37. Dim i32_pos As Integer ' Position data Lib "APS168x64.dll" (relative or absolute) Lib "APS168x64.dll" (pulse)
  38. Dim i16_accType As Short ' Acceleration pattern 0: T-curve, 1: S-curve
  39. Dim i16_decType As Short ' Deceleration pattern 0: T-curve, 1: S-curve
  40. Dim i32_acc As Integer ' Acceleration rate Lib "APS168x64.dll" ( pulse / ss )
  41. Dim i32_dec As Integer ' Deceleration rate Lib "APS168x64.dll" ( pulse / ss )
  42. Dim i32_initSpeed As Integer ' Start velocity Lib "APS168x64.dll" ( pulse / s )
  43. Dim i32_maxSpeed As Integer ' Maximum velocity Lib "APS168x64.dll" ( pulse / s )
  44. Dim i32_endSpeed As Integer ' End velocity Lib "APS168x64.dll" ( pulse / s )
  45. Dim i32_angle As Integer ' Arc move angle Lib "APS168x64.dll" ( degree, -360 ~ 360 )
  46. Dim u32_dwell As Integer ' Dwell times Lib "APS168x64.dll" ( unit: ms )
  47. Dim i32_opt As Integer ' Option '0xABCD , D:0 absolute, 1:relative
  48. End Structure
  49. Structure POINT_DATA_EX
  50. Dim i32_pos As Integer '//(Center)Position data (could be relative or absolute value)
  51. Dim i16_accType As Short '//Acceleration pattern 0: T curve, 1:S curve
  52. Dim i16_decType As Short '// Deceleration pattern 0: T curve, 1:S curve
  53. Dim i32_acc As Integer ' //Acceleration rate ( pulse / sec 2 )
  54. Dim i32_dec As Integer ' //Deceleration rate ( pulse / sec 2 )
  55. Dim i32_initSpeed As Integer ' //Start velocity ( pulse / s )
  56. Dim i32_maxSpeed As Integer '//Maximum velocity ( pulse / s )
  57. Dim i32_endSpeed As Integer '//End velocity ( pulse / s )
  58. Dim i32_angle As Integer ' //Arc move angle ( degree, -360 ~ 360 )
  59. Dim u32_dwell As Integer '//dwell times ( unit: ms ) *Divided by system cycle time.
  60. Dim i32_opt As Integer '//Point move option. (*)
  61. Dim i32_pitch As Integer '// pitch for helical move
  62. Dim i32_totalheight As Integer '// total hight
  63. Dim i16_cw As Short '// cw or ccw
  64. Dim i16_opt_ext As Short '// option extend
  65. End Structure
  66. Structure POINT_DATA2
  67. Dim i32_pos_0 As Integer ' Position data Lib "APS168x64.dll" (relative or absolute) Lib "APS168x64.dll" (pulse) , Arraysize = 16
  68. Dim i32_pos_1 As Integer ' Position data Lib "APS168x64.dll" (relative or absolute) Lib "APS168x64.dll" (pulse) , Arraysize = 16
  69. Dim i32_pos_2 As Integer ' Position data Lib "APS168x64.dll" (relative or absolute) Lib "APS168x64.dll" (pulse) , Arraysize = 16
  70. Dim i32_pos_3 As Integer ' Position data Lib "APS168x64.dll" (relative or absolute) Lib "APS168x64.dll" (pulse) , Arraysize = 16
  71. Dim i32_pos_4 As Integer ' Position data Lib "APS168x64.dll" (relative or absolute) Lib "APS168x64.dll" (pulse) , Arraysize = 16
  72. Dim i32_pos_5 As Integer ' Position data Lib "APS168x64.dll" (relative or absolute) Lib "APS168x64.dll" (pulse) , Arraysize = 16
  73. Dim i32_pos_6 As Integer ' Position data Lib "APS168x64.dll" (relative or absolute) Lib "APS168x64.dll" (pulse) , Arraysize = 16
  74. Dim i32_pos_7 As Integer ' Position data Lib "APS168x64.dll" (relative or absolute) Lib "APS168x64.dll" (pulse) , Arraysize = 16
  75. Dim i32_pos_8 As Integer ' Position data Lib "APS168x64.dll" (relative or absolute) Lib "APS168x64.dll" (pulse) , Arraysize = 16
  76. Dim i32_pos_9 As Integer ' Position data Lib "APS168x64.dll" (relative or absolute) Lib "APS168x64.dll" (pulse) , Arraysize = 16
  77. Dim i32_pos_10 As Integer ' Position data Lib "APS168x64.dll" (relative or absolute) Lib "APS168x64.dll" (pulse) , Arraysize = 16
  78. Dim i32_pos_11 As Integer ' Position data Lib "APS168x64.dll" (relative or absolute) Lib "APS168x64.dll" (pulse) , Arraysize = 16
  79. Dim i32_pos_12 As Integer ' Position data Lib "APS168x64.dll" (relative or absolute) Lib "APS168x64.dll" (pulse) , Arraysize = 16
  80. Dim i32_pos_13 As Integer ' Position data Lib "APS168x64.dll" (relative or absolute) Lib "APS168x64.dll" (pulse) , Arraysize = 16
  81. Dim i32_pos_14 As Integer ' Position data Lib "APS168x64.dll" (relative or absolute) Lib "APS168x64.dll" (pulse) , Arraysize = 16
  82. Dim i32_pos_15 As Integer ' Position data Lib "APS168x64.dll" (relative or absolute) Lib "APS168x64.dll" (pulse) , Arraysize = 16
  83. Dim i32_initSpeed As Integer ' Start velocity Lib "APS168x64.dll" ( pulse / s )
  84. Dim i32_maxSpeed As Integer ' Maximum velocity Lib "APS168x64.dll" ( pulse / s )
  85. Dim i32_angle As Integer ' Arc move angle Lib "APS168x64.dll" ( degree, -360 ~ 360 )
  86. Dim u32_dwell As Integer ' Dwell times Lib "APS168x64.dll" ( unit: ms )
  87. Dim i32_opt As Integer ' Option '0xABCD , D:0 absolute, 1:relative
  88. End Structure
  89. Structure POINT_DATA3
  90. Dim i32_pos_0 As Integer
  91. Dim i32_pos_1 As Integer
  92. Dim i32_pos_2 As Integer
  93. Dim i32_pos_3 As Integer
  94. Dim i32_maxSpeed As Integer
  95. Dim i32_endPos_0 As Integer
  96. Dim i32_endPos_1 As Integer
  97. Dim i32_dir As Integer
  98. Dim i32_opt As Integer
  99. End Structure
  100. Structure JOG_DATA
  101. Dim i16_jogMode As Short ' Jog mode. 0:Free running mode, 1:Step mode
  102. Dim i16_dir As Short ' Jog direction. 0:positive, 1:negative direction
  103. Dim i16_accType As Short ' Acceleration pattern 0: T-curve, 1: S-curve
  104. Dim i32_acc As Integer ' Acceleration rate Lib "APS168x64.dll" ( pulse / ss )
  105. Dim i32_dec As Integer ' Deceleration rate Lib "APS168x64.dll" ( pulse / ss )
  106. Dim i32_maxSpeed As Integer ' Positive value, maximum velocity Lib "APS168x64.dll" ( pulse / s )
  107. Dim i32_offset As Integer ' Positive value, a step Lib "APS168x64.dll" (pulse)
  108. Dim i32_delayTime As Integer ' Delay time, Lib "APS168x64.dll" ( range: 0 ~ 65535 millisecond, align by cycle time)
  109. End Structure
  110. Structure HOME_PARA
  111. Dim u8_homeMode As Byte
  112. Dim u8_homeDir As Byte
  113. Dim u8_curveType As Byte
  114. Dim i32_orgOffset As Integer
  115. Dim i32_acceleration As Integer
  116. Dim i32_startVelocity As Integer
  117. Dim i32_maxVelocity As Integer
  118. Dim i32_OrgVelocity As Integer
  119. End Structure
  120. Structure FILTER_COEF
  121. Dim a1 As Double ' Biquad filter output polynomial coefficient
  122. Dim a2 As Double ' Biquad filter output polynomial coefficient
  123. Dim b0 As Double ' Biquad filter input polynomial coefficient
  124. Dim b1 As Double ' Biquad filter input polynomial coefficient
  125. Dim b2 As Double ' Biquad filter input polynomial coefficient
  126. End Structure
  127. Structure POS_DATA_2D
  128. Dim u32_opt As Integer 'option, [0x00000000,0xFFFFFFFF]
  129. Dim i32_x As Integer ' x-axis component Lib "APS168x64.dll" (pulse), [-2147483648,2147484647]
  130. Dim i32_y As Integer 'y-axis component Lib "APS168x64.dll" (pulse), [-2147483648,2147484647]
  131. Dim i32_theta As Integer 'x-y plane arc move angle Lib "APS168x64.dll" (0.001 degree), [-360000,360000]
  132. End Structure
  133. Structure PNT_DATA_2D
  134. Dim u32_opt As Integer ' option, [0x00000000,0xFFFFFFFF]
  135. Dim i32_x As Integer ' x-axis component Lib "APS168x64.dll" (pulse), [-2147483648,2147484647]
  136. Dim i32_y As Integer ' y-axis component Lib "APS168x64.dll" (pulse), [-2147483648,2147484647]
  137. Dim i32_theta As Integer ' x-y plane arc move angle Lib "APS168x64.dll" (0.001 degree), [-360000,360000]
  138. Dim i32_acc As Integer ' acceleration rate Lib "APS168x64.dll" (pulse/ss), [0,2147484647]
  139. Dim i32_dec As Integer ' deceleration rate Lib "APS168x64.dll" (pulse/ss), [0,2147484647]
  140. Dim i32_vi As Integer ' initial velocity Lib "APS168x64.dll" (pulse/s), [0,2147484647]
  141. Dim i32_vm As Integer ' maximum velocity Lib "APS168x64.dll" (pulse/s), [0,2147484647]
  142. Dim i32_ve As Integer ' ending velocity Lib "APS168x64.dll" (pulse/s), [0,2147484647]
  143. End Structure
  144. Structure PNT_DATA_2D_F64
  145. Dim u32_opt As Integer '// option, [0x00000000,0xFFFFFFFF]
  146. Dim f64_x As Double '// x-axis component (pulse), [-2147483648,2147484647]
  147. Dim f64_y As Double '// y-axis component (pulse), [-2147483648,2147484647]
  148. Dim f64_theta As Double '// x-y plane arc move angle (0.000001 degree), [-360000,360000]
  149. Dim f64_acc As Double '// acceleration rate (pulse/ss), [0,2147484647]
  150. Dim f64_dec As Double '// deceleration rate (pulse/ss), [0,2147484647]
  151. Dim f64_vi As Double '// initial velocity (pulse/s), [0,2147484647]
  152. Dim f64_vm As Double '// maximum velocity (pulse/s), [0,2147484647]
  153. Dim f64_ve As Double '// ending velocity (pulse/s), [0,2147484647]
  154. Dim f64_sf As Double ' // s-factor [0.0 ~ 1.0]
  155. End Structure
  156. ' Point table structure Lib "APS168x64.dll" (Four dimension)
  157. Structure PNT_DATA_4DL
  158. Dim u32_opt As Integer ' option, [0x00000000,0xFFFFFFFF]
  159. Dim i32_x As Integer ' x-axis component Lib "APS168x64.dll" (pulse), [-2147483648,2147484647]
  160. Dim i32_y As Integer ' y-axis component Lib "APS168x64.dll" (pulse), [-2147483648,2147484647]
  161. Dim i32_z As Integer ' z-axis component Lib "APS168x64.dll" (pulse), [-2147483648,2147484647]
  162. Dim i32_u As Integer ' u-axis component Lib "APS168x64.dll" (pulse), [-2147483648,2147484647]
  163. Dim i32_acc As Integer ' acceleration rate Lib "APS168x64.dll" (pulse/ss), [0,2147484647]
  164. Dim i32_dec As Integer ' deceleration rate Lib "APS168x64.dll" (pulse/ss), [0,2147484647]
  165. Dim i32_vi As Integer ' initial velocity Lib "APS168x64.dll" (pulse/s), [0,2147484647]
  166. Dim i32_vm As Integer ' maximum velocity Lib "APS168x64.dll" (pulse/s), [0,2147484647]
  167. Dim i32_ve As Integer ' ending velocity Lib "APS168x64.dll" (pulse/s), [0,2147484647]
  168. End Structure
  169. ' Point table structure Lib "APS168x64.dll" (One dimension)
  170. Structure PNT_DATA
  171. Dim u32_opt As Integer ' option, [0x00000000,0xFFFFFFFF]
  172. Dim i32_x As Integer ' x-axis component Lib "APS168x64.dll" (pulse), [-2147483648,2147484647]
  173. Dim i32_theta As Integer ' x-y plane arc move angle Lib "APS168x64.dll" (0.001 degree), [-360000,360000]
  174. Dim i32_acc As Integer ' acceleration rate Lib "APS168x64.dll" (pulse/ss), [0,2147484647]
  175. Dim i32_dec As Integer ' deceleration rate Lib "APS168x64.dll" (pulse/ss), [0,2147484647]
  176. Dim i32_vi As Integer ' initial velocity Lib "APS168x64.dll" (pulse/s), [0,2147484647]
  177. Dim i32_vm As Integer ' maximum velocity Lib "APS168x64.dll" (pulse/s), [0,2147484647]
  178. Dim i32_ve As Integer ' ending velocity Lib "APS168x64.dll" (pulse/s), [0,2147484647]
  179. End Structure
  180. '//Asynchronized call
  181. Structure ASYNCALL
  182. 'HANDLE h_event; // IntPtr
  183. Dim h_event As IntPtr
  184. Dim i32_ret As Integer
  185. Dim u8_asyncMode As Byte
  186. End Structure
  187. Structure TSK_INFO
  188. Dim State As UShort
  189. Dim RunTimeErr As UShort
  190. Dim IP As UShort
  191. Dim SP As UShort
  192. Dim BP As UShort
  193. Dim MsgQueueSts As UShort
  194. End Structure
  195. Structure VAO_DATA
  196. 'Param
  197. Dim outputType As Integer 'Output type, [0, 3]
  198. Dim inputType As Integer 'Input type, [0, 1]
  199. Dim config As Integer 'PWM configuration according to output type
  200. Dim inputSrc As Integer 'Input source by axis, [0, 0xf]
  201. 'Mapping table
  202. Dim minVel As Integer 'Minimum linear speed, [ positive ]
  203. Dim velInterval As Integer 'Speed interval, [ positive ]
  204. Dim totalPoints As Integer 'Total points, [1, 32]
  205. Dim mappingDataArr_0 As Integer 'mapping data array
  206. Dim mappingDataArr_1 As Integer 'mapping data array
  207. Dim mappingDataArr_2 As Integer 'mapping data array
  208. Dim mappingDataArr_3 As Integer 'mapping data array
  209. Dim mappingDataArr_4 As Integer 'mapping data array
  210. Dim mappingDataArr_5 As Integer 'mapping data array
  211. Dim mappingDataArr_6 As Integer 'mapping data array
  212. Dim mappingDataArr_7 As Integer 'mapping data array
  213. Dim mappingDataArr_8 As Integer 'mapping data array
  214. Dim mappingDataArr_9 As Integer 'mapping data array
  215. Dim mappingDataArr_10 As Integer 'mapping data array
  216. Dim mappingDataArr_11 As Integer 'mapping data array
  217. Dim mappingDataArr_12 As Integer 'mapping data array
  218. Dim mappingDataArr_13 As Integer 'mapping data array
  219. Dim mappingDataArr_14 As Integer 'mapping data array
  220. Dim mappingDataArr_15 As Integer 'mapping data array
  221. Dim mappingDataArr_16 As Integer 'mapping data array
  222. Dim mappingDataArr_17 As Integer 'mapping data array
  223. Dim mappingDataArr_18 As Integer 'mapping data array
  224. Dim mappingDataArr_19 As Integer 'mapping data array
  225. Dim mappingDataArr_20 As Integer 'mapping data array
  226. Dim mappingDataArr_21 As Integer 'mapping data array
  227. Dim mappingDataArr_22 As Integer 'mapping data array
  228. Dim mappingDataArr_23 As Integer 'mapping data array
  229. Dim mappingDataArr_24 As Integer 'mapping data array
  230. Dim mappingDataArr_25 As Integer 'mapping data array
  231. Dim mappingDataArr_26 As Integer 'mapping data array
  232. Dim mappingDataArr_27 As Integer 'mapping data array
  233. Dim mappingDataArr_28 As Integer 'mapping data array
  234. Dim mappingDataArr_29 As Integer 'mapping data array
  235. Dim mappingDataArr_30 As Integer 'mapping data array
  236. Dim mappingDataArr_31 As Integer 'mapping data array
  237. End Structure
  238. Public Const MAX_SAMPL_CH As Integer = (8)
  239. Public Const MAX_SAMPL_SRC As Integer = (2)
  240. Structure SAMP_PARAM
  241. Dim rate As Integer '//Sampling rate
  242. Dim edge As Integer '//Trigger edge
  243. Dim level As Integer '//Trigger level
  244. Dim trigCh As Integer '//Trigger channel
  245. Dim sourceByCh_0_0 As Integer
  246. Dim sourceByCh_0_1 As Integer
  247. Dim sourceByCh_1_0 As Integer
  248. Dim sourceByCh_1_1 As Integer
  249. Dim sourceByCh_2_0 As Integer
  250. Dim sourceByCh_2_1 As Integer
  251. Dim sourceByCh_3_0 As Integer
  252. Dim sourceByCh_3_1 As Integer
  253. Dim sourceByCh_4_0 As Integer
  254. Dim sourceByCh_4_1 As Integer
  255. Dim sourceByCh_5_0 As Integer
  256. Dim sourceByCh_5_1 As Integer
  257. Dim sourceByCh_6_0 As Integer
  258. Dim sourceByCh_6_1 As Integer
  259. Dim sourceByCh_7_0 As Integer
  260. Dim sourceByCh_7_1 As Integer
  261. '//Sampling source by channel, named sourceByCh[a][b],
  262. '//a: Channel
  263. '//b: 0: Sampling source 1: Sampling axis
  264. '//Sampling source: F64 data occupies two channel, I32 data occupies one channel.
  265. End Structure
  266. Structure SAMP_PARAM_ADV
  267. Dim rate As Integer '//Sampling rate
  268. Dim edge As Integer '//Trigger edge
  269. Dim level As Integer '//Trigger level
  270. Dim trigCh As Integer '//Trigger channel
  271. Dim sourceByCh() As Integer
  272. ' //Sampling source by channel. E.g.,
  273. ' sourceByCh[0] --> Channel 0 sampling source number
  274. ' sourceByCh[1] --> Chaneel 0 sampling axis number
  275. ' sourceByCh[2] --> Channel 1 sampling source number
  276. ' sourceByCh[3] --> Chaneel 1 sampling axis number
  277. ' .....
  278. ' sourceByCh[30] --> Channel 15 sampling source number
  279. ' sourceByCh[31] --> Chaneel 15 sampling axis number
  280. Sub Initialize()
  281. ReDim sourceByCh(32)
  282. End Sub
  283. End Structure
  284. Structure STR_SAMP_DATA_ADV
  285. Dim tick As Int32
  286. Dim data() As Int32 'Total channel = 16
  287. Sub Initialize()
  288. ReDim data(16)
  289. End Sub
  290. End Structure
  291. Public Const MAX_PT_DIM As Integer = (6)
  292. Structure PTINFO
  293. Dim Dimension As Integer
  294. 'Dim AxisArr%(MAX_PT_DIM) As Integer
  295. Dim AxisArr_0 As Integer
  296. Dim AxisArr_1 As Integer
  297. Dim AxisArr_2 As Integer
  298. Dim AxisArr_3 As Integer
  299. Dim AxisArr_4 As Integer
  300. Dim AxisArr_5 As Integer
  301. End Structure
  302. Structure PTDWL
  303. Dim DwTime As Double '//Unit is ms
  304. End Structure
  305. Structure PTLINE
  306. Dim Dimension As Integer
  307. 'Dim Pos#(MAX_PT_DIM) As Double
  308. Dim Pos_0 As Double
  309. Dim Pos_1 As Double
  310. Dim Pos_2 As Double
  311. Dim Pos_3 As Double
  312. Dim Pos_4 As Double
  313. Dim Pos_5 As Double
  314. End Structure
  315. Public Const MAXHEXLIX As Integer = &H3 'Helix axes is 3.
  316. Public Const MAXARC3 As Integer = &H3 'ARC3 axes is 3.
  317. Public Const MAXARC2 As Integer = &H2 'ARC2 axes is 2.
  318. Structure PTA2CA
  319. 'Dim Index(MAXARC2) As Byte 'Index X,Y
  320. Dim Index_0 As Byte
  321. Dim Index_1 As Byte
  322. 'Dim Center#(MAXARC2) As Double 'Center Arr
  323. Dim Center_0 As Double
  324. Dim Center_1 As Double
  325. Dim Angle As Double 'Angle
  326. End Structure
  327. Structure PTA2CE
  328. 'Dim Index(MAXARC2) As Byte 'Index X,Y
  329. Dim index_0 As Byte
  330. Dim index_1 As Byte
  331. 'Dim Center#(MAXARC2) As Double
  332. Dim Center_0 As Double
  333. Dim Center_1 As Double
  334. 'Dim End_pos(MAXARC2) As Double
  335. Dim End_pos_0 As Double
  336. Dim End_pos_1 As Double
  337. Dim Dir As Short
  338. End Structure
  339. Structure PTA3CA
  340. 'Dim Index(MAXARC3) As Byte 'Index X,Y
  341. Dim Index_0 As Byte
  342. Dim Index_1 As Byte
  343. Dim Index_2 As Byte
  344. 'Dim Center#(MAXARC3) As Double 'Center Arr
  345. Dim Center_0 As Double
  346. Dim Center_1 As Double
  347. Dim Center_2 As Double
  348. 'Dim Noraml(MAXARC3) As Double 'Normal Arr
  349. Dim Noraml_0 As Double
  350. Dim Noraml_1 As Double
  351. Dim Noraml_2 As Double
  352. Dim Angle As Double 'Angle
  353. End Structure
  354. Structure PTA3CE
  355. 'Dim Index(MAXARC3) As Byte 'Index X,Y
  356. Dim index_0 As Byte
  357. Dim index_1 As Byte
  358. Dim index_2 As Byte
  359. 'Dim Center#(MAXARC3) As Double
  360. Dim Center_0 As Double
  361. Dim Center_1 As Double
  362. Dim Center_2 As Double
  363. 'Dim End_pos(MAXARC3) As Double
  364. Dim End_pos_0 As Double
  365. Dim End_pos_1 As Double
  366. Dim End_pos_2 As Double
  367. Dim Dir As Short
  368. End Structure
  369. Structure PTHCA
  370. 'Dim Index(MAXHEXLIX) As Byte 'Index X,Y
  371. Dim Index_0 As Byte
  372. Dim Index_1 As Byte
  373. Dim Index_2 As Byte
  374. 'Dim Center(MAXHEXLIX) As Double 'Center Arr
  375. Dim Center_0 As Double
  376. Dim Center_1 As Double
  377. Dim Center_2 As Double
  378. 'Dim Noraml(MAXHEXLIX) As Double 'Normal Arr
  379. Dim Noraml_0 As Double
  380. Dim Noraml_1 As Double
  381. Dim Noraml_2 As Double
  382. Dim Angle As Double 'Angle
  383. Dim DeltaH As Double
  384. Dim FinalR As Double
  385. End Structure
  386. Structure PTHCE
  387. 'Dim Index(MAXHEXLIX) As Byte 'Index X,Y
  388. Dim Index_0 As Byte
  389. Dim Index_1 As Byte
  390. Dim Index_2 As Byte
  391. 'Dim Center(MAXHEXLIX) As Double 'Center Arr
  392. Dim Center_0 As Double
  393. Dim Center_1 As Double
  394. Dim Center_2 As Double
  395. 'Dim Noraml(MAXHEXLIX) As Double 'Normal Arr
  396. Dim Noraml_0 As Double
  397. Dim Noraml_1 As Double
  398. Dim Noraml_2 As Double
  399. 'Dim End_pos(MAXHEXLIX) As Double 'End Arr
  400. Dim End_pos_0 As Double
  401. Dim End_pos_1 As Double
  402. Dim End_pos_2 As Double
  403. Dim Dir As Short
  404. End Structure
  405. Structure PTSTS
  406. Dim BitSts As UShort 'b0: Is PTB work? [1:working, 0:Stopped]
  407. 'b1: Is point buffer full? [1:full, 0:not full]
  408. 'b2: Is point buffer empty? [1:empty, 0:not empty]
  409. 'b3, b4, b5: Reserved for future
  410. 'b6~: Be always 0
  411. Dim PntBufFreeSpace As UShort
  412. Dim PntBufUsageSpace As UShort
  413. Dim RunningCnt As UInteger
  414. End Structure
  415. Structure LPSTS
  416. Dim MotionLoopLoading As UInteger
  417. Dim HostLoopLoading As UInteger
  418. Dim MotionLoopLoadingMax As UInteger
  419. Dim HostLoopLoadingMax As UInteger
  420. End Structure
  421. Structure DEBUG_DATA
  422. Dim ServoOffCondition As UInteger
  423. Dim DspCmdPos As Double
  424. Dim DspFeedbackPos As Double
  425. Dim FpgaCmdPos As Double
  426. Dim FpgaFeedbackPos As Double
  427. Dim FpgaOutputVoltage As Double
  428. End Structure
  429. Structure DEBUG_STATE
  430. Dim AxisState As UInteger
  431. Dim GroupState As UInteger
  432. Dim AxisSuperState As UInteger
  433. End Structure
  434. 'New ADCNC structure define
  435. '/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
  436. Structure POS_DATA_2D_F64
  437. ' This structure extends original point data contents from "I32" to "F64"
  438. 'for internal computation. It's important to prevent data overflow.
  439. Dim u32_opt As UInteger '// option, [0x00000000, 0xFFFFFFFF]
  440. Dim f64_x As Double '// x-axis component (pulse), [-9223372036854775808, 9223372036854775807]
  441. Dim f64_y As Double '// y-axis component (pulse), [-9223372036854775808, 9223372036854775807]
  442. Dim f64_theta As Double '// x-y plane arc move angle (0.000001 degree), [-360000, 360000]
  443. End Structure
  444. Structure POS_DATA_2D_RPS
  445. '/* This structure adds another variable to record what point was be saved */
  446. Dim u32_opt As UInteger '// option, [0x00000000, 0xFFFFFFFF]
  447. Dim i32_x As Integer '// x-axis component (pulse), [-2147483648, 2147483647]
  448. Dim i32_y As Integer '// y-axis component (pulse), [-2147483648, 2147483647]
  449. Dim i32_theta As Integer '// x-y plane arc move angle (0.000001 degree), [-360000, 360000]
  450. Dim crpi As UInteger '// current reading point index
  451. End Structure
  452. Structure POS_DATA_2D_F64_RPS
  453. '/* This structure adds another variable to record what point was be saved */
  454. Dim u32_opt As UInteger '// option, [0x00000000, 0xFFFFFFFF]
  455. Dim f64_x As Double '// x-axis component (pulse), [-2147483648, 2147483647]
  456. Dim f64_y As Double '// y-axis component (pulse), [-2147483648, 2147483647]
  457. Dim f64_theta As Double '// x-y plane arc move angle (0.000001 degree), [-360000, 360000]
  458. Dim crpi As UInteger '// current reading point index
  459. End Structure
  460. Structure PNT_DATA_2D_EXT
  461. Dim u32_opt As UInteger '// option, [0x00000000,0xFFFFFFFF]
  462. Dim f64_x As Double '// x-axis component (pulse), [-2147483648,2147484647]
  463. Dim f64_y As Double ' // y-axis component (pulse), [-2147483648,2147484647]
  464. Dim f64_theta As Double ' // x-y plane arc move angle (0.000001 degree), [-360000,360000]
  465. Dim f64_acc_0 As Double ' // acceleration rate (pulse/ss), [0,2147484647]
  466. Dim f64_acc_1 As Double ' // acceleration rate (pulse/ss), [0,2147484647]
  467. Dim f64_acc_2 As Double ' // acceleration rate (pulse/ss), [0,2147484647]
  468. Dim f64_acc_3 As Double ' // acceleration rate (pulse/ss), [0,2147484647]
  469. Dim f64_dec_0 As Double ' // deceleration rate (pulse/ss), [0,2147484647]
  470. Dim f64_dec_1 As Double ' // deceleration rate (pulse/ss), [0,2147484647]
  471. Dim f64_dec_2 As Double ' // deceleration rate (pulse/ss), [0,2147484647]
  472. Dim f64_dec_3 As Double ' // deceleration rate (pulse/ss), [0,2147484647]
  473. Dim crossover As Integer
  474. Dim Iboundary As Integer ' // initial boundary
  475. Dim f64_vi_0 As Double ' // initial velocity (pulse/s), [0,2147484647]
  476. Dim f64_vi_1 As Double ' // initial velocity (pulse/s), [0,2147484647]
  477. Dim f64_vi_2 As Double ' // initial velocity (pulse/s), [0,2147484647]
  478. Dim f64_vi_3 As Double ' // initial velocity (pulse/s), [0,2147484647]
  479. Dim vi_cmpr As UInteger
  480. Dim f64_vm_0 As Double ' // maximum velocity (pulse/s), [0,2147484647]
  481. Dim f64_vm_1 As Double ' // maximum velocity (pulse/s), [0,2147484647]
  482. Dim f64_vm_2 As Double ' // maximum velocity (pulse/s), [0,2147484647]
  483. Dim f64_vm_3 As Double ' // maximum velocity (pulse/s), [0,2147484647]
  484. Dim vm_cmpr As UInteger
  485. Dim f64_ve_0 As Double '// ending velocity (pulse/s), [0,2147484647]
  486. Dim f64_ve_1 As Double '// ending velocity (pulse/s), [0,2147484647]
  487. Dim f64_ve_2 As Double '// ending velocity (pulse/s), [0,2147484647]
  488. Dim f64_ve_3 As Double '// ending velocity (pulse/s), [0,2147484647]
  489. Dim ve_cmpr As UInteger
  490. Dim Eboundary As Integer '// end boundary
  491. Dim f64_dist As Double '// point distance
  492. Dim f64_angle As Double '// path angle between previous & current point
  493. Dim f64_radius As Double '// point radiua (used in arc move)
  494. Dim i32_arcstate As Integer
  495. Dim spt As UInteger '// speed profile type
  496. '// unit time measured by DSP sampling period
  497. Dim t_0 As Double
  498. Dim t_1 As Double
  499. Dim t_2 As Double
  500. Dim t_3 As Double
  501. '// Horizontal & Vertical line flag
  502. Dim HorizontalFlag As Integer
  503. Dim VerticalFlag As Integer
  504. End Structure
  505. Structure DO_DATA_EX
  506. Dim Do_ValueL As UInteger
  507. Dim Do_ValueH As UInteger
  508. End Structure
  509. Structure DI_DATA_EX
  510. Dim Di_ValueL As UInteger
  511. Dim Di_ValueH As UInteger
  512. End Structure
  513. ' //**********************************************
  514. '// New header functions; 20151102
  515. '//**********************************************
  516. Structure MCMP_POINT
  517. Dim axisX As Double '// x axis data for multi-dimension comparator 0
  518. Dim axisY As Double '// y axis data for multi-dimension comparator 1
  519. Dim axisZ As Double '// z axis data for multi-dimension comparator 2
  520. Dim axisU As Double '// u axis data for multi-dimension comparator 3
  521. Dim chInBit As Integer '// pwm output channel in bit format; 20150609
  522. End Structure
  523. '===============================================================
  524. ' the reading slave module information for PCIe-8334_8
  525. '===============================================================
  526. <StructLayout(LayoutKind.Sequential)> Public Structure EC_MODULE_INFO
  527. Public VendorID As Integer
  528. Public ProductCode As Integer
  529. Public RevisionNo As Integer
  530. Public TotalAxisNum As Integer
  531. <MarshalAs(UnmanagedType.ByValArray, SizeConst:=64)> Public Axis_ID() As Integer
  532. <MarshalAs(UnmanagedType.ByValArray, SizeConst:=64)> Public Axis_ID_manual() As Integer
  533. <MarshalAs(UnmanagedType.ByValArray, SizeConst:=32)> Public All_ModuleType() As Integer
  534. Public DI_ModuleNum As Integer
  535. <MarshalAs(UnmanagedType.ByValArray, SizeConst:=32)> Public DI_ModuleType() As Integer
  536. Public DO_ModuleNum As Integer
  537. <MarshalAs(UnmanagedType.ByValArray, SizeConst:=32)> Public DO_ModuleType() As Integer
  538. Public AI_ModuleNum As Integer
  539. <MarshalAs(UnmanagedType.ByValArray, SizeConst:=32)> Public AI_ModuleType() As Integer
  540. Public AO_ModuleNum As Integer
  541. <MarshalAs(UnmanagedType.ByValArray, SizeConst:=32)> Public AO_ModuleType() As Integer
  542. <MarshalAs(UnmanagedType.ByValTStr, SizeConst:=128)> Public Name As String
  543. End Structure
  544. <StructLayout(LayoutKind.Sequential)> Public Structure EC_Sub_MODULE_INFO
  545. Public VendorID As Integer
  546. Public ProductCode As Integer
  547. Public RevisionNo As Integer
  548. Public TotalSubModuleNum As Integer
  549. <MarshalAs(UnmanagedType.ByValArray, SizeConst:=32)> Public SubModuleID() As Integer
  550. End Structure
  551. <StructLayout(LayoutKind.Sequential)> Public Structure EC_Sub_MODULE_OD_INFO
  552. <MarshalAs(UnmanagedType.ByValTStr, SizeConst:=128)> Public DataName As String
  553. Public BitLength As Integer
  554. Public DataType As Integer
  555. <MarshalAs(UnmanagedType.ByValTStr, SizeConst:=64)> Public DataTypeName As String
  556. End Structure
  557. Structure Speed_profile
  558. Dim VS As Integer 'start velocity ,range 1 ~ 4,000,000 (pulse)
  559. Dim Vmax As Integer 'Maximum velocity ,range 1 ~ 4,000,000
  560. Dim Acc As Integer 'Acceleration ,range 1 ~ 500000000
  561. Dim Dec As Integer 'Deceleration ,range 1 ~ 500000000
  562. Dim s_factor As Double 'range 0 ~ 10
  563. End Structure
  564. <StructLayout(LayoutKind.Sequential)> Public Structure PDO_OFFSET
  565. Public DataType As UShort
  566. Public ByteSize As UInteger
  567. Public ByteOffset As UInteger
  568. Public Index As UInteger
  569. <MarshalAs(UnmanagedType.ByValTStr, SizeConst:=128)> Public NameArr As String
  570. End Structure
  571. <StructLayout(LayoutKind.Sequential)> Public Structure OD_DESC_ENTRY
  572. Dim DataTypeNum As UInteger
  573. <MarshalAs(UnmanagedType.ByValTStr, SizeConst:=64)> Public DataTypeName As String
  574. Dim BitLen As UInteger
  575. <MarshalAs(UnmanagedType.ByValTStr, SizeConst:=64)> Public Description As String
  576. <MarshalAs(UnmanagedType.ByValTStr, SizeConst:=64)> Public Access As String
  577. <MarshalAs(UnmanagedType.ByValTStr, SizeConst:=64)> Public PdoMapInfo As String
  578. <MarshalAs(UnmanagedType.ByValTStr, SizeConst:=64)> Public UnitType As String
  579. <MarshalAs(UnmanagedType.ByValArray, SizeConst:=64)> Public DefaultValue() As Byte
  580. <MarshalAs(UnmanagedType.ByValArray, SizeConst:=64)> Public MinValue() As Byte
  581. <MarshalAs(UnmanagedType.ByValArray, SizeConst:=64)> Public MaxValue() As Byte
  582. End Structure
  583. ' For Position latch
  584. Structure LATCH_POINT
  585. Dim position As Double '// Latched position
  586. Dim ltcSrcInBit As Integer '// Latch source: bit 0~7: DI; bit 8~11: trigger channel
  587. End Structure
  588. Structure TCMP_EX_POINT
  589. Dim outputPinInBit As Integer 'Trigger output mapping
  590. Dim position_f64 As Double 'reserved
  591. Dim position_I32 As Integer
  592. End Structure
  593. Structure STR_MOVE_SETTING
  594. Dim CmdType As Byte '// Execute function define.
  595. Dim Pos As Double '// Relative move distance or absolute move position.
  596. Dim Vs As Double '// Start velocity.
  597. Dim Vm As Double '// Maximum velocity.
  598. Dim Ve As Double '// Time for accelerating.
  599. Dim Acc As Double '// Time for decelerating.
  600. Dim Dec As Double '// S curve setting for accelerating.
  601. Dim MiliSecond As Double '// Dwell time in milisecond.
  602. End Structure
  603. Enum E_ActionType As Byte
  604. E_ACTION_TYPE_NOP = 0
  605. E_ACTION_TYPE_TR = 1
  606. E_ACTION_TYPE_TA = 2
  607. E_ACTION_TYPE_SR = 3
  608. E_ACTION_TYPE_SA = 4
  609. E_ACTION_TYPE_DWELL = 5
  610. End Enum
  611. 'APS Library+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
  612. ' System & Initialization
  613. Declare Function APS_initial Lib "APS168x64.dll" (ByRef BoardID_InBits As Integer, ByVal Mode As Integer) As Integer
  614. Declare Function APS_close Lib "APS168x64.dll" () As Integer
  615. Declare Function APS_version Lib "APS168x64.dll" () As Integer
  616. Declare Function APS_device_driver_version Lib "APS168x64.dll" (ByVal Board_ID As Integer) As Integer
  617. Declare Function APS_get_axis_info Lib "APS168x64.dll" (ByVal Axis_ID As Integer, ByRef Board_ID As Integer, ByRef Axis_No As Integer, ByRef Port_ID As Integer, ByRef Module_ID As Integer) As Integer
  618. Declare Function APS_set_board_param Lib "APS168x64.dll" (ByVal Board_ID As Integer, ByVal BOD_Param_No As Integer, ByVal BOD_Param As Integer) As Integer
  619. Declare Function APS_get_board_param Lib "APS168x64.dll" (ByVal Board_ID As Integer, ByVal BOD_Param_No As Integer, ByRef BOD_Param As Integer) As Integer
  620. Declare Function APS_set_axis_param Lib "APS168x64.dll" (ByVal Axis_ID As Integer, ByVal AXS_Param_No As Integer, ByVal AXS_Param As Integer) As Integer
  621. Declare Function APS_get_axis_param Lib "APS168x64.dll" (ByVal Axis_ID As Integer, ByVal AXS_Param_No As Integer, ByRef AXS_Param As Integer) As Integer
  622. Declare Function APS_get_system_timer Lib "APS168x64.dll" (ByVal Board_ID As Integer, ByRef SysTimer As Integer) As Integer
  623. Declare Function APS_get_device_info Lib "APS168x64.dll" (ByVal Board_ID As Integer, ByVal Info_No As Integer, ByRef Info As Integer) As Integer
  624. Declare Function APS_get_card_name Lib "APS168x64.dll" (ByVal Board_ID As Integer, ByRef CardName As Integer) As Integer
  625. Declare Function APS_disable_device Lib "APS168x64.dll" (ByVal DeviceName As Integer) As Integer
  626. Declare Function APS_get_first_axisId Lib "APS168x64.dll" (ByVal Board_ID As Integer, ByRef StartAxisID As Integer, ByRef TotalAxisNum As Integer) As Integer
  627. Declare Function APS_set_security_key Lib "APS168x64.dll" (ByVal Board_ID As Integer, ByVal OldPassword As Integer, ByVal NewPassword As Integer) As Integer
  628. Declare Function APS_check_security_key Lib "APS168x64.dll" (ByVal Board_ID As Integer, ByVal Password As Integer) As Integer
  629. Declare Function APS_reset_security_key Lib "APS168x64.dll" (ByVal Board_ID As Integer) As Integer
  630. Declare Function APS_load_param_from_file Lib "APS168x64.dll" (ByVal pXMLFile As String) As Integer
  631. Declare Function APS_save_param_to_file Lib "APS168x64.dll" (ByVal Board_ID As Integer, ByVal pXMLFile As String) As Integer
  632. Declare Function APS_get_system_loading Lib "APS168x64.dll" (ByVal Board_ID As Integer, ByRef Loading1 As Double, ByRef Loading2 As Double, ByRef Loading3 As Double, ByRef Loading4 As Double) As Integer
  633. 'Control driver mode [Only for PCI-8254/8]
  634. Declare Function APS_get_curr_sys_ctrl_mode Lib "APS168x64.dll" (ByVal Axis_ID As Integer, ByRef Mode As Integer) As Integer
  635. 'Flash functions
  636. Declare Function APS_save_parameter_to_flash Lib "APS168x64.dll" (ByVal Board_ID As Integer) As Integer
  637. Declare Function APS_load_parameter_from_flash Lib "APS168x64.dll" (ByVal Board_ID As Integer) As Integer
  638. Declare Function APS_load_parameter_from_default Lib "APS168x64.dll" (ByVal Board_ID As Integer) As Integer
  639. '
  640. 'SSCNET-3 functions [Only for PCI-8392(H)]
  641. Declare Function APS_start_sscnet Lib "APS168x64.dll" (ByVal Board_ID As Integer, ByRef AxisFound_InBits As Integer) As Integer
  642. Declare Function APS_stop_sscnet Lib "APS168x64.dll" (ByVal Board_ID As Integer) As Integer
  643. Declare Function APS_get_sscnet_servo_param Lib "APS168x64.dll" (ByVal Axis_ID As Integer, ByVal Para_No1 As Integer, ByRef Para_Dat1 As Integer, ByVal Para_No2 As Integer, ByRef Para_Dat2 As Integer) As Integer
  644. Declare Function APS_set_sscnet_servo_param Lib "APS168x64.dll" (ByVal Axis_ID As Integer, ByVal Para_No1 As Integer, ByVal Para_Dat1 As Integer, ByVal Para_No2 As Integer, ByVal Para_Dat2 As Integer) As Integer
  645. Declare Function APS_get_sscnet_servo_alarm Lib "APS168x64.dll" (ByVal Axis_ID As Integer, ByRef Alarm_No As Integer, ByRef Alarm_Detail As Integer) As Integer
  646. Declare Function APS_reset_sscnet_servo_alarm Lib "APS168x64.dll" (ByVal Axis_ID As Integer) As Integer
  647. Declare Function APS_save_sscnet_servo_param Lib "APS168x64.dll" (ByVal Board_ID As Integer) As Integer
  648. Declare Function APS_get_sscnet_servo_abs_position Lib "APS168x64.dll" (ByVal Axis_ID As Integer, ByRef Cyc_Cnt As Integer, ByRef Res_Cnt As Integer) As Integer
  649. Declare Function APS_save_sscnet_servo_abs_position Lib "APS168x64.dll" (ByVal Board_ID As Integer) As Integer
  650. Declare Function APS_load_sscnet_servo_abs_position Lib "APS168x64.dll" (ByVal Axis_ID As Integer, ByVal Abs_Option As Integer, ByRef Cyc_Cnt As Integer, ByRef Res_Cnt As Integer) As Integer
  651. Declare Function APS_get_sscnet_link_status Lib "APS168x64.dll" (ByVal Board_ID As Integer, ByRef Link_Status As Integer) As Integer
  652. Declare Function APS_set_sscnet_servo_monitor_src Lib "APS168x64.dll" (ByVal Axis_ID As Integer, ByVal Mon_No As Integer, ByVal Mon_Src As Integer) As Integer
  653. Declare Function APS_get_sscnet_servo_monitor_src Lib "APS168x64.dll" (ByVal Axis_ID As Integer, ByVal Mon_No As Integer, ByRef Mon_Src As Integer) As Integer
  654. Declare Function APS_get_sscnet_servo_monitor_data Lib "APS168x64.dll" (ByVal Axis_ID As Integer, ByVal Arr_Size As Integer, ByVal Data_Arr() As Integer) As Integer
  655. Declare Function APS_set_sscnet_control_mode Lib "APS168x64.dll" (ByVal Axis_ID As Integer, ByVal Mode As Integer) As Integer
  656. Declare Function APS_set_sscnet_abs_enable Lib "APS168x64.dll" (ByVal Board_ID As Integer, ByVal Opt As Integer) As Integer
  657. Declare Function APS_set_sscnet_abs_enable_by_axis Lib "APS168x64.dll" (ByVal Axis_ID As Integer, ByVal Opt As Integer) As Integer
  658. '
  659. 'PWM functions
  660. Declare Function APS_set_pwm_width Lib "APS168x64.dll" (ByVal Board_ID As Integer, ByVal PWM_Ch As Integer, ByVal Width As Integer) As Integer
  661. Declare Function APS_get_pwm_width Lib "APS168x64.dll" (ByVal Board_ID As Integer, ByVal PWM_Ch As Integer, ByRef Width As Integer) As Integer
  662. Declare Function APS_set_pwm_frequency Lib "APS168x64.dll" (ByVal Board_ID As Integer, ByVal PWM_Ch As Integer, ByVal Frequency As Integer) As Integer
  663. Declare Function APS_get_pwm_frequency Lib "APS168x64.dll" (ByVal Board_ID As Integer, ByVal PWM_Ch As Integer, ByRef Frequency As Integer) As Integer
  664. Declare Function APS_set_pwm_on Lib "APS168x64.dll" (ByVal Board_ID As Integer, ByVal PWM_Ch As Integer, ByVal PWM_On As Integer) As Integer
  665. 'Simultaneous move
  666. Declare Function APS_set_relative_simultaneous_move Lib "APS168x64.dll" (ByVal Dimension As Integer, ByVal Axis_ID_Array() As Integer, ByVal Distance_Array() As Integer, ByVal Max_Speed_Array() As Integer) As Integer
  667. Declare Function APS_set_absolute_simultaneous_move Lib "APS168x64.dll" (ByVal Dimension As Integer, ByVal Axis_ID_Array() As Integer, ByVal Position_Array() As Integer, ByVal Max_Speed_Array() As Integer) As Integer
  668. Declare Function APS_start_simultaneous_move Lib "APS168x64.dll" (ByVal Axis_ID As Integer) As Integer
  669. Declare Function APS_stop_simultaneous_move Lib "APS168x64.dll" (ByVal Axis_ID As Integer) As Integer
  670. Declare Function APS_set_velocity_simultaneous_move Lib "APS168x64.dll" (ByVal Dimension As Integer, ByVal Axis_ID_Array() As Integer, ByRef Max_Speed_Array As Integer) As Integer
  671. 'Declare Function APS_Release_simultaneous_move Lib "APS168x64.dll" (ByVal Axis_ID As Integer) As Integer
  672. Declare Function APS_release_simultaneous_move Lib "APS168x64.dll" (ByVal Axis_ID As Integer) As Integer
  673. Declare Function APS_emg_stop_simultaneous_move Lib "APS168x64.dll" (ByVal Axis_ID As Integer) As Integer
  674. 'Override functions [Only for MNET series]
  675. Declare Function APS_speed_override Lib "APS168x64.dll" (ByVal Axis_ID As Integer, ByVal MaxSpeed As Integer) As Integer
  676. Declare Function APS_relative_move_ovrd Lib "APS168x64.dll" (ByVal Axis_ID As Integer, ByVal Distance As Integer, ByVal Max_Speed As Integer) As Integer
  677. Declare Function APS_absolute_move_ovrd Lib "APS168x64.dll" (ByVal Axis_ID As Integer, ByVal Position As Integer, ByVal Max_Speed As Integer) As Integer
  678. 'VAO function(Laser function)
  679. Declare Function APS_set_vao_param Lib "APS168x64.dll" (ByVal Board_ID As Integer, ByVal Param_No As Integer, ByVal Param_Val As Integer) As Integer
  680. Declare Function APS_get_vao_param Lib "APS168x64.dll" (ByVal Board_ID As Integer, ByVal Param_No As Integer, ByRef Param_Val As Integer) As Integer
  681. Declare Function APS_set_vao_table Lib "APS168x64.dll" (ByVal Board_ID As Integer, ByVal Table_No As Integer, ByVal MinVelocity As Integer, ByVal VelInterval As Integer, ByVal TotalPoints As Integer, ByVal MappingDataArray() As Integer) As Integer
  682. Declare Function APS_switch_vao_table Lib "APS168x64.dll" (ByVal Board_ID As Integer, ByVal Table_No As Integer) As Integer
  683. Declare Function APS_start_vao Lib "APS168x64.dll" (ByVal Board_ID As Integer, ByVal Output_Ch As Integer, ByVal Enable As Integer) As Integer
  684. Declare Function APS_get_vao_status Lib "APS168x64.dll" (ByVal Board_ID As Integer, ByRef Status As Integer) As Integer
  685. Declare Function APS_check_vao_param Lib "APS168x64.dll" (ByVal Board_ID As Integer, ByVal Table_No As Integer, ByRef Status As Integer) As Integer
  686. Declare Function APS_set_vao_param_ex Lib "APS168x64.dll" (ByVal Board_ID As Integer, ByVal Table_No As Integer, ByRef VaoData As VAO_DATA) As Integer
  687. Declare Function APS_get_vao_param_ex Lib "APS168x64.dll" (ByVal Board_ID As Integer, ByVal Table_No As Integer, ByRef VaoData As VAO_DATA) As Integer
  688. 'ODM functions
  689. Declare Function APS_start_vao_by_mode Lib "APS168x64.dll" (ByVal Board_ID As Integer, ByVal ChannelInBit As Integer, ByVal Mode As Integer, ByVal Enable As Integer) As Integer
  690. Declare Function APS_set_vao_pwm_burst_count Lib "APS168x64.dll" (ByVal Board_ID As Integer, ByVal Table_No As Integer, ByVal Count As Integer) As Integer
  691. ' Motion IO & motion status
  692. Declare Function APS_get_command Lib "APS168x64.dll" (ByVal Axis_ID As Integer, ByRef CommandCnt As Integer) As Integer
  693. Declare Function APS_set_command Lib "APS168x64.dll" (ByVal Axis_ID As Integer, ByVal CommandCnt As Integer) As Integer
  694. Declare Function APS_motion_status Lib "APS168x64.dll" (ByVal Axis_ID As Integer) As Integer
  695. Declare Function APS_motion_io_status Lib "APS168x64.dll" (ByVal Axis_ID As Integer) As Integer
  696. Declare Function APS_set_servo_on Lib "APS168x64.dll" (ByVal Axis_ID As Integer, ByVal Servo_On As Integer) As Integer
  697. Declare Function APS_get_position Lib "APS168x64.dll" (ByVal Axis_ID As Integer, ByRef Position As Integer) As Integer
  698. Declare Function APS_set_position Lib "APS168x64.dll" (ByVal Axis_ID As Integer, ByVal Position As Integer) As Integer
  699. Declare Function APS_get_command_velocity Lib "APS168x64.dll" (ByVal Axis_ID As Integer, ByRef Velocity As Integer) As Integer
  700. Declare Function APS_get_feedback_velocity Lib "APS168x64.dll" (ByVal Axis_ID As Integer, ByRef Velocity As Integer) As Integer
  701. Declare Function APS_get_error_position Lib "APS168x64.dll" (ByVal Axis_ID As Integer, ByRef Err_Pos As Integer) As Integer
  702. Declare Function APS_get_target_position Lib "APS168x64.dll" (ByVal Axis_ID As Integer, ByRef Targ_Pos As Integer) As Integer
  703. '
  704. ' Single axis motion
  705. Declare Function APS_relative_move Lib "APS168x64.dll" (ByVal Axis_ID As Integer, ByVal Distance As Integer, ByVal Max_Speed As Integer) As Integer
  706. Declare Function APS_absolute_move Lib "APS168x64.dll" (ByVal Axis_ID As Integer, ByVal Position As Integer, ByVal Max_Speed As Integer) As Integer
  707. Declare Function APS_velocity_move Lib "APS168x64.dll" (ByVal Axis_ID As Integer, ByVal Max_Speed As Integer) As Integer
  708. Declare Function APS_home_move Lib "APS168x64.dll" (ByVal Axis_ID As Integer) As Integer
  709. Declare Function APS_stop_move Lib "APS168x64.dll" (ByVal Axis_ID As Integer) As Integer
  710. Declare Function APS_emg_stop Lib "APS168x64.dll" (ByVal Axis_ID As Integer) As Integer
  711. Declare Function APS_relative_move2 Lib "APS168x64.dll" (ByVal Axis_ID As Integer, ByVal Distance As Integer, ByVal Start_Speed As Integer, ByVal Max_Speed As Integer, ByVal End_Speed As Integer, ByVal Acc_Rate As Integer, ByVal Dec_Rate As Integer) As Integer
  712. Declare Function APS_absolute_move2 Lib "APS168x64.dll" (ByVal Axis_ID As Integer, ByVal Position As Integer, ByVal Start_Speed As Integer, ByVal Max_Speed As Integer, ByVal End_Speed As Integer, ByVal Acc_Rate As Integer, ByVal Dec_Rate As Integer) As Integer
  713. Declare Function APS_home_move2 Lib "APS168x64.dll" (ByVal Axis_ID As Integer, ByVal Driection As Integer, ByVal Acc As Integer, ByVal Start_Speed As Integer, ByVal Max_Speed As Integer, ByVal ORG_Speed As Integer) As Integer
  714. Declare Function APS_home_escape Lib "APS168x64.dll" (ByVal Axis_ID As Integer) As Integer
  715. ' JOG functions [Only for PCI-8392, PCI-8253/56]
  716. Declare Function APS_set_jog_param Lib "APS168x64.dll" (ByVal Axis_ID As Integer, ByRef pStr_Jog As JOG_DATA, ByVal Mask As Integer) As Integer
  717. Declare Function APS_get_jog_param Lib "APS168x64.dll" (ByVal Axis_ID As Integer, ByRef pStr_Jog As JOG_DATA) As Integer
  718. Declare Function APS_jog_mode_switch Lib "APS168x64.dll" (ByVal Axis_ID As Integer, ByVal Turn_No As Integer) As Integer
  719. Declare Function APS_jog_start Lib "APS168x64.dll" (ByVal Axis_ID As Integer, ByVal STA_On As Integer) As Integer
  720. '
  721. ' Interpolation
  722. Declare Function APS_absolute_linear_move Lib "APS168x64.dll" (ByVal Dimension As Integer, ByVal Axis_ID_Array() As Integer, ByVal Position_Array() As Integer, ByVal Max_Linear_Speed As Integer) As Integer
  723. Declare Function APS_relative_linear_move Lib "APS168x64.dll" (ByVal Dimension As Integer, ByVal Axis_ID_Array() As Integer, ByVal Distance_Array() As Integer, ByVal Max_Linear_Speed As Integer) As Integer
  724. Declare Function APS_absolute_arc_move Lib "APS168x64.dll" (ByVal Dimension As Integer, ByVal Axis_ID_Array() As Integer, ByVal Center_Pos_Array() As Integer, ByVal Max_Arc_Speed As Integer, ByVal Angle As Integer) As Integer
  725. Declare Function APS_relative_arc_move Lib "APS168x64.dll" (ByVal Dimension As Integer, ByVal Axis_ID_Array() As Integer, ByVal Center_Offset_Array() As Integer, ByVal Max_Arc_Speed As Integer, ByVal Angle As Integer) As Integer
  726. Declare Function APS_absolute_arc_move_f Lib "APS168x64.dll" (ByVal Dimension As Integer, ByVal Axis_ID_Array() As Integer, ByVal Center_Pos_Array() As Integer, ByVal Max_Arc_Speed As Integer, ByVal Angle As Double) As Integer
  727. Declare Function APS_relative_arc_move_f Lib "APS168x64.dll" (ByVal Dimension As Integer, ByVal Axis_ID_Array() As Integer, ByVal Center_Offset_Array() As Integer, ByVal Max_Arc_Speed As Integer, ByVal Angle As Double) As Integer
  728. '
  729. ' Helical interpolation [Only for PCI-8392, PCI-8253/56]
  730. Declare Function APS_absolute_helix_move Lib "APS168x64.dll" (ByVal Dimension As Integer, ByVal Axis_ID_Array() As Integer, ByVal Center_Pos_Array() As Integer, ByVal Max_Arc_Speed As Integer, ByVal Pitch As Integer, ByVal TotalHeight As Integer, ByVal CwOrCcw As Integer) As Integer
  731. Declare Function APS_relative_helix_move Lib "APS168x64.dll" (ByVal Dimension As Integer, ByVal Axis_ID_Array() As Integer, ByVal Center_PosOffset_Array() As Integer, ByVal Max_Arc_Speed As Integer, ByVal Pitch As Integer, ByVal TotalHeight As Integer, ByVal CwOrCcw As Integer) As Integer
  732. '
  733. 'Helical interpolation [For PCI(e)-8154/58]
  734. Declare Function APS_absolute_helical_move Lib "APS168x64.dll" (ByVal Axis_ID_Array() As Integer, ByVal Center_Pos_Array() As Integer, ByVal End_Pos_Array() As Integer, ByVal Pitch As Integer, ByVal Dir As Integer, ByVal Max_Speed As Integer) As Integer
  735. Declare Function APS_relative_helical_move Lib "APS168x64.dll" (ByVal Axis_ID_Array() As Integer, ByVal Center_Offset_Array() As Integer, ByVal End_Offset_Array() As Integer, ByVal Pitch As Integer, ByVal Dir As Integer, ByVal Max_Speed As Integer) As Integer
  736. ' Circular interpolation( Support 2D and 3D ) [Only for PCI-8392, PCI-8253/56]
  737. Declare Function APS_absolute_arc_move_3pe Lib "APS168x64.dll" (ByVal Dimension As Integer, ByVal Axis_ID_Array() As Integer, ByVal Pass_Pos_Array() As Integer, ByVal End_Pos_Array() As Integer, ByVal Max_Arc_Speed As Integer) As Integer
  738. Declare Function APS_relative_arc_move_3pe Lib "APS168x64.dll" (ByVal Dimension As Integer, ByVal Axis_ID_Array() As Integer, ByVal Pass_PosOffset_Array() As Integer, ByVal End_PosOffset_Array() As Integer, ByVal Max_Arc_Speed As Integer) As Integer
  739. ' Interrupt functions
  740. Declare Function APS_int_enable Lib "APS168x64.dll" (ByVal Board_ID As Integer, ByVal Enable As Integer) As Integer
  741. Declare Function APS_set_int_factor Lib "APS168x64.dll" (ByVal Board_ID As Integer, ByVal Item_No As Integer, ByVal Factor_No As Integer, ByVal Enable As Integer) As Integer
  742. Declare Function APS_get_int_factor Lib "APS168x64.dll" (ByVal Board_ID As Integer, ByVal Item_No As Integer, ByVal Factor_No As Integer, ByRef Enable As Integer) As Integer
  743. Declare Function APS_set_int_factorH Lib "APS168x64.dll" (ByVal Board_ID As Integer, ByVal Item_No As Integer, ByVal Factor_No As Integer, ByVal Enable As Integer) As Integer
  744. Declare Function APS_int_no_to_handle Lib "APS168x64.dll" (ByVal Int_No As Integer) As Integer
  745. Declare Function APS_set_field_bus_int_factor_di Lib "APS168x64.dll" (ByVal Board_ID As Integer, ByVal BUS_No As Integer, ByVal MOD_No As Integer, ByVal bitsOfCheck As Integer) As Integer
  746. Declare Function APS_get_field_bus_int_factor_di Lib "APS168x64.dll" (ByVal Board_ID As Integer, ByVal BUS_No As Integer, ByVal MOD_No As Integer, bitsOfCheck As Integer) As Integer
  747. '[Only for PCI-7856 motion interrupt]
  748. Declare Function APS_set_field_bus_int_factor_motion Lib "APS168x64.dll" (ByVal Axis_ID As Integer, ByVal Factor_No As Integer, ByVal Enable As Integer) As Integer
  749. Declare Function APS_get_field_bus_int_factor_motion Lib "APS168x64.dll" (ByVal Axis_ID As Integer, ByVal Factor_No As Integer, ByVal Enable As Integer) As Integer
  750. Declare Function APS_set_field_bus_int_factor_error Lib "APS168x64.dll" (ByVal Axis_ID As Integer, ByVal Factor_No As Integer, ByVal Enable As Integer) As Integer
  751. Declare Function APS_get_field_bus_int_factor_error Lib "APS168x64.dll" (ByVal Axis_ID As Integer, ByVal Factor_No As Integer, ByVal Enable As Integer) As Integer
  752. Declare Function APS_reset_field_bus_int_motion Lib "APS168x64.dll" (ByVal Axis_ID As Integer) As Integer
  753. Declare Function APS_wait_field_bus_error_int_motion Lib "APS168x64.dll" (ByVal Axis_ID As Integer, ByVal Time_Out As Integer) As Integer
  754. '
  755. Declare Function APS_wait_single_int Lib "APS168x64.dll" (ByVal Int_No As Integer, ByVal Time_Out As Integer) As Integer
  756. Declare Function APS_wait_multiple_int Lib "APS168x64.dll" (ByVal Int_Count As Integer, ByVal Int_No_Array() As Integer, ByVal Wait_All As Integer, ByVal Time_Out As Integer) As Integer
  757. Declare Function APS_reset_int Lib "APS168x64.dll" (ByVal Int_No As Integer) As Integer
  758. Declare Function APS_set_int Lib "APS168x64.dll" (ByVal Int_No As Integer) As Integer
  759. ' [Only for PCI-8154/58]
  760. Declare Function APS_wait_error_int Lib "APS168x64.dll" (ByVal Board_ID As Integer, ByVal Item_No As Integer, ByVal Time_Out As Integer) As Integer
  761. '
  762. ' Sampling functions [Only for PCI-8392, PCI-8253/56]
  763. Declare Function APS_set_sampling_param Lib "APS168x64.dll" (ByVal Board_ID As Integer, ByVal ParaNum As Integer, ByVal ParaDat As Integer) As Integer
  764. Declare Function APS_get_sampling_param Lib "APS168x64.dll" (ByVal Board_ID As Integer, ByVal ParaNum As Integer, ByRef ParaDat As Integer) As Integer
  765. Declare Function APS_wait_trigger_sampling Lib "APS168x64.dll" (ByVal Board_ID As Integer, ByVal Length As Integer, ByVal PreTrgLen As Integer, ByVal TimeOutMs As Integer, ByRef DataArr As STR_SAMP_DATA_4CH) As Integer
  766. Declare Function APS_wait_trigger_sampling_async Lib "APS168x64.dll" (ByVal Board_ID As Object, ByVal Length As Integer, ByVal PreTrgLen As Integer, ByVal TimeOutMs As Integer, ByRef DataArr As STR_SAMP_DATA_4CH) As Integer
  767. Declare Function APS_get_sampling_count Lib "APS168x64.dll" (ByVal Board_ID As Integer, ByRef SampCnt As Integer) As Integer
  768. Declare Function APS_stop_wait_sampling Lib "APS168x64.dll" (ByVal Board_ID As Integer) As Integer
  769. Declare Function APS_auto_sampling Lib "APS168x64.dll" (ByVal Board_ID As Integer, ByVal StartStop As Integer) As Integer
  770. Declare Function APS_get_sampling_data Lib "APS168x64.dll" (ByVal Board_ID As Integer, ByVal Length As Integer, ByRef DataArr As STR_SAMP_DATA_4CH, ByVal Status As Integer) As Integer
  771. 'DIO & AIO functions
  772. Declare Function APS_write_d_output Lib "APS168x64.dll" (ByVal Board_ID As Integer, ByVal DO_Group As Integer, ByVal DO_Data As Integer) As Integer
  773. Declare Function APS_read_d_output Lib "APS168x64.dll" (ByVal Board_ID As Integer, ByVal DO_Group As Integer, ByRef DO_Data As Integer) As Integer
  774. Declare Function APS_read_d_input Lib "APS168x64.dll" (ByVal Board_ID As Integer, ByVal DI_Group As Integer, ByRef DI_Data As Integer) As Integer
  775. Declare Function APS_write_d_channel_output Lib "APS168x64.dll" (ByVal Board_ID As Integer, ByVal DO_Group As Integer, ByVal Ch_No As Integer, ByVal DO_Data As Integer) As Integer
  776. Declare Function APS_read_d_channel_output Lib "APS168x64.dll" (ByVal Board_ID As Integer, ByVal DO_Group As Integer, ByVal Ch_No As Integer, ByRef DO_Data As Integer) As Integer
  777. Declare Function APS_read_d_channel_input Lib "APS168x64.dll" (ByVal Board_ID As Integer, ByVal DI_Group As Integer, ByVal Ch_No As Integer, ByRef DI_Data As Integer) As Integer
  778. '
  779. Declare Function APS_read_a_input_value Lib "APS168x64.dll" (ByVal Board_ID As Integer, ByVal Channel_No As Integer, ByRef Convert_Data As Double) As Integer
  780. Declare Function APS_read_a_input_data Lib "APS168x64.dll" (ByVal Board_ID As Integer, ByVal Channel_No As Integer, ByRef Raw_Data As Integer) As Integer
  781. Declare Function APS_write_a_output_value Lib "APS168x64.dll" (ByVal Board_ID As Integer, ByVal Channel_No As Integer, ByVal Convert_Data As Double) As Integer
  782. Declare Function APS_write_a_output_data Lib "APS168x64.dll" (ByVal Board_ID As Integer, ByVal Channel_No As Integer, ByVal Raw_Data As Integer) As Integer
  783. '
  784. ' Point table move
  785. Declare Function APS_set_point_table Lib "APS168x64.dll" (ByVal Axis_ID As Integer, ByVal Index As Integer, ByRef Point As POINT_DATA) As Integer
  786. Declare Function APS_get_point_table Lib "APS168x64.dll" (ByVal Axis_ID As Integer, ByVal Index As Integer, ByRef Point As POINT_DATA) As Integer
  787. Declare Function APS_get_running_point_index Lib "APS168x64.dll" (ByVal Axis_ID As Integer, ByRef Index As Integer) As Integer
  788. Declare Function APS_get_start_point_index Lib "APS168x64.dll" (ByVal Axis_ID As Integer, ByRef Index As Integer) As Integer
  789. Declare Function APS_get_end_point_index Lib "APS168x64.dll" (ByVal Axis_ID As Integer, ByRef Index As Integer) As Integer
  790. Declare Function APS_set_table_move_pause Lib "APS168x64.dll" (ByVal Axis_ID As Integer, ByVal Pause_en As Integer) As Integer
  791. Declare Function APS_set_table_move_repeat Lib "APS168x64.dll" (ByVal Axis_ID As Integer, ByVal Repeat_en As Integer) As Integer
  792. Declare Function APS_get_table_move_repeat_count Lib "APS168x64.dll" (ByVal Axis_ID As Integer, ByRef RepeatCnt As Integer) As Integer
  793. Declare Function APS_point_table_move Lib "APS168x64.dll" (ByVal Dimension As Integer, ByVal Axis_ID_Array() As Integer, ByVal StartIndex As Integer, ByVal EndIndex As Integer) As Integer
  794. Declare Function APS_set_point_tableEx Lib "APS168x64.dll" (ByVal Axis_ID As Integer, ByVal Index As Integer, ByRef Point As PNT_DATA) As Integer
  795. Declare Function APS_set_point_table_4DL Lib "APS168x64.dll" (ByVal Axis_ID_Array() As Integer, ByVal Index As Integer, ByRef Point As PNT_DATA_4DL) As Integer
  796. Declare Function APS_set_point_tableEx_2D Lib "APS168x64.dll" (ByVal Axis_ID As Integer, ByVal Axis_ID_2 As Integer, ByVal Index As Integer, ByRef Point As PNT_DATA_2D) As Integer
  797. '//Point table + IO - Pause / Resume
  798. Declare Function APS_set_table_move_ex_pause Lib "APS168x64.dll" (ByVal Axis_ID As Integer) As Integer
  799. Declare Function APS_set_table_move_ex_rollback Lib "APS168x64.dll" (ByVal Axis_ID As Integer, ByVal Max_Speed As Integer) As Integer
  800. Declare Function APS_set_table_move_ex_resume Lib "APS168x64.dll" (ByVal Axis_ID As Integer) As Integer
  801. '//Only for PCI-8392 to replace APS_set_point_table & APS_get_point_table
  802. Declare Function APS_set_point_table_ex Lib "APS168x64.dll" (ByVal Axis_ID As Integer, ByVal Index As Integer, ByRef Point As POINT_DATA_EX) As Integer
  803. Declare Function APS_get_point_table_ex Lib "APS168x64.dll" (ByVal Axis_ID As Integer, ByVal Index As Integer, ByRef Point As POINT_DATA_EX) As Integer
  804. '//Point table Feeder (Only for PCI-825x)
  805. Declare Function APS_set_feeder_group Lib "APS168x64.dll" (ByVal GroupId As Integer, ByVal Dimension As Integer, ByVal Axis_ID_Array() As Integer) As Integer
  806. Declare Function APS_get_feeder_group Lib "APS168x64.dll" (ByVal GroupId As Integer, ByVal Dimension As Integer, ByVal Axis_ID_Array() As Integer) As Integer
  807. Declare Function APS_free_feeder_group Lib "APS168x64.dll" (ByVal GroupId As Integer) As Integer
  808. Declare Function APS_reset_feeder_buffer Lib "APS168x64.dll" (ByVal GroupId As Integer) As Integer
  809. Declare Function APS_set_feeder_point_2D Lib "APS168x64.dll" (ByVal GroupId As Integer, ByRef PtArray As PNT_DATA_2D, ByVal Size As Integer, ByVal LastFlag As Integer) As Integer
  810. Declare Function APS_set_feeder_point_2D_ex Lib "APS168x64.dll" (ByVal GroupId As Integer, ByRef PtArray As PNT_DATA_2D_F64, ByVal Size As Integer, ByVal LastFlag As Integer) As Integer
  811. Declare Function APS_start_feeder_move Lib "APS168x64.dll" (ByVal GroupId As Integer) As Integer
  812. Declare Function APS_get_feeder_status Lib "APS168x64.dll" (ByVal GroupId As Integer, ByVal State As Integer, ByVal ErrCode As Integer) As Integer
  813. Declare Function APS_get_feeder_running_index Lib "APS168x64.dll" (ByVal GroupId As Integer, ByVal Index As Integer) As Integer
  814. Declare Function APS_get_feeder_feed_index Lib "APS168x64.dll" (ByVal GroupId As Integer, ByVal Index As Integer) As Integer
  815. Declare Function APS_set_feeder_ex_pause Lib "APS168x64.dll" (ByVal GroupId As Integer) As Integer
  816. Declare Function APS_set_feeder_ex_rollback Lib "APS168x64.dll" (ByVal GroupId As Integer, ByVal Max_Speed As Integer) As Integer
  817. Declare Function APS_set_feeder_ex_resume Lib "APS168x64.dll" (ByVal GroupId As Integer) As Integer
  818. Declare Function APS_set_feeder_cfg_acc_type Lib "APS168x64.dll" (ByVal GroupId As Integer, ByVal type As Integer) As Integer
  819. '
  820. 'Point table move2
  821. Declare Function APS_set_point_table_mode2 Lib "APS168x64.dll" (ByVal Axis_ID As Integer, ByVal Mode As Integer) As Integer
  822. Declare Function APS_set_point_table2 Lib "APS168x64.dll" (ByVal Dimension As Integer, ByVal Axis_ID_Array() As Integer, ByVal Index As Integer, ByRef Point As POINT_DATA2) As Integer
  823. Declare Function APS_point_table_continuous_move2 Lib "APS168x64.dll" (ByVal Dimension As Integer, ByVal Axis_ID_Array() As Integer) As Integer
  824. Declare Function APS_point_table_single_move2 Lib "APS168x64.dll" (ByVal Axis_ID As Integer, ByVal Index As Integer) As Integer
  825. Declare Function APS_get_running_point_index2 Lib "APS168x64.dll" (ByVal Axis_ID As Integer, ByRef Index As Integer) As Integer
  826. Declare Function APS_point_table_status2 Lib "APS168x64.dll" (ByVal Axis_ID As Integer, ByRef Status As Integer) As Integer
  827. Declare Function APS_point_table_setting_continuous_move2 Lib "APS168x64.dll" (ByVal Dimension As Integer, ByVal Axis_ID_Array() As Integer, ByVal TotalPoints As Integer, ByRef Point As POINT_DATA2) As Integer
  828. Declare Function APS_set_point_table2_maximum_speed_check Lib "APS168x64.dll" (ByVal Dimension As Integer, ByVal Axis_ID_Array() As Integer, ByVal Index As Integer, ByRef Point As POINT_DATA2) As Integer
  829. 'Point table Only for HSL-4XMO
  830. Declare Function APS_set_point_table3 Lib "APS168x64.dll" (ByVal Dimension As Integer, ByVal Axis_ID_Array() As Integer, ByVal Index As Integer, ByRef Point As POINT_DATA3) As Integer
  831. Declare Function APS_point_table_move3 Lib "APS168x64.dll" (ByVal Dimension As Integer, ByVal Axis_ID_Array() As Integer, ByVal StartIndex As Integer, ByVal EndIndex As Integer) As Integer
  832. Declare Function APS_set_point_table_param3 Lib "APS168x64.dll" (ByVal FirstAxid As Integer, ByVal ParaNum As Integer, ByVal ParaDat As Integer) As Integer
  833. 'Gantry functions. [Only for PCI-8392, PCI-8253/56]
  834. Declare Function APS_set_gantry_param Lib "APS168x64.dll" (ByVal Board_ID As Integer, ByVal GroupNum As Integer, ByVal ParaNum As Integer, ByVal ParaDat As Integer) As Integer
  835. Declare Function APS_get_gantry_param Lib "APS168x64.dll" (ByVal Board_ID As Integer, ByVal GroupNum As Integer, ByVal ParaNum As Integer, ByRef ParaDat As Integer) As Integer
  836. Declare Function APS_set_gantry_axis Lib "APS168x64.dll" (ByVal Board_ID As Integer, ByVal GroupNum As Integer, ByVal Master_Axis_ID As Integer, ByVal Slave_Axis_ID As Integer) As Integer
  837. Declare Function APS_get_gantry_axis Lib "APS168x64.dll" (ByVal Board_ID As Integer, ByVal GroupNum As Integer, ByRef Master_Axis_ID As Integer, ByRef Slave_Axis_ID As Integer) As Integer
  838. Declare Function APS_get_gantry_error Lib "APS168x64.dll" (ByVal Board_ID As Integer, ByVal GroupNum As Integer, ByRef GentryError As Integer) As Integer
  839. '
  840. 'Digital filter functions. [Only for PCI-8253/56]
  841. Declare Function APS_set_filter_param Lib "APS168x64.dll" (ByVal Axis_ID As Integer, ByVal Filter_paramNo As Integer, ByVal param_val As Integer) As Integer
  842. Declare Function APS_get_filter_param Lib "APS168x64.dll" (ByVal Axis_ID As Integer, ByVal Filter_paramNo As Integer, ByRef param_val As Integer) As Integer
  843. ' Field bus master fucntions
  844. Declare Function APS_set_field_bus_param Lib "APS168x64.dll" (ByVal Board_ID As Integer, ByVal BUS_No As Integer, ByVal BUS_Param_No As Integer, ByVal BUS_Param As Integer) As Integer
  845. Declare Function APS_get_field_bus_param Lib "APS168x64.dll" (ByVal Board_ID As Integer, ByVal BUS_No As Integer, ByVal BUS_Param_No As Integer, ByRef BUS_Param As Integer) As Integer
  846. Declare Function APS_start_field_bus Lib "APS168x64.dll" (ByVal Board_ID As Integer, ByVal BUS_No As Integer, ByVal Start_Axis_ID As Integer) As Integer
  847. Declare Function APS_stop_field_bus Lib "APS168x64.dll" (ByVal Board_ID As Integer, ByVal BUS_No As Integer) As Integer
  848. Declare Function APS_get_field_bus_module_info Lib "APS168x64.dll" (ByVal Board_ID As Integer, ByVal BUS_No As Integer, ByVal MOD_No As Integer, <[In](), Out()> ByVal Module_info As EC_MODULE_INFO()) As Integer
  849. Declare Function APS_scan_field_bus Lib "APS168x64.dll" (ByVal Board_ID As Integer, ByVal BUS_No As Integer) As Integer
  850. Declare Function APS_get_field_bus_master_status Lib "APS168x64.dll" (ByVal Board_ID As Integer, ByVal BUS_No As Integer, ByRef Status As Integer) As Integer
  851. Declare Function APS_get_field_bus_pdo Lib "APS168x64.dll" (ByVal Board_ID As Integer, ByVal BUS_No As Integer, ByVal ByteOffset As Integer, ByVal Size As Integer, ByRef Value As Integer) As Integer
  852. Declare Function APS_set_field_bus_pdo Lib "APS168x64.dll" (ByVal Board_ID As Integer, ByVal BUS_No As Integer, ByVal ByteOffset As Integer, ByVal Size As Integer, ByVal Value As Integer) As Integer
  853. Declare Function APS_get_field_bus_pdo_offset Lib "APS168x64.dll" (ByVal Board_ID As Integer, ByVal BUS_No As Integer, ByVal MOD_No As Integer, ByRef PPTx As IntPtr, ByRef NumOfTx As UInteger, ByRef PPRx As IntPtr, ByRef NumOfRx As UInteger) As Integer
  854. '
  855. Declare Function APS_get_field_bus_device_info Lib "APS168x64.dll" (ByVal Board_ID As Integer, ByVal BUS_No As Integer, ByVal MOD_No As Integer, ByVal Info_No As Integer, ByRef Info As Integer) As Integer
  856. Declare Function APS_get_field_bus_last_scan_info Lib "APS168x64.dll" (ByVal Board_ID As Integer, ByVal BUS_No As Integer, ByVal Info_Array() As Integer, ByVal Array_Size As Integer, ByRef Info_Count As Integer) As Integer
  857. Declare Function APS_get_field_bus_master_type Lib "APS168x64.dll" (ByVal Board_ID As Integer, ByVal BUS_No As Integer, ByRef BUS_Type As Integer) As Integer
  858. Declare Function APS_get_field_bus_slave_type Lib "APS168x64.dll" (ByVal Board_ID As Integer, ByVal BUS_No As Integer, ByVal MOD_No As Integer, ByRef MOD_Type As Integer) As Integer
  859. Declare Function APS_get_field_bus_slave_name Lib "APS168x64.dll" (ByVal Board_ID As Integer, ByVal BUS_No As Integer, ByVal MOD_No As Integer, ByRef MOD_Name As Integer) As Integer
  860. Declare Function APS_get_field_bus_slave_serialID Lib "APS168x64.dll" (ByVal Board_ID As Integer, ByVal BUS_No As Integer, ByVal MOD_No As Integer, ByRef Serial_ID As Integer) As Integer
  861. Declare Function APS_get_field_bus_slave_first_axisno Lib "APS168x64.dll" (ByVal Board_ID As Integer, ByVal BUS_No As Integer, ByVal MOD_No As Integer, ByRef AxisNo As Integer, ByRef TotalAxes As Integer) As Integer
  862. Declare Function APS_get_field_bus_slave_state Lib "APS168x64.dll" (ByVal Board_ID As Integer, ByVal BUS_No As Integer, ByVal MOD_No As Integer, ByRef State As Integer) As Integer
  863. Declare Function APS_set_field_bus_slave_state Lib "APS168x64.dll" (ByVal Board_ID As Integer, ByVal BUS_No As Integer, ByVal MOD_No As Integer, ByVal State As Integer) As Integer
  864. Declare Function APS_set_field_bus_slave_recovery Lib "APS168x64.dll" (ByVal Board_ID As Integer, ByVal BUS_No As Integer, ByVal MOD_No As Integer) As Integer
  865. ' Diagnostic functions [Only for PCIe-833x]
  866. Declare Function APS_get_field_bus_frame_loss_diagnostic Lib "APS168x64.dll" (ByVal Board_ID As Integer, ByVal BUS_No As Integer, ByRef Result As Integer) As Integer
  867. Declare Function APS_reset_field_bus_frame_loss_diagnostic Lib "APS168x64.dll" (ByVal Board_ID As Integer, ByVal BUS_No As Integer) As Integer
  868. Declare Function APS_get_field_bus_slave_connecting_diagnostic Lib "APS168x64.dll" (ByVal Board_ID As Integer, ByVal BUS_No As Integer, ByRef Result As Integer, ByRef NumOfDisconnect As UShort, ByRef DisconnectIDArray As IntPtr) As Integer
  869. '
  870. ' Field bus slave general functions
  871. Declare Function APS_set_field_bus_slave_param Lib "APS168x64.dll" (ByVal Board_ID As Integer, ByVal BUS_No As Integer, ByVal MOD_No As Integer, ByVal Ch_No As Integer, ByVal ParaNum As Integer, ByVal ParaDat As Integer) As Integer
  872. Declare Function APS_get_field_bus_slave_param Lib "APS168x64.dll" (ByVal Board_ID As Integer, ByVal BUS_No As Integer, ByVal MOD_No As Integer, ByVal Ch_No As Integer, ByVal ParaNum As Integer, ByRef ParaDat As Integer) As Integer
  873. Declare Function APS_get_slave_connect_quality Lib "APS168x64.dll" (ByVal Board_ID As Integer, ByVal BUS_No As Integer, ByVal MOD_No As Integer, ByRef Sts_data As Integer) As Integer
  874. Declare Function APS_get_slave_online_status Lib "APS168x64.dll" (ByVal Board_ID As Integer, ByVal BUS_No As Integer, ByVal MOD_No As Integer, ByRef Live As Integer) As Integer
  875. Declare Function APS_get_field_bus_sdo Lib "APS168x64.dll" (ByVal Board_ID As Integer, ByVal BUS_No As Integer, ByVal MOD_No As Integer, ByVal ODIndex As UShort, ByVal ODSubIndex As UShort, ByRef Data As Byte, ByVal DataLen As UInteger, ByRef OutDatalen As UInteger, ByVal Timeout As UInteger, ByVal Flags As UInteger) As Integer
  876. Declare Function APS_set_field_bus_sdo Lib "APS168x64.dll" (ByVal Board_ID As Integer, ByVal BUS_No As Integer, ByVal MOD_No As Integer, ByVal ODIndex As UShort, ByVal ODSubIndex As UShort, ByRef Data As Byte, ByVal DataLen As UInteger, ByVal Timeout As UInteger, ByVal Flags As UInteger) As Integer
  877. Declare Function APS_set_field_bus_sdo_req Lib "APS168x64.dll" (ByVal Board_ID As Integer, ByVal BUS_No As Integer, ByVal MOD_No As Integer, ByVal ODIndex As UShort, ByVal ODSubIndex As UShort, ByVal DataLen As UInteger, ByRef Data As Byte, ByRef Handle As Byte) As Integer
  878. Declare Function APS_set_field_bus_sdo_res Lib "APS168x64.dll" (ByVal Board_ID As Integer, ByVal BUS_No As Integer, ByVal Handle As Byte, ByRef Status As Byte) As Integer
  879. Declare Function APS_get_field_bus_sdo_req Lib "APS168x64.dll" (ByVal Board_ID As Integer, ByVal BUS_No As Integer, ByVal MOD_No As Integer, ByVal ODIndex As UShort, ByVal ODSubIndex As UShort, ByRef Handle As Byte) As Integer
  880. Declare Function APS_get_field_bus_sdo_res Lib "APS168x64.dll" (ByVal Board_ID As Integer, ByVal BUS_No As Integer, ByVal Handle As Byte, ByVal DataLen As UInteger, ByRef Data As Byte, ByRef OutDataLen As UInteger, ByRef Status As Byte) As Integer
  881. Declare Function APS_get_field_bus_od_num Lib "APS168x64.dll" (ByVal Board_ID As Integer, ByVal BUS_No As Integer, ByVal MOD_No As Integer, ByRef Num As UShort, ByRef ODList As UShort) As Integer
  882. Declare Function APS_get_field_bus_od_desc Lib "APS168x64.dll" (ByVal Board_ID As Integer, ByVal BUS_No As Integer, ByVal MOD_No As Integer, ByVal ODIndex As UShort, ByRef MaxNumSubIndex As UShort, ByRef Description As String, ByVal Size As UInteger) As Integer
  883. Declare Function APS_get_field_bus_od_desc_entry Lib "APS168x64.dll" (ByVal Board_ID As Integer, ByVal BUS_No As Integer, ByVal MOD_No As Integer, ByVal ODIndex As UShort, ByVal ODSubIndex As UShort, <[In](), Out()> POD_DESC_ENRTY As OD_DESC_ENTRY()) As Integer
  884. Declare Function APS_get_field_bus_loss_package Lib "APS168x64.dll" (ByVal Board_ID As Integer, ByVal BUS_No As Integer, ByRef Loss_Count As Integer) As Integer
  885. Declare Function APS_set_field_bus_pdo_ODIndex Lib "APS168x64.dll" (ByVal Board_ID As Integer, ByVal BUS_No As Integer, ByVal MOD_No As Integer, ByVal ODIndex As UShort, ByVal ODSubIndex As UShort, ByRef Data As Byte, ByVal DataLen As UInteger, ByVal Mask As UInteger) As Integer
  886. Declare Function APS_get_field_bus_pdo_ODIndex Lib "APS168x64.dll" (ByVal Board_ID As Integer, ByVal BUS_No As Integer, ByVal MOD_No As Integer, ByVal ODIndex As UShort, ByVal ODSubIndex As UShort, ByRef Data As Byte, ByVal DataLen As UInteger, ByRef OutDatalen As UInteger) As Integer
  887. Declare Function APS_set_field_bus_od_data Lib "APS168x64.dll" (ByVal Board_ID As Integer, ByVal BUS_No As Integer, ByVal MOD_No As Integer, ByVal SubMOD_No As Integer, ByVal ODIndex As Integer, ByVal RawData As UInteger) As Integer
  888. Declare Function APS_get_field_bus_od_data Lib "APS168x64.dll" (ByVal Board_ID As Integer, ByVal BUS_No As Integer, ByVal MOD_No As Integer, ByVal SubMOD_No As Integer, ByVal ODIndex As Integer, ByRef RawData As UInteger) As Integer
  889. Declare Function APS_get_field_bus_od_module_info Lib "APS168x64.dll" (ByVal Board_ID As Integer, ByVal BUS_No As Integer, ByVal MOD_No As Integer, <[In](), Out()> Sub_Module_info As EC_Sub_MODULE_INFO()) As Integer
  890. Declare Function APS_get_field_bus_od_number Lib "APS168x64.dll" (ByVal Board_ID As Integer, ByVal BUS_No As Integer, ByVal MOD_No As Integer, ByVal SubMOD_No As Integer, ByRef TxODNum As Integer, ByRef RxODNum As Integer) As Integer
  891. Declare Function APS_get_field_bus_od_tx Lib "APS168x64.dll" (ByVal Board_ID As Integer, ByVal BUS_No As Integer, ByVal MOD_No As Integer, ByVal SubMOD_No As Integer, ByVal TxODIndex As Integer, <[In](), Out()> Sub_MODULE_OD_INFO As EC_Sub_MODULE_OD_INFO()) As Integer
  892. Declare Function APS_get_field_bus_od_rx Lib "APS168x64.dll" (ByVal Board_ID As Integer, ByVal BUS_No As Integer, ByVal MOD_No As Integer, ByVal SubMOD_No As Integer, ByVal RxODIndex As Integer, <[In](), Out()> Sub_MODULE_OD_INFO As EC_Sub_MODULE_OD_INFO()) As Integer
  893. '
  894. ' Modules be 64 bits gpio
  895. Declare Function APS_set_field_bus_d_output_ex Lib "APS168x64.dll" (ByVal Board_ID As Integer, ByVal BUS_No As Integer, ByVal MOD_No As Integer, ByVal DO_Value As DO_DATA_EX) As Integer
  896. Declare Function APS_get_field_bus_d_output_ex Lib "APS168x64.dll" (ByVal Board_ID As Integer, ByVal BUS_No As Integer, ByVal MOD_No As Integer, ByRef DO_Value As DO_DATA_EX) As Integer
  897. Declare Function APS_get_field_bus_d_input_ex Lib "APS168x64.dll" (ByVal Board_ID As Integer, ByVal BUS_No As Integer, ByVal MOD_No As Integer, ByRef DI_Value As DI_DATA_EX) As Integer
  898. Declare Function APS_get_field_bus_module_map_size Lib "APS168x64.dll" (ByVal Board_ID As Integer, ByVal BUS_No As Integer, ByRef Size As UInteger) As Integer
  899. Declare Function APS_get_field_bus_module_map Lib "APS168x64.dll" (ByVal Board_ID As Integer, ByVal Bus_No As Integer, ByVal MOD_No_Arr() As UInteger, ByVal Size As UInteger) As Integer
  900. Declare Function APS_get_field_bus_analysis_topology Lib "APS168x64.dll" (ByVal Board_ID As Integer, ByVal Bus_No As Integer, ByRef Error_Slave_No As Integer, <[In](), Out()> ByVal Current_slave_info As EC_MODULE_INFO(), ByRef Current_slave_num As Integer, <[In](), Out()> ByVal Past_slave_info As EC_MODULE_INFO(), ByRef Past_slave_num As Integer) As Integer
  901. Declare Function APS_set_field_bus_module_map Lib "APS168x64.dll" (ByVal Board_ID As Integer, ByVal Bus_No As Integer, ByVal MOD_No_Arr() As UInteger, ByVal Size As UInteger) As Integer
  902. Declare Function APS_reset_field_bus_alarm Lib "APS168x64.dll" (ByVal Axis_ID As Integer) As Integer
  903. Declare Function APS_get_field_bus_alarm Lib "APS168x64.dll" (ByVal Axis_ID As Integer, ByRef AlarmCode As UInteger) As Integer
  904. Declare Function APS_set_field_bus_ESC_register Lib "APS168x64.dll" (ByVal Board_ID As Integer, ByVal BUS_No As Integer, ByVal MOD_No As Integer, ByVal RegOffset As Integer, ByVal DataSize As Integer, ByRef DataValue As UInteger) As Integer
  905. Declare Function APS_get_field_bus_ESC_register Lib "APS168x64.dll" (ByVal Board_ID As Integer, ByVal BUS_No As Integer, ByVal MOD_No As Integer, ByVal RegOffset As Integer, ByVal DataSize As Integer, ByRef DataValue As UInteger) As Integer
  906. '
  907. ' Field bus DIO slave fucntions
  908. Declare Function APS_set_field_bus_d_output Lib "APS168x64.dll" (ByVal Board_ID As Integer, ByVal BUS_No As Integer, ByVal MOD_No As Integer, ByVal DO_Value As Integer) As Integer
  909. Declare Function APS_get_field_bus_d_output Lib "APS168x64.dll" (ByVal Board_ID As Integer, ByVal BUS_No As Integer, ByVal MOD_No As Integer, ByRef DO_Value As Integer) As Integer
  910. Declare Function APS_get_field_bus_d_input Lib "APS168x64.dll" (ByVal Board_ID As Integer, ByVal BUS_No As Integer, ByVal MOD_No As Integer, ByRef DI_Value As Integer) As Integer
  911. Declare Function APS_set_field_bus_d_channel_output Lib "APS168x64.dll" (ByVal Board_ID As Integer, ByVal BUS_No As Integer, ByVal MOD_No As Integer, ByVal Ch_No As Integer, ByVal DO_Value As Integer) As Integer
  912. Declare Function APS_get_field_bus_d_channel_output Lib "APS168x64.dll" (ByVal Board_ID As Integer, ByVal BUS_No As Integer, ByVal MOD_No As Integer, ByVal Ch_No As Integer, ByRef DO_Value As Integer) As Integer
  913. Declare Function APS_get_field_bus_d_channel_input Lib "APS168x64.dll" (ByVal Board_ID As Integer, ByVal BUS_No As Integer, ByVal MOD_No As Integer, ByVal Ch_No As Integer, ByRef DI_Value As Integer) As Integer
  914. 'FieldBus DIO by port
  915. Declare Function APS_set_field_bus_d_port_output Lib "APS168x64.dll" (ByVal Board_ID As Integer, ByVal BUS_No As Integer, ByVal MOD_No As Integer, ByVal Port_No As Integer, ByVal DO_Value As UInteger) As Integer
  916. Declare Function APS_get_field_bus_d_port_input Lib "APS168x64.dll" (ByVal Board_ID As Integer, ByVal BUS_No As Integer, ByVal MOD_No As Integer, ByVal Port_No As Integer, ByRef DI_Value As UInteger) As Integer
  917. Declare Function APS_get_field_bus_d_port_output Lib "APS168x64.dll" (ByVal Board_ID As Integer, ByVal BUS_No As Integer, ByVal MOD_No As Integer, ByVal Port_No As Integer, ByRef DO_Value As UInteger) As Integer
  918. ' Field bus AIO slave function
  919. Declare Function APS_set_field_bus_a_output Lib "APS168x64.dll" (ByVal Board_ID As Integer, ByVal BUS_No As Integer, ByVal MOD_No As Integer, ByVal Ch_No As Integer, ByVal AO_Value As Double) As Integer
  920. Declare Function APS_set_field_bus_a_output_plc Lib "APS168x64.dll" (ByVal Board_ID As Integer, ByVal BUS_No As Integer, ByVal MOD_No As Integer, ByVal Ch_No As Integer, ByVal AO_Value As Double, ByVal RunStep As Short) As Integer
  921. Declare Function APS_get_field_bus_a_output Lib "APS168x64.dll" (ByVal Board_ID As Integer, ByVal BUS_No As Integer, ByVal MOD_No As Integer, ByVal Ch_No As Integer, ByRef AO_Value As Double) As Integer
  922. Declare Function APS_get_field_bus_a_input Lib "APS168x64.dll" (ByVal Board_ID As Integer, ByVal BUS_No As Integer, ByVal MOD_No As Integer, ByVal Ch_No As Integer, ByRef AI_Value As Double) As Integer
  923. Declare Function APS_get_field_bus_a_input_plc Lib "APS168x64.dll" (ByVal Board_ID As Integer, ByVal BUS_No As Integer, ByVal MOD_No As Integer, ByVal Ch_No As Integer, ByRef AI_Value As Double, ByVal RunStep As Double) As Integer
  924. 'Field bus Comparing trigger functions
  925. Declare Function APS_set_field_bus_trigger_param Lib "APS168x64.dll" (ByVal Board_ID As Integer, ByVal BUS_No As Integer, ByVal MOD_No As Integer, ByVal Param_No As Integer, ByVal param_val As Integer) As Integer
  926. Declare Function APS_get_field_bus_trigger_param Lib "APS168x64.dll" (ByVal Board_ID As Integer, ByVal BUS_No As Integer, ByVal MOD_No As Integer, ByVal Param_No As Integer, ByRef param_val As Integer) As Integer
  927. Declare Function APS_set_field_bus_trigger_linear Lib "APS168x64.dll" (ByVal Board_ID As Integer, ByVal BUS_No As Integer, ByVal MOD_No As Integer, ByVal LCmpCh As Integer, ByVal StartPoint As Integer, ByVal RepeatTimes As Integer, ByVal Interval As Integer) As Integer
  928. Declare Function APS_set_field_bus_trigger_table Lib "APS168x64.dll" (ByVal Board_ID As Integer, ByVal BUS_No As Integer, ByVal MOD_No As Integer, ByVal TCmpCh As Integer, ByVal DataArr() As Integer, ByVal ArraySize As Integer) As Integer
  929. Declare Function APS_set_field_bus_trigger_manual Lib "APS168x64.dll" (ByVal Board_ID As Integer, ByVal BUS_No As Integer, ByVal MOD_No As Integer, ByVal TrgCh As Integer) As Integer
  930. Declare Function APS_set_field_bus_trigger_manual_s Lib "APS168x64.dll" (ByVal Board_ID As Integer, ByVal BUS_No As Integer, ByVal MOD_No As Integer, ByVal TrgChInBit As Object) As Integer
  931. Declare Function APS_get_field_bus_trigger_table_cmp Lib "APS168x64.dll" (ByVal Board_ID As Integer, ByVal BUS_No As Integer, ByVal MOD_No As Integer, ByVal TCmpCh As Integer, ByRef CmpVal As Integer) As Integer
  932. Declare Function APS_get_field_bus_trigger_linear_cmp Lib "APS168x64.dll" (ByVal Board_ID As Integer, ByVal BUS_No As Integer, ByVal MOD_No As Integer, ByVal LCmpCh As Integer, ByRef CmpVal As Integer) As Integer
  933. Declare Function APS_get_field_bus_trigger_count Lib "APS168x64.dll" (ByVal Board_ID As Integer, ByVal BUS_No As Integer, ByVal MOD_No As Integer, ByVal TrgCh As Integer, ByRef TrgCnt As Integer) As Integer
  934. Declare Function APS_reset_field_bus_trigger_count Lib "APS168x64.dll" (ByVal Board_ID As Integer, ByVal BUS_No As Integer, ByVal MOD_No As Integer, ByVal TrgCh As Integer) As Integer
  935. Declare Function APS_get_field_bus_linear_cmp_remain_count Lib "APS168x64.dll" (ByVal Board_ID As Integer, ByVal BUS_No As Integer, ByVal MOD_No As Integer, ByVal LCmpCh As Integer, ByRef Cnt As Integer) As Integer
  936. Declare Function APS_get_field_bus_table_cmp_remain_count Lib "APS168x64.dll" (ByVal Board_ID As Integer, ByVal BUS_No As Integer, ByVal MOD_No As Integer, ByVal TCmpCh As Integer, ByRef Cnt As Integer) As Integer
  937. Declare Function APS_get_field_bus_encoder Lib "APS168x64.dll" (ByVal Board_ID As Integer, ByVal BUS_No As Integer, ByVal MOD_No As Integer, ByVal EncCh As Integer, ByRef EncCnt As Integer) As Integer
  938. Declare Function APS_set_field_bus_encoder Lib "APS168x64.dll" (ByVal Board_ID As Integer, ByVal BUS_No As Integer, ByVal MOD_No As Integer, ByVal EncCh As Integer, ByVal EncCnt As Integer) As Integer
  939. Declare Function APS_get_field_bus_timer_counter Lib "APS168x64.dll" (ByVal Board_ID As Integer, ByVal BUS_No As Integer, ByVal MOD_No As Integer, ByVal TmrCh As Integer, ByRef TmrCnt As Integer) As Integer
  940. Declare Function APS_set_field_bus_timer_counter Lib "APS168x64.dll" (ByVal Board_ID As Integer, ByVal BUS_No As Integer, ByVal MOD_No As Integer, ByVal TmrCh As Integer, ByVal TmrCnt As Integer) As Integer
  941. 'Field bus latch functions
  942. Declare Function APS_enable_field_bus_ltc_fifo Lib "APS168x64.dll" (ByVal Board_ID As Integer, ByVal BUS_No As Integer, ByVal MOD_No As Integer, ByVal FLtcCh As Integer, ByVal Enable As Integer) As Integer
  943. Declare Function APS_get_field_bus_ltc_fifo_point Lib "APS168x64.dll" (ByVal Board_ID As Integer, ByVal BUS_No As Integer, ByVal MOD_No As Integer, ByVal FLtcCh As Integer, ByRef ArraySize As Integer, ByRef LatchPoint As LATCH_POINT) As Integer
  944. Declare Function APS_set_field_bus_ltc_fifo_param Lib "APS168x64.dll" (ByVal Board_ID As Integer, ByVal BUS_No As Integer, ByVal MOD_No As Integer, ByVal FLtcCh As Integer, ByVal Param_No As Integer, ByVal param_val As Integer) As Integer
  945. Declare Function APS_get_field_bus_ltc_fifo_param Lib "APS168x64.dll" (ByVal Board_ID As Integer, ByVal BUS_No As Integer, ByVal MOD_No As Integer, ByVal FLtcCh As Integer, ByVal Param_No As Integer, ByRef param_val As Integer) As Integer
  946. Declare Function APS_reset_field_bus_ltc_fifo Lib "APS168x64.dll" (ByVal Board_ID As Integer, ByVal BUS_No As Integer, ByVal MOD_No As Integer, ByVal FLtcCh As Integer) As Integer
  947. Declare Function APS_get_field_bus_ltc_fifo_usage Lib "APS168x64.dll" (ByVal Board_ID As Integer, ByVal BUS_No As Integer, ByVal MOD_No As Integer, ByVal FLtcCh As Integer, ByRef Usage As Integer) As Integer
  948. Declare Function APS_get_field_bus_ltc_fifo_free_space Lib "APS168x64.dll" (ByVal Board_ID As Integer, ByVal BUS_No As Integer, ByVal MOD_No As Integer, ByVal FLtcCh As Integer, ByRef FreeSpace As Integer) As Integer
  949. Declare Function APS_get_field_bus_ltc_fifo_status Lib "APS168x64.dll" (ByVal Board_ID As Integer, ByVal BUS_No As Integer, ByVal MOD_No As Integer, ByVal FLtcCh As Integer, ByRef Status As Integer) As Integer
  950. ' Comparing trigger functions
  951. Declare Function APS_set_trigger_param Lib "APS168x64.dll" (ByVal Board_ID As Integer, ByVal Param_No As Integer, ByVal param_val As Integer) As Integer
  952. Declare Function APS_get_trigger_param Lib "APS168x64.dll" (ByVal Board_ID As Integer, ByVal Param_No As Integer, ByRef param_val As Integer) As Integer
  953. Declare Function APS_set_trigger_linear Lib "APS168x64.dll" (ByVal Board_ID As Integer, ByVal LCmpCh As Integer, ByVal StartPoint As Integer, ByVal RepeatTimes As Integer, ByVal Interval As Integer) As Integer
  954. Declare Function APS_set_trigger_table Lib "APS168x64.dll" (ByVal Board_ID As Integer, ByVal TCmpCh As Integer, ByVal DataArr() As Integer, ByVal ArraySize As Integer) As Integer
  955. Declare Function APS_set_trigger_manual Lib "APS168x64.dll" (ByVal Board_ID As Integer, ByVal TrgCh As Integer) As Integer
  956. Declare Function APS_set_trigger_manual_s Lib "APS168x64.dll" (ByVal Board_ID As Integer, ByVal TrgChInBit As Integer) As Integer
  957. Declare Function APS_get_trigger_table_cmp Lib "APS168x64.dll" (ByVal Board_ID As Integer, ByVal TCmpCh As Integer, ByRef CmpVal As Integer) As Integer
  958. Declare Function APS_get_trigger_linear_cmp Lib "APS168x64.dll" (ByVal Board_ID As Integer, ByVal LCmpCh As Integer, ByRef CmpVal As Integer) As Integer
  959. Declare Function APS_get_trigger_count Lib "APS168x64.dll" (ByVal Board_ID As Integer, ByVal TrgCh As Integer, ByRef TrgCnt As Integer) As Integer
  960. Declare Function APS_reset_trigger_count Lib "APS168x64.dll" (ByVal Board_ID As Integer, ByVal TrgCh As Integer) As Integer
  961. Declare Function APS_enable_trigger_fifo_cmp Lib "APS168x64.dll" (ByVal Board_ID As Integer, ByVal FCmpCh As Integer, ByVal Enable As Integer) As Integer
  962. Declare Function APS_get_trigger_fifo_cmp Lib "APS168x64.dll" (ByVal Board_ID As Integer, ByVal FCmpCh As Integer, ByRef CmpVal As Integer) As Integer
  963. Declare Function APS_get_trigger_fifo_status Lib "APS168x64.dll" (ByVal Board_ID As Integer, ByVal FCmpCh As Integer, ByVal FifoSts As Integer) As Integer
  964. Declare Function APS_set_trigger_fifo_data Lib "APS168x64.dll" (ByVal Board_ID As Integer, ByVal FCmpCh As Integer, ByVal DataArr() As Integer, ByVal ArraySize As Integer, ByVal ShiftFlag As Integer) As Integer
  965. Declare Function APS_set_trigger_encoder_counter Lib "APS168x64.dll" (ByVal Board_ID As Integer, ByVal TrgCh As Integer, ByVal TrgCnt As Integer) As Integer
  966. Declare Function APS_get_trigger_encoder_counter Lib "APS168x64.dll" (ByVal Board_ID As Integer, ByVal TrgCh As Integer, ByRef TrgCnt As Integer) As Integer
  967. '
  968. ' Pulser counter function
  969. Declare Function APS_get_pulser_counter Lib "APS168x64.dll" (ByVal Board_ID As Integer, ByRef Counter As Integer) As Integer
  970. Declare Function APS_set_pulser_counter Lib "APS168x64.dll" (ByVal Board_ID As Integer, ByVal Counter As Integer) As Integer
  971. '
  972. ' Reserved functions
  973. Declare Function APS_field_bus_slave_set_param Lib "APS168x64.dll" (ByVal Board_ID As Integer, ByVal BUS_No As Integer, ByVal MOD_No As Integer, ByVal Ch_No As Integer, ByVal ParaNum As Integer, ByVal ParaDat As Integer) As Integer
  974. Declare Function APS_field_bus_slave_get_param Lib "APS168x64.dll" (ByVal Board_ID As Integer, ByVal BUS_No As Integer, ByVal MOD_No As Integer, ByVal Ch_No As Integer, ByVal ParaNum As Integer, ByRef ParaDat As Integer) As Integer
  975. '
  976. Declare Function APS_field_bus_d_set_output Lib "APS168x64.dll" (ByVal Board_ID As Integer, ByVal BUS_No As Integer, ByVal MOD_No As Integer, ByVal DO_Value As Integer) As Integer
  977. Declare Function APS_field_bus_d_get_output Lib "APS168x64.dll" (ByVal Board_ID As Integer, ByVal BUS_No As Integer, ByVal MOD_No As Integer, ByRef DO_Value As Integer) As Integer
  978. Declare Function APS_field_bus_d_get_input Lib "APS168x64.dll" (ByVal Board_ID As Integer, ByVal BUS_No As Integer, ByVal MOD_No As Integer, ByRef DI_Value As Integer) As Integer
  979. '
  980. Declare Function APS_field_bus_A_set_output Lib "APS168x64.dll" (ByVal Board_ID As Integer, ByVal BUS_No As Integer, ByVal MOD_No As Integer, ByVal Ch_No As Integer, ByVal AO_Value As Double) As Integer
  981. Declare Function APS_field_bus_A_get_output Lib "APS168x64.dll" (ByVal Board_ID As Integer, ByVal BUS_No As Integer, ByVal MOD_No As Integer, ByVal Ch_No As Integer, ByRef AO_Value As Double) As Integer
  982. Declare Function APS_field_bus_A_get_input Lib "APS168x64.dll" (ByVal Board_ID As Integer, ByVal BUS_No As Integer, ByVal MOD_No As Integer, ByVal Ch_No As Integer, ByRef AI_Value As Double) As Integer
  983. Declare Function APS_field_bus_A_set_output_plc Lib "APS168x64.dll" (ByVal Board_ID As Integer, ByVal BUS_No As Integer, ByVal MOD_No As Integer, ByVal Ch_No As Integer, ByVal AO_Value As Double, ByVal RunStep As Integer) As Integer
  984. Declare Function APS_field_bus_A_get_input_plc Lib "APS168x64.dll" (ByVal Board_ID As Integer, ByVal BUS_No As Integer, ByVal MOD_No As Integer, ByVal Ch_No As Integer, ByRef AI_Value As Double, ByVal RunStep As Integer) As Integer
  985. ' Dpac Function
  986. Declare Function APS_rescan_CF Lib "APS168x64.dll" (ByVal Board_ID As Integer) As Integer
  987. Declare Function APS_get_battery_status Lib "APS168x64.dll" (ByVal Board_ID As Integer, ByRef Battery_status As Integer) As Integer
  988. '
  989. ' DPAC Display & Display Button
  990. Declare Function APS_get_display_data Lib "APS168x64.dll" (ByVal Board_ID As Integer, ByVal displayDigit As Integer, ByRef displayIndex As Integer) As Integer
  991. Declare Function APS_set_display_data Lib "APS168x64.dll" (ByVal Board_ID As Integer, ByVal displayDigit As Integer, ByVal displayIndex As Integer) As Integer
  992. Declare Function APS_get_button_status Lib "APS168x64.dll" (ByVal Board_ID As Integer, ByRef buttonstatus As Integer) As Integer
  993. '
  994. ' nv RAM funciton
  995. Declare Function APS_set_nv_ram Lib "APS168x64.dll" (ByVal Board_ID As Integer, ByVal RamNo As Integer, ByVal DataWidth As Integer, ByVal Offset As Integer, ByVal data As Integer) As Integer
  996. Declare Function APS_get_nv_ram Lib "APS168x64.dll" (ByVal Board_ID As Integer, ByVal RamNo As Integer, ByVal DataWidth As Integer, ByVal Offset As Integer, ByRef data As Integer) As Integer
  997. Declare Function APS_clear_nv_ram Lib "APS168x64.dll" (ByVal Board_ID As Integer, ByVal RamNo As Integer) As Integer
  998. 'Timer funciton
  999. Declare Function APS_start_timer Lib "APS168x64.dll" (ByVal Board_ID As Integer, ByVal TrgCh As Integer, ByVal Start As Integer) As Integer
  1000. Declare Function APS_get_timer_counter Lib "APS168x64.dll" (ByVal Board_ID As Integer, ByVal TmrCh As Integer, ByRef Cnt As Integer) As Integer
  1001. Declare Function APS_set_timer_counter Lib "APS168x64.dll" (ByVal Board_ID As Integer, ByVal TmrCh As Integer, ByVal Cnt As Integer) As Integer
  1002. Declare Function APS_start_trigger_timer Lib "APS168x64.dll" (ByVal Board_ID As Integer, ByVal TrgCh As Integer, ByVal Start As Integer) As Integer
  1003. Declare Function APS_get_trigger_timer_counter Lib "APS168x64.dll" (ByVal Board_ID As Integer, ByVal TmrCh As Integer, ByRef TmrCnt As Integer) As Integer
  1004. 'Virtual board settings
  1005. Declare Function APS_register_virtual_board Lib "APS168x64.dll" (ByVal VirCardIndex As Integer, ByVal Enable As Integer) As Integer
  1006. Declare Function APS_get_virtual_board_info Lib "APS168x64.dll" (ByVal VirCardIndex As Integer, ByRef Enable As Integer) As Integer
  1007. 'Parameters setting by float
  1008. Declare Function APS_set_axis_param_f Lib "APS168x64.dll" (ByVal Axis_ID As Integer, ByVal AXS_Param_No As Integer, ByVal AXS_Param As Double) As Integer
  1009. Declare Function APS_get_axis_param_f Lib "APS168x64.dll" (ByVal Axis_ID As Integer, ByVal AXS_Param_No As Integer, ByRef AXS_Param As Double) As Integer
  1010. 'Control driver mode [Only for PCI-8254/8]
  1011. Declare Function APS_get_eep_curr_drv_ctrl_mode Lib "APS168x64.dll" (ByVal Board_ID As Integer, ByRef ModeInBit As Integer) As Integer
  1012. ' Monitor functions by float
  1013. Declare Function APS_get_command_f Lib "APS168x64.dll" (ByVal Axis_ID As Integer, ByRef Command As Double) As Integer
  1014. Declare Function APS_set_command_f Lib "APS168x64.dll" (ByVal Axis_ID As Integer, ByVal Command As Double) As Integer
  1015. Declare Function APS_get_position_f Lib "APS168x64.dll" (ByVal Axis_ID As Integer, ByRef Position As Double) As Integer
  1016. Declare Function APS_set_position_f Lib "APS168x64.dll" (ByVal Axis_ID As Integer, ByVal Position As Double) As Integer
  1017. Declare Function APS_get_command_velocity_f Lib "APS168x64.dll" (ByVal Axis_ID As Integer, ByRef Velocity As Double) As Integer
  1018. Declare Function APS_get_target_position_f Lib "APS168x64.dll" (ByVal Axis_ID As Integer, ByRef Targ_Pos As Double) As Integer
  1019. Declare Function APS_get_error_position_f Lib "APS168x64.dll" (ByVal Axis_ID As Integer, ByRef Err_Pos As Double) As Integer
  1020. Declare Function APS_get_feedback_velocity_f Lib "APS168x64.dll" (ByVal Axis_ID As Integer, ByRef Velocity As Double) As Integer
  1021. Declare Function APS_get_actual_torque Lib "APS168x64.dll" (ByVal Axis_ID As Integer, ByRef Torque As Integer) As Integer
  1022. 'Motion queue status
  1023. Declare Function APS_get_mq_free_space Lib "APS168x64.dll" (ByVal Axis_ID As Integer, ByRef Space As Integer) As Integer
  1024. Declare Function APS_get_mq_usage Lib "APS168x64.dll" (ByVal Axis_ID As Integer, ByRef Usage As Integer) As Integer
  1025. 'Motion Stop Code [Only for PCI-8254/8]
  1026. Declare Function APS_get_stop_code Lib "APS168x64.dll" (ByVal Axis_ID As Integer, ByRef Code As Integer) As Integer
  1027. ' Sampling functions extension
  1028. Declare Function APS_set_sampling_param_ex Lib "APS168x64.dll" (ByVal Board_ID As Integer, ByRef Param As SAMP_PARAM) As Integer
  1029. Declare Function APS_get_sampling_param_ex Lib "APS168x64.dll" (ByVal Board_ID As Integer, ByRef Param As SAMP_PARAM) As Integer
  1030. Declare Function APS_wait_trigger_sampling_ex Lib "APS168x64.dll" (ByVal Board_ID As Integer, ByVal Length As Integer, ByVal PreTrgLen As Integer, ByVal TimeOutMs As Integer, ByRef DataArr As STR_SAMP_DATA_8CH) As Integer
  1031. Declare Function APS_wait_trigger_sampling_async_ex Lib "APS168x64.dll" (ByVal Board_ID As Integer, ByVal Length As Integer, ByVal PreTrgLen As Integer, ByVal TimeOutMs As Integer, ByRef DataArr As STR_SAMP_DATA_8CH) As Integer
  1032. Declare Function APS_get_sampling_data_ex Lib "APS168x64.dll" (ByVal Board_ID As Integer, ByRef Length As Integer, ByRef DataArr As STR_SAMP_DATA_8CH, ByRef Status As Integer) As Integer
  1033. ' Sampling functions advanced ( For PCIe-833x )
  1034. Declare Function APS_set_sampling_param_advanced Lib "APS168x64.dll" (ByVal Board_ID As Integer, ByRef Param As SAMP_PARAM_ADV) As Integer
  1035. Declare Function APS_get_sampling_param_advanced Lib "APS168x64.dll" (ByVal Board_ID As Integer, ByRef Param As SAMP_PARAM_ADV) As Integer
  1036. Declare Function APS_wait_trigger_sampling_advanced Lib "APS168x64.dll" (ByVal Board_ID As Integer, ByVal Length As Integer, ByVal PreTrgLen As Integer, ByVal TimeOutMs As Integer, ByRef DataArr As STR_SAMP_DATA_ADV) As Integer
  1037. Declare Function APS_wait_trigger_sampling_async_advanced Lib "APS168x64.dll" (ByVal Board_ID As Integer, ByVal Length As Integer, ByVal PreTrgLen As Integer, ByVal TimeOutMs As Integer, ByRef DataArr As STR_SAMP_DATA_ADV) As Integer
  1038. Declare Function APS_get_sampling_data_advanced Lib "APS168x64.dll" (ByVal Board_ID As Integer, ByRef Length As Integer, ByRef DataArr As STR_SAMP_DATA_ADV, ByRef Sta As Integer) As Integer
  1039. 'New AIO [Only for PCI-82548]
  1040. Declare Function APS_read_a_output_value Lib "APS168x64.dll" (ByVal Board_ID As Integer, ByVal Channel_No As Integer, ByRef Convert_Data As Double) As Integer
  1041. 'New Interface
  1042. Declare Function APS_ptp Lib "APS168x64.dll" (ByVal Axis_ID As Integer, ByVal APS_Option As Integer, ByVal Position As Double, ByRef Wait As ASYNCALL) As Integer
  1043. Declare Function APS_ptp_v Lib "APS168x64.dll" (ByVal Axis_ID As Integer, ByVal APS_Option As Integer, ByVal Position As Double, ByVal Vm As Double, ByRef Wait As ASYNCALL) As Integer
  1044. Declare Function APS_ptp_all Lib "APS168x64.dll" (ByVal Axis_ID As Integer, ByVal APS_Option As Integer, ByVal Position As Double, ByVal Vs As Double, ByVal Vm As Double, ByVal Ve As Double, ByVal Acc As Double, ByVal Dec As Double, ByVal SFac As Double, ByRef Wait As ASYNCALL) As Integer
  1045. Declare Function APS_vel Lib "APS168x64.dll" (ByVal Axis_ID As Integer, ByVal APS_Option As Integer, ByVal Vm As Double, ByRef Wait As ASYNCALL) As Integer
  1046. Declare Function APS_vel_all Lib "APS168x64.dll" (ByVal Axis_ID As Integer, ByVal APS_Option As Integer, ByVal Vs As Double, ByVal Vm As Double, ByVal Ve As Double, ByVal Acc As Double, ByVal Dec As Double, ByVal SFac As Double, ByRef Wait As ASYNCALL) As Integer
  1047. Declare Function APS_line Lib "APS168x64.dll" (ByVal Dimension As Integer, ByVal Axis_ID_Array() As Integer, ByVal APS_Option As Integer, ByVal PositionArray() As Double, ByRef TransPara As Double, ByRef Wait As ASYNCALL) As Integer
  1048. Declare Function APS_line_v Lib "APS168x64.dll" (ByVal Dimension As Integer, ByVal Axis_ID_Array() As Integer, ByVal APS_Option As Integer, ByVal PositionArray() As Double, ByRef TransPara As Double, ByVal Vm As Double, ByRef Wait As ASYNCALL) As Integer
  1049. Declare Function APS_line_all Lib "APS168x64.dll" (ByVal Dimension As Integer, ByVal Axis_ID_Array() As Integer, ByVal APS_Option As Integer, ByVal PositionArray() As Double, ByRef TransPara As Double, ByVal Vs As Double, ByVal Vm As Double, ByVal Ve As Double, ByVal Acc As Double, ByVal Dec As Double, ByVal SFac As Double, ByRef Wait As ASYNCALL) As Integer
  1050. Declare Function APS_arc2_ca Lib "APS168x64.dll" (ByVal Axis_ID_Array() As Integer, ByVal APS_Option As Integer, ByVal CenterArray() As Double, ByVal Angle As Double, ByRef TransPara As Double, ByRef Wait As ASYNCALL) As Integer
  1051. Declare Function APS_arc2_ca_v Lib "APS168x64.dll" (ByVal Axis_ID_Array() As Integer, ByVal APS_Option As Integer, ByVal CenterArray() As Double, ByVal Angle As Double, ByRef TransPara As Double, ByVal Vm As Double, ByRef Wait As ASYNCALL) As Integer
  1052. Declare Function APS_arc2_ca_all Lib "APS168x64.dll" (ByVal Axis_ID_Array() As Integer, ByVal APS_Option As Integer, ByVal CenterArray() As Double, ByVal Angle As Double, ByRef TransPara As Double, ByVal Vs As Double, ByVal Vm As Double, ByVal Ve As Double, ByVal Acc As Double, ByVal Dec As Double, ByVal SFac As Double, ByRef Wait As ASYNCALL) As Integer
  1053. Declare Function APS_arc2_ce Lib "APS168x64.dll" (ByVal Axis_ID_Array() As Integer, ByVal APS_Option As Integer, ByVal CenterArray() As Double, ByVal EndArray() As Double, ByVal Dir As Short, ByRef TransPara As Double, ByRef Wait As ASYNCALL) As Integer
  1054. Declare Function APS_arc2_ce_v Lib "APS168x64.dll" (ByVal Axis_ID_Array() As Integer, ByVal APS_Option As Integer, ByVal CenterArray() As Double, ByVal EndArray() As Double, ByVal Dir As Short, ByRef TransPara As Double, ByVal Vm As Double, ByRef Wait As ASYNCALL) As Integer
  1055. Declare Function APS_arc2_ce_all Lib "APS168x64.dll" (ByVal Axis_ID_Array() As Integer, ByVal APS_Option As Integer, ByVal CenterArray() As Double, ByVal EndArray() As Double, ByVal Dir As Short, ByRef TransPara As Double, ByVal Vs As Double, ByVal Vm As Double, ByVal Ve As Double, ByVal Acc As Double, ByVal Dec As Double, ByVal SFac As Double, ByRef Wait As ASYNCALL) As Integer
  1056. Declare Function APS_arc3_ca Lib "APS168x64.dll" (ByVal Axis_ID_Array() As Integer, ByVal APS_Option As Integer, ByVal CenterArray() As Double, ByVal NormalArray() As Double, ByVal Angle As Double, ByRef TransPara As Double, ByRef Wait As ASYNCALL) As Integer
  1057. Declare Function APS_arc3_ca_v Lib "APS168x64.dll" (ByVal Axis_ID_Array() As Integer, ByVal APS_Option As Integer, ByVal CenterArray() As Double, ByVal NormalArray() As Double, ByVal Angle As Double, ByRef TransPara As Double, ByVal Vm As Double, ByRef Wait As ASYNCALL) As Integer
  1058. Declare Function APS_arc3_ca_all Lib "APS168x64.dll" (ByVal Axis_ID_Array() As Integer, ByVal APS_Option As Integer, ByVal CenterArray() As Double, ByVal NormalArray() As Double, ByVal Angle As Double, ByRef TransPara As Double, ByVal Vs As Double, ByVal Vm As Double, ByVal Ve As Double, ByVal Acc As Double, ByVal Dec As Double, ByVal SFac As Double, ByRef Wait As ASYNCALL) As Integer
  1059. Declare Function APS_arc3_ce Lib "APS168x64.dll" (ByVal Axis_ID_Array() As Integer, ByVal APS_Option As Integer, ByVal CenterArray() As Double, ByVal EndArray() As Double, ByVal Dir As Short, ByRef TransPara As Double, ByRef Wait As ASYNCALL) As Integer
  1060. Declare Function APS_arc3_ce_v Lib "APS168x64.dll" (ByVal Axis_ID_Array() As Integer, ByVal APS_Option As Integer, ByVal CenterArray() As Double, ByVal EndArray() As Double, ByVal Dir As Short, ByRef TransPara As Double, ByVal Vm As Double, ByRef Wait As ASYNCALL) As Integer
  1061. Declare Function APS_arc3_ce_all Lib "APS168x64.dll" (ByVal Axis_ID_Array() As Integer, ByVal APS_Option As Integer, ByVal CenterArray() As Double, ByVal EndArray() As Double, ByVal Dir As Short, ByRef TransPara As Double, ByVal Vs As Double, ByVal Vm As Double, ByVal Ve As Double, ByVal Acc As Double, ByVal Dec As Double, ByVal SFac As Double, ByRef Wait As ASYNCALL) As Integer
  1062. Declare Function APS_spiral_ca Lib "APS168x64.dll" (ByVal Axis_ID_Array() As Integer, ByVal APS_Option As Integer, ByVal CenterArray() As Double, ByVal NormalArray() As Double, ByVal Angle As Double, ByVal DeltaH As Double, ByVal FinalR As Double, ByRef TransPara As Double, ByRef Wait As ASYNCALL) As Integer
  1063. Declare Function APS_spiral_ca_v Lib "APS168x64.dll" (ByVal Axis_ID_Array() As Integer, ByVal APS_Option As Integer, ByVal CenterArray() As Double, ByVal NormalArray() As Double, ByVal Angle As Double, ByVal DeltaH As Double, ByVal FinalR As Double, ByRef TransPara As Double, ByVal Vm As Double, ByRef Wait As ASYNCALL) As Integer
  1064. Declare Function APS_spiral_ca_all Lib "APS168x64.dll" (ByVal Axis_ID_Array() As Integer, ByVal APS_Option As Integer, ByVal CenterArray() As Double, ByVal NormalArray() As Double, ByVal Angle As Double, ByVal DeltaH As Double, ByVal FinalR As Double, ByRef TransPara As Double, ByVal Vs As Double, ByVal Vm As Double, ByVal Ve As Double, ByVal Acc As Double, ByVal Dec As Double, ByVal SFac As Double, ByRef Wait As ASYNCALL) As Integer
  1065. Declare Function APS_spiral_ce Lib "APS168x64.dll" (ByVal Axis_ID_Array() As Integer, ByVal APS_Option As Integer, ByVal CenterArray() As Double, ByVal NormalArray() As Double, ByVal EndArray() As Double, ByVal Dir As Short, ByRef TransPara As Double, ByRef Wait As ASYNCALL) As Integer
  1066. Declare Function APS_spiral_ce_v Lib "APS168x64.dll" (ByVal Axis_ID_Array() As Integer, ByVal APS_Option As Integer, ByVal CenterArray() As Double, ByVal NormalArray() As Double, ByVal EndArray() As Double, ByVal Dir As Short, ByRef TransPara As Double, ByVal Vm As Double, ByRef Wait As ASYNCALL) As Integer
  1067. Declare Function APS_spiral_ce_all Lib "APS168x64.dll" (ByVal Axis_ID_Array() As Integer, ByVal APS_Option As Integer, ByVal CenterArray() As Double, ByVal NormalArray() As Double, ByVal EndArray() As Double, ByVal Dir As Short, ByRef TransPara As Double, ByVal Vs As Double, ByVal Vm As Double, ByVal Ve As Double, ByVal Acc As Double, ByVal Dec As Double, ByVal SFac As Double, ByRef Wait As ASYNCALL) As Integer
  1068. 'Point table functions
  1069. Declare Function APS_pt_dwell Lib "APS168x64.dll" (ByVal Board_ID As Integer, ByVal PtbId As Integer, ByRef Prof As PTDWL, ByRef Status As PTSTS) As Integer
  1070. Declare Function APS_pt_line Lib "APS168x64.dll" (ByVal Board_ID As Integer, ByVal PtbId As Integer, ByRef Prof As PTLINE, ByRef Status As PTSTS) As Integer
  1071. Declare Function APS_pt_arc2_ca Lib "APS168x64.dll" (ByVal Board_ID As Integer, ByVal PtbId As Integer, ByRef Prof As PTA2CA, ByRef Status As PTSTS) As Integer
  1072. Declare Function APS_pt_arc2_ce Lib "APS168x64.dll" (ByVal Board_ID As Integer, ByVal PtbId As Integer, ByRef Prof As PTA2CE, ByRef Status As PTSTS) As Integer
  1073. Declare Function APS_pt_arc3_ca Lib "APS168x64.dll" (ByVal Board_ID As Integer, ByVal PtbId As Integer, ByRef Prof As PTA3CA, ByRef Status As PTSTS) As Integer
  1074. Declare Function APS_pt_arc3_ce Lib "APS168x64.dll" (ByVal Board_ID As Integer, ByVal PtbId As Integer, ByRef Prof As PTA3CE, ByRef Status As PTSTS) As Integer
  1075. Declare Function APS_pt_spiral_ca Lib "APS168x64.dll" (ByVal Board_ID As Integer, ByVal PtbId As Integer, ByRef Prof As PTHCA, ByRef Status As PTSTS) As Integer
  1076. Declare Function APS_pt_spiral_ce Lib "APS168x64.dll" (ByVal Board_ID As Integer, ByVal PtbId As Integer, ByRef Prof As PTHCE, ByRef Status As PTSTS) As Integer
  1077. 'enable & disable
  1078. Declare Function APS_pt_enable Lib "APS168x64.dll" (ByVal Board_ID As Integer, ByVal PtbId As Integer, ByVal Dimension As Integer, ByVal AxisArr() As Integer) As Integer
  1079. Declare Function APS_pt_disable Lib "APS168x64.dll" (ByVal Board_ID As Integer, ByVal PtbId As Integer) As Integer
  1080. Declare Function APS_get_pt_info Lib "APS168x64.dll" (ByVal Board_ID As Integer, ByVal PtbId As Integer, ByRef Info As PTINFO) As Integer
  1081. Declare Function APS_pt_set_vs Lib "APS168x64.dll" (ByVal Board_ID As Integer, ByVal PtbId As Integer, ByVal Vs As Double) As Integer
  1082. Declare Function APS_pt_get_vs Lib "APS168x64.dll" (ByVal Board_ID As Integer, ByVal PtbId As Integer, ByRef Vs As Double) As Integer
  1083. Declare Function APS_pt_start Lib "APS168x64.dll" (ByVal Board_ID As Integer, ByVal PtbId As Integer) As Integer
  1084. Declare Function APS_pt_stop Lib "APS168x64.dll" (ByVal Board_ID As Integer, ByVal PtbId As Integer) As Integer
  1085. Declare Function APS_get_pt_status Lib "APS168x64.dll" (ByVal Board_ID As Integer, ByVal PtbId As Integer, ByRef Status As PTSTS) As Integer
  1086. Declare Function APS_reset_pt_buffer Lib "APS168x64.dll" (ByVal Board_ID As Integer, ByVal PtbId As Integer) As Integer
  1087. Declare Function APS_pt_roll_back Lib "APS168x64.dll" (ByVal Board_ID As Integer, ByVal PtbId As Integer, ByVal Max_Speed As Double) As Integer
  1088. Declare Function APS_pt_get_error Lib "APS168x64.dll" (ByVal Board_ID As Integer, ByVal PtbId As Integer, ByRef ErrCode As Integer) As Integer
  1089. 'Cmd buffer setting
  1090. Declare Function APS_pt_ext_set_do_ch Lib "APS168x64.dll" (ByVal Board_ID As Integer, ByVal PtbId As Integer, ByVal Channel As Integer, ByVal OnOff As Integer) As Integer
  1091. Declare Function APS_pt_ext_set_table_no Lib "APS168x64.dll" (ByVal Board_ID As Integer, ByVal PtbId As Integer, ByVal CtrlNo As Integer, ByVal TableNo As Integer) As Integer
  1092. 'Profile buffer setting
  1093. Declare Function APS_pt_set_absolute Lib "APS168x64.dll" (ByVal Board_ID As Integer, ByVal PtbId As Integer) As Integer
  1094. Declare Function APS_pt_set_relative Lib "APS168x64.dll" (ByVal Board_ID As Integer, ByVal PtbId As Integer) As Integer
  1095. Declare Function APS_pt_set_trans_buffered Lib "APS168x64.dll" (ByVal Board_ID As Integer, ByVal PtbId As Integer) As Integer
  1096. Declare Function APS_pt_set_trans_inp Lib "APS168x64.dll" (ByVal Board_ID As Integer, ByVal PtbId As Integer) As Integer
  1097. Declare Function APS_pt_set_trans_blend_dec Lib "APS168x64.dll" (ByVal Board_ID As Integer, ByVal PtbId As Integer, ByVal Bp As Double) As Integer
  1098. Declare Function APS_pt_set_trans_blend_dist Lib "APS168x64.dll" (ByVal Board_ID As Integer, ByVal PtbId As Integer, ByVal Bp As Double) As Integer
  1099. Declare Function APS_pt_set_trans_blend_pcnt Lib "APS168x64.dll" (ByVal Board_ID As Integer, ByVal PtbId As Integer, ByVal Bp As Double) As Integer
  1100. Declare Function APS_pt_set_acc Lib "APS168x64.dll" (ByVal Board_ID As Integer, ByVal PtbId As Integer, ByVal Acc As Double) As Integer
  1101. Declare Function APS_pt_set_dec Lib "APS168x64.dll" (ByVal Board_ID As Integer, ByVal PtbId As Integer, ByVal Dec As Double) As Integer
  1102. Declare Function APS_pt_set_acc_dec Lib "APS168x64.dll" (ByVal Board_ID As Integer, ByVal PtbId As Integer, ByVal AccDec As Double) As Integer
  1103. Declare Function APS_pt_set_s Lib "APS168x64.dll" (ByVal Board_ID As Integer, ByVal PtbId As Integer, ByVal Sf As Double) As Integer
  1104. Declare Function APS_pt_set_vm Lib "APS168x64.dll" (ByVal Board_ID As Integer, ByVal PtbId As Integer, ByVal Vm As Double) As Integer
  1105. Declare Function APS_pt_set_ve Lib "APS168x64.dll" (ByVal Board_ID As Integer, ByVal PtbId As Integer, ByVal Ve As Double) As Integer
  1106. 'Program download functions
  1107. Declare Function APS_load_vmc_program Lib "APS168x64.dll" (ByVal Board_ID As Integer, ByVal TaskNum As Integer, ByRef pFile As String, ByVal Password As Integer) As Integer
  1108. Declare Function APS_save_vmc_program Lib "APS168x64.dll" (ByVal Board_ID As Integer, ByVal TaskNum As Integer, ByRef pFile As String, ByVal Password As Integer) As Integer
  1109. Declare Function APS_load_amc_program Lib "APS168x64.dll" (ByVal Board_ID As Integer, ByVal TaskNum As Integer, ByRef pFile As String, ByVal Password As Integer) As Integer
  1110. Declare Function APS_save_amc_program Lib "APS168x64.dll" (ByVal Board_ID As Integer, ByVal TaskNum As Integer, ByRef pFile As String, ByVal Password As Integer) As Integer
  1111. Declare Function APS_set_task_mode Lib "APS168x64.dll" (ByVal Board_ID As Integer, ByVal TaskNum As Integer, ByVal Mode As Byte, ByVal LastIP As UShort) As Integer
  1112. Declare Function APS_get_task_mode Lib "APS168x64.dll" (ByVal Board_ID As Integer, ByVal TaskNum As Integer, ByRef Mode As Byte, ByRef LastIP As UShort) As Integer
  1113. Declare Function APS_start_task Lib "APS168x64.dll" (ByVal Board_ID As Integer, ByVal TaskNum As Integer, ByVal CtrlCmd As Integer) As Integer
  1114. Declare Function APS_get_task_info Lib "APS168x64.dll" (ByVal Board_ID As Integer, ByVal TaskNum As Integer, ByRef Info As TSK_INFO) As Integer
  1115. Declare Function APS_get_task_msg Lib "APS168x64.dll" (ByVal Board_ID As Integer, ByRef QueueSts As UShort, ByRef ActualSize As UShort, ByVal CharArr() As Byte) As Integer
  1116. 'Latch functins
  1117. Declare Function APS_get_encoder Lib "APS168x64.dll" (ByVal Axis_ID As Integer, ByRef Encoder As Integer) As Integer
  1118. Declare Function APS_get_latch_counter Lib "APS168x64.dll" (ByVal Axis_ID As Integer, ByVal Src As Integer, ByRef Counter As Integer) As Integer
  1119. Declare Function APS_get_latch_event Lib "APS168x64.dll" (ByVal Axis_ID As Integer, ByVal Src As Integer, ByRef eEvent As Integer) As Integer
  1120. 'Raw command counter [Only for PCI-8254/8]
  1121. Declare Function APS_get_command_counter Lib "APS168x64.dll" (ByVal Axis_ID As Integer, ByRef Counter As Integer) As Integer
  1122. 'Reset raw command counter [For PCIe-8338]
  1123. Declare Function APS_reset_command_counter Lib "APS168x64.dll" (ByVal Axis_ID As Integer) As Integer
  1124. '//Watch dog timer
  1125. Declare Function APS_wdt_start Lib "APS168x64.dll" (ByVal Board_ID As Integer, ByVal TimerNo As Integer, ByVal TimeOut As Integer) As Integer
  1126. Declare Function APS_wdt_get_timeout_period Lib "APS168x64.dll" (ByVal Board_ID As Integer, ByVal TimerNo As Integer, ByRef TimeOut As Integer) As Integer
  1127. Declare Function APS_wdt_reset_counter Lib "APS168x64.dll" (ByVal Board_ID As Integer, ByVal TimerNo As Integer) As Integer
  1128. Declare Function APS_wdt_get_counter Lib "APS168x64.dll" (ByVal Board_ID As Integer, ByVal TimerNo As Integer, ByRef Counter As Integer) As Integer
  1129. Declare Function APS_wdt_set_action_event Lib "APS168x64.dll" (ByVal Board_ID As Integer, ByVal TimerNo As Integer, ByVal EventByBit As Integer) As Integer
  1130. Declare Function APS_wdt_get_action_event Lib "APS168x64.dll" (ByVal Board_ID As Integer, ByVal TimerNo As Integer, ByRef EventByBit As Integer) As Integer
  1131. 'Multi-axes simultaneuos move start/stop
  1132. Declare Function APS_move_trigger Lib "APS168x64.dll" (ByVal Dimension As Integer, ByVal Axis_ID_Array() As Integer) As Integer
  1133. Declare Function APS_stop_move_multi Lib "APS168x64.dll" (ByVal Dimension As Integer, ByVal Axis_ID_Array() As Integer) As Integer
  1134. Declare Function APS_emg_stop_multi Lib "APS168x64.dll" (ByVal Dimension As Integer, ByVal Axis_ID_Array() As Integer) As Integer
  1135. 'Gear/Gantry functions
  1136. Declare Function APS_start_gear Lib "APS168x64.dll" (ByVal Axis_ID As Integer, ByVal Mode As Integer) As Integer
  1137. Declare Function APS_get_gear_status Lib "APS168x64.dll" (ByVal Axis_ID As Integer, ByRef Status As Integer) As Integer
  1138. '//Latch Function: for latching multi-points
  1139. Declare Function APS_set_ltc_counter Lib "APS168x64.dll" (ByVal Board_ID As Integer, ByVal CntNum As Integer, ByVal CntValue As Integer) As Integer
  1140. Declare Function APS_get_ltc_counter Lib "APS168x64.dll" (ByVal Board_ID As Integer, ByVal CntNum As Integer, ByRef CntValue As Integer) As Integer
  1141. Declare Function APS_set_ltc_fifo_param Lib "APS168x64.dll" (ByVal Board_ID As Integer, ByVal FLtcCh As Integer, ByVal Param_No As Integer, ByVal Param_No As Integer) As Integer
  1142. Declare Function APS_get_ltc_fifo_param Lib "APS168x64.dll" (ByVal Board_ID As Integer, ByVal FLtcCh As Integer, ByVal Param_No As Integer, ByRef Param_No As Integer) As Integer
  1143. Declare Function APS_manual_latch Lib "APS168x64.dll" (ByVal Board_ID As Integer, ByVal LatchSignalInBits As Integer) As Integer
  1144. Declare Function APS_enable_ltc_fifo Lib "APS168x64.dll" (ByVal Board_ID As Integer, ByVal FLtcCh As Integer, ByVal Enable As Integer) As Integer
  1145. Declare Function APS_reset_ltc_fifo Lib "APS168x64.dll" (ByVal Board_ID As Integer, ByVal FLtcCh As Integer) As Integer
  1146. Declare Function APS_get_ltc_fifo_data Lib "APS168x64.dll" (ByVal Board_ID As Integer, ByVal FLtcCh As Integer, ByRef Data As Integer) As Integer
  1147. Declare Function APS_get_ltc_fifo_usage Lib "APS168x64.dll" (ByVal Board_ID As Integer, ByVal FLtcCh As Integer, ByRef Usage As Integer) As Integer
  1148. Declare Function APS_get_ltc_fifo_free_space Lib "APS168x64.dll" (ByVal Board_ID As Integer, ByVal FLtcCh As Integer, ByRef FreeSpace As Integer) As Integer
  1149. Declare Function APS_get_ltc_fifo_status Lib "APS168x64.dll" (ByVal Board_ID As Integer, ByVal FLtcCh As Integer, ByRef Status As Integer) As Integer
  1150. Declare Function APS_get_ltc_fifo_point Lib "APS168x64.dll" (ByVal Board_ID As Integer, ByVal FLtcCh As Integer, ByRef ArraySize As Integer, <[In](), Out()> ByVal LatchPoint As LATCH_POINT()) As Integer
  1151. '//For Single latch for PCI8154/58/MNET-4XMO-(C)
  1152. Declare Function APS_manual_latch2 Lib "APS168x64.dll" (ByVal Board_ID As Integer) As Integer
  1153. Declare Function APS_get_latch_data2 Lib "APS168x64.dll" (ByVal Board_ID As Integer, ByVal LatchNum As Integer, ByRef LatchData As Integer) As Integer
  1154. Declare Function APS_set_backlash_en Lib "APS168x64.dll" (ByVal Board_ID As Integer, ByVal Enable As Integer) As Integer
  1155. Declare Function APS_get_backlash_en Lib "APS168x64.dll" (ByVal Board_ID As Integer, ByRef Enable As Integer) As Integer
  1156. 'ODM Functions for Mechatrolink
  1157. Declare Function APS_start_mlink Lib "APS168x64.dll" (ByVal Board_ID As Integer, ByRef AxisFound_InBits As Integer) As Integer
  1158. Declare Function APS_stop_mlink Lib "APS168x64.dll" (ByVal Board_ID As Integer) As Integer
  1159. Declare Function APS_set_mlink_servo_param Lib "APS168x64.dll" (ByVal Axis_ID As Integer, ByVal Para_No As Integer, ByVal Para_Dat As Integer) As Integer
  1160. Declare Function APS_get_mlink_servo_param Lib "APS168x64.dll" (ByVal Axis_ID As Integer, ByVal Para_No As Integer, ByRef Para_Dat As Integer) As Integer
  1161. Declare Function APS_config_mlink Lib "APS168x64.dll" (ByVal Board_ID As Integer, ByVal TotalAxes As Integer, ByVal Axis_ID_Array() As Integer) As Integer
  1162. Declare Function APS_get_mlink_rv_ptr Lib "APS168x64.dll" (ByVal Axis_ID As Integer, ByRef rptr As UInteger) As Integer
  1163. Declare Function APS_get_mlink_sd_ptr Lib "APS168x64.dll" (ByVal Axis_ID As Integer, ByRef rptr As UInteger) As Integer
  1164. Declare Function APS_get_mlink_servo_alarm Lib "APS168x64.dll" (ByVal Axis_ID As Integer, ByVal Alarm_No As Integer, ByRef Alarm_Detail As Integer) As Integer
  1165. Declare Function APS_reset_mlink_servo_alarm Lib "APS168x64.dll" (ByVal Axis_ID As Integer) As Integer
  1166. Declare Function APS_set_mlink_pulse_per_rev Lib "APS168x64.dll" (ByVal Axis_ID As Integer, ByVal PPR As Integer) As Integer
  1167. 'Apply smmoth servo off [For PCI-8254/58]
  1168. Declare Function APS_smooth_servo_off Lib "APS168x64.dll" (ByVal Axis_ID As Integer, ByVal Decay_Rate As Double) As Integer
  1169. Declare Function APS_set_smooth_servo_off Lib "APS168x64.dll" (ByVal Board_ID As Integer, ByVal Axis_ID As Integer, ByVal cnt_Max As Integer, ByRef cnt_Err As Integer) As Integer
  1170. 'ODM functions
  1171. Declare Function APS_relative_move_wait Lib "APS168x64.dll" (ByVal Axis_ID As Integer, ByVal Distance As Integer, ByVal Max_Speed As Integer, ByVal Time_Out As Integer, ByVal Delay_Time As Integer, ByRef MotionSts As Integer) As Integer
  1172. Declare Function APS_absolute_move_wait Lib "APS168x64.dll" (ByVal Axis_ID As Integer, ByVal Position As Integer, ByVal Max_Speed As Integer, ByVal Time_Out As Integer, ByVal Delay_Time As Integer, ByRef MotionSts As Integer) As Integer
  1173. Declare Function APS_relative_linear_move_wait Lib "APS168x64.dll" (ByVal Dimension As Integer, ByVal Axis_ID_Array() As Integer, ByVal Distance_Array() As Integer, ByVal Max_Linear_Speed As Integer, ByVal Time_Out As Integer, ByVal Delay_Time As Integer, ByRef MotionSts As Integer) As Integer
  1174. Declare Function APS_absolute_linear_move_wait Lib "APS168x64.dll" (ByVal Dimension As Integer, ByVal Axis_ID_Array() As Integer, ByVal Position_Array() As Integer, ByVal Max_Linear_Speed As Integer, ByVal Time_Out As Integer, ByVal Delay_Time As Integer, ByRef MotionSts As Integer) As Integer
  1175. Declare Function APS_relative_move_non_wait Lib "APS168x64.dll" (ByVal Axis_ID As Integer, ByVal Distance As Integer, ByVal Max_Speed As Integer, ByVal Time_Out As Integer, ByVal Delay_Time As Integer) As Integer
  1176. Declare Function APS_absolute_move_non_wait Lib "APS168x64.dll" (ByVal Axis_ID As Integer, ByVal Position As Integer, ByVal Max_Speed As Integer, ByVal Time_Out As Integer, ByVal Delay_Time As Integer) As Integer
  1177. Declare Function APS_relative_linear_move_non_wait Lib "APS168x64.dll" (ByVal Dimension As Integer, ByVal Axis_ID_Array() As Integer, ByVal Distance_Array() As Integer, ByVal Max_Linear_Speed As Integer, ByVal Time_Out As Integer, ByVal Delay_Time As Integer) As Integer
  1178. Declare Function APS_absolute_linear_move_non_wait Lib "APS168x64.dll" (ByVal Dimension As Integer, ByVal Axis_ID_Array() As Integer, ByVal Position_Array() As Integer, ByVal Max_Linear_Speed As Integer, ByVal Time_Out As Integer, ByVal Delay_Time As Integer) As Integer
  1179. Declare Function APS_wait_move_done Lib "APS168x64.dll" (ByVal Axis_ID As Integer, ByRef MotionSts As Integer) As Integer
  1180. 'ODM functions [For MNET-4XMO-C]
  1181. Declare Function APS_absolute_arc_move_ex Lib "APS168x64.dll" (ByVal Dimension As Integer, ByVal Axis_ID_Array() As Integer, ByVal Center_Pos_Array() As Integer, ByVal End_Pos_Array() As Integer, ByVal CwOrCcw As Integer, ByVal Max_Arc_Speed As Integer) As Integer
  1182. Declare Function APS_motion_status_ex Lib "APS168x64.dll" (ByVal Axis_ID As Integer) As Integer
  1183. Declare Function APS_motion_io_status_ex Lib "APS168x64.dll" (ByVal Axis_ID As Integer) As Integer
  1184. 'Ring counter functions [For PCI-8154/8]
  1185. Declare Function APS_set_ring_counter Lib "APS168x64.dll" (ByVal Axis_ID As Integer, ByVal RingVal As Integer) As Integer
  1186. Declare Function APS_get_ring_counter Lib "APS168x64.dll" (ByVal Axis_ID As Integer, ByRef RingVal As Integer) As Integer
  1187. 'Circular limit functions
  1188. Declare Function APS_set_circular_limit Lib "APS168x64.dll" (ByVal Axis_ID_A As Integer, ByVal Axis_ID_B As Integer, ByVal Center_A As Double, ByVal Center_B As Double, ByVal Radius As Double, ByVal Stop_mode As Integer, ByVal Enable As Integer) As Integer
  1189. Declare Function APS_get_circular_limit Lib "APS168x64.dll" (ByVal Axis_ID_A As Integer, ByVal Axis_ID_B As Integer, ByRef Center_A As Double, ByRef Center_B As Double, ByRef Radius As Double, ByRef Stop_mode As Integer, ByRef Enable As Integer) As Integer
  1190. 'Pulser functions
  1191. Declare Function APS_manual_pulser_start Lib "APS168x64.dll" (ByVal Board_ID As Integer, ByVal Enable As Integer) As Integer
  1192. Declare Function APS_manual_pulser_velocity_move Lib "APS168x64.dll" (ByVal Axis_ID As Integer, ByVal MaxVelocity As Double) As Integer
  1193. Declare Function APS_manual_pulser_relative_move Lib "APS168x64.dll" (ByVal Axis_ID As Integer, ByVal Distance As Double, ByVal MaxVelocity As Double) As Integer
  1194. Declare Function APS_manual_pulser_home_move Lib "APS168x64.dll" (ByVal Axis_ID As Integer) As Integer
  1195. '//**********************************************
  1196. '// New header functions; 20151102
  1197. '//**********************************************
  1198. '// pitch error compensation
  1199. Declare Function APS_set_pitch_table Lib "APS168x64.dll" (ByVal Axis_ID As Integer, ByVal Comp_Type As Integer, ByVal Total_Points As Integer, ByVal MinPosition As Integer, ByVal Interval As UInteger, ByVal Comp_Data() As Integer) As Integer
  1200. Declare Function APS_get_pitch_table Lib "APS168x64.dll" (ByVal Axis_ID As Integer, ByRef Comp_Type As Integer, ByRef Total_Points As Integer, ByRef MinPosition As Integer, ByRef Interval As UInteger, ByVal Comp_Data() As Integer) As Integer
  1201. Declare Function APS_start_pitch_comp Lib "APS168x64.dll" (ByVal Axis_ID As Integer, ByVal Enable As Integer) As Integer
  1202. '//2D compensation [For PCI-8254/58]
  1203. Declare Function APS_set_2d_compensation_table Lib "APS168x64.dll" (ByVal AxisIdArray() As Integer, ByVal CompType As UInteger, ByVal TotalPointArray() As UInteger, ByVal StartPosArray() As Double, ByVal IntervalArray() As Double, ByVal CompDataArrayX() As Double, ByRef CompDataArrayY() As Double) As Integer
  1204. Declare Function APS_get_2d_compensation_table Lib "APS168x64.dll" (ByVal AxisIdArray() As Integer, ByRef CompType As UInteger, ByVal TotalPointArray() As UInteger, ByVal StartPosArray() As Double, ByVal IntervalArray() As Double, ByVal CompDataArrayX() As Double, ByRef CompDataArrayY() As Double) As Integer
  1205. Declare Function APS_start_2d_compensation Lib "APS168x64.dll" (ByVal Axis_ID As Integer, ByVal Enable As Integer) As Integer
  1206. Declare Function APS_absolute_linear_move_2d_compensation Lib "APS168x64.dll" (ByVal Axis_ID_Array() As Integer, ByVal Position_Array() As Double, ByVal Max_Linear_Speed As Double) As Integer
  1207. Declare Function APS_get_2d_compensation_command_position Lib "APS168x64.dll" (ByVal Axis_ID As Integer, ByRef CommandX As Double, ByRef CommandY As Double, ByRef PositionX As Double, ByRef PositionY As Double) As Integer
  1208. '20200120
  1209. Declare Function APS_set_trigger_table_data Lib "APS168x64.dll" (ByVal Board_ID As Integer, ByVal TCmpCh As Integer, ByVal DataArr() As Integer, ByVal ArraySize As Integer) As Integer
  1210. Declare Function APS_get_trigger_table_status Lib "APS168x64.dll" (ByVal Board_ID As Integer, ByVal TCmpCh As Integer, ByRef FreeSpace As Integer, ByRef FifoSts As Integer) As Integer
  1211. Declare Function APS_get_trigger_cmp_value Lib "APS168x64.dll" (ByVal Board_ID As Integer, ByVal TCmpCh As Integer, ByRef CmpVal As Integer) As Integer
  1212. Declare Function APS_enable_trigger_table Lib "APS168x64.dll" (ByVal Board_ID As Integer, ByVal TCmpCh As Integer, ByVal Enable As Integer) As Integer
  1213. Declare Function APS_reset_trigger_table Lib "APS168x64.dll" (ByVal Board_ID As Integer, ByVal TCmpCh As Integer) As Integer
  1214. '// Multi-dimension comparator function
  1215. Declare Function APS_set_multi_trigger_table Lib "APS168x64.dll" (ByVal Board_ID As Integer, ByVal Dimension As Integer, ByVal DataArr As MCMP_POINT(), ByVal ArraySize As Integer, ByVal Window As Integer) As Integer
  1216. Declare Function APS_get_multi_trigger_table_cmp Lib "APS168x64.dll" (ByVal Board_ID As Integer, ByVal Dimension As Integer, ByRef CmpVal As MCMP_POINT) As Integer
  1217. '// Only support [For PCIe-833X + ECAT-4XMO-MT, ECAT-TRG4-MT]
  1218. Declare Function APS_set_field_bus_multi_trigger_table Lib "APS168x64.dll" (ByVal Board_ID As Integer, ByVal BUS_No As Integer, ByVal MOD_No As Integer, ByVal MTCmpCh As Integer, ByVal Dimension As Integer, ByVal DataArr As MCMP_POINT(), ByVal ArraySize As Integer, ByVal Window As Integer) As Integer
  1219. Declare Function APS_get_field_bus_multi_trigger_table_cmp Lib "APS168x64.dll" (ByVal Board_ID As Integer, ByVal BUS_No As Integer, ByVal MOD_No As Integer, ByVal MTCmpCh As Integer, ByVal Dimension As Integer, ByRef CmpVal As MCMP_POINT) As Integer
  1220. Declare Function APS_get_field_bus_multi_table_cmp_remain_count Lib "APS168x64.dll" (ByVal Board_ID As Integer, ByVal BUS_No As Integer, ByVal MOD_No As Integer, ByVal MTCmpCh As Integer, ByRef Cnt As Integer) As Integer
  1221. '// 2D arc-interpolation for 3-point
  1222. Declare Function APS_arc2_ct_all Lib "APS168x64.dll" (ByVal Axis_ID_Array() As Integer, ByVal APS_Option As Integer, ByVal AnyArray() As Double, ByVal EndArray() As Double, ByVal Dir As Short, ByRef TransPara As Double, ByVal Vs As Double, ByVal Vm As Double, ByVal Ve As Double, ByVal Acc As Double, ByVal Dec As Double, ByVal SFac As Double, ByRef Wait As ASYNCALL) As Integer
  1223. 'EMX-100
  1224. Declare Function APS_register_emx Lib "APS168x64.dll" (ByVal emx_online As Integer, ByVal options As Integer) As Integer
  1225. Declare Function APS_get_deviceIP Lib "APS168x64.dll" (ByVal Board_ID As Integer, ByRef options As String) As Integer
  1226. Declare Function APS_reset_emx_alarm Lib "APS168x64.dll" (ByVal Axis_ID As Integer) As Integer
  1227. Declare Function APS_check_motion_profile_emx Lib "APS168x64.dll" (ByVal Axis_ID As Integer, ByRef profile_input As Speed_profile, ByRef profile_output As Speed_profile, ByRef MinDis As Integer) As Integer
  1228. 'Gantry
  1229. Declare Function APS_get_gantry_number Lib "APS168x64.dll" (ByVal Axis_ID As Integer, ByRef SlaveAxisIDSize As Integer) As Integer
  1230. Declare Function APS_get_gantry_info Lib "APS168x64.dll" (ByVal Axis_ID As Integer, ByVal SlaveAxisIDSize As Integer, ByVal SlaveAxisIDArray() As Integer) As Integer
  1231. Declare Function APS_get_gantry_deviation Lib "APS168x64.dll" (ByVal Axis_ID As Integer, ByVal SlaveAxisIDSize As Integer, ByVal SlaveAxisIDArray() As Integer, ByVal DeviationArray() As Double) As Integer
  1232. 'PVT function
  1233. Declare Function APS_pvt_add_point Lib "APS168x64.dll" (ByVal Axis_ID As Integer, ByVal ArraySize As Integer, ByVal PositionArray() As Double, ByVal VelocityArray() As Double, ByVal TimeArray() As Double) As Integer
  1234. Declare Function APS_pvt_get_status Lib "APS168x64.dll" (ByVal Axis_ID As Integer, ByRef FreeSize As Integer, ByRef PointCount As Integer, ByRef State As Integer) As Integer
  1235. Declare Function APS_pvt_start Lib "APS168x64.dll" (ByVal Dimension As Integer, ByVal Axis_ID_Array() As Integer, ByVal Enable As Integer) As Integer
  1236. Declare Function APS_pvt_reset Lib "APS168x64.dll" (ByVal Axis_ID As Integer) As Integer
  1237. 'PT function
  1238. Declare Function APS_pt_motion_add_point Lib "APS168x64.dll" (ByVal Axis_ID As Integer, ByVal ArraySize As Integer, ByVal PositionArray() As Double, ByVal TimeArray() As Double) As Integer
  1239. Declare Function APS_pt_motion_get_status Lib "APS168x64.dll" (ByVal Axis_ID As Integer, ByRef FreeSize As Integer, ByRef PointCount As Integer, ByRef State As Integer) As Integer
  1240. Declare Function APS_pt_motion_start Lib "APS168x64.dll" (ByVal Dimension As Integer, ByVal Axis_ID_Array() As Integer, ByVal Enable As Integer) As Integer
  1241. Declare Function APS_pt_motion_reset Lib "APS168x64.dll" (ByVal Axis_ID As Integer) As Integer
  1242. ' Get Speed profile calculation
  1243. Declare Function APS_relative_move_profile Lib "APS168x64.dll" (ByVal Axis_ID As Integer, ByVal Distance As Integer, ByVal Max_Speed As Integer, ByRef StrVel As Integer, ByRef MaxVel As Integer, ByRef Tacc As Double, ByRef Tdec As Double, ByRef Tconst As Double) As Integer
  1244. Declare Function APS_absolute_move_profile Lib "APS168x64.dll" (ByVal Axis_ID As Integer, ByVal Position As Integer, ByVal Max_Speed As Integer, ByRef StrVel As Integer, ByRef MaxVel As Integer, ByRef Tacc As Double, ByRef Tdec As Double, ByRef Tconst As Double) As Integer
  1245. ' ASYNC mode
  1246. Declare Function APS_get_error_code Lib "APS168x64.dll" (ByVal Axis_ID As Integer, ByVal Index As UInteger, ByRef ErrorCode As Integer) As Integer
  1247. Declare Function APS_get_cmd_fifo_usage Lib "APS168x64.dll" (ByVal Axis_ID As Integer, ByVal Number As UInteger) As Integer
  1248. 'Get fpga latch value [For PCI-8254/58]
  1249. Declare Function APS_get_axis_latch_data Lib "APS168x64.dll" (ByVal Axis_ID As Integer, ByVal latch_channel As Integer, ByRef latch_data As Integer) As Integer
  1250. 'Coordinate transform 20190624
  1251. Declare Function APS_set_coordTransform2D_config Lib "APS168x64.dll" (ByVal Board_ID As Integer, ByVal AxisID_X As Integer, ByVal AxisID_Y As Integer, ByVal XYAngle As Double, ByVal Enable As Integer) As Integer
  1252. Declare Function APS_get_coordTransform2D_config Lib "APS168x64.dll" (ByVal Board_ID As Integer, ByRef AxisID_X As Integer, ByRef AxisID_Y As Integer, ByRef XYAngle As Double, ByRef Enable As Integer) As Integer
  1253. Declare Function APS_get_coordTransform2D_position Lib "APS168x64.dll" (ByVal Board_ID As Integer, ByRef Cmd_transform_X As Double, ByRef Cmd_transform_Y As Double, ByRef Fbk_transform_X As Double, ByRef Fbk_transform_Y As Double) As Integer
  1254. ' Torque control
  1255. Declare Function APS_get_torque_command Lib "APS168x64.dll" (ByVal Axis_ID As Integer, ByRef TorqueCmd As Integer) As Integer
  1256. Declare Function APS_set_command_control_mode Lib "APS168x64.dll" (ByVal Axis_ID As Integer, ByVal Mode As Byte) As Integer
  1257. Declare Function APS_get_command_control_mode Lib "APS168x64.dll" (ByVal Axis_ID As Integer, ByRef Mode As Byte) As Integer
  1258. Declare Function APS_torque_move Lib "APS168x64.dll" (ByVal Axis_ID As Integer, ByVal TorqueValue As Short, ByVal Slope As UInteger, ByVal APS_Option As UShort, ByRef Wait As ASYNCALL) As Integer
  1259. ' Interrupt ISR callback [For all interrupt]
  1260. <UnmanagedFunctionPointer(CallingConvention.Cdecl)> Public Delegate Sub callback_func()
  1261. Declare Function APS_register_int_callback Lib "APS168x64.dll" (ByVal ISR_No As Integer, ByVal Board_ID As Integer, ByVal Item_No As Integer, ByVal Factor_No As Integer, ByVal SuccessHandler As callback_func, ByVal FailHandler As callback_func, ByVal Action As Integer) As Integer
  1262. 'For asynchronous function. For PCIe-833x only.
  1263. Declare Function APS_motion_status_async Lib "APS168x64.dll" (ByVal Axis_ID As Integer) As Integer
  1264. Declare Function APS_motion_io_status_async Lib "APS168x64.dll" (ByVal Axis_ID As Integer) As Integer
  1265. Declare Function APS_get_command_f_async Lib "APS168x64.dll" (ByVal Axis_ID As Integer, ByRef Command As Double) As Integer
  1266. Declare Function APS_get_position_f_async Lib "APS168x64.dll" (ByVal Axis_ID As Integer, ByRef Position As Double) As Integer
  1267. Declare Function APS_get_last_error Lib "APS168x64.dll" (ByVal Axis_ID As Integer, ByRef ErrorCode As Integer) As Integer
  1268. ' for AMP-304C
  1269. Declare Function APS_set_trigger_table_data_ex Lib "APS168x64.dll" (ByVal Board_ID As Integer, ByVal TCmpCh As Integer, ByVal TcmpDataArr() As TCMP_EX_POINT, ByVal ArraySize As Integer, ByVal APS_Option As Integer) As Integer
  1270. 'for 8364RS
  1271. Declare Function APS_set_drive_input_mapping Lib "APS168x64.dll" (ByVal Board_ID As Integer, ByVal Bus_No As Integer, ByVal pFilePath As String, ByVal _option As Integer) As Integer
  1272. Declare Function APS_set_trigger_output_mapping Lib "APS168x64.dll" (ByVal Board_ID As Integer, ByVal Bus_No As Integer, ByVal pFilePath As String, ByVal _option As Integer) As Integer
  1273. Declare Function APS_get_msg_size Lib "APS168x64.dll" (ByVal Board_ID As Integer, ByVal ArraySize As Integer, ByRef MsgQueueSizeArr As Integer) As Integer
  1274. Declare Function APS_get_msg_data Lib "APS168x64.dll" (ByVal Board_ID As Integer, ByVal MsgNo As Integer, ByVal MsgNum As Integer, ByVal MsgSize As Integer, ByRef ActualMsgNum As Integer, <Out> ByVal MsgQueueArr As Char(,)) As Integer
  1275. 'for AMP-304C and 8364RS
  1276. Declare Function APS_get_trigger_table_remain_count Lib "APS168x64.dll" (ByVal Board_ID As Integer, ByVal TCmpCh As Integer, ByRef Cnt As Integer) As Integer
  1277. Declare Function APS_get_trigger_linear_remain_count Lib "APS168x64.dll" (ByVal Board_ID As Integer, ByVal LCmpCh As Integer, ByRef Cnt As Integer) As Integer
  1278. Declare Function APS_load_config_from_file Lib "APS168x64.dll" (ByVal Board_ID As Integer, ByVal FilePath As String, ByVal APS_Option As Integer) As Integer
  1279. 'Multi single table move
  1280. Declare Function APS_set_multiple_single_move_table Lib "APS168x64.dll" (ByVal Board_ID As Integer, ByVal TableIndex As UInteger, ByVal AxisIDArySize As Byte, ByVal Axis_ID_Array() As Integer, ByVal MoveCmdSize As UInteger, ByVal MoveTable() As STR_MOVE_SETTING, ByVal APS_Option As Integer) As Integer
  1281. Declare Function APS_get_multiple_single_move_table_status Lib "APS168x64.dll" (ByVal Board_ID As Integer, ByVal TableIndex As UInteger, ByRef Status As Short, ByRef LastErrorCode As Integer, ByRef IsBufferEmpty As Byte) As Integer
  1282. End Module