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;
57 #if defined(__cplusplus)
86 #if defined(_WIN64) || defined(__LP64__) || defined(LABVIEW64_IMPORT)
101 #define device_undefined -1
130 #define result_error -1
140 #define result_not_implemented -2
150 #define result_value_error -3
160 #define result_nodevice -4
181 #define LOGLEVEL_ERROR 0x01
190 #define LOGLEVEL_WARNING 0x02
199 #define LOGLEVEL_INFO 0x03
208 #define LOGLEVEL_DEBUG 0x04
227 #define LIBXIMC_VERSION 2.2.1
246 #define ENUMERATE_PROBE 0x01
247 #define ENUMERATE_ALL_COM 0x02
266 #define MOVE_STATE_MOVING 0x01
267 #define MOVE_STATE_TARGET_SPEED 0x02
268 #define MOVE_STATE_ANTIPLAY 0x04
285 #define EEPROM_PRECEDENCE 0x01
304 #define PWR_STATE_UNKNOWN 0x00
305 #define PWR_STATE_OFF 0x01
306 #define PWR_STATE_NORM 0x03
307 #define PWR_STATE_REDUCT 0x04
308 #define PWR_STATE_MAX 0x05
329 #define STATE_CONTR 0x0003F
330 #define STATE_ERRC 0x00001
331 #define STATE_ERRD 0x00002
332 #define STATE_ERRV 0x00004
333 #define STATE_EEPROM_CONNECTED 0x00010
334 #define STATE_SECUR 0x3FFC0
335 #define STATE_ALARM 0x00040
336 #define STATE_CTP_ERROR 0x00080
337 #define STATE_POWER_OVERHEAT 0x00100
338 #define STATE_CONTROLLER_OVERHEAT 0x00200
339 #define STATE_OVERLOAD_POWER_VOLTAGE 0x00400
340 #define STATE_OVERLOAD_POWER_CURRENT 0x00800
341 #define STATE_OVERLOAD_USB_VOLTAGE 0x01000
342 #define STATE_LOW_USB_VOLTAGE 0x02000
343 #define STATE_OVERLOAD_USB_CURRENT 0x04000
344 #define STATE_BORDERS_SWAP_MISSET 0x08000
345 #define STATE_LOW_POWER_VOLTAGE 0x10000
346 #define STATE_H_BRIDGE_FAULT 0x20000
367 #define STATE_DIG_SIGNAL 0xFFFF
368 #define STATE_RIGHT_EDGE 0x0001
369 #define STATE_LEFT_EDGE 0x0002
370 #define STATE_BUTTON_RIGHT 0x0004
371 #define STATE_BUTTON_LEFT 0x0008
372 #define STATE_GPIO_PINOUT 0x0010
373 #define STATE_GPIO_LEVEL 0x0020
374 #define STATE_HALL_A 0x0040
375 #define STATE_HALL_B 0x0080
376 #define STATE_HALL_C 0x0100
377 #define STATE_BRAKE 0x0200
378 #define STATE_REV_SENSOR 0x0400
379 #define STATE_SYNC_INPUT 0x0800
380 #define STATE_SYNC_OUTPUT 0x1000
381 #define STATE_ENC_A 0x2000
382 #define STATE_ENC_B 0x4000
401 #define ENC_STATE_ABSENT 0x00
402 #define ENC_STATE_UNKNOWN 0x01
403 #define ENC_STATE_MALFUNC 0x02
404 #define ENC_STATE_REVERS 0x03
405 #define ENC_STATE_OK 0x04
424 #define WIND_A_STATE_ABSENT 0x00
425 #define WIND_A_STATE_UNKNOWN 0x01
426 #define WIND_A_STATE_MALFUNC 0x02
427 #define WIND_A_STATE_OK 0x03
428 #define WIND_B_STATE_ABSENT 0x00
429 #define WIND_B_STATE_UNKNOWN 0x10
430 #define WIND_B_STATE_MALFUNC 0x20
431 #define WIND_B_STATE_OK 0x30
452 #define MVCMD_NAME_BITS 0x3F
453 #define MVCMD_UKNWN 0x00
454 #define MVCMD_MOVE 0x01
455 #define MVCMD_MOVR 0x02
456 #define MVCMD_LEFT 0x03
457 #define MVCMD_RIGHT 0x04
458 #define MVCMD_STOP 0x05
459 #define MVCMD_HOME 0x06
460 #define MVCMD_LOFT 0x07
461 #define MVCMD_SSTP 0x08
462 #define MVCMD_ERROR 0x40
463 #define MVCMD_RUNNING 0x80
485 #define ENGINE_REVERSE 0x01
486 #define ENGINE_MAX_SPEED 0x04
487 #define ENGINE_ANTIPLAY 0x08
488 #define ENGINE_ACCEL_ON 0x10
489 #define ENGINE_LIMIT_VOLT 0x20
490 #define ENGINE_LIMIT_CURR 0x40
491 #define ENGINE_LIMIT_RPM 0x80
513 #define MICROSTEP_MODE_FULL 0x01
514 #define MICROSTEP_MODE_FRAC_2 0x02
515 #define MICROSTEP_MODE_FRAC_4 0x03
516 #define MICROSTEP_MODE_FRAC_8 0x04
517 #define MICROSTEP_MODE_FRAC_16 0x05
518 #define MICROSTEP_MODE_FRAC_32 0x06
519 #define MICROSTEP_MODE_FRAC_64 0x07
520 #define MICROSTEP_MODE_FRAC_128 0x08
521 #define MICROSTEP_MODE_FRAC_256 0x09
543 #define ENGINE_TYPE_NONE 0x00
544 #define ENGINE_TYPE_DC 0x01
545 #define ENGINE_TYPE_2DC 0x02
546 #define ENGINE_TYPE_STEP 0x03
547 #define ENGINE_TYPE_TEST 0x04
548 #define ENGINE_TYPE_BRUSHLESS 0x05
570 #define DRIVER_TYPE_DISCRETE_FET 0x01
571 #define DRIVER_TYPE_INTEGRATE 0x02
572 #define DRIVER_TYPE_EXTERNAL 0x03
592 #define POWER_REDUCT_ENABLED 0x01
593 #define POWER_OFF_ENABLED 0x02
594 #define POWER_SMOOTH_CURRENT 0x04
614 #define ALARM_ON_DRIVER_OVERHEATING 0x01
615 #define LOW_UPWR_PROTECTION 0x02
616 #define H_BRIDGE_ALERT 0x04
617 #define ALARM_ON_BORDERS_SWAP_MISSET 0x08
618 #define ALARM_FLAGS_STICKING 0x10
619 #define USB_BREAK_RECONNECT 0x20
638 #define SETPOS_IGNORE_POSITION 0x01
639 #define SETPOS_IGNORE_ENCODER 0x02
656 #define FEEDBACK_ENCODER 0x01
657 #define FEEDBACK_ENCODERHALL 0x03
658 #define FEEDBACK_EMF 0x04
659 #define FEEDBACK_NONE 0x05
676 #define FEEDBACK_ENC_REVERSE 0x01
677 #define FEEDBACK_HALL_REVERSE 0x02
695 #define SYNCIN_ENABLED 0x01
696 #define SYNCIN_INVERT 0x02
697 #define SYNCIN_GOTOPOSITION 0x04
715 #define SYNCOUT_ENABLED 0x01
716 #define SYNCOUT_STATE 0x02
717 #define SYNCOUT_INVERT 0x04
718 #define SYNCOUT_IN_STEPS 0x08
719 #define SYNCOUT_ONSTART 0x10
720 #define SYNCOUT_ONSTOP 0x20
721 #define SYNCOUT_ONPERIOD 0x40
739 #define EXTIO_SETUP_OUTPUT 0x01
740 #define EXTIO_SETUP_INVERT 0x02
758 #define EXTIO_SETUP_MODE_IN_NOP 0x00
759 #define EXTIO_SETUP_MODE_IN_STOP 0x01
760 #define EXTIO_SETUP_MODE_IN_PWOF 0x02
761 #define EXTIO_SETUP_MODE_IN_MOVR 0x03
762 #define EXTIO_SETUP_MODE_IN_HOME 0x04
763 #define EXTIO_SETUP_MODE_OUT_OFF 0x00
764 #define EXTIO_SETUP_MODE_OUT_ON 0x10
765 #define EXTIO_SETUP_MODE_OUT_MOVING 0x20
766 #define EXTIO_SETUP_MODE_OUT_ALARM 0x30
767 #define EXTIO_SETUP_MODE_OUT_MOTOR_ON 0x40
768 #define EXTIO_SETUP_MODE_OUT_MOTOR_FOUND 0x50
789 #define BORDER_IS_ENCODER 0x01
790 #define BORDER_STOP_LEFT 0x02
791 #define BORDER_STOP_RIGHT 0x04
792 #define BORDERS_SWAP_MISSET_DETECTION 0x08
813 #define ENDER_SWAP 0x01
814 #define ENDER_SW1_ACTIVE_LOW 0x02
815 #define ENDER_SW2_ACTIVE_LOW 0x04
836 #define BRAKE_ENABLED 0x01
837 #define BRAKE_ENG_PWROFF 0x02
858 #define CONTROL_MODE_BITS 0x03
859 #define CONTROL_MODE_OFF 0x00
860 #define CONTROL_MODE_JOY 0x01
861 #define CONTROL_MODE_LR 0x02
862 #define CONTROL_BTN_LEFT_PUSHED_OPEN 0x04
863 #define CONTROL_BTN_RIGHT_PUSHED_OPEN 0x08
882 #define JOY_REVERSE 0x01
903 #define CTP_ENABLED 0x01
904 #define CTP_BASE 0x02
905 #define CTP_ALARM_ON_ERROR 0x04
906 #define REV_SENS_INV 0x08
928 #define HOME_DIR_FIRST 0x01
929 #define HOME_DIR_SECOND 0x02
930 #define HOME_MV_SEC_EN 0x04
931 #define HOME_HALF_MV 0x08
932 #define HOME_STOP_FIRST_BITS 0x30
933 #define HOME_STOP_FIRST_REV 0x10
934 #define HOME_STOP_FIRST_SYN 0x20
935 #define HOME_STOP_FIRST_LIM 0x30
936 #define HOME_STOP_SECOND_BITS 0xC0
937 #define HOME_STOP_SECOND_REV 0x40
938 #define HOME_STOP_SECOND_SYN 0x80
939 #define HOME_STOP_SECOND_LIM 0xC0
954 #define UART_PARITY_BITS 0x03
955 #define UART_PARITY_BIT_EVEN 0x00
956 #define UART_PARITY_BIT_ODD 0x01
957 #define UART_PARITY_BIT_SPACE 0x02
958 #define UART_PARITY_BIT_MARK 0x03
959 #define UART_PARITY_BIT_USE 0x04
960 #define UART_STOP_BIT 0x08
975 #define MOTOR_TYPE_STEP 0x01
976 #define MOTOR_TYPE_DC 0x02
977 #define MOTOR_TYPE_BLDC 0x03
992 #define ENCSET_DIFFERENTIAL_OUTPUT 0x001
993 #define ENCSET_PUSHPULL_OUTPUT 0x004
994 #define ENCSET_INDEXCHANNEL_PRESENT 0x010
995 #define ENCSET_REVOLUTIONSENSOR_PRESENT 0x040
996 #define ENCSET_REVOLUTIONSENSOR_ACTIVE_HIGH 0x100
1011 #define MB_AVAILABLE 0x01
1012 #define MB_POWERED_HOLD 0x02
1027 #define TS_TYPE_BITS 0x07
1028 #define TS_TYPE_THERMOCOUPLE 0x01
1029 #define TS_TYPE_SEMICONDUCTOR 0x02
1030 #define TS_AVAILABLE 0x08
1045 #define LS_ON_SW1_AVAILABLE 0x01
1046 #define LS_ON_SW2_AVAILABLE 0x02
1047 #define LS_SW1_ACTIVE_LOW 0x04
1048 #define LS_SW2_ACTIVE_LOW 0x08
1049 #define LS_SHORTED 0x10
1453 unsigned int MaxSpeed[10];
1454 unsigned int uMaxSpeed[10];
1455 unsigned int Timeout[9];
1465 unsigned int Timeout[9];
1578 char ControllerName[17];
1757 char Manufacturer[5];
1758 char ManufacturerId[3];
1759 char ProductDescription[9];
1780 unsigned int Key[32];
1825 unsigned int deprecated;
1843 unsigned int DebugData[128];
1857 char PositionerName[17];
1873 char Manufacturer[17];
1874 char PartNumber[25];
1914 char Manufacturer[17];
1915 char PartNumber[25];
1969 char Manufacturer[17];
1970 char PartNumber[25];
2007 char Manufacturer[17];
2008 char PartNumber[25];
2044 char Manufacturer[17];
2045 char PartNumber[25];
2083 char MagneticBrakeInfo[25];
2088 char TemperatureSensorInfo[25];
2966 result_t
XIMC_API command_move_calb (device_t
id,
float Position,
const calibration_t* calibration);
2991 result_t
XIMC_API command_movr_calb (device_t
id,
float DeltaPosition,
const calibration_t* calibration);
4151 #if defined(__cplusplus)