ImcApi.cs 169.5 KB
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 664 665 666 667 668 669 670 671 672 673 674 675 676 677 678 679 680 681 682 683 684 685 686 687 688 689 690 691 692 693 694 695 696 697 698 699 700 701 702 703 704 705 706 707 708 709 710 711 712 713 714 715 716 717 718 719 720 721 722 723 724 725 726 727 728 729 730 731 732 733 734 735 736 737 738 739 740 741 742 743 744 745 746 747 748 749 750 751 752 753 754 755 756 757 758 759 760 761 762 763 764 765 766 767 768 769 770 771 772 773 774 775 776 777 778 779 780 781 782 783 784 785 786 787 788 789 790 791 792 793 794 795 796 797 798 799 800 801 802 803 804 805 806 807 808 809 810 811 812 813 814 815 816 817 818 819 820 821 822 823 824 825 826 827 828 829 830 831 832 833 834 835 836 837 838 839 840 841 842 843 844 845 846 847 848 849 850 851 852 853 854 855 856 857 858 859 860 861 862 863 864 865 866 867 868 869 870 871 872 873 874 875 876 877 878 879 880 881 882 883 884 885 886 887 888 889 890 891 892 893 894 895 896 897 898 899 900 901 902 903 904 905 906 907 908 909 910 911 912 913 914 915 916 917 918 919 920 921 922 923 924 925 926 927 928 929 930 931 932 933 934 935 936 937 938 939 940 941 942 943 944 945 946 947 948 949 950 951 952 953 954 955 956 957 958 959 960 961 962 963 964 965 966 967 968 969 970 971 972 973 974 975 976 977 978 979 980 981 982 983 984 985 986 987 988 989 990 991 992 993 994 995 996 997 998 999 1000 1001 1002 1003 1004 1005 1006 1007 1008 1009 1010 1011 1012 1013 1014 1015 1016 1017 1018 1019 1020 1021 1022 1023 1024 1025 1026 1027 1028 1029 1030 1031 1032 1033 1034 1035 1036 1037 1038 1039 1040 1041 1042 1043 1044 1045 1046 1047 1048 1049 1050 1051 1052 1053 1054 1055 1056 1057 1058 1059 1060 1061 1062 1063 1064 1065 1066 1067 1068 1069 1070 1071 1072 1073 1074 1075 1076 1077 1078 1079 1080 1081 1082 1083 1084 1085 1086 1087 1088 1089 1090 1091 1092 1093 1094 1095 1096 1097 1098 1099 1100 1101 1102 1103 1104 1105 1106 1107 1108 1109 1110 1111 1112 1113 1114 1115 1116 1117 1118 1119 1120 1121 1122 1123 1124 1125 1126 1127 1128 1129 1130 1131 1132 1133 1134 1135 1136 1137 1138 1139 1140 1141 1142 1143 1144 1145 1146 1147 1148 1149 1150 1151 1152 1153 1154 1155 1156 1157 1158 1159 1160 1161 1162 1163 1164 1165 1166 1167 1168 1169 1170 1171 1172 1173 1174 1175 1176 1177 1178 1179 1180 1181 1182 1183 1184 1185 1186 1187 1188 1189 1190 1191 1192 1193 1194 1195 1196 1197 1198 1199 1200 1201 1202 1203 1204 1205 1206 1207 1208 1209 1210 1211 1212 1213 1214 1215 1216 1217 1218 1219 1220 1221 1222 1223 1224 1225 1226 1227 1228 1229 1230 1231 1232 1233 1234 1235 1236 1237 1238 1239 1240 1241 1242 1243 1244 1245 1246 1247 1248 1249 1250 1251 1252 1253 1254 1255 1256 1257 1258 1259 1260 1261 1262 1263 1264 1265 1266 1267 1268 1269 1270 1271 1272 1273 1274 1275 1276 1277 1278 1279 1280 1281 1282 1283 1284 1285 1286 1287 1288 1289 1290 1291 1292 1293 1294 1295 1296 1297 1298 1299 1300 1301 1302 1303 1304 1305 1306 1307 1308 1309 1310 1311 1312 1313 1314 1315 1316 1317 1318 1319 1320 1321 1322 1323 1324 1325 1326 1327 1328 1329 1330 1331 1332 1333 1334 1335 1336 1337 1338 1339 1340 1341 1342 1343 1344 1345 1346 1347 1348 1349 1350 1351 1352 1353 1354 1355 1356 1357 1358 1359 1360 1361 1362 1363 1364 1365 1366 1367 1368 1369 1370 1371 1372 1373 1374 1375 1376 1377 1378 1379 1380 1381 1382 1383 1384 1385 1386 1387 1388 1389 1390 1391 1392 1393 1394 1395 1396 1397 1398 1399 1400 1401 1402 1403 1404 1405 1406 1407 1408 1409 1410 1411 1412 1413 1414 1415 1416 1417 1418 1419 1420 1421 1422 1423 1424 1425 1426 1427 1428 1429 1430 1431 1432 1433 1434 1435 1436 1437 1438 1439 1440 1441 1442 1443 1444 1445 1446 1447 1448 1449 1450 1451 1452 1453 1454 1455 1456 1457 1458 1459 1460 1461 1462 1463 1464 1465 1466 1467 1468 1469 1470 1471 1472 1473 1474 1475 1476 1477 1478 1479 1480 1481 1482 1483 1484 1485 1486 1487 1488 1489 1490 1491 1492 1493 1494 1495 1496 1497 1498 1499 1500 1501 1502 1503 1504 1505 1506 1507 1508 1509 1510 1511 1512 1513 1514 1515 1516 1517 1518 1519 1520 1521 1522 1523 1524 1525 1526 1527 1528 1529 1530 1531 1532 1533 1534 1535 1536 1537 1538 1539 1540 1541 1542 1543 1544 1545 1546 1547 1548 1549 1550 1551 1552 1553 1554 1555 1556 1557 1558 1559 1560 1561 1562 1563 1564 1565 1566 1567 1568 1569 1570 1571 1572 1573 1574 1575 1576 1577 1578 1579 1580 1581 1582 1583 1584 1585 1586 1587 1588 1589 1590 1591 1592 1593 1594 1595 1596 1597 1598 1599 1600 1601 1602 1603 1604 1605 1606 1607 1608 1609 1610 1611 1612 1613 1614 1615 1616 1617 1618 1619 1620 1621 1622 1623 1624 1625 1626 1627 1628 1629 1630 1631 1632 1633 1634 1635 1636 1637 1638 1639 1640 1641 1642 1643 1644 1645 1646 1647 1648 1649 1650 1651 1652 1653 1654 1655 1656 1657 1658 1659 1660 1661 1662 1663 1664 1665 1666 1667 1668 1669 1670 1671 1672 1673 1674 1675 1676 1677 1678 1679 1680 1681 1682 1683 1684 1685 1686 1687 1688 1689 1690 1691 1692 1693 1694 1695 1696 1697 1698 1699 1700 1701 1702 1703 1704 1705 1706 1707 1708 1709 1710 1711 1712 1713 1714 1715 1716 1717 1718 1719 1720 1721 1722 1723 1724 1725 1726 1727 1728 1729 1730 1731 1732 1733 1734 1735 1736 1737 1738 1739 1740 1741 1742 1743 1744 1745 1746 1747 1748 1749 1750 1751 1752 1753 1754 1755 1756 1757 1758 1759 1760 1761 1762 1763 1764 1765 1766 1767 1768 1769 1770 1771 1772 1773 1774 1775 1776 1777 1778 1779 1780 1781 1782 1783 1784 1785 1786 1787 1788 1789 1790 1791 1792 1793 1794 1795 1796 1797 1798 1799 1800 1801 1802 1803 1804 1805 1806 1807 1808 1809 1810 1811 1812 1813 1814 1815 1816 1817 1818 1819 1820 1821 1822 1823 1824 1825 1826 1827 1828 1829 1830 1831 1832 1833 1834 1835 1836 1837 1838 1839 1840 1841 1842 1843 1844 1845 1846 1847 1848 1849 1850 1851 1852 1853 1854 1855 1856 1857 1858 1859 1860 1861 1862 1863 1864 1865 1866 1867 1868 1869 1870 1871 1872 1873 1874 1875 1876 1877 1878 1879 1880 1881 1882 1883 1884 1885 1886 1887 1888 1889 1890 1891 1892 1893 1894 1895 1896 1897 1898 1899 1900 1901 1902 1903 1904 1905 1906 1907 1908 1909 1910 1911 1912 1913 1914 1915 1916 1917 1918 1919 1920 1921 1922 1923 1924 1925 1926 1927 1928 1929 1930 1931 1932 1933 1934 1935 1936 1937 1938 1939 1940 1941 1942 1943 1944 1945 1946 1947 1948 1949 1950 1951 1952 1953 1954 1955 1956 1957 1958 1959 1960 1961 1962 1963 1964 1965
#define HANDLETYPE_UINT64
//#define MACHINE_X86

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Runtime.InteropServices;

namespace HuichuanLibrary
{ 
    
    
    /// <summary>
  /// 兼容早期版本使用UInt32 HANDLETYPE,后期版本系统使用UInt64 HANDLETYPE。
  /// </summary>
#if HANDLETYPE_UINT64
    using HANDLETYPE = UInt64;
#else
    using HANDLETYPE = UInt32;
#endif

    public class ImcApi
    {
        #region STATIC
#if MACHINE_X86
        public const string EtherCATConfigApiDllName = @"\huichuan_x86\IMC_API_x86.dll";
#else
        public const string EtherCATConfigApiDllName = @"\huichuan_x64\IMC_API_x64.dll";
#endif
        #endregion

        #region FUNCTION RETURN DEFINE
        public const uint EXE_SUCCESS = 0x00000000;
        public const uint ERR_HANDLE = 0xFFFFFFFF;
        #endregion

        #region DATA STRUCT DEFINE
        [StructLayout(LayoutKind.Sequential)]
        public struct TRsouresNum
        {
            public Int16 terminalexist; // 端子板是否连接
            public Int16 axNum; // ECAT 总线的所有轴数
            public Int16 diNum; // ECAT 总线上DI 资源
            public Int16 doNum; // ECAT 总线上DO 资源
            public Int16 adNum; // ECAT 总线上AD 资源
            public Int16 daNum; // ECAT 总线上DA 资源
            public Int16 encNum;// ECAT 总线上ENC资源
        };

        [StructLayout(LayoutKind.Sequential)]
        public struct TMtPara
        {
            public double bgVel;    // 起始速度值 pulse/ms
            public double maxVel;   // 最大速度 pulse/ms
            public double maxAcc;   // 最大加速度 pulse/ms^2
            public double maxDec;   // 最大减速度 pulse/ms^2
            public double maxJerk;  // 最大加加速度 pulse/ms^3
            public double stopDec;  // 平滑停止减速度 pulse/ms^2
            public double eStopDec; // 急停减速度 pulse/ms^2
        };

        [StructLayout(LayoutKind.Sequential)]
        public struct TAxAttriPara
        {
            public Int16 arrivalBand; 		// 到位误差 pulse
            public Int16 arrivalTime; 		// 到位保持时间 ms
            public Int32 errorLmt; 		// 最大跟随误差 pulse
            public Int32 softPosLimitPos; 	// 软正限位 pulse
            public Int32 softNegLimitPos; 	// 软负限位 pulse
        };

        [StructLayout(LayoutKind.Sequential)]
        public struct TAxCheckEn
        {
            public Int16 alarmEn; 		// 报警是否有效标志
            public Int16 softLmtEn; 	// 软限位是否有效标志
            public Int16 hwLmtEn; 		// 硬限位是否有效标志
            public Int16 errorLmtEn; 	// 跟随误差是否检查标志
        };

        //public const uint SAMPLE_TRIG_IMMEDIATE   = (0); // 立即采集
        //public const uint SAMPLE_TRIG_DELAY       = (1); // 延时采集
        //public const uint SAMPLE_TRIG_LOCAL_DI    = (2); // 本地DI触发
        //public const uint SAMPLE_TRIG_ECAT_DI     = (3); // ECAT 的DI 触发

        //[StructLayout(LayoutKind.Sequential)]
        //public struct TSamplePara
        //{
        //  public Int16 interval;       // 采样时间间隔
        //  public Int16 trigType;       // 触发采样类型:0 立即 1 延时 2 本地di 3 ECAT di
        //  public Int16 delay;          // 延时时间 ms
        //  public Int16 diNo;           // di输入号
        //  public Int16 diLevel;        // di的触发输入值 0或1
        //};

        [StructLayout(LayoutKind.Sequential)]
        public struct THomingPara
        {
            public Int16 homeMethod; 			// 回原点方法
            public Int32 offset; 				// 回原点后的零点偏执 pulse
            public UInt32 highVel; 			// 高速搜索减速点速度 pulse/ms
            public UInt32 lowVel; 				// 搜索原点低 pulse/ms
            public UInt32 acc; 				// 加速度 pulse/ms^2
            public UInt32 overtime; 			// 超时时间 ms
            public Int16 posSrc; 				// 仅对端子板轴回零有效,ECAT 轴无效
        };

        //public const uint HOME_STATUS_INITIAL         = (0x0000);
        //public const uint HOME_STATUS_RUNNING         = (0x0001);
        //public const uint HOME_STATUS_STOPPED         = (0x0002);
        //public const uint HOME_STATUS_TOZERO          = (0x0004);
        //public const uint HOME_STATUS_SUCCEED         = (0x0008);
        //public const uint HOME_STATUS_ERROR           = (0x00F0);
        //public const uint HOME_STATUS_ERROR_TYPE      = (0x00F1);
        //public const uint HOME_STATUS_ERROR_EXECUTE   = (0x00F2);
        //public const uint HOME_STATUS_ERROR_SENSOR    = (0x00F3);
        //public const uint HOME_STATUS_ERROR_OVERTIME  = (0x00F4);

        //20180914修改
        //public const uint HOME_IN_PROGRESS = (0);     // 正在回零中
        //public const uint HOME_INTERRUPTED_OR_NOT_START = (1);     // 回零中断或者没有开始启动
        //public const uint HOME_ATTAINED_BUT_NOT_REACH = (2);     // 回零结束,但没有到设定的目标位置
        //public const uint HOME_SUCESS = (3);     // 回零成功
        //public const uint HOME_ERR_VEL_NOT_ZERO = (4);     // 回零中发生错误,同时速度不为0 
        //public const uint HOME_ERR_VEL_ZERO = (5);     // 回零中发生错误,同时速度为0
        public const Int16 HOME_IN_PROGRESS = (0);     // 正在回零中
        public const Int16 HOME_INTERRUPTED_OR_NOT_START = (1);     // 回零中断或者没有开始启动
        public const Int16 HOME_ATTAINED_BUT_NOT_REACH = (2);     // 回零结束,但没有到设定的目标位置
        public const Int16 HOME_SUCESS = (3);     // 回零成功
        public const Int16 HOME_ERR_VEL_NOT_ZERO = (4);     // 回零中发生错误,同时速度不为0 
        public const Int16 HOME_ERR_VEL_ZERO = (5);     // 回零中发生错误,同时速度为0

        //crd高级参数结构体
        [StructLayout(LayoutKind.Sequential)]
        public struct TCrdAdvParam
        {
            public Int16 userVelMode;          // 用户速度规划模式:0 系统前瞻速度规划,1 用户设定速度规划(默认:0)
            public Int16 transMode;            // 过渡模式 1:无过渡 2:圆弧过渡 (默认:2)
            public Int16 noDataProtect;        // 数据断流保护:0不保护,1保护 (默认:1)
            public Int16 circAccChangeEn;      // 圆弧变加速使能:0不变加速,1变加速 (默认:0) 
            public Int16 noCoplaneCircOptm;    // 异面圆弧优化:0不开启,1开启
            public double turnCoef;            // 拐弯系数: [0.01~50](默认:1.0)
            public double tol;                 // 插补精度: 大于0的值(默认:0 ,单位取决于设置的当量)
        };

        //跟随模式切换启动条件结构体
        //public struct TFolStartCond
        //{
        //  public Int16 type;                 // 启动类型: 0:立即启动 1:等待时间 2:等待DI 3:等待主轴运动
        //  public Int16 delay;                // 等待时间 单位:ms
        //  public Int16 diNO;                 // 等待DI输入号
        //  public Int16 diType;               // 等待DI类型
        //  public Int16 diLevel;              // DI的触发输入值 0或1
        //  public double waitPos;             // 主轴运动的位置,绝对位置
        //  public Int16 waitPosType;          // 等待主轴运动位置的类型.0:小于等于waitPos触发 1:大于等于waitPos触发
        //};

        //public struct TFolParam
        //{
        //  public double masterScale;   // 主轴齿数
        //  public double slaveScale;    // 从轴齿数
        //  public Int16 masterNo;       // 主轴轴号
        //  public Int16 masterType;     // 主轴类型
        //  public Int16 slaveType;      // 从轴类型
        //  public Int16 dirMode;        // 方向模式
        //};
        [StructLayout(LayoutKind.Sequential)]
        public struct TGearParam
        {
            public double masterScale;		// 主轴齿数
            public double slaveScale;		// 从轴齿数
            public Int16 masterNo;			// 主轴轴号
            public Int16 masterType;		// 主轴类型
            public Int16 dirMode;			// 方向模式
            public Int32 masterSlopeDis;	// 主轴离合区
        };

        [StructLayout(LayoutKind.Sequential)]
        public struct TEventIO
        {
            [MarshalAs(UnmanagedType.ByValArray, SizeConst = 2)]
            public Int16[] inType;		// 输入的类型:0表示物理输入 1表示虚拟输入
            [MarshalAs(UnmanagedType.ByValArray, SizeConst = 2)]
            public Int16[] inPortNo;		// 输入的端口号
            [MarshalAs(UnmanagedType.ByValArray, SizeConst = 2)]
            public Int16[] inInvert;		// 输入是否取反:0表示不取反 1表示取反
            public Int16 inOperator;		// 输入操作符:0与操作 1或操作  2异或操作 3 单输入
            public Int16 outType;			// 输出类型:0表示物理输出 1表示虚拟输出(虚拟输出一般作为其他单元的输入源)
            public Int16 outPortNo;		// 输出端口
            public Int16 outInvert;		// 输出取反:0表示不取反 1表示取反
            public Int16 activeType;		// 生效的类型:0单次生效 1持续生效
            public Int16 triggerType;      // 触发类型:0:电平触发 1:上升沿触发 2:下降沿触发
            public Int16 delayTime;		// 延时输出的时间:ms
        };

        public struct TEventDiMotion
        {
            public Int16 inType;  				// 输入的类型:0表示物理输入 1表示虚拟输入
            public Int16 inPortNo;				// 输入的端口号
            public Int16 motionAxNo;			// 触发的运动轴号
            public Int16 delay;				    // 单位:ms
            public Int16 motionType;            // 启停类型 0:PTP启动  1:Jog启动  2:平滑停止  3:急停  4:更新参数
            public Int16 triggerType;           // 触发类型 0:电平触发(高电平) 1:上升沿触发 2:下降沿触发
            public Int16 invertBit;			    // 取反位,输入取反
            public double tgtPos;				// 目标位置
            public double tgtVel;				// 目标速度
            public double acc;					// 加速度
            public double dec;					// 减速度
        };

        public struct TEventCompareOut
        {
            public Int16 inType;  				// 输入类型:0编码器 1规划位置
            public Int16 portNo;				// 端口号
            public Int16 outPortNo;			// DO输出端口号
            public Int16 outVal;				// 输出电平值
            public Int16 outType;				// 输出类型:0电平 1脉宽 2虚拟值(虚拟输出一般作为其他单元的输入源)
            public Int16 cmpType;				// 比较的方式:0大于等于  1小于
            public Int16 pulseWidth;			// 脉冲宽度
            public double comparePos;			// 比较的位置
        };

        /*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
                              ECAT板卡状态 定义      
         说明:以下枚举针对IMC_GetECATMasterSts函数
        ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/
        public const uint EC_MASTER_IDLE = (0); // EtherCat尚未初始化
        public const uint EC_MASTER_INIT = (1); // EtherCat初始化
        public const uint EC_MASTER_SCAN_SLAVE = (2); // EtherCat正在扫描从站设备
        public const uint EC_MASTER_SCAN_SLAVE_END = (3); // EtherCat扫描从站设备结束
        public const uint EC_MASTER_SCAN_MODULES = (4); // EtherCat正在扫描从站设备MODULES
        public const uint EC_MASTER_SCAN_MODULES_END = (5); // EtherCat扫描从站设备MODULES结束
        public const uint EC_MASTER_OP = (6); // EtherCat进入OP状态
        public const uint EC_MASTER_ERR = (7); // EtherCat链路状态有错误

        /*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
                      ECAT板卡从站状态 定义      
         说明:以下枚举针对IMC_GetSlaveCurSts, IMC_GetSlaveReqSts函数
        ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/
        public const uint EC_SLAVE_STATE_UNKNOWN = (0x00); // EtherCat从站在未知状态
        public const uint EC_SLAVE_STATE_INIT = (0x01); // EtherCat从站在初始状态
        public const uint EC_SLAVE_STATE_PREOP = (0x02); // EtherCat从站在PREOP状态
        public const uint EC_SLAVE_STATE_BOOT = (0x03); // EtherCat从站在BOOT状态
        public const uint EC_SLAVE_STATE_SAFEOP = (0x04); // EtherCat从站在SAVEOP状态
        public const uint EC_SLAVE_STATE_OP = (0x08); // EtherCat从站在OP状态
        public const uint EC_SLAVE_STATE_ACK_ERR = (0x10); // EtherCat从站有错误

        /*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
                      ecat Error code 定义      
         说明:以下宏定义针对IMC_GetEcatErrCode函数,其他为内部错误
        ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/
        //public const uint ERROR_CODE_NO_MASTER = (0x0001);      //不存在ECAT MASTER设备
        //public const uint ERROR_CODE_INVALID_DOMAIN = (0x0002);      //非法Domain域
        public const uint ERROR_CODE_NO_SUCH_SLAVE = (0x0003);      //没有这个从站
        public const uint ERROR_CODE_INVALID_PDO = (0x0004);      //非法PDO
        public const uint ERROR_CODE_INVALID_SDO = (0x0005);      //非法SDO
        public const uint ERROR_CODE_INVALID_ENTRY = (0x0006);      //非法ENTRY   
        //public const uint ERROR_CODE_NOMEM = (0x0007);      //ECAT协议栈分配内存失败   
        //public const uint ERROR_CODE_MASTER_FAIL = (0x0008);      //启动MASTER主站失败  
        //public const uint ERROR_CODE_COMMON_FAIL = (0x0009);      //通信失败 
        //public const uint ERROR_CODE_CYCCOM_FAIL = (0x000A);      //周期定时器失败        
        //public const uint ERROR_CODE_BUFFCFG_FAIL = (0x000B);      //PDO buffer配置失败      
        //public const uint ERROR_CODE_INITMODULFAIL = (0x000C);      //初始化Module失败      
        public const uint ERROR_CODE_PASECFGFAIL = (0x000D);      //解析XML设备配置失败 
        //public const uint ERROR_CODE_CFGECATDSPFAIL = (0x000E);      //同步配置到DSP失败
        //public const uint ERROR_CODE_DOMAINREGFAIL = (0x000F);      //Domain域配置信息有误
        //public const uint ERROR_CODE_CREATIMERFAIL = (0x0010);      //创建定时器失败
        //public const uint ERROR_CODE_STARTIMERFAIL = (0x0011);      //启动定时器失败
        //public const uint ERROR_CODE_CFGVERSELFAIL = (0x0012);      //获取版本信息失败
        //public const uint ERROR_CODE_CFGMEMORYFAIL = (0x0013);      //分配过程数据buffer失败
        //public const uint ERROR_CODE_MEMWARNINFAIL = (0x0014);      //创建共享数据失败
        public const uint ERROR_CODE_CFGREGISTFAIL = (0x0015);      //配置reg失败
        public const uint ERROR_CODE_CFGDIFFONLINE = (0x0016);      //在线从站与配置不一致
        public const uint ERROR_CODE_SLAVE_OFFLINE = (0x001a);      //从站掉线错误,高8位为轴号,即bit[15:8]-轴号  
        public const uint ERROR_CODE_SDOBF_NONECAT = (0x001b);      //SDO缓冲区收到非ECAT帧错误
        public const uint ERROR_CODE_PORT0_NOTLINK = (0x001c);      //端口未接ECAT设备错误
        //public const uint ERROR_CODE_SETIR_STARTIM_ERR = (0x001d);      //开始DC及中断工作发送错误
        public const uint ERROR_CODE_SET_CYCLETIME_PARA_ERR = (0x001e);      //设置周期时间参数错误
        public const uint ERROR_CODE_COE_SDO_INIT_ERR = (0x001f);      //在初始化阶段coe配置错误
        public const uint ERROR_CODE_SLAVE_STATE_ERR = (0x0020);      //从站状态错误,高8位为轴号,即bit[15:8]-轴号    
        //public const uint ERROR_CODE_WR_STACMD_ERR = (0x0021);      //写写命令字失败
        //public const uint ERROR_CODE_RDSTS_REG_ERR = (0x0022);      //读状态字失败
        //public const uint ERROR_CODE_RD_DLLERR_ERR = (0x0023);      //读取DLL失败
        //public const uint ERROR_CODE_RD_SDOBF_ERR = (0x0024);      //读SDO缓冲区错误
        //public const uint ERROR_CODE_RD_ERROR_CODE_SDOBF_LEN_ERR = (0x0025);      //读SDO缓冲区长度错误
        //public const uint ERROR_CODE_SDOBF_LEN_ERR = (0x0026);      //SDO长度错误
        //public const uint ERROR_CODE_SDOBF_RCV_ERR = (0x0027);      //接收SDO错误
        //public const uint ERROR_CODE_SDOBF_BUSY_ERR = (0x0028);      //SDO操作忙状态
        //public const uint ERROR_CODE_SDOBF_DATAGRAM = (0x0029);      //SDO数据帧错误
        //public const uint ERROR_CODE_RD_PDOBF_ERR = (0x002a);      //读取PDO缓冲区错误
        //public const uint ERROR_CODE_RD_ERROR_CODE_PDOBF_LEN_ERR = (0x002b);      //读取PDO缓冲区长度错误
        //public const uint ERROR_CODE_PDOBF_LEN_ERR = (0x002c);      //PDO长度错误
        //public const uint ERROR_CODE_PDOBF_RCV_ERR = (0x002d);      //PDO接收错误
        //public const uint ERROR_CODE_NETCARDOPEN_ERR = (0x002e);      //打开网卡失败
        //public const uint ERROR_CODE_GPMC_IOCTRL_ERR = (0x002f);      //打开GPMC失败
        //public const uint ERROR_CODE_GPMC_ECATRD_ERR = (0x0030);      //GPMC读ECAT失败
        //public const uint ERROR_CODE_GPMC_ECATWR_ERR = (0x0031);      //GPMC写ECAT失败
        //public const uint ERROR_CODE_RD_TXTMSTMP_ERR = (0x0032);      //GPMC读取ECAT发送时间失败
        //public const uint ERROR_CODE_RD_RXTMSTMP_ERR = (0x0033);      //GPMC读取ECAT接收时间失败
        //public const uint ERROR_CODE_RD_PDOBFLFT_ERR = (0x0034);      //GPMC读取ECAT PDO缓冲区剩余失败
        //public const uint ERROR_CODE_RD_APPTIME_ERR = (0x0035);      //GPMC读取ECAT APP时间失败
        //public const uint ERROR_CODE_WR_BUFF_ERR = (0x0036);      //写缓冲区错误 
        public const uint ERROR_CODE_SLAVE_SII_ERR = (0x0037);      //E2ROM 信息有误,处理方法:一般为从站保存的e2rom信息有误,可以使用twincat确认并联系厂家。

        /*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
             abort code 定义      
         说明:以下宏定义针对IIMC_GetEcatSdo\IMC_SetEcatSdo函数      
        ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/
        public const uint ABORT_CODE1 = (0x05030000); //从站Toggle bit 没有变化
        public const uint ABORT_CODE2 = (0x05040000); //SDO 访问超时
        public const uint ABORT_CODE3 = (0x05040001); //客户端/服务器 命令非法或未知
        public const uint ABORT_CODE4 = (0x05040005); //内存溢出
        public const uint ABORT_CODE5 = (0x06010000); //不支持访问该对象
        public const uint ABORT_CODE6 = (0x06010001); //尝试去读一个只写对象
        public const uint ABORT_CODE7 = (0x06010002); //尝试去写一个只读对象
        public const uint ABORT_CODE8 = (0x06020000); //对象字典中不存在该对象
        public const uint ABORT_CODE9 = (0x06040041); //该对象不能映射成PDO
        public const uint ABORT_CODE10 = (0x06040042); //对象映射成PDO超出 PDO长度
        public const uint ABORT_CODE11 = (0x06040043); //通用参数非法
        public const uint ABORT_CODE12 = (0x06040047); //设备内不兼容
        public const uint ABORT_CODE13 = (0x06060000); //由于硬件原因访问失败
        public const uint ABORT_CODE14 = (0x06070010); //数据类型不匹配,长度参数
        public const uint ABORT_CODE15 = (0x06070012); //数据类型不匹配,长度太大
        public const uint ABORT_CODE16 = (0x06070013); //数据类型不匹配,长度太小
        public const uint ABORT_CODE17 = (0x06090011); //该对象子索引不存在
        public const uint ABORT_CODE18 = (0x06090030); //参数超出范围
        public const uint ABORT_CODE19 = (0x06090031); //参数超出范围太大
        public const uint ABORT_CODE20 = (0x06090032); //参数超出范围太小
        public const uint ABORT_CODE21 = (0x06090036); //最大值小于最小值
        public const uint ABORT_CODE22 = (0x08000000); //一般错误
        public const uint ABORT_CODE23 = (0x08000020); //数据不能被传输或被保存
        public const uint ABORT_CODE24 = (0x08000021); //数据不能被传输或被保存由于本地控制
        public const uint ABORT_CODE25 = (0x08000022); //数据不能被传输或被保存由于当前状态
        public const uint ABORT_CODE26 = (0x08000023); //缺乏对象字典或者对象字典创建失败

        /*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
             端子板专用IO的宏定义      
        ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/
        public const uint SPECIAL_IO_RDY = (0);  // 准备完成信号
        public const uint SPECIAL_IO_ARRIV = (1);  // 到位信号
        public const uint SPECIAL_IO_ALARM = (2);  // 报警信号
        public const uint SPECIAL_IO_POSLMT = (3);  // 正限位信号
        public const uint SPECIAL_IO_NEGLMT = (4);  // 负限位信号
        public const uint SPECIAL_IO_CLR = (5);  // 清除报警信号
        public const uint SPECIAL_IO_SV = (6);  // 伺服使能信号
        public const uint SPECIAL_IO_HOME = (7);  // 回零输入信号
        public const uint SPECIAL_IO_INDEX = (8);  // 电机Z相信号
        #endregion

        #region FUNCTION DEFINE

        ///*==========================================================================*/
        ///*----             FUNCTION DEFINE                                       ---*/
        ///*==========================================================================*/

        ///*==========================================================================*/
        ///*----1.1 板卡的操作以及资源的获取接口                                   ---*/
        ///*==========================================================================*/
        //_DLL_API UINT32 IMC_GetCardsNum(INT32 *pCardsNum);
        [DllImport(EtherCATConfigApiDllName, EntryPoint = "IMC_GetCardsNum", ExactSpelling = false, CallingConvention = CallingConvention.Cdecl)]
        public static extern UInt32 IMC_GetCardsNum(ref Int32 cardsNum);

        //_DLL_API UINT32 IMC_OpenCard(INT32 cardNo, UINT32 *pCardHandle, INT32 blockFlag);
        [DllImport(EtherCATConfigApiDllName, EntryPoint = "IMC_OpenCard", ExactSpelling = false, CallingConvention = CallingConvention.Cdecl)]
        public static extern UInt32 IMC_OpenCard(Int32 cardNo, ref HANDLETYPE pCardHandle, Int32 blockFlag);

        //_DLL_API UINT32 IMC_CloseCard(HANDLETYPE cardHandle);
        [DllImport(EtherCATConfigApiDllName, EntryPoint = "IMC_CloseCard", ExactSpelling = false, CallingConvention = CallingConvention.Cdecl)]
        public static extern UInt32 IMC_CloseCard(HANDLETYPE cardHandle);


        //_DLL_API UINT32 IMC_OpenCardHandle(INT32 cardNo, UINT32 *pCardHandle);
        [DllImport(EtherCATConfigApiDllName, EntryPoint = "IMC_OpenCardHandle", ExactSpelling = false, CallingConvention = CallingConvention.Cdecl)]
        public static extern UInt32 IMC_OpenCardHandle(Int32 cardNo, ref HANDLETYPE pCardHandle);

        //_DLL_API UINT32 IMC_ScanCardECAT(HANDLETYPE cardHandle, INT32 blockFlag);
        [DllImport(EtherCATConfigApiDllName, EntryPoint = "IMC_ScanCardECAT", ExactSpelling = false, CallingConvention = CallingConvention.Cdecl)]
        public static extern UInt32 IMC_ScanCardECAT(HANDLETYPE cardHandle, Int32 blockFlag);

        //_DLL_API UINT32 IMC_GetECATMasterSts(HANDLETYPE cardHandle,UINT32 *pStatus);
        [DllImport(EtherCATConfigApiDllName, EntryPoint = "IMC_GetECATMasterSts", ExactSpelling = false, CallingConvention = CallingConvention.Cdecl)]
        public static extern UInt32 IMC_GetECATMasterSts(HANDLETYPE cardHandle, ref UInt32 pStatus);

        //_DLL_API UINT32 IMC_ScanCard(UINT64 cardHandle, INT32 blockFlag);
        [DllImport(EtherCATConfigApiDllName, EntryPoint = "IMC_ScanCard", ExactSpelling = false, CallingConvention = CallingConvention.Cdecl)]
        public static extern UInt32 IMC_ScanCard(HANDLETYPE cardHandle, Int32 blockFlag);
        //_DLL_API UINT32 IMC_GetCardSts(UINT64 cardHandle,UINT32 *pStatus);
        [DllImport(EtherCATConfigApiDllName, EntryPoint = "IMC_GetCardSts", ExactSpelling = false, CallingConvention = CallingConvention.Cdecl)]
        public static extern UInt32 IMC_GetCardSts(HANDLETYPE cardHandle, ref UInt32 pStatus);

        //_DLL_API UINT32 IMC_CloseCardHandle(HANDLETYPE cardHandle);
        [DllImport(EtherCATConfigApiDllName, EntryPoint = "IMC_CloseCardHandle", ExactSpelling = false, CallingConvention = CallingConvention.Cdecl)]
        public static extern UInt32 IMC_CloseCardHandle(HANDLETYPE cardHandle);

        //_DLL_API UINT32 IMC_GetCardResource(HANDLETYPE cardHandle, TRsouresNum *pRsouresNum);
        [DllImport(EtherCATConfigApiDllName, EntryPoint = "IMC_GetCardResource", ExactSpelling = false, CallingConvention = CallingConvention.Cdecl)]
        public static extern UInt32 IMC_GetCardResource(HANDLETYPE cardHandle, ref TRsouresNum pRsouresNum);

        //_DLL_API UINT32 IMC_UpLoadDeviceConfig(HANDLETYPE cardHandle,const char *pathName);
        [DllImport(EtherCATConfigApiDllName, EntryPoint = "IMC_UpLoadDeviceConfig", ExactSpelling = false, CallingConvention = CallingConvention.Cdecl)]
        public static extern UInt32 IMC_UpLoadDeviceConfig(HANDLETYPE cardHandle, string pathName);

        //_DLL_API UINT32 IMC_DownLoadDeviceConfig(HANDLETYPE cardHandle,const char *pathName);
        [DllImport(EtherCATConfigApiDllName, EntryPoint = "IMC_DownLoadDeviceConfig", ExactSpelling = false, CallingConvention = CallingConvention.Cdecl)]
        public static extern UInt32 IMC_DownLoadDeviceConfig(HANDLETYPE cardHandle, string pathName);

        //_DLL_API UINT32 IMC_DownLoadSystemConfig(HANDLETYPE cardHandle, const char *pathName);
        [DllImport(EtherCATConfigApiDllName, EntryPoint = "IMC_DownLoadSystemConfig", ExactSpelling = false, CallingConvention = CallingConvention.Cdecl)]
        public static extern UInt32 IMC_DownLoadSystemConfig(HANDLETYPE cardHandle, string pathName);


        //_DLL_API UINT32 IMC_GetBlockFunExeAndRet(UINT64 cardHandle, UINT32 *pExeSts, UINT32 *pRet);
        [DllImport(EtherCATConfigApiDllName, EntryPoint = "IMC_GetBlockFunExeAndRet", ExactSpelling = false, CallingConvention = CallingConvention.Cdecl)]
        public static extern UInt32 IMC_GetBlockFunExeAndRet(HANDLETYPE cardHandle, ref UInt32 pExeSts, ref UInt32 pRet);

        //_DLL_API UINT32 IMC_API_DelMaster(UINT64 cardHandle);
        [DllImport(EtherCATConfigApiDllName, EntryPoint = "IMC_API_DelMaster", ExactSpelling = false, CallingConvention = CallingConvention.Cdecl)]
        public static extern UInt32 IMC_API_DelMaster(HANDLETYPE cardHandle);

        //_DLL_API UINT32 IMC_StartNetTest(UINT64 cardHandle, char *netAddr);
        [DllImport(EtherCATConfigApiDllName, EntryPoint = "IMC_StartNetTest", ExactSpelling = false, CallingConvention = CallingConvention.Cdecl)]
        public static extern UInt32 IMC_StartNetTest(HANDLETYPE cardHandle, string netAddr);

        //_DLL_API UINT32 IMC_EndNetTest(UINT64 cardHandle, UINT32 *loss_ratio, UINT32 *pSendCnt, UINT32 *pRcvCnt);
        [DllImport(EtherCATConfigApiDllName, EntryPoint = "IMC_EndNetTest", ExactSpelling = false, CallingConvention = CallingConvention.Cdecl)]
        public static extern UInt32 IMC_EndNetTest(HANDLETYPE cardHandle, ref UInt32 loss_ratio, ref UInt32 pSendCnt, ref UInt32 pRcvCnt);

        //_DLL_API UINT32 IMC_DownLoadUpdateFile(UINT64 cardHandle, const char *pathName);
        [DllImport(EtherCATConfigApiDllName, EntryPoint = "IMC_DownLoadUpdateFile", ExactSpelling = false, CallingConvention = CallingConvention.Cdecl)]
        public static extern UInt32 IMC_DownLoadUpdateFile(HANDLETYPE cardHandle, string pathName);

        //_DLL_API UINT32 IMC_UpdateSysFw(UINT64 cardHandle);
        [DllImport(EtherCATConfigApiDllName, EntryPoint = "IMC_UpdateSysFw", ExactSpelling = false, CallingConvention = CallingConvention.Cdecl)]
        public static extern UInt32 IMC_UpdateSysFw(HANDLETYPE cardHandle);

        //_DLL_API UINT32 IMC_InstallSysFw(UINT64 cardHandle);
        [DllImport(EtherCATConfigApiDllName, EntryPoint = "IMC_InstallSysFw", ExactSpelling = false, CallingConvention = CallingConvention.Cdecl)]
        public static extern UInt32 IMC_InstallSysFw(HANDLETYPE cardHandle);

        //_DLL_API UINT32 IMC_GetChangeSysFwSts(UINT64 cardHandle, INT16 *pSts);
        [DllImport(EtherCATConfigApiDllName, EntryPoint = "IMC_GetChangeSysFwSts", ExactSpelling = false, CallingConvention = CallingConvention.Cdecl)]
        public static extern UInt32 IMC_GetChangeSysFwSts(HANDLETYPE cardHandle, ref Int16 pSts);

        //_DLL_API UINT32 IMC_GetWaitRstTime(UINT64 cardHandle, INT32 *pTime);
        [DllImport(EtherCATConfigApiDllName, EntryPoint = "IMC_GetWaitRstTime", ExactSpelling = false, CallingConvention = CallingConvention.Cdecl)]
        public static extern UInt32 IMC_GetWaitRstTime(HANDLETYPE cardHandle, ref Int32 pTime);

        //_DLL_API UINT32 IMC_GetHwVer(UINT64 cardHandle, INT16 *pVer);
        [DllImport(EtherCATConfigApiDllName, EntryPoint = "IMC_GetHwVer", ExactSpelling = false, CallingConvention = CallingConvention.Cdecl)]
        public static extern UInt32 IMC_GetHwVer(HANDLETYPE cardHandle, ref Int16 pVer);

        ///*==========================================================================*/
        ///*----1.2.1 ECAT资源设置接口                                             ---*/
        ///*==========================================================================*/
        //_DLL_API UINT32 IMC_SetEcatGrpDiInverse(HANDLETYPE cardHandle, INT16 groupNo, INT16 inverse);
        //_DLL_API UINT32 IMC_GetEcatGrpDiInverse(HANDLETYPE cardHandle, INT16 groupNo, INT16 *pInverse);
        //_DLL_API UINT32 IMC_SetEcatGrpDoInverse(HANDLETYPE cardHandle, INT16 groupNo, INT16 inverse);
        //_DLL_API UINT32 IMC_GetEcatGrpDoInverse(HANDLETYPE cardHandle, INT16 groupNo, INT16 *pInverse);

        //_DLL_API UINT32 IMC_SetEcatAxDirInv(HANDLETYPE cardHandle, INT16 chn, INT16 inverse);
        //_DLL_API UINT32 IMC_GetEcatAxDirInv(HANDLETYPE cardHandle, INT16 chn, INT16 *pInverse);

        //_DLL_API UINT32 IMC_SetEcatAdcPara(HANDLETYPE cardHandle, INT16 AdNo,INT16 inputType,INT16 filter,INT16 superSetPara); 
        //_DLL_API UINT32 IMC_GetEcatAdcPara(HANDLETYPE cardHandle, INT16 AdNo,INT16 *pInputType,INT16 *pFilter,INT16 *pSuperSetPara); 

        //_DLL_API UINT32 IMC_SetEcatDacPara(HANDLETYPE cardHandle, INT16 DaNo,INT16 outputType,INT16 stopOutputVal); 
        //_DLL_API UINT32 IMC_GetEcatDacPara(HANDLETYPE cardHandle, INT16 DaNo,INT16 *pOutputType,INT16 *pStopOutputVal); 

        [DllImport(EtherCATConfigApiDllName, EntryPoint = "IMC_SetEcatGrpDiInverse", ExactSpelling = false, CallingConvention = CallingConvention.Cdecl)]
        public static extern UInt32 IMC_SetEcatGrpDiInverse(HANDLETYPE cardHandle, Int16 groupNo, Int16 inverse);

        [DllImport(EtherCATConfigApiDllName, EntryPoint = "IMC_GetEcatGrpDiInverse", ExactSpelling = false, CallingConvention = CallingConvention.Cdecl)]
        public static extern UInt32 IMC_GetEcatGrpDiInverse(HANDLETYPE cardHandle, Int16 groupNo, ref Int16 pInverse);

        [DllImport(EtherCATConfigApiDllName, EntryPoint = "IMC_SetEcatGrpDoInverse", ExactSpelling = false, CallingConvention = CallingConvention.Cdecl)]
        public static extern UInt32 IMC_SetEcatGrpDoInverse(HANDLETYPE cardHandle, Int16 groupNo, Int16 inverse);

        [DllImport(EtherCATConfigApiDllName, EntryPoint = "IMC_GetEcatGrpDoInverse", ExactSpelling = false, CallingConvention = CallingConvention.Cdecl)]
        public static extern UInt32 IMC_GetEcatGrpDoInverse(HANDLETYPE cardHandle, Int16 groupNo, ref Int16 pInverse);

        [DllImport(EtherCATConfigApiDllName, EntryPoint = "IMC_SetEcatAxDirInv", ExactSpelling = false, CallingConvention = CallingConvention.Cdecl)]
        public static extern UInt32 IMC_SetEcatAxDirInv(HANDLETYPE cardHandle, Int16 chn, Int16 inverse);

        [DllImport(EtherCATConfigApiDllName, EntryPoint = "IMC_GetEcatAxDirInv", ExactSpelling = false, CallingConvention = CallingConvention.Cdecl)]
        public static extern UInt32 IMC_GetEcatAxDirInv(HANDLETYPE cardHandle, Int16 chn, ref Int16 pInverse);

        [DllImport(EtherCATConfigApiDllName, EntryPoint = "IMC_SetEcatAdcPara", ExactSpelling = false, CallingConvention = CallingConvention.Cdecl)]
        public static extern UInt32 IMC_SetEcatAdcPara(HANDLETYPE cardHandle, Int16 AdNo, Int16 inputType, Int16 filter, Int16 superSetPara);

        [DllImport(EtherCATConfigApiDllName, EntryPoint = "IMC_GetEcatAdcPara", ExactSpelling = false, CallingConvention = CallingConvention.Cdecl)]
        public static extern UInt32 IMC_GetEcatAdcPara(HANDLETYPE cardHandle, Int16 AdNo, ref Int16 pInputType, ref Int16 pFilter, ref Int16 pSuperSetPara);

        //[DllImport(EtherCATConfigApiDllName, EntryPoint = "IMC_SetEcatDacPara", ExactSpelling = false, CallingConvention = CallingConvention.Cdecl)]
        //public static extern UInt32 IMC_SetEcatDacPara(HANDLETYPE cardHandle, Int16 DaNo, Int16 outputType, Int16 stopOutputVal);

        [DllImport(EtherCATConfigApiDllName, EntryPoint = "IMC_GetEcatDacPara", ExactSpelling = false, CallingConvention = CallingConvention.Cdecl)]
        public static extern UInt32 IMC_GetEcatDacPara(HANDLETYPE cardHandle, Int16 DaNo, ref Int16 pOutputType, ref Int16 pStopOutputVal);
        ///*==========================================================================*/
        ///*----1.2.2 端子板资源设置接口                                           ---*/
        ///*==========================================================================*/
        //_DLL_API UINT32 IMC_GetBoardWorkSts(HANDLETYPE cardHandle, INT16 *pValue);
        //_DLL_API UINT32 IMC_GetBoardDiagSts(UINT64 cardHandle, INT16 *pValue);
        //_DLL_API UINT32 IMC_SetLocalDiFilterTime(HANDLETYPE cardHandle, INT16 diIndex, UINT16 *pFilterTime, INT16 count = 1);
        //_DLL_API UINT32 IMC_GetLocalDiFilterTime(HANDLETYPE cardHandle, INT16 diIndex, UINT16 *pFilterTime, INT16 count = 1);
        //_DLL_API UINT32 IMC_SetLocalHmLmtPrbFilterTime(HANDLETYPE cardHandle, INT16 homeFltTime, INT16 limitFltTime, INT16 probeFltTime);
        //_DLL_API UINT32 IMC_GetLocalHmLmtPrbFilterTime(HANDLETYPE cardHandle, INT16 *pHomeFltTime, INT16 *pLimitFltTime, INT16 *pProbeFltTime);
        //_DLL_API UINT32 IMC_SetLocalSpecialIOInverse(HANDLETYPE cardHandle, INT16 type, INT16 inverse);
        //_DLL_API UINT32 IMC_GetLocalSpecialIOInverse(HANDLETYPE cardHandle, INT16 type, INT16 *pInverse);
        //_DLL_API UINT32 IMC_SetLocalDiInverse(HANDLETYPE cardHandle, INT16 inverse);
        //_DLL_API UINT32 IMC_GetLocalDiInverse(HANDLETYPE cardHandle, INT16 *pInverse);
        //_DLL_API UINT32 IMC_SetLocalDoInverse(HANDLETYPE cardHandle, INT16 inverse);
        //_DLL_API UINT32 IMC_GetLocalDoInverse(HANDLETYPE cardHandle, INT16 *pInverse);
        //_DLL_API UINT32 IMC_SetLocalEncDir(HANDLETYPE cardHandle, INT16 index, INT16 *dir, INT16 count = 1);
        //_DLL_API UINT32 IMC_GetLocalEncDir(HANDLETYPE cardHandle, INT16 index, INT16 *dir, INT16 count = 1);
        //_DLL_API UINT32 IMC_SetLocalPulseMode(HANDLETYPE cardHandle, INT16 plsIndex, INT16 mode, INT16 dirInverse);
        //_DLL_API UINT32 IMC_GetLocalPulseMode(HANDLETYPE cardHandle, INT16 plsIndex, INT16 *pMode, INT16 *pDirInverse);
        //_DLL_API UINT32 IMC_SetLocalGpoUseType(UINT64 cardHandle, INT16 index, INT16 type);
        //_DLL_API UINT32 IMC_GetLocalGpoUseType(UINT64 cardHandle, INT16 index, INT16 *pType);
        //_DLL_API UINT32 IMC_SetEncFilterPara(UINT64 cardHandle, INT16 index, INT16 filterDepth, INT16 filterCoef);
        //_DLL_API UINT32 IMC_GetEncFilterPara(UINT64 cardHandle, INT16 index, INT16 *pFilterDepth, INT16 *pFilterCoef);

        [DllImport(EtherCATConfigApiDllName, EntryPoint = "IMC_GetBoardWorkSts", ExactSpelling = false, CallingConvention = CallingConvention.Cdecl)]
        public static extern UInt32 IMC_GetBoardWorkSts(HANDLETYPE cardHandle, ref Int16 pValue);

        //[DllImport(EtherCATConfigApiDllName, EntryPoint = "IMC_GetBoardDiagSts", ExactSpelling = false, CallingConvention = CallingConvention.Cdecl)]
        //public static extern UInt32 IMC_GetBoardDiagSts(HANDLETYPE cardHandle, ref Int16 pValue);

        [DllImport(EtherCATConfigApiDllName, EntryPoint = "IMC_SetLocalDiFilterTime", ExactSpelling = false, CallingConvention = CallingConvention.Cdecl)]
        public static extern UInt32 IMC_SetLocalDiFilterTime(HANDLETYPE cardHandle, Int16 diIndex, UInt16[] pFilterTime, Int16 count = 1);

        [DllImport(EtherCATConfigApiDllName, EntryPoint = "IMC_GetLocalDiFilterTime", ExactSpelling = false, CallingConvention = CallingConvention.Cdecl)]
        public static extern UInt32 IMC_GetLocalDiFilterTime(HANDLETYPE cardHandle, Int16 diIndex, UInt16[] pFilterTime, Int16 count = 1);

        [DllImport(EtherCATConfigApiDllName, EntryPoint = "IMC_SetLocalHmLmtPrbFilterTime", ExactSpelling = false, CallingConvention = CallingConvention.Cdecl)]
        public static extern UInt32 IMC_SetLocalHmLmtPrbFilterTime(HANDLETYPE cardHandle, Int16 homeFltTime, Int16 limitFltTime, Int16 probeFltTime);

        [DllImport(EtherCATConfigApiDllName, EntryPoint = "IMC_GetLocalHmLmtPrbFilterTime", ExactSpelling = false, CallingConvention = CallingConvention.Cdecl)]
        public static extern UInt32 IMC_GetLocalHmLmtPrbFilterTime(HANDLETYPE cardHandle, ref Int16 pHomeFltTime, ref Int16 pLimitFltTime, ref Int16 pProbeFltTime);

        //public const uint SPECIAL_IO_RDY = (0);   // 准备完成信号
        //public const uint SPECIAL_IO_ARRIV = (1);   // 到位信号
        //public const uint SPECIAL_IO_ALARM = (2);   // 报警信号
        //public const uint SPECIAL_IO_POSLMT = (3);   // 正限位信号
        //public const uint SPECIAL_IO_NEGLMT = (4);   // 负限位信号
        //public const uint SPECIAL_IO_CLR = (5);   // 清除报警信号
        //public const uint SPECIAL_IO_SV = (6);   // 伺服使能信号

        [DllImport(EtherCATConfigApiDllName, EntryPoint = "IMC_SetLocalSpecialIOInverse", ExactSpelling = false, CallingConvention = CallingConvention.Cdecl)]
        public static extern UInt32 IMC_SetLocalSpecialIOInverse(HANDLETYPE cardHandle, Int16 type, Int16 inverse);

        [DllImport(EtherCATConfigApiDllName, EntryPoint = "IMC_GetLocalSpecialIOInverse", ExactSpelling = false, CallingConvention = CallingConvention.Cdecl)]
        public static extern UInt32 IMC_GetLocalSpecialIOInverse(HANDLETYPE cardHandle, Int16 type, ref Int16 pInverse);

        [DllImport(EtherCATConfigApiDllName, EntryPoint = "IMC_SetLocalDiInverse", ExactSpelling = false, CallingConvention = CallingConvention.Cdecl)]
        public static extern UInt32 IMC_SetLocalDiInverse(HANDLETYPE cardHandle, Int16 inverse);

        [DllImport(EtherCATConfigApiDllName, EntryPoint = "IMC_GetLocalDiInverse", ExactSpelling = false, CallingConvention = CallingConvention.Cdecl)]
        public static extern UInt32 IMC_GetLocalDiInverse(HANDLETYPE cardHandle, ref Int16 pInverse);

        [DllImport(EtherCATConfigApiDllName, EntryPoint = "IMC_SetLocalDoInverse", ExactSpelling = false, CallingConvention = CallingConvention.Cdecl)]
        public static extern UInt32 IMC_SetLocalDoInverse(HANDLETYPE cardHandle, Int16 inverse);

        [DllImport(EtherCATConfigApiDllName, EntryPoint = "IMC_GetLocalDoInverse", ExactSpelling = false, CallingConvention = CallingConvention.Cdecl)]
        public static extern UInt32 IMC_GetLocalDoInverse(HANDLETYPE cardHandle, ref Int16 pInverse);

        [DllImport(EtherCATConfigApiDllName, EntryPoint = "IMC_SetLocalEncDir", ExactSpelling = false, CallingConvention = CallingConvention.Cdecl)]
        public static extern UInt32 IMC_SetLocalEncDir(HANDLETYPE cardHandle, Int16 index, Int16[] dir, Int16 count = 1);

        [DllImport(EtherCATConfigApiDllName, EntryPoint = "IMC_GetLocalEncDir", ExactSpelling = false, CallingConvention = CallingConvention.Cdecl)]
        public static extern UInt32 IMC_GetLocalEncDir(HANDLETYPE cardHandle, Int16 index, Int16[] dir, Int16 count = 1);

        [DllImport(EtherCATConfigApiDllName, EntryPoint = "IMC_SetLocalPulseMode", ExactSpelling = false, CallingConvention = CallingConvention.Cdecl)]
        public static extern UInt32 IMC_SetLocalPulseMode(HANDLETYPE cardHandle, Int16 plsIndex, Int16 mode, Int16 dirInverse);

        [DllImport(EtherCATConfigApiDllName, EntryPoint = "IMC_GetLocalPulseMode", ExactSpelling = false, CallingConvention = CallingConvention.Cdecl)]
        public static extern UInt32 IMC_GetLocalPulseMode(HANDLETYPE cardHandle, Int16 plsIndex, ref Int16 pMode, ref Int16 pDirInverse);

        [DllImport(EtherCATConfigApiDllName, EntryPoint = "IMC_SetLocalGpoUseType", ExactSpelling = false, CallingConvention = CallingConvention.Cdecl)]
        public static extern UInt32 IMC_SetLocalGpoUseType(HANDLETYPE cardHandle, Int16 index, Int16 type);
        [DllImport(EtherCATConfigApiDllName, EntryPoint = "IMC_GetLocalGpoUseType", ExactSpelling = false, CallingConvention = CallingConvention.Cdecl)]
        public static extern UInt32 IMC_GetLocalGpoUseType(HANDLETYPE cardHandle, Int16 index, ref Int16 pType);
        [DllImport(EtherCATConfigApiDllName, EntryPoint = "IMC_SetEncFilterPara", ExactSpelling = false, CallingConvention = CallingConvention.Cdecl)]
        public static extern UInt32 IMC_SetEncFilterPara(HANDLETYPE cardHandle, Int16 index, Int16 filterDepth, Int16 filterCoef);
        [DllImport(EtherCATConfigApiDllName, EntryPoint = "IMC_GetEncFilterPara", ExactSpelling = false, CallingConvention = CallingConvention.Cdecl)]
        public static extern UInt32 IMC_GetEncFilterPara(HANDLETYPE cardHandle, Int16 index, ref Int16 pFilterDepth, ref Int16 pFilterCoef);

        ///*==========================================================================*/
        ///*----1.2.3 系统参数设置接口                                             ---*/
        ///*==========================================================================*/
        //_DLL_API UINT32 IMC_GetHwSysPara(HANDLETYPE cardHandle, INT16 *pCycleTime, INT16 *pHwType);
        //_DLL_API UINT32 IMC_ResetSysPara(HANDLETYPE cardHandle);
        //_DLL_API UINT32 IMC_GetCalcLoadRatio(HANDLETYPE cardHandle,double *pLoadRatio);
        //_DLL_API UINT32 IMC_GetVersion (HANDLETYPE cardHandle, INT16 *pVersion);
        //_DLL_API UINT32 IMC_WriteUserCode(HANDLETYPE cardHandle, char *pCode, INT16 len);
        //_DLL_API UINT32 IMC_CheckUserCode(HANDLETYPE cardHandle, char *pCode, INT16 len);

        //_DLL_API UINT32 IMC_SetEmgStopMode(HANDLETYPE cardHandle,INT16 stopMode);
        //_DLL_API UINT32 IMC_GetEmgStopMode(HANDLETYPE cardHandle,INT16 *pStopMode);
        //_DLL_API UINT32 IMC_SetEmgFilter(HANDLETYPE cardHandle,INT16 filter);
        //_DLL_API UINT32 IMC_GetEmgFilter(HANDLETYPE cardHandle,INT16 *pFilter);
        //_DLL_API UINT32 IMC_SetEmgTrigLevelInv(HANDLETYPE cardHandle, INT16 inverse);
        //_DLL_API UINT32 IMC_GetEmgTrigLevelInv(HANDLETYPE cardHandle, INT16 *pInverse);
        //_DLL_API UINT32 IMC_GetEmgDiLevel (HANDLETYPE cardHandle,INT16 * pLevel);

        //_DLL_API UINT32 IMC_OpenWatchDog(UINT64 cardHandle,INT32 feedTime);
        //_DLL_API UINT32 IMC_FeedWatchDog(UINT64 cardHandle);
        //_DLL_API UINT32 IMC_CloseWatchDog(UINT64 cardHandle);
        //_DLL_API UINT32 IMC_EnableCheckEcatErrCode(UINT64 cardHandle,INT16 flag);

        [DllImport(EtherCATConfigApiDllName, EntryPoint = "IMC_GetHwSysPara", ExactSpelling = false, CallingConvention = CallingConvention.Cdecl)]
        public static extern UInt32 IMC_GetHwSysPara(HANDLETYPE cardHandle, ref Int16 pCycleTime, ref Int16 pHwType);

        [DllImport(EtherCATConfigApiDllName, EntryPoint = "IMC_ResetSysPara", ExactSpelling = false, CallingConvention = CallingConvention.Cdecl)]
        public static extern UInt32 IMC_ResetSysPara(HANDLETYPE cardHandle);

        [DllImport(EtherCATConfigApiDllName, EntryPoint = "IMC_GetCalcLoadRatio", ExactSpelling = false, CallingConvention = CallingConvention.Cdecl)]
        public static extern UInt32 IMC_GetCalcLoadRatio(HANDLETYPE cardHandle, ref double pLoadRatio);

        [DllImport(EtherCATConfigApiDllName, EntryPoint = "IMC_GetVersion", ExactSpelling = false, CallingConvention = CallingConvention.Cdecl)]
        public static extern UInt32 IMC_GetVersion(HANDLETYPE cardHandle, Int16[] pVersion);

        [DllImport(EtherCATConfigApiDllName, EntryPoint = "IMC_WriteUserCode", ExactSpelling = false, CallingConvention = CallingConvention.Cdecl)]
        public static extern UInt32 IMC_WriteUserCode(HANDLETYPE cardHandle, string pCode, Int16 len);

        [DllImport(EtherCATConfigApiDllName, EntryPoint = "IMC_CheckUserCode", ExactSpelling = false, CallingConvention = CallingConvention.Cdecl)]
        public static extern UInt32 IMC_CheckUserCode(HANDLETYPE cardHandle, string pCode, Int16 len);

        [DllImport(EtherCATConfigApiDllName, EntryPoint = "IMC_SetEmgStopMode", ExactSpelling = false, CallingConvention = CallingConvention.Cdecl)]
        public static extern UInt32 IMC_SetEmgStopMode(HANDLETYPE cardHandle, Int16 stopMode);

        [DllImport(EtherCATConfigApiDllName, EntryPoint = "IMC_GetEmgStopMode", ExactSpelling = false, CallingConvention = CallingConvention.Cdecl)]
        public static extern UInt32 IMC_GetEmgStopMode(HANDLETYPE cardHandle, ref Int16 pStopMode);

        [DllImport(EtherCATConfigApiDllName, EntryPoint = "IMC_SetEmgFilter", ExactSpelling = false, CallingConvention = CallingConvention.Cdecl)]
        public static extern UInt32 IMC_SetEmgFilter(HANDLETYPE cardHandle, Int16 filter);

        [DllImport(EtherCATConfigApiDllName, EntryPoint = "IMC_GetEmgFilter", ExactSpelling = false, CallingConvention = CallingConvention.Cdecl)]
        public static extern UInt32 IMC_GetEmgFilter(HANDLETYPE cardHandle, ref Int16 pFilter);

        [DllImport(EtherCATConfigApiDllName, EntryPoint = "IMC_SetEmgTrigLevelInv", ExactSpelling = false, CallingConvention = CallingConvention.Cdecl)]
        public static extern UInt32 IMC_SetEmgTrigLevelInv(HANDLETYPE cardHandle, Int16 inverse);

        [DllImport(EtherCATConfigApiDllName, EntryPoint = "IMC_GetEmgTrigLevelInv", ExactSpelling = false, CallingConvention = CallingConvention.Cdecl)]
        public static extern UInt32 IMC_GetEmgTrigLevelInv(HANDLETYPE cardHandle, ref Int16 pInverse);

        [DllImport(EtherCATConfigApiDllName, EntryPoint = "IMC_GetEmgDiLevel", ExactSpelling = false, CallingConvention = CallingConvention.Cdecl)]
        public static extern UInt32 IMC_GetEmgDiLevel(HANDLETYPE cardHandle, ref Int16 pLevel);


        [DllImport(EtherCATConfigApiDllName, EntryPoint = "IMC_OpenWatchDog", ExactSpelling = false, CallingConvention = CallingConvention.Cdecl)]
        public static extern UInt32 IMC_OpenWatchDog(HANDLETYPE cardHandle, Int32 feedTime);
        [DllImport(EtherCATConfigApiDllName, EntryPoint = "IMC_FeedWatchDog", ExactSpelling = false, CallingConvention = CallingConvention.Cdecl)]
        public static extern UInt32 IMC_FeedWatchDog(HANDLETYPE cardHandle);
        [DllImport(EtherCATConfigApiDllName, EntryPoint = "IMC_CloseWatchDog", ExactSpelling = false, CallingConvention = CallingConvention.Cdecl)]
        public static extern UInt32 IMC_CloseWatchDog(HANDLETYPE cardHandle);
        [DllImport(EtherCATConfigApiDllName, EntryPoint = "IMC_EnableCheckEcatErrCode", ExactSpelling = false, CallingConvention = CallingConvention.Cdecl)]
        public static extern UInt32 IMC_EnableCheckEcatErrCode(HANDLETYPE cardHandle, Int16 flag);

        ///*==========================================================================*/
        ///*----1.2.4 轴参数设置接口                                               ---*/
        ///*==========================================================================*/
        //_DLL_API UINT32 IMC_SetAxActive(UINT64 cardHandle, INT16 axNo, INT16 active);
        //_DLL_API UINT32 IMC_GetAxActive(UINT64 cardHandle, INT16 axNo, INT16 *pActive);
        //_DLL_API UINT32 IMC_SetAxMaxMtPara(HANDLETYPE cardHandle, INT16 axNo, TMtPara *pMtPara);
        //_DLL_API UINT32 IMC_GetAxMaxMtPara(HANDLETYPE cardHandle, INT16 axNo, TMtPara *pMtPara);
        ////_DLL_API UINT32 IMC_SetAxEquiv(HANDLETYPE cardHandle, INT16 axNo, double *pAxEqu,INT16 count=1);
        ////_DLL_API UINT32 IMC_GetAxEquiv(HANDLETYPE cardHandle, INT16 axNo, double *pAxEqu,INT16 count=1);
        //_DLL_API UINT32 IMC_SetAxBondCfg(HANDLETYPE cardHandle, INT16 axNo, INT16 axType, INT16 outputChn, INT16 loaclEncSrc);
        //_DLL_API UINT32 IMC_GetAxBondCfg(HANDLETYPE cardHandle, INT16 axNo, INT16 *pAxType, INT16 *pOutputChn, INT16 *pLoaclEncSrc);
        //_DLL_API UINT32 IMC_ResetAxBondCfg(UINT64 cardHandle);
        //_DLL_API UINT32 IMC_SetAxAttriPara(HANDLETYPE cardHandle, INT16 axNo, TAxAttriPara *pAxAttriPara);
        //_DLL_API UINT32 IMC_GetAxAttriPara(HANDLETYPE cardHandle, INT16 axNo, TAxAttriPara *pAxAttriPara);
        //_DLL_API UINT32 IMC_SetAxSoftLimit(HANDLETYPE cardHandle, INT16 axNo, INT32 softPosLimitPos, INT32 softNegLimitPos);
        //_DLL_API UINT32 IMC_GetAxSoftLimit(HANDLETYPE cardHandle, INT16 axNo, INT32 *pSoftPosLimitPos, INT32 *pSoftNegLimitPos);
        //_DLL_API UINT32 IMC_SetAxArrivalBand(HANDLETYPE cardHandle, INT16 axNo, INT16 arrivalBand, INT16 arrivalTime);
        //_DLL_API UINT32 IMC_GetAxArrivalBand(HANDLETYPE cardHandle, INT16 axNo, INT16 *pArrivalBand, INT16 *pArrivalTime);
        //_DLL_API UINT32 IMC_SetAxErrorPos(HANDLETYPE cardHandle, INT16 axNo, INT32 errorPos);
        //_DLL_API UINT32 IMC_GetAxErrorPos(HANDLETYPE cardHandle, INT16 axNo, INT32 *pErrorPos);
        //_DLL_API UINT32 IMC_SetAxBacklash (HANDLETYPE cardHandle,INT16 axNo, INT32 wholeCmpVal, INT32 cmpVel, INT16 cmpDir);
        //_DLL_API UINT32 IMC_GetAxBacklash (HANDLETYPE cardHandle,INT16 axNo, INT32 *pWholeCmpVal, INT32 *pCmpVel, INT16 *pCmpDir);
        //_DLL_API UINT32 IMC_AxSafeCheckEnable(HANDLETYPE cardHandle, INT16 axNo, TAxCheckEn *pAxCheckEn);
        //_DLL_API UINT32 IMC_AxSafeCheckSts(HANDLETYPE cardHandle, INT16 axNo, TAxCheckEn *pAxCheckEn);
        //_DLL_API UINT32 IMC_AxAlarmEnable(HANDLETYPE cardHandle, INT16 axNo, INT16 count = 1);
        //_DLL_API UINT32 IMC_AxAlarmDisable(HANDLETYPE cardHandle, INT16 axNo, INT16 count = 1);
        //_DLL_API UINT32 IMC_AxSoftLmtsEnable(HANDLETYPE cardHandle, INT16 axNo, INT16 count = 1);
        //_DLL_API UINT32 IMC_AxSoftLmtsDisable(HANDLETYPE cardHandle, INT16 axNo, INT16 count = 1);
        //_DLL_API UINT32 IMC_AxHwLmtsEnable(HANDLETYPE cardHandle, INT16 axNo, INT16 count = 1);
        //_DLL_API UINT32 IMC_AxHwLmtsDisable(HANDLETYPE cardHandle, INT16 axNo, INT16 count = 1);
        //_DLL_API UINT32 IMC_AxErrPosEnable(HANDLETYPE cardHandle, INT16 axNo, INT16 count = 1);
        //_DLL_API UINT32 IMC_AxErrPosDisable(HANDLETYPE cardHandle, INT16 axNo, INT16 count = 1);
        //_DLL_API UINT32 IMC_SetupAxGantry(UINT64 cardHandle,INT16 groupNo,INT16 masterAxNo,INT16 slaveAxNo,INT32 errorLmt);
        //_DLL_API UINT32 IMC_AbortAxGantry(UINT64 cardHandle,INT16 groupNo);
        //_DLL_API UINT32 IMC_GetAxGantrySts(UINT64 cardHandle,INT16 groupNo,INT16 *pMasterAxNo,INT16 *pSlaveAxNo,INT32 *pErrorLmt,INT16 *pSts);
        //_DLL_API UINT32 IMC_ClrAxGantrySts(UINT64 cardHandle,INT16 groupNo);
        [DllImport(EtherCATConfigApiDllName, EntryPoint = "IMC_SetAxActive", ExactSpelling = false, CallingConvention = CallingConvention.Cdecl)]
        public static extern UInt32 IMC_SetAxActive(HANDLETYPE cardHandle, Int16 axNo, Int16 active);

        [DllImport(EtherCATConfigApiDllName, EntryPoint = "IMC_GetAxActive", ExactSpelling = false, CallingConvention = CallingConvention.Cdecl)]
        public static extern UInt32 IMC_GetAxActive(HANDLETYPE cardHandle, Int16 axNo, ref Int16 pActive);

        [DllImport(EtherCATConfigApiDllName, EntryPoint = "IMC_SetAxMaxMtPara", ExactSpelling = false, CallingConvention = CallingConvention.Cdecl)]
        public static extern UInt32 IMC_SetAxMaxMtPara(HANDLETYPE cardHandle, Int16 axNo, ref TMtPara pMtPara);

        [DllImport(EtherCATConfigApiDllName, EntryPoint = "IMC_GetAxMaxMtPara", ExactSpelling = false, CallingConvention = CallingConvention.Cdecl)]
        public static extern UInt32 IMC_GetAxMaxMtPara(HANDLETYPE cardHandle, Int16 axNo, ref TMtPara pMtPara);

        [DllImport(EtherCATConfigApiDllName, EntryPoint = "IMC_SetAxEquiv", ExactSpelling = false, CallingConvention = CallingConvention.Cdecl)]
        public static extern UInt32 IMC_SetAxEquiv(HANDLETYPE cardHandle, Int16 axNo, double[] pAxEqu, Int16 count = 1);

        [DllImport(EtherCATConfigApiDllName, EntryPoint = "IMC_GetAxEquiv", ExactSpelling = false, CallingConvention = CallingConvention.Cdecl)]
        public static extern UInt32 IMC_GetAxEquiv(HANDLETYPE cardHandle, Int16 axNo, double[] pAxEqu, Int16 count = 1);

        [DllImport(EtherCATConfigApiDllName, EntryPoint = "IMC_SetAxBondCfg", ExactSpelling = false, CallingConvention = CallingConvention.Cdecl)]
        public static extern UInt32 IMC_SetAxBondCfg(HANDLETYPE cardHandle, Int16 axNo, Int16 axType, Int16 outputChn, Int16 loaclEncSrc);


        [DllImport(EtherCATConfigApiDllName, EntryPoint = "IMC_GetAxBondCfg", ExactSpelling = false, CallingConvention = CallingConvention.Cdecl)]
        public static extern UInt32 IMC_GetAxBondCfg(HANDLETYPE cardHandle, Int16 axNo, ref Int16 pAxType, ref Int16 pOutputChn, ref Int16 pLoaclEncSrc);

        [DllImport(EtherCATConfigApiDllName, EntryPoint = "IMC_ResetAxBondCfg", ExactSpelling = false, CallingConvention = CallingConvention.Cdecl)]
        public static extern UInt32 IMC_ResetAxBondCfg(HANDLETYPE cardHandle);

        [DllImport(EtherCATConfigApiDllName, EntryPoint = "IMC_SetAxAttriPara", ExactSpelling = false, CallingConvention = CallingConvention.Cdecl)]
        public static extern UInt32 IMC_SetAxAttriPara(HANDLETYPE cardHandle, Int16 axNo, ref TAxAttriPara pAxAttriPara);

        [DllImport(EtherCATConfigApiDllName, EntryPoint = "IMC_GetAxAttriPara", ExactSpelling = false, CallingConvention = CallingConvention.Cdecl)]
        public static extern UInt32 IMC_GetAxAttriPara(HANDLETYPE cardHandle, Int16 axNo, ref TAxAttriPara pAxAttriPara);

        [DllImport(EtherCATConfigApiDllName, EntryPoint = "IMC_SetAxSoftLimit", ExactSpelling = false, CallingConvention = CallingConvention.Cdecl)]
        public static extern UInt32 IMC_SetAxSoftLimit(HANDLETYPE cardHandle, Int16 axNo, Int32 softPosLimitPos, Int32 softNegLimitPos);

        [DllImport(EtherCATConfigApiDllName, EntryPoint = "IMC_GetAxSoftLimit", ExactSpelling = false, CallingConvention = CallingConvention.Cdecl)]
        public static extern UInt32 IMC_GetAxSoftLimit(HANDLETYPE cardHandle, Int16 axNo, ref Int32 pSoftPosLimitPos, ref Int32 pSoftNegLimitPos);

        [DllImport(EtherCATConfigApiDllName, EntryPoint = "IMC_SetAxArrivalBand", ExactSpelling = false, CallingConvention = CallingConvention.Cdecl)]
        public static extern UInt32 IMC_SetAxArrivalBand(HANDLETYPE cardHandle, Int16 axNo, Int16 arrivalBand, Int16 arrivalTime);

        [DllImport(EtherCATConfigApiDllName, EntryPoint = "IMC_GetAxArrivalBand", ExactSpelling = false, CallingConvention = CallingConvention.Cdecl)]
        public static extern UInt32 IMC_GetAxArrivalBand(HANDLETYPE cardHandle, Int16 axNo, ref Int16 pArrivalBand, ref Int16 pArrivalTime);

        [DllImport(EtherCATConfigApiDllName, EntryPoint = "IMC_SetAxErrorPos", ExactSpelling = false, CallingConvention = CallingConvention.Cdecl)]
        public static extern UInt32 IMC_SetAxErrorPos(HANDLETYPE cardHandle, Int16 axNo, Int32 errorPos);

        [DllImport(EtherCATConfigApiDllName, EntryPoint = "IMC_GetAxErrorPos", ExactSpelling = false, CallingConvention = CallingConvention.Cdecl)]
        public static extern UInt32 IMC_GetAxErrorPos(HANDLETYPE cardHandle, Int16 axNo, ref Int32 pErrorPos);

        [DllImport(EtherCATConfigApiDllName, EntryPoint = "IMC_SetAxBacklash", ExactSpelling = false, CallingConvention = CallingConvention.Cdecl)]
        public static extern UInt32 IMC_SetAxBacklash(HANDLETYPE cardHandle, Int16 axNo, Int32 wholeCmpVal, Int32 cmpVel, Int16 cmpDir);

        [DllImport(EtherCATConfigApiDllName, EntryPoint = "IMC_GetAxBacklash", ExactSpelling = false, CallingConvention = CallingConvention.Cdecl)]
        public static extern UInt32 IMC_GetAxBacklash(HANDLETYPE cardHandle, Int16 axNo, ref Int32 pWholeCmpVal, ref Int32 pCmpVel, ref Int16 pCmpDir);

        [DllImport(EtherCATConfigApiDllName, EntryPoint = "IMC_AxSafeCheckEnable", ExactSpelling = false, CallingConvention = CallingConvention.Cdecl)]
        public static extern UInt32 IMC_AxSafeCheckEnable(HANDLETYPE cardHandle, Int16 axNo, ref TAxCheckEn pAxCheckEn);

        [DllImport(EtherCATConfigApiDllName, EntryPoint = "IMC_AxSafeCheckSts", ExactSpelling = false, CallingConvention = CallingConvention.Cdecl)]
        public static extern UInt32 IMC_AxSafeCheckSts(HANDLETYPE cardHandle, Int16 axNo, ref TAxCheckEn pAxCheckEn);

        [DllImport(EtherCATConfigApiDllName, EntryPoint = "IMC_AxAlarmEnable", ExactSpelling = false, CallingConvention = CallingConvention.Cdecl)]
        public static extern UInt32 IMC_AxAlarmEnable(HANDLETYPE cardHandle, Int16 axNo, Int16 count = 1);

        [DllImport(EtherCATConfigApiDllName, EntryPoint = "IMC_AxAlarmDisable", ExactSpelling = false, CallingConvention = CallingConvention.Cdecl)]
        public static extern UInt32 IMC_AxAlarmDisable(HANDLETYPE cardHandle, Int16 axNo, Int16 count = 1);

        [DllImport(EtherCATConfigApiDllName, EntryPoint = "IMC_AxSoftLmtsEnable", ExactSpelling = false, CallingConvention = CallingConvention.Cdecl)]
        public static extern UInt32 IMC_AxSoftLmtsEnable(HANDLETYPE cardHandle, Int16 axNo, Int16 count = 1);

        [DllImport(EtherCATConfigApiDllName, EntryPoint = "IMC_AxSoftLmtsDisable", ExactSpelling = false, CallingConvention = CallingConvention.Cdecl)]
        public static extern UInt32 IMC_AxSoftLmtsDisable(HANDLETYPE cardHandle, Int16 axNo, Int16 count = 1);

        [DllImport(EtherCATConfigApiDllName, EntryPoint = "IMC_AxHwLmtsEnable", ExactSpelling = false, CallingConvention = CallingConvention.Cdecl)]
        public static extern UInt32 IMC_AxHwLmtsEnable(HANDLETYPE cardHandle, Int16 axNo, Int16 count = 1);

        [DllImport(EtherCATConfigApiDllName, EntryPoint = "IMC_AxHwLmtsDisable", ExactSpelling = false, CallingConvention = CallingConvention.Cdecl)]
        public static extern UInt32 IMC_AxHwLmtsDisable(HANDLETYPE cardHandle, Int16 axNo, Int16 count = 1);

        [DllImport(EtherCATConfigApiDllName, EntryPoint = "IMC_AxErrPosEnable", ExactSpelling = false, CallingConvention = CallingConvention.Cdecl)]
        public static extern UInt32 IMC_AxErrPosEnable(HANDLETYPE cardHandle, Int16 axNo, Int16 count = 1);

        [DllImport(EtherCATConfigApiDllName, EntryPoint = "IMC_AxErrPosDisable", ExactSpelling = false, CallingConvention = CallingConvention.Cdecl)]
        public static extern UInt32 IMC_AxErrPosDisable(HANDLETYPE cardHandle, Int16 axNo, Int16 count = 1);


        [DllImport(EtherCATConfigApiDllName, EntryPoint = "IMC_SetupAxGantry", ExactSpelling = false, CallingConvention = CallingConvention.Cdecl)]
        public static extern UInt32 IMC_SetupAxGantry(HANDLETYPE cardHandle, Int16 groupNo, Int16 masterAxNo, Int16 slaveAxNo, Int32 errorLmt);

        [DllImport(EtherCATConfigApiDllName, EntryPoint = "IMC_AbortAxGantry", ExactSpelling = false, CallingConvention = CallingConvention.Cdecl)]
        public static extern UInt32 IMC_AbortAxGantry(HANDLETYPE cardHandle, Int16 groupNo);

        [DllImport(EtherCATConfigApiDllName, EntryPoint = "IMC_GetAxGantrySts", ExactSpelling = false, CallingConvention = CallingConvention.Cdecl)]
        public static extern UInt32 IMC_GetAxGantrySts(HANDLETYPE cardHandle, Int16 groupNo, ref Int16 pMasterAxNo, ref Int16 pSlaveAxNo, ref Int32 pErrorLmt, ref Int16 pSts);
        [DllImport(EtherCATConfigApiDllName, EntryPoint = "IMC_ClrAxGantrySts", ExactSpelling = false, CallingConvention = CallingConvention.Cdecl)]
        public static extern UInt32 IMC_ClrAxGantrySts(HANDLETYPE cardHandle, Int16 groupNo);

        ///*==========================================================================*/
        ///*----2.1 ECAT硬件操作接口                                               ---*/
        ///*==========================================================================*/
        ///*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/
        ///*----2.1.1ECAT总线 SDO操作以及状态查询                                  ---*/
        ///*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/
        //_DLL_API UINT32 IMC_GetSlaveCurSts(HANDLETYPE cardHandle, UINT16 Station_id, UINT16 cnt, INT16 *pStatus);
        //_DLL_API UINT32 IMC_GetSlaveReqSts(HANDLETYPE cardHandle, UINT16 Station_id, UINT16 cnt, INT16 *pStatus);
        //_DLL_API UINT32 IMC_GetEcatErrCode(HANDLETYPE cardHandle, UINT32 *pErrCode);
        //_DLL_API UINT32 IMC_GetAxEcatStation(UINT64 cardHandle, UINT16 virAxNo, INT16 *pPhyStation_id, INT16 *pPhySlot_id);
        //_DLL_API UINT32 IMC_GetEcatSdo(HANDLETYPE cardHandle, INT16 station_id, UINT16 index,  UINT16 subindex, UINT8 *target, UINT32 target_size, UINT32 *result_size, UINT32 *abort_code);
        //_DLL_API UINT32 IMC_SetEcatSdo(HANDLETYPE cardHandle, INT16 station_id, UINT16 index,  UINT16 subindex, UINT8 *data,UINT32 data_size, UINT32 *abort_code);
        [DllImport(EtherCATConfigApiDllName, EntryPoint = "IMC_GetSlaveCurSts", ExactSpelling = false, CallingConvention = CallingConvention.Cdecl)]
        public static extern UInt32 IMC_GetSlaveCurSts(HANDLETYPE cardHandle, UInt16 Station_id, UInt16 cnt, Int16[] pStatus);

        [DllImport(EtherCATConfigApiDllName, EntryPoint = "IMC_GetSlaveReqSts", ExactSpelling = false, CallingConvention = CallingConvention.Cdecl)]
        public static extern UInt32 IMC_GetSlaveReqSts(HANDLETYPE cardHandle, UInt16 Station_id, UInt16 cnt, Int16[] pStatus);

        [DllImport(EtherCATConfigApiDllName, EntryPoint = "IMC_GetEcatErrCode", ExactSpelling = false, CallingConvention = CallingConvention.Cdecl)]
        public static extern UInt32 IMC_GetEcatErrCode(HANDLETYPE cardHandle, ref UInt32 pErrCode);

        [DllImport(EtherCATConfigApiDllName, EntryPoint = "IMC_GetAxEcatStation", ExactSpelling = false, CallingConvention = CallingConvention.Cdecl)]
        public static extern UInt32 IMC_GetAxEcatStation(HANDLETYPE cardHandle, UInt16 virAxNo, ref Int16 pPhyStation_id, ref Int16 pPhySlot_id);

        [DllImport(EtherCATConfigApiDllName, EntryPoint = "IMC_GetEcatSdo", ExactSpelling = false, CallingConvention = CallingConvention.Cdecl)]
        public static extern UInt32 IMC_GetEcatSdo(HANDLETYPE cardHandle, Int16 station_id, UInt16 index, UInt16 subindex, Byte[] target, UInt32 target_size, ref UInt32 result_size, ref UInt32 abort_code);

        [DllImport(EtherCATConfigApiDllName, EntryPoint = "IMC_SetEcatSdo", ExactSpelling = false, CallingConvention = CallingConvention.Cdecl)]
        public static extern UInt32 IMC_SetEcatSdo(HANDLETYPE cardHandle, Int16 station_id, UInt16 index, UInt16 subindex, Byte[] data, UInt32 data_size, ref UInt32 abort_code);

        /*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/
        /*----2.1.2 ECAT总线 DI/DO AI/AO操作						             ---*/
        /*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/
        //_DLL_API UINT32 IMC_SetEcatDoBit(HANDLETYPE cardHandle, INT16 doNo, INT16 Value);
        //_DLL_API UINT32 IMC_GetEcatDoBit(HANDLETYPE cardHandle, INT16 doNo, INT16 *pValue);
        //_DLL_API UINT32 IMC_SetEcatGrpDo(HANDLETYPE cardHandle, INT16 groupNo, INT16 Value);
        //_DLL_API UINT32 IMC_GetEcatGrpDo(HANDLETYPE cardHandle, INT16 groupNo, INT16 *pValue);
        //_DLL_API UINT32 IMC_GetEcatDiBit(HANDLETYPE cardHandle, INT16 diNo, INT16 *pValue);
        //_DLL_API UINT32 IMC_GetEcatGrpDi(HANDLETYPE cardHandle, INT16 groupNo, INT16 *pValue);

        //_DLL_API UINT32 IMC_GetEcatAdVal(HANDLETYPE cardHandle, INT16 adNo, INT16 *pValue);
        //_DLL_API UINT32 IMC_SetEcatDaVal(HANDLETYPE cardHandle, INT16 daNo, INT16 Value);
        //_DLL_API UINT32 IMC_GetEcatDaVal(HANDLETYPE cardHandle, INT16 daNo, INT16 *pValue);

        //_DLL_API UINT32 IMC_GetEcatAdSts(HANDLETYPE cardHandle, INT16 adNo, INT16 *pSts);
        //_DLL_API UINT32 IMC_GetEcatDaSts(HANDLETYPE cardHandle, INT16 daNo, INT16 *pSts);

        //_DLL_API UINT32 IMC_GetEcatPtVal(UINT64 cardHandle, INT16 ptNo, double *pValue);

        //_DLL_API UINT32 IMC_EcatAdEnable(HANDLETYPE cardHandle, INT16 adNo, INT16 enable);
        //_DLL_API UINT32 IMC_EcatDaEnable(HANDLETYPE cardHandle, INT16 daNo, INT16 enable,INT16 stopSts);

        [DllImport(EtherCATConfigApiDllName, EntryPoint = "IMC_SetEcatDoBit", ExactSpelling = false, CallingConvention = CallingConvention.Cdecl)]
        public static extern UInt32 IMC_SetEcatDoBit(HANDLETYPE cardHandle, Int16 doNo, Int16 Value);

        [DllImport(EtherCATConfigApiDllName, EntryPoint = "IMC_GetEcatDoBit", ExactSpelling = false, CallingConvention = CallingConvention.Cdecl)]
        public static extern UInt32 IMC_GetEcatDoBit(HANDLETYPE cardHandle, Int16 doNo, ref Int16 pValue);

        [DllImport(EtherCATConfigApiDllName, EntryPoint = "IMC_SetEcatGrpDo", ExactSpelling = false, CallingConvention = CallingConvention.Cdecl)]
        public static extern UInt32 IMC_SetEcatGrpDo(HANDLETYPE cardHandle, Int16 groupNo, Int16 Value);

        [DllImport(EtherCATConfigApiDllName, EntryPoint = "IMC_GetEcatGrpDo", ExactSpelling = false, CallingConvention = CallingConvention.Cdecl)]
        public static extern UInt32 IMC_GetEcatGrpDo(HANDLETYPE cardHandle, Int16 groupNo, ref Int16 pValue);

        [DllImport(EtherCATConfigApiDllName, EntryPoint = "IMC_GetEcatDiBit", ExactSpelling = false, CallingConvention = CallingConvention.Cdecl)]
        public static extern UInt32 IMC_GetEcatDiBit(HANDLETYPE cardHandle, Int16 diNo, ref Int16 pValue);

        [DllImport(EtherCATConfigApiDllName, EntryPoint = "IMC_GetEcatGrpDi", ExactSpelling = false, CallingConvention = CallingConvention.Cdecl)]
        public static extern UInt32 IMC_GetEcatGrpDi(HANDLETYPE cardHandle, Int16 groupNo, ref Int16 pValue);

        [DllImport(EtherCATConfigApiDllName, EntryPoint = "IMC_GetEcatAdVal", ExactSpelling = false, CallingConvention = CallingConvention.Cdecl)]
        public static extern UInt32 IMC_GetEcatAdVal(HANDLETYPE cardHandle, Int16 adNo, ref Int16 pValue);

        [DllImport(EtherCATConfigApiDllName, EntryPoint = "IMC_SetEcatDaVal", ExactSpelling = false, CallingConvention = CallingConvention.Cdecl)]
        public static extern UInt32 IMC_SetEcatDaVal(HANDLETYPE cardHandle, Int16 daNo, Int16 Value);

        [DllImport(EtherCATConfigApiDllName, EntryPoint = "IMC_GetEcatDaVal", ExactSpelling = false, CallingConvention = CallingConvention.Cdecl)]
        public static extern UInt32 IMC_GetEcatDaVal(HANDLETYPE cardHandle, Int16 daNo, ref Int16 pValue);

        [DllImport(EtherCATConfigApiDllName, EntryPoint = "IMC_GetEcatAdSts", ExactSpelling = false, CallingConvention = CallingConvention.Cdecl)]
        public static extern UInt32 IMC_GetEcatAdSts(HANDLETYPE cardHandle, Int16 adNo, ref Int16 pSts);

        [DllImport(EtherCATConfigApiDllName, EntryPoint = "IMC_GetEcatDaSts", ExactSpelling = false, CallingConvention = CallingConvention.Cdecl)]
        public static extern UInt32 IMC_GetEcatDaSts(HANDLETYPE cardHandle, Int16 daNo, ref Int16 pSts);


        [DllImport(EtherCATConfigApiDllName, EntryPoint = "IMC_GetEcatPtVal", ExactSpelling = false, CallingConvention = CallingConvention.Cdecl)]
        public static extern UInt32 IMC_GetEcatPtVal(HANDLETYPE cardHandle, Int16 ptNo, ref double pValue);


        [DllImport(EtherCATConfigApiDllName, EntryPoint = "IMC_EcatAdEnable", ExactSpelling = false, CallingConvention = CallingConvention.Cdecl)]
        public static extern UInt32 IMC_EcatAdEnable(HANDLETYPE cardHandle, Int16 adNo, Int16 enable);

        //[DllImport(EtherCATConfigApiDllName, EntryPoint = "IMC_EcatDaEnable", ExactSpelling = false, CallingConvention = CallingConvention.Cdecl)]
        //public static extern UInt32 IMC_EcatDaEnable(HANDLETYPE cardHandle, Int16 daNo, Int16 enable, Int16 stopSts);

        /*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/
        /*----2.1.3 ECAT总线轴捕获操作                                           ---*/
        /*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/
        ////_DLL_API UINT32 IMC_SetEcatCaptMode (HANDLETYPE cardHandle, INT16 index,INT16 trigType, INT16 sns);
        ////_DLL_API UINT32 IMC_GetEcatCaptMode (HANDLETYPE cardHandle, INT16 index,INT16 *pTrigType,INT16 *pSns);
        ////_DLL_API UINT32 IMC_GetEcatCaptSts (HANDLETYPE cardHandle, INT16 index,INT16 *pSts,INT32 *pCaptPos);
        //[DllImport(EtherCATConfigApiDllName, EntryPoint = "IMC_SetEcatCaptMode", ExactSpelling = false, CallingConvention = CallingConvention.Cdecl)]
        //public static extern UInt32 IMC_SetEcatCaptMode(HANDLETYPE cardHandle, Int16 index, Int16 trigType, Int16 sns);

        //[DllImport(EtherCATConfigApiDllName, EntryPoint = "IMC_GetEcatCaptMode", ExactSpelling = false, CallingConvention = CallingConvention.Cdecl)]
        //public static extern UInt32 IMC_GetEcatCaptMode(HANDLETYPE cardHandle, Int16 index, ref Int16 pTrigType, ref Int16 pSns);

        //[DllImport(EtherCATConfigApiDllName, EntryPoint = "IMC_GetEcatCaptSts", ExactSpelling = false, CallingConvention = CallingConvention.Cdecl)]
        //public static extern UInt32 IMC_GetEcatCaptSts(HANDLETYPE cardHandle, Int16 index, ref Int16 pSts, ref Int32 pCaptPos);

        ///*==========================================================================*/
        ///*----2.2 端子板硬件操作接口                                             ---*/
        ///*==========================================================================*/

        ///*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/
        ///*----2.2.1 DIO操作接口                                                  ---*/
        ///*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/
        //_DLL_API UINT32 IMC_SetLocalDoBit(HANDLETYPE cardHandle, INT16 doNo, INT16 value);
        //_DLL_API UINT32 IMC_GetLocalDoBit(HANDLETYPE cardHandle, INT16 doNo, INT16 *pValue);
        //_DLL_API UINT32 IMC_SetLocalDo(HANDLETYPE cardHandle, INT16 value);
        //_DLL_API UINT32 IMC_GetLocalDo(HANDLETYPE cardHandle, INT16 *pValue);
        //_DLL_API UINT32 IMC_GetLocalDiBit(HANDLETYPE cardHandle, INT16 diNo, INT16 *pValue);
        //_DLL_API UINT32 IMC_GetLocalDi(HANDLETYPE cardHandle, INT16 *pValue);
        //_DLL_API UINT32 IMC_GetLocalADVal(HANDLETYPE cardHandle, INT16 *pValue);
        //_DLL_API UINT32 IMC_GetLocalSpecialDi(HANDLETYPE cardHandle, INT16 type, INT16 *pValue);
        //_DLL_API UINT32 IMC_GetLocalSpecialDiBit(HANDLETYPE cardHandle, INT16 index, INT16 type, INT16 *pValue);
        [DllImport(EtherCATConfigApiDllName, EntryPoint = "IMC_SetLocalDoBit", ExactSpelling = false, CallingConvention = CallingConvention.Cdecl)]
        public static extern UInt32 IMC_SetLocalDoBit(HANDLETYPE cardHandle, Int16 doNo, Int16 value);

        [DllImport(EtherCATConfigApiDllName, EntryPoint = "IMC_GetLocalDoBit", ExactSpelling = false, CallingConvention = CallingConvention.Cdecl)]
        public static extern UInt32 IMC_GetLocalDoBit(HANDLETYPE cardHandle, Int16 doNo, ref Int16 pValue);

        [DllImport(EtherCATConfigApiDllName, EntryPoint = "IMC_SetLocalDo", ExactSpelling = false, CallingConvention = CallingConvention.Cdecl)]
        public static extern UInt32 IMC_SetLocalDo(HANDLETYPE cardHandle, Int16 value);

        [DllImport(EtherCATConfigApiDllName, EntryPoint = "IMC_GetLocalDo", ExactSpelling = false, CallingConvention = CallingConvention.Cdecl)]
        public static extern UInt32 IMC_GetLocalDo(HANDLETYPE cardHandle, ref Int16 pValue);

        [DllImport(EtherCATConfigApiDllName, EntryPoint = "IMC_GetLocalDiBit", ExactSpelling = false, CallingConvention = CallingConvention.Cdecl)]
        public static extern UInt32 IMC_GetLocalDiBit(HANDLETYPE cardHandle, Int16 diNo, ref Int16 pValue);

        [DllImport(EtherCATConfigApiDllName, EntryPoint = "IMC_GetLocalDi", ExactSpelling = false, CallingConvention = CallingConvention.Cdecl)]
        public static extern UInt32 IMC_GetLocalDi(HANDLETYPE cardHandle, ref Int16 pValue);

        [DllImport(EtherCATConfigApiDllName, EntryPoint = "IMC_GetLocalADVal", ExactSpelling = false, CallingConvention = CallingConvention.Cdecl)]
        public static extern UInt32 IMC_GetLocalADVal(HANDLETYPE cardHandle, ref Int16 pValue);

        //public const uint SPECIAL_IO_RDY = (0);   // 准备完成信号
        //public const uint SPECIAL_IO_ARRIV = (1);   // 到位信号
        //public const uint SPECIAL_IO_ALARM = (2);   // 报警信号
        //public const uint SPECIAL_IO_POSLMT = (3);   // 正限位信号
        //public const uint SPECIAL_IO_NEGLMT = (4);   // 负限位信号
        //public const uint SPECIAL_IO_HOME = (7);   // 回零输入信号
        //public const uint SPECIAL_IO_INDEX = (8);   // 电机Z相信号
        [DllImport(EtherCATConfigApiDllName, EntryPoint = "IMC_GetLocalSpecialDi", ExactSpelling = false, CallingConvention = CallingConvention.Cdecl)]
        public static extern UInt32 IMC_GetLocalSpecialDi(HANDLETYPE cardHandle, Int16 type, ref Int16 pValue);

        [DllImport(EtherCATConfigApiDllName, EntryPoint = "IMC_GetLocalSpecialDiBit", ExactSpelling = false, CallingConvention = CallingConvention.Cdecl)]
        public static extern UInt32 IMC_GetLocalSpecialDiBit(HANDLETYPE cardHandle, Int16 index, Int16 type, ref Int16 pValue);



        ///*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/
        ///*----2.2.2 编码器操作接口                                               ---*/
        ///*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/
        //_DLL_API UINT32 IMC_GetLocalCntPos(HANDLETYPE cardHandle, INT16 index, INT32 *pCntPos, INT16 count = 1);
        //_DLL_API UINT32 IMC_GetLocalCntVel (HANDLETYPE cardHandle, INT16 index,INT32 *pCntVel,INT16 count = 1);
        //_DLL_API UINT32 IMC_GetLocalEncPos(HANDLETYPE cardHandle,INT16 index,INT32 *pEncPos,INT16 count = 1);
        //_DLL_API UINT32 IMC_GetLocalEncVel (HANDLETYPE cardHandle, INT16 index,INT32 *pEncVel,INT16 count = 1);
        ////_DLL_API UINT32 IMC_SetLocalCntPos (HANDLETYPE cardHandle, INT16 index,INT32 cntPos);
        //_DLL_API UINT32 IMC_SetLocalEncPos (HANDLETYPE cardHandle, INT16 index,INT32 encPos);
        [DllImport(EtherCATConfigApiDllName, EntryPoint = "IMC_GetLocalCntPos", ExactSpelling = false, CallingConvention = CallingConvention.Cdecl)]
        public static extern UInt32 IMC_GetLocalCntPos(HANDLETYPE cardHandle, Int16 index, Int32[] pCntPos, Int16 count = 1);

        [DllImport(EtherCATConfigApiDllName, EntryPoint = "IMC_GetLocalCntVel", ExactSpelling = false, CallingConvention = CallingConvention.Cdecl)]
        public static extern UInt32 IMC_GetLocalCntVel(HANDLETYPE cardHandle, Int16 index, Int32[] pCntVel, Int16 count = 1);

        [DllImport(EtherCATConfigApiDllName, EntryPoint = "IMC_GetLocalEncPos", ExactSpelling = false, CallingConvention = CallingConvention.Cdecl)]
        public static extern UInt32 IMC_GetLocalEncPos(HANDLETYPE cardHandle, Int16 index, Int32[] pEncPos, Int16 count = 1);

        [DllImport(EtherCATConfigApiDllName, EntryPoint = "IMC_GetLocalEncVel", ExactSpelling = false, CallingConvention = CallingConvention.Cdecl)]
        public static extern UInt32 IMC_GetLocalEncVel(HANDLETYPE cardHandle, Int16 index, Int32[] pEncVel, Int16 count = 1);

        //[DllImport(EtherCATConfigApiDllName, EntryPoint = "IMC_SetLocalCntPos", ExactSpelling = false, CallingConvention = CallingConvention.Cdecl)]
        //public static extern UInt32 IMC_SetLocalCntPos(HANDLETYPE cardHandle, Int16 index, Int32 cntPos);

        [DllImport(EtherCATConfigApiDllName, EntryPoint = "IMC_SetLocalEncPos", ExactSpelling = false, CallingConvention = CallingConvention.Cdecl)]
        public static extern UInt32 IMC_SetLocalEncPos(HANDLETYPE cardHandle, Int16 index, Int32 encPos);

        ///*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/
        ///*----2.2.3 位置锁存操作接口                                             ---*/
        ///*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/
        ////_DLL_API UINT32 IMC_SetCaptPosMode(HANDLETYPE cardHandle, INT16 index, INT16 trigType, INT16 captSrc, INT16 sns);
        ////_DLL_API UINT32 IMC_GetCaptPosMode(HANDLETYPE cardHandle, INT16 index, INT16 *pTrigType, INT16 *pCaptSrc, INT16 *pSns);
        ////_DLL_API UINT32 IMC_GetCaptStatus(HANDLETYPE cardHandle, INT16 index, INT16 *pSts, INT32 *pCaptPos);
        // 捕获模式
        //public const uint CAPT_MODE_INDEX = (0);	// Index捕获
        //public const uint CAPT_MODE_HOME = (1);	// Home捕获
        //public const uint CAPT_MODE_PROBE = (3);	// 探针捕获
        //public const uint CAPT_MODE_LIMITP = (4);	// 正限位捕获
        //public const uint CAPT_MODE_LIMITN = (5);	// 负限位捕获

        //[DllImport(EtherCATConfigApiDllName, EntryPoint = "IMC_SetCaptPosMode", ExactSpelling = false, CallingConvention = CallingConvention.Cdecl)]
        //public static extern UInt32 IMC_SetCaptPosMode(HANDLETYPE cardHandle, Int16 index, Int16 trigType, Int16 captSrc, Int16 sns);

        //[DllImport(EtherCATConfigApiDllName, EntryPoint = "IMC_GetCaptPosMode", ExactSpelling = false, CallingConvention = CallingConvention.Cdecl)]
        //public static extern UInt32 IMC_GetCaptPosMode(HANDLETYPE cardHandle, Int16 index, ref Int16 pTrigType, ref Int16 pCaptSrc, ref Int16 pSns);

        //[DllImport(EtherCATConfigApiDllName, EntryPoint = "IMC_GetCaptStatus", ExactSpelling = false, CallingConvention = CallingConvention.Cdecl)]
        //public static extern UInt32 IMC_GetCaptStatus(HANDLETYPE cardHandle, Int16 index, ref Int16 pSts, ref Int32 pCaptPos);

        ///*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/
        ///*----2.2.4 位置比较输出操作接口                                            ---*/
        ///*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/
        //_DLL_API UINT32 IMC_CompareSrcConfig(HANDLETYPE cardHandle, INT16 portNo, INT16 dimension, INT16 *pCompSrc, INT16 *pCmpType);
        //_DLL_API UINT32 IMC_CompareOutputConfig(HANDLETYPE cardHandle, INT16 portNo,  INT16 ctrlMode,INT16 stLevel, INT16 outputType, INT16 pulseWidth);
        //_DLL_API UINT32 IMC_GetCompareStatus(HANDLETYPE cardHandle, INT16 portNo, INT16 *pCmpSts, INT32 *pCmpCount);
        //_DLL_API UINT32 IMC_StopCompareOut(HANDLETYPE cardHandle, INT16 portNo);
        //_DLL_API UINT32 IMC_StartCompareOut(HANDLETYPE cardHandle, INT16 portNo);
        //_DLL_API UINT32 IMC_CompareManualOutput(HANDLETYPE cardHandle, INT16 portNo, INT16 outVal);
        //_DLL_API UINT32 IMC_LinearCompare(HANDLETYPE cardHandle, INT16 portNo,INT32 intervalLen, INT32 compTimes);
        //_DLL_API UINT32 IMC_SetCompareData(HANDLETYPE cardHandle, INT16 portNo, INT16 compCount, INT32 *pPosBuf);
        //_DLL_API UINT32 IMC_SetCompareType(UINT64 cardHandle, INT16 portNo, INT16 type);
        //_DLL_API UINT32 IMC_GetCompareType(UINT64 cardHandle, INT16 portNo, INT16 *pType);
        [DllImport(EtherCATConfigApiDllName, EntryPoint = "IMC_CompareSrcConfig", ExactSpelling = false, CallingConvention = CallingConvention.Cdecl)]
        public static extern UInt32 IMC_CompareSrcConfig(HANDLETYPE cardHandle, Int16 portNo, Int16 dimension, Int16[] pCompSrc, Int16[] pCmpType);

        [DllImport(EtherCATConfigApiDllName, EntryPoint = "IMC_CompareOutputConfig", ExactSpelling = false, CallingConvention = CallingConvention.Cdecl)]
        public static extern UInt32 IMC_CompareOutputConfig(HANDLETYPE cardHandle, Int16 portNo, Int16 ctrlMode, Int16 stLevel, Int16 outputType, Int16 pulseWidth);

        [DllImport(EtherCATConfigApiDllName, EntryPoint = "IMC_GetCompareStatus", ExactSpelling = false, CallingConvention = CallingConvention.Cdecl)]
        public static extern UInt32 IMC_GetCompareStatus(HANDLETYPE cardHandle, Int16 portNo, ref Int16 pCmpSts, ref Int32 pCmpCount);

        [DllImport(EtherCATConfigApiDllName, EntryPoint = "IMC_StopCompareOut", ExactSpelling = false, CallingConvention = CallingConvention.Cdecl)]
        public static extern UInt32 IMC_StopCompareOut(HANDLETYPE cardHandle, Int16 portNo);

        [DllImport(EtherCATConfigApiDllName, EntryPoint = "IMC_StartCompareOut", ExactSpelling = false, CallingConvention = CallingConvention.Cdecl)]
        public static extern UInt32 IMC_StartCompareOut(HANDLETYPE cardHandle, Int16 portNo);

        [DllImport(EtherCATConfigApiDllName, EntryPoint = "IMC_CompareManualOutput", ExactSpelling = false, CallingConvention = CallingConvention.Cdecl)]
        public static extern UInt32 IMC_CompareManualOutput(HANDLETYPE cardHandle, Int16 portNo, Int16 outVal);

        [DllImport(EtherCATConfigApiDllName, EntryPoint = "IMC_LinearCompare", ExactSpelling = false, CallingConvention = CallingConvention.Cdecl)]
        public static extern UInt32 IMC_LinearCompare(HANDLETYPE cardHandle, Int16 portNo, Int32 intervalLen, Int32 compTimes);

        [DllImport(EtherCATConfigApiDllName, EntryPoint = "IMC_SetCompareData", ExactSpelling = false, CallingConvention = CallingConvention.Cdecl)]
        public static extern UInt32 IMC_SetCompareData(HANDLETYPE cardHandle, Int16 portNo, Int16 compCount, Int32[] pPosBuf);

        //[DllImport(EtherCATConfigApiDllName, EntryPoint = "IMC_SetCompareType", ExactSpelling = false, CallingConvention = CallingConvention.Cdecl)]
        //public static extern UInt32 IMC_SetCompareType(HANDLETYPE cardHandle, Int16 portNo, Int16 type);
        //[DllImport(EtherCATConfigApiDllName, EntryPoint = "IMC_GetCompareType", ExactSpelling = false, CallingConvention = CallingConvention.Cdecl)]
        //public static extern UInt32 IMC_GetCompareType(HANDLETYPE cardHandle, Int16 portNo, ref Int16 pType);
        [DllImport(EtherCATConfigApiDllName, EntryPoint = "IMC_SetCompareDataType", ExactSpelling = false, CallingConvention = CallingConvention.Cdecl)]
        public static extern UInt32 IMC_SetCompareDataType(HANDLETYPE cardHandle, Int16 portNo, Int16 type);
        [DllImport(EtherCATConfigApiDllName, EntryPoint = "IMC_GetCompareDataType", ExactSpelling = false, CallingConvention = CallingConvention.Cdecl)]
        public static extern UInt32 IMC_GetCompareDataType(HANDLETYPE cardHandle, Int16 portNo, ref Int16 pType);
        [DllImport(EtherCATConfigApiDllName, EntryPoint = "IMC_SetComparePosType", ExactSpelling = false, CallingConvention = CallingConvention.Cdecl)]
        public static extern UInt32 IMC_SetComparePosType(HANDLETYPE cardHandle, Int16 portNo, Int16 type);
        [DllImport(EtherCATConfigApiDllName, EntryPoint = "IMC_GetComparePosType", ExactSpelling = false, CallingConvention = CallingConvention.Cdecl)]
        public static extern UInt32 IMC_GetComparePosType(HANDLETYPE cardHandle, Int16 portNo, ref Int16 pType);

        /*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/
        /*----2.2.5 PWM输出控制                                                  ---*/
        /*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/
        //_DLL_API UINT32 IMC_SetPwmPara (HANDLETYPE cardHandle, INT16 chn,INT16 pwmMode, INT32 frequency,double dutyRatio);
        //_DLL_API UINT32 IMC_GetPwmPara (HANDLETYPE cardHandle, INT16 chn,INT16 *pPwmMode, INT32 *pFrequency,double *pDutyRatio);
        //_DLL_API UINT32 IMC_SetPwmFrq (HANDLETYPE cardHandle, INT16 chn, INT32 frequency);
        //_DLL_API UINT32 IMC_SetPwmDuty (HANDLETYPE cardHandle, INT16 chn, double dutyRatio);
        //_DLL_API UINT32 IMC_SetPwmOnOff (HANDLETYPE cardHandle, INT16 chn, INT16 onOff);
        //_DLL_API UINT32 IMC_SetPwmOnDelay (HANDLETYPE cardHandle, INT16 chn, UINT16 onDelay);
        //_DLL_API UINT32 IMC_SetPwmOffDelay (HANDLETYPE cardHandle, INT16 chn, UINT16 offDelay);
        [DllImport(EtherCATConfigApiDllName, EntryPoint = "IMC_SetPwmPara", ExactSpelling = false, CallingConvention = CallingConvention.Cdecl)]
        public static extern UInt32 IMC_SetPwmPara(HANDLETYPE cardHandle, Int16 chn, Int16 pwmMode, Int32 frequency, double dutyRatio);

        [DllImport(EtherCATConfigApiDllName, EntryPoint = "IMC_GetPwmPara", ExactSpelling = false, CallingConvention = CallingConvention.Cdecl)]
        public static extern UInt32 IMC_GetPwmPara(HANDLETYPE cardHandle, Int16 chn, ref Int16 pPwmMode, ref Int32 pFrequency, ref double pDutyRatio);

        [DllImport(EtherCATConfigApiDllName, EntryPoint = "IMC_SetPwmFrq", ExactSpelling = false, CallingConvention = CallingConvention.Cdecl)]
        public static extern UInt32 IMC_SetPwmFrq(HANDLETYPE cardHandle, Int16 chn, Int32 frequency);

        [DllImport(EtherCATConfigApiDllName, EntryPoint = "IMC_SetPwmDuty", ExactSpelling = false, CallingConvention = CallingConvention.Cdecl)]
        public static extern UInt32 IMC_SetPwmDuty(HANDLETYPE cardHandle, Int16 chn, double dutyRatio);

        [DllImport(EtherCATConfigApiDllName, EntryPoint = "IMC_SetPwmOnOff", ExactSpelling = false, CallingConvention = CallingConvention.Cdecl)]
        public static extern UInt32 IMC_SetPwmOnOff(HANDLETYPE cardHandle, Int16 chn, Int16 onOff);

        [DllImport(EtherCATConfigApiDllName, EntryPoint = "IMC_SetPwmOnDelay", ExactSpelling = false, CallingConvention = CallingConvention.Cdecl)]
        public static extern UInt32 IMC_SetPwmOnDelay(HANDLETYPE cardHandle, Int16 chn, UInt16 onDelay);

        [DllImport(EtherCATConfigApiDllName, EntryPoint = "IMC_SetPwmOffDelay", ExactSpelling = false, CallingConvention = CallingConvention.Cdecl)]
        public static extern UInt32 IMC_SetPwmOffDelay(HANDLETYPE cardHandle, Int16 chn, UInt16 offDelay);

        ///*==========================================================================*/
        ///*----3 回零操作接口                                                     ---*/
        ///*==========================================================================*/
        ////_DLL_API UINT32 IMC_SetHomingPara(HANDLETYPE cardHandle, INT16 axNo, THomingPara *pHomingPara);
        ////_DLL_API UINT32 IMC_StartHoming(HANDLETYPE cardHandle, INT16 axNo);
        //_DLL_API UINT32 IMC_StartHoming(HANDLETYPE cardHandle, INT16 axNo, THomingPara *pHomingPara);
        //_DLL_API UINT32 IMC_StopHoming(HANDLETYPE cardHandle, INT16 axNo, INT16 stopType);
        //_DLL_API UINT32 IMC_GetHomingStatus(HANDLETYPE cardHandle, INT16 axNo, INT16 *pStatus);
        //_DLL_API UINT32 IMC_FinishHoming(HANDLETYPE cardHandle, INT16 axNo);

        //[DllImport(EtherCATConfigApiDllName, EntryPoint = "IMC_SetHomingPara", ExactSpelling = false, CallingConvention = CallingConvention.Cdecl)]
        //public static extern UInt32 IMC_SetHomingPara(HANDLETYPE cardHandle, Int16 axNo, ref THomingPara pHomingPara);

        //[DllImport(EtherCATConfigApiDllName, EntryPoint = "IMC_StartHoming", ExactSpelling = false, CallingConvention = CallingConvention.Cdecl)]
        //public static extern UInt32 IMC_StartHoming(HANDLETYPE cardHandle, Int16 axNo);
        [DllImport(EtherCATConfigApiDllName, EntryPoint = "IMC_StartHoming", ExactSpelling = false, CallingConvention = CallingConvention.Cdecl)]
        public static extern UInt32 IMC_StartHoming(HANDLETYPE cardHandle, Int16 axNo, ref THomingPara pHomingPara);

        [DllImport(EtherCATConfigApiDllName, EntryPoint = "IMC_StopHoming", ExactSpelling = false, CallingConvention = CallingConvention.Cdecl)]
        public static extern UInt32 IMC_StopHoming(HANDLETYPE cardHandle, Int16 axNo, Int16 stopType);

        [DllImport(EtherCATConfigApiDllName, EntryPoint = "IMC_GetHomingStatus", ExactSpelling = false, CallingConvention = CallingConvention.Cdecl)]
        public static extern UInt32 IMC_GetHomingStatus(HANDLETYPE cardHandle, Int16 axNo, ref Int16 pStatus);

        [DllImport(EtherCATConfigApiDllName, EntryPoint = "IMC_FinishHoming", ExactSpelling = false, CallingConvention = CallingConvention.Cdecl)]
        public static extern UInt32 IMC_FinishHoming(HANDLETYPE cardHandle, Int16 axNo);

        ///*==========================================================================*/
        ///*----4 状态管理接口                                                     ---*/
        ///*==========================================================================*/
        ///*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/
        ///*----4.2 轴状态管理接口                                                 ---*/
        ///*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/
        //_DLL_API UINT32 IMC_GetAxPrfMode(HANDLETYPE cardHandle, INT16 axNo, INT16 *pPrfMode, INT16 count = 1);
        //_DLL_API UINT32 IMC_GetAxSts(HANDLETYPE cardHandle, INT16 axNo, INT32 *pAxSts, INT16 count = 1);
        //_DLL_API UINT32 IMC_ClrAxSts(HANDLETYPE cardHandle, INT16 axNo, INT16 count = 1);
        //_DLL_API UINT32 IMC_GetAxPrfPos(HANDLETYPE cardHandle, INT16 axNo, double *pPrfPos, INT16 count = 1);
        //_DLL_API UINT32 IMC_GetAxPrfVel(HANDLETYPE cardHandle, INT16 axNo, double *pPrfVel, INT16 count = 1);
        //_DLL_API UINT32 IMC_GetAxPrfAcc(HANDLETYPE cardHandle, INT16 axNo, double *pPrfAcc, INT16 count = 1);
        //_DLL_API UINT32 IMC_GetAxEncPos(HANDLETYPE cardHandle, INT16 axNo, double *pEncPos, INT16 count = 1);
        //_DLL_API UINT32 IMC_GetAxEncVel(HANDLETYPE cardHandle, INT16 axNo, double *pEncVel, INT16 count = 1);
        //_DLL_API UINT32 IMC_GetAxEncAcc(HANDLETYPE cardHandle, INT16 axNo, double *pEncAcc, INT16 count = 1);
        //_DLL_API UINT32 IMC_GetPrfPos(HANDLETYPE cardHandle, INT16 axNo, double *pPrfPos, INT16 count = 1);
        //_DLL_API UINT32 IMC_GetAxType(HANDLETYPE cardHandle, INT16 axNo, INT16 *pAxType, INT16 *pOutChn);
        //_DLL_API UINT32 IMC_AxServoOn(HANDLETYPE cardHandle, INT16 axNo, INT16 count = 1);
        //_DLL_API UINT32 IMC_AxServoOff(HANDLETYPE cardHandle, INT16 axNo, INT16 count = 1);
        //_DLL_API UINT32 IMC_AxMoveStop(HANDLETYPE cardHandle, INT16 axNo, INT16 stopType);
        //_DLL_API UINT32 IMC_AxStopInBits(HANDLETYPE cardHandle, INT32 axMask, INT16 stopTypeBits);
        //_DLL_API UINT32 UINT32 IMC_SetAxCurPos(HANDLETYPE cardHandle, INT16 axNo, double setPos);
        //_DLL_API UINT32 IMC_SetAxCtrlMode(UINT64 cardHandle,INT16 axNo,INT16 ctrlMode);
        //_DLL_API UINT32 IMC_GetAxCtrlMode(UINT64 cardHandle,INT16 axNo,INT16 *pCtrlMode);
        //_DLL_API UINT32 IMC_PrfAxTorq(UINT64 cardHandle,INT16 axNo,INT16 tgtTrq,INT16 time);
        //_DLL_API UINT32 IMC_GetAxActTorq(UINT64 cardHandle,INT16 axNo,INT16 *pActTrq);

        //_DLL_API UINT32 IMC_SetAxTorqSlope(UINT64 cardHandle,INT16 axNo,INT32 trqSlope);
        //_DLL_API UINT32 IMC_GetAxTorqSlope(UINT64 cardHandle,INT16 axNo,INT32 *pTrqSlope);
        //_DLL_API UINT32 IMC_SetAxTgtTorq(UINT64 cardHandle,INT16 axNo,INT16 tgtTrq);
        //_DLL_API UINT32 IMC_GetAxTgtTorq(UINT64 cardHandle,INT16 axNo,INT16 *pTgtTrq);
        //_DLL_API UINT32 IMC_GetAxErrCode(UINT64 cardHandle,INT16 axNo,INT16 *pErrorCode);
        //_DLL_API UINT32 IMC_GetAxEcatDigitalInput(UINT64 cardHandle, INT16 axNo, INT16 *pDigitalInput);
        //_DLL_API UINT32 IMC_GetAxBacklashCmpVal(UINT64 cardHandle, INT16 axNo, INT32 *pCmpVal);
        //_DLL_API UINT32 IMC_SyncAxPos(UINT64 cardHandle, INT16 axNo);

        // 非标510
        //_DLL_API UINT32 IMC_SetAxPressFitCtrlWord(UINT64 cardHandle,INT16 axNo,UINT16 ctrlword);
        //_DLL_API UINT32 IMC_SetAxPressTgtVal(UINT64 cardHandle,INT16 axNo,INT16 pressVal);
        //_DLL_API UINT32 IMC_GetAxPressFitSts(UINT64 cardHandle, INT16 axNo, UINT16 *pSts);
        //_DLL_API UINT32 IMC_GetAxAIInputVal(UINT64 cardHandle, INT16 axNo, INT16 *pA1Volt,INT16 *pA2Volt);
        //_DLL_API UINT32 IMC_GetAxPressFeedback(UINT64 cardHandle, INT16 axNo, INT16 *pPressVal);

        // 转矩回零
        //_DLL_API UINT32 IMC_StartAxTorqHoming(UINT64 cardHandle,INT16 axNo,INT16 tgtTorq,INT16 torqSlopeTime,UINT32 maxVel);
        //_DLL_API UINT32 IMC_StopAxTorqHoming(UINT64 cardHandle,INT16 axNo,INT16 stopTime);
        //_DLL_API UINT32 IMC_GetAxTorqHomingSts(UINT64 cardHandle,INT16 axNo,INT16 *pStatus);
        //_DLL_API UINT32 IMC_FinishAxTorqHoming(UINT64 cardHandle,INT16 axNo);

        [DllImport(EtherCATConfigApiDllName, EntryPoint = "IMC_GetAxPrfMode", ExactSpelling = false, CallingConvention = CallingConvention.Cdecl)]
        public static extern UInt32 IMC_GetAxPrfMode(HANDLETYPE cardHandle, Int16 axNo, Int16[] pPrfMode, Int16 count = 1);

        // 轴状态位
        public const uint AX_ALARM_BIT = (0x00000001);		// 轴驱动报警
        public const uint AX_SVON_BIT = (0x00000002);		// 伺服使能
        public const uint AX_BUSY_BIT = (0x00000004);		// 轴忙状态
        public const uint AX_ARRIVE_BIT = (0x00000008);	// 轴到位状态
        public const uint AX_POSLMT_BIT = (0x00000010);		// 正硬限位报警
        public const uint AX_NEGLMT_BIT = (0x00000020);	// 负硬限位报警
        public const uint AX_SOFT_POSLMT_BIT = (0x00000040);		// 正软限位报警
        public const uint AX_SOFT_NEGLMT_BIT = (0x00000080);		// 负软限位报警
        public const uint AX_ERRPOS_BIT = (0x00000100);	// 轴位置误差越限标志
        public const uint AX_EMG_STOP_BIT = (0x00000200);		// 运动急停标志
        public const uint AX_ECAT_BIT = (0x00000400);		// 总线轴标志

        [DllImport(EtherCATConfigApiDllName, EntryPoint = "IMC_GetAxSts", ExactSpelling = false, CallingConvention = CallingConvention.Cdecl)]
        public static extern UInt32 IMC_GetAxSts(HANDLETYPE cardHandle, Int16 axNo, Int32[] pAxSts, Int16 count = 1);

        [DllImport(EtherCATConfigApiDllName, EntryPoint = "IMC_ClrAxSts", ExactSpelling = false, CallingConvention = CallingConvention.Cdecl)]
        public static extern UInt32 IMC_ClrAxSts(HANDLETYPE cardHandle, Int16 axNo, Int16 count = 1);

        [DllImport(EtherCATConfigApiDllName, EntryPoint = "IMC_GetAxPrfPos", ExactSpelling = false, CallingConvention = CallingConvention.Cdecl)]
        public static extern UInt32 IMC_GetAxPrfPos(HANDLETYPE cardHandle, Int16 axNo, double[] pPrfPos, Int16 count = 1);

        [DllImport(EtherCATConfigApiDllName, EntryPoint = "IMC_GetAxPrfVel", ExactSpelling = false, CallingConvention = CallingConvention.Cdecl)]
        public static extern UInt32 IMC_GetAxPrfVel(HANDLETYPE cardHandle, Int16 axNo, double[] pPrfVel, Int16 count = 1);

        [DllImport(EtherCATConfigApiDllName, EntryPoint = "IMC_GetAxPrfAcc", ExactSpelling = false, CallingConvention = CallingConvention.Cdecl)]
        public static extern UInt32 IMC_GetAxPrfAcc(HANDLETYPE cardHandle, Int16 axNo, double[] pPrfAcc, Int16 count = 1);

        [DllImport(EtherCATConfigApiDllName, EntryPoint = "IMC_GetAxEncPos", ExactSpelling = false, CallingConvention = CallingConvention.Cdecl)]
        public static extern UInt32 IMC_GetAxEncPos(HANDLETYPE cardHandle, Int16 axNo, double[] pEncPos, Int16 count = 1);

        [DllImport(EtherCATConfigApiDllName, EntryPoint = "IMC_GetAxEncVel", ExactSpelling = false, CallingConvention = CallingConvention.Cdecl)]
        public static extern UInt32 IMC_GetAxEncVel(HANDLETYPE cardHandle, Int16 axNo, double[] pEncVel, Int16 count = 1);

        [DllImport(EtherCATConfigApiDllName, EntryPoint = "IMC_GetAxEncAcc", ExactSpelling = false, CallingConvention = CallingConvention.Cdecl)]
        public static extern UInt32 IMC_GetAxEncAcc(HANDLETYPE cardHandle, Int16 axNo, double[] pEncAcc, Int16 count = 1);

        [DllImport(EtherCATConfigApiDllName, EntryPoint = "IMC_GetPrfPos", ExactSpelling = false, CallingConvention = CallingConvention.Cdecl)]
        public static extern UInt32 IMC_GetPrfPos(HANDLETYPE cardHandle, Int16 axNo, double[] pPrfPos, Int16 count = 1);

        [DllImport(EtherCATConfigApiDllName, EntryPoint = "IMC_GetAxType", ExactSpelling = false, CallingConvention = CallingConvention.Cdecl)]
        public static extern UInt32 IMC_GetAxType(HANDLETYPE cardHandle, Int16 axNo, ref Int16 pAxType, ref Int16 pOutChn);

        [DllImport(EtherCATConfigApiDllName, EntryPoint = "IMC_AxServoOn", ExactSpelling = false, CallingConvention = CallingConvention.Cdecl)]
        public static extern UInt32 IMC_AxServoOn(HANDLETYPE cardHandle, Int16 axNo, Int16 count = 1);

        [DllImport(EtherCATConfigApiDllName, EntryPoint = "IMC_AxServoOff", ExactSpelling = false, CallingConvention = CallingConvention.Cdecl)]
        public static extern UInt32 IMC_AxServoOff(HANDLETYPE cardHandle, Int16 axNo, Int16 count = 1);

        [DllImport(EtherCATConfigApiDllName, EntryPoint = "IMC_AxMoveStop", ExactSpelling = false, CallingConvention = CallingConvention.Cdecl)]
        public static extern UInt32 IMC_AxMoveStop(HANDLETYPE cardHandle, Int16 axNo, Int16 stopType);

        [DllImport(EtherCATConfigApiDllName, EntryPoint = "IMC_AxStopInBits", ExactSpelling = false, CallingConvention = CallingConvention.Cdecl)]
        public static extern UInt32 IMC_AxStopInBits(HANDLETYPE cardHandle, Int32 axMask, Int32 stopTypeBits);

        [DllImport(EtherCATConfigApiDllName, EntryPoint = "IMC_SetAxCurPos", ExactSpelling = false, CallingConvention = CallingConvention.Cdecl)]
        public static extern UInt32 IMC_SetAxCurPos(HANDLETYPE cardHandle, Int16 axNo, double setPos);



        [DllImport(EtherCATConfigApiDllName, EntryPoint = "IMC_SetAxCtrlMode", ExactSpelling = false, CallingConvention = CallingConvention.Cdecl)]
        public static extern UInt32 IMC_SetAxCtrlMode(HANDLETYPE cardHandle, Int16 axNo, Int16 ctrlMode);

        [DllImport(EtherCATConfigApiDllName, EntryPoint = "IMC_GetAxCtrlMode", ExactSpelling = false, CallingConvention = CallingConvention.Cdecl)]
        public static extern UInt32 IMC_GetAxCtrlMode(HANDLETYPE cardHandle, Int16 axNo, ref Int16 pCtrlMode);

        [DllImport(EtherCATConfigApiDllName, EntryPoint = "IMC_PrfAxTorq", ExactSpelling = false, CallingConvention = CallingConvention.Cdecl)]
        public static extern UInt32 IMC_PrfAxTorq(HANDLETYPE cardHandle, Int16 axNo, Int16 tgtTrq, Int16 time);
        [DllImport(EtherCATConfigApiDllName, EntryPoint = "IMC_GetAxActTorq", ExactSpelling = false, CallingConvention = CallingConvention.Cdecl)]
        public static extern UInt32 IMC_GetAxActTorq(HANDLETYPE cardHandle, Int16 axNo, ref Int16 pActTrq);

        [DllImport(EtherCATConfigApiDllName, EntryPoint = "IMC_SetAxTorqSlope", ExactSpelling = false, CallingConvention = CallingConvention.Cdecl)]
        public static extern UInt32 IMC_SetAxTorqSlope(HANDLETYPE cardHandle, Int16 axNo, Int32 trqSlope);
        [DllImport(EtherCATConfigApiDllName, EntryPoint = "IMC_GetAxTorqSlope", ExactSpelling = false, CallingConvention = CallingConvention.Cdecl)]
        public static extern UInt32 IMC_GetAxTorqSlope(HANDLETYPE cardHandle, Int16 axNo, ref Int32 pTrqSlope);
        [DllImport(EtherCATConfigApiDllName, EntryPoint = "IMC_SetAxTgtTorq", ExactSpelling = false, CallingConvention = CallingConvention.Cdecl)]
        public static extern UInt32 IMC_SetAxTgtTorq(HANDLETYPE cardHandle, Int16 axNo, Int16 tgtTrq);
        [DllImport(EtherCATConfigApiDllName, EntryPoint = "IMC_GetAxTgtTorq", ExactSpelling = false, CallingConvention = CallingConvention.Cdecl)]
        public static extern UInt32 IMC_GetAxTgtTorq(HANDLETYPE cardHandle, Int16 axNo, ref Int16 pTgtTrq);

        [DllImport(EtherCATConfigApiDllName, EntryPoint = "IMC_GetAxErrCode", ExactSpelling = false, CallingConvention = CallingConvention.Cdecl)]
        public static extern UInt32 IMC_GetAxErrCode(HANDLETYPE cardHandle, Int16 axNo, ref Int16 pErrorCode);

        [DllImport(EtherCATConfigApiDllName, EntryPoint = "IMC_GetAxEcatDigitalInput", ExactSpelling = false, CallingConvention = CallingConvention.Cdecl)]
        public static extern UInt32 IMC_GetAxEcatDigitalInput(HANDLETYPE cardHandle, Int16 axNo, ref Int16 pDigitalInput);


        [DllImport(EtherCATConfigApiDllName, EntryPoint = "IMC_GetAxBacklashCmpVal", ExactSpelling = false, CallingConvention = CallingConvention.Cdecl)]
        public static extern UInt32 IMC_GetAxBacklashCmpVal(HANDLETYPE cardHandle, Int16 axNo, ref Int32 pCmpVal);


        [DllImport(EtherCATConfigApiDllName, EntryPoint = "IMC_SetEcatAxMaxVelLmt", ExactSpelling = false, CallingConvention = CallingConvention.Cdecl)]
        public static extern UInt32 IMC_SetEcatAxMaxVelLmt(HANDLETYPE cardHandle, Int16 axNo, Int32 maxVel);


        [DllImport(EtherCATConfigApiDllName, EntryPoint = "IMC_GetEcatAxMaxVelLmt", ExactSpelling = false, CallingConvention = CallingConvention.Cdecl)]
        public static extern UInt32 IMC_GetEcatAxMaxVelLmt(HANDLETYPE cardHandle, Int16 axNo, ref Int32 maxVel);


        [DllImport(EtherCATConfigApiDllName, EntryPoint = "IMC_SyncAxPos", ExactSpelling = false, CallingConvention = CallingConvention.Cdecl)]
        public static extern UInt32 IMC_SyncAxPos(HANDLETYPE cardHandle, Int16 axNo);

        [DllImport(EtherCATConfigApiDllName, EntryPoint = "IMC_SetAxPressFitCtrlWord", ExactSpelling = false, CallingConvention = CallingConvention.Cdecl)]
        public static extern UInt32 IMC_SetAxPressFitCtrlWord(HANDLETYPE cardHandle, Int16 axNo, UInt16 ctrlword);
        [DllImport(EtherCATConfigApiDllName, EntryPoint = "IMC_SetAxPressTgtVal", ExactSpelling = false, CallingConvention = CallingConvention.Cdecl)]
        public static extern UInt32 IMC_SetAxPressTgtVal(HANDLETYPE cardHandle, Int16 axNo, Int16 pressVal);
        [DllImport(EtherCATConfigApiDllName, EntryPoint = "IMC_GetAxPressFitSts", ExactSpelling = false, CallingConvention = CallingConvention.Cdecl)]
        public static extern UInt32 IMC_GetAxPressFitSts(HANDLETYPE cardHandle, Int16 axNo, ref UInt16 pSts);
        [DllImport(EtherCATConfigApiDllName, EntryPoint = "IMC_GetAxAIInputVal", ExactSpelling = false, CallingConvention = CallingConvention.Cdecl)]
        public static extern UInt32 IMC_GetAxAIInputVal(HANDLETYPE cardHandle, Int16 axNo, ref Int16 pA1Volt, ref Int16 pA2Volt);
        [DllImport(EtherCATConfigApiDllName, EntryPoint = "IMC_GetAxPressFeedback", ExactSpelling = false, CallingConvention = CallingConvention.Cdecl)]
        public static extern UInt32 IMC_GetAxPressFeedback(HANDLETYPE cardHandle, Int16 axNo, ref Int16 pPressVal);

        [DllImport(EtherCATConfigApiDllName, EntryPoint = "IMC_StartAxTorqHoming", ExactSpelling = false, CallingConvention = CallingConvention.Cdecl)]
        public static extern UInt32 IMC_StartAxTorqHoming(HANDLETYPE cardHandle, Int16 axNo, Int16 tgtTorq, Int16 torqSlopeTime, UInt32 maxVel);
        [DllImport(EtherCATConfigApiDllName, EntryPoint = "IMC_StopAxTorqHoming", ExactSpelling = false, CallingConvention = CallingConvention.Cdecl)]
        public static extern UInt32 IMC_StopAxTorqHoming(HANDLETYPE cardHandle, Int16 axNo, Int16 stopTime);
        [DllImport(EtherCATConfigApiDllName, EntryPoint = "IMC_GetAxTorqHomingSts", ExactSpelling = false, CallingConvention = CallingConvention.Cdecl)]
        public static extern UInt32 IMC_GetAxTorqHomingSts(HANDLETYPE cardHandle, Int16 axNo, ref Int16 pStatus);
        [DllImport(EtherCATConfigApiDllName, EntryPoint = "IMC_FinishAxTorqHoming", ExactSpelling = false, CallingConvention = CallingConvention.Cdecl)]
        public static extern UInt32 IMC_FinishAxTorqHoming(HANDLETYPE cardHandle, Int16 axNo);



        [DllImport(EtherCATConfigApiDllName, EntryPoint = "IMC_FinishAxTorqHoming", ExactSpelling = false, CallingConvention = CallingConvention.Cdecl)]
        public static extern UInt32 IMC_SetEcatAxPosTorqLmt(HANDLETYPE cardHandle, Int16 axNo, Int16 posTorqLmt);
        [DllImport(EtherCATConfigApiDllName, EntryPoint = "IMC_FinishAxTorqHoming", ExactSpelling = false, CallingConvention = CallingConvention.Cdecl)]
        public static extern UInt32 IMC_GetEcatAxPosTorqLmt(HANDLETYPE cardHandle, Int16 axNo, ref Int16 pPosTorqLmt);
        [DllImport(EtherCATConfigApiDllName, EntryPoint = "IMC_FinishAxTorqHoming", ExactSpelling = false, CallingConvention = CallingConvention.Cdecl)]
        public static extern UInt32 IMC_SetEcatAxNegTorqLmt(HANDLETYPE cardHandle, Int16 axNo, Int16 negTorqLmt);
        [DllImport(EtherCATConfigApiDllName, EntryPoint = "IMC_FinishAxTorqHoming", ExactSpelling = false, CallingConvention = CallingConvention.Cdecl)]
        public static extern UInt32 IMC_GetEcatAxNegTorqLmt(HANDLETYPE cardHandle, Int16 axNo, ref Int16 pNegTorqLmt);
        [DllImport(EtherCATConfigApiDllName, EntryPoint = "IMC_FinishAxTorqHoming", ExactSpelling = false, CallingConvention = CallingConvention.Cdecl)]
        public static extern UInt32 IMC_SetEcatAxMaxTorqLmt(HANDLETYPE cardHandle, Int16 axNo, Int16 maxTorqLmt);
        [DllImport(EtherCATConfigApiDllName, EntryPoint = "IMC_FinishAxTorqHoming", ExactSpelling = false, CallingConvention = CallingConvention.Cdecl)]
        public static extern UInt32 IMC_GetEcatAxMaxTorqLmt(HANDLETYPE cardHandle, Int16 axNo, ref Int16 pMaxTorqLmt);


        ///*==========================================================================*/
        ///*----5 数据采集接口                                                     ---*/
        ///*==========================================================================*/
        ////_DLL_API UINT32 IMC_ConfigSamplePara(HANDLETYPE cardHandle, TSamplePara *pSamplePara);
        ////_DLL_API UINT32 IMC_ConfigSampleData(HANDLETYPE cardHandle, INT16 count, INT16 *pDataType, INT16 *pDataIndex);
        ////_DLL_API UINT32 IMC_GetSampleDataSts(HANDLETYPE cardHandle, INT16 *pPackLen, INT16 *pDataLen);
        ////_DLL_API UINT32 IMC_ConfigSampleEnable(HANDLETYPE cardHandle, INT16 enable);
        ////_DLL_API UINT32 IMC_GetSampleStatus(HANDLETYPE cardHandle, INT16 *pStatus, INT32 *pLen, INT32 *pLeakageCount);
        ////_DLL_API UINT32 IMC_GetSampleData(HANDLETYPE cardHandle, INT16 *pPackNum, INT16 *pData);
        //[DllImport(EtherCATConfigApiDllName, EntryPoint = "IMC_ConfigSamplePara", ExactSpelling = false, CallingConvention = CallingConvention.Cdecl)]
        //public static extern UInt32 IMC_ConfigSamplePara(HANDLETYPE cardHandle, ref TSamplePara pSamplePara);

        //[DllImport(EtherCATConfigApiDllName, EntryPoint = "IMC_ConfigSampleData", ExactSpelling = false, CallingConvention = CallingConvention.Cdecl)]
        //public static extern UInt32 IMC_ConfigSampleData(HANDLETYPE cardHandle, Int16 count, ref Int16 pDataType, ref Int16 pDataIndex);

        //[DllImport(EtherCATConfigApiDllName, EntryPoint = "IMC_ConfigSampleEnable", ExactSpelling = false, CallingConvention = CallingConvention.Cdecl)]
        //public static extern UInt32 IMC_ConfigSampleEnable(HANDLETYPE cardHandle, Int16 enable);

        //[DllImport(EtherCATConfigApiDllName, EntryPoint = "IMC_GetSampleStatus", ExactSpelling = false, CallingConvention = CallingConvention.Cdecl)]
        //public static extern UInt32 IMC_GetSampleStatus(HANDLETYPE cardHandle, ref Int16 pStatus, ref Int32 pLen, ref Int32 pLeakageCount);

        //[DllImport(EtherCATConfigApiDllName, EntryPoint = "IMC_GetSampleData", ExactSpelling = false, CallingConvention = CallingConvention.Cdecl)]
        //public static extern UInt32 IMC_GetSampleData(HANDLETYPE cardHandle, ref Int16 pPackNum, ref Int16 pData);

        /*==========================================================================*/
        /*----6 轴位置捕获接口                                                     ---*/
        /*==========================================================================*/
        //_DLL_API UINT32 IMC_SetAxCaptMode (HANDLETYPE cardHandle,INT16 axNo,INT16 trigType,INT16 captSrc,INT16 sns);
        //_DLL_API UINT32 IMC_GetAxCaptMode (HANDLETYPE cardHandle,INT16 axNo,INT16 *pTrigType,INT16 *pCaptSrc,INT16 *pSns);
        //_DLL_API UINT32 IMC_GetAxCaptStatus (HANDLETYPE cardHandle,INT16 axNo,INT16 *pSts,INT32 *pCaptPos);

        [DllImport(EtherCATConfigApiDllName, EntryPoint = "IMC_SetAxCaptMode", ExactSpelling = false, CallingConvention = CallingConvention.Cdecl)]
        public static extern UInt32 IMC_SetAxCaptMode(HANDLETYPE cardHandle, Int16 axNo, Int16 trigType, Int16 captSrc, Int16 sns);


        [DllImport(EtherCATConfigApiDllName, EntryPoint = "IMC_GetAxCaptMode", ExactSpelling = false, CallingConvention = CallingConvention.Cdecl)]
        public static extern UInt32 IMC_GetAxCaptMode(HANDLETYPE cardHandle, Int16 axNo, ref Int16 pTrigType, ref Int16 pCaptSrc, ref Int16 pSns);


        [DllImport(EtherCATConfigApiDllName, EntryPoint = "IMC_GetAxCaptStatus", ExactSpelling = false, CallingConvention = CallingConvention.Cdecl)]
        public static extern UInt32 IMC_GetAxCaptStatus(HANDLETYPE cardHandle, Int16 axNo, ref Int16 pSts, ref Int32 pCaptPos);

        ///*==========================================================================*/
        ///*----7 运动模式接口                                                     ---*/
        ///*==========================================================================*/
        //_DLL_API UINT32 IMC_SetSingleAxMvPara(HANDLETYPE cardHandle, INT16 axNo, double vel, double acc, double dec);
        //_DLL_API UINT32 IMC_GetSingleAxMvPara(HANDLETYPE cardHandle, INT16 axNo, double *pVel, double *pAcc, double *pDec);
        //_DLL_API UINT32 IMC_SetSingleAxVelType(HANDLETYPE cardHandle, INT16 axNo, INT16 velType, double ratio);
        //_DLL_API UINT32 IMC_GetSingleAxVelType(HANDLETYPE cardHandle, INT16 axNo, INT16 *pVelType, double *pRatio);
        [DllImport(EtherCATConfigApiDllName, EntryPoint = "IMC_SetSingleAxMvPara", ExactSpelling = false, CallingConvention = CallingConvention.Cdecl)]
        public static extern UInt32 IMC_SetSingleAxMvPara(HANDLETYPE cardHandle, Int16 axNo, double vel, double acc, double dec);

        [DllImport(EtherCATConfigApiDllName, EntryPoint = "IMC_GetSingleAxMvPara", ExactSpelling = false, CallingConvention = CallingConvention.Cdecl)]
        public static extern UInt32 IMC_GetSingleAxMvPara(HANDLETYPE cardHandle, Int16 axNo, ref double pVel, ref double pAcc, ref double pDec);

        [DllImport(EtherCATConfigApiDllName, EntryPoint = "IMC_SetSingleAxVelType", ExactSpelling = false, CallingConvention = CallingConvention.Cdecl)]
        public static extern UInt32 IMC_SetSingleAxVelType(HANDLETYPE cardHandle, Int16 axNo, Int16 velType, double ratio);

        [DllImport(EtherCATConfigApiDllName, EntryPoint = "IMC_GetSingleAxVelType", ExactSpelling = false, CallingConvention = CallingConvention.Cdecl)]
        public static extern UInt32 IMC_GetSingleAxVelType(HANDLETYPE cardHandle, Int16 axNo, ref Int16 pVelType, ref double pRatio);
        ///*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/
        ///*----7.1 PTP点位模式接口                                                ---*/
        ///*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/
        //_DLL_API UINT32 IMC_StartPtpMove(HANDLETYPE cardHandle, INT16 axNo, double tgtPos, INT16 posType = 0);
        //_DLL_API UINT32 IMC_UpdatePtpTgtPos(HANDLETYPE cardHandle, INT16 axNo, double tgtPos);
        //_DLL_API UINT32 IMC_UpdatePtpMvPara(HANDLETYPE cardHandle, INT16 axNo, double tgtVel, double acc, double dec);
        //_DLL_API UINT32 IMC_UpdatePtpTgtVel(HANDLETYPE cardHandle, INT16 axNo, double tgtVel);
        [DllImport(EtherCATConfigApiDllName, EntryPoint = "IMC_StartPtpMove", ExactSpelling = false, CallingConvention = CallingConvention.Cdecl)]
        public static extern UInt32 IMC_StartPtpMove(HANDLETYPE cardHandle, Int16 axNo, double tgtPos, Int16 posType = 0);

        [DllImport(EtherCATConfigApiDllName, EntryPoint = "IMC_UpdatePtpTgtPos", ExactSpelling = false, CallingConvention = CallingConvention.Cdecl)]
        public static extern UInt32 IMC_UpdatePtpTgtPos(HANDLETYPE cardHandle, Int16 axNo, double tgtPos);

        [DllImport(EtherCATConfigApiDllName, EntryPoint = "IMC_UpdatePtpMvPara", ExactSpelling = false, CallingConvention = CallingConvention.Cdecl)]
        public static extern UInt32 IMC_UpdatePtpMvPara(HANDLETYPE cardHandle, Int16 axNo, double tgtVel, double acc, double dec);

        [DllImport(EtherCATConfigApiDllName, EntryPoint = "IMC_UpdatePtpTgtVel", ExactSpelling = false, CallingConvention = CallingConvention.Cdecl)]
        public static extern UInt32 IMC_UpdatePtpTgtVel(HANDLETYPE cardHandle, Int16 axNo, double tgtVel);

        ///*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/
        ///*----7.2 Jog运动模式接口                                                ---*/
        ///*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/
        //_DLL_API UINT32 IMC_StartJogMove(HANDLETYPE cardHandle, INT16 axNo,  double tgVel);
        //_DLL_API UINT32 IMC_UpdateJogTgtVel(HANDLETYPE cardHandle, INT16 axNo, double tgVel);
        //_DLL_API UINT32 IMC_UpdateJogMvPara(HANDLETYPE cardHandle, INT16 axNo, double tgVel, double acc, double dec);
        [DllImport(EtherCATConfigApiDllName, EntryPoint = "IMC_StartJogMove", ExactSpelling = false, CallingConvention = CallingConvention.Cdecl)]
        public static extern UInt32 IMC_StartJogMove(HANDLETYPE cardHandle, Int16 axNo, double tgVel);

        [DllImport(EtherCATConfigApiDllName, EntryPoint = "IMC_UpdateJogTgtVel", ExactSpelling = false, CallingConvention = CallingConvention.Cdecl)]
        public static extern UInt32 IMC_UpdateJogTgtVel(HANDLETYPE cardHandle, Int16 axNo, double tgVel);

        [DllImport(EtherCATConfigApiDllName, EntryPoint = "IMC_UpdateJogMvPara", ExactSpelling = false, CallingConvention = CallingConvention.Cdecl)]
        public static extern UInt32 IMC_UpdateJogMvPara(HANDLETYPE cardHandle, Int16 axNo, double tgVel, double acc, double dec);

        ///*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/
        ///*----7.3 手轮跟随运动模式接口                                           ---*/
        ///*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/
        //_DLL_API UINT32 IMC_EnterHandWheelMode(HANDLETYPE cardHandle, INT16 axNo, INT16 masterType, INT16 masterIndex, double ratio, double acc, double vel);
        //_DLL_API UINT32 IMC_ExitHandWheelMode(HANDLETYPE cardHandle);
        //_DLL_API UINT32 IMC_SwitchHandWheelRatio(HANDLETYPE cardHandle, double ratio);
        //_DLL_API uint32_t IMC_dsp_test(uint32_t cardHandle, float ratio);
        [DllImport(EtherCATConfigApiDllName, EntryPoint = "IMC_EnterHandWheelMode", ExactSpelling = false, CallingConvention = CallingConvention.Cdecl)]
        public static extern UInt32 IMC_EnterHandWheelMode(HANDLETYPE cardHandle, Int16 axNo, Int16 masterType, Int16 masterIndex, double ratio, double acc, double vel);

        [DllImport(EtherCATConfigApiDllName, EntryPoint = "IMC_ExitHandWheelMode", ExactSpelling = false, CallingConvention = CallingConvention.Cdecl)]
        public static extern UInt32 IMC_ExitHandWheelMode(HANDLETYPE cardHandle);

        [DllImport(EtherCATConfigApiDllName, EntryPoint = "IMC_SwitchHandWheelRatio", ExactSpelling = false, CallingConvention = CallingConvention.Cdecl)]
        public static extern UInt32 IMC_SwitchHandWheelRatio(HANDLETYPE cardHandle, double ratio);

        //[DllImport(EtherCATConfigApiDllName, EntryPoint = "IMC_dsp_test", ExactSpelling = false, CallingConvention = CallingConvention.Cdecl)]
        //public static extern UInt32 IMC_dsp_test(HANDLETYPE cardHandle, float ratio);

        /*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/
        /*----7.4 电子齿轮                                          ---*/
        /*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/
        // 设置跟随参数
        [DllImport(EtherCATConfigApiDllName, EntryPoint = "IMC_GearSetParam", ExactSpelling = false, CallingConvention = CallingConvention.Cdecl)]
        public static extern UInt32 IMC_GearSetParam(HANDLETYPE cardHandle, Int16 axNo, ref TGearParam pGearParam);

        // 读取跟随参数
        [DllImport(EtherCATConfigApiDllName, EntryPoint = "IMC_GearGetParam", ExactSpelling = false, CallingConvention = CallingConvention.Cdecl)]
        public static extern UInt32 IMC_GearGetParam(HANDLETYPE cardHandle, Int16 axNo, ref TGearParam pGearParam);
        // 更新主轴齿数和设置离合区
        [DllImport(EtherCATConfigApiDllName, EntryPoint = "IMC_GearUpdateScale", ExactSpelling = false, CallingConvention = CallingConvention.Cdecl)]
        public static extern UInt32 IMC_GearUpdateScale(HANDLETYPE cardHandle, Int16 axNo, double masterScale, double slaveScale, Int32 masterDis);
        //电子齿轮模式主轴离合区设定
        [DllImport(EtherCATConfigApiDllName, EntryPoint = "IMC_GearSetMasterZone", ExactSpelling = false, CallingConvention = CallingConvention.Cdecl)]
        public static extern UInt32 IMC_GearSetMasterZone(HANDLETYPE cardHandle, Int16 axNo, Int32 masterDis);
        //电子齿轮模式启动
        [DllImport(EtherCATConfigApiDllName, EntryPoint = "IMC_GearStart", ExactSpelling = false, CallingConvention = CallingConvention.Cdecl)]
        public static extern UInt32 IMC_GearStart(HANDLETYPE cardHandle, Int16 axNo);
        //电子齿轮模式停止
        [DllImport(EtherCATConfigApiDllName, EntryPoint = "IMC_GearStop", ExactSpelling = false, CallingConvention = CallingConvention.Cdecl)]
        public static extern UInt32 IMC_GearStop(HANDLETYPE cardHandle, Int16 axNo, Int16 type);
        //电子齿轮错误获取状态
        [DllImport(EtherCATConfigApiDllName, EntryPoint = "IMC_GearGetStatus", ExactSpelling = false, CallingConvention = CallingConvention.Cdecl)]
        public static extern UInt32 IMC_GearGetStatus(HANDLETYPE cardHandle, Int16 axNo, ref Int16 pStatus);


        /*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/
        /*----7.4 跟随运动                                          ---*/
        /*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/
        // 设置跟随参数
        //[DllImport(EtherCATConfigApiDllName, EntryPoint = "IMC_FollowSetParam", ExactSpelling = false, CallingConvention = CallingConvention.Cdecl)]
        //public static extern UInt32 IMC_FollowSetParam(HANDLETYPE cardHandle, Int16 axNo, ref TFolParam pFolParam);

        //// 读取跟随参数
        //[DllImport(EtherCATConfigApiDllName, EntryPoint = "IMC_FollowGetParam", ExactSpelling = false, CallingConvention = CallingConvention.Cdecl)]
        //public static extern UInt32 IMC_FollowGetParam(HANDLETYPE cardHandle, Int16 axNo, ref TFolParam pFolParam);
        //// 更新主轴齿数
        //[DllImport(EtherCATConfigApiDllName, EntryPoint = "IMC_FollowUpdateScale", ExactSpelling = false, CallingConvention = CallingConvention.Cdecl)]
        //public static extern UInt32 IMC_FollowUpdateScale(HANDLETYPE cardHandle, Int16 axNo, double masterScale, double slaveScale);
        ////跟随模式设定 (速度跟随还是位置跟随)
        //[DllImport(EtherCATConfigApiDllName, EntryPoint = "IMC_FollowSetType", ExactSpelling = false, CallingConvention = CallingConvention.Cdecl)]
        //public static extern UInt32 IMC_FollowSetType(HANDLETYPE cardHandle, Int16 axNo, Int16 type);
        ////跟随模式读取 (速度跟随还是位置跟随)
        //[DllImport(EtherCATConfigApiDllName, EntryPoint = "IMC_FollowGetType", ExactSpelling = false, CallingConvention = CallingConvention.Cdecl)]
        //public static extern UInt32 IMC_FollowGetType(HANDLETYPE cardHandle, Int16 axNo, ref Int16 pType);
        ////立即跟随启动
        //[DllImport(EtherCATConfigApiDllName, EntryPoint = "IMC_FollowSetStart", ExactSpelling = false, CallingConvention = CallingConvention.Cdecl)]
        //public static extern UInt32 IMC_FollowSetStart(HANDLETYPE cardHandle, Int16 axNo);
        ////位置限制使能
        //[DllImport(EtherCATConfigApiDllName, EntryPoint = "IMC_FollowSetPosLmtEn", ExactSpelling = false, CallingConvention = CallingConvention.Cdecl)]
        //public static extern UInt32 IMC_FollowSetPosLmtEn(HANDLETYPE cardHandle, Int16 axNo, Int16 en);
        ////位置限制参数设置
        //[DllImport(EtherCATConfigApiDllName, EntryPoint = "IMC_FollowSetPosLmt", ExactSpelling = false, CallingConvention = CallingConvention.Cdecl)]
        //public static extern UInt32 IMC_FollowSetPosLmt(HANDLETYPE cardHandle, Int16 axNo, double posLimitPos, double negLimitPos);
        ////位置限制参数读取
        //[DllImport(EtherCATConfigApiDllName, EntryPoint = "IMC_FollowGetLmtInfo", ExactSpelling = false, CallingConvention = CallingConvention.Cdecl)]
        //public static extern UInt32 IMC_FollowGetLmtInfo(HANDLETYPE cardHandle, Int16 axNo, ref Int16 pEn, ref double pPosLimitPos, ref double pNegLimitPos);
        //// 设置启动条件
        //[DllImport(EtherCATConfigApiDllName, EntryPoint = "IMC_FollowSetStartCond", ExactSpelling = false, CallingConvention = CallingConvention.Cdecl)]
        //public static extern UInt32 IMC_FollowSetStartCond(HANDLETYPE cardHandle, Int16 axNo, ref TFolStartCond pFolStartCond);
        //// 读取启动条件
        //[DllImport(EtherCATConfigApiDllName, EntryPoint = "IMC_FollowGetStartCond", ExactSpelling = false, CallingConvention = CallingConvention.Cdecl)]
        //public static extern UInt32 IMC_FollowGetStartCond(HANDLETYPE cardHandle, Int16 axNo, ref TFolStartCond pFolStartCond);
        ////设置PID参数
        //[DllImport(EtherCATConfigApiDllName, EntryPoint = "IMC_FollowSetPid", ExactSpelling = false, CallingConvention = CallingConvention.Cdecl)]
        //public static extern UInt32 IMC_FollowSetPid(HANDLETYPE cardHandle, Int16 axNo, double kp, double ki);
        ////读取PID参数
        //[DllImport(EtherCATConfigApiDllName, EntryPoint = "IMC_FollowGetPid", ExactSpelling = false, CallingConvention = CallingConvention.Cdecl)]
        //public static extern UInt32 IMC_FollowGetPid(HANDLETYPE cardHandle, Int16 axNo, ref double pKp, ref double pKi);
        ////读取跟随误差
        //[DllImport(EtherCATConfigApiDllName, EntryPoint = "IMC_FollowGetPosErr", ExactSpelling = false, CallingConvention = CallingConvention.Cdecl)]
        //public static extern UInt32 IMC_FollowGetPosErr(HANDLETYPE cardHandle, Int16 axNo, ref double pErr);

        /*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/
        /*---- 电子凸轮                                     ---*/
        /*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/
        //[DllImport(EtherCATConfigApiDllName, EntryPoint = "IMC_EcamAdddata", ExactSpelling = false, CallingConvention = CallingConvention.Cdecl)]
        //public static extern UInt32 IMC_EcamAdddata(HANDLETYPE cardHandle, Int16 tabNo, ref double pMasterPos, ref double pSlavePos, ref Int16 pType, Int16 dataNum);
        //[DllImport(EtherCATConfigApiDllName, EntryPoint = "IMC_EcamStart", ExactSpelling = false, CallingConvention = CallingConvention.Cdecl)]
        //public static extern UInt32 IMC_EcamStart(HANDLETYPE cardHandle, Int16 axNo, Int16 tabNo, Int16 masterNo, Int16 masterSrc, Int16 camType, double scale, ref TFolStartCond pStartCond);

        /*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/
        /*----7.4 直角坐标系插补运动模式接口                                     ---*/
        /*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/
        //_DLL_API UINT32 IMC_CrdSetMtSys(UINT64 cardHandle, INT16 crdNo,INT16 *pMaskAxNo,INT16 lookAheadLen,double estopDec);
        //_DLL_API UINT32 IMC_CrdGetMtSysParam(UINT64 cardHandle, INT16 crdNo,INT16 *pMaskAxNo,INT16 *pLookAheadLen,double *pEstopDec);
        //_DLL_API UINT32 IMC_CrdDeleteMtSys(UINT64 cardHandle, INT16 crdNo);
        //_DLL_API UINT32 IMC_CrdSetAdvParam(UINT64 cardHandle, INT16 crdNo,TCrdAdvParam *pCrdAdvParam);
        //_DLL_API UINT32 IMC_CrdGetAdvParam(UINT64 cardHandle, INT16 crdNo,TCrdAdvParam *pCrdAdvParam);
        //_DLL_API UINT32 IMC_CrdSetSmoothParam(UINT64 cardHandle, INT16 crdNo, INT32 smoothLevel, double smoothTol);
        //_DLL_API UINT32 IMC_CrdGetSmoothParam(UINT64 cardHandle, INT16 crdNo, INT32 *pSmoothLevel, double *pSmoothTol);

        //_DLL_API UINT32 IMC_CrdSetTrajVel(UINT64 cardHandle, INT16 crdNo,double tgtVel);
        //_DLL_API UINT32 IMC_CrdSetTrajAcc(UINT64 cardHandle, INT16 crdNo,double tgtAcc);
        //_DLL_API UINT32 IMC_CrdSetTrajAccAndDec(UINT64 cardHandle, INT16 crdNo,double tgtAcc,double tgtdec);
        //_DLL_API UINT32 IMC_CrdSetZeroFlag(UINT64 cardHandle, INT16 crdNo,INT16 ZeroFlag);
        //_DLL_API UINT32 IMC_CrdSetIncMode(UINT64 cardHandle, INT16 crdNo,INT16 mode);
        //_DLL_API UINT32 IMC_CrdUserVelPlan(UINT64 cardHandle,INT16 crdNo, double uStartVel, double uEndVel);
        //_DLL_API UINT32 IMC_CrdSetTrajTol(UINT64 cardHandle, INT16 crdNo,double tol);
        //_DLL_API UINT32 IMC_CrdSetTrajTurnCoef(UINT64 cardHandle, INT16 crdNo,double turnCoef);

        //_DLL_API UINT32 IMC_CrdLineXYZ(UINT64 cardHandle, INT16 crdNo,double *pEndPos, INT32 userID=0);
        //_DLL_API UINT32 IMC_CrdLineXY(UINT64 cardHandle, INT16 crdNo,double *pEndPos, INT32 userID=0);
        //_DLL_API UINT32 IMC_CrdLineZX(UINT64 cardHandle, INT16 crdNo,double *pEndPos, INT32 userID=0);
        //_DLL_API UINT32 IMC_CrdLineYZ(UINT64 cardHandle, INT16 crdNo,double *pEndPos, INT32 userID=0);

        //_DLL_API UINT32 IMC_CrdArcThreePoint(UINT64 cardHandle, INT16 crdNo,double *pMidPos,double *pEndPos, INT32 userID);

        ////空间arc插补
        //_DLL_API UINT32 IMC_Crd3DArcCenterNormal(UINT64 cardHandle, INT16 crdNo,double *pCenter,double *pEndPos,double *pNormal,double height=0,INT32 turn=0,INT32 userID=0);
        //_DLL_API UINT32 IMC_Crd3DArcRadiusNormal(UINT64 cardHandle, INT16 crdNo,double radius,double *pEndPos,double *pNormal,double height=0,INT32 turn=0,INT32 userID=0);
        //_DLL_API UINT32 IMC_Crd3DArcAngleNormal(UINT64 cardHandle, INT16 crdNo,double *pCenter,double angle,double *pNormal,double height=0,INT32 userID=0);
        ////平面arc插补
        ////圆心终点编程
        //_DLL_API UINT32 IMC_CrdArcCenterXYPlane(UINT64 cardHandle, INT16 crdNo,double *pCenter,double *pEndPos,INT16 dir,double height=0,INT32 turn=0,INT32 userID=0);
        //_DLL_API UINT32 IMC_CrdArcCenterYZPlane(UINT64 cardHandle, INT16 crdNo,double *pCenter,double *pEndPos,INT16 dir,double height=0,INT32 turn=0,INT32 userID=0);
        //_DLL_API UINT32 IMC_CrdArcCenterZXPlane(UINT64 cardHandle, INT16 crdNo,double *pCenter,double *pEndPos,INT16 dir,double height=0,INT32 turn=0,INT32 userID=0);
        ////半径终点编程
        //_DLL_API UINT32 IMC_CrdArcRadiusXYPlane(UINT64 cardHandle, INT16 crdNo,double radius,double *pEndPos,INT16 dir,double height=0,INT32 turn=0,INT32 userID=0);
        //_DLL_API UINT32 IMC_CrdArcRadiusYZPlane(UINT64 cardHandle, INT16 crdNo,double radius,double *pEndPos,INT16 dir,double height=0,INT32 turn=0,INT32 userID=0);
        //_DLL_API UINT32 IMC_CrdArcRadiusZXPlane(UINT64 cardHandle, INT16 crdNo,double radius,double *pEndPos,INT16 dir,double height=0,INT32 turn=0,INT32 userID=0);
        ////圆心角度编程
        //_DLL_API UINT32 IMC_CrdArcAngleXYPlane(UINT64 cardHandle, INT16 crdNo,double *pCenter,double angle,double height=0,INT32 userID=0);
        //_DLL_API UINT32 IMC_CrdArcAngleYZPlane(UINT64 cardHandle, INT16 crdNo,double *pCenter,double angle,double height=0,INT32 userID=0);
        //_DLL_API UINT32 IMC_CrdArcAngleZXPlane(UINT64 cardHandle, INT16 crdNo,double *pCenter,double angle,double height=0,INT32 userID=0);

        //涡旋线插补
        //_DLL_API UINT32 IMC_CrdSpiralAngleXYPlane(UINT64 cardHandle, INT16 crdNo,double *pCenter,double angle,double height,double m,INT32 userID);
        //_DLL_API UINT32 IMC_CrdSpiralAngleYZPlane(UINT64 cardHandle, INT16 crdNo,double *pCenter,double angle,double height,double m,INT32 userID);
        //_DLL_API UINT32 IMC_CrdSpiralAngleZXPlane(UINT64 cardHandle, INT16 crdNo,double *pCenter,double angle,double height,double m,INT32 userID);

        //椭圆插补
        /*起点作为椭圆的一个顶点,给定圆心,以及另一个顶点到圆心的距离b,给定方向,走整椭圆*/
        //_DLL_API UINT32 IMC_CrdEllipseFullXYPlane(UINT64 cardHandle, INT16 crdNo,double *pCenter,double b,INT16 dir,INT32 userID);
        //_DLL_API UINT32 IMC_CrdEllipseFullYZPlane(UINT64 cardHandle, INT16 crdNo,double *pCenter,double b,INT16 dir,INT32 userID);
        //_DLL_API UINT32 IMC_CrdEllipseFullZXPlane(UINT64 cardHandle, INT16 crdNo,double *pCenter,double b,INT16 dir,INT32 userID);

        ////FIFO事件
        //_DLL_API UINT32 IMC_CrdWaitTime(UINT64 cardHandle, INT16 crdNo,INT32 waitPeriod,INT32 userID=0);
        //_DLL_API UINT32 IMC_CrdWaitDI(UINT64 cardHandle, INT16 crdNo,INT16 diNO,INT16 diType,INT16 diLevel,INT32 userID=0);
        //_DLL_API UINT32 IMC_CrdSetDO(UINT64 cardHandle, INT16 crdNo,INT16 doNO,INT16 doType,INT16 doLevel,INT32 userID=0);
        //_DLL_API UINT32 IMC_CrdPTPMove(UINT64 cardHandle, INT16 crdNo,INT16 axNo,double tgtPos,double tgtVel,double acc, INT16 mvType,INT16 waitFlag,INT32 userID=0);
        //_DLL_API UINT32 IMC_CrdSyncMove(UINT64 cardHandle, INT16 crdNo,INT16 axNo,double syncPos,INT32 userID=0);
        //_DLL_API UINT32 IMC_CrdEndData(UINT64 cardHandle, INT16 crdNo,INT16 *pIsFinished);


        //_DLL_API UINT32 IMC_CrdStart(UINT64 cardHandle, INT16 crdNo);
        //_DLL_API UINT32 IMC_CrdStop(UINT64 cardHandle, INT16 crdNo,INT16 stopType);
        //_DLL_API UINT32 IMC_CrdGetStatus(UINT64 cardHandle, INT16 crdNo,INT16 *pStatus);
        //_DLL_API UINT32 IMC_CrdSetRatio(UINT64 cardHandle, INT16 crdNo,double ratio);
        //_DLL_API UINT32 IMC_CrdGetRatio(UINT64 cardHandle, INT16 crdNo,double *pRatio);
        //_DLL_API UINT32 IMC_CrdGetPos(UINT64 cardHandle, INT16 crdNo,double *pCrdPos);
        //_DLL_API UINT32 IMC_CrdGetVel(UINT64 cardHandle, INT16 crdNo,double *pCrdVel);
        //_DLL_API UINT32 IMC_CrdGetUserID(UINT64 cardHandle, INT16 crdNo,INT32 *pUserID);
        //_DLL_API UINT32 IMC_CrdGetSpace(UINT64 cardHandle, INT16 crdNo,INT32 *pSpace);
        //_DLL_API UINT32 IMC_CrdClrData(UINT64 cardHandle, INT16 crdNo);
        //_DLL_API UINT32 IMC_CrdClrError(UINT64 cardHandle, INT16 crdNo);
        //_DLL_API UINT32 IMC_CrdGetTargetPos(UINT64 cardHandle, INT16 crdNo,double *pPos);
        //_DLL_API UINT32 IMC_CrdGetPausePos(UINT64 cardHandle, INT16 crdNo,double *pPos);
        //_DLL_API UINT32 IMC_CrdSetSmoothParam(UINT64 cardHandle, INT16 crdNo, INT32 smoothLevel, double smoothTol);
        //_DLL_API UINT32 IMC_CrdGetSmoothParam(UINT64 cardHandle, INT16 crdNo, INT32 *pSmoothLevel, double *pSmoothTol);
        //_DLL_API UINT32 IMC_CrdGetFifoEmpty(UINT64 cardHandle, INT16 crdNo,INT16 *pEmpty);

        /*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/
        /*----7.5 多轴直线插补运动模式接口                                     ---*/
        /*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/
        //多轴直线插补映射建立
        //_DLL_API UINT32 IMC_SetupMutiSyncSys(UINT64 cardHandle,INT16 groupNo,INT16 *pMaskAxNo,INT16 maxAxNum);
        //获取多轴直线插补的坐标系信息
        //_DLL_API UINT32 IMC_GetMutiSyncSysInfo(UINT64 cardHandle,INT16 groupNo,INT16 *pMaskAxNo,INT16 *pMaxAxNum);
        //删除多轴直线插补映射
        //_DLL_API UINT32 IMC_DeleteMutiSyncSys(UINT64 cardHandle, INT16 groupNo);
        //多轴线段输入
        //_DLL_API UINT32 IMC_MutiSyncMotion(UINT64 cardHandle,INT16 groupNo,double *pEndPos,short *pVelRatio,short *pAccRatio,double blendRatio,INT32 userID);

        //_DLL_API UINT32 IMC_MutiSyncMotionInRatio(UINT64 cardHandle,INT16 groupNo,double *pEndPos,short *pVelRatio,short *pAccRatio,double blendRatio,INT32 userID);
        //以各轴的实际速度、加速度参数的形式进行的多轴线段输入
        //_DLL_API UINT32 IMC_MutiSyncMotionInAxVelAcc(UINT64 cardHandle,INT16 groupNo,double *pEndPos,double *pTrajVel,double *pTrajAcc,double *pTrajdec,double blendRatio,INT32 userID);
        //以所有轴的合成速度、加速度的参数形式进行的多轴线段输入
        //_DLL_API UINT32 IMC_MutiSyncMotionInSynVelAcc(UINT64 cardHandle,INT16 groupNo,double *pEndPos,double trajVel,double trajAcc,double trajdec,double blendRatio,INT32 userID);

        //多轴插补启停
        //_DLL_API UINT32 IMC_MutiSyncStart(UINT64 cardHandle, INT16 groupNo);
        //_DLL_API UINT32 IMC_MutiSyncStop(UINT64 cardHandle, INT16 groupNo,INT16 stopType);
        //多轴插补状态获取
        //_DLL_API UINT32 IMC_MutiSyncGetStatus(UINT64 cardHandle, INT16 groupNo,INT16 *pStatus);
        //多轴插补倍率读写
        //_DLL_API UINT32 IMC_MutiSyncSetRatio(UINT64 cardHandle, INT16 groupNo,double ratio);
        //_DLL_API UINT32 IMC_MutiSyncGetRatio(UINT64 cardHandle, INT16 groupNo,double *pRatio);
        //多轴插补用户ID读取
        //_DLL_API UINT32 IMC_MutiSyncGetUserID(UINT64 cardHandle, INT16 groupNo,INT32 *pUserID);
        //获取多轴插补空间余量
        //_DLL_API UINT32 IMC_MutiSyncGetSpace(UINT64 cardHandle, INT16 groupNo,INT32 *pSpace);
        //清除多轴插补缓存区数据
        //_DLL_API UINT32 IMC_MutiSyncClrData(UINT64 cardHandle, INT16 groupNo);
        //多轴插补故障清除
        //_DLL_API UINT32 IMC_MutiSyncClrError(UINT64 cardHandle, INT16 groupNo);
        //多轴插补编程模式设定
        //_DLL_API UINT32 IMC_MutiSyncSetType(UINT64 cardHandle, INT16 groupNo,INT16 type);
        //多轴插补编程模式读取
        //_DLL_API UINT32 IMC_MutiSyncGetType(UINT64 cardHandle, INT16 groupNo,INT16 *type);


        /*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/
        /*----7.6 PTP连续运动模式接口                                     ---*/
        /*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/
        //_DLL_API UINT32 IMC_PTPCAddFixTData(UINT64 cardHandle,INT16 axNo,double tgtPos,double acc,double dec,double T,double finalVel,INT16 posType);
        //_DLL_API UINT32 IMC_PTPCAddFixVmData(UINT64 cardHandle,INT16 axNo,double tgtPos,double acc,double dec,double tgtVel,double finalVel,INT16 posType);
        //_DLL_API UINT32 IMC_PTPCInterruptData(UINT64 cardHandle,INT16 axNo,double tgtPos,double acc,double dec,double tgtVel,double finalVel,INT16 posType);
        //_DLL_API UINT32 IMC_PTPCStart(UINT64 cardHandle,INT16 axNo);
        //_DLL_API UINT32 IMC_PTPCGetSpace(UINT64 cardHandle,INT16 axNo,INT32 *pSpace);
        //_DLL_API UINT32 IMC_PTPCClrData(UINT64 cardHandle,INT16 axNo);

        [DllImport(EtherCATConfigApiDllName, EntryPoint = "IMC_CrdSetMtSys", ExactSpelling = false, CallingConvention = CallingConvention.Cdecl)]
        public static extern UInt32 IMC_CrdSetMtSys(HANDLETYPE cardHandle, Int16 crdNo, Int16[] pMaskAxNo, Int16 lookAheadLen, double estopDec);
        [DllImport(EtherCATConfigApiDllName, EntryPoint = "IMC_CrdGetMtSysParam", ExactSpelling = false, CallingConvention = CallingConvention.Cdecl)]
        public static extern UInt32 IMC_CrdGetMtSysParam(HANDLETYPE cardHandle, Int16 crdNo, Int16[] pMaskAxNo, ref Int16 pLookAheadLen, ref double pEstopDec);
        [DllImport(EtherCATConfigApiDllName, EntryPoint = "IMC_CrdDeleteMtSys", ExactSpelling = false, CallingConvention = CallingConvention.Cdecl)]
        public static extern UInt32 IMC_CrdDeleteMtSys(HANDLETYPE cardHandle, Int16 crdNo);
        [DllImport(EtherCATConfigApiDllName, EntryPoint = "IMC_CrdSetAdvParam", ExactSpelling = false, CallingConvention = CallingConvention.Cdecl)]
        public static extern UInt32 IMC_CrdSetAdvParam(HANDLETYPE cardHandle, Int16 crdNo, ref TCrdAdvParam pCrdAdvParam);
        [DllImport(EtherCATConfigApiDllName, EntryPoint = "IMC_CrdGetAdvParam", ExactSpelling = false, CallingConvention = CallingConvention.Cdecl)]
        public static extern UInt32 IMC_CrdGetAdvParam(HANDLETYPE cardHandle, Int16 crdNo, ref TCrdAdvParam pCrdAdvParam);
        [DllImport(EtherCATConfigApiDllName, EntryPoint = "IMC_CrdSetSmoothParam", ExactSpelling = false, CallingConvention = CallingConvention.Cdecl)]
        public static extern UInt32 IMC_CrdSetSmoothParam(HANDLETYPE cardHandle, Int16 crdNo, Int32 smoothLevel, double smoothTol);
        [DllImport(EtherCATConfigApiDllName, EntryPoint = "IMC_CrdGetSmoothParam", ExactSpelling = false, CallingConvention = CallingConvention.Cdecl)]
        public static extern UInt32 IMC_CrdGetSmoothParam(HANDLETYPE cardHandle, Int16 crdNo, ref Int32 pSmoothLevel, ref double pSmoothTol);
        [DllImport(EtherCATConfigApiDllName, EntryPoint = "IMC_CrdSetTrajVel", ExactSpelling = false, CallingConvention = CallingConvention.Cdecl)]
        public static extern UInt32 IMC_CrdSetTrajVel(HANDLETYPE cardHandle, Int16 crdNo, double tgtVel);
        [DllImport(EtherCATConfigApiDllName, EntryPoint = "IMC_CrdSetTrajAcc", ExactSpelling = false, CallingConvention = CallingConvention.Cdecl)]
        public static extern UInt32 IMC_CrdSetTrajAcc(HANDLETYPE cardHandle, Int16 crdNo, double tgtAcc);

        [DllImport(EtherCATConfigApiDllName, EntryPoint = "IMC_CrdSetTrajDec", ExactSpelling = false, CallingConvention = CallingConvention.Cdecl)]
        public static extern UInt32 IMC_CrdSetTrajAccAndDec(HANDLETYPE cardHandle, Int16 crdNo, double tgtAcc, double tgtdec);

        [DllImport(EtherCATConfigApiDllName, EntryPoint = "IMC_CrdSetZeroFlag", ExactSpelling = false, CallingConvention = CallingConvention.Cdecl)]
        public static extern UInt32 IMC_CrdSetZeroFlag(HANDLETYPE cardHandle, Int16 crdNo, Int16 ZeroFlag);
        [DllImport(EtherCATConfigApiDllName, EntryPoint = "IMC_CrdSetIncMode", ExactSpelling = false, CallingConvention = CallingConvention.Cdecl)]
        public static extern UInt32 IMC_CrdSetIncMode(HANDLETYPE cardHandle, Int16 crdNo, Int16 mode);
        [DllImport(EtherCATConfigApiDllName, EntryPoint = "IMC_CrdUserVelPlan", ExactSpelling = false, CallingConvention = CallingConvention.Cdecl)]
        public static extern UInt32 IMC_CrdUserVelPlan(HANDLETYPE cardHandle, Int16 crdNo, double uStartVel, double uEndVel);

        [DllImport(EtherCATConfigApiDllName, EntryPoint = "IMC_CrdSetTrajTol", ExactSpelling = false, CallingConvention = CallingConvention.Cdecl)]
        public static extern UInt32 IMC_CrdSetTrajTol(HANDLETYPE cardHandle, Int16 crdNo, double tol);
        [DllImport(EtherCATConfigApiDllName, EntryPoint = "IMC_CrdSetTrajTurnCoef", ExactSpelling = false, CallingConvention = CallingConvention.Cdecl)]
        public static extern UInt32 IMC_CrdSetTrajTurnCoef(HANDLETYPE cardHandle, Int16 crdNo, double turnCoef);


        [DllImport(EtherCATConfigApiDllName, EntryPoint = "IMC_CrdLineXYZ", ExactSpelling = false, CallingConvention = CallingConvention.Cdecl)]
        public static extern UInt32 IMC_CrdLineXYZ(HANDLETYPE cardHandle, Int16 crdNo, double[] pEndPos, Int32 userID = 0);
        [DllImport(EtherCATConfigApiDllName, EntryPoint = "IMC_CrdLineXY", ExactSpelling = false, CallingConvention = CallingConvention.Cdecl)]
        public static extern UInt32 IMC_CrdLineXY(HANDLETYPE cardHandle, Int16 crdNo, double[] pEndPos, Int32 userID = 0);
        [DllImport(EtherCATConfigApiDllName, EntryPoint = "IMC_CrdLineZX", ExactSpelling = false, CallingConvention = CallingConvention.Cdecl)]
        public static extern UInt32 IMC_CrdLineZX(HANDLETYPE cardHandle, Int16 crdNo, double[] pEndPos, Int32 userID = 0);
        [DllImport(EtherCATConfigApiDllName, EntryPoint = "IMC_CrdLineYZ", ExactSpelling = false, CallingConvention = CallingConvention.Cdecl)]
        public static extern UInt32 IMC_CrdLineYZ(HANDLETYPE cardHandle, Int16 crdNo, double[] pEndPos, Int32 userID = 0);


        [DllImport(EtherCATConfigApiDllName, EntryPoint = "IMC_CrdArcThreePoint", ExactSpelling = false, CallingConvention = CallingConvention.Cdecl)]
        public static extern UInt32 IMC_CrdArcThreePoint(HANDLETYPE cardHandle, Int16 crdNo, double[] pMidPos, double[] pEndPos, Int32 userID);

        //空间arc插补
        [DllImport(EtherCATConfigApiDllName, EntryPoint = "IMC_Crd3DArcCenterNormal", ExactSpelling = false, CallingConvention = CallingConvention.Cdecl)]
        public static extern UInt32 IMC_Crd3DArcCenterNormal(HANDLETYPE cardHandle, Int16 crdNo, double[] pCenter, double[] pEndPos, double[] pNormal, double height = 0, Int32 turn = 0, Int32 userID = 0);
        [DllImport(EtherCATConfigApiDllName, EntryPoint = "IMC_Crd3DArcRadiusNormal", ExactSpelling = false, CallingConvention = CallingConvention.Cdecl)]
        public static extern UInt32 IMC_Crd3DArcRadiusNormal(HANDLETYPE cardHandle, Int16 crdNo, double radius, double[] pEndPos, double[] pNormal, double height = 0, Int32 turn = 0, Int32 userID = 0);
        [DllImport(EtherCATConfigApiDllName, EntryPoint = "IMC_Crd3DArcAngleNormal", ExactSpelling = false, CallingConvention = CallingConvention.Cdecl)]
        public static extern UInt32 IMC_Crd3DArcAngleNormal(HANDLETYPE cardHandle, Int16 crdNo, double[] pCenter, double angle, double[] pNormal, double height = 0, Int32 userID = 0);
        //平面arc插补
        //圆心终点编程
        [DllImport(EtherCATConfigApiDllName, EntryPoint = "IMC_CrdArcCenterXYPlane", ExactSpelling = false, CallingConvention = CallingConvention.Cdecl)]
        public static extern UInt32 IMC_CrdArcCenterXYPlane(HANDLETYPE cardHandle, Int16 crdNo, double[] pCenter, double[] pEndPos, Int16 dir, double height = 0, Int32 turn = 0, Int32 userID = 0);
        [DllImport(EtherCATConfigApiDllName, EntryPoint = "IMC_CrdArcCenterYZPlane", ExactSpelling = false, CallingConvention = CallingConvention.Cdecl)]
        public static extern UInt32 IMC_CrdArcCenterYZPlane(HANDLETYPE cardHandle, Int16 crdNo, double[] pCenter, double[] pEndPos, Int16 dir, double height = 0, Int32 turn = 0, Int32 userID = 0);
        [DllImport(EtherCATConfigApiDllName, EntryPoint = "IMC_CrdArcCenterZXPlane", ExactSpelling = false, CallingConvention = CallingConvention.Cdecl)]
        public static extern UInt32 IMC_CrdArcCenterZXPlane(HANDLETYPE cardHandle, Int16 crdNo, double[] pCenter, double[] pEndPos, Int16 dir, double height = 0, Int32 turn = 0, Int32 userID = 0);
        //半径终点编程
        [DllImport(EtherCATConfigApiDllName, EntryPoint = "IMC_CrdArcRadiusXYPlane", ExactSpelling = false, CallingConvention = CallingConvention.Cdecl)]
        public static extern UInt32 IMC_CrdArcRadiusXYPlane(HANDLETYPE cardHandle, Int16 crdNo, double radius, double[] pEndPos, Int16 dir, double height = 0, Int32 turn = 0, Int32 userID = 0);
        [DllImport(EtherCATConfigApiDllName, EntryPoint = "IMC_CrdArcRadiusYZPlane", ExactSpelling = false, CallingConvention = CallingConvention.Cdecl)]
        public static extern UInt32 IMC_CrdArcRadiusYZPlane(HANDLETYPE cardHandle, Int16 crdNo, double radius, double[] pEndPos, Int16 dir, double height = 0, Int32 turn = 0, Int32 userID = 0);
        [DllImport(EtherCATConfigApiDllName, EntryPoint = "IMC_CrdArcRadiusZXPlane", ExactSpelling = false, CallingConvention = CallingConvention.Cdecl)]
        public static extern UInt32 IMC_CrdArcRadiusZXPlane(HANDLETYPE cardHandle, Int16 crdNo, double radius, double[] pEndPos, Int16 dir, double height = 0, Int32 turn = 0, Int32 userID = 0);
        //圆心角度编程
        [DllImport(EtherCATConfigApiDllName, EntryPoint = "IMC_CrdArcAngleXYPlane", ExactSpelling = false, CallingConvention = CallingConvention.Cdecl)]
        public static extern UInt32 IMC_CrdArcAngleXYPlane(HANDLETYPE cardHandle, Int16 crdNo, double[] pCenter, double angle, double height = 0, Int32 userID = 0);
        [DllImport(EtherCATConfigApiDllName, EntryPoint = "IMC_CrdArcAngleYZPlane", ExactSpelling = false, CallingConvention = CallingConvention.Cdecl)]
        public static extern UInt32 IMC_CrdArcAngleYZPlane(HANDLETYPE cardHandle, Int16 crdNo, double[] pCenter, double angle, double height = 0, Int32 userID = 0);
        [DllImport(EtherCATConfigApiDllName, EntryPoint = "IMC_CrdArcAngleZXPlane", ExactSpelling = false, CallingConvention = CallingConvention.Cdecl)]
        public static extern UInt32 IMC_CrdArcAngleZXPlane(HANDLETYPE cardHandle, Int16 crdNo, double[] pCenter, double angle, double height = 0, Int32 userID = 0);

        //涡旋线插补
        [DllImport(EtherCATConfigApiDllName, EntryPoint = "IMC_CrdSpiralAngleXYPlane", ExactSpelling = false, CallingConvention = CallingConvention.Cdecl)]
        public static extern UInt32 IMC_CrdSpiralAngleXYPlane(HANDLETYPE cardHandle, Int16 crdNo, double[] pCenter, double angle, double height, double m, Int32 userID);
        [DllImport(EtherCATConfigApiDllName, EntryPoint = "IMC_CrdSpiralAngleYZPlane", ExactSpelling = false, CallingConvention = CallingConvention.Cdecl)]
        public static extern UInt32 IMC_CrdSpiralAngleYZPlane(HANDLETYPE cardHandle, Int16 crdNo, double[] pCenter, double angle, double height, double m, Int32 userID);
        [DllImport(EtherCATConfigApiDllName, EntryPoint = "IMC_CrdSpiralAngleZXPlane", ExactSpelling = false, CallingConvention = CallingConvention.Cdecl)]
        public static extern UInt32 IMC_CrdSpiralAngleZXPlane(HANDLETYPE cardHandle, Int16 crdNo, double[] pCenter, double angle, double height, double m, Int32 userID);


        //椭圆插补
        /*起点作为椭圆的一个顶点,给定圆心,以及另一个顶点到圆心的距离b,给定方向,走整椭圆*/
        [DllImport(EtherCATConfigApiDllName, EntryPoint = "IMC_CrdEllipseFullXYPlane", ExactSpelling = false, CallingConvention = CallingConvention.Cdecl)]
        public static extern UInt32 IMC_CrdEllipseFullXYPlane(HANDLETYPE cardHandle, Int16 crdNo, double[] pCenter, double b, Int16 dir, Int32 userID);
        [DllImport(EtherCATConfigApiDllName, EntryPoint = "IMC_CrdEllipseFullYZPlane", ExactSpelling = false, CallingConvention = CallingConvention.Cdecl)]
        public static extern UInt32 IMC_CrdEllipseFullYZPlane(HANDLETYPE cardHandle, Int16 crdNo, double[] pCenter, double b, Int16 dir, Int32 userID);
        [DllImport(EtherCATConfigApiDllName, EntryPoint = "IMC_CrdEllipseFullZXPlane", ExactSpelling = false, CallingConvention = CallingConvention.Cdecl)]
        public static extern UInt32 IMC_CrdEllipseFullZXPlane(HANDLETYPE cardHandle, Int16 crdNo, double[] pCenter, double b, Int16 dir, Int32 userID);

        //FIFO事件
        [DllImport(EtherCATConfigApiDllName, EntryPoint = "IMC_CrdWaitTime", ExactSpelling = false, CallingConvention = CallingConvention.Cdecl)]
        public static extern UInt32 IMC_CrdWaitTime(HANDLETYPE cardHandle, Int16 crdNo, Int32 waitPeriod, Int32 userID = 0);
        [DllImport(EtherCATConfigApiDllName, EntryPoint = "IMC_CrdWaitDI", ExactSpelling = false, CallingConvention = CallingConvention.Cdecl)]
        public static extern UInt32 IMC_CrdWaitDI(HANDLETYPE cardHandle, Int16 crdNo, Int16 diNO, Int16 diType, Int16 diLevel, Int32 userID = 0);
        [DllImport(EtherCATConfigApiDllName, EntryPoint = "IMC_CrdSetDO", ExactSpelling = false, CallingConvention = CallingConvention.Cdecl)]
        public static extern UInt32 IMC_CrdSetDO(HANDLETYPE cardHandle, Int16 crdNo, Int16 doNO, Int16 doType, Int16 doLevel, Int32 userID = 0);
        [DllImport(EtherCATConfigApiDllName, EntryPoint = "IMC_CrdPTPMove", ExactSpelling = false, CallingConvention = CallingConvention.Cdecl)]
        public static extern UInt32 IMC_CrdPTPMove(HANDLETYPE cardHandle, Int16 crdNo, Int16 axNo, double tgtPos, double tgtVel, double acc, Int16 mvType, Int16 waitFlag, Int32 userID = 0);
        [DllImport(EtherCATConfigApiDllName, EntryPoint = "IMC_CrdSyncMove", ExactSpelling = false, CallingConvention = CallingConvention.Cdecl)]
        public static extern UInt32 IMC_CrdSyncMove(HANDLETYPE cardHandle, Int16 crdNo, Int16 axNo, double syncPos, Int32 userID = 0);

        [DllImport(EtherCATConfigApiDllName, EntryPoint = "IMC_CrdWaitInPos", ExactSpelling = false, CallingConvention = CallingConvention.Cdecl)]
        public static extern UInt32 IMC_CrdWaitInPos(HANDLETYPE cardHandle, Int16 crdNo, Int32 userID = 0);

        [DllImport(EtherCATConfigApiDllName, EntryPoint = "IMC_CrdEndData", ExactSpelling = false, CallingConvention = CallingConvention.Cdecl)]
        public static extern UInt32 IMC_CrdEndData(HANDLETYPE cardHandle, Int16 crdNo, ref Int16 pIsFinished);

        [DllImport(EtherCATConfigApiDllName, EntryPoint = "IMC_CrdStart", ExactSpelling = false, CallingConvention = CallingConvention.Cdecl)]
        public static extern UInt32 IMC_CrdStart(HANDLETYPE cardHandle, Int16 crdNo);
        [DllImport(EtherCATConfigApiDllName, EntryPoint = "IMC_CrdStop", ExactSpelling = false, CallingConvention = CallingConvention.Cdecl)]
        public static extern UInt32 IMC_CrdStop(HANDLETYPE cardHandle, Int16 crdNo, Int16 stopType);
        [DllImport(EtherCATConfigApiDllName, EntryPoint = "IMC_CrdGetStatus", ExactSpelling = false, CallingConvention = CallingConvention.Cdecl)]
        public static extern UInt32 IMC_CrdGetStatus(HANDLETYPE cardHandle, Int16 crdNo, ref Int16 pStatus);
        [DllImport(EtherCATConfigApiDllName, EntryPoint = "IMC_CrdSetRatio", ExactSpelling = false, CallingConvention = CallingConvention.Cdecl)]
        public static extern UInt32 IMC_CrdSetRatio(HANDLETYPE cardHandle, Int16 crdNo, double ratio);
        [DllImport(EtherCATConfigApiDllName, EntryPoint = "IMC_CrdGetRatio", ExactSpelling = false, CallingConvention = CallingConvention.Cdecl)]
        public static extern UInt32 IMC_CrdGetRatio(HANDLETYPE cardHandle, Int16 crdNo, ref double pRatio);
        [DllImport(EtherCATConfigApiDllName, EntryPoint = "IMC_CrdGetPos", ExactSpelling = false, CallingConvention = CallingConvention.Cdecl)]
        public static extern UInt32 IMC_CrdGetPos(HANDLETYPE cardHandle, Int16 crdNo, double[] pCrdPos);
        [DllImport(EtherCATConfigApiDllName, EntryPoint = "IMC_CrdGetVel", ExactSpelling = false, CallingConvention = CallingConvention.Cdecl)]
        public static extern UInt32 IMC_CrdGetVel(HANDLETYPE cardHandle, Int16 crdNo, ref double pCrdVel);
        [DllImport(EtherCATConfigApiDllName, EntryPoint = "IMC_CrdGetUserID", ExactSpelling = false, CallingConvention = CallingConvention.Cdecl)]
        public static extern UInt32 IMC_CrdGetUserID(HANDLETYPE cardHandle, Int16 crdNo, ref Int32 pUserID);
        [DllImport(EtherCATConfigApiDllName, EntryPoint = "IMC_CrdGetSpace", ExactSpelling = false, CallingConvention = CallingConvention.Cdecl)]
        public static extern UInt32 IMC_CrdGetSpace(HANDLETYPE cardHandle, Int16 crdNo, ref Int32 pSpace);
        [DllImport(EtherCATConfigApiDllName, EntryPoint = "IMC_CrdClrData", ExactSpelling = false, CallingConvention = CallingConvention.Cdecl)]
        public static extern UInt32 IMC_CrdClrData(HANDLETYPE cardHandle, Int16 crdNo);
        [DllImport(EtherCATConfigApiDllName, EntryPoint = "IMC_CrdClrError", ExactSpelling = false, CallingConvention = CallingConvention.Cdecl)]
        public static extern UInt32 IMC_CrdClrError(HANDLETYPE cardHandle, Int16 crdNo);
        [DllImport(EtherCATConfigApiDllName, EntryPoint = "IMC_CrdGetTargetPos", ExactSpelling = false, CallingConvention = CallingConvention.Cdecl)]
        public static extern UInt32 IMC_CrdGetTargetPos(HANDLETYPE cardHandle, Int16 crdNo, double[] pPos);
        [DllImport(EtherCATConfigApiDllName, EntryPoint = "IMC_CrdGetPausePos", ExactSpelling = false, CallingConvention = CallingConvention.Cdecl)]
        public static extern UInt32 IMC_CrdGetPausePos(HANDLETYPE cardHandle, Int16 crdNo, double[] pPos);

        [DllImport(EtherCATConfigApiDllName, EntryPoint = "IMC_CrdGetArrivalSts", ExactSpelling = false, CallingConvention = CallingConvention.Cdecl)]
        public static extern UInt32 IMC_CrdGetArrivalSts(HANDLETYPE cardHandle, Int16 crdNo, ref Int16 pSts);

        //多轴直线插补映射建立
        [DllImport(EtherCATConfigApiDllName, EntryPoint = "IMC_SetupMutiSyncSys", ExactSpelling = false, CallingConvention = CallingConvention.Cdecl)]
        public static extern UInt32 IMC_SetupMutiSyncSys(HANDLETYPE cardHandle, Int16 groupNo, Int16[] pMaskAxNo, Int16 maxAxNum);
        //获取多轴直线插补的坐标系信息
        [DllImport(EtherCATConfigApiDllName, EntryPoint = "IMC_GetMutiSyncSysInfo", ExactSpelling = false, CallingConvention = CallingConvention.Cdecl)]
        public static extern UInt32 IMC_GetMutiSyncSysInfo(HANDLETYPE cardHandle, Int16 groupNo, Int16[] pMaskAxNo, ref Int16 pMaxAxNum);
        //删除多轴直线插补映射
        [DllImport(EtherCATConfigApiDllName, EntryPoint = "IMC_DeleteMutiSyncSys", ExactSpelling = false, CallingConvention = CallingConvention.Cdecl)]
        public static extern UInt32 IMC_DeleteMutiSyncSys(HANDLETYPE cardHandle, Int16 groupNo);
        //多轴线段输入
        [DllImport(EtherCATConfigApiDllName, EntryPoint = "IMC_MutiSyncMotion", ExactSpelling = false, CallingConvention = CallingConvention.Cdecl)]
        public static extern UInt32 IMC_MutiSyncMotion(HANDLETYPE cardHandle, Int16 groupNo, double[] pEndPos, short[] pVelRatio, short[] pAccRatio, double blendRatio, Int32 userID);


        [DllImport(EtherCATConfigApiDllName, EntryPoint = "IMC_MutiSyncMotionInRatio", ExactSpelling = false, CallingConvention = CallingConvention.Cdecl)]
        public static extern UInt32 IMC_MutiSyncMotionInRatio(HANDLETYPE cardHandle, Int16 groupNo, double[] pEndPos, short[] pVelRatio, short[] pAccRatio, double blendRatio, Int32 userID);

        // 以各轴的实际速度、加速度参数的形式进行的多轴线段输入
        [DllImport(EtherCATConfigApiDllName, EntryPoint = "IMC_MutiSyncMotionInAxVelAcc", ExactSpelling = false, CallingConvention = CallingConvention.Cdecl)]
        public static extern UInt32 IMC_MutiSyncMotionInAxVelAcc(HANDLETYPE cardHandle, Int16 groupNo, double[] pEndPos, double[] pTrajVel, double[] pTrajAcc, double[] pTrajdec, double blendRatio, Int32 userID);

        // 以所有轴的合成速度、加速度的参数形式进行的多轴线段输入
        [DllImport(EtherCATConfigApiDllName, EntryPoint = "IMC_MutiSyncMotionInSynVelAcc", ExactSpelling = false, CallingConvention = CallingConvention.Cdecl)]
        public static extern UInt32 IMC_MutiSyncMotionInSynVelAcc(HANDLETYPE cardHandle, Int16 groupNo, double[] pEndPos, double trajVel, double trajAcc, double trajdec, double blendRatio, Int32 userID);


        //多轴插补启停
        [DllImport(EtherCATConfigApiDllName, EntryPoint = "IMC_MutiSyncStart", ExactSpelling = false, CallingConvention = CallingConvention.Cdecl)]
        public static extern UInt32 IMC_MutiSyncStart(HANDLETYPE cardHandle, Int16 groupNo);
        [DllImport(EtherCATConfigApiDllName, EntryPoint = "IMC_MutiSyncStop", ExactSpelling = false, CallingConvention = CallingConvention.Cdecl)]
        public static extern UInt32 IMC_MutiSyncStop(HANDLETYPE cardHandle, Int16 groupNo, Int16 stopType);
        //多轴插补状态获取
        [DllImport(EtherCATConfigApiDllName, EntryPoint = "IMC_MutiSyncGetStatus", ExactSpelling = false, CallingConvention = CallingConvention.Cdecl)]
        public static extern UInt32 IMC_MutiSyncGetStatus(HANDLETYPE cardHandle, Int16 groupNo, ref Int16 pStatus);
        //多轴插补倍率读写
        [DllImport(EtherCATConfigApiDllName, EntryPoint = "IMC_MutiSyncSetRatio", ExactSpelling = false, CallingConvention = CallingConvention.Cdecl)]
        public static extern UInt32 IMC_MutiSyncSetRatio(HANDLETYPE cardHandle, Int16 groupNo, double ratio);
        [DllImport(EtherCATConfigApiDllName, EntryPoint = "IMC_MutiSyncGetRatio", ExactSpelling = false, CallingConvention = CallingConvention.Cdecl)]
        public static extern UInt32 IMC_MutiSyncGetRatio(HANDLETYPE cardHandle, Int16 groupNo, ref double pRatio);
        //多轴插补用户ID读取
        [DllImport(EtherCATConfigApiDllName, EntryPoint = "IMC_MutiSyncGetUserID", ExactSpelling = false, CallingConvention = CallingConvention.Cdecl)]
        public static extern UInt32 IMC_MutiSyncGetUserID(HANDLETYPE cardHandle, Int16 groupNo, ref Int32 pUserID);
        //获取多轴插补空间余量
        [DllImport(EtherCATConfigApiDllName, EntryPoint = "IMC_MutiSyncGetSpace", ExactSpelling = false, CallingConvention = CallingConvention.Cdecl)]
        public static extern UInt32 IMC_MutiSyncGetSpace(HANDLETYPE cardHandle, Int16 groupNo, ref Int32 pSpace);
        //清除多轴插补缓存区数据
        [DllImport(EtherCATConfigApiDllName, EntryPoint = "IMC_MutiSyncClrData", ExactSpelling = false, CallingConvention = CallingConvention.Cdecl)]
        public static extern UInt32 IMC_MutiSyncClrData(HANDLETYPE cardHandle, Int16 groupNo);
        //多轴插补故障清除
        [DllImport(EtherCATConfigApiDllName, EntryPoint = "IMC_MutiSyncClrError", ExactSpelling = false, CallingConvention = CallingConvention.Cdecl)]
        public static extern UInt32 IMC_MutiSyncClrError(HANDLETYPE cardHandle, Int16 groupNo);
        //多轴插补编程模式设定
        [DllImport(EtherCATConfigApiDllName, EntryPoint = "IMC_MutiSyncSetType", ExactSpelling = false, CallingConvention = CallingConvention.Cdecl)]
        public static extern UInt32 IMC_MutiSyncSetType(HANDLETYPE cardHandle, Int16 groupNo, Int16 type);
        //多轴插补编程模式读取
        [DllImport(EtherCATConfigApiDllName, EntryPoint = "IMC_MutiSyncGetType", ExactSpelling = false, CallingConvention = CallingConvention.Cdecl)]
        public static extern UInt32 IMC_MutiSyncGetType(HANDLETYPE cardHandle, Int16 groupNo, ref Int16 type);


        //[DllImport(EtherCATConfigApiDllName, EntryPoint = "IMC_CrdSetSmoothParam", ExactSpelling = false, CallingConvention = CallingConvention.Cdecl)]
        //public static extern UInt32 IMC_CrdSetSmoothParam(HANDLETYPE cardHandle, Int16 crdNo, Int32 smoothLevel, double smoothTol);
        //[DllImport(EtherCATConfigApiDllName, EntryPoint = "IMC_CrdGetSmoothParam", ExactSpelling = false, CallingConvention = CallingConvention.Cdecl)]
        //public static extern UInt32 IMC_CrdGetSmoothParam(HANDLETYPE cardHandle, Int16 crdNo, ref Int32 pSmoothLevel, ref double pSmoothTol);
        [DllImport(EtherCATConfigApiDllName, EntryPoint = "IMC_CrdGetFifoEmpty", ExactSpelling = false, CallingConvention = CallingConvention.Cdecl)]
        public static extern UInt32 IMC_CrdGetFifoEmpty(HANDLETYPE cardHandle, Int16 crdNo, ref Int16 pEmpty);

        [DllImport(EtherCATConfigApiDllName, EntryPoint = "IMC_PTPCAddFixTData", ExactSpelling = false, CallingConvention = CallingConvention.Cdecl)]
        public static extern UInt32 IMC_PTPCAddFixTData(HANDLETYPE cardHandle, Int16 axNo, double tgtPos, double acc, double dec, double T, double finalVel, Int16 posType);
        [DllImport(EtherCATConfigApiDllName, EntryPoint = "IMC_PTPCAddFixVmData", ExactSpelling = false, CallingConvention = CallingConvention.Cdecl)]
        public static extern UInt32 IMC_PTPCAddFixVmData(HANDLETYPE cardHandle, Int16 axNo, double tgtPos, double acc, double dec, double tgtVel, double finalVel, Int16 posType);
        [DllImport(EtherCATConfigApiDllName, EntryPoint = "IMC_PTPCInterruptData", ExactSpelling = false, CallingConvention = CallingConvention.Cdecl)]
        public static extern UInt32 IMC_PTPCInterruptData(HANDLETYPE cardHandle, Int16 axNo, double tgtPos, double acc, double dec, double tgtVel, double finalVel, Int16 posType);
        [DllImport(EtherCATConfigApiDllName, EntryPoint = "IMC_PTPCStart", ExactSpelling = false, CallingConvention = CallingConvention.Cdecl)]
        public static extern UInt32 IMC_PTPCStart(HANDLETYPE cardHandle, Int16 axNo);
        [DllImport(EtherCATConfigApiDllName, EntryPoint = "IMC_PTPCGetSpace", ExactSpelling = false, CallingConvention = CallingConvention.Cdecl)]
        public static extern UInt32 IMC_PTPCGetSpace(HANDLETYPE cardHandle, Int16 axNo, ref Int32 pSpace);
        [DllImport(EtherCATConfigApiDllName, EntryPoint = "IMC_PTPCClrData", ExactSpelling = false, CallingConvention = CallingConvention.Cdecl)]
        public static extern UInt32 IMC_PTPCClrData(HANDLETYPE cardHandle, Int16 axNo);


        //[DllImport(EtherCATConfigApiDllName, EntryPoint = "IMC_GetEcatPtVal", ExactSpelling = false, CallingConvention = CallingConvention.Cdecl)]
        //public static extern UInt32 IMC_GetEcatPtVal(HANDLETYPE cardHandle, Int16 ptNo, ref double pValue);

        /*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/
        /*----7.8 多轴插补立即运动模式接口                                   ---*/
        /*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/
        [DllImport(EtherCATConfigApiDllName, EntryPoint = "IMC_ImmediateLineMoveInSynVelAcc", ExactSpelling = false, CallingConvention = CallingConvention.Cdecl)]
        public static extern UInt32 IMC_ImmediateLineMoveInSynVelAcc(HANDLETYPE cardHandle, Int16[] pMaskAxNo, Int16 axNum, double[] pEndPos, double trajVel, double trajAcc, double trajDec, double smoothCoef, Int16 type);
        [DllImport(EtherCATConfigApiDllName, EntryPoint = "IMC_ImmediateLineMoveInAxisVelAcc", ExactSpelling = false, CallingConvention = CallingConvention.Cdecl)]
        public static extern UInt32 IMC_ImmediateLineMoveInAxisVelAcc(HANDLETYPE cardHandle, Int16[] pMaskAxNo, Int16 axNum, double[] pEndPos, ref double pAxVel, ref double pAxAcc, ref double pAxDec, double smoothCoef, Int16 type);
        [DllImport(EtherCATConfigApiDllName, EntryPoint = "IMC_ImmediateArcThreePointMove", ExactSpelling = false, CallingConvention = CallingConvention.Cdecl)]
        public static extern UInt32 IMC_ImmediateArcThreePointMove(HANDLETYPE cardHandle, Int16[] pMaskAxNo, Int16 axNum, double[] pMidPos, double[] pEndPos, double trajVel, double trajAcc, double trajDec, double smoothCoef, Int16 type);
        [DllImport(EtherCATConfigApiDllName, EntryPoint = "IMC_ImmediateArcCenterMove", ExactSpelling = false, CallingConvention = CallingConvention.Cdecl)]
        public static extern UInt32 IMC_ImmediateArcCenterMove(HANDLETYPE cardHandle, Int16[] pMaskAxNo, Int16 axNum, double[] pCenter, double[] pEndPos, Int16 dir, double height, int turn, double trajVel, double trajAcc, double trajDec, double smoothCoef, Int16 type);
        [DllImport(EtherCATConfigApiDllName, EntryPoint = "IMC_ImmediateArcRadiusMove", ExactSpelling = false, CallingConvention = CallingConvention.Cdecl)]
        public static extern UInt32 IMC_ImmediateArcRadiusMove(HANDLETYPE cardHandle, Int16[] pMaskAxNo, Int16 axNum, double radius, double[] pEndPos, Int16 dir, double height, int turn, double trajVel, double trajAcc, double trajDec, double smoothCoef, Int16 type);
        [DllImport(EtherCATConfigApiDllName, EntryPoint = "IMC_ImmediateArcAngleMove", ExactSpelling = false, CallingConvention = CallingConvention.Cdecl)]
        public static extern UInt32 IMC_ImmediateArcAngleMove(HANDLETYPE cardHandle, Int16[] pMaskAxNo, Int16 axNum, double[] pCenter, double angle, double height, double trajVel, double trajAcc, double trajDec, double smoothCoef);
        [DllImport(EtherCATConfigApiDllName, EntryPoint = "IMC_ImmediateMoveGetVel", ExactSpelling = false, CallingConvention = CallingConvention.Cdecl)]
        public static extern UInt32 IMC_ImmediateMoveGetVel(HANDLETYPE cardHandle, Int16 axNo, ref double pTrajVel);
        [DllImport(EtherCATConfigApiDllName, EntryPoint = "IMC_ImmediateMoveStop", ExactSpelling = false, CallingConvention = CallingConvention.Cdecl)]
        public static extern UInt32 IMC_ImmediateMoveStop(HANDLETYPE cardHandle, Int16 axNo);
        [DllImport(EtherCATConfigApiDllName, EntryPoint = "IMC_ImmediateMoveEStop", ExactSpelling = false, CallingConvention = CallingConvention.Cdecl)]
        public static extern UInt32 IMC_ImmediateMoveEStop(HANDLETYPE cardHandle, Int16 axNo, double estopDec);


        /*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/
        /*----8.0 事件管理                                             ---*/
        /*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/
        //_DLL_API UINT32 IMC_SetEventIO(UINT64 cardHandle,INT16 group,TEventIO *pEventIOPara);
        //_DLL_API UINT32 IMC_GetEventIO(UINT64 cardHandle,INT16 group,TEventIO *pEventIOPara);
        //_DLL_API UINT32 IMC_EnableEventIO(UINT64 cardHandle,INT16 group);
        //_DLL_API UINT32 IMC_DisableEventIO(UINT64 cardHandle,INT16 group);

        //_DLL_API UINT32 IMC_SetEventDiMotion(UINT64 cardHandle,INT16 group,TEventDiMotion *pEventDiMotionPara);
        //_DLL_API UINT32 IMC_GetEventDiMotion(UINT64 cardHandle,INT16 group,TEventDiMotion *pEventDiMotionPara);
        //_DLL_API UINT32 IMC_EnableEventDiMotion(UINT64 cardHandle,INT16 group);
        //_DLL_API UINT32 IMC_DisableEventDiMotion(UINT64 cardHandle,INT16 group);
        //_DLL_API UINT32 IMC_GetEventDiMotionSts(UINT64 cardHandle,INT16 group,INT16 *pSts);
        //_DLL_API UINT32 IMC_ClearEventDiMotionSts(UINT64 cardHandle,INT16 group);

        //_DLL_API UINT32 IMC_SetEventCompareOut(UINT64 cardHandle,INT16 group,TEventCompareOut *pEventCompareOutPara);
        //_DLL_API UINT32 IMC_GetEventCompareOut(UINT64 cardHandle,INT16 group,TEventCompareOut *pEventCompareOutPara);
        //_DLL_API UINT32 IMC_EnableEventCompareOut(UINT64 cardHandle,INT16 group);
        //_DLL_API UINT32 IMC_DisableEventCompareOut(UINT64 cardHandle,INT16 group);

        //_DLL_API UINT32 IMC_SetEventVirtualIOVal(UINT64 cardHandle,INT16 port,INT16 val);
        //_DLL_API UINT32 IMC_GetEventVirtualIOVal(UINT64 cardHandle,INT16 port,INT16 *pVal);
        //_DLL_API UINT32 IMC_GetEventVirtualIOUseSts(UINT64 cardHandle,INT16 port,INT16 *pSts);

        [DllImport(EtherCATConfigApiDllName, EntryPoint = "IMC_SetEventIO", ExactSpelling = false, CallingConvention = CallingConvention.Cdecl)]
        public static extern UInt32 IMC_SetEventIO(HANDLETYPE cardHandle, Int16 group, ref TEventIO pEventIOPara);
        [DllImport(EtherCATConfigApiDllName, EntryPoint = "IMC_GetEventIO", ExactSpelling = false, CallingConvention = CallingConvention.Cdecl)]
        public static extern UInt32 IMC_GetEventIO(HANDLETYPE cardHandle, Int16 group, ref TEventIO pEventIOPara);
        [DllImport(EtherCATConfigApiDllName, EntryPoint = "IMC_EnableEventIO", ExactSpelling = false, CallingConvention = CallingConvention.Cdecl)]
        public static extern UInt32 IMC_EnableEventIO(HANDLETYPE cardHandle, Int16 group);
        [DllImport(EtherCATConfigApiDllName, EntryPoint = "IMC_DisableEventIO", ExactSpelling = false, CallingConvention = CallingConvention.Cdecl)]
        public static extern UInt32 IMC_DisableEventIO(HANDLETYPE cardHandle, Int16 group);


        [DllImport(EtherCATConfigApiDllName, EntryPoint = "IMC_GetEventIOEnSts", ExactSpelling = false, CallingConvention = CallingConvention.Cdecl)]
        public static extern UInt32 IMC_GetEventIOEnSts(HANDLETYPE cardHandle, Int16 group, ref Int16 enSts);



        [DllImport(EtherCATConfigApiDllName, EntryPoint = "IMC_SetEventDiMotion", ExactSpelling = false, CallingConvention = CallingConvention.Cdecl)]
        public static extern UInt32 IMC_SetEventDiMotion(HANDLETYPE cardHandle, Int16 group, ref TEventDiMotion pEventDiMotionPara);
        [DllImport(EtherCATConfigApiDllName, EntryPoint = "IMC_GetEventDiMotion", ExactSpelling = false, CallingConvention = CallingConvention.Cdecl)]
        public static extern UInt32 IMC_GetEventDiMotion(HANDLETYPE cardHandle, Int16 group, ref TEventDiMotion pEventDiMotionPara);
        [DllImport(EtherCATConfigApiDllName, EntryPoint = "IMC_EnableEventDiMotion", ExactSpelling = false, CallingConvention = CallingConvention.Cdecl)]
        public static extern UInt32 IMC_EnableEventDiMotion(HANDLETYPE cardHandle, Int16 group);
        [DllImport(EtherCATConfigApiDllName, EntryPoint = "IMC_DisableEventDiMotion", ExactSpelling = false, CallingConvention = CallingConvention.Cdecl)]
        public static extern UInt32 IMC_DisableEventDiMotion(HANDLETYPE cardHandle, Int16 group);
        [DllImport(EtherCATConfigApiDllName, EntryPoint = "IMC_GetEventDiMotionSts", ExactSpelling = false, CallingConvention = CallingConvention.Cdecl)]
        public static extern UInt32 IMC_GetEventDiMotionSts(HANDLETYPE cardHandle, Int16 group, ref Int16 pSts);
        [DllImport(EtherCATConfigApiDllName, EntryPoint = "IMC_ClearEventDiMotionSts", ExactSpelling = false, CallingConvention = CallingConvention.Cdecl)]
        public static extern UInt32 IMC_ClearEventDiMotionSts(HANDLETYPE cardHandle, Int16 group);


        [DllImport(EtherCATConfigApiDllName, EntryPoint = "IMC_ClearEventDiMotionSts", ExactSpelling = false, CallingConvention = CallingConvention.Cdecl)]
        public static extern UInt32 IMC_GetEventDiMotionEnSts(HANDLETYPE cardHandle, Int16 group, ref Int16 enSts);


        [DllImport(EtherCATConfigApiDllName, EntryPoint = "IMC_SetEventCompareOut", ExactSpelling = false, CallingConvention = CallingConvention.Cdecl)]
        public static extern UInt32 IMC_SetEventCompareOut(HANDLETYPE cardHandle, Int16 group, ref TEventCompareOut pEventCompareOutPara);
        [DllImport(EtherCATConfigApiDllName, EntryPoint = "IMC_GetEventCompareOut", ExactSpelling = false, CallingConvention = CallingConvention.Cdecl)]
        public static extern UInt32 IMC_GetEventCompareOut(HANDLETYPE cardHandle, Int16 group, ref TEventCompareOut pEventCompareOutPara);
        [DllImport(EtherCATConfigApiDllName, EntryPoint = "IMC_EnableEventCompareOut", ExactSpelling = false, CallingConvention = CallingConvention.Cdecl)]
        public static extern UInt32 IMC_EnableEventCompareOut(HANDLETYPE cardHandle, Int16 group);
        [DllImport(EtherCATConfigApiDllName, EntryPoint = "IMC_DisableEventCompareOut", ExactSpelling = false, CallingConvention = CallingConvention.Cdecl)]
        public static extern UInt32 IMC_DisableEventCompareOut(HANDLETYPE cardHandle, Int16 group);


        [DllImport(EtherCATConfigApiDllName, EntryPoint = "IMC_DisableEventCompareOut", ExactSpelling = false, CallingConvention = CallingConvention.Cdecl)]
        public static extern UInt32 IMC_GetEventCompareOutEnSts(HANDLETYPE cardHandle, Int16 group, ref Int16 enSts);




        [DllImport(EtherCATConfigApiDllName, EntryPoint = "IMC_SetEventVirtualIOVal", ExactSpelling = false, CallingConvention = CallingConvention.Cdecl)]
        public static extern UInt32 IMC_SetEventVirtualIOVal(HANDLETYPE cardHandle, Int16 port, Int16 val);
        [DllImport(EtherCATConfigApiDllName, EntryPoint = "IMC_GetEventVirtualIOVal", ExactSpelling = false, CallingConvention = CallingConvention.Cdecl)]
        public static extern UInt32 IMC_GetEventVirtualIOVal(HANDLETYPE cardHandle, Int16 port, ref Int16 pVal);
        [DllImport(EtherCATConfigApiDllName, EntryPoint = "IMC_GetEventVirtualIOUseSts", ExactSpelling = false, CallingConvention = CallingConvention.Cdecl)]
        public static extern UInt32 IMC_GetEventVirtualIOUseSts(HANDLETYPE cardHandle, Int16 port, ref Int16 pSts);

        #endregion
    }
}