19 #if defined(_WIN32) || defined(LABVIEW64_IMPORT) || defined(LABVIEW32_IMPORT) || defined(MATLAB_IMPORT)
20 #define XIMC_API __stdcall
22 #ifdef LIBXIMC_EXPORTS
23 #define XIMC_API __attribute__((visibility("default")))
33 #if defined(_WIN32) || defined(LABVIEW64_IMPORT) || defined(LABVIEW32_IMPORT) || defined(MATLAB_IMPORT)
34 #define XIMC_CALLCONV __stdcall
43 #if defined(_WIN32) || defined(LABVIEW64_IMPORT) || defined(LABVIEW32_IMPORT) || defined(MATLAB_IMPORT)
44 #define XIMC_RETTYPE unsigned int
46 #define XIMC_RETTYPE void*
50 #if !defined(XIMC_NO_STDINT)
52 #if (defined(_MSC_VER) || defined(LABVIEW64_IMPORT) || defined(LABVIEW32_IMPORT)) && !defined(MATLAB_IMPORT)
54 typedef __int8 int8_t;
55 typedef __int16 int16_t;
56 typedef __int32 int32_t;
57 typedef __int64 int64_t;
58 typedef unsigned __int8 uint8_t;
59 typedef unsigned __int16 uint16_t;
60 typedef unsigned __int32 uint32_t;
61 typedef unsigned __int64 uint64_t;
67 #if defined(LABVIEW64_IMPORT) || defined(LABVIEW32_IMPORT)
68 typedef unsigned __int64 ulong_t;
69 typedef __int64 long_t;
71 typedef unsigned long long ulong_t;
72 typedef long long long_t;
79 #if defined(__cplusplus)
113 #if defined(_WIN64) || defined(__LP64__) || defined(LABVIEW64_IMPORT)
128 #define device_undefined -1
157 #define result_error -1
167 #define result_not_implemented -2
177 #define result_value_error -3
187 #define result_nodevice -4
208 #define LOGLEVEL_ERROR 0x01
217 #define LOGLEVEL_WARNING 0x02
226 #define LOGLEVEL_INFO 0x03
235 #define LOGLEVEL_DEBUG 0x04
272 #define LIBXIMC_VERSION 2.8.9
277 #define LIBXIMC_PROTOCOL_VERSION 16.11
296 #define ENUMERATE_PROBE 0x01
297 #define ENUMERATE_ALL_COM 0x02
298 #define ENUMERATE_NETWORK 0x04
317 #define MOVE_STATE_MOVING 0x01
318 #define MOVE_STATE_TARGET_SPEED 0x02
319 #define MOVE_STATE_ANTIPLAY 0x04
336 #define EEPROM_PRECEDENCE 0x01
355 #define PWR_STATE_UNKNOWN 0x00
356 #define PWR_STATE_OFF 0x01
357 #define PWR_STATE_NORM 0x03
358 #define PWR_STATE_REDUCT 0x04
359 #define PWR_STATE_MAX 0x05
380 #define STATE_CONTR 0x0003F
381 #define STATE_ERRC 0x00001
382 #define STATE_ERRD 0x00002
383 #define STATE_ERRV 0x00004
384 #define STATE_EEPROM_CONNECTED 0x00010
385 #define STATE_IS_HOMED 0x00020
386 #define STATE_SECUR 0x3FFC0
387 #define STATE_ALARM 0x00040
388 #define STATE_CTP_ERROR 0x00080
389 #define STATE_POWER_OVERHEAT 0x00100
390 #define STATE_CONTROLLER_OVERHEAT 0x00200
391 #define STATE_OVERLOAD_POWER_VOLTAGE 0x00400
392 #define STATE_OVERLOAD_POWER_CURRENT 0x00800
393 #define STATE_OVERLOAD_USB_VOLTAGE 0x01000
394 #define STATE_LOW_USB_VOLTAGE 0x02000
395 #define STATE_OVERLOAD_USB_CURRENT 0x04000
396 #define STATE_BORDERS_SWAP_MISSET 0x08000
397 #define STATE_LOW_POWER_VOLTAGE 0x10000
398 #define STATE_H_BRIDGE_FAULT 0x20000
419 #define STATE_DIG_SIGNAL 0xFFFF
420 #define STATE_RIGHT_EDGE 0x0001
421 #define STATE_LEFT_EDGE 0x0002
422 #define STATE_BUTTON_RIGHT 0x0004
423 #define STATE_BUTTON_LEFT 0x0008
424 #define STATE_GPIO_PINOUT 0x0010
425 #define STATE_GPIO_LEVEL 0x0020
426 #define STATE_HALL_A 0x0040
427 #define STATE_HALL_B 0x0080
428 #define STATE_HALL_C 0x0100
429 #define STATE_BRAKE 0x0200
430 #define STATE_REV_SENSOR 0x0400
431 #define STATE_SYNC_INPUT 0x0800
432 #define STATE_SYNC_OUTPUT 0x1000
433 #define STATE_ENC_A 0x2000
434 #define STATE_ENC_B 0x4000
453 #define ENC_STATE_ABSENT 0x00
454 #define ENC_STATE_UNKNOWN 0x01
455 #define ENC_STATE_MALFUNC 0x02
456 #define ENC_STATE_REVERS 0x03
457 #define ENC_STATE_OK 0x04
476 #define WIND_A_STATE_ABSENT 0x00
477 #define WIND_A_STATE_UNKNOWN 0x01
478 #define WIND_A_STATE_MALFUNC 0x02
479 #define WIND_A_STATE_OK 0x03
480 #define WIND_B_STATE_ABSENT 0x00
481 #define WIND_B_STATE_UNKNOWN 0x10
482 #define WIND_B_STATE_MALFUNC 0x20
483 #define WIND_B_STATE_OK 0x30
504 #define MVCMD_NAME_BITS 0x3F
505 #define MVCMD_UKNWN 0x00
506 #define MVCMD_MOVE 0x01
507 #define MVCMD_MOVR 0x02
508 #define MVCMD_LEFT 0x03
509 #define MVCMD_RIGHT 0x04
510 #define MVCMD_STOP 0x05
511 #define MVCMD_HOME 0x06
512 #define MVCMD_LOFT 0x07
513 #define MVCMD_SSTP 0x08
514 #define MVCMD_ERROR 0x40
515 #define MVCMD_RUNNING 0x80
537 #define ENGINE_REVERSE 0x01
538 #define ENGINE_MAX_SPEED 0x04
539 #define ENGINE_ANTIPLAY 0x08
540 #define ENGINE_ACCEL_ON 0x10
541 #define ENGINE_LIMIT_VOLT 0x20
542 #define ENGINE_LIMIT_CURR 0x40
543 #define ENGINE_LIMIT_RPM 0x80
565 #define MICROSTEP_MODE_FULL 0x01
566 #define MICROSTEP_MODE_FRAC_2 0x02
567 #define MICROSTEP_MODE_FRAC_4 0x03
568 #define MICROSTEP_MODE_FRAC_8 0x04
569 #define MICROSTEP_MODE_FRAC_16 0x05
570 #define MICROSTEP_MODE_FRAC_32 0x06
571 #define MICROSTEP_MODE_FRAC_64 0x07
572 #define MICROSTEP_MODE_FRAC_128 0x08
573 #define MICROSTEP_MODE_FRAC_256 0x09
595 #define ENGINE_TYPE_NONE 0x00
596 #define ENGINE_TYPE_DC 0x01
597 #define ENGINE_TYPE_2DC 0x02
598 #define ENGINE_TYPE_STEP 0x03
599 #define ENGINE_TYPE_TEST 0x04
600 #define ENGINE_TYPE_BRUSHLESS 0x05
622 #define DRIVER_TYPE_DISCRETE_FET 0x01
623 #define DRIVER_TYPE_INTEGRATE 0x02
624 #define DRIVER_TYPE_EXTERNAL 0x03
644 #define POWER_REDUCT_ENABLED 0x01
645 #define POWER_OFF_ENABLED 0x02
646 #define POWER_SMOOTH_CURRENT 0x04
666 #define ALARM_ON_DRIVER_OVERHEATING 0x01
667 #define LOW_UPWR_PROTECTION 0x02
668 #define H_BRIDGE_ALERT 0x04
669 #define ALARM_ON_BORDERS_SWAP_MISSET 0x08
670 #define ALARM_FLAGS_STICKING 0x10
671 #define USB_BREAK_RECONNECT 0x20
690 #define SETPOS_IGNORE_POSITION 0x01
691 #define SETPOS_IGNORE_ENCODER 0x02
708 #define FEEDBACK_ENCODER 0x01
709 #define FEEDBACK_ENCODERHALL 0x03
710 #define FEEDBACK_EMF 0x04
711 #define FEEDBACK_NONE 0x05
728 #define FEEDBACK_ENC_REVERSE 0x01
729 #define FEEDBACK_HALL_REVERSE 0x02
747 #define SYNCIN_ENABLED 0x01
748 #define SYNCIN_INVERT 0x02
749 #define SYNCIN_GOTOPOSITION 0x04
767 #define SYNCOUT_ENABLED 0x01
768 #define SYNCOUT_STATE 0x02
769 #define SYNCOUT_INVERT 0x04
770 #define SYNCOUT_IN_STEPS 0x08
771 #define SYNCOUT_ONSTART 0x10
772 #define SYNCOUT_ONSTOP 0x20
773 #define SYNCOUT_ONPERIOD 0x40
791 #define EXTIO_SETUP_OUTPUT 0x01
792 #define EXTIO_SETUP_INVERT 0x02
810 #define EXTIO_SETUP_MODE_IN_BITS 0x0F
811 #define EXTIO_SETUP_MODE_IN_NOP 0x00
812 #define EXTIO_SETUP_MODE_IN_STOP 0x01
813 #define EXTIO_SETUP_MODE_IN_PWOF 0x02
814 #define EXTIO_SETUP_MODE_IN_MOVR 0x03
815 #define EXTIO_SETUP_MODE_IN_HOME 0x04
816 #define EXTIO_SETUP_MODE_IN_ALARM 0x05
817 #define EXTIO_SETUP_MODE_OUT_BITS 0xF0
818 #define EXTIO_SETUP_MODE_OUT_OFF 0x00
819 #define EXTIO_SETUP_MODE_OUT_ON 0x10
820 #define EXTIO_SETUP_MODE_OUT_MOVING 0x20
821 #define EXTIO_SETUP_MODE_OUT_ALARM 0x30
822 #define EXTIO_SETUP_MODE_OUT_MOTOR_ON 0x40
823 #define EXTIO_SETUP_MODE_OUT_MOTOR_FOUND 0x50
844 #define BORDER_IS_ENCODER 0x01
845 #define BORDER_STOP_LEFT 0x02
846 #define BORDER_STOP_RIGHT 0x04
847 #define BORDERS_SWAP_MISSET_DETECTION 0x08
868 #define ENDER_SWAP 0x01
869 #define ENDER_SW1_ACTIVE_LOW 0x02
870 #define ENDER_SW2_ACTIVE_LOW 0x04
891 #define BRAKE_ENABLED 0x01
892 #define BRAKE_ENG_PWROFF 0x02
913 #define CONTROL_MODE_BITS 0x03
914 #define CONTROL_MODE_OFF 0x00
915 #define CONTROL_MODE_JOY 0x01
916 #define CONTROL_MODE_LR 0x02
917 #define CONTROL_BTN_LEFT_PUSHED_OPEN 0x04
918 #define CONTROL_BTN_RIGHT_PUSHED_OPEN 0x08
937 #define JOY_REVERSE 0x01
958 #define CTP_ENABLED 0x01
959 #define CTP_BASE 0x02
960 #define CTP_ALARM_ON_ERROR 0x04
961 #define REV_SENS_INV 0x08
962 #define CTP_ERROR_CORRECTION 0x10
984 #define HOME_DIR_FIRST 0x01
985 #define HOME_DIR_SECOND 0x02
986 #define HOME_MV_SEC_EN 0x04
987 #define HOME_HALF_MV 0x08
988 #define HOME_STOP_FIRST_BITS 0x30
989 #define HOME_STOP_FIRST_REV 0x10
990 #define HOME_STOP_FIRST_SYN 0x20
991 #define HOME_STOP_FIRST_LIM 0x30
992 #define HOME_STOP_SECOND_BITS 0xC0
993 #define HOME_STOP_SECOND_REV 0x40
994 #define HOME_STOP_SECOND_SYN 0x80
995 #define HOME_STOP_SECOND_LIM 0xC0
1010 #define UART_PARITY_BITS 0x03
1011 #define UART_PARITY_BIT_EVEN 0x00
1012 #define UART_PARITY_BIT_ODD 0x01
1013 #define UART_PARITY_BIT_SPACE 0x02
1014 #define UART_PARITY_BIT_MARK 0x03
1015 #define UART_PARITY_BIT_USE 0x04
1016 #define UART_STOP_BIT 0x08
1031 #define MOTOR_TYPE_UNKNOWN 0x00
1032 #define MOTOR_TYPE_STEP 0x01
1033 #define MOTOR_TYPE_DC 0x02
1034 #define MOTOR_TYPE_BLDC 0x03
1049 #define ENCSET_DIFFERENTIAL_OUTPUT 0x001
1050 #define ENCSET_PUSHPULL_OUTPUT 0x004
1051 #define ENCSET_INDEXCHANNEL_PRESENT 0x010
1052 #define ENCSET_REVOLUTIONSENSOR_PRESENT 0x040
1053 #define ENCSET_REVOLUTIONSENSOR_ACTIVE_HIGH 0x100
1068 #define MB_AVAILABLE 0x01
1069 #define MB_POWERED_HOLD 0x02
1084 #define TS_TYPE_BITS 0x07
1085 #define TS_TYPE_UNKNOWN 0x00
1086 #define TS_TYPE_THERMOCOUPLE 0x01
1087 #define TS_TYPE_SEMICONDUCTOR 0x02
1088 #define TS_AVAILABLE 0x08
1103 #define LS_ON_SW1_AVAILABLE 0x01
1104 #define LS_ON_SW2_AVAILABLE 0x02
1105 #define LS_SW1_ACTIVE_LOW 0x04
1106 #define LS_SW2_ACTIVE_LOW 0x08
1107 #define LS_SHORTED 0x10
1509 unsigned int MaxSpeed[10];
1510 unsigned int uMaxSpeed[10];
1511 unsigned int Timeout[9];
1521 unsigned int Timeout[9];
1634 char ControllerName[17];
1812 char Manufacturer[5];
1813 char ManufacturerId[3];
1814 char ProductDescription[9];
1838 unsigned int Key[32];
1886 unsigned int deprecated;
1904 unsigned int DebugData[128];
1920 unsigned int DebugData[128];
1934 char PositionerName[17];
1950 char Manufacturer[17];
1951 char PartNumber[25];
1991 char Manufacturer[17];
1992 char PartNumber[25];
2046 char Manufacturer[17];
2047 char PartNumber[25];
2084 char Manufacturer[17];
2085 char PartNumber[25];
2121 char Manufacturer[17];
2122 char PartNumber[25];
2160 char MagneticBrakeInfo[25];
2165 char TemperatureSensorInfo[25];
2186 unsigned int key[16];
3059 result_t
XIMC_API command_move_calb (device_t
id,
float Position,
const calibration_t* calibration);
3084 result_t
XIMC_API command_movr_calb (device_t
id,
float DeltaPosition,
const calibration_t* calibration);
4236 #if !defined(MATLAB_IMPORT) && !defined(LABVIEW64_IMPORT) && !defined(LABVIEW32_IMPORT)
4393 #if defined(__cplusplus)