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.10.5
277 #define LIBXIMC_PROTOCOL_VERSION 18.3
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 0x00003F
381 #define STATE_ERRC 0x000001
382 #define STATE_ERRD 0x000002
383 #define STATE_ERRV 0x000004
384 #define STATE_EEPROM_CONNECTED 0x000010
385 #define STATE_IS_HOMED 0x000020
386 #define STATE_SECUR 0x73FFC0
387 #define STATE_ALARM 0x000040
388 #define STATE_CTP_ERROR 0x000080
389 #define STATE_POWER_OVERHEAT 0x000100
390 #define STATE_CONTROLLER_OVERHEAT 0x000200
391 #define STATE_OVERLOAD_POWER_VOLTAGE 0x000400
392 #define STATE_OVERLOAD_POWER_CURRENT 0x000800
393 #define STATE_OVERLOAD_USB_VOLTAGE 0x001000
394 #define STATE_LOW_USB_VOLTAGE 0x002000
395 #define STATE_OVERLOAD_USB_CURRENT 0x004000
396 #define STATE_BORDERS_SWAP_MISSET 0x008000
397 #define STATE_LOW_POWER_VOLTAGE 0x010000
398 #define STATE_H_BRIDGE_FAULT 0x020000
399 #define STATE_CURRENT_MOTOR_BITS 0x0C0000
400 #define STATE_CURRENT_MOTOR0 0x000000
401 #define STATE_CURRENT_MOTOR1 0x040000
402 #define STATE_CURRENT_MOTOR2 0x080000
403 #define STATE_CURRENT_MOTOR3 0x0C0000
404 #define STATE_WINDING_RES_MISMATCH 0x100000
405 #define STATE_ENCODER_FAULT 0x200000
406 #define STATE_MOTOR_CURRENT_LIMIT 0x400000
427 #define STATE_DIG_SIGNAL 0xFFFF
428 #define STATE_RIGHT_EDGE 0x0001
429 #define STATE_LEFT_EDGE 0x0002
430 #define STATE_BUTTON_RIGHT 0x0004
431 #define STATE_BUTTON_LEFT 0x0008
432 #define STATE_GPIO_PINOUT 0x0010
433 #define STATE_GPIO_LEVEL 0x0020
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_EMF 0x04
716 #define FEEDBACK_NONE 0x05
733 #define FEEDBACK_ENC_REVERSE 0x01
734 #define FEEDBACK_ENC_TYPE_BITS 0xC0
735 #define FEEDBACK_ENC_TYPE_AUTO 0x00
736 #define FEEDBACK_ENC_TYPE_SINGLE_ENDED 0x40
737 #define FEEDBACK_ENC_TYPE_DIFFERENTIAL 0x80
755 #define SYNCIN_ENABLED 0x01
756 #define SYNCIN_INVERT 0x02
757 #define SYNCIN_GOTOPOSITION 0x04
775 #define SYNCOUT_ENABLED 0x01
776 #define SYNCOUT_STATE 0x02
777 #define SYNCOUT_INVERT 0x04
778 #define SYNCOUT_IN_STEPS 0x08
779 #define SYNCOUT_ONSTART 0x10
780 #define SYNCOUT_ONSTOP 0x20
781 #define SYNCOUT_ONPERIOD 0x40
799 #define EXTIO_SETUP_OUTPUT 0x01
800 #define EXTIO_SETUP_INVERT 0x02
818 #define EXTIO_SETUP_MODE_IN_BITS 0x0F
819 #define EXTIO_SETUP_MODE_IN_NOP 0x00
820 #define EXTIO_SETUP_MODE_IN_STOP 0x01
821 #define EXTIO_SETUP_MODE_IN_PWOF 0x02
822 #define EXTIO_SETUP_MODE_IN_MOVR 0x03
823 #define EXTIO_SETUP_MODE_IN_HOME 0x04
824 #define EXTIO_SETUP_MODE_IN_ALARM 0x05
825 #define EXTIO_SETUP_MODE_OUT_BITS 0xF0
826 #define EXTIO_SETUP_MODE_OUT_OFF 0x00
827 #define EXTIO_SETUP_MODE_OUT_ON 0x10
828 #define EXTIO_SETUP_MODE_OUT_MOVING 0x20
829 #define EXTIO_SETUP_MODE_OUT_ALARM 0x30
830 #define EXTIO_SETUP_MODE_OUT_MOTOR_ON 0x40
831 #define EXTIO_SETUP_MODE_OUT_MOTOR_FOUND 0x50
852 #define BORDER_IS_ENCODER 0x01
853 #define BORDER_STOP_LEFT 0x02
854 #define BORDER_STOP_RIGHT 0x04
855 #define BORDERS_SWAP_MISSET_DETECTION 0x08
876 #define ENDER_SWAP 0x01
877 #define ENDER_SW1_ACTIVE_LOW 0x02
878 #define ENDER_SW2_ACTIVE_LOW 0x04
899 #define BRAKE_ENABLED 0x01
900 #define BRAKE_ENG_PWROFF 0x02
921 #define CONTROL_MODE_BITS 0x03
922 #define CONTROL_MODE_OFF 0x00
923 #define CONTROL_MODE_JOY 0x01
924 #define CONTROL_MODE_LR 0x02
925 #define CONTROL_BTN_LEFT_PUSHED_OPEN 0x04
926 #define CONTROL_BTN_RIGHT_PUSHED_OPEN 0x08
945 #define JOY_REVERSE 0x01
966 #define CTP_ENABLED 0x01
967 #define CTP_BASE 0x02
968 #define CTP_ALARM_ON_ERROR 0x04
969 #define REV_SENS_INV 0x08
970 #define CTP_ERROR_CORRECTION 0x10
992 #define HOME_DIR_FIRST 0x001
993 #define HOME_DIR_SECOND 0x002
994 #define HOME_MV_SEC_EN 0x004
995 #define HOME_HALF_MV 0x008
996 #define HOME_STOP_FIRST_BITS 0x030
997 #define HOME_STOP_FIRST_REV 0x010
998 #define HOME_STOP_FIRST_SYN 0x020
999 #define HOME_STOP_FIRST_LIM 0x030
1000 #define HOME_STOP_SECOND_BITS 0x0C0
1001 #define HOME_STOP_SECOND_REV 0x040
1002 #define HOME_STOP_SECOND_SYN 0x080
1003 #define HOME_STOP_SECOND_LIM 0x0C0
1004 #define HOME_USE_FAST 0x100
1019 #define UART_PARITY_BITS 0x03
1020 #define UART_PARITY_BIT_EVEN 0x00
1021 #define UART_PARITY_BIT_ODD 0x01
1022 #define UART_PARITY_BIT_SPACE 0x02
1023 #define UART_PARITY_BIT_MARK 0x03
1024 #define UART_PARITY_BIT_USE 0x04
1025 #define UART_STOP_BIT 0x08
1040 #define MOTOR_TYPE_UNKNOWN 0x00
1041 #define MOTOR_TYPE_STEP 0x01
1042 #define MOTOR_TYPE_DC 0x02
1043 #define MOTOR_TYPE_BLDC 0x03
1058 #define ENCSET_DIFFERENTIAL_OUTPUT 0x001
1059 #define ENCSET_PUSHPULL_OUTPUT 0x004
1060 #define ENCSET_INDEXCHANNEL_PRESENT 0x010
1061 #define ENCSET_REVOLUTIONSENSOR_PRESENT 0x040
1062 #define ENCSET_REVOLUTIONSENSOR_ACTIVE_HIGH 0x100
1077 #define MB_AVAILABLE 0x01
1078 #define MB_POWERED_HOLD 0x02
1093 #define TS_TYPE_BITS 0x07
1094 #define TS_TYPE_UNKNOWN 0x00
1095 #define TS_TYPE_THERMOCOUPLE 0x01
1096 #define TS_TYPE_SEMICONDUCTOR 0x02
1097 #define TS_AVAILABLE 0x08
1112 #define LS_ON_SW1_AVAILABLE 0x01
1113 #define LS_ON_SW2_AVAILABLE 0x02
1114 #define LS_SW1_ACTIVE_LOW 0x04
1115 #define LS_SW2_ACTIVE_LOW 0x08
1116 #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];
1877 char Manufacturer[5];
1878 char ManufacturerId[3];
1879 char ProductDescription[9];
1951 unsigned int deprecated;
1969 uint8_t DebugData[128];
1985 uint8_t DebugData[128];
1999 char PositionerName[17];
2015 char Manufacturer[17];
2016 char PartNumber[25];
2056 char Manufacturer[17];
2057 char PartNumber[25];
2111 char Manufacturer[17];
2112 char PartNumber[25];
2149 char Manufacturer[17];
2150 char PartNumber[25];
2186 char Manufacturer[17];
2187 char PartNumber[25];
2225 char MagneticBrakeInfo[25];
2230 char TemperatureSensorInfo[25];
3223 result_t
XIMC_API command_move_calb (device_t
id,
float Position,
const calibration_t* calibration);
3248 result_t
XIMC_API command_movr_calb (device_t
id,
float DeltaPosition,
const calibration_t* calibration);
4508 #if !defined(MATLAB_IMPORT) && !defined(LABVIEW64_IMPORT) && !defined(LABVIEW32_IMPORT)
4665 #if defined(__cplusplus)