123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587158815891590159115921593159415951596159715981599160016011602160316041605160616071608160916101611161216131614161516161617161816191620162116221623162416251626162716281629163016311632163316341635163616371638163916401641164216431644164516461647164816491650165116521653165416551656165716581659166016611662166316641665166616671668166916701671167216731674167516761677167816791680168116821683168416851686168716881689169016911692169316941695169616971698169917001701170217031704170517061707170817091710171117121713171417151716171717181719172017211722172317241725172617271728172917301731173217331734173517361737173817391740174117421743174417451746174717481749175017511752175317541755175617571758175917601761176217631764176517661767176817691770177117721773177417751776177717781779178017811782178317841785178617871788178917901791179217931794179517961797179817991800180118021803180418051806180718081809181018111812181318141815181618171818181918201821182218231824182518261827182818291830183118321833183418351836183718381839184018411842184318441845184618471848184918501851185218531854185518561857185818591860186118621863186418651866186718681869187018711872187318741875187618771878187918801881188218831884188518861887188818891890189118921893189418951896189718981899190019011902190319041905190619071908190919101911191219131914191519161917191819191920192119221923192419251926192719281929193019311932193319341935193619371938193919401941194219431944194519461947194819491950195119521953195419551956195719581959196019611962196319641965196619671968196919701971197219731974197519761977197819791980198119821983198419851986198719881989199019911992199319941995199619971998199920002001200220032004200520062007200820092010201120122013201420152016201720182019202020212022202320242025202620272028202920302031203220332034203520362037203820392040204120422043204420452046204720482049205020512052205320542055205620572058205920602061206220632064206520662067206820692070207120722073207420752076207720782079208020812082208320842085208620872088208920902091209220932094209520962097209820992100210121022103210421052106210721082109211021112112211321142115211621172118211921202121212221232124212521262127212821292130213121322133213421352136213721382139214021412142214321442145214621472148214921502151215221532154215521562157215821592160216121622163216421652166216721682169217021712172217321742175217621772178217921802181218221832184218521862187218821892190219121922193219421952196219721982199220022012202220322042205220622072208220922102211221222132214221522162217221822192220222122222223222422252226222722282229223022312232223322342235223622372238223922402241224222432244224522462247224822492250225122522253225422552256225722582259226022612262226322642265226622672268226922702271227222732274227522762277227822792280228122822283228422852286228722882289229022912292229322942295229622972298229923002301230223032304230523062307230823092310231123122313231423152316231723182319232023212322232323242325232623272328232923302331233223332334233523362337233823392340234123422343234423452346234723482349235023512352235323542355235623572358235923602361236223632364236523662367236823692370237123722373237423752376237723782379238023812382238323842385238623872388238923902391239223932394239523962397239823992400240124022403240424052406240724082409241024112412241324142415241624172418241924202421242224232424242524262427242824292430243124322433243424352436243724382439244024412442244324442445244624472448244924502451245224532454245524562457245824592460246124622463246424652466246724682469247024712472247324742475247624772478247924802481248224832484248524862487248824892490249124922493249424952496249724982499250025012502250325042505250625072508250925102511251225132514251525162517251825192520252125222523252425252526252725282529253025312532253325342535253625372538253925402541254225432544254525462547254825492550255125522553255425552556255725582559256025612562256325642565256625672568256925702571257225732574257525762577257825792580258125822583258425852586258725882589259025912592259325942595259625972598259926002601260226032604260526062607260826092610261126122613261426152616261726182619262026212622262326242625262626272628262926302631263226332634263526362637263826392640264126422643264426452646264726482649265026512652265326542655265626572658265926602661266226632664266526662667266826692670267126722673267426752676267726782679268026812682268326842685268626872688268926902691269226932694269526962697269826992700270127022703270427052706270727082709271027112712271327142715271627172718271927202721272227232724272527262727272827292730273127322733273427352736273727382739274027412742 |
- using System;
- using System.Collections.Generic;
- using System.Text;
- using System.Runtime.InteropServices;
- namespace StageController.HDS
- {
- public class zmcaux
- {
- //ZAUX支持的最大轴数宏
- //#define MAX_AXIS_AUX 32
- //#define MAX_CARD_AUX 16
- public const int MAX_AXIS_AUX = 32;
- public const int MAX_CARD_AUX = 16;
-
- /*********************************************************
- 数据类型定义
- **********************************************************/
- //typedef unsigned __int64 uint64;
- //typedef __int64 int64;
- //#define BYTE INT8U
- //#define WORD INT16U
- //#define DWORD INT32U
- //typedef unsigned char BYTE;
- //typedef unsigned short WORD;
- //typedef unsigned int DWORD;
- //#define __stdcall
- //typedef unsigned char uint8; /* defined for unsigned 8-bits integer variable 无符号8位整型变量 */
- //typedef signed char int8; /* defined for signed 8-bits integer variable 有符号8位整型变量 */
- ///typedef unsigned short uint16; /* defined for unsigned 16-bits integer variable 无符号16位整型变量 */
- //typedef signed short int16; /* defined for signed 16-bits integer variable 有符号16位整型变量 */
- //typedef unsigned int uint32; /* defined for unsigned 32-bits integer variable 无符号32位整型变量 */
- //typedef signed int int32; /* defined for signed 32-bits integer variable 有符号32位整型变量 */
- //typedef float fp32; /* single precision floating point variable (32bits) 单精度浮点数(32位长度) */
- //typedef double fp64; /* double precision floating point variable (64bits) 双精度浮点数(64位长度) */
- //typedef unsigned int uint; /* defined for unsigned 32-bits integer variable 无符号32位整型变量 */
- /************************************************/
- //错误码
- /************************************************/
- //#define ERR_OK 0
- //#define ERROR_OK 0
- //#define ERR_SUCCESS 0
- //#define ERR_AUX_OFFSET 30000
- //#define ERR_NOACK ERR_AUX_OFFSET //无应答
- //#define ERR_ACKERROR (ERR_AUX_OFFSET+1) //应答错误
- //#define ERR_AUX_PARAERR (ERR_AUX_OFFSET+2) //参数错误
- //#define ERR_AUX_NOTSUPPORT (ERR_AUX_OFFSET+3) //参数错误
- public const int ERR_OK = 0;
- public const int ERROR_OK = 0;
- public const int ERR_SUCCESS = 0;
- public const int ERR_AUX_OFFSET = 30000;
- public const int ERR_NOACK = ERR_AUX_OFFSET;
- public const int ERR_ACKERROR = (ERR_AUX_OFFSET+1);
- public const int ERR_AUX_PARAERR = (ERR_AUX_OFFSET+2);
- public const int ERR_AUX_NOTSUPPORT = (ERR_AUX_OFFSET+3);
-
- /*********************************************************
- 函数声明
- **********************************************************/
- /*************************************************************
- Description: //BASE指令调用
- 仅仅修改在线命令的BASE列表,不对控制器的运行任务的BASE进行修改.
- 修改后,后续的所有MOVE等指令都是以这个BASE为基础
- Input: //卡链接handle
- Output: //
- Return: //错误码
- *************************************************************/
- //int32 __stdcall ZAux_Base(ZMC_HANDLE handle, int imaxaxises, int *piAxislist);
- [DllImport("zauxdll.dll", EntryPoint = "ZAux_Base", CharSet = CharSet.Ansi, CallingConvention = CallingConvention.StdCall)]
- public static extern Int32 ZAux_Base(IntPtr handle, int imaxaxises, int[] piAxislist);
- /*************************************************************
- Description: //定义DPOS
- Input: //卡链接handle
- Output: //
- Return: //错误码
- *************************************************************/
- // int32 __stdcall ZAux_Defpos(ZMC_HANDLE handle, int imaxaxises, float *pfDposlist);
- [DllImport("zauxdll.dll", EntryPoint = "ZAux_Defpos", CharSet = CharSet.Ansi, CallingConvention = CallingConvention.StdCall)]
- public static extern Int32 ZAux_Defpos(IntPtr handle, int imaxaxises, float[] pfDposlist);
- /*************************************************************
- Description: //相对插补
- Input: //卡链接handle
- Output: //
- Return: //错误码
- *************************************************************/
- //int32 __stdcall ZAux_Move(ZMC_HANDLE handle, int imaxaxises, float *pfDisancelist);
- [DllImport("zauxdll.dll", EntryPoint = "ZAux_Move", CharSet = CharSet.Ansi, CallingConvention = CallingConvention.StdCall)]
- public static extern Int32 ZAux_Move(IntPtr handle, int imaxaxises, float[] pfDisancelist);
- /*************************************************************
- Description: //相对插补
- Input: //卡链接handle
- Output: //
- Return: //错误码
- *************************************************************/
- //int32 __stdcall ZAux_MoveSp(ZMC_HANDLE handle, int imaxaxises, float *pfDisancelist);
- [DllImport("zauxdll.dll", EntryPoint = "ZAux_MoveSp", CharSet = CharSet.Ansi, CallingConvention = CallingConvention.StdCall)]
- public static extern Int32 ZAux_MoveSp(IntPtr handle, int imaxaxises, float[] pfDisancelist);
- /*************************************************************
- Description: //插补
- Input: //卡链接handle
- Output: //
- Return: //错误码
- *************************************************************/
- //int32 __stdcall ZAux_MoveAbs(ZMC_HANDLE handle, int imaxaxises, float *pfDisancelist);
- [DllImport("zauxdll.dll", EntryPoint = "ZAux_MoveAbs", CharSet = CharSet.Ansi, CallingConvention = CallingConvention.StdCall)]
- public static extern Int32 ZAux_MoveAbs(IntPtr handle, int imaxaxises, float[] pfDisancelist);
- /*************************************************************
- Description: //插补
- Input: //卡链接handle
- Output: //
- Return: //错误码
- *************************************************************/
- //int32 __stdcall ZAux_MoveAbsSp(ZMC_HANDLE handle, int imaxaxises, float *pfDisancelist);
- [DllImport("zauxdll.dll", EntryPoint = "ZAux_MoveAbsSp", CharSet = CharSet.Ansi, CallingConvention = CallingConvention.StdCall)]
- public static extern Int32 ZAux_MoveAbsSp(IntPtr handle, int imaxaxises, float[] pfDisancelist);
- /*************************************************************
- Description: //插补
- Input: //卡链接handle
- Output: //
- Return: //错误码
- *************************************************************/
- //int32 __stdcall ZAux_MoveModify(ZMC_HANDLE handle, int imaxaxises, float *pfDisancelist);
- [DllImport("zauxdll.dll", EntryPoint = "ZAux_MoveModify", CharSet = CharSet.Ansi, CallingConvention = CallingConvention.StdCall)]
- public static extern Int32 ZAux_MoveModify(IntPtr handle, int imaxaxises, float[] pfDisancelist);
- /*************************************************************
- Description: //插补
- Input: //卡链接handle
- end1 第一个轴运动坐标
- end2 第二个轴运动坐标
- centre1 第一个轴运动圆心,相对与起始点。
- centre2 第二个轴运动圆心,相对与起始点。
- direction 0-逆时针,1-顺时针
- Output: //
- Return: //错误码
- *************************************************************/
- //int32 __stdcall ZAux_MoveCirc(ZMC_HANDLE handle, float fend1, float fend2, float fcenter1, float fcenter2, int idirection);
- [DllImport("zauxdll.dll", EntryPoint = "ZAux_MoveCirc", CharSet = CharSet.Ansi, CallingConvention = CallingConvention.StdCall)]
- public static extern Int32 ZAux_MoveCirc(IntPtr handle, float fend1, float fend2, float fcenter1, float fcenter2, int idirection);
- /*************************************************************
- Description: //插补
- Input: //卡链接handle
- end1 第一个轴运动坐标
- end2 第二个轴运动坐标
- centre1 第一个轴运动圆心,相对与起始点。
- centre2 第二个轴运动圆心,相对与起始点。
- direction 0-逆时针,1-顺时针
- Output: //
- Return: //错误码
- *************************************************************/
- //int32 __stdcall ZAux_MoveCircSp(ZMC_HANDLE handle, float fend1, float fend2, float fcenter1, float fcenter2, int idirection);
- [DllImport("zauxdll.dll", EntryPoint = "ZAux_MoveCircSp", CharSet = CharSet.Ansi, CallingConvention = CallingConvention.StdCall)]
- public static extern Int32 ZAux_MoveCircSp(IntPtr handle, float fend1, float fend2, float fcenter1, float fcenter2, int idirection);
- /*************************************************************
- Description: //插补
- Input: //卡链接handle
- end1 第一个轴运动坐标,绝对位置
- end2 第二个轴运动坐标,绝对位置
- centre1 第一个轴运动圆心,绝对位置
- centre2 第二个轴运动圆心,绝对位置
- direction 0-逆时针,1-顺时针
- Output: //
- Return: //错误码
- *************************************************************/
- //int32 __stdcall ZAux_MoveCircAbs(ZMC_HANDLE handle, float fend1, float fend2, float fcenter1, float fcenter2, int idirection);
- [DllImport("zauxdll.dll", EntryPoint = "ZAux_MoveCircAbs", CharSet = CharSet.Ansi, CallingConvention = CallingConvention.StdCall)]
- public static extern Int32 ZAux_MoveCircAbs(IntPtr handle, float fend1, float fend2, float fcenter1, float fcenter2, int idirection);
- /*************************************************************
- Description: //插补
- Input: //卡链接handle
- end1 第一个轴运动坐标,绝对位置
- end2 第二个轴运动坐标,绝对位置
- centre1 第一个轴运动圆心,绝对位置
- centre2 第二个轴运动圆心,绝对位置
- direction 0-逆时针,1-顺时针
- Output: //
- Return: //错误码
- *************************************************************/
- //int32 __stdcall ZAux_MoveCircAbsSp(ZMC_HANDLE handle, float fend1, float fend2, float fcenter1, float fcenter2, int idirection);
- [DllImport("zauxdll.dll", EntryPoint = "ZAux_MoveCircAbsSp", CharSet = CharSet.Ansi, CallingConvention = CallingConvention.StdCall)]
- public static extern Int32 ZAux_MoveCircAbsSp(IntPtr handle, float fend1, float fend2, float fcenter1, float fcenter2, int idirection);
- /*************************************************************
- Description: //插补
- Input: //卡链接handle
- mid1 第一个轴中间点,相对起始点距离
- mid2 第二个轴中间点,相对起始点距离
- end1 第一个轴结束点,相对起始点距离
- end2 第二个轴结束点,相对起始点距离
- Output: //
- Return: //错误码
- *************************************************************/
- //int32 __stdcall ZAux_MoveCirc2(ZMC_HANDLE handle, float fmid1, float fmid2, float fend1, float fend2);
- [DllImport("zauxdll.dll", EntryPoint = "ZAux_MoveCirc2", CharSet = CharSet.Ansi, CallingConvention = CallingConvention.StdCall)]
- public static extern Int32 ZAux_MoveCirc2(IntPtr handle,float fmid1, float fmid2, float fend1, float fend2);
- /*************************************************************
- Description: //插补
- Input: //卡链接handle
- mid1 第一个轴中间点,相对起始点距离
- mid2 第二个轴中间点,相对起始点距离
- end1 第一个轴结束点,相对起始点距离
- end2 第二个轴结束点,相对起始点距离
- Output: //
- Return: //错误码
- *************************************************************/
- //int32 __stdcall ZAux_MoveCirc2Sp(ZMC_HANDLE handle, float fmid1, float fmid2, float fend1, float fend2);
- [DllImport("zauxdll.dll", EntryPoint = "ZAux_MoveCirc2Sp", CharSet = CharSet.Ansi, CallingConvention = CallingConvention.StdCall)]
- public static extern Int32 ZAux_MoveCirc2Sp(IntPtr handle,float fmid1, float fmid2, float fend1, float fend2);
- /*************************************************************
- Description: //插补
- Input: //卡链接handle
- mid1 第一个轴中间点,绝对位置
- mid2 第二个轴中间点,绝对位置
- end1 第一个轴结束点,绝对位置
- end2 第二个轴结束点,绝对位置
- Output: //
- Return: //错误码
- *************************************************************/
- //int32 __stdcall ZAux_MoveCirc2AbsSp(ZMC_HANDLE handle, float fmid1, float fmid2, float fend1, float fend2);
- [DllImport("zauxdll.dll", EntryPoint = "ZAux_MoveCirc2AbsSp", CharSet = CharSet.Ansi, CallingConvention = CallingConvention.StdCall)]
- public static extern Int32 ZAux_MoveCirc2AbsSp(IntPtr handle,float fmid1, float fmid2, float fend1, float fend2);
- /*************************************************************
- Description: //插补
- Input: //卡链接handle
- mid1 第一个轴中间点,绝对位置
- mid2 第二个轴中间点,绝对位置
- end1 第一个轴结束点,绝对位置
- end2 第二个轴结束点,绝对位置
- Output: //
- Return: //错误码
- *************************************************************/
- //int32 __stdcall ZAux_MoveCirc2Abs(ZMC_HANDLE handle, float fmid1, float fmid2, float fend1, float fend2);
- [DllImport("zauxdll.dll", EntryPoint = "ZAux_MoveCirc2Abs", CharSet = CharSet.Ansi, CallingConvention = CallingConvention.StdCall)]
- public static extern Int32 ZAux_MoveCirc2Abs(IntPtr handle,float fmid1, float fmid2, float fend1, float fend2);
- /*************************************************************
- Description: //插补
- Input: //卡链接handle
- end1 第一个轴运动坐标
- end2 第二个轴运动坐标
- centre1 第一个轴运动圆心,相对与起始点
- centre2 第二个轴运动圆心,相对与起始点
- direction 0-逆时针,1-顺时针
- distance3第三个轴运动距离。
- mode 第三轴的速度计算:
- 0(缺省)
- 第三轴参与速度计算。
- 1
- 第三轴不参与速度计算。
-
- Output: //
- Return: //错误码
- *************************************************************/
- //int32 __stdcall ZAux_MHelical(ZMC_HANDLE handle, float fend1, float fend2, float fcenter1, float fcenter2, int idirection, float fDistance3, int imode);
- [DllImport("zauxdll.dll", EntryPoint = "ZAux_MHelical", CharSet = CharSet.Ansi, CallingConvention = CallingConvention.StdCall)]
- public static extern Int32 ZAux_MHelical(IntPtr handle,float fend1, float fend2, float fcenter1, float fcenter2, int idirection, float fDistance3, int imode);
- /*************************************************************
- Description: //插补
- Input: //卡链接handle
- end1 第一个轴运动坐标
- end2 第二个轴运动坐标
- centre1 第一个轴运动圆心,相对与起始点
- centre2 第二个轴运动圆心,相对与起始点
- direction 0-逆时针,1-顺时针
- distance3第三个轴运动距离。
- mode 第三轴的速度计算:
- 0(缺省)
- 第三轴参与速度计算。
- 1
- 第三轴不参与速度计算。
-
- Output: //
- Return: //错误码
- *************************************************************/
- //int32 __stdcall ZAux_MHelicalAbs(ZMC_HANDLE handle, float fend1, float fend2, float fcenter1, float fcenter2, int idirection, float fDistance3, int imode);
- [DllImport("zauxdll.dll", EntryPoint = "ZAux_MHelicalAbs", CharSet = CharSet.Ansi, CallingConvention = CallingConvention.StdCall)]
- public static extern Int32 ZAux_MHelicalAbs(IntPtr handle,float fend1, float fend2, float fcenter1, float fcenter2, int idirection, float fDistance3, int imode);
- /*************************************************************
- Description: //插补
- Input: //卡链接handle
- end1 第一个轴运动坐标
- end2 第二个轴运动坐标
- centre1 第一个轴运动圆心,相对与起始点
- centre2 第二个轴运动圆心,相对与起始点
- direction 0-逆时针,1-顺时针
- distance3第三个轴运动距离。
- mode 第三轴的速度计算:
- 0(缺省)
- 第三轴参与速度计算。
- 1
- 第三轴不参与速度计算。
-
- Output: //
- Return: //错误码
- *************************************************************/
- //int32 __stdcall ZAux_MHelicalSp(ZMC_HANDLE handle, float fend1, float fend2, float fcenter1, float fcenter2, int idirection, float fDistance3, int imode);
- [DllImport("zauxdll.dll", EntryPoint = "ZAux_MHelicalSp", CharSet = CharSet.Ansi, CallingConvention = CallingConvention.StdCall)]
- public static extern Int32 ZAux_MHelicalSp(IntPtr handle,float fend1, float fend2, float fcenter1, float fcenter2, int idirection, float fDistance3, int imode);
- /*************************************************************
- Description: //插补
- Input: //卡链接handle
- end1 第一个轴运动坐标
- end2 第二个轴运动坐标
- centre1 第一个轴运动圆心,相对与起始点
- centre2 第二个轴运动圆心,相对与起始点
- direction 0-逆时针,1-顺时针
- distance3第三个轴运动距离。
- mode 第三轴的速度计算:
- 0(缺省)
- 第三轴参与速度计算。
- 1
- 第三轴不参与速度计算。
-
- Output: //
- Return: //错误码
- *************************************************************/
- //int32 __stdcall ZAux_MHelicalAbsSp(ZMC_HANDLE handle, float fend1, float fend2, float fcenter1, float fcenter2, int idirection, float fDistance3, int imode);
- [DllImport("zauxdll.dll", EntryPoint = "ZAux_MHelicalAbsSp", CharSet = CharSet.Ansi, CallingConvention = CallingConvention.StdCall)]
- public static extern Int32 ZAux_MHelicalAbsSp(IntPtr handle,float fend1, float fend2, float fcenter1, float fcenter2, int idirection, float fDistance3, int imode);
- /*************************************************************
- Description: //插补
- Input: //卡链接handle
- mid1 第一个轴中间点
- mid2 第二个轴中间点
- end1 第一个轴结束点
- end2 第二个轴结束点
- distance3第三个轴运动距离
- mode 第三轴的速度计算:
- Output: //
- Return: //错误码
- *************************************************************/
- //int32 __stdcall ZAux_MHelical2(ZMC_HANDLE handle, float fmid1, float fmid2, float fend1, float fend2, float fDistance3, int imode);
- [DllImport("zauxdll.dll", EntryPoint = "ZAux_MHelical2", CharSet = CharSet.Ansi, CallingConvention = CallingConvention.StdCall)]
- public static extern Int32 ZAux_MHelical2(IntPtr handle,float fmid1, float fmid2, float fend1, float fend2, float fDistance3, int imode);
- /*************************************************************
- Description: //插补
- Input: //卡链接handle
- mid1 第一个轴中间点
- mid2 第二个轴中间点
- end1 第一个轴结束点
- end2 第二个轴结束点
- distance3 第三个轴运动结束点
- mode 第三轴的速度计算:
- Output: //
- Return: //错误码
- *************************************************************/
- //int32 __stdcall ZAux_MHelical2Abs(ZMC_HANDLE handle, float fmid1, float fmid2, float fend1, float fend2, float fDistance3, int imode);
- [DllImport("zauxdll.dll", EntryPoint = "ZAux_MHelical2Abs", CharSet = CharSet.Ansi, CallingConvention = CallingConvention.StdCall)]
- public static extern Int32 ZAux_MHelical2Abs(IntPtr handle,float fmid1, float fmid2, float fend1, float fend2, float fDistance3, int imode);
- /*************************************************************
- Description: //插补
- Input: //卡链接handle
- mid1 第一个轴中间点
- mid2 第二个轴中间点
- end1 第一个轴结束点
- end2 第二个轴结束点
- distance3第三个轴运动距离
- mode 第三轴的速度计算:
- Output: //
- Return: //错误码
- *************************************************************/
- //int32 __stdcall ZAux_MHelical2Sp(ZMC_HANDLE handle, float fmid1, float fmid2, float fend1, float fend2, float fDistance3, int imode);
- [DllImport("zauxdll.dll", EntryPoint = "ZAux_MHelical2Sp", CharSet = CharSet.Ansi, CallingConvention = CallingConvention.StdCall)]
- public static extern Int32 ZAux_MHelical2Sp(IntPtr handle,float fmid1, float fmid2, float fend1, float fend2, float fDistance3, int imode);
- /*************************************************************
- Description: //插补
- Input: //卡链接handle
- mid1 第一个轴中间点
- mid2 第二个轴中间点
- end1 第一个轴结束点
- end2 第二个轴结束点
- distance3 第三个轴运动结束点
- mode 第三轴的速度计算:
- Output: //
- Return: //错误码
- *************************************************************/
- //int32 __stdcall ZAux_MHelical2AbsSp(ZMC_HANDLE handle, float fmid1, float fmid2, float fend1, float fend2, float fDistance3, int imode);
- [DllImport("zauxdll.dll", EntryPoint = "ZAux_MHelical2AbsSp", CharSet = CharSet.Ansi, CallingConvention = CallingConvention.StdCall)]
- public static extern Int32 ZAux_MHelical2AbsSp(IntPtr handle,float fmid1, float fmid2, float fend1, float fend2, float fDistance3, int imode);
- /*************************************************************
- Description: //插补
- Input: //卡链接handle
- Output: //
- Return: //错误码
- *************************************************************/
- //int32 __stdcall ZAux_MEclipse(ZMC_HANDLE handle, float fend1, float fend2, float fcenter1, float fcenter2, int idirection, float fADis, float fBDis);
- [DllImport("zauxdll.dll", EntryPoint = "ZAux_MEclipse", CharSet = CharSet.Ansi, CallingConvention = CallingConvention.StdCall)]
- public static extern Int32 ZAux_MEclipse(IntPtr handle,float fend1, float fend2, float fcenter1, float fcenter2, int idirection, float fADis, float fBDis);
- /*************************************************************
- Description: //插补
- Input: //卡链接handle
- Output: //
- Return: //错误码
- *************************************************************/
- //int32 __stdcall ZAux_MEclipseAbs(ZMC_HANDLE handle, float fend1, float fend2, float fcenter1, float fcenter2, int idirection, float fADis, float fBDis);
- [DllImport("zauxdll.dll", EntryPoint = "ZAux_MEclipseAbs", CharSet = CharSet.Ansi, CallingConvention = CallingConvention.StdCall)]
- public static extern Int32 ZAux_MEclipseAbs(IntPtr handle,float fend1, float fend2, float fcenter1, float fcenter2, int idirection, float fADis, float fBDis);
- /*************************************************************
- Description: //插补
- Input: //卡链接handle
- Output: //
- Return: //错误码
- *************************************************************/
- //int32 __stdcall ZAux_MEclipseSp(ZMC_HANDLE handle, float fend1, float fend2, float fcenter1, float fcenter2, int idirection, float fADis, float fBDis);
- [DllImport("zauxdll.dll", EntryPoint = "ZAux_MEclipseSp", CharSet = CharSet.Ansi, CallingConvention = CallingConvention.StdCall)]
- public static extern Int32 ZAux_MEclipseSp(IntPtr handle, float fend1, float fend2, float fcenter1, float fcenter2, int idirection, float fADis, float fBDis);
- /*************************************************************
- Description: //插补
- Input: //卡链接handle
- Output: //
- Return: //错误码
- *************************************************************/
- //int32 __stdcall ZAux_MEclipseAbsSp(ZMC_HANDLE handle, float fend1, float fend2, float fcenter1, float fcenter2, int idirection, float fADis, float fBDis);
- [DllImport("zauxdll.dll", EntryPoint = "ZAux_MEclipseAbsSp", CharSet = CharSet.Ansi, CallingConvention = CallingConvention.StdCall)]
- public static extern Int32 ZAux_MEclipseAbsSp(IntPtr handle,float fend1, float fend2, float fcenter1, float fcenter2, int idirection, float fADis, float fBDis);
- /*************************************************************
- Description: //插补 椭圆 + 螺旋
- Input: //卡链接handle
- Output: //
- Return: //错误码
- *************************************************************/
- //int32 __stdcall ZAux_MEclipseHelical(ZMC_HANDLE handle, float fend1, float fend2, float fcenter1, float fcenter2, int idirection, float fADis, float fBDis, float fDistance3);
- [DllImport("zauxdll.dll", EntryPoint = "ZAux_MEclipseHelical", CharSet = CharSet.Ansi, CallingConvention = CallingConvention.StdCall)]
- public static extern Int32 ZAux_MEclipseHelical(IntPtr handle,float fend1, float fend2, float fcenter1, float fcenter2, int idirection, float fADis, float fBDis, float fDistance3);
- /*************************************************************
- Description: //插补 椭圆 + 螺旋
- Input: //卡链接handle
- Output: //
- Return: //错误码
- *************************************************************/
- //int32 __stdcall ZAux_MEclipseHelicalAbs(ZMC_HANDLE handle, float fend1, float fend2, float fcenter1, float fcenter2, int idirection, float fADis, float fBDis);
- [DllImport("zauxdll.dll", EntryPoint = "ZAux_MEclipseHelicalAbs", CharSet = CharSet.Ansi, CallingConvention = CallingConvention.StdCall)]
- public static extern Int32 ZAux_MEclipseHelicalAbs(IntPtr handle, float fend1, float fend2, float fcenter1, float fcenter2, int idirection, float fADis, float fBDis);
- /*************************************************************
- Description: //插补 椭圆 + 螺旋
- Input: //卡链接handle
- Output: //
- Return: //错误码
- *************************************************************/
- //int32 __stdcall ZAux_MEclipseHelicalSp(ZMC_HANDLE handle, float fend1, float fend2, float fcenter1, float fcenter2, int idirection, float fADis, float fBDis, float fDistance3);
- [DllImport("zauxdll.dll", EntryPoint = "ZAux_MEclipseHelicalSp", CharSet = CharSet.Ansi, CallingConvention = CallingConvention.StdCall)]
- public static extern Int32 ZAux_MEclipseHelicalSp(IntPtr handle, float fend1, float fend2, float fcenter1, float fcenter2, int idirection, float fADis, float fBDis, float fDistance3);
- /*************************************************************
- Description: //插补 椭圆 + 螺旋
- Input: //卡链接handle
- Output: //
- Return: //错误码
- *************************************************************/
- //int32 __stdcall ZAux_MEclipseHelicalAbsSp(ZMC_HANDLE handle, float fend1, float fend2, float fcenter1, float fcenter2, int idirection, float fADis, float fBDis);
- [DllImport("zauxdll.dll", EntryPoint = "ZAux_MEclipseHelicalSp", CharSet = CharSet.Ansi, CallingConvention = CallingConvention.StdCall)]
- public static extern Int32 ZAux_MEclipseHelicalSp(IntPtr handle, float fend1, float fend2, float fcenter1, float fcenter2, int idirection, float fADis, float fBDis);
- /*************************************************************
- Description: //插补 空间圆弧
- Input: //卡链接handle
- end1 第1个轴运动距离参数1
- end2 第2个轴运动距离参数1
- end3 第3个轴运动距离参数1
- centre1 第1个轴运动距离参数2
- centre2 第2个轴运动距离参数2
- centre3 第3个轴运动距离参数2
- mode 指定前面参数的意义
- 0 当前点,中间点,终点三点定圆弧,距离参数1为终点距离,距离参数2为中间点距离。
- 1 走最小的圆弧,距离参数1为终点距离,距离参数2为圆心的距离。
- 2 当前点,中间点,终点三点定圆,距离参数1为终点距离,距离参数2为中间点距离。
- 3 先走最小的圆弧,再继续走完整圆,距离参数1为终点距离,距离参数2为圆心的距离。
-
- Output: //
- Return: //错误码
- *************************************************************/
- //int32 __stdcall ZAux_MSpherical(ZMC_HANDLE handle, float fend1, float fend2, float fend3, float fcenter1, float fcenter2, float fcenter3, int imode);
- [DllImport("zauxdll.dll", EntryPoint = "ZAux_MSpherical", CharSet = CharSet.Ansi, CallingConvention = CallingConvention.StdCall)]
- public static extern Int32 ZAux_MSpherical(IntPtr handle, float fend1, float fend2, float fend3, float fcenter1, float fcenter2, float fcenter3, int imode);
- /*************************************************************
- Description: //插补 空间圆弧
- Input: //卡链接handle
- end1 第1个轴运动距离参数1
- end2 第2个轴运动距离参数1
- end3 第3个轴运动距离参数1
- centre1 第1个轴运动距离参数2
- centre2 第2个轴运动距离参数2
- centre3 第3个轴运动距离参数2
- mode 指定前面参数的意义
- 0 当前点,中间点,终点三点定圆弧,距离参数1为终点距离,距离参数2为中间点距离。
- 1 走最小的圆弧,距离参数1为终点距离,距离参数2为圆心的距离。
- 2 当前点,中间点,终点三点定圆,距离参数1为终点距离,距离参数2为中间点距离。
- 3 先走最小的圆弧,再继续走完整圆,距离参数1为终点距离,距离参数2为圆心的距离。
-
- Output: //
- Return: //错误码
- *************************************************************/
- //int32 __stdcall ZAux_MSphericalSp(ZMC_HANDLE handle, float fend1, float fend2, float fend3, float fcenter1, float fcenter2, float fcenter3, int imode);
- [DllImport("zauxdll.dll", EntryPoint = "ZAux_MSphericalSp", CharSet = CharSet.Ansi, CallingConvention = CallingConvention.StdCall)]
- public static extern Int32 ZAux_MSphericalSp(IntPtr handle, float fend1, float fend2, float fend3, float fcenter1, float fcenter2, float fcenter3, int imode);
- /*************************************************************
- Description: //运动暂停
- Input: //卡链接handle
- 0(缺省) 暂停当前运动。
- 1 在当前运动完成后正准备执行下一条运动指令时暂停。
- 2 在当前运动完成后正准备执行下一条运动指令时,并且两条指令的MARK标识不一样时暂停。这个模式可以用于一个动作由多个指令来实现时,可以在一整个动作完成后暂停。
- Output: //
- Return: //错误码
- *************************************************************/
- //int32 __stdcall ZAux_MovePause(ZMC_HANDLE handle, int imode);
- [DllImport("zauxdll.dll", EntryPoint = "ZAux_MovePause", CharSet = CharSet.Ansi, CallingConvention = CallingConvention.StdCall)]
- public static extern Int32 ZAux_MovePause(IntPtr handle, int imode);
- /*************************************************************
- Description: //运动暂停
- Input: //卡链接handle
- 0(缺省) 暂停当前运动。
- 1 在当前运动完成后正准备执行下一条运动指令时暂停。
- 2 在当前运动完成后正准备执行下一条运动指令时,并且两条指令的MARK标识不一样时暂停。这个模式可以用于一个动作由多个指令来实现时,可以在一整个动作完成后暂停。
- Output: //
- Return: //错误码
- *************************************************************/
- //int32 __stdcall ZAux_MoveResume(ZMC_HANDLE handle);
- [DllImport("zauxdll.dll", EntryPoint = "ZAux_MoveResume", CharSet = CharSet.Ansi, CallingConvention = CallingConvention.StdCall)]
- public static extern Int32 ZAux_MoveResume(IntPtr handle);
- /*************************************************************
- Description: //在运动缓冲中加入输出指令
- Input: //卡链接handle
- Output: //
- Return: //错误码
- *************************************************************/
- //int32 __stdcall ZAux_MoveOp(ZMC_HANDLE handle, int ioutnum, int ivalue);
- [DllImport("zauxdll.dll", EntryPoint = "ZAux_MoveOp", CharSet = CharSet.Ansi, CallingConvention = CallingConvention.StdCall)]
- public static extern Int32 ZAux_MoveOp(IntPtr handle, int ioutnum, int ivalue);
- /*************************************************************
- Description: //在运动缓冲中加入输出指令
- Input: //卡链接handle
- Output: //
- Return: //错误码
- *************************************************************/
- //int32 __stdcall ZAux_MoveOpMulti(ZMC_HANDLE handle, int ioutnumfirst, int ioutnumend, int ivalue);
- [DllImport("zauxdll.dll", EntryPoint = "ZAux_MoveOpMulti", CharSet = CharSet.Ansi, CallingConvention = CallingConvention.StdCall)]
- public static extern Int32 ZAux_MoveOpMulti(IntPtr handle, int ioutnum, int ivalue);
- /*************************************************************
- Description: //在运动缓冲中加入输出指令
- Input: //卡链接handle
- Output: //
- Return: //错误码
- *************************************************************/
- //int32 __stdcall ZAux_MoveOp2(ZMC_HANDLE handle, int ioutnum, int ivalue, int iofftimems);
- [DllImport("zauxdll.dll", EntryPoint = "ZAux_MoveOp2", CharSet = CharSet.Ansi, CallingConvention = CallingConvention.StdCall)]
- public static extern Int32 ZAux_MoveOp2(IntPtr handle,int ioutnum, int ivalue, int iofftimems);
- /*************************************************************
- Description: //在运动缓冲中加入延时指令
- Input: //卡链接handle
- Output: //
- Return: //错误码
- *************************************************************/
- //int32 __stdcall ZAux_MoveDelay(ZMC_HANDLE handle, int itimems);
- [DllImport("zauxdll.dll", EntryPoint = "ZAux_MoveDelay", CharSet = CharSet.Ansi, CallingConvention = CallingConvention.StdCall)]
- public static extern Int32 ZAux_MoveDelay(IntPtr handle, int itimems);
- /*************************************************************
- Description: //电子凸轮
- Input: //卡链接handle
- Output: //
- Return: //错误码
- *************************************************************/
- //int32 __stdcall ZAux_Cam(ZMC_HANDLE handle, int istartpoint, int iendpoint, float ftablemulti, float fDistance);
- [DllImport("zauxdll.dll", EntryPoint = "ZAux_Cam", CharSet = CharSet.Ansi, CallingConvention = CallingConvention.StdCall)]
- public static extern Int32 ZAux_Cam(IntPtr handle, int istartpoint, int iendpoint, float ftablemulti, float fDistance);
- /*************************************************************
- Description: //电子凸轮
- Input: //卡链接handle
- Output: //
- Return: //错误码
- *************************************************************/
- //int32 __stdcall ZAux_Cambox(ZMC_HANDLE handle, int istartpoint, int iendpoint, float ftablemulti, float fDistance, int ilinkaxis, int ioption, float flinkstartpos);
- [DllImport("zauxdll.dll", EntryPoint = "ZAux_Cambox", CharSet = CharSet.Ansi, CallingConvention = CallingConvention.StdCall)]
- public static extern Int32 ZAux_Cambox(IntPtr handle,int istartpoint, int iendpoint, float ftablemulti, float fDistance, int ilinkaxis, int ioption, float flinkstartpos);
- /*************************************************************
- Description: //连接 电子齿轮
- Input: //卡链接handle
- Output: //
- Return: //错误码
- *************************************************************/
- //int32 __stdcall ZAux_Connpath(ZMC_HANDLE handle, float fratio, int idringaxis);
- [DllImport("zauxdll.dll", EntryPoint = "ZAux_Connpath", CharSet = CharSet.Ansi, CallingConvention = CallingConvention.StdCall)]
- public static extern Int32 ZAux_Connpath(IntPtr handle, float fratio, int idringaxiss);
- /*************************************************************
- Description: //连接 电子齿轮
- Input: //卡链接handle
- Output: //
- Return: //错误码
- *************************************************************/
- //int32 __stdcall ZAux_Connect(ZMC_HANDLE handle, float fratio, int idringaxis);
- [DllImport("zauxdll.dll", EntryPoint = "ZAux_Connect", CharSet = CharSet.Ansi, CallingConvention = CallingConvention.StdCall)]
- public static extern Int32 ZAux_Connect(IntPtr handle, float fratio, int idringaxiss);
- /*************************************************************
- Description: //连接 特殊凸轮
- Input: //卡链接handle
- Output: //
- Return: //错误码
- *************************************************************/
- //int32 __stdcall ZAux_Movelink(ZMC_HANDLE handle, float fDistance, float fLinkDis, float fLinkAcc, float fLinkDec,int iLinkaxis, int ioption, float flinkstartpos);
- [DllImport("zauxdll.dll", EntryPoint = "ZAux_Movelink", CharSet = CharSet.Ansi, CallingConvention = CallingConvention.StdCall)]
- public static extern Int32 ZAux_Movelink(IntPtr handle, float fDistance, float fLinkDis, float fLinkAcc, float fLinkDec,int iLinkaxis, int ioption, float flinkstartpos);
- /*************************************************************
- Description: //位置锁存指令
- Input: //卡链接handle
- Output: //
- Return: //错误码
- *************************************************************/
- //int32 __stdcall ZAux_Regist(ZMC_HANDLE handle, int imode);
- [DllImport("zauxdll.dll", EntryPoint = "ZAux_Regist", CharSet = CharSet.Ansi, CallingConvention = CallingConvention.StdCall)]
- public static extern Int32 ZAux_Regist(IntPtr handle, int imode);
- /*************************************************************
- Description: //所有轴立即停止
- Input: //卡链接handle
- Output: //
- Return: //错误码
- *************************************************************/
- //int32 __stdcall ZAux_Rapidstop(ZMC_HANDLE handle, int imode);
- [DllImport("zauxdll.dll", EntryPoint = "ZAux_Rapidstop", CharSet = CharSet.Ansi, CallingConvention = CallingConvention.StdCall)]
- public static extern Int32 ZAux_Rapidstop(IntPtr handle, int imode);
- /*************************************************************
- Description: //SP指定速度的插补运动, 可以指定起始速度,最终速度, 运行速度
- 运动的轴是当前的BASE轴列表
- Input: //卡号
- Output: //
- Return: //错误码
- *************************************************************/
- //int32 __stdcall ZAux_LineNSp(ZMC_HANDLE handle, int imaxaxis, float *pfDisancelist, float fStartSpeed, float fEndSpeed, float fForceSpeed);
- [DllImport("zauxdll.dll", EntryPoint = "ZAux_LineNSp", CharSet = CharSet.Ansi, CallingConvention = CallingConvention.StdCall)]
- public static extern Int32 ZAux_LineNSp(IntPtr handle, int imaxaxis, float[] pfDisancelist, float fStartSpeed, float fEndSpeed, float fForceSpeed);
- // #if 0
- //单轴运动
- //#endif
- /*************************************************************
- Description: //连续运动
- Input: //卡链接handle 轴号, 方向
- Output: //
- Return: //错误码
- *************************************************************/
- //int32 __stdcall ZAux_Singl_Vmove(ZMC_HANDLE handle, int iaxis, int idir);
- [DllImport("zauxdll.dll", EntryPoint = "ZAux_Singl_Vmove", CharSet = CharSet.Ansi, CallingConvention = CallingConvention.StdCall)]
- public static extern Int32 ZAux_Singl_Vmove(IntPtr handle, int iaxis, int idir);
- /*************************************************************
- Description: //单轴运动
- Input: //卡链接handle 轴号, 距离
- Output: //
- Return: //错误码
- *************************************************************/
- //int32 __stdcall ZAux_Singl_Move(ZMC_HANDLE handle, int iaxis, float fdistance);
- [DllImport("zauxdll.dll", EntryPoint = "ZAux_Singl_Move", CharSet = CharSet.Ansi, CallingConvention = CallingConvention.StdCall)]
- public static extern Int32 ZAux_Singl_Move(IntPtr handle, int iaxis, float fdistance);
- /*************************************************************
- Description: //单轴运动
- Input: //卡链接handle 轴号, 距离
- Output: //
- Return: //错误码
- *************************************************************/
- //int32 __stdcall ZAux_Singl_MoveAbs(ZMC_HANDLE handle, int iaxis, float fditancse);
- [DllImport("zauxdll.dll", EntryPoint = "ZAux_Singl_MoveAbs", CharSet = CharSet.Ansi, CallingConvention = CallingConvention.StdCall)]
- public static extern Int32 ZAux_Singl_MoveAbs(IntPtr handle, int iaxis, float fditance);
- /*************************************************************
- Description: //单轴运动
- Input: //卡链接handle 轴号, 距离
- Output: //
- Return: //错误码
- *************************************************************/
- //int32 __stdcall ZAux_Singl_MoveModify(ZMC_HANDLE handle, int iaxis, float fdistance);
- [DllImport("zauxdll.dll", EntryPoint = "ZAux_Singl_MoveModify", CharSet = CharSet.Ansi, CallingConvention = CallingConvention.StdCall)]
- public static extern Int32 ZAux_Singl_MoveModify(IntPtr handle, int iaxis, float fditance);
- /*************************************************************
- Description: //叠加
- Input: //卡链接handle
- Output: //
- Return: //错误码
- *************************************************************/
- //int32 __stdcall ZAux_Singl_Addax(ZMC_HANDLE handle, int iaxis, int iaddaxis);
- [DllImport("zauxdll.dll", EntryPoint = "ZAux_Singl_Addax", CharSet = CharSet.Ansi, CallingConvention = CallingConvention.StdCall)]
- public static extern Int32 ZAux_Singl_Addax(IntPtr handle, int iaxis, int iaddaxis);
- /*************************************************************
- Description: //cancel
- Input: //卡链接handle
- Output: //
- Return: //错误码
- *************************************************************/
- //int32 __stdcall ZAux_Singl_Cancel(ZMC_HANDLE handle, int iaxis, int imode);
- [DllImport("zauxdll.dll", EntryPoint = "ZAux_Singl_Cancel", CharSet = CharSet.Ansi, CallingConvention = CallingConvention.StdCall)]
- public static extern Int32 ZAux_Singl_Cancel(IntPtr handle,int iaxis, int imode);
- /*************************************************************
- Description: //回零
- Input: //卡链接handle
- Output: //
- Return: //错误码
- *************************************************************/
- //int32 __stdcall ZAux_Singl_Datum(ZMC_HANDLE handle, int iaxis, int imode);
- [DllImport("zauxdll.dll", EntryPoint = "ZAux_Singl_Datum", CharSet = CharSet.Ansi, CallingConvention = CallingConvention.StdCall)]
- public static extern Int32 ZAux_Singl_Datum(IntPtr handle,int iaxis, int imode);
- /*************************************************************
- Description: //电子齿轮比设置
- Input: //卡链接handle
- Output: //
- Return: //错误码
- *************************************************************/
- //int32 __stdcall ZAux_Singl_EncoderRatio(ZMC_HANDLE handle, int iaxis, int imposcount, int inputcount);
- [DllImport("zauxdll.dll", EntryPoint = "ZAux_Singl_EncoderRatio", CharSet = CharSet.Ansi, CallingConvention = CallingConvention.StdCall)]
- public static extern Int32 ZAux_Singl_EncoderRatio(IntPtr handle, int iaxis, int imposcount, int inputcount);
- /*************************************************************
- Description: //电子齿轮比设置
- Input: //卡链接handle
- Output: //
- Return: //错误码
- *************************************************************/
- //int32 __stdcall ZAux_Singl_StepRatio(ZMC_HANDLE handle, int iaxis, int ioutcount, int idposcount);
- [DllImport("zauxdll.dll", EntryPoint = "ZAux_Singl_StepRatio", CharSet = CharSet.Ansi, CallingConvention = CallingConvention.StdCall)]
- public static extern Int32 ZAux_Singl_StepRatio(IntPtr handle, int iaxis, int ioutcount, int idposcount);
- // #if 0
- //参数部分
- //#endif
- /*************************************************************
- Description: //参数 轴类型设置, 步进轴一般不用设置
- Input: //卡链接handle merge: 0/1
- Output: //
- Return: //错误码
- *************************************************************/
- //int32 __stdcall ZAux_SetAtype(ZMC_HANDLE handle,int iaxis, int iset);
- [DllImport("zauxdll.dll", EntryPoint = "ZAux_SetAtype", CharSet = CharSet.Ansi, CallingConvention = CallingConvention.StdCall)]
- public static extern Int32 ZAux_SetAtype(IntPtr handle, int iaxis, int ioutcount, int idposcount);
- /*************************************************************
- Description: //参数 设置是否连续插补
- Input: //卡链接handle merge: 0/1
- Output: //
- Return: //错误码
- *************************************************************/
- //int32 __stdcall ZAux_SetMerge(ZMC_HANDLE handle,int iaxis, int iset);
- [DllImport("zauxdll.dll", EntryPoint = "ZAux_SetMerge", CharSet = CharSet.Ansi, CallingConvention = CallingConvention.StdCall)]
- public static extern Int32 ZAux_SetMerge(IntPtr handle,int iaxis, int iset);
- /*************************************************************
- Description: //参数
- Input: //卡链接handle merge: 0/1
- Output: //
- Return: //错误码
- *************************************************************/
- //int32 __stdcall ZAux_SetUnits(ZMC_HANDLE handle, int iaxis, float fset);
- [DllImport("zauxdll.dll", EntryPoint = "ZAux_SetUnits", CharSet = CharSet.Ansi, CallingConvention = CallingConvention.StdCall)]
- public static extern Int32 ZAux_SetUnits(IntPtr handle, int iaxis, float fset);
- /*************************************************************
- Description: //参数
- Input: //卡链接handle
- Output: //
- Return: //错误码
- *************************************************************/
- //int32 __stdcall ZAux_SetSpeed(ZMC_HANDLE handle, int iaxis, float fspeed);
- [DllImport("zauxdll.dll", EntryPoint = "ZAux_SetSpeed", CharSet = CharSet.Ansi, CallingConvention = CallingConvention.StdCall)]
- public static extern Int32 ZAux_SetSpeed(IntPtr handle, int iaxis, float fspeed);//集成 1 1天
- /*************************************************************
- Description: //参数
- Input: //卡链接handle merge: 0/1
- Output: //
- Return: //错误码
- *************************************************************/
- //int32 __stdcall ZAux_SetAccel(ZMC_HANDLE handle, int iaxis, float fspeed);
- [DllImport("zauxdll.dll", EntryPoint = "ZAux_SetAccel", CharSet = CharSet.Ansi, CallingConvention = CallingConvention.StdCall)]
- public static extern Int32 ZAux_SetAccel(IntPtr handle, int iaxis, float fspeed);
- /*************************************************************
- Description: //参数
- Input: //卡链接handle
- Output: //
- Return: //错误码
- *************************************************************/
- //int32 __stdcall ZAux_SetDecel(ZMC_HANDLE handle, int iaxis, float fspeed);
- [DllImport("zauxdll.dll", EntryPoint = "ZAux_SetDecel", CharSet = CharSet.Ansi, CallingConvention = CallingConvention.StdCall)]
- public static extern Int32 ZAux_SetDecel(IntPtr handle, int iaxis, float fspeed);
- /*************************************************************
- Description: //参数
- Input: //卡链接handle
- Output: //
- Return: //错误码
- *************************************************************/
- //int32 __stdcall ZAux_SetFastDec(ZMC_HANDLE handle, int iaxis, float fspeed);
- [DllImport("zauxdll.dll", EntryPoint = "ZAux_SetFastDec", CharSet = CharSet.Ansi, CallingConvention = CallingConvention.StdCall)]
- public static extern Int32 ZAux_SetFastDec(IntPtr handle, int iaxis, float fspeed);
- /*************************************************************
- Description: //参数
- Input: //卡链接handle
- Output: //
- Return: //错误码
- *************************************************************/
- //int32 __stdcall ZAux_SetForceSpeed(ZMC_HANDLE handle, int iaxis, float fspeed);
- [DllImport("zauxdll.dll", EntryPoint = "ZAux_SetForceSpeed", CharSet = CharSet.Ansi, CallingConvention = CallingConvention.StdCall)]
- public static extern Int32 ZAux_SetForceSpeed(IntPtr handle, int iaxis, float fspeed);
- /*************************************************************
- Description: //参数
- Input: //卡链接handle
- Output: //
- Return: //错误码
- *************************************************************/
- //int32 __stdcall ZAux_SetStartMoveSpeed(ZMC_HANDLE handle, int iaxis, float fspeed);
- [DllImport("zauxdll.dll", EntryPoint = "ZAux_SetStartMoveSpeed", CharSet = CharSet.Ansi, CallingConvention = CallingConvention.StdCall)]
- public static extern Int32 ZAux_SetStartMoveSpeed(IntPtr handle, int iaxis, float fspeed);
- /*************************************************************
- Description: //参数
- Input: //卡链接handle
- Output: //
- Return: //错误码
- *************************************************************/
- //int32 __stdcall ZAux_SetEndMoveSpeed(ZMC_HANDLE handle, int iaxis, float fspeed);
- [DllImport("zauxdll.dll", EntryPoint = "ZAux_SetEndMoveSpeed", CharSet = CharSet.Ansi, CallingConvention = CallingConvention.StdCall)]
- public static extern Int32 ZAux_SetEndMoveSpeed(IntPtr handle, int iaxis, float fspeed);
- /*************************************************************
- Description: //参数
- Input: //卡链接handle
- Output: //
- Return: //错误码
- *************************************************************/
- //int32 __stdcall ZAux_SetLSpeed(ZMC_HANDLE handle, int iaxis, float fspeed);
- [DllImport("zauxdll.dll", EntryPoint = "ZAux_SetLSpeed", CharSet = CharSet.Ansi, CallingConvention = CallingConvention.StdCall)]
- public static extern Int32 ZAux_SetLSpeed(IntPtr handle, int iaxis, float fspeed);
- /*************************************************************
- Description: //参数
- Input: //卡链接handle
- Output: //
- Return: //错误码
- *************************************************************/
- //int32 __stdcall ZAux_SetCreepSpeed(ZMC_HANDLE handle, int iaxis, float fspeed);
- [DllImport("zauxdll.dll", EntryPoint = "ZAux_SetCreepSpeed", CharSet = CharSet.Ansi, CallingConvention = CallingConvention.StdCall)]
- public static extern Int32 ZAux_SetCreepSpeed(IntPtr handle, int iaxis, float fspeed);
- /*************************************************************
- Description: //参数 拐角减速设置
- Input: //卡链接handle
- Output: //
- Return: //错误码
- *************************************************************/
- //int32 __stdcall ZAux_SetCornerMode(ZMC_HANDLE handle, int iaxis, int iset);
- [DllImport("zauxdll.dll", EntryPoint = "ZAux_SetCornerMode", CharSet = CharSet.Ansi, CallingConvention = CallingConvention.StdCall)]
- public static extern Int32 ZAux_SetCornerMode(IntPtr handle, int iaxis, int iset);
- /*************************************************************
- Description: //参数 脉冲的设置
- Input: //卡链接handle
- Output: //
- Return: //错误码
- *************************************************************/
- //int32 __stdcall ZAux_SetInvertStep(ZMC_HANDLE handle, int iaxis, int iset);
- [DllImport("zauxdll.dll", EntryPoint = "ZAux_SetInvertStep", CharSet = CharSet.Ansi, CallingConvention = CallingConvention.StdCall)]
- public static extern Int32 ZAux_SetInvertStep(IntPtr handle, int iaxis, int iset);
- /*************************************************************
- Description: //参数 S曲线设置
- Input: //卡链接handle
- Output: //
- Return: //错误码
- *************************************************************/
- //int32 __stdcall ZAux_SetDecelAngle(ZMC_HANDLE handle, int iaxis, float fset);
- [DllImport("zauxdll.dll", EntryPoint = "ZAux_SetInvertStep", CharSet = CharSet.Ansi, CallingConvention = CallingConvention.StdCall)]
- public static extern Int32 ZAux_SetInvertStep(IntPtr handle, int iaxis, float fset);
- /*************************************************************
- Description: //参数 S曲线设置
- Input: //卡链接handle
- Output: //
- Return: //错误码
- *************************************************************/
- //int32 __stdcall ZAux_SetStopAngle(ZMC_HANDLE handle, int iaxis, float fset);
- [DllImport("zauxdll.dll", EntryPoint = "ZAux_SetStopAngle", CharSet = CharSet.Ansi, CallingConvention = CallingConvention.StdCall)]
- public static extern Int32 ZAux_SetStopAngle(IntPtr handle, int iaxis, float fset);
- /*************************************************************
- Description: //参数 小圆限速的半径设置
- Input: //卡链接handle
- Output: //
- Return: //错误码
- *************************************************************/
- //int32 __stdcall ZAux_SetSpRadius(ZMC_HANDLE handle, int iaxis, float fset);
- [DllImport("zauxdll.dll", EntryPoint = "ZAux_SetSpRadius", CharSet = CharSet.Ansi, CallingConvention = CallingConvention.StdCall)]
- public static extern Int32 ZAux_SetSpRadius(IntPtr handle, int iaxis, float fset);
- /*************************************************************
- Description: //参数 S曲线设置
- Input: //卡链接handle
- Output: //
- Return: //错误码
- *************************************************************/
- //int32 __stdcall ZAux_SetSramp(ZMC_HANDLE handle, int iaxis, int iset);
- [DllImport("zauxdll.dll", EntryPoint = "ZAux_SetSramp", CharSet = CharSet.Ansi, CallingConvention = CallingConvention.StdCall)]
- public static extern Int32 ZAux_SetSramp(IntPtr handle, int iaxis,int iset);
- /*************************************************************
- Description: //参数 DPOS修改
- Input: //卡链接handle
- Output: //
- Return: //错误码
- *************************************************************/
- //int32 __stdcall ZAux_SetDpos(ZMC_HANDLE handle, int iaxis, float fpos);
- [DllImport("zauxdll.dll", EntryPoint = "ZAux_SetDpos", CharSet = CharSet.Ansi, CallingConvention = CallingConvention.StdCall)]
- public static extern Int32 ZAux_SetDpos(IntPtr handle,int iaxis, float fpos);
- /*************************************************************
- Description: //参数 MPOS修改
- Input: //卡链接handle
- Output: //
- Return: //错误码
- *************************************************************/
- //int32 __stdcall ZAux_SetMpos(ZMC_HANDLE handle, int iaxis, float fpos);
- [DllImport("zauxdll.dll", EntryPoint = "ZAux_SetMpos", CharSet = CharSet.Ansi, CallingConvention = CallingConvention.StdCall)]
- public static extern Int32 ZAux_SetMpos(IntPtr handle,int iaxis, float fpos);
- /*************************************************************
- Description: //参数 相对修改坐标
- Input: //卡链接handle
- Output: //
- Return: //错误码
- *************************************************************/
- //int32 __stdcall ZAux_SetOffpos(ZMC_HANDLE handle, int iaxis, float fpos);
- [DllImport("zauxdll.dll", EntryPoint = "ZAux_SetOffpos", CharSet = CharSet.Ansi, CallingConvention = CallingConvention.StdCall)]
- public static extern Int32 ZAux_SetOffpos(IntPtr handle, int iaxis, float fpos);
- //#if 0
- //状态读取
- //#endif
- /*************************************************************
- Description: //参数
- Input: //卡链接handle
- Output: //
- Return: //错误码
- *************************************************************/
- //int32 __stdcall ZAux_GetDpos(ZMC_HANDLE handle, int iaxis, float *pfValue);
- [DllImport("zauxdll.dll", EntryPoint = "ZAux_GetDpos", CharSet = CharSet.Ansi, CallingConvention = CallingConvention.StdCall)]
- public static extern Int32 ZAux_GetDpos(IntPtr handle,int iaxis,ref float pfValue);//集成 3
- /*************************************************************
- Description: //参数
- Input: //卡链接handle
- Output: //
- Return: //错误码
- *************************************************************/
- //int32 __stdcall ZAux_GetMpos(ZMC_HANDLE handle, int iaxis, float *pfValue);
- [DllImport("zauxdll.dll", EntryPoint = "ZAux_GetMpos", CharSet = CharSet.Ansi, CallingConvention = CallingConvention.StdCall)]
- public static extern Int32 ZAux_GetMpos(IntPtr handle, int iaxis, ref float pfValue);
- /*************************************************************
- Description: //参数
- Input: //卡链接handle
- Output: //
- Return: //错误码
- *************************************************************/
- //int32 __stdcall ZAux_GetCurSpeed(ZMC_HANDLE handle, int iaxis, float *pfValue);
- [DllImport("zauxdll.dll", EntryPoint = "ZAux_GetCurSpeed", CharSet = CharSet.Ansi, CallingConvention = CallingConvention.StdCall)]
- public static extern Int32 ZAux_GetCurSpeed(IntPtr handle, int iaxis, ref float pfValue);
- /*************************************************************
- Description: //参数
- Input: //卡链接handle
- Output: //
- Return: //错误码
- *************************************************************/
- //int32 __stdcall ZAux_GetMtype(ZMC_HANDLE handle, int iaxis, int *piValue);
- [DllImport("zauxdll.dll", EntryPoint = "ZAux_GetMtype", CharSet = CharSet.Ansi, CallingConvention = CallingConvention.StdCall)]
- public static extern Int32 ZAux_GetMtype(IntPtr handle,int iaxis,ref float pfValue);
- /*************************************************************
- Description: //参数 轴是否运动完成
- Input: //卡链接handle
- Output: //
- Return: //错误码
- *************************************************************/
- //int32 __stdcall ZAux_GetIfIdle(ZMC_HANDLE handle, int iaxis, int *piValue);
- [DllImport("zauxdll.dll", EntryPoint = "ZAux_GetIfIdle", CharSet = CharSet.Ansi, CallingConvention = CallingConvention.StdCall)]
- public static extern Int32 ZAux_GetIfIdle(IntPtr handle,int iaxis,ref float pfValue);
- /*************************************************************
- Description: //参数 当前运行完成后的终点坐标, 缓冲里面的不算
- Input: //卡链接handle
- Output: //
- Return: //错误码
- *************************************************************/
- //int32 __stdcall ZAux_GetEndMove(ZMC_HANDLE handle, int iaxis, float *pfValue);
- [DllImport("zauxdll.dll", EntryPoint = "ZAux_GetEndMove", CharSet = CharSet.Ansi, CallingConvention = CallingConvention.StdCall)]
- public static extern Int32 ZAux_GetEndMove(IntPtr handle,int iaxis,ref float pfValue);
- /*************************************************************
- Description: //参数 当前缓冲运行完成后的终点坐标 用于转换相对绝对
- Input: //卡链接handle
- Output: //
- Return: //错误码
- *************************************************************/
- //int32 __stdcall ZAux_GetEndMoveBuff(ZMC_HANDLE handle, int iaxis, float *pfValue);
- [DllImport("zauxdll.dll", EntryPoint = "ZAux_GetEndMoveBuff", CharSet = CharSet.Ansi, CallingConvention = CallingConvention.StdCall)]
- public static extern Int32 ZAux_GetEndMoveBuff(IntPtr handle,int iaxis,ref float pfValue);
- /*************************************************************
- Description: //参数
- Input: //卡链接handle
- Output: //
- Return: //错误码
- *************************************************************/
- //int32 __stdcall ZAux_GetAxisStatus(ZMC_HANDLE handle, int iaxis, int *piValue);
- [DllImport("zauxdll.dll", EntryPoint = "ZAux_GetAxisStatus", CharSet = CharSet.Ansi, CallingConvention = CallingConvention.StdCall)]
- public static extern Int32 ZAux_GetAxisStatus(IntPtr handle,int iaxis,ref int piValue);
- /*************************************************************
- Description: //参数 内部的编码器位置
- Input: //卡链接handle
- Output: //
- Return: //错误码
- *************************************************************/
- //int32 __stdcall ZAux_GetEncoder(ZMC_HANDLE handle, int iaxis, int *piValue);
- [DllImport("zauxdll.dll", EntryPoint = "ZAux_GetEncoder", CharSet = CharSet.Ansi, CallingConvention = CallingConvention.StdCall)]
- public static extern Int32 ZAux_GetEncoder(IntPtr handle,int iaxis,ref int piValue);
- /*************************************************************
- Description: //参数 轴剩余的缓冲, 按直线来计算
- Input: //卡链接handle
- Output: //
- Return: //错误码
- *************************************************************/
- //int32 __stdcall ZAux_GetRemain_LineBuffer(ZMC_HANDLE handle, int iaxis, int *piValue);
- [DllImport("zauxdll.dll", EntryPoint = "ZAux_GetRemain_LineBuffer", CharSet = CharSet.Ansi, CallingConvention = CallingConvention.StdCall)]
- public static extern Int32 ZAux_GetRemain_LineBuffer(IntPtr handle,int iaxis,ref int piValue);
- /*************************************************************
- Description: //参数 轴剩余的缓冲, 按最复杂的空间圆弧来计算
- Input: //卡链接handle
- Output: //
- Return: //错误码
- *************************************************************/
- //int32 __stdcall ZAux_GetRemain_Buffer(ZMC_HANDLE handle, int iaxis, int *piValue);
- [DllImport("zauxdll.dll", EntryPoint = "ZAux_GetRemain_Buffer", CharSet = CharSet.Ansi, CallingConvention = CallingConvention.StdCall)]
- public static extern Int32 ZAux_GetRemain_Buffer(IntPtr handle,int iaxis,ref int piValue);
- /*************************************************************
- Description: //参数
- Input: //卡链接handle
- Output: //
- Return: //错误码
- *************************************************************/
- //int32 __stdcall ZAux_GetRegPos(ZMC_HANDLE handle, int iaxis, float *pfValue);
- [DllImport("zauxdll.dll", EntryPoint = "ZAux_GetRegPos", CharSet = CharSet.Ansi, CallingConvention = CallingConvention.StdCall)]
- public static extern Int32 ZAux_GetRegPos(IntPtr handle,int iaxis,ref float pfValue);
- /*************************************************************
- Description: //参数
- Input: //卡链接handle
- Output: //
- Return: //错误码
- *************************************************************/
- //int32 __stdcall ZAux_GetMark(ZMC_HANDLE handle, int iaxis, int *piValue);
- [DllImport("zauxdll.dll", EntryPoint = "ZAux_GetMark", CharSet = CharSet.Ansi, CallingConvention = CallingConvention.StdCall)]
- public static extern Int32 ZAux_GetMark(IntPtr handle,int iaxis,ref int piValue);
- /*************************************************************
- Description: //参数
- Input: //卡链接handle
- Output: //
- Return: //错误码
- *************************************************************/
- //int32 __stdcall ZAux_GetMarkB(ZMC_HANDLE handle, int iaxis, int *piValue);
- [DllImport("zauxdll.dll", EntryPoint = "ZAux_GetMarkB", CharSet = CharSet.Ansi, CallingConvention = CallingConvention.StdCall)]
- public static extern Int32 ZAux_GetMarkB(IntPtr handle,int iaxis,ref int piValue);
- /*************************************************************
- Description: //全局变量读取
- Input: //卡链接handle
- Output: //
- Return: //错误码
- *************************************************************/
- //int32 __stdcall ZAux_GetVariablef(ZMC_HANDLE handle, const char *pname, float *pfValue);
- [DllImport("zauxdll.dll", EntryPoint = "ZAux_GetVariablef", CharSet = CharSet.Ansi, CallingConvention = CallingConvention.StdCall)]
- public static extern Int32 ZAux_GetVariablef(IntPtr handle,int iaxis,ref float pfValue);
- /*************************************************************
- Description: //全局变量读取, 也可以是参数等等
- Input: //卡链接handle
- Output: //
- Return: //错误码
- *************************************************************/
- //int32 __stdcall ZAux_GetVariableInt(ZMC_HANDLE handle, const char *pname, int *piValue);
- [DllImport("zauxdll.dll", EntryPoint = "ZAux_GetVariableInt", CharSet = CharSet.Ansi, CallingConvention = CallingConvention.StdCall)]
- public static extern Int32 ZAux_GetVariableInt(IntPtr handle,int iaxis,ref int piValue);
- //#if 0
- //IO指令
- // 可以使用 ZMC_GetIn ZMC_GetOutput 等
- //#endif
- /*************************************************************
- Description: //参数
- Input: //卡链接handle
- Output: //
- Return: //错误码
- *************************************************************/
- //int32 __stdcall ZAux_GetIn(ZMC_HANDLE handle, int ionum, uint32 *piValue);
- [DllImport("zauxdll.dll", EntryPoint = "ZAux_GetIn", CharSet = CharSet.Ansi, CallingConvention = CallingConvention.StdCall)]
- public static extern Int32 ZAux_GetIn(IntPtr handle,int ionum,ref UInt32 piValue);
- /*************************************************************
- Description: //参数
- Input: //卡链接handle
- Output: //
- Return: //错误码
- *************************************************************/
- //int32 __stdcall ZAux_SetInvertIN(ZMC_HANDLE handle, int ionum, int bifInvert);
- [DllImport("zauxdll.dll", EntryPoint = "ZAux_SetInvertIN", CharSet = CharSet.Ansi, CallingConvention = CallingConvention.StdCall)]
- public static extern Int32 ZAux_SetInvertIN(IntPtr handle,int ionum, int bifInvert);
- /*************************************************************
- Description: //参数
- Input: //卡链接handle
- Output: //
- Return: //错误码
- *************************************************************/
- //int32 __stdcall ZAux_SetOp(ZMC_HANDLE handle, int ionum, uint32 iValue);
- [DllImport("zauxdll.dll", EntryPoint = "ZAux_SetOp", CharSet = CharSet.Ansi, CallingConvention = CallingConvention.StdCall)]
- public static extern Int32 ZAux_SetOp(IntPtr handle,int ionum, UInt32 iValue);
- //#if 0
- //通过modbus快速读取特殊寄存器
- //#endif
- /*************************************************************
- Description: //参数 快速读取多个输入
- Input: //卡链接handle
- Output: //按位存储
- Return: //错误码
- *************************************************************/
- //int32 __stdcall ZAux_GetModbusIn(ZMC_HANDLE handle, int ionumfirst, int ionumend, uint8 *pValueList);
- [DllImport("zauxdll.dll", EntryPoint = "ZAux_GetModbusIn", CharSet = CharSet.Ansi, CallingConvention = CallingConvention.StdCall)]
- public static extern Int32 ZAux_GetModbusIn(IntPtr handle, int ionumfirst, int ionumend, byte[] pValueList);
- /*************************************************************
- Description: //参数 快速读取多个当前的输出状态
- Input: //卡链接handle
- Output: //按位存储
- Return: //错误码
- *************************************************************/
- //int32 __stdcall ZAux_GetModbusOut(ZMC_HANDLE handle, int ionumfirst, int ionumend, uint8 *pValueList);
- [DllImport("zauxdll.dll", EntryPoint = "ZAux_GetModbusOut", CharSet = CharSet.Ansi, CallingConvention = CallingConvention.StdCall)]
- public static extern Int32 ZAux_GetModbusOut(IntPtr handle, int ionumfirst, int ionumend, byte[] pValueList);
- /*************************************************************
- Description: //参数 快速读取多个当前的DPOS
- Input: //卡链接handle
- Output: //按存储
- Return: //错误码
- *************************************************************/
- //int32 __stdcall ZAux_GetModbusDpos(ZMC_HANDLE handle, int imaxaxises, float *pValueList);
- [DllImport("zauxdll.dll", EntryPoint = "ZAux_GetModbusDpos", CharSet = CharSet.Ansi, CallingConvention = CallingConvention.StdCall)]
- public static extern Int32 ZAux_GetModbusDpos(IntPtr handle, int imaxaxises, float[] pValueList);
- /*************************************************************
- Description: //参数 快速读取多个当前的MPOS
- Input: //卡链接handle
- Output: //按存储
- Return: //错误码
- *************************************************************/
- //int32 __stdcall ZAux_GetModbusMpos(ZMC_HANDLE handle, int imaxaxises, float *pValueList);
- [DllImport("zauxdll.dll", EntryPoint = "ZAux_GetModbusMpos", CharSet = CharSet.Ansi, CallingConvention = CallingConvention.StdCall)]
- public static extern Int32 ZAux_GetModbusMpos(IntPtr handle, int imaxaxises, float[] pValueList);
- /*************************************************************
- Description: //参数 快速读取多个当前的速度
- Input: //卡链接handle
- Output: //按存储
- Return: //错误码
- *************************************************************/
- //int32 __stdcall ZAux_GetModbusCurSpeed(ZMC_HANDLE handle, int imaxaxises, float *pValueList);
- [DllImport("zauxdll.dll", EntryPoint = "ZAux_GetModbusCurSpeed", CharSet = CharSet.Ansi, CallingConvention = CallingConvention.StdCall)]
- public static extern Int32 ZAux_GetModbusCurSpeed(IntPtr handle, int imaxaxises, float[] pValueList);
- //#if 0
- //采用ZMC_DirectCommand 来快速获取一些状态, ZMC_DirectCommand的执行比ZMC_Execute要快
- // 只有参数,变量,数组元素等能使用ZMC_DirectCommand
- //#endif
- /*************************************************************
- Description: //参数
- Input: //卡链接handle
- Output: //
- Return: //错误码
- *************************************************************/
- //int32 __stdcall ZAux_Direct_GetDpos(ZMC_HANDLE handle, int iaxis, float *pfValue);
- [DllImport("zauxdll.dll", EntryPoint = "ZAux_Direct_GetDpos", CharSet = CharSet.Ansi, CallingConvention = CallingConvention.StdCall)]
- public static extern Int32 ZAux_Direct_GetDpos(IntPtr handle, int iaxis,ref float pfValue);
- /*************************************************************
- Description: //参数
- Input: //卡链接handle
- Output: //
- Return: //错误码
- *************************************************************/
- //int32 __stdcall ZAux_Direct_GetMpos(ZMC_HANDLE handle, int iaxis, float *pfValue);
- [DllImport("zauxdll.dll", EntryPoint = "ZAux_Direct_GetMpos", CharSet = CharSet.Ansi, CallingConvention = CallingConvention.StdCall)]
- public static extern Int32 ZAux_Direct_GetMpos(IntPtr handle, int iaxis,ref float pfValue);
- /*************************************************************
- Description: //参数
- Input: //卡链接handle
- Output: //
- Return: //错误码
- *************************************************************/
- //int32 __stdcall ZAux_Direct_GetCurSpeed(ZMC_HANDLE handle, int iaxis, float *pfValue);
- [DllImport("zauxdll.dll", EntryPoint = "ZAux_Direct_GetCurSpeed", CharSet = CharSet.Ansi, CallingConvention = CallingConvention.StdCall)]
- public static extern Int32 ZAux_Direct_GetCurSpeed(IntPtr handle, int iaxis,ref float pfValue);
- /*************************************************************
- Description: //参数 当前的运动类型
- Input: //卡链接handle
- Output: //
- Return: //错误码
- *************************************************************/
- //int32 __stdcall ZAux_Direct_GetMtype(ZMC_HANDLE handle, int iaxis, int *piValue);
- [DllImport("zauxdll.dll", EntryPoint = "ZAux_Direct_GetMtype", CharSet = CharSet.Ansi, CallingConvention = CallingConvention.StdCall)]
- public static extern Int32 ZAux_Direct_GetMtype(IntPtr handle, int iaxis,ref int piValue);
- /*************************************************************
- Description: //参数 轴是否运动完成
- Input: //卡链接handle
- Output: //
- Return: //错误码
- *************************************************************/
- //int32 __stdcall ZAux_Direct_GetIfIdle(ZMC_HANDLE handle, int iaxis, int *piValue);
- [DllImport("zauxdll.dll", EntryPoint = "ZAux_Direct_GetIfIdle", CharSet = CharSet.Ansi, CallingConvention = CallingConvention.StdCall)]
- public static extern Int32 ZAux_Direct_GetIfIdle(IntPtr handle, int iaxis,ref int piValue);
- /*************************************************************
- Description: //参数 当前运行完成后的终点坐标, 缓冲里面的不算
- Input: //卡链接handle
- Output: //
- Return: //错误码
- *************************************************************/
- //int32 __stdcall ZAux_Direct_GetEndMove(ZMC_HANDLE handle, int iaxis, float *pfValue);
- [DllImport("zauxdll.dll", EntryPoint = "ZAux_Direct_GetEndMove", CharSet = CharSet.Ansi, CallingConvention = CallingConvention.StdCall)]
- public static extern Int32 ZAux_Direct_GetEndMove(IntPtr handle, int iaxis, ref int piValue);
- /*************************************************************
- Description: //参数 当前缓冲运行完成后的终点坐标 用于转换相对绝对
- Input: //卡链接handle
- Output: //
- Return: //错误码
- *************************************************************/
- //int32 __stdcall ZAux_Direct_GetEndMoveBuff(ZMC_HANDLE handle, int iaxis, float *pfValue);
- [DllImport("zauxdll.dll", EntryPoint = "ZAux_Direct_GetEndMoveBuff", CharSet = CharSet.Ansi, CallingConvention = CallingConvention.StdCall)]
- public static extern Int32 ZAux_Direct_GetEndMoveBuff(IntPtr handle, int iaxis,ref float pfValue);
- /*************************************************************
- Description: //参数
- Input: //卡链接handle
- Output: //
- Return: //错误码
- *************************************************************/
- //int32 __stdcall ZAux_Direct_GetAxisStatus(ZMC_HANDLE handle, int iaxis, int *piValue);
- [DllImport("zauxdll.dll", EntryPoint = "ZAux_Direct_GetAxisStatus", CharSet = CharSet.Ansi, CallingConvention = CallingConvention.StdCall)]
- public static extern Int32 ZAux_Direct_GetAxisStatus(IntPtr handle, int iaxis,ref int piValue);
- /*************************************************************
- Description: //参数 内部的编码器位置
- Input: //卡链接handle
- Output: //
- Return: //错误码
- *************************************************************/
- //int32 __stdcall ZAux_Direct_GetEncoder(ZMC_HANDLE handle, int iaxis, int *piValue);
- [DllImport("zauxdll.dll", EntryPoint = "ZAux_Direct_GetEncoder", CharSet = CharSet.Ansi, CallingConvention = CallingConvention.StdCall)]
- public static extern Int32 ZAux_Direct_GetEncoder(IntPtr handle, int iaxis,ref int piValue);
- /*************************************************************
- Description: //参数 轴剩余的缓冲, 按直线段来计算
- REMAIN_BUFFER为唯一一个可以加AXIS并用ZMC_DirectCommand获取的.
- Input: //卡链接handle
- Output: //
- Return: //错误码
- *************************************************************/
- //int32 __stdcall ZAux_Direct_GetRemain_LineBuffer(ZMC_HANDLE handle, int iaxis, int *piValue);
- [DllImport("zauxdll.dll", EntryPoint = "ZAux_Direct_GetRemain_LineBuffer", CharSet = CharSet.Ansi, CallingConvention = CallingConvention.StdCall)]
- public static extern Int32 ZAux_Direct_GetRemain_LineBuffer(IntPtr handle, int iaxis,ref int piValue);
- /*************************************************************
- Description: //参数 轴剩余的缓冲, 按最复杂的空间圆弧来计算
- REMAIN_BUFFER为唯一一个可以加AXIS并用ZMC_DirectCommand获取的.
- Input: //卡链接handle
- Output: //
- Return: //错误码
- *************************************************************/
- //int32 __stdcall ZAux_Direct_GetRemain_Buffer(ZMC_HANDLE handle, int iaxis, int *piValue);
- [DllImport("zauxdll.dll", EntryPoint = "ZAux_Direct_GetRemain_Buffer", CharSet = CharSet.Ansi, CallingConvention = CallingConvention.StdCall)]
- public static extern Int32 ZAux_Direct_GetRemain_Buffer(IntPtr handle, int iaxis,ref int piValue);
- /*************************************************************
- Description: //参数
- Input: //卡链接handle
- Output: //
- Return: //错误码
- *************************************************************/
- //int32 __stdcall ZAux_Direct_GetRegPos(ZMC_HANDLE handle, int iaxis, float *pfValue);
- [DllImport("zauxdll.dll", EntryPoint = "ZAux_Direct_GetRegPos", CharSet = CharSet.Ansi, CallingConvention = CallingConvention.StdCall)]
- public static extern Int32 ZAux_Direct_GetRegPos(IntPtr handle, int iaxis,ref float pfValue);
- /*************************************************************
- Description: //参数
- Input: //卡链接handle
- Output: //
- Return: //错误码
- *************************************************************/
- //int32 __stdcall ZAux_Direct_GetMark(ZMC_HANDLE handle, int iaxis, int *piValue);
- [DllImport("zauxdll.dll", EntryPoint = "ZAux_Direct_GetMark", CharSet = CharSet.Ansi, CallingConvention = CallingConvention.StdCall)]
- public static extern Int32 ZAux_Direct_GetMark(IntPtr handle, int iaxis,ref int piValue);
- /*************************************************************
- Description: //参数
- Input: //卡链接handle
- Output: //
- Return: //错误码
- *************************************************************/
- //int32 __stdcall ZAux_Direct_GetMarkB(ZMC_HANDLE handle, int iaxis, int *piValue);
- [DllImport("zauxdll.dll", EntryPoint = "ZAux_Direct_GetMarkB", CharSet = CharSet.Ansi, CallingConvention = CallingConvention.StdCall)]
- public static extern Int32 ZAux_Direct_GetMarkB(IntPtr handle, int iaxis,ref int piValue);
- /*************************************************************
- Description: //全局变量读取, 也可以是参数等等
- Input: //卡链接handle
- Output: //
- Return: //错误码
- *************************************************************/
- //int32 __stdcall ZAux_Direct_GetVariablef(ZMC_HANDLE handle, const char *pname, float *pfValue);
- [DllImport("zauxdll.dll", EntryPoint = "ZAux_Direct_GetMarkB", CharSet = CharSet.Ansi, CallingConvention = CallingConvention.StdCall)]
- public static extern Int32 ZAux_Direct_GetMarkB(IntPtr handle,string pname,ref float pfValue);
- /*************************************************************
- Description: //全局变量读取, 也可以是参数等等
- Input: //卡链接handle
- Output: //
- Return: //错误码
- *************************************************************/
- //int32 __stdcall ZAux_Direct_GetVariableInt(ZMC_HANDLE handle, const char *pname, int *piValue);
- [DllImport("zauxdll.dll", EntryPoint = "ZAux_Direct_GetVariableInt", CharSet = CharSet.Ansi, CallingConvention = CallingConvention.StdCall)]
- public static extern Int32 ZAux_Direct_GetVariableInt(IntPtr handle,string pname,ref int piValue);
- /////////////////////// 只有下面的运动函数支持直接调用,并不是所有的指令都支持
- /////////////////////// 必须 20130901 以后的控制器版本支持
- /*************************************************************
- Description: //BASE指令调用
- 仅仅修改在线命令的BASE列表,不对控制器的运行任务的BASE进行修改.
- 修改后,后续的所有MOVE等指令都是以这个BASE为基础
- Input: //卡链接handle
- Output: //
- Return: //错误码
- *************************************************************/
- //int32 __stdcall ZAux_Direct_Base(ZMC_HANDLE handle, int imaxaxises, int *piAxislist);
- [DllImport("zauxdll.dll", EntryPoint = "ZAux_Direct_Base", CharSet = CharSet.Ansi, CallingConvention = CallingConvention.StdCall)]
- public static extern Int32 ZAux_Direct_Base(IntPtr handle, int imaxaxises, ref int piAxislist);
- /*************************************************************
- Description: //相对插补 直接调用运动函数 20130901 以后的控制器版本支持
- Input: //卡链接handle
- Output: //
- Return: //错误码
- *************************************************************/
- //int32 __stdcall ZAux_Direct_Move(ZMC_HANDLE handle, int imaxaxises, float *pfDisancelist);
- [DllImport("zauxdll.dll", EntryPoint = "ZAux_Direct_Move", CharSet = CharSet.Ansi, CallingConvention = CallingConvention.StdCall)]
- public static extern Int32 ZAux_Direct_Move(IntPtr handle, int imaxaxises, ref float pfDisancelist);
- /*************************************************************
- Description: //相对插补 直接调用运动函数 20130901 以后的控制器版本支持
- Input: //卡链接handle
- Output: //
- Return: //错误码
- *************************************************************/
- //int32 __stdcall ZAux_Direct_MoveSp(ZMC_HANDLE handle, int imaxaxises, float *pfDisancelist);
- [DllImport("zauxdll.dll", EntryPoint = "ZAux_Direct_MoveSp", CharSet = CharSet.Ansi, CallingConvention = CallingConvention.StdCall)]
- public static extern Int32 ZAux_Direct_MoveSp(IntPtr handle, int imaxaxises, ref float pfDisancelist);
- /*************************************************************
- Description: //插补 直接调用运动函数 20130901 以后的控制器版本支持
- Input: //卡链接handle
- Output: //
- Return: //错误码
- *************************************************************/
- //int32 __stdcall ZAux_Direct_MoveAbs(ZMC_HANDLE handle, int imaxaxises, float *pfDisancelist);
- [DllImport("zauxdll.dll", EntryPoint = "ZAux_Direct_MoveAbs", CharSet = CharSet.Ansi, CallingConvention = CallingConvention.StdCall)]
- public static extern Int32 ZAux_Direct_MoveAbs(IntPtr handle, int imaxaxises, ref float pfDisancelist);
- /*************************************************************
- Description: //插补 直接调用运动函数 20130901 以后的控制器版本支持
- Input: //卡链接handle
- Output: //
- Return: //错误码
- *************************************************************/
- //int32 __stdcall ZAux_Direct_MoveAbsSp(ZMC_HANDLE handle, int imaxaxises, float *pfDisancelist);
- [DllImport("zauxdll.dll", EntryPoint = "ZAux_Direct_MoveAbsSp", CharSet = CharSet.Ansi, CallingConvention = CallingConvention.StdCall)]
- public static extern Int32 ZAux_Direct_MoveAbsSp(IntPtr handle, int imaxaxises, ref float pfDisancelist);
- /*************************************************************
- Description: //插补 直接调用运动函数 20130901 以后的控制器版本支持
- Input: //卡链接handle
- Output: //
- Return: //错误码
- *************************************************************/
- //int32 __stdcall ZAux_Direct_MoveModify(ZMC_HANDLE handle, int imaxaxises, float *pfDisancelist);
- [DllImport("zauxdll.dll", EntryPoint = "ZAux_Direct_MoveModify", CharSet = CharSet.Ansi, CallingConvention = CallingConvention.StdCall)]
- public static extern Int32 ZAux_Direct_MoveModify(IntPtr handle, int imaxaxises, ref float pfDisancelist);
- /*************************************************************
- Description: //插补 直接调用运动函数 20130901 以后的控制器版本支持
- Input: //卡链接handle
- end1 第一个轴运动坐标
- end2 第二个轴运动坐标
- centre1 第一个轴运动圆心,相对与起始点。
- centre2 第二个轴运动圆心,相对与起始点。
- direction 0-逆时针,1-顺时针
- Output: //
- Return: //错误码
- *************************************************************/
- //int32 __stdcall ZAux_Direct_MoveCirc(ZMC_HANDLE handle, float fend1, float fend2, float fcenter1, float fcenter2, int idirection);
- [DllImport("zauxdll.dll", EntryPoint = "ZAux_Direct_MoveCirc", CharSet = CharSet.Ansi, CallingConvention = CallingConvention.StdCall)]
- public static extern Int32 ZAux_Direct_MoveCirc(IntPtr handle, float fend1, float fend2, float fcenter1, float fcenter2, int idirection);
- /*************************************************************
- Description: //插补 直接调用运动函数 20130901 以后的控制器版本支持
- Input: //卡链接handle
- end1 第一个轴运动坐标
- end2 第二个轴运动坐标
- centre1 第一个轴运动圆心,相对与起始点。
- centre2 第二个轴运动圆心,相对与起始点。
- direction 0-逆时针,1-顺时针
- Output: //
- Return: //错误码
- *************************************************************/
- //int32 __stdcall ZAux_Direct_MoveCircSp(ZMC_HANDLE handle, float fend1, float fend2, float fcenter1, float fcenter2, int idirection);
- [DllImport("zauxdll.dll", EntryPoint = "ZAux_Direct_MoveCircSp", CharSet = CharSet.Ansi, CallingConvention = CallingConvention.StdCall)]
- public static extern Int32 ZAux_Direct_MoveCircSp(IntPtr handle, float fend1, float fend2, float fcenter1, float fcenter2, int idirection);
- /*************************************************************
- Description: //插补 直接调用运动函数 20130901 以后的控制器版本支持
- Input: //卡链接handle
- end1 第一个轴运动坐标,绝对位置
- end2 第二个轴运动坐标,绝对位置
- centre1 第一个轴运动圆心,绝对位置
- centre2 第二个轴运动圆心,绝对位置
- direction 0-逆时针,1-顺时针
- Output: //
- Return: //错误码
- *************************************************************/
- //int32 __stdcall ZAux_Direct_MoveCircAbs(ZMC_HANDLE handle, float fend1, float fend2, float fcenter1, float fcenter2, int idirection);
- [DllImport("zauxdll.dll", EntryPoint = "ZAux_Direct_MoveCircAbs", CharSet = CharSet.Ansi, CallingConvention = CallingConvention.StdCall)]
- public static extern Int32 ZAux_Direct_MoveCircAbs(IntPtr handle, float fend1, float fend2, float fcenter1, float fcenter2, int idirection);
- /*************************************************************
- Description: //插补 直接调用运动函数 20130901 以后的控制器版本支持
- Input: //卡链接handle
- end1 第一个轴运动坐标,绝对位置
- end2 第二个轴运动坐标,绝对位置
- centre1 第一个轴运动圆心,绝对位置
- centre2 第二个轴运动圆心,绝对位置
- direction 0-逆时针,1-顺时针
- Output: //
- Return: //错误码
- *************************************************************/
- //int32 __stdcall ZAux_Direct_MoveCircAbsSp(ZMC_HANDLE handle, float fend1, float fend2, float fcenter1, float fcenter2, int idirection);
- [DllImport("zauxdll.dll", EntryPoint = "ZAux_Direct_MoveCircAbsSp", CharSet = CharSet.Ansi, CallingConvention = CallingConvention.StdCall)]
- public static extern Int32 ZAux_Direct_MoveCircAbsSp(IntPtr handle, float fend1, float fend2, float fcenter1, float fcenter2, int idirection);
- /*************************************************************
- Description: //插补 直接调用运动函数 20130901 以后的控制器版本支持
- Input: //卡链接handle
- mid1 第一个轴中间点,相对起始点距离
- mid2 第二个轴中间点,相对起始点距离
- end1 第一个轴结束点,相对起始点距离
- end2 第二个轴结束点,相对起始点距离
- Output: //
- Return: //错误码
- *************************************************************/
- //int32 __stdcall ZAux_Direct_MoveCirc2(ZMC_HANDLE handle, float fmid1, float fmid2, float fend1, float fend2);
- [DllImport("zauxdll.dll", EntryPoint = "ZAux_Direct_MoveCirc2", CharSet = CharSet.Ansi, CallingConvention = CallingConvention.StdCall)]
- public static extern Int32 ZAux_Direct_MoveCirc2(IntPtr handle, float fmid1, float fmid2, float fend1, float fend2);
- /*************************************************************
- Description: //插补 直接调用运动函数 20130901 以后的控制器版本支持
- Input: //卡链接handle
- mid1 第一个轴中间点,绝对位置
- mid2 第二个轴中间点,绝对位置
- end1 第一个轴结束点,绝对位置
- end2 第二个轴结束点,绝对位置
- Output: //
- Return: //错误码
- *************************************************************/
- //int32 __stdcall ZAux_Direct_MoveCirc2Abs(ZMC_HANDLE handle, float fmid1, float fmid2, float fend1, float fend2);
- [DllImport("zauxdll.dll", EntryPoint = "ZAux_Direct_MoveCirc2Abs", CharSet = CharSet.Ansi, CallingConvention = CallingConvention.StdCall)]
- public static extern Int32 ZAux_Direct_MoveCirc2Abs(IntPtr handle, float fmid1, float fmid2, float fend1, float fend2);
- /*************************************************************
- Description: //插补 直接调用运动函数 20130901 以后的控制器版本支持
- Input: //卡链接handle
- mid1 第一个轴中间点,相对起始点距离
- mid2 第二个轴中间点,相对起始点距离
- end1 第一个轴结束点,相对起始点距离
- end2 第二个轴结束点,相对起始点距离
- Output: //
- Return: //错误码
- *************************************************************/
- //int32 __stdcall ZAux_Direct_MoveCirc2Sp(ZMC_HANDLE handle, float fmid1, float fmid2, float fend1, float fend2);
- [DllImport("zauxdll.dll", EntryPoint = "ZAux_Direct_MoveCirc2Sp", CharSet = CharSet.Ansi, CallingConvention = CallingConvention.StdCall)]
- public static extern Int32 ZAux_Direct_MoveCirc2Sp(IntPtr handle, float fmid1, float fmid2, float fend1, float fend2);
- /*************************************************************
- Description: //插补 直接调用运动函数 20130901 以后的控制器版本支持
- Input: //卡链接handle
- mid1 第一个轴中间点,绝对位置
- mid2 第二个轴中间点,绝对位置
- end1 第一个轴结束点,绝对位置
- end2 第二个轴结束点,绝对位置
- Output: //
- Return: //错误码
- *************************************************************/
- //int32 __stdcall ZAux_Direct_MoveCirc2AbsSp(ZMC_HANDLE handle, float fmid1, float fmid2, float fend1, float fend2);
- [DllImport("zauxdll.dll", EntryPoint = "ZAux_Direct_MoveCirc2AbsSp", CharSet = CharSet.Ansi, CallingConvention = CallingConvention.StdCall)]
- public static extern Int32 ZAux_Direct_MoveCirc2AbsSp(IntPtr handle, float fmid1, float fmid2, float fend1, float fend2);
- /*************************************************************
- Description: //插补
- Input: //卡链接handle
- end1 第一个轴运动坐标
- end2 第二个轴运动坐标
- centre1 第一个轴运动圆心,相对与起始点
- centre2 第二个轴运动圆心,相对与起始点
- direction 0-逆时针,1-顺时针
- distance3第三个轴运动距离。
- mode 第三轴的速度计算:
- 0(缺省)
- 第三轴参与速度计算。
- 1
- 第三轴不参与速度计算。
-
- Output: //
- Return: //错误码
- *************************************************************/
- //int32 __stdcall ZAux_Direct_MHelical(ZMC_HANDLE handle, float fend1, float fend2, float fcenter1, float fcenter2, int idirection, float fDistance3, int imode);
- [DllImport("zauxdll.dll", EntryPoint = "ZAux_Direct_MHelical", CharSet = CharSet.Ansi, CallingConvention = CallingConvention.StdCall)]
- public static extern Int32 ZAux_Direct_MHelical(IntPtr handle,float fend1, float fend2, float fcenter1, float fcenter2, int idirection, float fDistance3, int imode);
- /*************************************************************
- Description: //插补
- Input: //卡链接handle
- end1 第一个轴运动坐标
- end2 第二个轴运动坐标
- centre1 第一个轴运动圆心,相对与起始点
- centre2 第二个轴运动圆心,相对与起始点
- direction 0-逆时针,1-顺时针
- distance3第三个轴运动距离。
- mode 第三轴的速度计算:
- 0(缺省)
- 第三轴参与速度计算。
- 1
- 第三轴不参与速度计算。
-
- Output: //
- Return: //错误码
- *************************************************************/
- //int32 __stdcall ZAux_Direct_MHelicalAbs(ZMC_HANDLE handle, float fend1, float fend2, float fcenter1, float fcenter2, int idirection, float fDistance3, int imode);
- [DllImport("zauxdll.dll", EntryPoint = "ZAux_Direct_MHelicalAbs", CharSet = CharSet.Ansi, CallingConvention = CallingConvention.StdCall)]
- public static extern Int32 ZAux_Direct_MHelicalAbs(IntPtr handle,float fend1, float fend2, float fcenter1, float fcenter2, int idirection, float fDistance3, int imode);
- /*************************************************************
- Description: //插补
- Input: //卡链接handle
- end1 第一个轴运动坐标
- end2 第二个轴运动坐标
- centre1 第一个轴运动圆心,相对与起始点
- centre2 第二个轴运动圆心,相对与起始点
- direction 0-逆时针,1-顺时针
- distance3第三个轴运动距离。
- mode 第三轴的速度计算:
- 0(缺省)
- 第三轴参与速度计算。
- 1
- 第三轴不参与速度计算。
-
- Output: //
- Return: //错误码
- *************************************************************/
- //int32 __stdcall ZAux_Direct_MHelicalSp(ZMC_HANDLE handle, float fend1, float fend2, float fcenter1, float fcenter2, int idirection, float fDistance3, int imode);
- [DllImport("zauxdll.dll", EntryPoint = "ZAux_Direct_MHelicalSp", CharSet = CharSet.Ansi, CallingConvention = CallingConvention.StdCall)]
- public static extern Int32 ZAux_Direct_MHelicalSp(IntPtr handle, float fend1, float fend2, float fcenter1, float fcenter2, int idirection, float fDistance3, int imode);
- /*************************************************************
- Description: //插补
- Input: //卡链接handle
- end1 第一个轴运动坐标
- end2 第二个轴运动坐标
- centre1 第一个轴运动圆心,相对与起始点
- centre2 第二个轴运动圆心,相对与起始点
- direction 0-逆时针,1-顺时针
- distance3第三个轴运动距离。
- mode 第三轴的速度计算:
- 0(缺省)
- 第三轴参与速度计算。
- 1
- 第三轴不参与速度计算。
-
- Output: //
- Return: //错误码
- *************************************************************/
- //int32 __stdcall ZAux_Direct_MHelicalAbsSp(ZMC_HANDLE handle, float fend1, float fend2, float fcenter1, float fcenter2, int idirection, float fDistance3, int imode);
- [DllImport("zauxdll.dll", EntryPoint = "ZAux_Direct_MHelicalAbsSp", CharSet = CharSet.Ansi, CallingConvention = CallingConvention.StdCall)]
- public static extern Int32 ZAux_Direct_MHelicalAbsSp(IntPtr handle,float fend1, float fend2, float fcenter1, float fcenter2, int idirection, float fDistance3, int imode);
- /*************************************************************
- Description: //插补
- Input: //卡链接handle
- mid1 第一个轴中间点
- mid2 第二个轴中间点
- end1 第一个轴结束点
- end2 第二个轴结束点
- distance3第三个轴运动距离
- mode 第三轴的速度计算:
- Output: //
- Return: //错误码
- *************************************************************/
- //int32 __stdcall ZAux_Direct_MHelical2(ZMC_HANDLE handle, float fmid1, float fmid2, float fend1, float fend2, float fDistance3, int imode);
- [DllImport("zauxdll.dll", EntryPoint = "ZAux_Direct_MHelical2", CharSet = CharSet.Ansi, CallingConvention = CallingConvention.StdCall)]
- public static extern Int32 ZAux_Direct_MHelical2(IntPtr handle, float fmid1, float fmid2, float fend1, float fend2, float fDistance3, int imode);
- /*************************************************************
- Description: //插补
- Input: //卡链接handle
- mid1 第一个轴中间点
- mid2 第二个轴中间点
- end1 第一个轴结束点
- end2 第二个轴结束点
- distance3 第三个轴运动结束点
- mode 第三轴的速度计算:
- Output: //
- Return: //错误码
- *************************************************************/
- //int32 __stdcall ZAux_Direct_MHelical2Abs(ZMC_HANDLE handle, float fmid1, float fmid2, float fend1, float fend2, float fDistance3, int imode);
- [DllImport("zauxdll.dll", EntryPoint = "ZAux_Direct_MHelical2Abs", CharSet = CharSet.Ansi, CallingConvention = CallingConvention.StdCall)]
- public static extern Int32 ZAux_Direct_MHelical2Abs(IntPtr handle, float fmid1, float fmid2, float fend1, float fend2, float fDistance3, int imode);
- /*************************************************************
- Description: //插补
- Input: //卡链接handle
- mid1 第一个轴中间点
- mid2 第二个轴中间点
- end1 第一个轴结束点
- end2 第二个轴结束点
- distance3第三个轴运动距离
- mode 第三轴的速度计算:
- Output: //
- Return: //错误码
- *************************************************************/
- //int32 __stdcall ZAux_Direct_MHelical2Sp(ZMC_HANDLE handle, float fmid1, float fmid2, float fend1, float fend2, float fDistance3, int imode);
- [DllImport("zauxdll.dll", EntryPoint = "ZAux_Direct_MHelical2Sp", CharSet = CharSet.Ansi, CallingConvention = CallingConvention.StdCall)]
- public static extern Int32 ZAux_Direct_MHelical2Sp(IntPtr handle, float fmid1, float fmid2, float fend1, float fend2, float fDistance3, int imode);
- /*************************************************************
- Description: //插补
- Input: //卡链接handle
- mid1 第一个轴中间点
- mid2 第二个轴中间点
- end1 第一个轴结束点
- end2 第二个轴结束点
- distance3 第三个轴运动结束点
- mode 第三轴的速度计算:
- Output: //
- Return: //错误码
- *************************************************************/
- //int32 __stdcall ZAux_Direct_MHelical2AbsSp(ZMC_HANDLE handle, float fmid1, float fmid2, float fend1, float fend2, float fDistance3, int imode);
- [DllImport("zauxdll.dll", EntryPoint = "ZAux_Direct_MHelical2AbsSp", CharSet = CharSet.Ansi, CallingConvention = CallingConvention.StdCall)]
- public static extern Int32 ZAux_Direct_MHelical2AbsSp(IntPtr handle, float fmid1, float fmid2, float fend1, float fend2, float fDistance3, int imode);
- /*************************************************************
- Description: //插补
- Input: //卡链接handle
- Output: //
- Return: //错误码
- *************************************************************/
- //int32 __stdcall ZAux_Direct_MEclipse(ZMC_HANDLE handle, float fend1, float fend2, float fcenter1, float fcenter2, int idirection, float fADis, float fBDis);
- [DllImport("zauxdll.dll", EntryPoint = "ZAux_Direct_MHelical2AbsSp", CharSet = CharSet.Ansi, CallingConvention = CallingConvention.StdCall)]
- public static extern Int32 ZAux_Direct_MHelical2AbsSp(IntPtr handle, float fend1, float fend2, float fcenter1, float fcenter2, int idirection, float fADis, float fBDis);
- /*************************************************************
- Description: //插补
- Input: //卡链接handle
- Output: //
- Return: //错误码
- *************************************************************/
- //int32 __stdcall ZAux_Direct_MEclipseAbs(ZMC_HANDLE handle, float fend1, float fend2, float fcenter1, float fcenter2, int idirection, float fADis, float fBDis);
- [DllImport("zauxdll.dll", EntryPoint = "ZAux_Direct_MEclipseAbs", CharSet = CharSet.Ansi, CallingConvention = CallingConvention.StdCall)]
- public static extern Int32 ZAux_Direct_MEclipseAbs(IntPtr handle, float fend1, float fend2, float fcenter1, float fcenter2, int idirection, float fADis, float fBDis);
- /*************************************************************
- Description: //插补
- Input: //卡链接handle
- Output: //
- Return: //错误码
- *************************************************************/
- //int32 __stdcall ZAux_Direct_MEclipseSp(ZMC_HANDLE handle, float fend1, float fend2, float fcenter1, float fcenter2, int idirection, float fADis, float fBDis);
- [DllImport("zauxdll.dll", EntryPoint = "ZAux_Direct_MEclipseSp", CharSet = CharSet.Ansi, CallingConvention = CallingConvention.StdCall)]
- public static extern Int32 ZAux_Direct_MEclipseSp(IntPtr handle, float fend1, float fend2, float fcenter1, float fcenter2, int idirection, float fADis, float fBDis);
- /*************************************************************
- Description: //插补
- Input: //卡链接handle
- Output: //
- Return: //错误码
- *************************************************************/
- //int32 __stdcall ZAux_Direct_MEclipseAbsSp(ZMC_HANDLE handle, float fend1, float fend2, float fcenter1, float fcenter2, int idirection, float fADis, float fBDis);
- [DllImport("zauxdll.dll", EntryPoint = "ZAux_Direct_MEclipseAbsSp", CharSet = CharSet.Ansi, CallingConvention = CallingConvention.StdCall)]
- public static extern Int32 ZAux_Direct_MEclipseAbsSp(IntPtr handle, float fend1, float fend2, float fcenter1, float fcenter2, int idirection, float fADis, float fBDis);
- /*************************************************************
- Description: //插补 椭圆 + 螺旋
- Input: //卡链接handle
- Output: //
- Return: //错误码
- *************************************************************/
- //int32 __stdcall ZAux_Direct_MEclipseHelical(ZMC_HANDLE handle, float fend1, float fend2, float fcenter1, float fcenter2, int idirection, float fADis, float fBDis, float fDistance3);
- [DllImport("zauxdll.dll", EntryPoint = "ZAux_Direct_MEclipseHelical", CharSet = CharSet.Ansi, CallingConvention = CallingConvention.StdCall)]
- 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);
- /*************************************************************
- Description: //插补 椭圆 + 螺旋
- Input: //卡链接handle
- Output: //
- Return: //错误码
- *************************************************************/
- //int32 __stdcall ZAux_Direct_MEclipseHelicalAbs(ZMC_HANDLE handle, float fend1, float fend2, float fcenter1, float fcenter2, int idirection, float fADis, float fBDis,float fDistance3);
- [DllImport("zauxdll.dll", EntryPoint = "ZAux_Direct_MEclipseHelicalAbs", CharSet = CharSet.Ansi, CallingConvention = CallingConvention.StdCall)]
- 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);
- /*************************************************************
- Description: //插补 椭圆 + 螺旋
- Input: //卡链接handle
- Output: //
- Return: //错误码
- *************************************************************/
- //int32 __stdcall ZAux_Direct_MEclipseHelicalSp(ZMC_HANDLE handle, float fend1, float fend2, float fcenter1, float fcenter2, int idirection, float fADis, float fBDis, float fDistance3);
- [DllImport("zauxdll.dll", EntryPoint = "ZAux_Direct_MEclipseHelicalSp", CharSet = CharSet.Ansi, CallingConvention = CallingConvention.StdCall)]
- 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);
- /*************************************************************
- Description: //插补 椭圆 + 螺旋
- Input: //卡链接handle
- Output: //
- Return: //错误码
- *************************************************************/
- //int32 __stdcall ZAux_Direct_MEclipseHelicalAbsSp(ZMC_HANDLE handle, float fend1, float fend2, float fcenter1, float fcenter2, int idirection, float fADis, float fBDis,float fDistance3);
- [DllImport("zauxdll.dll", EntryPoint = "ZAux_Direct_MEclipseHelicalAbsSp", CharSet = CharSet.Ansi, CallingConvention = CallingConvention.StdCall)]
- 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);
- /*************************************************************
- Description: //插补 空间圆弧
- Input: //卡链接handle
- end1 第1个轴运动距离参数1
- end2 第2个轴运动距离参数1
- end3 第3个轴运动距离参数1
- centre1 第1个轴运动距离参数2
- centre2 第2个轴运动距离参数2
- centre3 第3个轴运动距离参数2
- mode 指定前面参数的意义
- 0 当前点,中间点,终点三点定圆弧,距离参数1为终点距离,距离参数2为中间点距离。
- 1 走最小的圆弧,距离参数1为终点距离,距离参数2为圆心的距离。
- 2 当前点,中间点,终点三点定圆,距离参数1为终点距离,距离参数2为中间点距离。
- 3 先走最小的圆弧,再继续走完整圆,距离参数1为终点距离,距离参数2为圆心的距离。
-
- Output: //
- Return: //错误码
- *************************************************************/
- //int32 __stdcall ZAux_Direct_MSpherical(ZMC_HANDLE handle, float fend1, float fend2, float fend3, float fcenter1, float fcenter2, float fcenter3, int imode);
- [DllImport("zauxdll.dll", EntryPoint = "ZAux_Direct_MEclipseHelicalAbsSp", CharSet = CharSet.Ansi, CallingConvention = CallingConvention.StdCall)]
- public static extern Int32 ZAux_Direct_MEclipseHelicalAbsSp(IntPtr handle, float fend1, float fend2, float fend3, float fcenter1, float fcenter2, float fcenter3, int imode);
- /*************************************************************
- Description: //插补 空间圆弧
- Input: //卡链接handle
- end1 第1个轴运动距离参数1
- end2 第2个轴运动距离参数1
- end3 第3个轴运动距离参数1
- centre1 第1个轴运动距离参数2
- centre2 第2个轴运动距离参数2
- centre3 第3个轴运动距离参数2
- mode 指定前面参数的意义
- 0 当前点,中间点,终点三点定圆弧,距离参数1为终点距离,距离参数2为中间点距离。
- 1 走最小的圆弧,距离参数1为终点距离,距离参数2为圆心的距离。
- 2 当前点,中间点,终点三点定圆,距离参数1为终点距离,距离参数2为中间点距离。
- 3 先走最小的圆弧,再继续走完整圆,距离参数1为终点距离,距离参数2为圆心的距离。
-
- Output: //
- Return: //错误码
- *************************************************************/
- //int32 __stdcall ZAux_Direct_MSphericalSp(ZMC_HANDLE handle, float fend1, float fend2, float fend3, float fcenter1, float fcenter2, float fcenter3, int imode);
- [DllImport("zauxdll.dll", EntryPoint = "ZAux_Direct_MSphericalSp", CharSet = CharSet.Ansi, CallingConvention = CallingConvention.StdCall)]
- public static extern Int32 ZAux_Direct_MSphericalSp(IntPtr handle, float fend1, float fend2, float fend3, float fcenter1, float fcenter2, float fcenter3, int imode);
- /*************************************************************
- Description: //运动暂停
- Input: //卡链接handle
- 0(缺省) 暂停当前运动。
- 1 在当前运动完成后正准备执行下一条运动指令时暂停。
- 2 在当前运动完成后正准备执行下一条运动指令时,并且两条指令的MARK标识不一样时暂停。这个模式可以用于一个动作由多个指令来实现时,可以在一整个动作完成后暂停。
- Output: //
- Return: //错误码
- *************************************************************/
- //int32 __stdcall ZAux_Direct_MovePause(ZMC_HANDLE handle, int imode);
- [DllImport("zauxdll.dll", EntryPoint = "ZAux_Direct_MovePause", CharSet = CharSet.Ansi, CallingConvention = CallingConvention.StdCall)]
- public static extern Int32 ZAux_Direct_MovePause(IntPtr handle,int imode);
- /*************************************************************
- Description: //运动暂停
- Input: //卡链接handle
- 0(缺省) 暂停当前运动。
- 1 在当前运动完成后正准备执行下一条运动指令时暂停。
- 2 在当前运动完成后正准备执行下一条运动指令时,并且两条指令的MARK标识不一样时暂停。这个模式可以用于一个动作由多个指令来实现时,可以在一整个动作完成后暂停。
- Output: //
- Return: //错误码
- *************************************************************/
- //int32 __stdcall ZAux_Direct_MoveResume(ZMC_HANDLE handle);
- [DllImport("zauxdll.dll", EntryPoint = "ZAux_Direct_MoveResume", CharSet = CharSet.Ansi, CallingConvention = CallingConvention.StdCall)]
- public static extern Int32 ZAux_Direct_MoveResume(IntPtr handle);
- /*************************************************************
- Description: //在运动缓冲中加入输出指令
- Input: //卡链接handle
- Output: //
- Return: //错误码
- *************************************************************/
- //int32 __stdcall ZAux_Direct_MoveOp(ZMC_HANDLE handle, int ioutnum, int ivalue);
- [DllImport("zauxdll.dll", EntryPoint = "ZAux_Direct_MoveOp", CharSet = CharSet.Ansi, CallingConvention = CallingConvention.StdCall)]
- public static extern Int32 ZAux_Direct_MoveOp(IntPtr handle, int ioutnum, int ivalue);
- /*************************************************************
- Description: //在运动缓冲中加入输出指令
- Input: //卡链接handle
- Output: //
- Return: //错误码
- *************************************************************/
- //int32 __stdcall ZAux_Direct_MoveOpMulti(ZMC_HANDLE handle, int ioutnumfirst, int ioutnumend, int ivalue);
- [DllImport("zauxdll.dll", EntryPoint = "ZAux_Direct_MoveOpMulti", CharSet = CharSet.Ansi, CallingConvention = CallingConvention.StdCall)]
- public static extern Int32 ZAux_Direct_MoveOpMulti(IntPtr handle, int ioutnumfirst, int ioutnumend, int ivalue);
- /*************************************************************
- Description: //在运动缓冲中加入输出指令
- Input: //卡链接handle
- Output: //
- Return: //错误码
- *************************************************************/
- //int32 __stdcall ZAux_Direct_MoveOp2(ZMC_HANDLE handle, int ioutnum, int ivalue, int iofftimems);
- [DllImport("zauxdll.dll", EntryPoint = "ZAux_Direct_MoveOp2", CharSet = CharSet.Ansi, CallingConvention = CallingConvention.StdCall)]
- public static extern Int32 ZAux_Direct_MoveOp2(IntPtr handle, int ioutnum, int ivalue, int iofftimems);
- /*************************************************************
- Description: //在运动缓冲中加入延时指令
- Input: //卡链接handle
- Output: //
- Return: //错误码
- *************************************************************/
- //int32 __stdcall ZAux_Direct_MoveDelay(ZMC_HANDLE handle, int itimems);
- [DllImport("zauxdll.dll", EntryPoint = "ZAux_Direct_MoveDelay", CharSet = CharSet.Ansi, CallingConvention = CallingConvention.StdCall)]
- public static extern Int32 ZAux_Direct_MoveDelay(IntPtr handle,int itimems);
- /*************************************************************
- Description: //电子凸轮
- Input: //卡链接handle
- Output: //
- Return: //错误码
- *************************************************************/
- //int32 __stdcall ZAux_Direct_Cam(ZMC_HANDLE handle, int istartpoint, int iendpoint, float ftablemulti, float fDistance);
- [DllImport("zauxdll.dll", EntryPoint = "ZAux_Direct_Cam", CharSet = CharSet.Ansi, CallingConvention = CallingConvention.StdCall)]
- public static extern Int32 ZAux_Direct_Cam(IntPtr handle, int istartpoint, int iendpoint, float ftablemulti, float fDistance);
- /*************************************************************
- Description: //电子凸轮
- Input: //卡链接handle
- Output: //
- Return: //错误码
- *************************************************************/
- //int32 __stdcall ZAux_Direct_Cambox(ZMC_HANDLE handle, int istartpoint, int iendpoint, float ftablemulti, float fDistance, int ilinkaxis, int ioption, float flinkstartpos);
- [DllImport("zauxdll.dll", EntryPoint = "ZAux_Direct_Cambox", CharSet = CharSet.Ansi, CallingConvention = CallingConvention.StdCall)]
- public static extern Int32 ZAux_Direct_Cambox(IntPtr handle, int istartpoint, int iendpoint, float ftablemulti, float fDistance, int ilinkaxis, int ioption, float flinkstartpos);
- /*************************************************************
- Description: //连接 特殊凸轮
- Input: //卡链接handle
- Output: //
- Return: //错误码
- *************************************************************/
- //int32 __stdcall ZAux_Direct_Movelink(ZMC_HANDLE handle, float fDistance, float fLinkDis, float fLinkAcc, float fLinkDec,int iLinkaxis, int ioption, float flinkstartpos);
- [DllImport("zauxdll.dll", EntryPoint = "ZAux_Direct_Movelink", CharSet = CharSet.Ansi, CallingConvention = CallingConvention.StdCall)]
- public static extern Int32 ZAux_Direct_Movelink(IntPtr handle, float fDistance, float fLinkDis, float fLinkAcc, float fLinkDec,int iLinkaxis, int ioption, float flinkstartpos);
- /*************************************************************
- Description: //位置锁存指令
- Input: //卡链接handle
- Output: //
- Return: //错误码
- *************************************************************/
- //int32 __stdcall ZAux_Direct_Regist(ZMC_HANDLE handle, int imode);
- [DllImport("zauxdll.dll", EntryPoint = "ZAux_Direct_Regist", CharSet = CharSet.Ansi, CallingConvention = CallingConvention.StdCall)]
- public static extern Int32 ZAux_Direct_Regist(IntPtr handle,int imode );
- /*************************************************************
- Description: //所有轴立即停止
- Input: //卡链接handle
- Output: //
- Return: //错误码
- *************************************************************/
- //int32 __stdcall ZAux_Direct_Rapidstop(ZMC_HANDLE handle, int imode);
- [DllImport("zauxdll.dll", EntryPoint = "ZAux_Direct_Rapidstop", CharSet = CharSet.Ansi, CallingConvention = CallingConvention.StdCall)]
- public static extern Int32 ZAux_Direct_Rapidstop(IntPtr handle,int imode );
- /*************************************************************
- Description: //参数
- Input: //卡链接handle
- Output: //
- Return: //错误码
- *************************************************************/
- //int32 __stdcall ZAux_Direct_GetIn(ZMC_HANDLE handle, int ionum, uint32 *piValue);
- [DllImport("zauxdll.dll", EntryPoint = "ZAux_Direct_GetIn", CharSet = CharSet.Ansi, CallingConvention = CallingConvention.StdCall)]
- public static extern Int32 ZAux_Direct_GetIn(IntPtr handle, int ionum, ref UInt32 piValue );
- /*************************************************************
- Description: //参数
- Input: //卡链接handle
- Output: //
- Return: //错误码
- *************************************************************/
- //int32 __stdcall ZAux_Direct_SetOp(ZMC_HANDLE handle, int ionum, uint32 iValue);
- [DllImport("zauxdll.dll", EntryPoint = "ZAux_Direct_SetOp", CharSet = CharSet.Ansi, CallingConvention = CallingConvention.StdCall)]
- public static extern Int32 ZAux_Direct_SetOp(IntPtr handle, int ionum, UInt32 iValue );
- /*************************************************************
- Description: //单轴运动
- Input: //卡链接handle 轴号, 距离
- Output: //
- Return: //错误码
- *************************************************************/
- //int32 __stdcall ZAux_Direct_Singl_Move(ZMC_HANDLE handle, int iaxis, float fdistance);
- [DllImport("zauxdll.dll", EntryPoint = "ZAux_Direct_Singl_Move", CharSet = CharSet.Ansi, CallingConvention = CallingConvention.StdCall)]
- public static extern Int32 ZAux_Direct_Singl_Move(IntPtr handle, int iaxis, float fdistance);
- /*************************************************************
- Description: //单轴运动
- Input: //卡链接handle 轴号, 距离
- Output: //
- Return: //错误码
- *************************************************************/
- //int32 __stdcall ZAux_Direct_Singl_MoveAbs(ZMC_HANDLE handle, int iaxis, float fdistance);
- [DllImport("zauxdll.dll", EntryPoint = "ZAux_Direct_Singl_MoveAbs", CharSet = CharSet.Ansi, CallingConvention = CallingConvention.StdCall)]
- public static extern Int32 ZAux_Direct_Singl_MoveAbs(IntPtr handle, int iaxis, float fdistance);
- // #if 0
- //辅助函数
- //#endif
- /*************************************************************
- Description: //字符串转为float
- Input: //卡链接handle
- Output: //
- Return: //错误码
- *************************************************************/
- //int32 __stdcall ZAux_TransStringtoFloat(const char* pstringin, int inumes, float* pfvlaue);
- [DllImport("zauxdll.dll", EntryPoint = "ZAux_TransStringtoFloat", CharSet = CharSet.Ansi, CallingConvention = CallingConvention.StdCall)]
- public static extern Int32 ZAux_TransStringtoFloat(string pstringin, int inumes, ref float pfvlaue);
- /*************************************************************
- Description: //字符串转为int
- Input: //卡链接handle
- Output: //
- Return: //错误码
- *************************************************************/
- //int32 __stdcall ZAux_TransStringtoInt(const char* pstringin, int inumes, int* pivlaue);
- [DllImport("zauxdll.dll", EntryPoint = "ZAux_TransStringtoInt", CharSet = CharSet.Ansi, CallingConvention = CallingConvention.StdCall)]
- public static extern Int32 ZAux_TransStringtoInt(string pstringin, int inumes, ref int pivlaue);
- //
- /*************************************************************
- Description: //把卡的handle 与 卡号关联起来, 这样后面就可以直接用卡号来操作了
- Input: //卡链接handle
- Output: //
- Return: //错误码
- *************************************************************/
- //int32 __stdcall ZAux_Spec_Init();
- [DllImport("zauxdll.dll", EntryPoint = "ZAux_Spec_Init", CharSet = CharSet.Ansi, CallingConvention = CallingConvention.StdCall)]
- public static extern Int32 ZAux_Spec_Init();
- /*************************************************************
- Description: //把卡的handle 与 卡号关联起来, 这样后面就可以直接用卡号来操作了
- Input: //卡链接handle
- Output: //
- Return: //错误码
- *************************************************************/
- //int32 __stdcall ZAux_Spec_SetCardHandle(WORD card, ZMC_HANDLE handle);
- [DllImport("zauxdll.dll", EntryPoint = "ZAux_Spec_SetCardHandle", CharSet = CharSet.Ansi, CallingConvention = CallingConvention.StdCall)]
- public static extern Int32 ZAux_Spec_SetCardHandle(UInt16 card, IntPtr handle);
- /*************************************************************
- Description: //把卡的handle 与 卡号关联起来, 这样后面就可以直接用卡号来操作了
- Input: //卡号
- Output: //
- Return: //错误码
- *************************************************************/
- //int32 __stdcall ZAux_Spec_UnSetCardHandle(WORD card);
- [DllImport("zauxdll.dll", EntryPoint = "ZAux_Spec_UnSetCardHandle", CharSet = CharSet.Ansi, CallingConvention = CallingConvention.StdCall)]
- public static extern Int32 ZAux_Spec_UnSetCardHandle(UInt16 card);
- /*************************************************************
- Description: //单轴点位运动
- Input: //卡号
- Output: //
- Return: //错误码
- *************************************************************/
- //int32 __stdcall ZAux_Spec_GetTotalAxises(WORD card);
- [DllImport("zauxdll.dll", EntryPoint = "ZAux_Spec_GetTotalAxises", CharSet = CharSet.Ansi, CallingConvention = CallingConvention.StdCall)]
- public static extern Int32 ZAux_Spec_GetTotalAxises(UInt16 card);
- /*************************************************************
- Description: // 设置轨迹的运动参数
- Input: //卡号
- Output: //
- Return: //错误码
- *************************************************************/
- //int32 __stdcall ZAux_Spec_SetVectProfile(WORD card, double spara, int32 speed, int32 acc, int32 dec );
- [DllImport("zauxdll.dll", EntryPoint = "ZAux_Spec_SetVectProfile", CharSet = CharSet.Ansi, CallingConvention = CallingConvention.StdCall)]
- public static extern Int32 ZAux_Spec_SetVectProfile(UInt16 card,double spara, Int32 speed, Int32 acc, Int32 dec );
- /*************************************************************
- Description: // 设置单轴的运动参数
- Input: //卡号
- Output: //
- Return: //错误码
- *************************************************************/
- //int32 __stdcall ZAux_Spec_SetProfile(WORD card, int iaxis, int32 speed, int32 acc, int32 dec);
- [DllImport("zauxdll.dll", EntryPoint = "ZAux_Spec_SetProfile", CharSet = CharSet.Ansi, CallingConvention = CallingConvention.StdCall)]
- public static extern Int32 ZAux_Spec_SetProfile(UInt16 card,int iaxis, Int32 speed, Int32 acc, Int32 dec);
- /*************************************************************
- Description: // 读取坐标
- Input: //卡号
- Output: //
- Return: //错误码
- *************************************************************/
- //int32 __stdcall ZAux_Spec_SetSProfile(WORD card, int iaxis, double spara);
- [DllImport("zauxdll.dll", EntryPoint = "ZAux_Spec_SetSProfile", CharSet = CharSet.Ansi, CallingConvention = CallingConvention.StdCall)]
- public static extern Int32 ZAux_Spec_SetSProfile(UInt16 card,int iaxis, double spara);
- /*************************************************************
- Description: //单轴点位运动
- Input: //卡号
- Output: //
- Return: //错误码
- *************************************************************/
- //int32 __stdcall ZAux_Spec_PMove(WORD card, int iaxis, int Length);
- [DllImport("zauxdll.dll", EntryPoint = "ZAux_Spec_PMove", CharSet = CharSet.Ansi, CallingConvention = CallingConvention.StdCall)]
- public static extern Int32 ZAux_Spec_PMove(UInt16 card, int iaxis, int Length);
- /*************************************************************
- Description: //单轴点位运动
- Input: //卡号
- Output: //
- Return: //错误码
- *************************************************************/
- //int32 __stdcall ZAux_Spec_PMoveAbs(WORD card, int iaxis, int Length);
- [DllImport("zauxdll.dll", EntryPoint = "ZAux_Spec_PMoveAbs", CharSet = CharSet.Ansi, CallingConvention = CallingConvention.StdCall)]
- public static extern Int32 ZAux_Spec_PMoveAbs(UInt16 card, int iaxis, int Length);
- /*************************************************************
- Description: //PMOVE时动态调整位置
- Input: //卡号
- Output: //
- Return: //错误码
- *************************************************************/
- //int32 __stdcall ZAux_Spec_ResetTargetPostion(WORD card, int iaxis, int Length);
- [DllImport("zauxdll.dll", EntryPoint = "ZAux_Spec_ResetTargetPostion", CharSet = CharSet.Ansi, CallingConvention = CallingConvention.StdCall)]
- public static extern Int32 ZAux_Spec_ResetTargetPostion(UInt16 card, int iaxis, int Length);
- /*************************************************************
- Description: //SP指定速度的运动
- Input: //卡号 dir 1- 正向, 2-负向
- Output: //
- Return: //错误码
- *************************************************************/
- //int32 __stdcall ZAux_Spec_VMove(WORD card, int iaxis, int dir);
- [DllImport("zauxdll.dll", EntryPoint = "ZAux_Spec_VMove", CharSet = CharSet.Ansi, CallingConvention = CallingConvention.StdCall)]
- public static extern Int32 ZAux_Spec_VMove(UInt16 card,int iaxis, int dir);
- /*************************************************************
- Description: // 脉冲模式设置
- Input: //卡号
- Output: //
- Return: //错误码
- *************************************************************/
- //int32 __stdcall ZAux_Spec_SetPulOutMode(WORD card, int iaxis, int iset);
- [DllImport("zauxdll.dll", EntryPoint = "ZAux_Spec_SetPulOutMode", CharSet = CharSet.Ansi, CallingConvention = CallingConvention.StdCall)]
- public static extern Int32 ZAux_Spec_SetPulOutMode(UInt16 card,int iaxis, int iset);
- /*************************************************************
- Description: // 编码器模式设置,这个对应到不同的ATYPE,无法映射
- Input: //卡号
- Output: //
- Return: //错误码
- *************************************************************/
- //int32 __stdcall ZAux_Spec_SetCounterMode(WORD card, int iaxis, int iset);
- [DllImport("zauxdll.dll", EntryPoint = "ZAux_Spec_SetCounterMode", CharSet = CharSet.Ansi, CallingConvention = CallingConvention.StdCall)]
- public static extern Int32 ZAux_Spec_SetCounterMode(UInt16 card,int iaxis, int iset);
- /*************************************************************
- Description: // 手轮, 用编码器来模拟
- Input: //卡号 AB类型还是 脉冲方向 类型
- 这里只配置ATYPE, 当使用扩展轴时,ATYPE类型不一样.
- Output: //
- Return: //错误码
- *************************************************************/
- //int32 __stdcall ZAux_Spec_SetHandle(WORD card, int iaxiscoder, int ifabmode);
- [DllImport("zauxdll.dll", EntryPoint = "ZAux_Spec_SetHandle", CharSet = CharSet.Ansi, CallingConvention = CallingConvention.StdCall)]
- public static extern Int32 ZAux_Spec_SetHandle(UInt16 card, int iaxiscoder, int ifabmode);
- /*************************************************************
- Description: // 手轮, 用编码器来模拟
- Input: //卡号 必须先配置手轮的轴
- Output: //
- Return: //错误码
- *************************************************************/
- //int32 __stdcall ZAux_Spec_HandMove(WORD card, int iaxis, float fratio);
- [DllImport("zauxdll.dll", EntryPoint = "ZAux_Spec_HandMove", CharSet = CharSet.Ansi, CallingConvention = CallingConvention.StdCall)]
- public static extern Int32 ZAux_Spec_HandMove(UInt16 card,int iaxis, float fratio);
- /*************************************************************
- Description: // 减速停止, 立即停止时,把FASTDEC设置很大的值,再调用减速停止
- Output: //
- Return: //错误码
- *************************************************************/
- //int32 __stdcall ZAux_Spec_DeclStop(WORD card, int iaxis);
- [DllImport("zauxdll.dll", EntryPoint = "ZAux_Spec_DeclStop", CharSet = CharSet.Ansi, CallingConvention = CallingConvention.StdCall)]
- public static extern Int32 ZAux_Spec_DeclStop(UInt16 card,int iaxis);
- /*************************************************************
- Description: // 读取坐标
- Input: //卡号
- Output: //
- Return: //错误码
- *************************************************************/
- //int32 __stdcall ZAux_Spec_GetPosition(WORD card, int iaxis);
- [DllImport("zauxdll.dll", EntryPoint = "ZAux_Spec_GetPosition", CharSet = CharSet.Ansi, CallingConvention = CallingConvention.StdCall)]
- public static extern Int32 ZAux_Spec_GetPosition(UInt16 card,int iaxis);
- /*************************************************************
- Description: // 读取坐标
- Input: //卡号
- Output: //
- Return: //错误码
- *************************************************************/
- //int32 __stdcall ZAux_Spec_SetPosition(WORD card, int iaxis, int32 current_position);
- [DllImport("zauxdll.dll", EntryPoint = "ZAux_Spec_SetPosition", CharSet = CharSet.Ansi, CallingConvention = CallingConvention.StdCall)]
- public static extern Int32 ZAux_Spec_SetPosition(UInt16 card, int iaxis, Int32 current_position);
- /*************************************************************
- Description: // 读取坐标
- Input: //卡号
- Output: //
- Return: //错误码
- *************************************************************/
- //int32 __stdcall ZAux_Spec_GetCurSpeed(WORD card, int iaxis);
- [DllImport("zauxdll.dll", EntryPoint = "ZAux_Spec_GetCurSpeed", CharSet = CharSet.Ansi, CallingConvention = CallingConvention.StdCall)]
- public static extern Int32 ZAux_Spec_GetCurSpeed(UInt16 card, int iaxis);
- /*************************************************************
- Description: // 读取坐标
- Input: //卡号
- Output: //
- Return: //错误码
- *************************************************************/
- //int32 __stdcall ZAux_Spec_SetCurSpeed(WORD card, int iaxis, int32 speed);
- [DllImport("zauxdll.dll", EntryPoint = "ZAux_Spec_SetCurSpeed", CharSet = CharSet.Ansi, CallingConvention = CallingConvention.StdCall)]
- public static extern Int32 ZAux_Spec_SetCurSpeed(UInt16 card, int iaxis,Int32 speed);
- /*************************************************************
- Description: // 读取坐标
- Input: //卡号
- Output: //
- Return: //错误码
- *************************************************************/
- //int32 __stdcall ZAux_Spec_ConfigHomeMode(WORD card, int iaxis, int home_dir, int velspeed, int Mode);
- [DllImport("zauxdll.dll", EntryPoint = "ZAux_Spec_ConfigHomeMode", CharSet = CharSet.Ansi, CallingConvention = CallingConvention.StdCall)]
- public static extern Int32 ZAux_Spec_ConfigHomeMode(UInt16 card, int iaxis, int home_dir, int velspeed, int Mode);
- /*************************************************************
- Description: // 读取坐标
- Input: //卡号
- Output: //
- Return: //错误码
- *************************************************************/
- // int32 __stdcall ZAux_Spec_HomeMove(WORD card, int iaxis);
- [DllImport("zauxdll.dll", EntryPoint = "ZAux_Spec_HomeMove", CharSet = CharSet.Ansi, CallingConvention = CallingConvention.StdCall)]
- public static extern Int32 ZAux_Spec_HomeMove(UInt16 card, int iaxis);
- /*************************************************************
- Description: // 减速停止 插补指令, 因为涉及到多个轴,必须修改BASE轴列表
- 注意连续插补的时候不要切换主轴,即BASE的第一个轴
- Output: //
- Return: //错误码
- *************************************************************/
- //int32 __stdcall ZAux_Spec_Line2(WORD card, int iaxis1, int iaxis2, int distance1, int distance2);
- [DllImport("zauxdll.dll", EntryPoint = "ZAux_Spec_Line2", CharSet = CharSet.Ansi, CallingConvention = CallingConvention.StdCall)]
- public static extern Int32 ZAux_Spec_Line2(UInt16 card, int iaxis1, int iaxis2, int distance1, int distance2);
- /*************************************************************
- Description: // 减速停止 插补指令, 因为涉及到多个轴,必须修改BASE轴列表
- 注意连续插补的时候不要切换主轴,即BASE的第一个轴
- Output: //
- Return: //错误码
- *************************************************************/
- //int32 __stdcall ZAux_Spec_LineN(WORD card, int imaxaxis, int* iaxisList, int *distanceList);
- [DllImport("zauxdll.dll", EntryPoint = "ZAux_Spec_LineN", CharSet = CharSet.Ansi, CallingConvention = CallingConvention.StdCall)]
- public static extern Int32 ZAux_Spec_LineN(UInt16 card,int imaxaxis, int[] iaxisList, int[] distanceList);
- //#if 0
- //额外的函数
- //合成特殊的函数
- //采用卡号来操作
- //#endif
- /************* 每个卡的内部数据定义, ***************/
- //额外的函数支持的插补个数, 一般的PCI卡只有一个
- // #define MAX_VECT_AUX_SPECIAL 1
- public const int MAX_VECT_AUX_SPECIAL = 1;
- //typedef struct str_ZAuxCardSpecial
- //{
- // uint8 m_cardnum; //卡号
- // ZMC_HANDLE m_handle; //句柄
- //手轮的轴
- //int m_iaxisHandle; // 手轮
- //单轴设置
- //double m_aSpeed[MAX_AXIS_AUX];
- //double m_aAccel[MAX_AXIS_AUX];
- //double m_aDecel[MAX_AXIS_AUX];
-
- //double m_aSRampSet[MAX_AXIS_AUX]; // S曲线的设置
- //double m_aHomeSpeed[MAX_AXIS_AUX]; // 回零的速度
- //int m_aHomeDir[MAX_AXIS_AUX]; // 回零方向
- //int m_aHomeMode[MAX_AXIS_AUX]; // 回零模式
-
-
- //插补的设置
- //double m_aVectSpeed[MAX_VECT_AUX_SPECIAL];
- //double m_aVectAccel[MAX_VECT_AUX_SPECIAL];
- //double m_aVectDecel[MAX_VECT_AUX_SPECIAL];
-
- //double m_aVectSRampSet[MAX_VECT_AUX_SPECIAL]; // S曲线的设置
- //
-
- //}struct_ZAuxCardSpecial;
- public struct str_ZAuxCardSpecial
- {
- public byte m_cardnum; //卡号
- public int m_handle; //句柄
- //手轮的轴
- public int m_iaxisHandle; // 手轮
- //单轴设置
- public double[] m_aSpeed;
- public double[] m_aAccel ;
- public double [] m_aDecel ;
-
- public double[] m_aSRampSet ; // S曲线的设置
- public double[] m_aHomeSpeed; // 回零的速度
- public int[] m_aHomeDir; // 回零方向
- public int [] m_aHomeMode; // 回零模式
-
-
- //插补的设置
- public double[] m_aVectSpeed ;
- public double[] m_aVectAccel ;
- public double[] m_aVectDecel ;
-
- public double[] m_aVectSRampSet ; // S曲线的设置
- //
-
- }
- }
- }
|