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.0
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_BRUSHLESS 0x05
569 #define DRIVER_TYPE_DISCRETE_FET 0x01
570 #define DRIVER_TYPE_INTEGRATE 0x02
571 #define DRIVER_TYPE_EXTERNAL 0x03
591 #define POWER_REDUCT_ENABLED 0x01
592 #define POWER_OFF_ENABLED 0x02
593 #define POWER_SMOOTH_CURRENT 0x04
613 #define ALARM_ON_DRIVER_OVERHEATING 0x01
614 #define LOW_UPWR_PROTECTION 0x02
615 #define H_BRIDGE_ALERT 0x04
616 #define ALARM_ON_BORDERS_SWAP_MISSET 0x08
617 #define ALARM_FLAGS_STICKING 0x10
618 #define USB_BREAK_RECONNECT 0x20
637 #define SETPOS_IGNORE_POSITION 0x01
638 #define SETPOS_IGNORE_ENCODER 0x02
655 #define FEEDBACK_ENCODER 0x01
656 #define FEEDBACK_ENCODERHALL 0x03
657 #define FEEDBACK_EMF 0x04
658 #define FEEDBACK_NONE 0x05
675 #define FEEDBACK_ENC_REVERSE 0x01
676 #define FEEDBACK_HALL_REVERSE 0x02
694 #define SYNCIN_ENABLED 0x01
695 #define SYNCIN_INVERT 0x02
696 #define SYNCIN_GOTOPOSITION 0x04
714 #define SYNCOUT_ENABLED 0x01
715 #define SYNCOUT_STATE 0x02
716 #define SYNCOUT_INVERT 0x04
717 #define SYNCOUT_IN_STEPS 0x08
718 #define SYNCOUT_ONSTART 0x10
719 #define SYNCOUT_ONSTOP 0x20
720 #define SYNCOUT_ONPERIOD 0x40
738 #define EXTIO_SETUP_OUTPUT 0x01
739 #define EXTIO_SETUP_INVERT 0x02
757 #define EXTIO_SETUP_MODE_IN_NOP 0x00
758 #define EXTIO_SETUP_MODE_IN_STOP 0x01
759 #define EXTIO_SETUP_MODE_IN_PWOF 0x02
760 #define EXTIO_SETUP_MODE_IN_MOVR 0x03
761 #define EXTIO_SETUP_MODE_IN_HOME 0x04
762 #define EXTIO_SETUP_MODE_OUT_OFF 0x00
763 #define EXTIO_SETUP_MODE_OUT_ON 0x10
764 #define EXTIO_SETUP_MODE_OUT_MOVING 0x20
765 #define EXTIO_SETUP_MODE_OUT_ALARM 0x30
766 #define EXTIO_SETUP_MODE_OUT_MOTOR_ON 0x40
767 #define EXTIO_SETUP_MODE_OUT_MOTOR_FOUND 0x50
788 #define BORDER_IS_ENCODER 0x01
789 #define BORDER_STOP_LEFT 0x02
790 #define BORDER_STOP_RIGHT 0x04
791 #define BORDERS_SWAP_MISSET_DETECTION 0x08
812 #define ENDER_SWAP 0x01
813 #define ENDER_SW1_ACTIVE_LOW 0x02
814 #define ENDER_SW2_ACTIVE_LOW 0x04
835 #define BRAKE_ENABLED 0x01
836 #define BRAKE_ENG_PWROFF 0x02
857 #define CONTROL_MODE_BITS 0x03
858 #define CONTROL_MODE_OFF 0x00
859 #define CONTROL_MODE_JOY 0x01
860 #define CONTROL_MODE_LR 0x02
861 #define CONTROL_BTN_LEFT_PUSHED_OPEN 0x04
862 #define CONTROL_BTN_RIGHT_PUSHED_OPEN 0x08
881 #define JOY_REVERSE 0x01
902 #define CTP_ENABLED 0x01
903 #define CTP_BASE 0x02
904 #define CTP_ALARM_ON_ERROR 0x04
905 #define REV_SENS_INV 0x08
927 #define HOME_DIR_FIRST 0x01
928 #define HOME_DIR_SECOND 0x02
929 #define HOME_MV_SEC_EN 0x04
930 #define HOME_HALF_MV 0x08
931 #define HOME_STOP_FIRST_BITS 0x30
932 #define HOME_STOP_FIRST_REV 0x10
933 #define HOME_STOP_FIRST_SYN 0x20
934 #define HOME_STOP_FIRST_LIM 0x30
935 #define HOME_STOP_SECOND_BITS 0xC0
936 #define HOME_STOP_SECOND_REV 0x40
937 #define HOME_STOP_SECOND_SYN 0x80
938 #define HOME_STOP_SECOND_LIM 0xC0
953 #define UART_PARITY_BITS 0x03
954 #define UART_PARITY_BIT_EVEN 0x00
955 #define UART_PARITY_BIT_ODD 0x01
956 #define UART_PARITY_BIT_SPACE 0x02
957 #define UART_PARITY_BIT_MARK 0x03
958 #define UART_PARITY_BIT_USE 0x04
959 #define UART_STOP_BIT 0x08
974 #define MOTOR_TYPE_STEP 0x01
975 #define MOTOR_TYPE_DC 0x02
976 #define MOTOR_TYPE_BLDC 0x03
991 #define ENCSET_DIFFERENTIAL_OUTPUT 0x001
992 #define ENCSET_PUSHPULL_OUTPUT 0x004
993 #define ENCSET_INDEXCHANNEL_PRESENT 0x010
994 #define ENCSET_REVOLUTIONSENSOR_PRESENT 0x040
995 #define ENCSET_REVOLUTIONSENSOR_ACTIVE_HIGH 0x100
1010 #define MB_AVAILABLE 0x01
1011 #define MB_POWERED_HOLD 0x02
1026 #define TS_TYPE_BITS 0x07
1027 #define TS_TYPE_THERMOCOUPLE 0x01
1028 #define TS_TYPE_SEMICONDUCTOR 0x02
1029 #define TS_AVAILABLE 0x08
1044 #define LS_ON_SW1_AVAILABLE 0x01
1045 #define LS_ON_SW2_AVAILABLE 0x02
1046 #define LS_SW1_ACTIVE_LOW 0x04
1047 #define LS_SW2_ACTIVE_LOW 0x08
1048 #define LS_SHORTED 0x10
1452 unsigned int MaxSpeed[10];
1453 unsigned int uMaxSpeed[10];
1454 unsigned int Timeout[9];
1464 unsigned int Timeout[9];
1577 char ControllerName[17];
1756 char Manufacturer[5];
1757 char ManufacturerId[3];
1758 char ProductDescription[9];
1779 unsigned int Key[32];
1824 unsigned int deprecated;
1842 unsigned int DebugData[128];
1856 char PositionerName[17];
1872 char Manufacturer[17];
1873 char PartNumber[25];
1913 char Manufacturer[17];
1914 char PartNumber[25];
1968 char Manufacturer[17];
1969 char PartNumber[25];
2006 char Manufacturer[17];
2007 char PartNumber[25];
2043 char Manufacturer[17];
2044 char PartNumber[25];
2082 char MagneticBrakeInfo[25];
2087 char TemperatureSensorInfo[25];
2965 result_t
XIMC_API command_move_calb (device_t
id,
float Position,
const calibration_t* calibration);
2990 result_t
XIMC_API command_movr_calb (device_t
id,
float DeltaPosition,
const calibration_t* calibration);
4150 #if defined(__cplusplus)