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) && (_MSC_VER < 1600)) || 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.9.8
277 #define LIBXIMC_PROTOCOL_VERSION 17.2
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
399 #define STATE_CURRENT_MOTOR_BITS 0xC0000
400 #define STATE_CURRENT_MOTOR0 0x00000
401 #define STATE_CURRENT_MOTOR1 0x40000
402 #define STATE_CURRENT_MOTOR2 0x80000
403 #define STATE_CURRENT_MOTOR3 0xC0000
424 #define STATE_DIG_SIGNAL 0xFFFF
425 #define STATE_RIGHT_EDGE 0x0001
426 #define STATE_LEFT_EDGE 0x0002
427 #define STATE_BUTTON_RIGHT 0x0004
428 #define STATE_BUTTON_LEFT 0x0008
429 #define STATE_GPIO_PINOUT 0x0010
430 #define STATE_GPIO_LEVEL 0x0020
431 #define STATE_HALL_A 0x0040
432 #define STATE_HALL_B 0x0080
433 #define STATE_HALL_C 0x0100
434 #define STATE_BRAKE 0x0200
435 #define STATE_REV_SENSOR 0x0400
436 #define STATE_SYNC_INPUT 0x0800
437 #define STATE_SYNC_OUTPUT 0x1000
438 #define STATE_ENC_A 0x2000
439 #define STATE_ENC_B 0x4000
458 #define ENC_STATE_ABSENT 0x00
459 #define ENC_STATE_UNKNOWN 0x01
460 #define ENC_STATE_MALFUNC 0x02
461 #define ENC_STATE_REVERS 0x03
462 #define ENC_STATE_OK 0x04
481 #define WIND_A_STATE_ABSENT 0x00
482 #define WIND_A_STATE_UNKNOWN 0x01
483 #define WIND_A_STATE_MALFUNC 0x02
484 #define WIND_A_STATE_OK 0x03
485 #define WIND_B_STATE_ABSENT 0x00
486 #define WIND_B_STATE_UNKNOWN 0x10
487 #define WIND_B_STATE_MALFUNC 0x20
488 #define WIND_B_STATE_OK 0x30
509 #define MVCMD_NAME_BITS 0x3F
510 #define MVCMD_UKNWN 0x00
511 #define MVCMD_MOVE 0x01
512 #define MVCMD_MOVR 0x02
513 #define MVCMD_LEFT 0x03
514 #define MVCMD_RIGHT 0x04
515 #define MVCMD_STOP 0x05
516 #define MVCMD_HOME 0x06
517 #define MVCMD_LOFT 0x07
518 #define MVCMD_SSTP 0x08
519 #define MVCMD_ERROR 0x40
520 #define MVCMD_RUNNING 0x80
542 #define ENGINE_REVERSE 0x01
543 #define ENGINE_CURRENT_AS_RMS 0x02
544 #define ENGINE_MAX_SPEED 0x04
545 #define ENGINE_ANTIPLAY 0x08
546 #define ENGINE_ACCEL_ON 0x10
547 #define ENGINE_LIMIT_VOLT 0x20
548 #define ENGINE_LIMIT_CURR 0x40
549 #define ENGINE_LIMIT_RPM 0x80
571 #define MICROSTEP_MODE_FULL 0x01
572 #define MICROSTEP_MODE_FRAC_2 0x02
573 #define MICROSTEP_MODE_FRAC_4 0x03
574 #define MICROSTEP_MODE_FRAC_8 0x04
575 #define MICROSTEP_MODE_FRAC_16 0x05
576 #define MICROSTEP_MODE_FRAC_32 0x06
577 #define MICROSTEP_MODE_FRAC_64 0x07
578 #define MICROSTEP_MODE_FRAC_128 0x08
579 #define MICROSTEP_MODE_FRAC_256 0x09
601 #define ENGINE_TYPE_NONE 0x00
602 #define ENGINE_TYPE_DC 0x01
603 #define ENGINE_TYPE_2DC 0x02
604 #define ENGINE_TYPE_STEP 0x03
605 #define ENGINE_TYPE_TEST 0x04
606 #define ENGINE_TYPE_BRUSHLESS 0x05
628 #define DRIVER_TYPE_DISCRETE_FET 0x01
629 #define DRIVER_TYPE_INTEGRATE 0x02
630 #define DRIVER_TYPE_EXTERNAL 0x03
650 #define POWER_REDUCT_ENABLED 0x01
651 #define POWER_OFF_ENABLED 0x02
652 #define POWER_SMOOTH_CURRENT 0x04
672 #define ALARM_ON_DRIVER_OVERHEATING 0x01
673 #define LOW_UPWR_PROTECTION 0x02
674 #define H_BRIDGE_ALERT 0x04
675 #define ALARM_ON_BORDERS_SWAP_MISSET 0x08
676 #define ALARM_FLAGS_STICKING 0x10
677 #define USB_BREAK_RECONNECT 0x20
696 #define SETPOS_IGNORE_POSITION 0x01
697 #define SETPOS_IGNORE_ENCODER 0x02
714 #define FEEDBACK_ENCODER 0x01
715 #define FEEDBACK_ENCODERHALL 0x03
716 #define FEEDBACK_EMF 0x04
717 #define FEEDBACK_NONE 0x05
734 #define FEEDBACK_ENC_REVERSE 0x01
735 #define FEEDBACK_HALL_REVERSE 0x02
736 #define FEEDBACK_ENC_TYPE_BITS 0xC0
737 #define FEEDBACK_ENC_TYPE_AUTO 0x00
738 #define FEEDBACK_ENC_TYPE_SINGLE_ENDED 0x40
739 #define FEEDBACK_ENC_TYPE_DIFFERENTIAL 0x80
757 #define SYNCIN_ENABLED 0x01
758 #define SYNCIN_INVERT 0x02
759 #define SYNCIN_GOTOPOSITION 0x04
777 #define SYNCOUT_ENABLED 0x01
778 #define SYNCOUT_STATE 0x02
779 #define SYNCOUT_INVERT 0x04
780 #define SYNCOUT_IN_STEPS 0x08
781 #define SYNCOUT_ONSTART 0x10
782 #define SYNCOUT_ONSTOP 0x20
783 #define SYNCOUT_ONPERIOD 0x40
801 #define EXTIO_SETUP_OUTPUT 0x01
802 #define EXTIO_SETUP_INVERT 0x02
820 #define EXTIO_SETUP_MODE_IN_BITS 0x0F
821 #define EXTIO_SETUP_MODE_IN_NOP 0x00
822 #define EXTIO_SETUP_MODE_IN_STOP 0x01
823 #define EXTIO_SETUP_MODE_IN_PWOF 0x02
824 #define EXTIO_SETUP_MODE_IN_MOVR 0x03
825 #define EXTIO_SETUP_MODE_IN_HOME 0x04
826 #define EXTIO_SETUP_MODE_IN_ALARM 0x05
827 #define EXTIO_SETUP_MODE_OUT_BITS 0xF0
828 #define EXTIO_SETUP_MODE_OUT_OFF 0x00
829 #define EXTIO_SETUP_MODE_OUT_ON 0x10
830 #define EXTIO_SETUP_MODE_OUT_MOVING 0x20
831 #define EXTIO_SETUP_MODE_OUT_ALARM 0x30
832 #define EXTIO_SETUP_MODE_OUT_MOTOR_ON 0x40
833 #define EXTIO_SETUP_MODE_OUT_MOTOR_FOUND 0x50
854 #define BORDER_IS_ENCODER 0x01
855 #define BORDER_STOP_LEFT 0x02
856 #define BORDER_STOP_RIGHT 0x04
857 #define BORDERS_SWAP_MISSET_DETECTION 0x08
878 #define ENDER_SWAP 0x01
879 #define ENDER_SW1_ACTIVE_LOW 0x02
880 #define ENDER_SW2_ACTIVE_LOW 0x04
901 #define BRAKE_ENABLED 0x01
902 #define BRAKE_ENG_PWROFF 0x02
923 #define CONTROL_MODE_BITS 0x03
924 #define CONTROL_MODE_OFF 0x00
925 #define CONTROL_MODE_JOY 0x01
926 #define CONTROL_MODE_LR 0x02
927 #define CONTROL_BTN_LEFT_PUSHED_OPEN 0x04
928 #define CONTROL_BTN_RIGHT_PUSHED_OPEN 0x08
947 #define JOY_REVERSE 0x01
968 #define CTP_ENABLED 0x01
969 #define CTP_BASE 0x02
970 #define CTP_ALARM_ON_ERROR 0x04
971 #define REV_SENS_INV 0x08
972 #define CTP_ERROR_CORRECTION 0x10
994 #define HOME_DIR_FIRST 0x001
995 #define HOME_DIR_SECOND 0x002
996 #define HOME_MV_SEC_EN 0x004
997 #define HOME_HALF_MV 0x008
998 #define HOME_STOP_FIRST_BITS 0x030
999 #define HOME_STOP_FIRST_REV 0x010
1000 #define HOME_STOP_FIRST_SYN 0x020
1001 #define HOME_STOP_FIRST_LIM 0x030
1002 #define HOME_STOP_SECOND_BITS 0x0C0
1003 #define HOME_STOP_SECOND_REV 0x040
1004 #define HOME_STOP_SECOND_SYN 0x080
1005 #define HOME_STOP_SECOND_LIM 0x0C0
1006 #define HOME_USE_FAST 0x100
1021 #define UART_PARITY_BITS 0x03
1022 #define UART_PARITY_BIT_EVEN 0x00
1023 #define UART_PARITY_BIT_ODD 0x01
1024 #define UART_PARITY_BIT_SPACE 0x02
1025 #define UART_PARITY_BIT_MARK 0x03
1026 #define UART_PARITY_BIT_USE 0x04
1027 #define UART_STOP_BIT 0x08
1042 #define MOTOR_TYPE_UNKNOWN 0x00
1043 #define MOTOR_TYPE_STEP 0x01
1044 #define MOTOR_TYPE_DC 0x02
1045 #define MOTOR_TYPE_BLDC 0x03
1060 #define ENCSET_DIFFERENTIAL_OUTPUT 0x001
1061 #define ENCSET_PUSHPULL_OUTPUT 0x004
1062 #define ENCSET_INDEXCHANNEL_PRESENT 0x010
1063 #define ENCSET_REVOLUTIONSENSOR_PRESENT 0x040
1064 #define ENCSET_REVOLUTIONSENSOR_ACTIVE_HIGH 0x100
1079 #define MB_AVAILABLE 0x01
1080 #define MB_POWERED_HOLD 0x02
1095 #define TS_TYPE_BITS 0x07
1096 #define TS_TYPE_UNKNOWN 0x00
1097 #define TS_TYPE_THERMOCOUPLE 0x01
1098 #define TS_TYPE_SEMICONDUCTOR 0x02
1099 #define TS_AVAILABLE 0x08
1114 #define LS_ON_SW1_AVAILABLE 0x01
1115 #define LS_ON_SW2_AVAILABLE 0x02
1116 #define LS_SW1_ACTIVE_LOW 0x04
1117 #define LS_SW2_ACTIVE_LOW 0x08
1118 #define LS_SHORTED 0x10
1520 unsigned int MaxSpeed[10];
1521 unsigned int uMaxSpeed[10];
1522 unsigned int Timeout[9];
1532 unsigned int Timeout[9];
1668 char ControllerName[17];
1683 unsigned int UserData[7];
1860 char Manufacturer[5];
1861 char ManufacturerId[3];
1862 char ProductDescription[9];
1934 unsigned int deprecated;
1952 uint8_t DebugData[128];
1968 uint8_t DebugData[128];
1982 char PositionerName[17];
1998 char Manufacturer[17];
1999 char PartNumber[25];
2039 char Manufacturer[17];
2040 char PartNumber[25];
2094 char Manufacturer[17];
2095 char PartNumber[25];
2132 char Manufacturer[17];
2133 char PartNumber[25];
2169 char Manufacturer[17];
2170 char PartNumber[25];
2208 char MagneticBrakeInfo[25];
2213 char TemperatureSensorInfo[25];
3176 result_t
XIMC_API command_move_calb (device_t
id,
float Position,
const calibration_t* calibration);
3201 result_t
XIMC_API command_movr_calb (device_t
id,
float DeltaPosition,
const calibration_t* calibration);
4393 #if !defined(MATLAB_IMPORT) && !defined(LABVIEW64_IMPORT) && !defined(LABVIEW32_IMPORT)
4550 #if defined(__cplusplus)