19 #if defined(_WIN32) || defined(LABVIEW64_IMPORT) || defined(LABVIEW32_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)
34 #define XIMC_CALLCONV __stdcall
39 #if !defined(XIMC_NO_STDINT)
41 #if defined(_MSC_VER) || defined(LABVIEW64_IMPORT) || defined(LABVIEW32_IMPORT)
43 typedef __int8 int8_t;
44 typedef __int16 int16_t;
45 typedef __int32 int32_t;
46 typedef __int64 int64_t;
47 typedef unsigned __int8 uint8_t;
48 typedef unsigned __int16 uint16_t;
49 typedef unsigned __int32 uint32_t;
50 typedef unsigned __int64 uint64_t;
56 #if defined(LABVIEW64_IMPORT) || defined(LABVIEW32_IMPORT)
57 typedef unsigned __int64 ulong_t;
58 typedef __int64 long_t;
60 typedef unsigned long long ulong_t;
61 typedef long long long_t;
66 #if defined(__cplusplus)
100 #if defined(_WIN64) || defined(__LP64__) || defined(LABVIEW64_IMPORT)
115 #define device_undefined -1
144 #define result_error -1
154 #define result_not_implemented -2
164 #define result_value_error -3
174 #define result_nodevice -4
195 #define LOGLEVEL_ERROR 0x01
204 #define LOGLEVEL_WARNING 0x02
213 #define LOGLEVEL_INFO 0x03
222 #define LOGLEVEL_DEBUG 0x04
244 #define LIBXIMC_VERSION 2.3.2
263 #define ENUMERATE_PROBE 0x01
264 #define ENUMERATE_ALL_COM 0x02
283 #define MOVE_STATE_MOVING 0x01
284 #define MOVE_STATE_TARGET_SPEED 0x02
285 #define MOVE_STATE_ANTIPLAY 0x04
302 #define EEPROM_PRECEDENCE 0x01
321 #define PWR_STATE_UNKNOWN 0x00
322 #define PWR_STATE_OFF 0x01
323 #define PWR_STATE_NORM 0x03
324 #define PWR_STATE_REDUCT 0x04
325 #define PWR_STATE_MAX 0x05
346 #define STATE_CONTR 0x0003F
347 #define STATE_ERRC 0x00001
348 #define STATE_ERRD 0x00002
349 #define STATE_ERRV 0x00004
350 #define STATE_EEPROM_CONNECTED 0x00010
351 #define STATE_SECUR 0x3FFC0
352 #define STATE_ALARM 0x00040
353 #define STATE_CTP_ERROR 0x00080
354 #define STATE_POWER_OVERHEAT 0x00100
355 #define STATE_CONTROLLER_OVERHEAT 0x00200
356 #define STATE_OVERLOAD_POWER_VOLTAGE 0x00400
357 #define STATE_OVERLOAD_POWER_CURRENT 0x00800
358 #define STATE_OVERLOAD_USB_VOLTAGE 0x01000
359 #define STATE_LOW_USB_VOLTAGE 0x02000
360 #define STATE_OVERLOAD_USB_CURRENT 0x04000
361 #define STATE_BORDERS_SWAP_MISSET 0x08000
362 #define STATE_LOW_POWER_VOLTAGE 0x10000
363 #define STATE_H_BRIDGE_FAULT 0x20000
384 #define STATE_DIG_SIGNAL 0xFFFF
385 #define STATE_RIGHT_EDGE 0x0001
386 #define STATE_LEFT_EDGE 0x0002
387 #define STATE_BUTTON_RIGHT 0x0004
388 #define STATE_BUTTON_LEFT 0x0008
389 #define STATE_GPIO_PINOUT 0x0010
390 #define STATE_GPIO_LEVEL 0x0020
391 #define STATE_HALL_A 0x0040
392 #define STATE_HALL_B 0x0080
393 #define STATE_HALL_C 0x0100
394 #define STATE_BRAKE 0x0200
395 #define STATE_REV_SENSOR 0x0400
396 #define STATE_SYNC_INPUT 0x0800
397 #define STATE_SYNC_OUTPUT 0x1000
398 #define STATE_ENC_A 0x2000
399 #define STATE_ENC_B 0x4000
418 #define ENC_STATE_ABSENT 0x00
419 #define ENC_STATE_UNKNOWN 0x01
420 #define ENC_STATE_MALFUNC 0x02
421 #define ENC_STATE_REVERS 0x03
422 #define ENC_STATE_OK 0x04
441 #define WIND_A_STATE_ABSENT 0x00
442 #define WIND_A_STATE_UNKNOWN 0x01
443 #define WIND_A_STATE_MALFUNC 0x02
444 #define WIND_A_STATE_OK 0x03
445 #define WIND_B_STATE_ABSENT 0x00
446 #define WIND_B_STATE_UNKNOWN 0x10
447 #define WIND_B_STATE_MALFUNC 0x20
448 #define WIND_B_STATE_OK 0x30
469 #define MVCMD_NAME_BITS 0x3F
470 #define MVCMD_UKNWN 0x00
471 #define MVCMD_MOVE 0x01
472 #define MVCMD_MOVR 0x02
473 #define MVCMD_LEFT 0x03
474 #define MVCMD_RIGHT 0x04
475 #define MVCMD_STOP 0x05
476 #define MVCMD_HOME 0x06
477 #define MVCMD_LOFT 0x07
478 #define MVCMD_SSTP 0x08
479 #define MVCMD_ERROR 0x40
480 #define MVCMD_RUNNING 0x80
502 #define ENGINE_REVERSE 0x01
503 #define ENGINE_MAX_SPEED 0x04
504 #define ENGINE_ANTIPLAY 0x08
505 #define ENGINE_ACCEL_ON 0x10
506 #define ENGINE_LIMIT_VOLT 0x20
507 #define ENGINE_LIMIT_CURR 0x40
508 #define ENGINE_LIMIT_RPM 0x80
530 #define MICROSTEP_MODE_FULL 0x01
531 #define MICROSTEP_MODE_FRAC_2 0x02
532 #define MICROSTEP_MODE_FRAC_4 0x03
533 #define MICROSTEP_MODE_FRAC_8 0x04
534 #define MICROSTEP_MODE_FRAC_16 0x05
535 #define MICROSTEP_MODE_FRAC_32 0x06
536 #define MICROSTEP_MODE_FRAC_64 0x07
537 #define MICROSTEP_MODE_FRAC_128 0x08
538 #define MICROSTEP_MODE_FRAC_256 0x09
560 #define ENGINE_TYPE_NONE 0x00
561 #define ENGINE_TYPE_DC 0x01
562 #define ENGINE_TYPE_2DC 0x02
563 #define ENGINE_TYPE_STEP 0x03
564 #define ENGINE_TYPE_TEST 0x04
565 #define ENGINE_TYPE_BRUSHLESS 0x05
587 #define DRIVER_TYPE_DISCRETE_FET 0x01
588 #define DRIVER_TYPE_INTEGRATE 0x02
589 #define DRIVER_TYPE_EXTERNAL 0x03
609 #define POWER_REDUCT_ENABLED 0x01
610 #define POWER_OFF_ENABLED 0x02
611 #define POWER_SMOOTH_CURRENT 0x04
631 #define ALARM_ON_DRIVER_OVERHEATING 0x01
632 #define LOW_UPWR_PROTECTION 0x02
633 #define H_BRIDGE_ALERT 0x04
634 #define ALARM_ON_BORDERS_SWAP_MISSET 0x08
635 #define ALARM_FLAGS_STICKING 0x10
636 #define USB_BREAK_RECONNECT 0x20
655 #define SETPOS_IGNORE_POSITION 0x01
656 #define SETPOS_IGNORE_ENCODER 0x02
673 #define FEEDBACK_ENCODER 0x01
674 #define FEEDBACK_ENCODERHALL 0x03
675 #define FEEDBACK_EMF 0x04
676 #define FEEDBACK_NONE 0x05
693 #define FEEDBACK_ENC_REVERSE 0x01
694 #define FEEDBACK_HALL_REVERSE 0x02
712 #define SYNCIN_ENABLED 0x01
713 #define SYNCIN_INVERT 0x02
714 #define SYNCIN_GOTOPOSITION 0x04
732 #define SYNCOUT_ENABLED 0x01
733 #define SYNCOUT_STATE 0x02
734 #define SYNCOUT_INVERT 0x04
735 #define SYNCOUT_IN_STEPS 0x08
736 #define SYNCOUT_ONSTART 0x10
737 #define SYNCOUT_ONSTOP 0x20
738 #define SYNCOUT_ONPERIOD 0x40
756 #define EXTIO_SETUP_OUTPUT 0x01
757 #define EXTIO_SETUP_INVERT 0x02
775 #define EXTIO_SETUP_MODE_IN_NOP 0x00
776 #define EXTIO_SETUP_MODE_IN_STOP 0x01
777 #define EXTIO_SETUP_MODE_IN_PWOF 0x02
778 #define EXTIO_SETUP_MODE_IN_MOVR 0x03
779 #define EXTIO_SETUP_MODE_IN_HOME 0x04
780 #define EXTIO_SETUP_MODE_OUT_OFF 0x00
781 #define EXTIO_SETUP_MODE_OUT_ON 0x10
782 #define EXTIO_SETUP_MODE_OUT_MOVING 0x20
783 #define EXTIO_SETUP_MODE_OUT_ALARM 0x30
784 #define EXTIO_SETUP_MODE_OUT_MOTOR_ON 0x40
785 #define EXTIO_SETUP_MODE_OUT_MOTOR_FOUND 0x50
806 #define BORDER_IS_ENCODER 0x01
807 #define BORDER_STOP_LEFT 0x02
808 #define BORDER_STOP_RIGHT 0x04
809 #define BORDERS_SWAP_MISSET_DETECTION 0x08
830 #define ENDER_SWAP 0x01
831 #define ENDER_SW1_ACTIVE_LOW 0x02
832 #define ENDER_SW2_ACTIVE_LOW 0x04
853 #define BRAKE_ENABLED 0x01
854 #define BRAKE_ENG_PWROFF 0x02
875 #define CONTROL_MODE_BITS 0x03
876 #define CONTROL_MODE_OFF 0x00
877 #define CONTROL_MODE_JOY 0x01
878 #define CONTROL_MODE_LR 0x02
879 #define CONTROL_BTN_LEFT_PUSHED_OPEN 0x04
880 #define CONTROL_BTN_RIGHT_PUSHED_OPEN 0x08
899 #define JOY_REVERSE 0x01
920 #define CTP_ENABLED 0x01
921 #define CTP_BASE 0x02
922 #define CTP_ALARM_ON_ERROR 0x04
923 #define REV_SENS_INV 0x08
945 #define HOME_DIR_FIRST 0x01
946 #define HOME_DIR_SECOND 0x02
947 #define HOME_MV_SEC_EN 0x04
948 #define HOME_HALF_MV 0x08
949 #define HOME_STOP_FIRST_BITS 0x30
950 #define HOME_STOP_FIRST_REV 0x10
951 #define HOME_STOP_FIRST_SYN 0x20
952 #define HOME_STOP_FIRST_LIM 0x30
953 #define HOME_STOP_SECOND_BITS 0xC0
954 #define HOME_STOP_SECOND_REV 0x40
955 #define HOME_STOP_SECOND_SYN 0x80
956 #define HOME_STOP_SECOND_LIM 0xC0
971 #define UART_PARITY_BITS 0x03
972 #define UART_PARITY_BIT_EVEN 0x00
973 #define UART_PARITY_BIT_ODD 0x01
974 #define UART_PARITY_BIT_SPACE 0x02
975 #define UART_PARITY_BIT_MARK 0x03
976 #define UART_PARITY_BIT_USE 0x04
977 #define UART_STOP_BIT 0x08
992 #define MOTOR_TYPE_UNKNOWN 0x00
993 #define MOTOR_TYPE_STEP 0x01
994 #define MOTOR_TYPE_DC 0x02
995 #define MOTOR_TYPE_BLDC 0x03
1010 #define ENCSET_DIFFERENTIAL_OUTPUT 0x001
1011 #define ENCSET_PUSHPULL_OUTPUT 0x004
1012 #define ENCSET_INDEXCHANNEL_PRESENT 0x010
1013 #define ENCSET_REVOLUTIONSENSOR_PRESENT 0x040
1014 #define ENCSET_REVOLUTIONSENSOR_ACTIVE_HIGH 0x100
1029 #define MB_AVAILABLE 0x01
1030 #define MB_POWERED_HOLD 0x02
1045 #define TS_TYPE_BITS 0x07
1046 #define TS_TYPE_UNKNOWN 0x00
1047 #define TS_TYPE_THERMOCOUPLE 0x01
1048 #define TS_TYPE_SEMICONDUCTOR 0x02
1049 #define TS_AVAILABLE 0x08
1064 #define LS_ON_SW1_AVAILABLE 0x01
1065 #define LS_ON_SW2_AVAILABLE 0x02
1066 #define LS_SW1_ACTIVE_LOW 0x04
1067 #define LS_SW2_ACTIVE_LOW 0x08
1068 #define LS_SHORTED 0x10
1472 unsigned int MaxSpeed[10];
1473 unsigned int uMaxSpeed[10];
1474 unsigned int Timeout[9];
1484 unsigned int Timeout[9];
1597 char ControllerName[17];
1776 char Manufacturer[5];
1777 char ManufacturerId[3];
1778 char ProductDescription[9];
1799 unsigned int Key[32];
1844 unsigned int deprecated;
1862 unsigned int DebugData[128];
1876 char PositionerName[17];
1892 char Manufacturer[17];
1893 char PartNumber[25];
1933 char Manufacturer[17];
1934 char PartNumber[25];
1988 char Manufacturer[17];
1989 char PartNumber[25];
2026 char Manufacturer[17];
2027 char PartNumber[25];
2063 char Manufacturer[17];
2064 char PartNumber[25];
2102 char MagneticBrakeInfo[25];
2107 char TemperatureSensorInfo[25];
2985 result_t
XIMC_API command_move_calb (device_t
id,
float Position,
const calibration_t* calibration);
3010 result_t
XIMC_API command_movr_calb (device_t
id,
float DeltaPosition,
const calibration_t* calibration);
4168 #if defined(__cplusplus)