Zmcaux.cs 146 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587158815891590159115921593159415951596159715981599160016011602160316041605160616071608160916101611161216131614161516161617161816191620162116221623162416251626162716281629163016311632163316341635163616371638163916401641164216431644164516461647164816491650165116521653165416551656165716581659166016611662166316641665166616671668166916701671167216731674167516761677167816791680168116821683168416851686168716881689169016911692169316941695169616971698169917001701170217031704170517061707170817091710171117121713171417151716171717181719172017211722172317241725172617271728172917301731173217331734173517361737173817391740174117421743174417451746174717481749175017511752175317541755175617571758175917601761176217631764176517661767176817691770177117721773177417751776177717781779178017811782178317841785178617871788178917901791179217931794179517961797179817991800180118021803180418051806180718081809181018111812181318141815181618171818181918201821182218231824182518261827182818291830183118321833183418351836183718381839184018411842184318441845184618471848184918501851185218531854185518561857185818591860186118621863186418651866186718681869187018711872187318741875187618771878187918801881188218831884188518861887188818891890189118921893189418951896189718981899190019011902190319041905190619071908190919101911191219131914191519161917191819191920192119221923192419251926192719281929193019311932193319341935193619371938193919401941194219431944194519461947194819491950195119521953195419551956195719581959196019611962196319641965196619671968196919701971197219731974197519761977197819791980198119821983198419851986198719881989199019911992199319941995199619971998199920002001200220032004200520062007200820092010201120122013201420152016201720182019202020212022202320242025202620272028202920302031203220332034203520362037203820392040204120422043204420452046204720482049205020512052205320542055205620572058205920602061206220632064206520662067206820692070207120722073207420752076207720782079208020812082208320842085208620872088208920902091209220932094209520962097209820992100210121022103210421052106210721082109211021112112211321142115211621172118211921202121212221232124212521262127212821292130213121322133213421352136213721382139214021412142214321442145214621472148214921502151215221532154215521562157215821592160216121622163216421652166216721682169217021712172217321742175217621772178217921802181218221832184218521862187218821892190219121922193219421952196219721982199220022012202220322042205220622072208220922102211221222132214221522162217221822192220222122222223222422252226222722282229223022312232223322342235223622372238223922402241224222432244224522462247224822492250225122522253225422552256225722582259226022612262226322642265226622672268226922702271227222732274227522762277227822792280228122822283228422852286228722882289229022912292229322942295229622972298229923002301230223032304230523062307230823092310231123122313231423152316231723182319232023212322232323242325232623272328232923302331233223332334233523362337233823392340234123422343234423452346234723482349235023512352235323542355235623572358235923602361236223632364236523662367236823692370237123722373237423752376237723782379238023812382238323842385238623872388238923902391239223932394239523962397239823992400240124022403240424052406240724082409241024112412241324142415241624172418241924202421242224232424242524262427242824292430243124322433243424352436243724382439244024412442244324442445244624472448244924502451245224532454245524562457245824592460246124622463246424652466246724682469247024712472247324742475247624772478247924802481248224832484248524862487248824892490249124922493249424952496249724982499250025012502250325042505250625072508250925102511251225132514251525162517251825192520252125222523252425252526252725282529253025312532253325342535253625372538253925402541254225432544254525462547254825492550255125522553255425552556255725582559256025612562256325642565256625672568256925702571257225732574257525762577257825792580258125822583258425852586258725882589259025912592259325942595259625972598259926002601260226032604260526062607260826092610261126122613261426152616261726182619262026212622262326242625262626272628262926302631263226332634263526362637263826392640264126422643264426452646264726482649265026512652265326542655265626572658265926602661266226632664266526662667266826692670267126722673267426752676267726782679268026812682268326842685268626872688268926902691269226932694269526962697269826992700270127022703270427052706270727082709271027112712271327142715271627172718271927202721272227232724272527262727272827292730273127322733273427352736273727382739274027412742
  1. using System;
  2. using System.Collections.Generic;
  3. using System.Text;
  4. using System.Runtime.InteropServices;
  5. namespace StageController.HDS
  6. {
  7. public class zmcaux
  8. {
  9. //ZAUX支持的最大轴数宏
  10. //#define MAX_AXIS_AUX 32
  11. //#define MAX_CARD_AUX 16
  12. public const int MAX_AXIS_AUX = 32;
  13. public const int MAX_CARD_AUX = 16;
  14. /*********************************************************
  15. 数据类型定义
  16. **********************************************************/
  17. //typedef unsigned __int64 uint64;
  18. //typedef __int64 int64;
  19. //#define BYTE INT8U
  20. //#define WORD INT16U
  21. //#define DWORD INT32U
  22. //typedef unsigned char BYTE;
  23. //typedef unsigned short WORD;
  24. //typedef unsigned int DWORD;
  25. //#define __stdcall
  26. //typedef unsigned char uint8; /* defined for unsigned 8-bits integer variable 无符号8位整型变量 */
  27. //typedef signed char int8; /* defined for signed 8-bits integer variable 有符号8位整型变量 */
  28. ///typedef unsigned short uint16; /* defined for unsigned 16-bits integer variable 无符号16位整型变量 */
  29. //typedef signed short int16; /* defined for signed 16-bits integer variable 有符号16位整型变量 */
  30. //typedef unsigned int uint32; /* defined for unsigned 32-bits integer variable 无符号32位整型变量 */
  31. //typedef signed int int32; /* defined for signed 32-bits integer variable 有符号32位整型变量 */
  32. //typedef float fp32; /* single precision floating point variable (32bits) 单精度浮点数(32位长度) */
  33. //typedef double fp64; /* double precision floating point variable (64bits) 双精度浮点数(64位长度) */
  34. //typedef unsigned int uint; /* defined for unsigned 32-bits integer variable 无符号32位整型变量 */
  35. /************************************************/
  36. //错误码
  37. /************************************************/
  38. //#define ERR_OK 0
  39. //#define ERROR_OK 0
  40. //#define ERR_SUCCESS 0
  41. //#define ERR_AUX_OFFSET 30000
  42. //#define ERR_NOACK ERR_AUX_OFFSET //无应答
  43. //#define ERR_ACKERROR (ERR_AUX_OFFSET+1) //应答错误
  44. //#define ERR_AUX_PARAERR (ERR_AUX_OFFSET+2) //参数错误
  45. //#define ERR_AUX_NOTSUPPORT (ERR_AUX_OFFSET+3) //参数错误
  46. public const int ERR_OK = 0;
  47. public const int ERROR_OK = 0;
  48. public const int ERR_SUCCESS = 0;
  49. public const int ERR_AUX_OFFSET = 30000;
  50. public const int ERR_NOACK = ERR_AUX_OFFSET;
  51. public const int ERR_ACKERROR = (ERR_AUX_OFFSET+1);
  52. public const int ERR_AUX_PARAERR = (ERR_AUX_OFFSET+2);
  53. public const int ERR_AUX_NOTSUPPORT = (ERR_AUX_OFFSET+3);
  54. /*********************************************************
  55. 函数声明
  56. **********************************************************/
  57. /*************************************************************
  58. Description: //BASE指令调用
  59. 仅仅修改在线命令的BASE列表,不对控制器的运行任务的BASE进行修改.
  60. 修改后,后续的所有MOVE等指令都是以这个BASE为基础
  61. Input: //卡链接handle
  62. Output: //
  63. Return: //错误码
  64. *************************************************************/
  65. //int32 __stdcall ZAux_Base(ZMC_HANDLE handle, int imaxaxises, int *piAxislist);
  66. [DllImport("zauxdll.dll", EntryPoint = "ZAux_Base", CharSet = CharSet.Ansi, CallingConvention = CallingConvention.StdCall)]
  67. public static extern Int32 ZAux_Base(IntPtr handle, int imaxaxises, int[] piAxislist);
  68. /*************************************************************
  69. Description: //定义DPOS
  70. Input: //卡链接handle
  71. Output: //
  72. Return: //错误码
  73. *************************************************************/
  74. // int32 __stdcall ZAux_Defpos(ZMC_HANDLE handle, int imaxaxises, float *pfDposlist);
  75. [DllImport("zauxdll.dll", EntryPoint = "ZAux_Defpos", CharSet = CharSet.Ansi, CallingConvention = CallingConvention.StdCall)]
  76. public static extern Int32 ZAux_Defpos(IntPtr handle, int imaxaxises, float[] pfDposlist);
  77. /*************************************************************
  78. Description: //相对插补
  79. Input: //卡链接handle
  80. Output: //
  81. Return: //错误码
  82. *************************************************************/
  83. //int32 __stdcall ZAux_Move(ZMC_HANDLE handle, int imaxaxises, float *pfDisancelist);
  84. [DllImport("zauxdll.dll", EntryPoint = "ZAux_Move", CharSet = CharSet.Ansi, CallingConvention = CallingConvention.StdCall)]
  85. public static extern Int32 ZAux_Move(IntPtr handle, int imaxaxises, float[] pfDisancelist);
  86. /*************************************************************
  87. Description: //相对插补
  88. Input: //卡链接handle
  89. Output: //
  90. Return: //错误码
  91. *************************************************************/
  92. //int32 __stdcall ZAux_MoveSp(ZMC_HANDLE handle, int imaxaxises, float *pfDisancelist);
  93. [DllImport("zauxdll.dll", EntryPoint = "ZAux_MoveSp", CharSet = CharSet.Ansi, CallingConvention = CallingConvention.StdCall)]
  94. public static extern Int32 ZAux_MoveSp(IntPtr handle, int imaxaxises, float[] pfDisancelist);
  95. /*************************************************************
  96. Description: //插补
  97. Input: //卡链接handle
  98. Output: //
  99. Return: //错误码
  100. *************************************************************/
  101. //int32 __stdcall ZAux_MoveAbs(ZMC_HANDLE handle, int imaxaxises, float *pfDisancelist);
  102. [DllImport("zauxdll.dll", EntryPoint = "ZAux_MoveAbs", CharSet = CharSet.Ansi, CallingConvention = CallingConvention.StdCall)]
  103. public static extern Int32 ZAux_MoveAbs(IntPtr handle, int imaxaxises, float[] pfDisancelist);
  104. /*************************************************************
  105. Description: //插补
  106. Input: //卡链接handle
  107. Output: //
  108. Return: //错误码
  109. *************************************************************/
  110. //int32 __stdcall ZAux_MoveAbsSp(ZMC_HANDLE handle, int imaxaxises, float *pfDisancelist);
  111. [DllImport("zauxdll.dll", EntryPoint = "ZAux_MoveAbsSp", CharSet = CharSet.Ansi, CallingConvention = CallingConvention.StdCall)]
  112. public static extern Int32 ZAux_MoveAbsSp(IntPtr handle, int imaxaxises, float[] pfDisancelist);
  113. /*************************************************************
  114. Description: //插补
  115. Input: //卡链接handle
  116. Output: //
  117. Return: //错误码
  118. *************************************************************/
  119. //int32 __stdcall ZAux_MoveModify(ZMC_HANDLE handle, int imaxaxises, float *pfDisancelist);
  120. [DllImport("zauxdll.dll", EntryPoint = "ZAux_MoveModify", CharSet = CharSet.Ansi, CallingConvention = CallingConvention.StdCall)]
  121. public static extern Int32 ZAux_MoveModify(IntPtr handle, int imaxaxises, float[] pfDisancelist);
  122. /*************************************************************
  123. Description: //插补
  124. Input: //卡链接handle
  125. end1 第一个轴运动坐标
  126. end2 第二个轴运动坐标
  127. centre1 第一个轴运动圆心,相对与起始点。
  128. centre2 第二个轴运动圆心,相对与起始点。
  129. direction 0-逆时针,1-顺时针
  130. Output: //
  131. Return: //错误码
  132. *************************************************************/
  133. //int32 __stdcall ZAux_MoveCirc(ZMC_HANDLE handle, float fend1, float fend2, float fcenter1, float fcenter2, int idirection);
  134. [DllImport("zauxdll.dll", EntryPoint = "ZAux_MoveCirc", CharSet = CharSet.Ansi, CallingConvention = CallingConvention.StdCall)]
  135. public static extern Int32 ZAux_MoveCirc(IntPtr handle, float fend1, float fend2, float fcenter1, float fcenter2, int idirection);
  136. /*************************************************************
  137. Description: //插补
  138. Input: //卡链接handle
  139. end1 第一个轴运动坐标
  140. end2 第二个轴运动坐标
  141. centre1 第一个轴运动圆心,相对与起始点。
  142. centre2 第二个轴运动圆心,相对与起始点。
  143. direction 0-逆时针,1-顺时针
  144. Output: //
  145. Return: //错误码
  146. *************************************************************/
  147. //int32 __stdcall ZAux_MoveCircSp(ZMC_HANDLE handle, float fend1, float fend2, float fcenter1, float fcenter2, int idirection);
  148. [DllImport("zauxdll.dll", EntryPoint = "ZAux_MoveCircSp", CharSet = CharSet.Ansi, CallingConvention = CallingConvention.StdCall)]
  149. public static extern Int32 ZAux_MoveCircSp(IntPtr handle, float fend1, float fend2, float fcenter1, float fcenter2, int idirection);
  150. /*************************************************************
  151. Description: //插补
  152. Input: //卡链接handle
  153. end1 第一个轴运动坐标,绝对位置
  154. end2 第二个轴运动坐标,绝对位置
  155. centre1 第一个轴运动圆心,绝对位置
  156. centre2 第二个轴运动圆心,绝对位置
  157. direction 0-逆时针,1-顺时针
  158. Output: //
  159. Return: //错误码
  160. *************************************************************/
  161. //int32 __stdcall ZAux_MoveCircAbs(ZMC_HANDLE handle, float fend1, float fend2, float fcenter1, float fcenter2, int idirection);
  162. [DllImport("zauxdll.dll", EntryPoint = "ZAux_MoveCircAbs", CharSet = CharSet.Ansi, CallingConvention = CallingConvention.StdCall)]
  163. public static extern Int32 ZAux_MoveCircAbs(IntPtr handle, float fend1, float fend2, float fcenter1, float fcenter2, int idirection);
  164. /*************************************************************
  165. Description: //插补
  166. Input: //卡链接handle
  167. end1 第一个轴运动坐标,绝对位置
  168. end2 第二个轴运动坐标,绝对位置
  169. centre1 第一个轴运动圆心,绝对位置
  170. centre2 第二个轴运动圆心,绝对位置
  171. direction 0-逆时针,1-顺时针
  172. Output: //
  173. Return: //错误码
  174. *************************************************************/
  175. //int32 __stdcall ZAux_MoveCircAbsSp(ZMC_HANDLE handle, float fend1, float fend2, float fcenter1, float fcenter2, int idirection);
  176. [DllImport("zauxdll.dll", EntryPoint = "ZAux_MoveCircAbsSp", CharSet = CharSet.Ansi, CallingConvention = CallingConvention.StdCall)]
  177. public static extern Int32 ZAux_MoveCircAbsSp(IntPtr handle, float fend1, float fend2, float fcenter1, float fcenter2, int idirection);
  178. /*************************************************************
  179. Description: //插补
  180. Input: //卡链接handle
  181. mid1 第一个轴中间点,相对起始点距离
  182. mid2 第二个轴中间点,相对起始点距离
  183. end1 第一个轴结束点,相对起始点距离
  184. end2 第二个轴结束点,相对起始点距离
  185. Output: //
  186. Return: //错误码
  187. *************************************************************/
  188. //int32 __stdcall ZAux_MoveCirc2(ZMC_HANDLE handle, float fmid1, float fmid2, float fend1, float fend2);
  189. [DllImport("zauxdll.dll", EntryPoint = "ZAux_MoveCirc2", CharSet = CharSet.Ansi, CallingConvention = CallingConvention.StdCall)]
  190. public static extern Int32 ZAux_MoveCirc2(IntPtr handle,float fmid1, float fmid2, float fend1, float fend2);
  191. /*************************************************************
  192. Description: //插补
  193. Input: //卡链接handle
  194. mid1 第一个轴中间点,相对起始点距离
  195. mid2 第二个轴中间点,相对起始点距离
  196. end1 第一个轴结束点,相对起始点距离
  197. end2 第二个轴结束点,相对起始点距离
  198. Output: //
  199. Return: //错误码
  200. *************************************************************/
  201. //int32 __stdcall ZAux_MoveCirc2Sp(ZMC_HANDLE handle, float fmid1, float fmid2, float fend1, float fend2);
  202. [DllImport("zauxdll.dll", EntryPoint = "ZAux_MoveCirc2Sp", CharSet = CharSet.Ansi, CallingConvention = CallingConvention.StdCall)]
  203. public static extern Int32 ZAux_MoveCirc2Sp(IntPtr handle,float fmid1, float fmid2, float fend1, float fend2);
  204. /*************************************************************
  205. Description: //插补
  206. Input: //卡链接handle
  207. mid1 第一个轴中间点,绝对位置
  208. mid2 第二个轴中间点,绝对位置
  209. end1 第一个轴结束点,绝对位置
  210. end2 第二个轴结束点,绝对位置
  211. Output: //
  212. Return: //错误码
  213. *************************************************************/
  214. //int32 __stdcall ZAux_MoveCirc2AbsSp(ZMC_HANDLE handle, float fmid1, float fmid2, float fend1, float fend2);
  215. [DllImport("zauxdll.dll", EntryPoint = "ZAux_MoveCirc2AbsSp", CharSet = CharSet.Ansi, CallingConvention = CallingConvention.StdCall)]
  216. public static extern Int32 ZAux_MoveCirc2AbsSp(IntPtr handle,float fmid1, float fmid2, float fend1, float fend2);
  217. /*************************************************************
  218. Description: //插补
  219. Input: //卡链接handle
  220. mid1 第一个轴中间点,绝对位置
  221. mid2 第二个轴中间点,绝对位置
  222. end1 第一个轴结束点,绝对位置
  223. end2 第二个轴结束点,绝对位置
  224. Output: //
  225. Return: //错误码
  226. *************************************************************/
  227. //int32 __stdcall ZAux_MoveCirc2Abs(ZMC_HANDLE handle, float fmid1, float fmid2, float fend1, float fend2);
  228. [DllImport("zauxdll.dll", EntryPoint = "ZAux_MoveCirc2Abs", CharSet = CharSet.Ansi, CallingConvention = CallingConvention.StdCall)]
  229. public static extern Int32 ZAux_MoveCirc2Abs(IntPtr handle,float fmid1, float fmid2, float fend1, float fend2);
  230. /*************************************************************
  231. Description: //插补
  232. Input: //卡链接handle
  233. end1 第一个轴运动坐标
  234. end2 第二个轴运动坐标
  235. centre1 第一个轴运动圆心,相对与起始点
  236. centre2 第二个轴运动圆心,相对与起始点
  237. direction 0-逆时针,1-顺时针
  238. distance3第三个轴运动距离。
  239. mode 第三轴的速度计算:
  240. 0(缺省)
  241. 第三轴参与速度计算。
  242. 1
  243. 第三轴不参与速度计算。
  244. Output: //
  245. Return: //错误码
  246. *************************************************************/
  247. //int32 __stdcall ZAux_MHelical(ZMC_HANDLE handle, float fend1, float fend2, float fcenter1, float fcenter2, int idirection, float fDistance3, int imode);
  248. [DllImport("zauxdll.dll", EntryPoint = "ZAux_MHelical", CharSet = CharSet.Ansi, CallingConvention = CallingConvention.StdCall)]
  249. public static extern Int32 ZAux_MHelical(IntPtr handle,float fend1, float fend2, float fcenter1, float fcenter2, int idirection, float fDistance3, int imode);
  250. /*************************************************************
  251. Description: //插补
  252. Input: //卡链接handle
  253. end1 第一个轴运动坐标
  254. end2 第二个轴运动坐标
  255. centre1 第一个轴运动圆心,相对与起始点
  256. centre2 第二个轴运动圆心,相对与起始点
  257. direction 0-逆时针,1-顺时针
  258. distance3第三个轴运动距离。
  259. mode 第三轴的速度计算:
  260. 0(缺省)
  261. 第三轴参与速度计算。
  262. 1
  263. 第三轴不参与速度计算。
  264. Output: //
  265. Return: //错误码
  266. *************************************************************/
  267. //int32 __stdcall ZAux_MHelicalAbs(ZMC_HANDLE handle, float fend1, float fend2, float fcenter1, float fcenter2, int idirection, float fDistance3, int imode);
  268. [DllImport("zauxdll.dll", EntryPoint = "ZAux_MHelicalAbs", CharSet = CharSet.Ansi, CallingConvention = CallingConvention.StdCall)]
  269. public static extern Int32 ZAux_MHelicalAbs(IntPtr handle,float fend1, float fend2, float fcenter1, float fcenter2, int idirection, float fDistance3, int imode);
  270. /*************************************************************
  271. Description: //插补
  272. Input: //卡链接handle
  273. end1 第一个轴运动坐标
  274. end2 第二个轴运动坐标
  275. centre1 第一个轴运动圆心,相对与起始点
  276. centre2 第二个轴运动圆心,相对与起始点
  277. direction 0-逆时针,1-顺时针
  278. distance3第三个轴运动距离。
  279. mode 第三轴的速度计算:
  280. 0(缺省)
  281. 第三轴参与速度计算。
  282. 1
  283. 第三轴不参与速度计算。
  284. Output: //
  285. Return: //错误码
  286. *************************************************************/
  287. //int32 __stdcall ZAux_MHelicalSp(ZMC_HANDLE handle, float fend1, float fend2, float fcenter1, float fcenter2, int idirection, float fDistance3, int imode);
  288. [DllImport("zauxdll.dll", EntryPoint = "ZAux_MHelicalSp", CharSet = CharSet.Ansi, CallingConvention = CallingConvention.StdCall)]
  289. public static extern Int32 ZAux_MHelicalSp(IntPtr handle,float fend1, float fend2, float fcenter1, float fcenter2, int idirection, float fDistance3, int imode);
  290. /*************************************************************
  291. Description: //插补
  292. Input: //卡链接handle
  293. end1 第一个轴运动坐标
  294. end2 第二个轴运动坐标
  295. centre1 第一个轴运动圆心,相对与起始点
  296. centre2 第二个轴运动圆心,相对与起始点
  297. direction 0-逆时针,1-顺时针
  298. distance3第三个轴运动距离。
  299. mode 第三轴的速度计算:
  300. 0(缺省)
  301. 第三轴参与速度计算。
  302. 1
  303. 第三轴不参与速度计算。
  304. Output: //
  305. Return: //错误码
  306. *************************************************************/
  307. //int32 __stdcall ZAux_MHelicalAbsSp(ZMC_HANDLE handle, float fend1, float fend2, float fcenter1, float fcenter2, int idirection, float fDistance3, int imode);
  308. [DllImport("zauxdll.dll", EntryPoint = "ZAux_MHelicalAbsSp", CharSet = CharSet.Ansi, CallingConvention = CallingConvention.StdCall)]
  309. public static extern Int32 ZAux_MHelicalAbsSp(IntPtr handle,float fend1, float fend2, float fcenter1, float fcenter2, int idirection, float fDistance3, int imode);
  310. /*************************************************************
  311. Description: //插补
  312. Input: //卡链接handle
  313. mid1 第一个轴中间点
  314. mid2 第二个轴中间点
  315. end1 第一个轴结束点
  316. end2 第二个轴结束点
  317. distance3第三个轴运动距离
  318. mode 第三轴的速度计算:
  319. Output: //
  320. Return: //错误码
  321. *************************************************************/
  322. //int32 __stdcall ZAux_MHelical2(ZMC_HANDLE handle, float fmid1, float fmid2, float fend1, float fend2, float fDistance3, int imode);
  323. [DllImport("zauxdll.dll", EntryPoint = "ZAux_MHelical2", CharSet = CharSet.Ansi, CallingConvention = CallingConvention.StdCall)]
  324. public static extern Int32 ZAux_MHelical2(IntPtr handle,float fmid1, float fmid2, float fend1, float fend2, float fDistance3, int imode);
  325. /*************************************************************
  326. Description: //插补
  327. Input: //卡链接handle
  328. mid1 第一个轴中间点
  329. mid2 第二个轴中间点
  330. end1 第一个轴结束点
  331. end2 第二个轴结束点
  332. distance3 第三个轴运动结束点
  333. mode 第三轴的速度计算:
  334. Output: //
  335. Return: //错误码
  336. *************************************************************/
  337. //int32 __stdcall ZAux_MHelical2Abs(ZMC_HANDLE handle, float fmid1, float fmid2, float fend1, float fend2, float fDistance3, int imode);
  338. [DllImport("zauxdll.dll", EntryPoint = "ZAux_MHelical2Abs", CharSet = CharSet.Ansi, CallingConvention = CallingConvention.StdCall)]
  339. public static extern Int32 ZAux_MHelical2Abs(IntPtr handle,float fmid1, float fmid2, float fend1, float fend2, float fDistance3, int imode);
  340. /*************************************************************
  341. Description: //插补
  342. Input: //卡链接handle
  343. mid1 第一个轴中间点
  344. mid2 第二个轴中间点
  345. end1 第一个轴结束点
  346. end2 第二个轴结束点
  347. distance3第三个轴运动距离
  348. mode 第三轴的速度计算:
  349. Output: //
  350. Return: //错误码
  351. *************************************************************/
  352. //int32 __stdcall ZAux_MHelical2Sp(ZMC_HANDLE handle, float fmid1, float fmid2, float fend1, float fend2, float fDistance3, int imode);
  353. [DllImport("zauxdll.dll", EntryPoint = "ZAux_MHelical2Sp", CharSet = CharSet.Ansi, CallingConvention = CallingConvention.StdCall)]
  354. public static extern Int32 ZAux_MHelical2Sp(IntPtr handle,float fmid1, float fmid2, float fend1, float fend2, float fDistance3, int imode);
  355. /*************************************************************
  356. Description: //插补
  357. Input: //卡链接handle
  358. mid1 第一个轴中间点
  359. mid2 第二个轴中间点
  360. end1 第一个轴结束点
  361. end2 第二个轴结束点
  362. distance3 第三个轴运动结束点
  363. mode 第三轴的速度计算:
  364. Output: //
  365. Return: //错误码
  366. *************************************************************/
  367. //int32 __stdcall ZAux_MHelical2AbsSp(ZMC_HANDLE handle, float fmid1, float fmid2, float fend1, float fend2, float fDistance3, int imode);
  368. [DllImport("zauxdll.dll", EntryPoint = "ZAux_MHelical2AbsSp", CharSet = CharSet.Ansi, CallingConvention = CallingConvention.StdCall)]
  369. public static extern Int32 ZAux_MHelical2AbsSp(IntPtr handle,float fmid1, float fmid2, float fend1, float fend2, float fDistance3, int imode);
  370. /*************************************************************
  371. Description: //插补
  372. Input: //卡链接handle
  373. Output: //
  374. Return: //错误码
  375. *************************************************************/
  376. //int32 __stdcall ZAux_MEclipse(ZMC_HANDLE handle, float fend1, float fend2, float fcenter1, float fcenter2, int idirection, float fADis, float fBDis);
  377. [DllImport("zauxdll.dll", EntryPoint = "ZAux_MEclipse", CharSet = CharSet.Ansi, CallingConvention = CallingConvention.StdCall)]
  378. public static extern Int32 ZAux_MEclipse(IntPtr handle,float fend1, float fend2, float fcenter1, float fcenter2, int idirection, float fADis, float fBDis);
  379. /*************************************************************
  380. Description: //插补
  381. Input: //卡链接handle
  382. Output: //
  383. Return: //错误码
  384. *************************************************************/
  385. //int32 __stdcall ZAux_MEclipseAbs(ZMC_HANDLE handle, float fend1, float fend2, float fcenter1, float fcenter2, int idirection, float fADis, float fBDis);
  386. [DllImport("zauxdll.dll", EntryPoint = "ZAux_MEclipseAbs", CharSet = CharSet.Ansi, CallingConvention = CallingConvention.StdCall)]
  387. public static extern Int32 ZAux_MEclipseAbs(IntPtr handle,float fend1, float fend2, float fcenter1, float fcenter2, int idirection, float fADis, float fBDis);
  388. /*************************************************************
  389. Description: //插补
  390. Input: //卡链接handle
  391. Output: //
  392. Return: //错误码
  393. *************************************************************/
  394. //int32 __stdcall ZAux_MEclipseSp(ZMC_HANDLE handle, float fend1, float fend2, float fcenter1, float fcenter2, int idirection, float fADis, float fBDis);
  395. [DllImport("zauxdll.dll", EntryPoint = "ZAux_MEclipseSp", CharSet = CharSet.Ansi, CallingConvention = CallingConvention.StdCall)]
  396. public static extern Int32 ZAux_MEclipseSp(IntPtr handle, float fend1, float fend2, float fcenter1, float fcenter2, int idirection, float fADis, float fBDis);
  397. /*************************************************************
  398. Description: //插补
  399. Input: //卡链接handle
  400. Output: //
  401. Return: //错误码
  402. *************************************************************/
  403. //int32 __stdcall ZAux_MEclipseAbsSp(ZMC_HANDLE handle, float fend1, float fend2, float fcenter1, float fcenter2, int idirection, float fADis, float fBDis);
  404. [DllImport("zauxdll.dll", EntryPoint = "ZAux_MEclipseAbsSp", CharSet = CharSet.Ansi, CallingConvention = CallingConvention.StdCall)]
  405. public static extern Int32 ZAux_MEclipseAbsSp(IntPtr handle,float fend1, float fend2, float fcenter1, float fcenter2, int idirection, float fADis, float fBDis);
  406. /*************************************************************
  407. Description: //插补 椭圆 + 螺旋
  408. Input: //卡链接handle
  409. Output: //
  410. Return: //错误码
  411. *************************************************************/
  412. //int32 __stdcall ZAux_MEclipseHelical(ZMC_HANDLE handle, float fend1, float fend2, float fcenter1, float fcenter2, int idirection, float fADis, float fBDis, float fDistance3);
  413. [DllImport("zauxdll.dll", EntryPoint = "ZAux_MEclipseHelical", CharSet = CharSet.Ansi, CallingConvention = CallingConvention.StdCall)]
  414. public static extern Int32 ZAux_MEclipseHelical(IntPtr handle,float fend1, float fend2, float fcenter1, float fcenter2, int idirection, float fADis, float fBDis, float fDistance3);
  415. /*************************************************************
  416. Description: //插补 椭圆 + 螺旋
  417. Input: //卡链接handle
  418. Output: //
  419. Return: //错误码
  420. *************************************************************/
  421. //int32 __stdcall ZAux_MEclipseHelicalAbs(ZMC_HANDLE handle, float fend1, float fend2, float fcenter1, float fcenter2, int idirection, float fADis, float fBDis);
  422. [DllImport("zauxdll.dll", EntryPoint = "ZAux_MEclipseHelicalAbs", CharSet = CharSet.Ansi, CallingConvention = CallingConvention.StdCall)]
  423. public static extern Int32 ZAux_MEclipseHelicalAbs(IntPtr handle, float fend1, float fend2, float fcenter1, float fcenter2, int idirection, float fADis, float fBDis);
  424. /*************************************************************
  425. Description: //插补 椭圆 + 螺旋
  426. Input: //卡链接handle
  427. Output: //
  428. Return: //错误码
  429. *************************************************************/
  430. //int32 __stdcall ZAux_MEclipseHelicalSp(ZMC_HANDLE handle, float fend1, float fend2, float fcenter1, float fcenter2, int idirection, float fADis, float fBDis, float fDistance3);
  431. [DllImport("zauxdll.dll", EntryPoint = "ZAux_MEclipseHelicalSp", CharSet = CharSet.Ansi, CallingConvention = CallingConvention.StdCall)]
  432. public static extern Int32 ZAux_MEclipseHelicalSp(IntPtr handle, float fend1, float fend2, float fcenter1, float fcenter2, int idirection, float fADis, float fBDis, float fDistance3);
  433. /*************************************************************
  434. Description: //插补 椭圆 + 螺旋
  435. Input: //卡链接handle
  436. Output: //
  437. Return: //错误码
  438. *************************************************************/
  439. //int32 __stdcall ZAux_MEclipseHelicalAbsSp(ZMC_HANDLE handle, float fend1, float fend2, float fcenter1, float fcenter2, int idirection, float fADis, float fBDis);
  440. [DllImport("zauxdll.dll", EntryPoint = "ZAux_MEclipseHelicalSp", CharSet = CharSet.Ansi, CallingConvention = CallingConvention.StdCall)]
  441. public static extern Int32 ZAux_MEclipseHelicalSp(IntPtr handle, float fend1, float fend2, float fcenter1, float fcenter2, int idirection, float fADis, float fBDis);
  442. /*************************************************************
  443. Description: //插补 空间圆弧
  444. Input: //卡链接handle
  445. end1 第1个轴运动距离参数1
  446. end2 第2个轴运动距离参数1
  447. end3 第3个轴运动距离参数1
  448. centre1 第1个轴运动距离参数2
  449. centre2 第2个轴运动距离参数2
  450. centre3 第3个轴运动距离参数2
  451. mode 指定前面参数的意义
  452. 0 当前点,中间点,终点三点定圆弧,距离参数1为终点距离,距离参数2为中间点距离。
  453. 1 走最小的圆弧,距离参数1为终点距离,距离参数2为圆心的距离。
  454. 2 当前点,中间点,终点三点定圆,距离参数1为终点距离,距离参数2为中间点距离。
  455. 3 先走最小的圆弧,再继续走完整圆,距离参数1为终点距离,距离参数2为圆心的距离。
  456. Output: //
  457. Return: //错误码
  458. *************************************************************/
  459. //int32 __stdcall ZAux_MSpherical(ZMC_HANDLE handle, float fend1, float fend2, float fend3, float fcenter1, float fcenter2, float fcenter3, int imode);
  460. [DllImport("zauxdll.dll", EntryPoint = "ZAux_MSpherical", CharSet = CharSet.Ansi, CallingConvention = CallingConvention.StdCall)]
  461. public static extern Int32 ZAux_MSpherical(IntPtr handle, float fend1, float fend2, float fend3, float fcenter1, float fcenter2, float fcenter3, int imode);
  462. /*************************************************************
  463. Description: //插补 空间圆弧
  464. Input: //卡链接handle
  465. end1 第1个轴运动距离参数1
  466. end2 第2个轴运动距离参数1
  467. end3 第3个轴运动距离参数1
  468. centre1 第1个轴运动距离参数2
  469. centre2 第2个轴运动距离参数2
  470. centre3 第3个轴运动距离参数2
  471. mode 指定前面参数的意义
  472. 0 当前点,中间点,终点三点定圆弧,距离参数1为终点距离,距离参数2为中间点距离。
  473. 1 走最小的圆弧,距离参数1为终点距离,距离参数2为圆心的距离。
  474. 2 当前点,中间点,终点三点定圆,距离参数1为终点距离,距离参数2为中间点距离。
  475. 3 先走最小的圆弧,再继续走完整圆,距离参数1为终点距离,距离参数2为圆心的距离。
  476. Output: //
  477. Return: //错误码
  478. *************************************************************/
  479. //int32 __stdcall ZAux_MSphericalSp(ZMC_HANDLE handle, float fend1, float fend2, float fend3, float fcenter1, float fcenter2, float fcenter3, int imode);
  480. [DllImport("zauxdll.dll", EntryPoint = "ZAux_MSphericalSp", CharSet = CharSet.Ansi, CallingConvention = CallingConvention.StdCall)]
  481. public static extern Int32 ZAux_MSphericalSp(IntPtr handle, float fend1, float fend2, float fend3, float fcenter1, float fcenter2, float fcenter3, int imode);
  482. /*************************************************************
  483. Description: //运动暂停
  484. Input: //卡链接handle
  485. 0(缺省) 暂停当前运动。
  486. 1 在当前运动完成后正准备执行下一条运动指令时暂停。
  487. 2 在当前运动完成后正准备执行下一条运动指令时,并且两条指令的MARK标识不一样时暂停。这个模式可以用于一个动作由多个指令来实现时,可以在一整个动作完成后暂停。
  488. Output: //
  489. Return: //错误码
  490. *************************************************************/
  491. //int32 __stdcall ZAux_MovePause(ZMC_HANDLE handle, int imode);
  492. [DllImport("zauxdll.dll", EntryPoint = "ZAux_MovePause", CharSet = CharSet.Ansi, CallingConvention = CallingConvention.StdCall)]
  493. public static extern Int32 ZAux_MovePause(IntPtr handle, int imode);
  494. /*************************************************************
  495. Description: //运动暂停
  496. Input: //卡链接handle
  497. 0(缺省) 暂停当前运动。
  498. 1 在当前运动完成后正准备执行下一条运动指令时暂停。
  499. 2 在当前运动完成后正准备执行下一条运动指令时,并且两条指令的MARK标识不一样时暂停。这个模式可以用于一个动作由多个指令来实现时,可以在一整个动作完成后暂停。
  500. Output: //
  501. Return: //错误码
  502. *************************************************************/
  503. //int32 __stdcall ZAux_MoveResume(ZMC_HANDLE handle);
  504. [DllImport("zauxdll.dll", EntryPoint = "ZAux_MoveResume", CharSet = CharSet.Ansi, CallingConvention = CallingConvention.StdCall)]
  505. public static extern Int32 ZAux_MoveResume(IntPtr handle);
  506. /*************************************************************
  507. Description: //在运动缓冲中加入输出指令
  508. Input: //卡链接handle
  509. Output: //
  510. Return: //错误码
  511. *************************************************************/
  512. //int32 __stdcall ZAux_MoveOp(ZMC_HANDLE handle, int ioutnum, int ivalue);
  513. [DllImport("zauxdll.dll", EntryPoint = "ZAux_MoveOp", CharSet = CharSet.Ansi, CallingConvention = CallingConvention.StdCall)]
  514. public static extern Int32 ZAux_MoveOp(IntPtr handle, int ioutnum, int ivalue);
  515. /*************************************************************
  516. Description: //在运动缓冲中加入输出指令
  517. Input: //卡链接handle
  518. Output: //
  519. Return: //错误码
  520. *************************************************************/
  521. //int32 __stdcall ZAux_MoveOpMulti(ZMC_HANDLE handle, int ioutnumfirst, int ioutnumend, int ivalue);
  522. [DllImport("zauxdll.dll", EntryPoint = "ZAux_MoveOpMulti", CharSet = CharSet.Ansi, CallingConvention = CallingConvention.StdCall)]
  523. public static extern Int32 ZAux_MoveOpMulti(IntPtr handle, int ioutnum, int ivalue);
  524. /*************************************************************
  525. Description: //在运动缓冲中加入输出指令
  526. Input: //卡链接handle
  527. Output: //
  528. Return: //错误码
  529. *************************************************************/
  530. //int32 __stdcall ZAux_MoveOp2(ZMC_HANDLE handle, int ioutnum, int ivalue, int iofftimems);
  531. [DllImport("zauxdll.dll", EntryPoint = "ZAux_MoveOp2", CharSet = CharSet.Ansi, CallingConvention = CallingConvention.StdCall)]
  532. public static extern Int32 ZAux_MoveOp2(IntPtr handle,int ioutnum, int ivalue, int iofftimems);
  533. /*************************************************************
  534. Description: //在运动缓冲中加入延时指令
  535. Input: //卡链接handle
  536. Output: //
  537. Return: //错误码
  538. *************************************************************/
  539. //int32 __stdcall ZAux_MoveDelay(ZMC_HANDLE handle, int itimems);
  540. [DllImport("zauxdll.dll", EntryPoint = "ZAux_MoveDelay", CharSet = CharSet.Ansi, CallingConvention = CallingConvention.StdCall)]
  541. public static extern Int32 ZAux_MoveDelay(IntPtr handle, int itimems);
  542. /*************************************************************
  543. Description: //电子凸轮
  544. Input: //卡链接handle
  545. Output: //
  546. Return: //错误码
  547. *************************************************************/
  548. //int32 __stdcall ZAux_Cam(ZMC_HANDLE handle, int istartpoint, int iendpoint, float ftablemulti, float fDistance);
  549. [DllImport("zauxdll.dll", EntryPoint = "ZAux_Cam", CharSet = CharSet.Ansi, CallingConvention = CallingConvention.StdCall)]
  550. public static extern Int32 ZAux_Cam(IntPtr handle, int istartpoint, int iendpoint, float ftablemulti, float fDistance);
  551. /*************************************************************
  552. Description: //电子凸轮
  553. Input: //卡链接handle
  554. Output: //
  555. Return: //错误码
  556. *************************************************************/
  557. //int32 __stdcall ZAux_Cambox(ZMC_HANDLE handle, int istartpoint, int iendpoint, float ftablemulti, float fDistance, int ilinkaxis, int ioption, float flinkstartpos);
  558. [DllImport("zauxdll.dll", EntryPoint = "ZAux_Cambox", CharSet = CharSet.Ansi, CallingConvention = CallingConvention.StdCall)]
  559. public static extern Int32 ZAux_Cambox(IntPtr handle,int istartpoint, int iendpoint, float ftablemulti, float fDistance, int ilinkaxis, int ioption, float flinkstartpos);
  560. /*************************************************************
  561. Description: //连接 电子齿轮
  562. Input: //卡链接handle
  563. Output: //
  564. Return: //错误码
  565. *************************************************************/
  566. //int32 __stdcall ZAux_Connpath(ZMC_HANDLE handle, float fratio, int idringaxis);
  567. [DllImport("zauxdll.dll", EntryPoint = "ZAux_Connpath", CharSet = CharSet.Ansi, CallingConvention = CallingConvention.StdCall)]
  568. public static extern Int32 ZAux_Connpath(IntPtr handle, float fratio, int idringaxiss);
  569. /*************************************************************
  570. Description: //连接 电子齿轮
  571. Input: //卡链接handle
  572. Output: //
  573. Return: //错误码
  574. *************************************************************/
  575. //int32 __stdcall ZAux_Connect(ZMC_HANDLE handle, float fratio, int idringaxis);
  576. [DllImport("zauxdll.dll", EntryPoint = "ZAux_Connect", CharSet = CharSet.Ansi, CallingConvention = CallingConvention.StdCall)]
  577. public static extern Int32 ZAux_Connect(IntPtr handle, float fratio, int idringaxiss);
  578. /*************************************************************
  579. Description: //连接 特殊凸轮
  580. Input: //卡链接handle
  581. Output: //
  582. Return: //错误码
  583. *************************************************************/
  584. //int32 __stdcall ZAux_Movelink(ZMC_HANDLE handle, float fDistance, float fLinkDis, float fLinkAcc, float fLinkDec,int iLinkaxis, int ioption, float flinkstartpos);
  585. [DllImport("zauxdll.dll", EntryPoint = "ZAux_Movelink", CharSet = CharSet.Ansi, CallingConvention = CallingConvention.StdCall)]
  586. public static extern Int32 ZAux_Movelink(IntPtr handle, float fDistance, float fLinkDis, float fLinkAcc, float fLinkDec,int iLinkaxis, int ioption, float flinkstartpos);
  587. /*************************************************************
  588. Description: //位置锁存指令
  589. Input: //卡链接handle
  590. Output: //
  591. Return: //错误码
  592. *************************************************************/
  593. //int32 __stdcall ZAux_Regist(ZMC_HANDLE handle, int imode);
  594. [DllImport("zauxdll.dll", EntryPoint = "ZAux_Regist", CharSet = CharSet.Ansi, CallingConvention = CallingConvention.StdCall)]
  595. public static extern Int32 ZAux_Regist(IntPtr handle, int imode);
  596. /*************************************************************
  597. Description: //所有轴立即停止
  598. Input: //卡链接handle
  599. Output: //
  600. Return: //错误码
  601. *************************************************************/
  602. //int32 __stdcall ZAux_Rapidstop(ZMC_HANDLE handle, int imode);
  603. [DllImport("zauxdll.dll", EntryPoint = "ZAux_Rapidstop", CharSet = CharSet.Ansi, CallingConvention = CallingConvention.StdCall)]
  604. public static extern Int32 ZAux_Rapidstop(IntPtr handle, int imode);
  605. /*************************************************************
  606. Description: //SP指定速度的插补运动, 可以指定起始速度,最终速度, 运行速度
  607. 运动的轴是当前的BASE轴列表
  608. Input: //卡号
  609. Output: //
  610. Return: //错误码
  611. *************************************************************/
  612. //int32 __stdcall ZAux_LineNSp(ZMC_HANDLE handle, int imaxaxis, float *pfDisancelist, float fStartSpeed, float fEndSpeed, float fForceSpeed);
  613. [DllImport("zauxdll.dll", EntryPoint = "ZAux_LineNSp", CharSet = CharSet.Ansi, CallingConvention = CallingConvention.StdCall)]
  614. public static extern Int32 ZAux_LineNSp(IntPtr handle, int imaxaxis, float[] pfDisancelist, float fStartSpeed, float fEndSpeed, float fForceSpeed);
  615. // #if 0
  616. //单轴运动
  617. //#endif
  618. /*************************************************************
  619. Description: //连续运动
  620. Input: //卡链接handle 轴号, 方向
  621. Output: //
  622. Return: //错误码
  623. *************************************************************/
  624. //int32 __stdcall ZAux_Singl_Vmove(ZMC_HANDLE handle, int iaxis, int idir);
  625. [DllImport("zauxdll.dll", EntryPoint = "ZAux_Singl_Vmove", CharSet = CharSet.Ansi, CallingConvention = CallingConvention.StdCall)]
  626. public static extern Int32 ZAux_Singl_Vmove(IntPtr handle, int iaxis, int idir);
  627. /*************************************************************
  628. Description: //单轴运动
  629. Input: //卡链接handle 轴号, 距离
  630. Output: //
  631. Return: //错误码
  632. *************************************************************/
  633. //int32 __stdcall ZAux_Singl_Move(ZMC_HANDLE handle, int iaxis, float fdistance);
  634. [DllImport("zauxdll.dll", EntryPoint = "ZAux_Singl_Move", CharSet = CharSet.Ansi, CallingConvention = CallingConvention.StdCall)]
  635. public static extern Int32 ZAux_Singl_Move(IntPtr handle, int iaxis, float fdistance);
  636. /*************************************************************
  637. Description: //单轴运动
  638. Input: //卡链接handle 轴号, 距离
  639. Output: //
  640. Return: //错误码
  641. *************************************************************/
  642. //int32 __stdcall ZAux_Singl_MoveAbs(ZMC_HANDLE handle, int iaxis, float fditancse);
  643. [DllImport("zauxdll.dll", EntryPoint = "ZAux_Singl_MoveAbs", CharSet = CharSet.Ansi, CallingConvention = CallingConvention.StdCall)]
  644. public static extern Int32 ZAux_Singl_MoveAbs(IntPtr handle, int iaxis, float fditance);
  645. /*************************************************************
  646. Description: //单轴运动
  647. Input: //卡链接handle 轴号, 距离
  648. Output: //
  649. Return: //错误码
  650. *************************************************************/
  651. //int32 __stdcall ZAux_Singl_MoveModify(ZMC_HANDLE handle, int iaxis, float fdistance);
  652. [DllImport("zauxdll.dll", EntryPoint = "ZAux_Singl_MoveModify", CharSet = CharSet.Ansi, CallingConvention = CallingConvention.StdCall)]
  653. public static extern Int32 ZAux_Singl_MoveModify(IntPtr handle, int iaxis, float fditance);
  654. /*************************************************************
  655. Description: //叠加
  656. Input: //卡链接handle
  657. Output: //
  658. Return: //错误码
  659. *************************************************************/
  660. //int32 __stdcall ZAux_Singl_Addax(ZMC_HANDLE handle, int iaxis, int iaddaxis);
  661. [DllImport("zauxdll.dll", EntryPoint = "ZAux_Singl_Addax", CharSet = CharSet.Ansi, CallingConvention = CallingConvention.StdCall)]
  662. public static extern Int32 ZAux_Singl_Addax(IntPtr handle, int iaxis, int iaddaxis);
  663. /*************************************************************
  664. Description: //cancel
  665. Input: //卡链接handle
  666. Output: //
  667. Return: //错误码
  668. *************************************************************/
  669. //int32 __stdcall ZAux_Singl_Cancel(ZMC_HANDLE handle, int iaxis, int imode);
  670. [DllImport("zauxdll.dll", EntryPoint = "ZAux_Singl_Cancel", CharSet = CharSet.Ansi, CallingConvention = CallingConvention.StdCall)]
  671. public static extern Int32 ZAux_Singl_Cancel(IntPtr handle,int iaxis, int imode);
  672. /*************************************************************
  673. Description: //回零
  674. Input: //卡链接handle
  675. Output: //
  676. Return: //错误码
  677. *************************************************************/
  678. //int32 __stdcall ZAux_Singl_Datum(ZMC_HANDLE handle, int iaxis, int imode);
  679. [DllImport("zauxdll.dll", EntryPoint = "ZAux_Singl_Datum", CharSet = CharSet.Ansi, CallingConvention = CallingConvention.StdCall)]
  680. public static extern Int32 ZAux_Singl_Datum(IntPtr handle,int iaxis, int imode);
  681. /*************************************************************
  682. Description: //电子齿轮比设置
  683. Input: //卡链接handle
  684. Output: //
  685. Return: //错误码
  686. *************************************************************/
  687. //int32 __stdcall ZAux_Singl_EncoderRatio(ZMC_HANDLE handle, int iaxis, int imposcount, int inputcount);
  688. [DllImport("zauxdll.dll", EntryPoint = "ZAux_Singl_EncoderRatio", CharSet = CharSet.Ansi, CallingConvention = CallingConvention.StdCall)]
  689. public static extern Int32 ZAux_Singl_EncoderRatio(IntPtr handle, int iaxis, int imposcount, int inputcount);
  690. /*************************************************************
  691. Description: //电子齿轮比设置
  692. Input: //卡链接handle
  693. Output: //
  694. Return: //错误码
  695. *************************************************************/
  696. //int32 __stdcall ZAux_Singl_StepRatio(ZMC_HANDLE handle, int iaxis, int ioutcount, int idposcount);
  697. [DllImport("zauxdll.dll", EntryPoint = "ZAux_Singl_StepRatio", CharSet = CharSet.Ansi, CallingConvention = CallingConvention.StdCall)]
  698. public static extern Int32 ZAux_Singl_StepRatio(IntPtr handle, int iaxis, int ioutcount, int idposcount);
  699. // #if 0
  700. //参数部分
  701. //#endif
  702. /*************************************************************
  703. Description: //参数 轴类型设置, 步进轴一般不用设置
  704. Input: //卡链接handle merge: 0/1
  705. Output: //
  706. Return: //错误码
  707. *************************************************************/
  708. //int32 __stdcall ZAux_SetAtype(ZMC_HANDLE handle,int iaxis, int iset);
  709. [DllImport("zauxdll.dll", EntryPoint = "ZAux_SetAtype", CharSet = CharSet.Ansi, CallingConvention = CallingConvention.StdCall)]
  710. public static extern Int32 ZAux_SetAtype(IntPtr handle, int iaxis, int ioutcount, int idposcount);
  711. /*************************************************************
  712. Description: //参数 设置是否连续插补
  713. Input: //卡链接handle merge: 0/1
  714. Output: //
  715. Return: //错误码
  716. *************************************************************/
  717. //int32 __stdcall ZAux_SetMerge(ZMC_HANDLE handle,int iaxis, int iset);
  718. [DllImport("zauxdll.dll", EntryPoint = "ZAux_SetMerge", CharSet = CharSet.Ansi, CallingConvention = CallingConvention.StdCall)]
  719. public static extern Int32 ZAux_SetMerge(IntPtr handle,int iaxis, int iset);
  720. /*************************************************************
  721. Description: //参数
  722. Input: //卡链接handle merge: 0/1
  723. Output: //
  724. Return: //错误码
  725. *************************************************************/
  726. //int32 __stdcall ZAux_SetUnits(ZMC_HANDLE handle, int iaxis, float fset);
  727. [DllImport("zauxdll.dll", EntryPoint = "ZAux_SetUnits", CharSet = CharSet.Ansi, CallingConvention = CallingConvention.StdCall)]
  728. public static extern Int32 ZAux_SetUnits(IntPtr handle, int iaxis, float fset);
  729. /*************************************************************
  730. Description: //参数
  731. Input: //卡链接handle
  732. Output: //
  733. Return: //错误码
  734. *************************************************************/
  735. //int32 __stdcall ZAux_SetSpeed(ZMC_HANDLE handle, int iaxis, float fspeed);
  736. [DllImport("zauxdll.dll", EntryPoint = "ZAux_SetSpeed", CharSet = CharSet.Ansi, CallingConvention = CallingConvention.StdCall)]
  737. public static extern Int32 ZAux_SetSpeed(IntPtr handle, int iaxis, float fspeed);//集成 1 1天
  738. /*************************************************************
  739. Description: //参数
  740. Input: //卡链接handle merge: 0/1
  741. Output: //
  742. Return: //错误码
  743. *************************************************************/
  744. //int32 __stdcall ZAux_SetAccel(ZMC_HANDLE handle, int iaxis, float fspeed);
  745. [DllImport("zauxdll.dll", EntryPoint = "ZAux_SetAccel", CharSet = CharSet.Ansi, CallingConvention = CallingConvention.StdCall)]
  746. public static extern Int32 ZAux_SetAccel(IntPtr handle, int iaxis, float fspeed);
  747. /*************************************************************
  748. Description: //参数
  749. Input: //卡链接handle
  750. Output: //
  751. Return: //错误码
  752. *************************************************************/
  753. //int32 __stdcall ZAux_SetDecel(ZMC_HANDLE handle, int iaxis, float fspeed);
  754. [DllImport("zauxdll.dll", EntryPoint = "ZAux_SetDecel", CharSet = CharSet.Ansi, CallingConvention = CallingConvention.StdCall)]
  755. public static extern Int32 ZAux_SetDecel(IntPtr handle, int iaxis, float fspeed);
  756. /*************************************************************
  757. Description: //参数
  758. Input: //卡链接handle
  759. Output: //
  760. Return: //错误码
  761. *************************************************************/
  762. //int32 __stdcall ZAux_SetFastDec(ZMC_HANDLE handle, int iaxis, float fspeed);
  763. [DllImport("zauxdll.dll", EntryPoint = "ZAux_SetFastDec", CharSet = CharSet.Ansi, CallingConvention = CallingConvention.StdCall)]
  764. public static extern Int32 ZAux_SetFastDec(IntPtr handle, int iaxis, float fspeed);
  765. /*************************************************************
  766. Description: //参数
  767. Input: //卡链接handle
  768. Output: //
  769. Return: //错误码
  770. *************************************************************/
  771. //int32 __stdcall ZAux_SetForceSpeed(ZMC_HANDLE handle, int iaxis, float fspeed);
  772. [DllImport("zauxdll.dll", EntryPoint = "ZAux_SetForceSpeed", CharSet = CharSet.Ansi, CallingConvention = CallingConvention.StdCall)]
  773. public static extern Int32 ZAux_SetForceSpeed(IntPtr handle, int iaxis, float fspeed);
  774. /*************************************************************
  775. Description: //参数
  776. Input: //卡链接handle
  777. Output: //
  778. Return: //错误码
  779. *************************************************************/
  780. //int32 __stdcall ZAux_SetStartMoveSpeed(ZMC_HANDLE handle, int iaxis, float fspeed);
  781. [DllImport("zauxdll.dll", EntryPoint = "ZAux_SetStartMoveSpeed", CharSet = CharSet.Ansi, CallingConvention = CallingConvention.StdCall)]
  782. public static extern Int32 ZAux_SetStartMoveSpeed(IntPtr handle, int iaxis, float fspeed);
  783. /*************************************************************
  784. Description: //参数
  785. Input: //卡链接handle
  786. Output: //
  787. Return: //错误码
  788. *************************************************************/
  789. //int32 __stdcall ZAux_SetEndMoveSpeed(ZMC_HANDLE handle, int iaxis, float fspeed);
  790. [DllImport("zauxdll.dll", EntryPoint = "ZAux_SetEndMoveSpeed", CharSet = CharSet.Ansi, CallingConvention = CallingConvention.StdCall)]
  791. public static extern Int32 ZAux_SetEndMoveSpeed(IntPtr handle, int iaxis, float fspeed);
  792. /*************************************************************
  793. Description: //参数
  794. Input: //卡链接handle
  795. Output: //
  796. Return: //错误码
  797. *************************************************************/
  798. //int32 __stdcall ZAux_SetLSpeed(ZMC_HANDLE handle, int iaxis, float fspeed);
  799. [DllImport("zauxdll.dll", EntryPoint = "ZAux_SetLSpeed", CharSet = CharSet.Ansi, CallingConvention = CallingConvention.StdCall)]
  800. public static extern Int32 ZAux_SetLSpeed(IntPtr handle, int iaxis, float fspeed);
  801. /*************************************************************
  802. Description: //参数
  803. Input: //卡链接handle
  804. Output: //
  805. Return: //错误码
  806. *************************************************************/
  807. //int32 __stdcall ZAux_SetCreepSpeed(ZMC_HANDLE handle, int iaxis, float fspeed);
  808. [DllImport("zauxdll.dll", EntryPoint = "ZAux_SetCreepSpeed", CharSet = CharSet.Ansi, CallingConvention = CallingConvention.StdCall)]
  809. public static extern Int32 ZAux_SetCreepSpeed(IntPtr handle, int iaxis, float fspeed);
  810. /*************************************************************
  811. Description: //参数 拐角减速设置
  812. Input: //卡链接handle
  813. Output: //
  814. Return: //错误码
  815. *************************************************************/
  816. //int32 __stdcall ZAux_SetCornerMode(ZMC_HANDLE handle, int iaxis, int iset);
  817. [DllImport("zauxdll.dll", EntryPoint = "ZAux_SetCornerMode", CharSet = CharSet.Ansi, CallingConvention = CallingConvention.StdCall)]
  818. public static extern Int32 ZAux_SetCornerMode(IntPtr handle, int iaxis, int iset);
  819. /*************************************************************
  820. Description: //参数 脉冲的设置
  821. Input: //卡链接handle
  822. Output: //
  823. Return: //错误码
  824. *************************************************************/
  825. //int32 __stdcall ZAux_SetInvertStep(ZMC_HANDLE handle, int iaxis, int iset);
  826. [DllImport("zauxdll.dll", EntryPoint = "ZAux_SetInvertStep", CharSet = CharSet.Ansi, CallingConvention = CallingConvention.StdCall)]
  827. public static extern Int32 ZAux_SetInvertStep(IntPtr handle, int iaxis, int iset);
  828. /*************************************************************
  829. Description: //参数 S曲线设置
  830. Input: //卡链接handle
  831. Output: //
  832. Return: //错误码
  833. *************************************************************/
  834. //int32 __stdcall ZAux_SetDecelAngle(ZMC_HANDLE handle, int iaxis, float fset);
  835. [DllImport("zauxdll.dll", EntryPoint = "ZAux_SetInvertStep", CharSet = CharSet.Ansi, CallingConvention = CallingConvention.StdCall)]
  836. public static extern Int32 ZAux_SetInvertStep(IntPtr handle, int iaxis, float fset);
  837. /*************************************************************
  838. Description: //参数 S曲线设置
  839. Input: //卡链接handle
  840. Output: //
  841. Return: //错误码
  842. *************************************************************/
  843. //int32 __stdcall ZAux_SetStopAngle(ZMC_HANDLE handle, int iaxis, float fset);
  844. [DllImport("zauxdll.dll", EntryPoint = "ZAux_SetStopAngle", CharSet = CharSet.Ansi, CallingConvention = CallingConvention.StdCall)]
  845. public static extern Int32 ZAux_SetStopAngle(IntPtr handle, int iaxis, float fset);
  846. /*************************************************************
  847. Description: //参数 小圆限速的半径设置
  848. Input: //卡链接handle
  849. Output: //
  850. Return: //错误码
  851. *************************************************************/
  852. //int32 __stdcall ZAux_SetSpRadius(ZMC_HANDLE handle, int iaxis, float fset);
  853. [DllImport("zauxdll.dll", EntryPoint = "ZAux_SetSpRadius", CharSet = CharSet.Ansi, CallingConvention = CallingConvention.StdCall)]
  854. public static extern Int32 ZAux_SetSpRadius(IntPtr handle, int iaxis, float fset);
  855. /*************************************************************
  856. Description: //参数 S曲线设置
  857. Input: //卡链接handle
  858. Output: //
  859. Return: //错误码
  860. *************************************************************/
  861. //int32 __stdcall ZAux_SetSramp(ZMC_HANDLE handle, int iaxis, int iset);
  862. [DllImport("zauxdll.dll", EntryPoint = "ZAux_SetSramp", CharSet = CharSet.Ansi, CallingConvention = CallingConvention.StdCall)]
  863. public static extern Int32 ZAux_SetSramp(IntPtr handle, int iaxis,int iset);
  864. /*************************************************************
  865. Description: //参数 DPOS修改
  866. Input: //卡链接handle
  867. Output: //
  868. Return: //错误码
  869. *************************************************************/
  870. //int32 __stdcall ZAux_SetDpos(ZMC_HANDLE handle, int iaxis, float fpos);
  871. [DllImport("zauxdll.dll", EntryPoint = "ZAux_SetDpos", CharSet = CharSet.Ansi, CallingConvention = CallingConvention.StdCall)]
  872. public static extern Int32 ZAux_SetDpos(IntPtr handle,int iaxis, float fpos);
  873. /*************************************************************
  874. Description: //参数 MPOS修改
  875. Input: //卡链接handle
  876. Output: //
  877. Return: //错误码
  878. *************************************************************/
  879. //int32 __stdcall ZAux_SetMpos(ZMC_HANDLE handle, int iaxis, float fpos);
  880. [DllImport("zauxdll.dll", EntryPoint = "ZAux_SetMpos", CharSet = CharSet.Ansi, CallingConvention = CallingConvention.StdCall)]
  881. public static extern Int32 ZAux_SetMpos(IntPtr handle,int iaxis, float fpos);
  882. /*************************************************************
  883. Description: //参数 相对修改坐标
  884. Input: //卡链接handle
  885. Output: //
  886. Return: //错误码
  887. *************************************************************/
  888. //int32 __stdcall ZAux_SetOffpos(ZMC_HANDLE handle, int iaxis, float fpos);
  889. [DllImport("zauxdll.dll", EntryPoint = "ZAux_SetOffpos", CharSet = CharSet.Ansi, CallingConvention = CallingConvention.StdCall)]
  890. public static extern Int32 ZAux_SetOffpos(IntPtr handle, int iaxis, float fpos);
  891. //#if 0
  892. //状态读取
  893. //#endif
  894. /*************************************************************
  895. Description: //参数
  896. Input: //卡链接handle
  897. Output: //
  898. Return: //错误码
  899. *************************************************************/
  900. //int32 __stdcall ZAux_GetDpos(ZMC_HANDLE handle, int iaxis, float *pfValue);
  901. [DllImport("zauxdll.dll", EntryPoint = "ZAux_GetDpos", CharSet = CharSet.Ansi, CallingConvention = CallingConvention.StdCall)]
  902. public static extern Int32 ZAux_GetDpos(IntPtr handle,int iaxis,ref float pfValue);//集成 3
  903. /*************************************************************
  904. Description: //参数
  905. Input: //卡链接handle
  906. Output: //
  907. Return: //错误码
  908. *************************************************************/
  909. //int32 __stdcall ZAux_GetMpos(ZMC_HANDLE handle, int iaxis, float *pfValue);
  910. [DllImport("zauxdll.dll", EntryPoint = "ZAux_GetMpos", CharSet = CharSet.Ansi, CallingConvention = CallingConvention.StdCall)]
  911. public static extern Int32 ZAux_GetMpos(IntPtr handle, int iaxis, ref float pfValue);
  912. /*************************************************************
  913. Description: //参数
  914. Input: //卡链接handle
  915. Output: //
  916. Return: //错误码
  917. *************************************************************/
  918. //int32 __stdcall ZAux_GetCurSpeed(ZMC_HANDLE handle, int iaxis, float *pfValue);
  919. [DllImport("zauxdll.dll", EntryPoint = "ZAux_GetCurSpeed", CharSet = CharSet.Ansi, CallingConvention = CallingConvention.StdCall)]
  920. public static extern Int32 ZAux_GetCurSpeed(IntPtr handle, int iaxis, ref float pfValue);
  921. /*************************************************************
  922. Description: //参数
  923. Input: //卡链接handle
  924. Output: //
  925. Return: //错误码
  926. *************************************************************/
  927. //int32 __stdcall ZAux_GetMtype(ZMC_HANDLE handle, int iaxis, int *piValue);
  928. [DllImport("zauxdll.dll", EntryPoint = "ZAux_GetMtype", CharSet = CharSet.Ansi, CallingConvention = CallingConvention.StdCall)]
  929. public static extern Int32 ZAux_GetMtype(IntPtr handle,int iaxis,ref float pfValue);
  930. /*************************************************************
  931. Description: //参数 轴是否运动完成
  932. Input: //卡链接handle
  933. Output: //
  934. Return: //错误码
  935. *************************************************************/
  936. //int32 __stdcall ZAux_GetIfIdle(ZMC_HANDLE handle, int iaxis, int *piValue);
  937. [DllImport("zauxdll.dll", EntryPoint = "ZAux_GetIfIdle", CharSet = CharSet.Ansi, CallingConvention = CallingConvention.StdCall)]
  938. public static extern Int32 ZAux_GetIfIdle(IntPtr handle,int iaxis,ref float pfValue);
  939. /*************************************************************
  940. Description: //参数 当前运行完成后的终点坐标, 缓冲里面的不算
  941. Input: //卡链接handle
  942. Output: //
  943. Return: //错误码
  944. *************************************************************/
  945. //int32 __stdcall ZAux_GetEndMove(ZMC_HANDLE handle, int iaxis, float *pfValue);
  946. [DllImport("zauxdll.dll", EntryPoint = "ZAux_GetEndMove", CharSet = CharSet.Ansi, CallingConvention = CallingConvention.StdCall)]
  947. public static extern Int32 ZAux_GetEndMove(IntPtr handle,int iaxis,ref float pfValue);
  948. /*************************************************************
  949. Description: //参数 当前缓冲运行完成后的终点坐标 用于转换相对绝对
  950. Input: //卡链接handle
  951. Output: //
  952. Return: //错误码
  953. *************************************************************/
  954. //int32 __stdcall ZAux_GetEndMoveBuff(ZMC_HANDLE handle, int iaxis, float *pfValue);
  955. [DllImport("zauxdll.dll", EntryPoint = "ZAux_GetEndMoveBuff", CharSet = CharSet.Ansi, CallingConvention = CallingConvention.StdCall)]
  956. public static extern Int32 ZAux_GetEndMoveBuff(IntPtr handle,int iaxis,ref float pfValue);
  957. /*************************************************************
  958. Description: //参数
  959. Input: //卡链接handle
  960. Output: //
  961. Return: //错误码
  962. *************************************************************/
  963. //int32 __stdcall ZAux_GetAxisStatus(ZMC_HANDLE handle, int iaxis, int *piValue);
  964. [DllImport("zauxdll.dll", EntryPoint = "ZAux_GetAxisStatus", CharSet = CharSet.Ansi, CallingConvention = CallingConvention.StdCall)]
  965. public static extern Int32 ZAux_GetAxisStatus(IntPtr handle,int iaxis,ref int piValue);
  966. /*************************************************************
  967. Description: //参数 内部的编码器位置
  968. Input: //卡链接handle
  969. Output: //
  970. Return: //错误码
  971. *************************************************************/
  972. //int32 __stdcall ZAux_GetEncoder(ZMC_HANDLE handle, int iaxis, int *piValue);
  973. [DllImport("zauxdll.dll", EntryPoint = "ZAux_GetEncoder", CharSet = CharSet.Ansi, CallingConvention = CallingConvention.StdCall)]
  974. public static extern Int32 ZAux_GetEncoder(IntPtr handle,int iaxis,ref int piValue);
  975. /*************************************************************
  976. Description: //参数 轴剩余的缓冲, 按直线来计算
  977. Input: //卡链接handle
  978. Output: //
  979. Return: //错误码
  980. *************************************************************/
  981. //int32 __stdcall ZAux_GetRemain_LineBuffer(ZMC_HANDLE handle, int iaxis, int *piValue);
  982. [DllImport("zauxdll.dll", EntryPoint = "ZAux_GetRemain_LineBuffer", CharSet = CharSet.Ansi, CallingConvention = CallingConvention.StdCall)]
  983. public static extern Int32 ZAux_GetRemain_LineBuffer(IntPtr handle,int iaxis,ref int piValue);
  984. /*************************************************************
  985. Description: //参数 轴剩余的缓冲, 按最复杂的空间圆弧来计算
  986. Input: //卡链接handle
  987. Output: //
  988. Return: //错误码
  989. *************************************************************/
  990. //int32 __stdcall ZAux_GetRemain_Buffer(ZMC_HANDLE handle, int iaxis, int *piValue);
  991. [DllImport("zauxdll.dll", EntryPoint = "ZAux_GetRemain_Buffer", CharSet = CharSet.Ansi, CallingConvention = CallingConvention.StdCall)]
  992. public static extern Int32 ZAux_GetRemain_Buffer(IntPtr handle,int iaxis,ref int piValue);
  993. /*************************************************************
  994. Description: //参数
  995. Input: //卡链接handle
  996. Output: //
  997. Return: //错误码
  998. *************************************************************/
  999. //int32 __stdcall ZAux_GetRegPos(ZMC_HANDLE handle, int iaxis, float *pfValue);
  1000. [DllImport("zauxdll.dll", EntryPoint = "ZAux_GetRegPos", CharSet = CharSet.Ansi, CallingConvention = CallingConvention.StdCall)]
  1001. public static extern Int32 ZAux_GetRegPos(IntPtr handle,int iaxis,ref float pfValue);
  1002. /*************************************************************
  1003. Description: //参数
  1004. Input: //卡链接handle
  1005. Output: //
  1006. Return: //错误码
  1007. *************************************************************/
  1008. //int32 __stdcall ZAux_GetMark(ZMC_HANDLE handle, int iaxis, int *piValue);
  1009. [DllImport("zauxdll.dll", EntryPoint = "ZAux_GetMark", CharSet = CharSet.Ansi, CallingConvention = CallingConvention.StdCall)]
  1010. public static extern Int32 ZAux_GetMark(IntPtr handle,int iaxis,ref int piValue);
  1011. /*************************************************************
  1012. Description: //参数
  1013. Input: //卡链接handle
  1014. Output: //
  1015. Return: //错误码
  1016. *************************************************************/
  1017. //int32 __stdcall ZAux_GetMarkB(ZMC_HANDLE handle, int iaxis, int *piValue);
  1018. [DllImport("zauxdll.dll", EntryPoint = "ZAux_GetMarkB", CharSet = CharSet.Ansi, CallingConvention = CallingConvention.StdCall)]
  1019. public static extern Int32 ZAux_GetMarkB(IntPtr handle,int iaxis,ref int piValue);
  1020. /*************************************************************
  1021. Description: //全局变量读取
  1022. Input: //卡链接handle
  1023. Output: //
  1024. Return: //错误码
  1025. *************************************************************/
  1026. //int32 __stdcall ZAux_GetVariablef(ZMC_HANDLE handle, const char *pname, float *pfValue);
  1027. [DllImport("zauxdll.dll", EntryPoint = "ZAux_GetVariablef", CharSet = CharSet.Ansi, CallingConvention = CallingConvention.StdCall)]
  1028. public static extern Int32 ZAux_GetVariablef(IntPtr handle,int iaxis,ref float pfValue);
  1029. /*************************************************************
  1030. Description: //全局变量读取, 也可以是参数等等
  1031. Input: //卡链接handle
  1032. Output: //
  1033. Return: //错误码
  1034. *************************************************************/
  1035. //int32 __stdcall ZAux_GetVariableInt(ZMC_HANDLE handle, const char *pname, int *piValue);
  1036. [DllImport("zauxdll.dll", EntryPoint = "ZAux_GetVariableInt", CharSet = CharSet.Ansi, CallingConvention = CallingConvention.StdCall)]
  1037. public static extern Int32 ZAux_GetVariableInt(IntPtr handle,int iaxis,ref int piValue);
  1038. //#if 0
  1039. //IO指令
  1040. // 可以使用 ZMC_GetIn ZMC_GetOutput 等
  1041. //#endif
  1042. /*************************************************************
  1043. Description: //参数
  1044. Input: //卡链接handle
  1045. Output: //
  1046. Return: //错误码
  1047. *************************************************************/
  1048. //int32 __stdcall ZAux_GetIn(ZMC_HANDLE handle, int ionum, uint32 *piValue);
  1049. [DllImport("zauxdll.dll", EntryPoint = "ZAux_GetIn", CharSet = CharSet.Ansi, CallingConvention = CallingConvention.StdCall)]
  1050. public static extern Int32 ZAux_GetIn(IntPtr handle,int ionum,ref UInt32 piValue);
  1051. /*************************************************************
  1052. Description: //参数
  1053. Input: //卡链接handle
  1054. Output: //
  1055. Return: //错误码
  1056. *************************************************************/
  1057. //int32 __stdcall ZAux_SetInvertIN(ZMC_HANDLE handle, int ionum, int bifInvert);
  1058. [DllImport("zauxdll.dll", EntryPoint = "ZAux_SetInvertIN", CharSet = CharSet.Ansi, CallingConvention = CallingConvention.StdCall)]
  1059. public static extern Int32 ZAux_SetInvertIN(IntPtr handle,int ionum, int bifInvert);
  1060. /*************************************************************
  1061. Description: //参数
  1062. Input: //卡链接handle
  1063. Output: //
  1064. Return: //错误码
  1065. *************************************************************/
  1066. //int32 __stdcall ZAux_SetOp(ZMC_HANDLE handle, int ionum, uint32 iValue);
  1067. [DllImport("zauxdll.dll", EntryPoint = "ZAux_SetOp", CharSet = CharSet.Ansi, CallingConvention = CallingConvention.StdCall)]
  1068. public static extern Int32 ZAux_SetOp(IntPtr handle,int ionum, UInt32 iValue);
  1069. //#if 0
  1070. //通过modbus快速读取特殊寄存器
  1071. //#endif
  1072. /*************************************************************
  1073. Description: //参数 快速读取多个输入
  1074. Input: //卡链接handle
  1075. Output: //按位存储
  1076. Return: //错误码
  1077. *************************************************************/
  1078. //int32 __stdcall ZAux_GetModbusIn(ZMC_HANDLE handle, int ionumfirst, int ionumend, uint8 *pValueList);
  1079. [DllImport("zauxdll.dll", EntryPoint = "ZAux_GetModbusIn", CharSet = CharSet.Ansi, CallingConvention = CallingConvention.StdCall)]
  1080. public static extern Int32 ZAux_GetModbusIn(IntPtr handle, int ionumfirst, int ionumend, byte[] pValueList);
  1081. /*************************************************************
  1082. Description: //参数 快速读取多个当前的输出状态
  1083. Input: //卡链接handle
  1084. Output: //按位存储
  1085. Return: //错误码
  1086. *************************************************************/
  1087. //int32 __stdcall ZAux_GetModbusOut(ZMC_HANDLE handle, int ionumfirst, int ionumend, uint8 *pValueList);
  1088. [DllImport("zauxdll.dll", EntryPoint = "ZAux_GetModbusOut", CharSet = CharSet.Ansi, CallingConvention = CallingConvention.StdCall)]
  1089. public static extern Int32 ZAux_GetModbusOut(IntPtr handle, int ionumfirst, int ionumend, byte[] pValueList);
  1090. /*************************************************************
  1091. Description: //参数 快速读取多个当前的DPOS
  1092. Input: //卡链接handle
  1093. Output: //按存储
  1094. Return: //错误码
  1095. *************************************************************/
  1096. //int32 __stdcall ZAux_GetModbusDpos(ZMC_HANDLE handle, int imaxaxises, float *pValueList);
  1097. [DllImport("zauxdll.dll", EntryPoint = "ZAux_GetModbusDpos", CharSet = CharSet.Ansi, CallingConvention = CallingConvention.StdCall)]
  1098. public static extern Int32 ZAux_GetModbusDpos(IntPtr handle, int imaxaxises, float[] pValueList);
  1099. /*************************************************************
  1100. Description: //参数 快速读取多个当前的MPOS
  1101. Input: //卡链接handle
  1102. Output: //按存储
  1103. Return: //错误码
  1104. *************************************************************/
  1105. //int32 __stdcall ZAux_GetModbusMpos(ZMC_HANDLE handle, int imaxaxises, float *pValueList);
  1106. [DllImport("zauxdll.dll", EntryPoint = "ZAux_GetModbusMpos", CharSet = CharSet.Ansi, CallingConvention = CallingConvention.StdCall)]
  1107. public static extern Int32 ZAux_GetModbusMpos(IntPtr handle, int imaxaxises, float[] pValueList);
  1108. /*************************************************************
  1109. Description: //参数 快速读取多个当前的速度
  1110. Input: //卡链接handle
  1111. Output: //按存储
  1112. Return: //错误码
  1113. *************************************************************/
  1114. //int32 __stdcall ZAux_GetModbusCurSpeed(ZMC_HANDLE handle, int imaxaxises, float *pValueList);
  1115. [DllImport("zauxdll.dll", EntryPoint = "ZAux_GetModbusCurSpeed", CharSet = CharSet.Ansi, CallingConvention = CallingConvention.StdCall)]
  1116. public static extern Int32 ZAux_GetModbusCurSpeed(IntPtr handle, int imaxaxises, float[] pValueList);
  1117. //#if 0
  1118. //采用ZMC_DirectCommand 来快速获取一些状态, ZMC_DirectCommand的执行比ZMC_Execute要快
  1119. // 只有参数,变量,数组元素等能使用ZMC_DirectCommand
  1120. //#endif
  1121. /*************************************************************
  1122. Description: //参数
  1123. Input: //卡链接handle
  1124. Output: //
  1125. Return: //错误码
  1126. *************************************************************/
  1127. //int32 __stdcall ZAux_Direct_GetDpos(ZMC_HANDLE handle, int iaxis, float *pfValue);
  1128. [DllImport("zauxdll.dll", EntryPoint = "ZAux_Direct_GetDpos", CharSet = CharSet.Ansi, CallingConvention = CallingConvention.StdCall)]
  1129. public static extern Int32 ZAux_Direct_GetDpos(IntPtr handle, int iaxis,ref float pfValue);
  1130. /*************************************************************
  1131. Description: //参数
  1132. Input: //卡链接handle
  1133. Output: //
  1134. Return: //错误码
  1135. *************************************************************/
  1136. //int32 __stdcall ZAux_Direct_GetMpos(ZMC_HANDLE handle, int iaxis, float *pfValue);
  1137. [DllImport("zauxdll.dll", EntryPoint = "ZAux_Direct_GetMpos", CharSet = CharSet.Ansi, CallingConvention = CallingConvention.StdCall)]
  1138. public static extern Int32 ZAux_Direct_GetMpos(IntPtr handle, int iaxis,ref float pfValue);
  1139. /*************************************************************
  1140. Description: //参数
  1141. Input: //卡链接handle
  1142. Output: //
  1143. Return: //错误码
  1144. *************************************************************/
  1145. //int32 __stdcall ZAux_Direct_GetCurSpeed(ZMC_HANDLE handle, int iaxis, float *pfValue);
  1146. [DllImport("zauxdll.dll", EntryPoint = "ZAux_Direct_GetCurSpeed", CharSet = CharSet.Ansi, CallingConvention = CallingConvention.StdCall)]
  1147. public static extern Int32 ZAux_Direct_GetCurSpeed(IntPtr handle, int iaxis,ref float pfValue);
  1148. /*************************************************************
  1149. Description: //参数 当前的运动类型
  1150. Input: //卡链接handle
  1151. Output: //
  1152. Return: //错误码
  1153. *************************************************************/
  1154. //int32 __stdcall ZAux_Direct_GetMtype(ZMC_HANDLE handle, int iaxis, int *piValue);
  1155. [DllImport("zauxdll.dll", EntryPoint = "ZAux_Direct_GetMtype", CharSet = CharSet.Ansi, CallingConvention = CallingConvention.StdCall)]
  1156. public static extern Int32 ZAux_Direct_GetMtype(IntPtr handle, int iaxis,ref int piValue);
  1157. /*************************************************************
  1158. Description: //参数 轴是否运动完成
  1159. Input: //卡链接handle
  1160. Output: //
  1161. Return: //错误码
  1162. *************************************************************/
  1163. //int32 __stdcall ZAux_Direct_GetIfIdle(ZMC_HANDLE handle, int iaxis, int *piValue);
  1164. [DllImport("zauxdll.dll", EntryPoint = "ZAux_Direct_GetIfIdle", CharSet = CharSet.Ansi, CallingConvention = CallingConvention.StdCall)]
  1165. public static extern Int32 ZAux_Direct_GetIfIdle(IntPtr handle, int iaxis,ref int piValue);
  1166. /*************************************************************
  1167. Description: //参数 当前运行完成后的终点坐标, 缓冲里面的不算
  1168. Input: //卡链接handle
  1169. Output: //
  1170. Return: //错误码
  1171. *************************************************************/
  1172. //int32 __stdcall ZAux_Direct_GetEndMove(ZMC_HANDLE handle, int iaxis, float *pfValue);
  1173. [DllImport("zauxdll.dll", EntryPoint = "ZAux_Direct_GetEndMove", CharSet = CharSet.Ansi, CallingConvention = CallingConvention.StdCall)]
  1174. public static extern Int32 ZAux_Direct_GetEndMove(IntPtr handle, int iaxis, ref int piValue);
  1175. /*************************************************************
  1176. Description: //参数 当前缓冲运行完成后的终点坐标 用于转换相对绝对
  1177. Input: //卡链接handle
  1178. Output: //
  1179. Return: //错误码
  1180. *************************************************************/
  1181. //int32 __stdcall ZAux_Direct_GetEndMoveBuff(ZMC_HANDLE handle, int iaxis, float *pfValue);
  1182. [DllImport("zauxdll.dll", EntryPoint = "ZAux_Direct_GetEndMoveBuff", CharSet = CharSet.Ansi, CallingConvention = CallingConvention.StdCall)]
  1183. public static extern Int32 ZAux_Direct_GetEndMoveBuff(IntPtr handle, int iaxis,ref float pfValue);
  1184. /*************************************************************
  1185. Description: //参数
  1186. Input: //卡链接handle
  1187. Output: //
  1188. Return: //错误码
  1189. *************************************************************/
  1190. //int32 __stdcall ZAux_Direct_GetAxisStatus(ZMC_HANDLE handle, int iaxis, int *piValue);
  1191. [DllImport("zauxdll.dll", EntryPoint = "ZAux_Direct_GetAxisStatus", CharSet = CharSet.Ansi, CallingConvention = CallingConvention.StdCall)]
  1192. public static extern Int32 ZAux_Direct_GetAxisStatus(IntPtr handle, int iaxis,ref int piValue);
  1193. /*************************************************************
  1194. Description: //参数 内部的编码器位置
  1195. Input: //卡链接handle
  1196. Output: //
  1197. Return: //错误码
  1198. *************************************************************/
  1199. //int32 __stdcall ZAux_Direct_GetEncoder(ZMC_HANDLE handle, int iaxis, int *piValue);
  1200. [DllImport("zauxdll.dll", EntryPoint = "ZAux_Direct_GetEncoder", CharSet = CharSet.Ansi, CallingConvention = CallingConvention.StdCall)]
  1201. public static extern Int32 ZAux_Direct_GetEncoder(IntPtr handle, int iaxis,ref int piValue);
  1202. /*************************************************************
  1203. Description: //参数 轴剩余的缓冲, 按直线段来计算
  1204. REMAIN_BUFFER为唯一一个可以加AXIS并用ZMC_DirectCommand获取的.
  1205. Input: //卡链接handle
  1206. Output: //
  1207. Return: //错误码
  1208. *************************************************************/
  1209. //int32 __stdcall ZAux_Direct_GetRemain_LineBuffer(ZMC_HANDLE handle, int iaxis, int *piValue);
  1210. [DllImport("zauxdll.dll", EntryPoint = "ZAux_Direct_GetRemain_LineBuffer", CharSet = CharSet.Ansi, CallingConvention = CallingConvention.StdCall)]
  1211. public static extern Int32 ZAux_Direct_GetRemain_LineBuffer(IntPtr handle, int iaxis,ref int piValue);
  1212. /*************************************************************
  1213. Description: //参数 轴剩余的缓冲, 按最复杂的空间圆弧来计算
  1214. REMAIN_BUFFER为唯一一个可以加AXIS并用ZMC_DirectCommand获取的.
  1215. Input: //卡链接handle
  1216. Output: //
  1217. Return: //错误码
  1218. *************************************************************/
  1219. //int32 __stdcall ZAux_Direct_GetRemain_Buffer(ZMC_HANDLE handle, int iaxis, int *piValue);
  1220. [DllImport("zauxdll.dll", EntryPoint = "ZAux_Direct_GetRemain_Buffer", CharSet = CharSet.Ansi, CallingConvention = CallingConvention.StdCall)]
  1221. public static extern Int32 ZAux_Direct_GetRemain_Buffer(IntPtr handle, int iaxis,ref int piValue);
  1222. /*************************************************************
  1223. Description: //参数
  1224. Input: //卡链接handle
  1225. Output: //
  1226. Return: //错误码
  1227. *************************************************************/
  1228. //int32 __stdcall ZAux_Direct_GetRegPos(ZMC_HANDLE handle, int iaxis, float *pfValue);
  1229. [DllImport("zauxdll.dll", EntryPoint = "ZAux_Direct_GetRegPos", CharSet = CharSet.Ansi, CallingConvention = CallingConvention.StdCall)]
  1230. public static extern Int32 ZAux_Direct_GetRegPos(IntPtr handle, int iaxis,ref float pfValue);
  1231. /*************************************************************
  1232. Description: //参数
  1233. Input: //卡链接handle
  1234. Output: //
  1235. Return: //错误码
  1236. *************************************************************/
  1237. //int32 __stdcall ZAux_Direct_GetMark(ZMC_HANDLE handle, int iaxis, int *piValue);
  1238. [DllImport("zauxdll.dll", EntryPoint = "ZAux_Direct_GetMark", CharSet = CharSet.Ansi, CallingConvention = CallingConvention.StdCall)]
  1239. public static extern Int32 ZAux_Direct_GetMark(IntPtr handle, int iaxis,ref int piValue);
  1240. /*************************************************************
  1241. Description: //参数
  1242. Input: //卡链接handle
  1243. Output: //
  1244. Return: //错误码
  1245. *************************************************************/
  1246. //int32 __stdcall ZAux_Direct_GetMarkB(ZMC_HANDLE handle, int iaxis, int *piValue);
  1247. [DllImport("zauxdll.dll", EntryPoint = "ZAux_Direct_GetMarkB", CharSet = CharSet.Ansi, CallingConvention = CallingConvention.StdCall)]
  1248. public static extern Int32 ZAux_Direct_GetMarkB(IntPtr handle, int iaxis,ref int piValue);
  1249. /*************************************************************
  1250. Description: //全局变量读取, 也可以是参数等等
  1251. Input: //卡链接handle
  1252. Output: //
  1253. Return: //错误码
  1254. *************************************************************/
  1255. //int32 __stdcall ZAux_Direct_GetVariablef(ZMC_HANDLE handle, const char *pname, float *pfValue);
  1256. [DllImport("zauxdll.dll", EntryPoint = "ZAux_Direct_GetMarkB", CharSet = CharSet.Ansi, CallingConvention = CallingConvention.StdCall)]
  1257. public static extern Int32 ZAux_Direct_GetMarkB(IntPtr handle,string pname,ref float pfValue);
  1258. /*************************************************************
  1259. Description: //全局变量读取, 也可以是参数等等
  1260. Input: //卡链接handle
  1261. Output: //
  1262. Return: //错误码
  1263. *************************************************************/
  1264. //int32 __stdcall ZAux_Direct_GetVariableInt(ZMC_HANDLE handle, const char *pname, int *piValue);
  1265. [DllImport("zauxdll.dll", EntryPoint = "ZAux_Direct_GetVariableInt", CharSet = CharSet.Ansi, CallingConvention = CallingConvention.StdCall)]
  1266. public static extern Int32 ZAux_Direct_GetVariableInt(IntPtr handle,string pname,ref int piValue);
  1267. /////////////////////// 只有下面的运动函数支持直接调用,并不是所有的指令都支持
  1268. /////////////////////// 必须 20130901 以后的控制器版本支持
  1269. /*************************************************************
  1270. Description: //BASE指令调用
  1271. 仅仅修改在线命令的BASE列表,不对控制器的运行任务的BASE进行修改.
  1272. 修改后,后续的所有MOVE等指令都是以这个BASE为基础
  1273. Input: //卡链接handle
  1274. Output: //
  1275. Return: //错误码
  1276. *************************************************************/
  1277. //int32 __stdcall ZAux_Direct_Base(ZMC_HANDLE handle, int imaxaxises, int *piAxislist);
  1278. [DllImport("zauxdll.dll", EntryPoint = "ZAux_Direct_Base", CharSet = CharSet.Ansi, CallingConvention = CallingConvention.StdCall)]
  1279. public static extern Int32 ZAux_Direct_Base(IntPtr handle, int imaxaxises, ref int piAxislist);
  1280. /*************************************************************
  1281. Description: //相对插补 直接调用运动函数 20130901 以后的控制器版本支持
  1282. Input: //卡链接handle
  1283. Output: //
  1284. Return: //错误码
  1285. *************************************************************/
  1286. //int32 __stdcall ZAux_Direct_Move(ZMC_HANDLE handle, int imaxaxises, float *pfDisancelist);
  1287. [DllImport("zauxdll.dll", EntryPoint = "ZAux_Direct_Move", CharSet = CharSet.Ansi, CallingConvention = CallingConvention.StdCall)]
  1288. public static extern Int32 ZAux_Direct_Move(IntPtr handle, int imaxaxises, ref float pfDisancelist);
  1289. /*************************************************************
  1290. Description: //相对插补 直接调用运动函数 20130901 以后的控制器版本支持
  1291. Input: //卡链接handle
  1292. Output: //
  1293. Return: //错误码
  1294. *************************************************************/
  1295. //int32 __stdcall ZAux_Direct_MoveSp(ZMC_HANDLE handle, int imaxaxises, float *pfDisancelist);
  1296. [DllImport("zauxdll.dll", EntryPoint = "ZAux_Direct_MoveSp", CharSet = CharSet.Ansi, CallingConvention = CallingConvention.StdCall)]
  1297. public static extern Int32 ZAux_Direct_MoveSp(IntPtr handle, int imaxaxises, ref float pfDisancelist);
  1298. /*************************************************************
  1299. Description: //插补 直接调用运动函数 20130901 以后的控制器版本支持
  1300. Input: //卡链接handle
  1301. Output: //
  1302. Return: //错误码
  1303. *************************************************************/
  1304. //int32 __stdcall ZAux_Direct_MoveAbs(ZMC_HANDLE handle, int imaxaxises, float *pfDisancelist);
  1305. [DllImport("zauxdll.dll", EntryPoint = "ZAux_Direct_MoveAbs", CharSet = CharSet.Ansi, CallingConvention = CallingConvention.StdCall)]
  1306. public static extern Int32 ZAux_Direct_MoveAbs(IntPtr handle, int imaxaxises, ref float pfDisancelist);
  1307. /*************************************************************
  1308. Description: //插补 直接调用运动函数 20130901 以后的控制器版本支持
  1309. Input: //卡链接handle
  1310. Output: //
  1311. Return: //错误码
  1312. *************************************************************/
  1313. //int32 __stdcall ZAux_Direct_MoveAbsSp(ZMC_HANDLE handle, int imaxaxises, float *pfDisancelist);
  1314. [DllImport("zauxdll.dll", EntryPoint = "ZAux_Direct_MoveAbsSp", CharSet = CharSet.Ansi, CallingConvention = CallingConvention.StdCall)]
  1315. public static extern Int32 ZAux_Direct_MoveAbsSp(IntPtr handle, int imaxaxises, ref float pfDisancelist);
  1316. /*************************************************************
  1317. Description: //插补 直接调用运动函数 20130901 以后的控制器版本支持
  1318. Input: //卡链接handle
  1319. Output: //
  1320. Return: //错误码
  1321. *************************************************************/
  1322. //int32 __stdcall ZAux_Direct_MoveModify(ZMC_HANDLE handle, int imaxaxises, float *pfDisancelist);
  1323. [DllImport("zauxdll.dll", EntryPoint = "ZAux_Direct_MoveModify", CharSet = CharSet.Ansi, CallingConvention = CallingConvention.StdCall)]
  1324. public static extern Int32 ZAux_Direct_MoveModify(IntPtr handle, int imaxaxises, ref float pfDisancelist);
  1325. /*************************************************************
  1326. Description: //插补 直接调用运动函数 20130901 以后的控制器版本支持
  1327. Input: //卡链接handle
  1328. end1 第一个轴运动坐标
  1329. end2 第二个轴运动坐标
  1330. centre1 第一个轴运动圆心,相对与起始点。
  1331. centre2 第二个轴运动圆心,相对与起始点。
  1332. direction 0-逆时针,1-顺时针
  1333. Output: //
  1334. Return: //错误码
  1335. *************************************************************/
  1336. //int32 __stdcall ZAux_Direct_MoveCirc(ZMC_HANDLE handle, float fend1, float fend2, float fcenter1, float fcenter2, int idirection);
  1337. [DllImport("zauxdll.dll", EntryPoint = "ZAux_Direct_MoveCirc", CharSet = CharSet.Ansi, CallingConvention = CallingConvention.StdCall)]
  1338. public static extern Int32 ZAux_Direct_MoveCirc(IntPtr handle, float fend1, float fend2, float fcenter1, float fcenter2, int idirection);
  1339. /*************************************************************
  1340. Description: //插补 直接调用运动函数 20130901 以后的控制器版本支持
  1341. Input: //卡链接handle
  1342. end1 第一个轴运动坐标
  1343. end2 第二个轴运动坐标
  1344. centre1 第一个轴运动圆心,相对与起始点。
  1345. centre2 第二个轴运动圆心,相对与起始点。
  1346. direction 0-逆时针,1-顺时针
  1347. Output: //
  1348. Return: //错误码
  1349. *************************************************************/
  1350. //int32 __stdcall ZAux_Direct_MoveCircSp(ZMC_HANDLE handle, float fend1, float fend2, float fcenter1, float fcenter2, int idirection);
  1351. [DllImport("zauxdll.dll", EntryPoint = "ZAux_Direct_MoveCircSp", CharSet = CharSet.Ansi, CallingConvention = CallingConvention.StdCall)]
  1352. public static extern Int32 ZAux_Direct_MoveCircSp(IntPtr handle, float fend1, float fend2, float fcenter1, float fcenter2, int idirection);
  1353. /*************************************************************
  1354. Description: //插补 直接调用运动函数 20130901 以后的控制器版本支持
  1355. Input: //卡链接handle
  1356. end1 第一个轴运动坐标,绝对位置
  1357. end2 第二个轴运动坐标,绝对位置
  1358. centre1 第一个轴运动圆心,绝对位置
  1359. centre2 第二个轴运动圆心,绝对位置
  1360. direction 0-逆时针,1-顺时针
  1361. Output: //
  1362. Return: //错误码
  1363. *************************************************************/
  1364. //int32 __stdcall ZAux_Direct_MoveCircAbs(ZMC_HANDLE handle, float fend1, float fend2, float fcenter1, float fcenter2, int idirection);
  1365. [DllImport("zauxdll.dll", EntryPoint = "ZAux_Direct_MoveCircAbs", CharSet = CharSet.Ansi, CallingConvention = CallingConvention.StdCall)]
  1366. public static extern Int32 ZAux_Direct_MoveCircAbs(IntPtr handle, float fend1, float fend2, float fcenter1, float fcenter2, int idirection);
  1367. /*************************************************************
  1368. Description: //插补 直接调用运动函数 20130901 以后的控制器版本支持
  1369. Input: //卡链接handle
  1370. end1 第一个轴运动坐标,绝对位置
  1371. end2 第二个轴运动坐标,绝对位置
  1372. centre1 第一个轴运动圆心,绝对位置
  1373. centre2 第二个轴运动圆心,绝对位置
  1374. direction 0-逆时针,1-顺时针
  1375. Output: //
  1376. Return: //错误码
  1377. *************************************************************/
  1378. //int32 __stdcall ZAux_Direct_MoveCircAbsSp(ZMC_HANDLE handle, float fend1, float fend2, float fcenter1, float fcenter2, int idirection);
  1379. [DllImport("zauxdll.dll", EntryPoint = "ZAux_Direct_MoveCircAbsSp", CharSet = CharSet.Ansi, CallingConvention = CallingConvention.StdCall)]
  1380. public static extern Int32 ZAux_Direct_MoveCircAbsSp(IntPtr handle, float fend1, float fend2, float fcenter1, float fcenter2, int idirection);
  1381. /*************************************************************
  1382. Description: //插补 直接调用运动函数 20130901 以后的控制器版本支持
  1383. Input: //卡链接handle
  1384. mid1 第一个轴中间点,相对起始点距离
  1385. mid2 第二个轴中间点,相对起始点距离
  1386. end1 第一个轴结束点,相对起始点距离
  1387. end2 第二个轴结束点,相对起始点距离
  1388. Output: //
  1389. Return: //错误码
  1390. *************************************************************/
  1391. //int32 __stdcall ZAux_Direct_MoveCirc2(ZMC_HANDLE handle, float fmid1, float fmid2, float fend1, float fend2);
  1392. [DllImport("zauxdll.dll", EntryPoint = "ZAux_Direct_MoveCirc2", CharSet = CharSet.Ansi, CallingConvention = CallingConvention.StdCall)]
  1393. public static extern Int32 ZAux_Direct_MoveCirc2(IntPtr handle, float fmid1, float fmid2, float fend1, float fend2);
  1394. /*************************************************************
  1395. Description: //插补 直接调用运动函数 20130901 以后的控制器版本支持
  1396. Input: //卡链接handle
  1397. mid1 第一个轴中间点,绝对位置
  1398. mid2 第二个轴中间点,绝对位置
  1399. end1 第一个轴结束点,绝对位置
  1400. end2 第二个轴结束点,绝对位置
  1401. Output: //
  1402. Return: //错误码
  1403. *************************************************************/
  1404. //int32 __stdcall ZAux_Direct_MoveCirc2Abs(ZMC_HANDLE handle, float fmid1, float fmid2, float fend1, float fend2);
  1405. [DllImport("zauxdll.dll", EntryPoint = "ZAux_Direct_MoveCirc2Abs", CharSet = CharSet.Ansi, CallingConvention = CallingConvention.StdCall)]
  1406. public static extern Int32 ZAux_Direct_MoveCirc2Abs(IntPtr handle, float fmid1, float fmid2, float fend1, float fend2);
  1407. /*************************************************************
  1408. Description: //插补 直接调用运动函数 20130901 以后的控制器版本支持
  1409. Input: //卡链接handle
  1410. mid1 第一个轴中间点,相对起始点距离
  1411. mid2 第二个轴中间点,相对起始点距离
  1412. end1 第一个轴结束点,相对起始点距离
  1413. end2 第二个轴结束点,相对起始点距离
  1414. Output: //
  1415. Return: //错误码
  1416. *************************************************************/
  1417. //int32 __stdcall ZAux_Direct_MoveCirc2Sp(ZMC_HANDLE handle, float fmid1, float fmid2, float fend1, float fend2);
  1418. [DllImport("zauxdll.dll", EntryPoint = "ZAux_Direct_MoveCirc2Sp", CharSet = CharSet.Ansi, CallingConvention = CallingConvention.StdCall)]
  1419. public static extern Int32 ZAux_Direct_MoveCirc2Sp(IntPtr handle, float fmid1, float fmid2, float fend1, float fend2);
  1420. /*************************************************************
  1421. Description: //插补 直接调用运动函数 20130901 以后的控制器版本支持
  1422. Input: //卡链接handle
  1423. mid1 第一个轴中间点,绝对位置
  1424. mid2 第二个轴中间点,绝对位置
  1425. end1 第一个轴结束点,绝对位置
  1426. end2 第二个轴结束点,绝对位置
  1427. Output: //
  1428. Return: //错误码
  1429. *************************************************************/
  1430. //int32 __stdcall ZAux_Direct_MoveCirc2AbsSp(ZMC_HANDLE handle, float fmid1, float fmid2, float fend1, float fend2);
  1431. [DllImport("zauxdll.dll", EntryPoint = "ZAux_Direct_MoveCirc2AbsSp", CharSet = CharSet.Ansi, CallingConvention = CallingConvention.StdCall)]
  1432. public static extern Int32 ZAux_Direct_MoveCirc2AbsSp(IntPtr handle, float fmid1, float fmid2, float fend1, float fend2);
  1433. /*************************************************************
  1434. Description: //插补
  1435. Input: //卡链接handle
  1436. end1 第一个轴运动坐标
  1437. end2 第二个轴运动坐标
  1438. centre1 第一个轴运动圆心,相对与起始点
  1439. centre2 第二个轴运动圆心,相对与起始点
  1440. direction 0-逆时针,1-顺时针
  1441. distance3第三个轴运动距离。
  1442. mode 第三轴的速度计算:
  1443. 0(缺省)
  1444. 第三轴参与速度计算。
  1445. 1
  1446. 第三轴不参与速度计算。
  1447. Output: //
  1448. Return: //错误码
  1449. *************************************************************/
  1450. //int32 __stdcall ZAux_Direct_MHelical(ZMC_HANDLE handle, float fend1, float fend2, float fcenter1, float fcenter2, int idirection, float fDistance3, int imode);
  1451. [DllImport("zauxdll.dll", EntryPoint = "ZAux_Direct_MHelical", CharSet = CharSet.Ansi, CallingConvention = CallingConvention.StdCall)]
  1452. public static extern Int32 ZAux_Direct_MHelical(IntPtr handle,float fend1, float fend2, float fcenter1, float fcenter2, int idirection, float fDistance3, int imode);
  1453. /*************************************************************
  1454. Description: //插补
  1455. Input: //卡链接handle
  1456. end1 第一个轴运动坐标
  1457. end2 第二个轴运动坐标
  1458. centre1 第一个轴运动圆心,相对与起始点
  1459. centre2 第二个轴运动圆心,相对与起始点
  1460. direction 0-逆时针,1-顺时针
  1461. distance3第三个轴运动距离。
  1462. mode 第三轴的速度计算:
  1463. 0(缺省)
  1464. 第三轴参与速度计算。
  1465. 1
  1466. 第三轴不参与速度计算。
  1467. Output: //
  1468. Return: //错误码
  1469. *************************************************************/
  1470. //int32 __stdcall ZAux_Direct_MHelicalAbs(ZMC_HANDLE handle, float fend1, float fend2, float fcenter1, float fcenter2, int idirection, float fDistance3, int imode);
  1471. [DllImport("zauxdll.dll", EntryPoint = "ZAux_Direct_MHelicalAbs", CharSet = CharSet.Ansi, CallingConvention = CallingConvention.StdCall)]
  1472. public static extern Int32 ZAux_Direct_MHelicalAbs(IntPtr handle,float fend1, float fend2, float fcenter1, float fcenter2, int idirection, float fDistance3, int imode);
  1473. /*************************************************************
  1474. Description: //插补
  1475. Input: //卡链接handle
  1476. end1 第一个轴运动坐标
  1477. end2 第二个轴运动坐标
  1478. centre1 第一个轴运动圆心,相对与起始点
  1479. centre2 第二个轴运动圆心,相对与起始点
  1480. direction 0-逆时针,1-顺时针
  1481. distance3第三个轴运动距离。
  1482. mode 第三轴的速度计算:
  1483. 0(缺省)
  1484. 第三轴参与速度计算。
  1485. 1
  1486. 第三轴不参与速度计算。
  1487. Output: //
  1488. Return: //错误码
  1489. *************************************************************/
  1490. //int32 __stdcall ZAux_Direct_MHelicalSp(ZMC_HANDLE handle, float fend1, float fend2, float fcenter1, float fcenter2, int idirection, float fDistance3, int imode);
  1491. [DllImport("zauxdll.dll", EntryPoint = "ZAux_Direct_MHelicalSp", CharSet = CharSet.Ansi, CallingConvention = CallingConvention.StdCall)]
  1492. public static extern Int32 ZAux_Direct_MHelicalSp(IntPtr handle, float fend1, float fend2, float fcenter1, float fcenter2, int idirection, float fDistance3, int imode);
  1493. /*************************************************************
  1494. Description: //插补
  1495. Input: //卡链接handle
  1496. end1 第一个轴运动坐标
  1497. end2 第二个轴运动坐标
  1498. centre1 第一个轴运动圆心,相对与起始点
  1499. centre2 第二个轴运动圆心,相对与起始点
  1500. direction 0-逆时针,1-顺时针
  1501. distance3第三个轴运动距离。
  1502. mode 第三轴的速度计算:
  1503. 0(缺省)
  1504. 第三轴参与速度计算。
  1505. 1
  1506. 第三轴不参与速度计算。
  1507. Output: //
  1508. Return: //错误码
  1509. *************************************************************/
  1510. //int32 __stdcall ZAux_Direct_MHelicalAbsSp(ZMC_HANDLE handle, float fend1, float fend2, float fcenter1, float fcenter2, int idirection, float fDistance3, int imode);
  1511. [DllImport("zauxdll.dll", EntryPoint = "ZAux_Direct_MHelicalAbsSp", CharSet = CharSet.Ansi, CallingConvention = CallingConvention.StdCall)]
  1512. public static extern Int32 ZAux_Direct_MHelicalAbsSp(IntPtr handle,float fend1, float fend2, float fcenter1, float fcenter2, int idirection, float fDistance3, int imode);
  1513. /*************************************************************
  1514. Description: //插补
  1515. Input: //卡链接handle
  1516. mid1 第一个轴中间点
  1517. mid2 第二个轴中间点
  1518. end1 第一个轴结束点
  1519. end2 第二个轴结束点
  1520. distance3第三个轴运动距离
  1521. mode 第三轴的速度计算:
  1522. Output: //
  1523. Return: //错误码
  1524. *************************************************************/
  1525. //int32 __stdcall ZAux_Direct_MHelical2(ZMC_HANDLE handle, float fmid1, float fmid2, float fend1, float fend2, float fDistance3, int imode);
  1526. [DllImport("zauxdll.dll", EntryPoint = "ZAux_Direct_MHelical2", CharSet = CharSet.Ansi, CallingConvention = CallingConvention.StdCall)]
  1527. public static extern Int32 ZAux_Direct_MHelical2(IntPtr handle, float fmid1, float fmid2, float fend1, float fend2, float fDistance3, int imode);
  1528. /*************************************************************
  1529. Description: //插补
  1530. Input: //卡链接handle
  1531. mid1 第一个轴中间点
  1532. mid2 第二个轴中间点
  1533. end1 第一个轴结束点
  1534. end2 第二个轴结束点
  1535. distance3 第三个轴运动结束点
  1536. mode 第三轴的速度计算:
  1537. Output: //
  1538. Return: //错误码
  1539. *************************************************************/
  1540. //int32 __stdcall ZAux_Direct_MHelical2Abs(ZMC_HANDLE handle, float fmid1, float fmid2, float fend1, float fend2, float fDistance3, int imode);
  1541. [DllImport("zauxdll.dll", EntryPoint = "ZAux_Direct_MHelical2Abs", CharSet = CharSet.Ansi, CallingConvention = CallingConvention.StdCall)]
  1542. public static extern Int32 ZAux_Direct_MHelical2Abs(IntPtr handle, float fmid1, float fmid2, float fend1, float fend2, float fDistance3, int imode);
  1543. /*************************************************************
  1544. Description: //插补
  1545. Input: //卡链接handle
  1546. mid1 第一个轴中间点
  1547. mid2 第二个轴中间点
  1548. end1 第一个轴结束点
  1549. end2 第二个轴结束点
  1550. distance3第三个轴运动距离
  1551. mode 第三轴的速度计算:
  1552. Output: //
  1553. Return: //错误码
  1554. *************************************************************/
  1555. //int32 __stdcall ZAux_Direct_MHelical2Sp(ZMC_HANDLE handle, float fmid1, float fmid2, float fend1, float fend2, float fDistance3, int imode);
  1556. [DllImport("zauxdll.dll", EntryPoint = "ZAux_Direct_MHelical2Sp", CharSet = CharSet.Ansi, CallingConvention = CallingConvention.StdCall)]
  1557. public static extern Int32 ZAux_Direct_MHelical2Sp(IntPtr handle, float fmid1, float fmid2, float fend1, float fend2, float fDistance3, int imode);
  1558. /*************************************************************
  1559. Description: //插补
  1560. Input: //卡链接handle
  1561. mid1 第一个轴中间点
  1562. mid2 第二个轴中间点
  1563. end1 第一个轴结束点
  1564. end2 第二个轴结束点
  1565. distance3 第三个轴运动结束点
  1566. mode 第三轴的速度计算:
  1567. Output: //
  1568. Return: //错误码
  1569. *************************************************************/
  1570. //int32 __stdcall ZAux_Direct_MHelical2AbsSp(ZMC_HANDLE handle, float fmid1, float fmid2, float fend1, float fend2, float fDistance3, int imode);
  1571. [DllImport("zauxdll.dll", EntryPoint = "ZAux_Direct_MHelical2AbsSp", CharSet = CharSet.Ansi, CallingConvention = CallingConvention.StdCall)]
  1572. public static extern Int32 ZAux_Direct_MHelical2AbsSp(IntPtr handle, float fmid1, float fmid2, float fend1, float fend2, float fDistance3, int imode);
  1573. /*************************************************************
  1574. Description: //插补
  1575. Input: //卡链接handle
  1576. Output: //
  1577. Return: //错误码
  1578. *************************************************************/
  1579. //int32 __stdcall ZAux_Direct_MEclipse(ZMC_HANDLE handle, float fend1, float fend2, float fcenter1, float fcenter2, int idirection, float fADis, float fBDis);
  1580. [DllImport("zauxdll.dll", EntryPoint = "ZAux_Direct_MHelical2AbsSp", CharSet = CharSet.Ansi, CallingConvention = CallingConvention.StdCall)]
  1581. public static extern Int32 ZAux_Direct_MHelical2AbsSp(IntPtr handle, float fend1, float fend2, float fcenter1, float fcenter2, int idirection, float fADis, float fBDis);
  1582. /*************************************************************
  1583. Description: //插补
  1584. Input: //卡链接handle
  1585. Output: //
  1586. Return: //错误码
  1587. *************************************************************/
  1588. //int32 __stdcall ZAux_Direct_MEclipseAbs(ZMC_HANDLE handle, float fend1, float fend2, float fcenter1, float fcenter2, int idirection, float fADis, float fBDis);
  1589. [DllImport("zauxdll.dll", EntryPoint = "ZAux_Direct_MEclipseAbs", CharSet = CharSet.Ansi, CallingConvention = CallingConvention.StdCall)]
  1590. public static extern Int32 ZAux_Direct_MEclipseAbs(IntPtr handle, float fend1, float fend2, float fcenter1, float fcenter2, int idirection, float fADis, float fBDis);
  1591. /*************************************************************
  1592. Description: //插补
  1593. Input: //卡链接handle
  1594. Output: //
  1595. Return: //错误码
  1596. *************************************************************/
  1597. //int32 __stdcall ZAux_Direct_MEclipseSp(ZMC_HANDLE handle, float fend1, float fend2, float fcenter1, float fcenter2, int idirection, float fADis, float fBDis);
  1598. [DllImport("zauxdll.dll", EntryPoint = "ZAux_Direct_MEclipseSp", CharSet = CharSet.Ansi, CallingConvention = CallingConvention.StdCall)]
  1599. public static extern Int32 ZAux_Direct_MEclipseSp(IntPtr handle, float fend1, float fend2, float fcenter1, float fcenter2, int idirection, float fADis, float fBDis);
  1600. /*************************************************************
  1601. Description: //插补
  1602. Input: //卡链接handle
  1603. Output: //
  1604. Return: //错误码
  1605. *************************************************************/
  1606. //int32 __stdcall ZAux_Direct_MEclipseAbsSp(ZMC_HANDLE handle, float fend1, float fend2, float fcenter1, float fcenter2, int idirection, float fADis, float fBDis);
  1607. [DllImport("zauxdll.dll", EntryPoint = "ZAux_Direct_MEclipseAbsSp", CharSet = CharSet.Ansi, CallingConvention = CallingConvention.StdCall)]
  1608. public static extern Int32 ZAux_Direct_MEclipseAbsSp(IntPtr handle, float fend1, float fend2, float fcenter1, float fcenter2, int idirection, float fADis, float fBDis);
  1609. /*************************************************************
  1610. Description: //插补 椭圆 + 螺旋
  1611. Input: //卡链接handle
  1612. Output: //
  1613. Return: //错误码
  1614. *************************************************************/
  1615. //int32 __stdcall ZAux_Direct_MEclipseHelical(ZMC_HANDLE handle, float fend1, float fend2, float fcenter1, float fcenter2, int idirection, float fADis, float fBDis, float fDistance3);
  1616. [DllImport("zauxdll.dll", EntryPoint = "ZAux_Direct_MEclipseHelical", CharSet = CharSet.Ansi, CallingConvention = CallingConvention.StdCall)]
  1617. public static extern Int32 ZAux_Direct_MEclipseHelical(IntPtr handle,float fend1, float fend2, float fcenter1, float fcenter2, int idirection, float fADis, float fBDis, float fDistance3);
  1618. /*************************************************************
  1619. Description: //插补 椭圆 + 螺旋
  1620. Input: //卡链接handle
  1621. Output: //
  1622. Return: //错误码
  1623. *************************************************************/
  1624. //int32 __stdcall ZAux_Direct_MEclipseHelicalAbs(ZMC_HANDLE handle, float fend1, float fend2, float fcenter1, float fcenter2, int idirection, float fADis, float fBDis,float fDistance3);
  1625. [DllImport("zauxdll.dll", EntryPoint = "ZAux_Direct_MEclipseHelicalAbs", CharSet = CharSet.Ansi, CallingConvention = CallingConvention.StdCall)]
  1626. public static extern Int32 ZAux_Direct_MEclipseHelicalAbs(IntPtr handle,float fend1, float fend2, float fcenter1, float fcenter2, int idirection, float fADis, float fBDis, float fDistance3);
  1627. /*************************************************************
  1628. Description: //插补 椭圆 + 螺旋
  1629. Input: //卡链接handle
  1630. Output: //
  1631. Return: //错误码
  1632. *************************************************************/
  1633. //int32 __stdcall ZAux_Direct_MEclipseHelicalSp(ZMC_HANDLE handle, float fend1, float fend2, float fcenter1, float fcenter2, int idirection, float fADis, float fBDis, float fDistance3);
  1634. [DllImport("zauxdll.dll", EntryPoint = "ZAux_Direct_MEclipseHelicalSp", CharSet = CharSet.Ansi, CallingConvention = CallingConvention.StdCall)]
  1635. public static extern Int32 ZAux_Direct_MEclipseHelicalSp(IntPtr handle,float fend1, float fend2, float fcenter1, float fcenter2, int idirection, float fADis, float fBDis, float fDistance3);
  1636. /*************************************************************
  1637. Description: //插补 椭圆 + 螺旋
  1638. Input: //卡链接handle
  1639. Output: //
  1640. Return: //错误码
  1641. *************************************************************/
  1642. //int32 __stdcall ZAux_Direct_MEclipseHelicalAbsSp(ZMC_HANDLE handle, float fend1, float fend2, float fcenter1, float fcenter2, int idirection, float fADis, float fBDis,float fDistance3);
  1643. [DllImport("zauxdll.dll", EntryPoint = "ZAux_Direct_MEclipseHelicalAbsSp", CharSet = CharSet.Ansi, CallingConvention = CallingConvention.StdCall)]
  1644. public static extern Int32 ZAux_Direct_MEclipseHelicalAbsSp(IntPtr handle,float fend1, float fend2, float fcenter1, float fcenter2, int idirection, float fADis, float fBDis, float fDistance3);
  1645. /*************************************************************
  1646. Description: //插补 空间圆弧
  1647. Input: //卡链接handle
  1648. end1 第1个轴运动距离参数1
  1649. end2 第2个轴运动距离参数1
  1650. end3 第3个轴运动距离参数1
  1651. centre1 第1个轴运动距离参数2
  1652. centre2 第2个轴运动距离参数2
  1653. centre3 第3个轴运动距离参数2
  1654. mode 指定前面参数的意义
  1655. 0 当前点,中间点,终点三点定圆弧,距离参数1为终点距离,距离参数2为中间点距离。
  1656. 1 走最小的圆弧,距离参数1为终点距离,距离参数2为圆心的距离。
  1657. 2 当前点,中间点,终点三点定圆,距离参数1为终点距离,距离参数2为中间点距离。
  1658. 3 先走最小的圆弧,再继续走完整圆,距离参数1为终点距离,距离参数2为圆心的距离。
  1659. Output: //
  1660. Return: //错误码
  1661. *************************************************************/
  1662. //int32 __stdcall ZAux_Direct_MSpherical(ZMC_HANDLE handle, float fend1, float fend2, float fend3, float fcenter1, float fcenter2, float fcenter3, int imode);
  1663. [DllImport("zauxdll.dll", EntryPoint = "ZAux_Direct_MEclipseHelicalAbsSp", CharSet = CharSet.Ansi, CallingConvention = CallingConvention.StdCall)]
  1664. public static extern Int32 ZAux_Direct_MEclipseHelicalAbsSp(IntPtr handle, float fend1, float fend2, float fend3, float fcenter1, float fcenter2, float fcenter3, int imode);
  1665. /*************************************************************
  1666. Description: //插补 空间圆弧
  1667. Input: //卡链接handle
  1668. end1 第1个轴运动距离参数1
  1669. end2 第2个轴运动距离参数1
  1670. end3 第3个轴运动距离参数1
  1671. centre1 第1个轴运动距离参数2
  1672. centre2 第2个轴运动距离参数2
  1673. centre3 第3个轴运动距离参数2
  1674. mode 指定前面参数的意义
  1675. 0 当前点,中间点,终点三点定圆弧,距离参数1为终点距离,距离参数2为中间点距离。
  1676. 1 走最小的圆弧,距离参数1为终点距离,距离参数2为圆心的距离。
  1677. 2 当前点,中间点,终点三点定圆,距离参数1为终点距离,距离参数2为中间点距离。
  1678. 3 先走最小的圆弧,再继续走完整圆,距离参数1为终点距离,距离参数2为圆心的距离。
  1679. Output: //
  1680. Return: //错误码
  1681. *************************************************************/
  1682. //int32 __stdcall ZAux_Direct_MSphericalSp(ZMC_HANDLE handle, float fend1, float fend2, float fend3, float fcenter1, float fcenter2, float fcenter3, int imode);
  1683. [DllImport("zauxdll.dll", EntryPoint = "ZAux_Direct_MSphericalSp", CharSet = CharSet.Ansi, CallingConvention = CallingConvention.StdCall)]
  1684. public static extern Int32 ZAux_Direct_MSphericalSp(IntPtr handle, float fend1, float fend2, float fend3, float fcenter1, float fcenter2, float fcenter3, int imode);
  1685. /*************************************************************
  1686. Description: //运动暂停
  1687. Input: //卡链接handle
  1688. 0(缺省) 暂停当前运动。
  1689. 1 在当前运动完成后正准备执行下一条运动指令时暂停。
  1690. 2 在当前运动完成后正准备执行下一条运动指令时,并且两条指令的MARK标识不一样时暂停。这个模式可以用于一个动作由多个指令来实现时,可以在一整个动作完成后暂停。
  1691. Output: //
  1692. Return: //错误码
  1693. *************************************************************/
  1694. //int32 __stdcall ZAux_Direct_MovePause(ZMC_HANDLE handle, int imode);
  1695. [DllImport("zauxdll.dll", EntryPoint = "ZAux_Direct_MovePause", CharSet = CharSet.Ansi, CallingConvention = CallingConvention.StdCall)]
  1696. public static extern Int32 ZAux_Direct_MovePause(IntPtr handle,int imode);
  1697. /*************************************************************
  1698. Description: //运动暂停
  1699. Input: //卡链接handle
  1700. 0(缺省) 暂停当前运动。
  1701. 1 在当前运动完成后正准备执行下一条运动指令时暂停。
  1702. 2 在当前运动完成后正准备执行下一条运动指令时,并且两条指令的MARK标识不一样时暂停。这个模式可以用于一个动作由多个指令来实现时,可以在一整个动作完成后暂停。
  1703. Output: //
  1704. Return: //错误码
  1705. *************************************************************/
  1706. //int32 __stdcall ZAux_Direct_MoveResume(ZMC_HANDLE handle);
  1707. [DllImport("zauxdll.dll", EntryPoint = "ZAux_Direct_MoveResume", CharSet = CharSet.Ansi, CallingConvention = CallingConvention.StdCall)]
  1708. public static extern Int32 ZAux_Direct_MoveResume(IntPtr handle);
  1709. /*************************************************************
  1710. Description: //在运动缓冲中加入输出指令
  1711. Input: //卡链接handle
  1712. Output: //
  1713. Return: //错误码
  1714. *************************************************************/
  1715. //int32 __stdcall ZAux_Direct_MoveOp(ZMC_HANDLE handle, int ioutnum, int ivalue);
  1716. [DllImport("zauxdll.dll", EntryPoint = "ZAux_Direct_MoveOp", CharSet = CharSet.Ansi, CallingConvention = CallingConvention.StdCall)]
  1717. public static extern Int32 ZAux_Direct_MoveOp(IntPtr handle, int ioutnum, int ivalue);
  1718. /*************************************************************
  1719. Description: //在运动缓冲中加入输出指令
  1720. Input: //卡链接handle
  1721. Output: //
  1722. Return: //错误码
  1723. *************************************************************/
  1724. //int32 __stdcall ZAux_Direct_MoveOpMulti(ZMC_HANDLE handle, int ioutnumfirst, int ioutnumend, int ivalue);
  1725. [DllImport("zauxdll.dll", EntryPoint = "ZAux_Direct_MoveOpMulti", CharSet = CharSet.Ansi, CallingConvention = CallingConvention.StdCall)]
  1726. public static extern Int32 ZAux_Direct_MoveOpMulti(IntPtr handle, int ioutnumfirst, int ioutnumend, int ivalue);
  1727. /*************************************************************
  1728. Description: //在运动缓冲中加入输出指令
  1729. Input: //卡链接handle
  1730. Output: //
  1731. Return: //错误码
  1732. *************************************************************/
  1733. //int32 __stdcall ZAux_Direct_MoveOp2(ZMC_HANDLE handle, int ioutnum, int ivalue, int iofftimems);
  1734. [DllImport("zauxdll.dll", EntryPoint = "ZAux_Direct_MoveOp2", CharSet = CharSet.Ansi, CallingConvention = CallingConvention.StdCall)]
  1735. public static extern Int32 ZAux_Direct_MoveOp2(IntPtr handle, int ioutnum, int ivalue, int iofftimems);
  1736. /*************************************************************
  1737. Description: //在运动缓冲中加入延时指令
  1738. Input: //卡链接handle
  1739. Output: //
  1740. Return: //错误码
  1741. *************************************************************/
  1742. //int32 __stdcall ZAux_Direct_MoveDelay(ZMC_HANDLE handle, int itimems);
  1743. [DllImport("zauxdll.dll", EntryPoint = "ZAux_Direct_MoveDelay", CharSet = CharSet.Ansi, CallingConvention = CallingConvention.StdCall)]
  1744. public static extern Int32 ZAux_Direct_MoveDelay(IntPtr handle,int itimems);
  1745. /*************************************************************
  1746. Description: //电子凸轮
  1747. Input: //卡链接handle
  1748. Output: //
  1749. Return: //错误码
  1750. *************************************************************/
  1751. //int32 __stdcall ZAux_Direct_Cam(ZMC_HANDLE handle, int istartpoint, int iendpoint, float ftablemulti, float fDistance);
  1752. [DllImport("zauxdll.dll", EntryPoint = "ZAux_Direct_Cam", CharSet = CharSet.Ansi, CallingConvention = CallingConvention.StdCall)]
  1753. public static extern Int32 ZAux_Direct_Cam(IntPtr handle, int istartpoint, int iendpoint, float ftablemulti, float fDistance);
  1754. /*************************************************************
  1755. Description: //电子凸轮
  1756. Input: //卡链接handle
  1757. Output: //
  1758. Return: //错误码
  1759. *************************************************************/
  1760. //int32 __stdcall ZAux_Direct_Cambox(ZMC_HANDLE handle, int istartpoint, int iendpoint, float ftablemulti, float fDistance, int ilinkaxis, int ioption, float flinkstartpos);
  1761. [DllImport("zauxdll.dll", EntryPoint = "ZAux_Direct_Cambox", CharSet = CharSet.Ansi, CallingConvention = CallingConvention.StdCall)]
  1762. public static extern Int32 ZAux_Direct_Cambox(IntPtr handle, int istartpoint, int iendpoint, float ftablemulti, float fDistance, int ilinkaxis, int ioption, float flinkstartpos);
  1763. /*************************************************************
  1764. Description: //连接 特殊凸轮
  1765. Input: //卡链接handle
  1766. Output: //
  1767. Return: //错误码
  1768. *************************************************************/
  1769. //int32 __stdcall ZAux_Direct_Movelink(ZMC_HANDLE handle, float fDistance, float fLinkDis, float fLinkAcc, float fLinkDec,int iLinkaxis, int ioption, float flinkstartpos);
  1770. [DllImport("zauxdll.dll", EntryPoint = "ZAux_Direct_Movelink", CharSet = CharSet.Ansi, CallingConvention = CallingConvention.StdCall)]
  1771. public static extern Int32 ZAux_Direct_Movelink(IntPtr handle, float fDistance, float fLinkDis, float fLinkAcc, float fLinkDec,int iLinkaxis, int ioption, float flinkstartpos);
  1772. /*************************************************************
  1773. Description: //位置锁存指令
  1774. Input: //卡链接handle
  1775. Output: //
  1776. Return: //错误码
  1777. *************************************************************/
  1778. //int32 __stdcall ZAux_Direct_Regist(ZMC_HANDLE handle, int imode);
  1779. [DllImport("zauxdll.dll", EntryPoint = "ZAux_Direct_Regist", CharSet = CharSet.Ansi, CallingConvention = CallingConvention.StdCall)]
  1780. public static extern Int32 ZAux_Direct_Regist(IntPtr handle,int imode );
  1781. /*************************************************************
  1782. Description: //所有轴立即停止
  1783. Input: //卡链接handle
  1784. Output: //
  1785. Return: //错误码
  1786. *************************************************************/
  1787. //int32 __stdcall ZAux_Direct_Rapidstop(ZMC_HANDLE handle, int imode);
  1788. [DllImport("zauxdll.dll", EntryPoint = "ZAux_Direct_Rapidstop", CharSet = CharSet.Ansi, CallingConvention = CallingConvention.StdCall)]
  1789. public static extern Int32 ZAux_Direct_Rapidstop(IntPtr handle,int imode );
  1790. /*************************************************************
  1791. Description: //参数
  1792. Input: //卡链接handle
  1793. Output: //
  1794. Return: //错误码
  1795. *************************************************************/
  1796. //int32 __stdcall ZAux_Direct_GetIn(ZMC_HANDLE handle, int ionum, uint32 *piValue);
  1797. [DllImport("zauxdll.dll", EntryPoint = "ZAux_Direct_GetIn", CharSet = CharSet.Ansi, CallingConvention = CallingConvention.StdCall)]
  1798. public static extern Int32 ZAux_Direct_GetIn(IntPtr handle, int ionum, ref UInt32 piValue );
  1799. /*************************************************************
  1800. Description: //参数
  1801. Input: //卡链接handle
  1802. Output: //
  1803. Return: //错误码
  1804. *************************************************************/
  1805. //int32 __stdcall ZAux_Direct_SetOp(ZMC_HANDLE handle, int ionum, uint32 iValue);
  1806. [DllImport("zauxdll.dll", EntryPoint = "ZAux_Direct_SetOp", CharSet = CharSet.Ansi, CallingConvention = CallingConvention.StdCall)]
  1807. public static extern Int32 ZAux_Direct_SetOp(IntPtr handle, int ionum, UInt32 iValue );
  1808. /*************************************************************
  1809. Description: //单轴运动
  1810. Input: //卡链接handle 轴号, 距离
  1811. Output: //
  1812. Return: //错误码
  1813. *************************************************************/
  1814. //int32 __stdcall ZAux_Direct_Singl_Move(ZMC_HANDLE handle, int iaxis, float fdistance);
  1815. [DllImport("zauxdll.dll", EntryPoint = "ZAux_Direct_Singl_Move", CharSet = CharSet.Ansi, CallingConvention = CallingConvention.StdCall)]
  1816. public static extern Int32 ZAux_Direct_Singl_Move(IntPtr handle, int iaxis, float fdistance);
  1817. /*************************************************************
  1818. Description: //单轴运动
  1819. Input: //卡链接handle 轴号, 距离
  1820. Output: //
  1821. Return: //错误码
  1822. *************************************************************/
  1823. //int32 __stdcall ZAux_Direct_Singl_MoveAbs(ZMC_HANDLE handle, int iaxis, float fdistance);
  1824. [DllImport("zauxdll.dll", EntryPoint = "ZAux_Direct_Singl_MoveAbs", CharSet = CharSet.Ansi, CallingConvention = CallingConvention.StdCall)]
  1825. public static extern Int32 ZAux_Direct_Singl_MoveAbs(IntPtr handle, int iaxis, float fdistance);
  1826. // #if 0
  1827. //辅助函数
  1828. //#endif
  1829. /*************************************************************
  1830. Description: //字符串转为float
  1831. Input: //卡链接handle
  1832. Output: //
  1833. Return: //错误码
  1834. *************************************************************/
  1835. //int32 __stdcall ZAux_TransStringtoFloat(const char* pstringin, int inumes, float* pfvlaue);
  1836. [DllImport("zauxdll.dll", EntryPoint = "ZAux_TransStringtoFloat", CharSet = CharSet.Ansi, CallingConvention = CallingConvention.StdCall)]
  1837. public static extern Int32 ZAux_TransStringtoFloat(string pstringin, int inumes, ref float pfvlaue);
  1838. /*************************************************************
  1839. Description: //字符串转为int
  1840. Input: //卡链接handle
  1841. Output: //
  1842. Return: //错误码
  1843. *************************************************************/
  1844. //int32 __stdcall ZAux_TransStringtoInt(const char* pstringin, int inumes, int* pivlaue);
  1845. [DllImport("zauxdll.dll", EntryPoint = "ZAux_TransStringtoInt", CharSet = CharSet.Ansi, CallingConvention = CallingConvention.StdCall)]
  1846. public static extern Int32 ZAux_TransStringtoInt(string pstringin, int inumes, ref int pivlaue);
  1847. //
  1848. /*************************************************************
  1849. Description: //把卡的handle 与 卡号关联起来, 这样后面就可以直接用卡号来操作了
  1850. Input: //卡链接handle
  1851. Output: //
  1852. Return: //错误码
  1853. *************************************************************/
  1854. //int32 __stdcall ZAux_Spec_Init();
  1855. [DllImport("zauxdll.dll", EntryPoint = "ZAux_Spec_Init", CharSet = CharSet.Ansi, CallingConvention = CallingConvention.StdCall)]
  1856. public static extern Int32 ZAux_Spec_Init();
  1857. /*************************************************************
  1858. Description: //把卡的handle 与 卡号关联起来, 这样后面就可以直接用卡号来操作了
  1859. Input: //卡链接handle
  1860. Output: //
  1861. Return: //错误码
  1862. *************************************************************/
  1863. //int32 __stdcall ZAux_Spec_SetCardHandle(WORD card, ZMC_HANDLE handle);
  1864. [DllImport("zauxdll.dll", EntryPoint = "ZAux_Spec_SetCardHandle", CharSet = CharSet.Ansi, CallingConvention = CallingConvention.StdCall)]
  1865. public static extern Int32 ZAux_Spec_SetCardHandle(UInt16 card, IntPtr handle);
  1866. /*************************************************************
  1867. Description: //把卡的handle 与 卡号关联起来, 这样后面就可以直接用卡号来操作了
  1868. Input: //卡号
  1869. Output: //
  1870. Return: //错误码
  1871. *************************************************************/
  1872. //int32 __stdcall ZAux_Spec_UnSetCardHandle(WORD card);
  1873. [DllImport("zauxdll.dll", EntryPoint = "ZAux_Spec_UnSetCardHandle", CharSet = CharSet.Ansi, CallingConvention = CallingConvention.StdCall)]
  1874. public static extern Int32 ZAux_Spec_UnSetCardHandle(UInt16 card);
  1875. /*************************************************************
  1876. Description: //单轴点位运动
  1877. Input: //卡号
  1878. Output: //
  1879. Return: //错误码
  1880. *************************************************************/
  1881. //int32 __stdcall ZAux_Spec_GetTotalAxises(WORD card);
  1882. [DllImport("zauxdll.dll", EntryPoint = "ZAux_Spec_GetTotalAxises", CharSet = CharSet.Ansi, CallingConvention = CallingConvention.StdCall)]
  1883. public static extern Int32 ZAux_Spec_GetTotalAxises(UInt16 card);
  1884. /*************************************************************
  1885. Description: // 设置轨迹的运动参数
  1886. Input: //卡号
  1887. Output: //
  1888. Return: //错误码
  1889. *************************************************************/
  1890. //int32 __stdcall ZAux_Spec_SetVectProfile(WORD card, double spara, int32 speed, int32 acc, int32 dec );
  1891. [DllImport("zauxdll.dll", EntryPoint = "ZAux_Spec_SetVectProfile", CharSet = CharSet.Ansi, CallingConvention = CallingConvention.StdCall)]
  1892. public static extern Int32 ZAux_Spec_SetVectProfile(UInt16 card,double spara, Int32 speed, Int32 acc, Int32 dec );
  1893. /*************************************************************
  1894. Description: // 设置单轴的运动参数
  1895. Input: //卡号
  1896. Output: //
  1897. Return: //错误码
  1898. *************************************************************/
  1899. //int32 __stdcall ZAux_Spec_SetProfile(WORD card, int iaxis, int32 speed, int32 acc, int32 dec);
  1900. [DllImport("zauxdll.dll", EntryPoint = "ZAux_Spec_SetProfile", CharSet = CharSet.Ansi, CallingConvention = CallingConvention.StdCall)]
  1901. public static extern Int32 ZAux_Spec_SetProfile(UInt16 card,int iaxis, Int32 speed, Int32 acc, Int32 dec);
  1902. /*************************************************************
  1903. Description: // 读取坐标
  1904. Input: //卡号
  1905. Output: //
  1906. Return: //错误码
  1907. *************************************************************/
  1908. //int32 __stdcall ZAux_Spec_SetSProfile(WORD card, int iaxis, double spara);
  1909. [DllImport("zauxdll.dll", EntryPoint = "ZAux_Spec_SetSProfile", CharSet = CharSet.Ansi, CallingConvention = CallingConvention.StdCall)]
  1910. public static extern Int32 ZAux_Spec_SetSProfile(UInt16 card,int iaxis, double spara);
  1911. /*************************************************************
  1912. Description: //单轴点位运动
  1913. Input: //卡号
  1914. Output: //
  1915. Return: //错误码
  1916. *************************************************************/
  1917. //int32 __stdcall ZAux_Spec_PMove(WORD card, int iaxis, int Length);
  1918. [DllImport("zauxdll.dll", EntryPoint = "ZAux_Spec_PMove", CharSet = CharSet.Ansi, CallingConvention = CallingConvention.StdCall)]
  1919. public static extern Int32 ZAux_Spec_PMove(UInt16 card, int iaxis, int Length);
  1920. /*************************************************************
  1921. Description: //单轴点位运动
  1922. Input: //卡号
  1923. Output: //
  1924. Return: //错误码
  1925. *************************************************************/
  1926. //int32 __stdcall ZAux_Spec_PMoveAbs(WORD card, int iaxis, int Length);
  1927. [DllImport("zauxdll.dll", EntryPoint = "ZAux_Spec_PMoveAbs", CharSet = CharSet.Ansi, CallingConvention = CallingConvention.StdCall)]
  1928. public static extern Int32 ZAux_Spec_PMoveAbs(UInt16 card, int iaxis, int Length);
  1929. /*************************************************************
  1930. Description: //PMOVE时动态调整位置
  1931. Input: //卡号
  1932. Output: //
  1933. Return: //错误码
  1934. *************************************************************/
  1935. //int32 __stdcall ZAux_Spec_ResetTargetPostion(WORD card, int iaxis, int Length);
  1936. [DllImport("zauxdll.dll", EntryPoint = "ZAux_Spec_ResetTargetPostion", CharSet = CharSet.Ansi, CallingConvention = CallingConvention.StdCall)]
  1937. public static extern Int32 ZAux_Spec_ResetTargetPostion(UInt16 card, int iaxis, int Length);
  1938. /*************************************************************
  1939. Description: //SP指定速度的运动
  1940. Input: //卡号 dir 1- 正向, 2-负向
  1941. Output: //
  1942. Return: //错误码
  1943. *************************************************************/
  1944. //int32 __stdcall ZAux_Spec_VMove(WORD card, int iaxis, int dir);
  1945. [DllImport("zauxdll.dll", EntryPoint = "ZAux_Spec_VMove", CharSet = CharSet.Ansi, CallingConvention = CallingConvention.StdCall)]
  1946. public static extern Int32 ZAux_Spec_VMove(UInt16 card,int iaxis, int dir);
  1947. /*************************************************************
  1948. Description: // 脉冲模式设置
  1949. Input: //卡号
  1950. Output: //
  1951. Return: //错误码
  1952. *************************************************************/
  1953. //int32 __stdcall ZAux_Spec_SetPulOutMode(WORD card, int iaxis, int iset);
  1954. [DllImport("zauxdll.dll", EntryPoint = "ZAux_Spec_SetPulOutMode", CharSet = CharSet.Ansi, CallingConvention = CallingConvention.StdCall)]
  1955. public static extern Int32 ZAux_Spec_SetPulOutMode(UInt16 card,int iaxis, int iset);
  1956. /*************************************************************
  1957. Description: // 编码器模式设置,这个对应到不同的ATYPE,无法映射
  1958. Input: //卡号
  1959. Output: //
  1960. Return: //错误码
  1961. *************************************************************/
  1962. //int32 __stdcall ZAux_Spec_SetCounterMode(WORD card, int iaxis, int iset);
  1963. [DllImport("zauxdll.dll", EntryPoint = "ZAux_Spec_SetCounterMode", CharSet = CharSet.Ansi, CallingConvention = CallingConvention.StdCall)]
  1964. public static extern Int32 ZAux_Spec_SetCounterMode(UInt16 card,int iaxis, int iset);
  1965. /*************************************************************
  1966. Description: // 手轮, 用编码器来模拟
  1967. Input: //卡号 AB类型还是 脉冲方向 类型
  1968. 这里只配置ATYPE, 当使用扩展轴时,ATYPE类型不一样.
  1969. Output: //
  1970. Return: //错误码
  1971. *************************************************************/
  1972. //int32 __stdcall ZAux_Spec_SetHandle(WORD card, int iaxiscoder, int ifabmode);
  1973. [DllImport("zauxdll.dll", EntryPoint = "ZAux_Spec_SetHandle", CharSet = CharSet.Ansi, CallingConvention = CallingConvention.StdCall)]
  1974. public static extern Int32 ZAux_Spec_SetHandle(UInt16 card, int iaxiscoder, int ifabmode);
  1975. /*************************************************************
  1976. Description: // 手轮, 用编码器来模拟
  1977. Input: //卡号 必须先配置手轮的轴
  1978. Output: //
  1979. Return: //错误码
  1980. *************************************************************/
  1981. //int32 __stdcall ZAux_Spec_HandMove(WORD card, int iaxis, float fratio);
  1982. [DllImport("zauxdll.dll", EntryPoint = "ZAux_Spec_HandMove", CharSet = CharSet.Ansi, CallingConvention = CallingConvention.StdCall)]
  1983. public static extern Int32 ZAux_Spec_HandMove(UInt16 card,int iaxis, float fratio);
  1984. /*************************************************************
  1985. Description: // 减速停止, 立即停止时,把FASTDEC设置很大的值,再调用减速停止
  1986. Output: //
  1987. Return: //错误码
  1988. *************************************************************/
  1989. //int32 __stdcall ZAux_Spec_DeclStop(WORD card, int iaxis);
  1990. [DllImport("zauxdll.dll", EntryPoint = "ZAux_Spec_DeclStop", CharSet = CharSet.Ansi, CallingConvention = CallingConvention.StdCall)]
  1991. public static extern Int32 ZAux_Spec_DeclStop(UInt16 card,int iaxis);
  1992. /*************************************************************
  1993. Description: // 读取坐标
  1994. Input: //卡号
  1995. Output: //
  1996. Return: //错误码
  1997. *************************************************************/
  1998. //int32 __stdcall ZAux_Spec_GetPosition(WORD card, int iaxis);
  1999. [DllImport("zauxdll.dll", EntryPoint = "ZAux_Spec_GetPosition", CharSet = CharSet.Ansi, CallingConvention = CallingConvention.StdCall)]
  2000. public static extern Int32 ZAux_Spec_GetPosition(UInt16 card,int iaxis);
  2001. /*************************************************************
  2002. Description: // 读取坐标
  2003. Input: //卡号
  2004. Output: //
  2005. Return: //错误码
  2006. *************************************************************/
  2007. //int32 __stdcall ZAux_Spec_SetPosition(WORD card, int iaxis, int32 current_position);
  2008. [DllImport("zauxdll.dll", EntryPoint = "ZAux_Spec_SetPosition", CharSet = CharSet.Ansi, CallingConvention = CallingConvention.StdCall)]
  2009. public static extern Int32 ZAux_Spec_SetPosition(UInt16 card, int iaxis, Int32 current_position);
  2010. /*************************************************************
  2011. Description: // 读取坐标
  2012. Input: //卡号
  2013. Output: //
  2014. Return: //错误码
  2015. *************************************************************/
  2016. //int32 __stdcall ZAux_Spec_GetCurSpeed(WORD card, int iaxis);
  2017. [DllImport("zauxdll.dll", EntryPoint = "ZAux_Spec_GetCurSpeed", CharSet = CharSet.Ansi, CallingConvention = CallingConvention.StdCall)]
  2018. public static extern Int32 ZAux_Spec_GetCurSpeed(UInt16 card, int iaxis);
  2019. /*************************************************************
  2020. Description: // 读取坐标
  2021. Input: //卡号
  2022. Output: //
  2023. Return: //错误码
  2024. *************************************************************/
  2025. //int32 __stdcall ZAux_Spec_SetCurSpeed(WORD card, int iaxis, int32 speed);
  2026. [DllImport("zauxdll.dll", EntryPoint = "ZAux_Spec_SetCurSpeed", CharSet = CharSet.Ansi, CallingConvention = CallingConvention.StdCall)]
  2027. public static extern Int32 ZAux_Spec_SetCurSpeed(UInt16 card, int iaxis,Int32 speed);
  2028. /*************************************************************
  2029. Description: // 读取坐标
  2030. Input: //卡号
  2031. Output: //
  2032. Return: //错误码
  2033. *************************************************************/
  2034. //int32 __stdcall ZAux_Spec_ConfigHomeMode(WORD card, int iaxis, int home_dir, int velspeed, int Mode);
  2035. [DllImport("zauxdll.dll", EntryPoint = "ZAux_Spec_ConfigHomeMode", CharSet = CharSet.Ansi, CallingConvention = CallingConvention.StdCall)]
  2036. public static extern Int32 ZAux_Spec_ConfigHomeMode(UInt16 card, int iaxis, int home_dir, int velspeed, int Mode);
  2037. /*************************************************************
  2038. Description: // 读取坐标
  2039. Input: //卡号
  2040. Output: //
  2041. Return: //错误码
  2042. *************************************************************/
  2043. // int32 __stdcall ZAux_Spec_HomeMove(WORD card, int iaxis);
  2044. [DllImport("zauxdll.dll", EntryPoint = "ZAux_Spec_HomeMove", CharSet = CharSet.Ansi, CallingConvention = CallingConvention.StdCall)]
  2045. public static extern Int32 ZAux_Spec_HomeMove(UInt16 card, int iaxis);
  2046. /*************************************************************
  2047. Description: // 减速停止 插补指令, 因为涉及到多个轴,必须修改BASE轴列表
  2048. 注意连续插补的时候不要切换主轴,即BASE的第一个轴
  2049. Output: //
  2050. Return: //错误码
  2051. *************************************************************/
  2052. //int32 __stdcall ZAux_Spec_Line2(WORD card, int iaxis1, int iaxis2, int distance1, int distance2);
  2053. [DllImport("zauxdll.dll", EntryPoint = "ZAux_Spec_Line2", CharSet = CharSet.Ansi, CallingConvention = CallingConvention.StdCall)]
  2054. public static extern Int32 ZAux_Spec_Line2(UInt16 card, int iaxis1, int iaxis2, int distance1, int distance2);
  2055. /*************************************************************
  2056. Description: // 减速停止 插补指令, 因为涉及到多个轴,必须修改BASE轴列表
  2057. 注意连续插补的时候不要切换主轴,即BASE的第一个轴
  2058. Output: //
  2059. Return: //错误码
  2060. *************************************************************/
  2061. //int32 __stdcall ZAux_Spec_LineN(WORD card, int imaxaxis, int* iaxisList, int *distanceList);
  2062. [DllImport("zauxdll.dll", EntryPoint = "ZAux_Spec_LineN", CharSet = CharSet.Ansi, CallingConvention = CallingConvention.StdCall)]
  2063. public static extern Int32 ZAux_Spec_LineN(UInt16 card,int imaxaxis, int[] iaxisList, int[] distanceList);
  2064. //#if 0
  2065. //额外的函数
  2066. //合成特殊的函数
  2067. //采用卡号来操作
  2068. //#endif
  2069. /************* 每个卡的内部数据定义, ***************/
  2070. //额外的函数支持的插补个数, 一般的PCI卡只有一个
  2071. // #define MAX_VECT_AUX_SPECIAL 1
  2072. public const int MAX_VECT_AUX_SPECIAL = 1;
  2073. //typedef struct str_ZAuxCardSpecial
  2074. //{
  2075. // uint8 m_cardnum; //卡号
  2076. // ZMC_HANDLE m_handle; //句柄
  2077. //手轮的轴
  2078. //int m_iaxisHandle; // 手轮
  2079. //单轴设置
  2080. //double m_aSpeed[MAX_AXIS_AUX];
  2081. //double m_aAccel[MAX_AXIS_AUX];
  2082. //double m_aDecel[MAX_AXIS_AUX];
  2083. //double m_aSRampSet[MAX_AXIS_AUX]; // S曲线的设置
  2084. //double m_aHomeSpeed[MAX_AXIS_AUX]; // 回零的速度
  2085. //int m_aHomeDir[MAX_AXIS_AUX]; // 回零方向
  2086. //int m_aHomeMode[MAX_AXIS_AUX]; // 回零模式
  2087. //插补的设置
  2088. //double m_aVectSpeed[MAX_VECT_AUX_SPECIAL];
  2089. //double m_aVectAccel[MAX_VECT_AUX_SPECIAL];
  2090. //double m_aVectDecel[MAX_VECT_AUX_SPECIAL];
  2091. //double m_aVectSRampSet[MAX_VECT_AUX_SPECIAL]; // S曲线的设置
  2092. //
  2093. //}struct_ZAuxCardSpecial;
  2094. public struct str_ZAuxCardSpecial
  2095. {
  2096. public byte m_cardnum; //卡号
  2097. public int m_handle; //句柄
  2098. //手轮的轴
  2099. public int m_iaxisHandle; // 手轮
  2100. //单轴设置
  2101. public double[] m_aSpeed;
  2102. public double[] m_aAccel ;
  2103. public double [] m_aDecel ;
  2104. public double[] m_aSRampSet ; // S曲线的设置
  2105. public double[] m_aHomeSpeed; // 回零的速度
  2106. public int[] m_aHomeDir; // 回零方向
  2107. public int [] m_aHomeMode; // 回零模式
  2108. //插补的设置
  2109. public double[] m_aVectSpeed ;
  2110. public double[] m_aVectAccel ;
  2111. public double[] m_aVectDecel ;
  2112. public double[] m_aVectSRampSet ; // S曲线的设置
  2113. //
  2114. }
  2115. }
  2116. }