libximc  3.1.1
ximc.h
Go to the documentation of this file.
1 #ifndef INC_XIMC_H
2 #define INC_XIMC_H
3 
25 #if defined(_WIN32) || defined(LABVIEW64_IMPORT) || defined(LABVIEW32_IMPORT) || defined(MATLAB_IMPORT)
26  #define XIMC_API __stdcall
27 #else
28  #ifdef LIBXIMC_EXPORTS
29  #define XIMC_API __attribute__((visibility("default")))
30  #else
31  #define XIMC_API
32  #endif
33 #endif
34 
43 #if defined(_WIN32) || defined(LABVIEW64_IMPORT) || defined(LABVIEW32_IMPORT) || defined(MATLAB_IMPORT)
44  #define XIMC_CALLCONV __stdcall
45 #else
46  #define XIMC_CALLCONV
47 #endif
48 
57 #if defined(_WIN32) || defined(LABVIEW64_IMPORT) || defined(LABVIEW32_IMPORT) || defined(MATLAB_IMPORT)
58 #define XIMC_RETTYPE unsigned int
59 #else
60 #define XIMC_RETTYPE void*
61 #endif
62 
63 
64 #if !defined(XIMC_NO_STDINT)
65 
66 #if ( (defined(_MSC_VER) && (_MSC_VER < 1600)) || defined(LABVIEW64_IMPORT) || defined(LABVIEW32_IMPORT)) && !defined(MATLAB_IMPORT)
67 // msvc types burden
68 typedef __int8 int8_t;
69 typedef __int16 int16_t;
70 typedef __int32 int32_t;
71 typedef __int64 int64_t;
72 typedef unsigned __int8 uint8_t;
73 typedef unsigned __int16 uint16_t;
74 typedef unsigned __int32 uint32_t;
75 typedef unsigned __int64 uint64_t;
76 #else
77 #include <stdint.h>
78 #endif
79 
80 /* labview doesn't speak C99 */
81 #if defined(LABVIEW64_IMPORT) || defined(LABVIEW32_IMPORT)
82 typedef unsigned __int64 ulong_t;
83 typedef __int64 long_t;
84 #else
85 typedef unsigned long long ulong_t;
86 typedef long long long_t;
87 #endif
88 
89 #endif
90 
91 #include <time.h>
92 
93 #if defined(__cplusplus)
94 extern "C"
95 {
96 #endif
97 
98 
107  typedef int device_t;
108 
117  typedef int result_t;
118 
127  #if defined(_WIN64) || defined(__LP64__) || defined(LABVIEW64_IMPORT)
128  typedef uint64_t device_enumeration_t;
129  #else
130  typedef uint32_t device_enumeration_t;
131  #endif
132  //typedef device_enumeration_t* pdevice_enumeration_t;
133 
142 #define device_undefined -1
143 
152 
161 #define result_ok 0
162 
171 #define result_error -1
172 
181 #define result_not_implemented -2
182 
191 #define result_value_error -3
192 
201 #define result_nodevice -4
202 
204 
213 
222 #define LOGLEVEL_ERROR 0x01
223 
231 #define LOGLEVEL_WARNING 0x02
232 
240 #define LOGLEVEL_INFO 0x03
241 
249 #define LOGLEVEL_DEBUG 0x04
250 
251 
252 
296  typedef struct calibration_t
297  {
298  double A;
326  unsigned int MicrostepMode;
327  } calibration_t;
328 
337  {
338  uint32_t ipv4;
339  char nodename[16];
341  uint32_t axis_state;
342  char locker_username[16];
343  char locker_nodename[16];
344  time_t locked_time;
346 
347 
348 
350 #define LIBXIMC_VERSION 3.1.1
351 
355 #define LIBXIMC_PROTOCOL_VERSION 20.15
356 
359 /*
360  ------------------------------------------
361  BEGIN OF GENERATED struct declarations
362  ------------------------------------------
363 */
364 
376 #define ENUMERATE_PROBE 0x01
377 #define ENUMERATE_ALL_COM 0x02
378 #define ENUMERATE_NETWORK 0x04
380 
381 
398 #define MOVE_STATE_MOVING 0x01
399 #define MOVE_STATE_TARGET_SPEED 0x02
400 #define MOVE_STATE_ANTIPLAY 0x04
402 
403 
419 #define EEPROM_PRECEDENCE 0x01
421 
422 
439 #define PWR_STATE_UNKNOWN 0x00
440 #define PWR_STATE_OFF 0x01
441 #define PWR_STATE_NORM 0x03
442 #define PWR_STATE_REDUCT 0x04
443 #define PWR_STATE_MAX 0x05
445 
446 
465 #define STATE_CONTR 0x000003F
466 #define STATE_ERRC 0x0000001
467 #define STATE_ERRD 0x0000002
468 #define STATE_ERRV 0x0000004
469 #define STATE_EEPROM_CONNECTED 0x0000010
470 #define STATE_IS_HOMED 0x0000020
471 #define STATE_SECUR 0x1B3FFC0
472 #define STATE_ALARM 0x0000040
473 #define STATE_CTP_ERROR 0x0000080
474 #define STATE_POWER_OVERHEAT 0x0000100
475 #define STATE_CONTROLLER_OVERHEAT 0x0000200
476 #define STATE_OVERLOAD_POWER_VOLTAGE 0x0000400
477 #define STATE_OVERLOAD_POWER_CURRENT 0x0000800
478 #define STATE_OVERLOAD_USB_VOLTAGE 0x0001000
479 #define STATE_LOW_USB_VOLTAGE 0x0002000
480 #define STATE_OVERLOAD_USB_CURRENT 0x0004000
481 #define STATE_BORDERS_SWAP_MISSET 0x0008000
482 #define STATE_LOW_POWER_VOLTAGE 0x0010000
483 #define STATE_H_BRIDGE_FAULT 0x0020000
484 #define STATE_WINDING_RES_MISMATCH 0x0100000
485 #define STATE_ENCODER_FAULT 0x0200000
486 #define STATE_ENGINE_RESPONSE_ERROR 0x0800000
487 #define STATE_EXTIO_ALARM 0x1000000
489 
490 
509 #define STATE_DIG_SIGNAL 0xFFFF
510 #define STATE_RIGHT_EDGE 0x0001
511 #define STATE_LEFT_EDGE 0x0002
512 #define STATE_BUTTON_RIGHT 0x0004
513 #define STATE_BUTTON_LEFT 0x0008
514 #define STATE_GPIO_PINOUT 0x0010
515 #define STATE_GPIO_LEVEL 0x0020
516 #define STATE_BRAKE 0x0200
517 #define STATE_REV_SENSOR 0x0400
518 #define STATE_SYNC_INPUT 0x0800
519 #define STATE_SYNC_OUTPUT 0x1000
520 #define STATE_ENC_A 0x2000
521 #define STATE_ENC_B 0x4000
523 
524 
553 #define ENC_STATE_ABSENT 0x00
554 #define ENC_STATE_UNKNOWN 0x01
555 #define ENC_STATE_MALFUNC 0x02
556 #define ENC_STATE_REVERS 0x03
557 #define ENC_STATE_OK 0x04
559 
560 
577 #define WIND_A_STATE_ABSENT 0x00
578 #define WIND_A_STATE_UNKNOWN 0x01
579 #define WIND_A_STATE_MALFUNC 0x02
580 #define WIND_A_STATE_OK 0x03
581 #define WIND_B_STATE_ABSENT 0x00
582 #define WIND_B_STATE_UNKNOWN 0x10
583 #define WIND_B_STATE_MALFUNC 0x20
584 #define WIND_B_STATE_OK 0x30
586 
587 
606 #define MVCMD_NAME_BITS 0x3F
607 #define MVCMD_UKNWN 0x00
608 #define MVCMD_MOVE 0x01
609 #define MVCMD_MOVR 0x02
610 #define MVCMD_LEFT 0x03
611 #define MVCMD_RIGHT 0x04
612 #define MVCMD_STOP 0x05
613 #define MVCMD_HOME 0x06
614 #define MVCMD_LOFT 0x07
615 #define MVCMD_SSTP 0x08
616 #define MVCMD_ERROR 0x40
617 #define MVCMD_RUNNING 0x80
619 
620 
640 #define RPM_DIV_1000 0x01
642 
643 
663 #define ENGINE_REVERSE 0x001
664 #define ENGINE_CURRENT_AS_RMS 0x002
665 #define ENGINE_MAX_SPEED 0x004
666 #define ENGINE_ANTIPLAY 0x008
667 #define ENGINE_ACCEL_ON 0x010
668 #define ENGINE_LIMIT_VOLT 0x020
669 #define ENGINE_LIMIT_CURR 0x040
670 #define ENGINE_LIMIT_RPM 0x080
671 #define ENGINE_USE_PEAK_CURRENT 0x100
673 
674 
695 #define MICROSTEP_MODE_FULL 0x01
696 #define MICROSTEP_MODE_FRAC_2 0x02
697 #define MICROSTEP_MODE_FRAC_4 0x03
698 #define MICROSTEP_MODE_FRAC_8 0x04
699 #define MICROSTEP_MODE_FRAC_16 0x05
700 #define MICROSTEP_MODE_FRAC_32 0x06
701 #define MICROSTEP_MODE_FRAC_64 0x07
702 #define MICROSTEP_MODE_FRAC_128 0x08
703 #define MICROSTEP_MODE_FRAC_256 0x09
705 
706 
727 #define ENGINE_TYPE_NONE 0x00
728 #define ENGINE_TYPE_DC 0x01
729 #define ENGINE_TYPE_2DC 0x02
730 #define ENGINE_TYPE_STEP 0x03
731 #define ENGINE_TYPE_TEST 0x04
732 #define ENGINE_TYPE_BRUSHLESS 0x05
734 
735 
756 #define DRIVER_TYPE_INTEGRATE 0x02
757 #define DRIVER_TYPE_EXTERNAL 0x03
759 
760 
779 #define POWER_REDUCT_ENABLED 0x01
780 #define POWER_OFF_ENABLED 0x02
781 #define POWER_SMOOTH_CURRENT 0x04
783 
784 
803 #define ALARM_ON_DRIVER_OVERHEATING 0x01
804 #define LOW_UPWR_PROTECTION 0x02
805 #define H_BRIDGE_ALERT 0x04
806 #define ALARM_ON_BORDERS_SWAP_MISSET 0x08
807 #define ALARM_FLAGS_STICKING 0x10
808 #define BRAKING_OVERVOLTAGE_PROTECTION 0x20
809 #define ALARM_WINDING_MISMATCH 0x40
810 #define ALARM_ENGINE_RESPONSE 0x80
812 
813 
831 #define SETPOS_IGNORE_POSITION 0x01
832 #define SETPOS_IGNORE_ENCODER 0x02
834 
835 
851 #define FEEDBACK_ENCODER 0x01
852 #define FEEDBACK_EMF 0x04
853 #define FEEDBACK_NONE 0x05
854 #define FEEDBACK_ENCODER_MEDIATED 0x06
856 
857 
873 #define FEEDBACK_ENC_REVERSE 0x01
874 #define FEEDBACK_ENC_ADAPTIVE_HOLDING 0x02
875 #define FEEDBACK_ENC_FILTER_NONE 0x00
876 #define FEEDBACK_ENC_FILTER_WEAK 0x10
877 #define FEEDBACK_ENC_FILTER_MEDIUM 0x20
878 #define FEEDBACK_ENC_FILTER_STRONG 0x30
879 #define FEEDBACK_ENC_FILTER_BITS 0x30
880 #define FEEDBACK_ENC_TYPE_AUTO 0x00
881 #define FEEDBACK_ENC_TYPE_SINGLE_ENDED 0x40
882 #define FEEDBACK_ENC_TYPE_DIFFERENTIAL 0x80
883 #define FEEDBACK_ENC_TYPE_BITS 0xC0
885 
886 
900 #define SYNCIN_ENABLED 0x01
901 #define SYNCIN_INVERT 0x02
902 #define SYNCIN_GOTOPOSITION 0x04
904 
905 
919 #define SYNCOUT_ENABLED 0x01
920 #define SYNCOUT_STATE 0x02
921 #define SYNCOUT_INVERT 0x04
922 #define SYNCOUT_IN_STEPS 0x08
923 #define SYNCOUT_ONSTART 0x10
924 #define SYNCOUT_ONSTOP 0x20
925 #define SYNCOUT_ONPERIOD 0x40
927 
928 
944 #define EXTIO_SETUP_OUTPUT 0x01
945 #define EXTIO_SETUP_INVERT 0x02
947 
948 
965 #define EXTIO_SETUP_MODE_IN_BITS 0x0F
966 #define EXTIO_SETUP_MODE_IN_NOP 0x00
967 #define EXTIO_SETUP_MODE_IN_STOP 0x01
968 #define EXTIO_SETUP_MODE_IN_PWOF 0x02
969 #define EXTIO_SETUP_MODE_IN_MOVR 0x03
970 #define EXTIO_SETUP_MODE_IN_HOME 0x04
971 #define EXTIO_SETUP_MODE_IN_ALARM 0x05
972 #define EXTIO_SETUP_MODE_OUT_BITS 0xF0
973 #define EXTIO_SETUP_MODE_OUT_OFF 0x00
974 #define EXTIO_SETUP_MODE_OUT_ON 0x10
975 #define EXTIO_SETUP_MODE_OUT_MOVING 0x20
976 #define EXTIO_SETUP_MODE_OUT_ALARM 0x30
977 #define EXTIO_SETUP_MODE_OUT_MOTOR_ON 0x40
979 
980 
1000 #define BORDER_IS_ENCODER 0x01
1001 #define BORDER_STOP_LEFT 0x02
1002 #define BORDER_STOP_RIGHT 0x04
1003 #define BORDERS_SWAP_MISSET_DETECTION 0x08
1005 
1006 
1026 #define ENDER_SWAP 0x01
1027 #define ENDER_SW1_ACTIVE_LOW 0x02
1028 #define ENDER_SW2_ACTIVE_LOW 0x04
1030 
1031 
1051 #define BRAKE_ENABLED 0x01
1052 #define BRAKE_ENG_PWROFF 0x02
1054 
1055 
1075 #define CONTROL_MODE_BITS 0x03
1076 #define CONTROL_MODE_OFF 0x00
1077 #define CONTROL_MODE_JOY 0x01
1078 #define CONTROL_MODE_LR 0x02
1079 #define CONTROL_BTN_LEFT_PUSHED_OPEN 0x04
1080 #define CONTROL_BTN_RIGHT_PUSHED_OPEN 0x08
1082 
1083 
1101 #define JOY_REVERSE 0x01
1103 
1104 
1124 #define CTP_ENABLED 0x01
1125 #define CTP_BASE 0x02
1126 #define CTP_ALARM_ON_ERROR 0x04
1127 #define REV_SENS_INV 0x08
1128 #define CTP_ERROR_CORRECTION 0x10
1130 
1131 
1152 #define HOME_DIR_FIRST 0x001
1153 #define HOME_DIR_SECOND 0x002
1154 #define HOME_MV_SEC_EN 0x004
1155 #define HOME_HALF_MV 0x008
1156 #define HOME_STOP_FIRST_BITS 0x030
1157 #define HOME_STOP_FIRST_REV 0x010
1158 #define HOME_STOP_FIRST_SYN 0x020
1159 #define HOME_STOP_FIRST_LIM 0x030
1160 #define HOME_STOP_SECOND_BITS 0x0C0
1161 #define HOME_STOP_SECOND_REV 0x040
1162 #define HOME_STOP_SECOND_SYN 0x080
1163 #define HOME_STOP_SECOND_LIM 0x0C0
1164 #define HOME_USE_FAST 0x100
1166 
1167 
1181 #define UART_PARITY_BITS 0x03
1182 #define UART_PARITY_BIT_EVEN 0x00
1183 #define UART_PARITY_BIT_ODD 0x01
1184 #define UART_PARITY_BIT_SPACE 0x02
1185 #define UART_PARITY_BIT_MARK 0x03
1186 #define UART_PARITY_BIT_USE 0x04
1187 #define UART_STOP_BIT 0x08
1189 
1190 
1204 #define MOTOR_TYPE_UNKNOWN 0x00
1205 #define MOTOR_TYPE_STEP 0x01
1206 #define MOTOR_TYPE_DC 0x02
1207 #define MOTOR_TYPE_BLDC 0x03
1209 
1210 
1224 #define ENCSET_DIFFERENTIAL_OUTPUT 0x001
1225 #define ENCSET_PUSHPULL_OUTPUT 0x004
1226 #define ENCSET_INDEXCHANNEL_PRESENT 0x010
1227 #define ENCSET_REVOLUTIONSENSOR_PRESENT 0x040
1228 #define ENCSET_REVOLUTIONSENSOR_ACTIVE_HIGH 0x100
1230 
1231 
1245 #define MB_AVAILABLE 0x01
1246 #define MB_POWERED_HOLD 0x02
1248 
1249 
1263 #define TS_TYPE_BITS 0x07
1264 #define TS_TYPE_UNKNOWN 0x00
1265 #define TS_TYPE_THERMOCOUPLE 0x01
1266 #define TS_TYPE_SEMICONDUCTOR 0x02
1267 #define TS_AVAILABLE 0x08
1269 
1270 
1284 #define LS_ON_SW1_AVAILABLE 0x01
1285 #define LS_ON_SW2_AVAILABLE 0x02
1286 #define LS_SW1_ACTIVE_LOW 0x04
1287 #define LS_SW2_ACTIVE_LOW 0x08
1288 #define LS_SHORTED 0x10
1290 
1291 
1307 #define BACK_EMF_INDUCTANCE_AUTO 0x01
1308 #define BACK_EMF_RESISTANCE_AUTO 0x02
1309 #define BACK_EMF_KM_AUTO 0x04
1311 
1312 
1324  typedef struct
1325  {
1326  unsigned int IPS;
1327  unsigned int FeedbackType;
1328  unsigned int FeedbackFlags;
1329  unsigned int CountsPerTurn;
1331 
1346  typedef struct
1347  {
1348  unsigned int FastHome;
1349  unsigned int uFastHome;
1350  unsigned int SlowHome;
1351  unsigned int uSlowHome;
1354  unsigned int HomeFlags;
1355  } home_settings_t;
1356 
1372  typedef struct
1373  {
1374  float FastHome;
1375  float SlowHome;
1376  float HomeDelta;
1377  unsigned int HomeFlags;
1379 
1391  typedef struct
1392  {
1393  unsigned int Speed;
1394  unsigned int uSpeed;
1395  unsigned int Accel;
1396  unsigned int Decel;
1397  unsigned int AntiplaySpeed;
1398  unsigned int uAntiplaySpeed;
1399  unsigned int MoveFlags;
1400  } move_settings_t;
1401 
1413  typedef struct
1414  {
1415  float Speed;
1427  float Accel;
1439  float Decel;
1463  unsigned int MoveFlags;
1465 
1482  typedef struct
1483  {
1484  unsigned int NomVoltage;
1485  unsigned int NomCurrent;
1486  unsigned int NomSpeed;
1487  unsigned int uNomSpeed;
1488  unsigned int EngineFlags;
1489  int Antiplay;
1490  unsigned int MicrostepMode;
1491  unsigned int StepsPerRev;
1492  unsigned int PeakCurrent;
1494 
1512  typedef struct
1513  {
1514  unsigned int NomVoltage;
1515  unsigned int NomCurrent;
1516  float NomSpeed;
1517  unsigned int EngineFlags;
1518  float Antiplay;
1519  unsigned int MicrostepMode;
1520  unsigned int StepsPerRev;
1521  unsigned int PeakCurrent;
1523 
1540  typedef struct
1541  {
1542  unsigned int EngineType;
1543  unsigned int DriverType;
1545 
1557  typedef struct
1558  {
1559  unsigned int HoldCurrent;
1560  unsigned int CurrReductDelay;
1561  unsigned int PowerOffDelay;
1562  unsigned int CurrentSetTime;
1563  unsigned int PowerFlags;
1564  } power_settings_t;
1565 
1577  typedef struct
1578  {
1579  unsigned int LowUpwrOff;
1580  unsigned int CriticalIpwr;
1581  unsigned int CriticalUpwr;
1582  unsigned int CriticalT;
1583  unsigned int CriticalIusb;
1584  unsigned int CriticalUusb;
1585  unsigned int MinimumUusb;
1586  unsigned int Flags;
1588 
1604  typedef struct
1605  {
1606  unsigned int BorderFlags;
1607  unsigned int EnderFlags;
1612  } edges_settings_t;
1613 
1629  typedef struct
1630  {
1631  unsigned int BorderFlags;
1632  unsigned int EnderFlags;
1633  float LeftBorder;
1634  float RightBorder;
1636 
1654  typedef struct
1655  {
1656  unsigned int KpU;
1657  unsigned int KiU;
1658  unsigned int KdU;
1659  float Kpf;
1660  float Kif;
1661  float Kdf;
1662  } pid_settings_t;
1663 
1678  typedef struct
1679  {
1680  unsigned int SyncInFlags;
1681  unsigned int ClutterTime;
1682  int Position;
1684  unsigned int Speed;
1685  unsigned int uSpeed;
1686  unsigned int reserved0;
1688 
1702  typedef struct
1703  {
1704  unsigned int SyncInFlags;
1705  unsigned int ClutterTime;
1706  float Position;
1707  float Speed;
1708  unsigned int reserved0;
1710 
1724  typedef struct
1725  {
1726  unsigned int SyncOutFlags;
1727  unsigned int SyncOutPulseSteps;
1728  unsigned int SyncOutPeriod;
1729  unsigned int Accuracy;
1730  unsigned int uAccuracy;
1732 
1747  typedef struct
1748  {
1749  unsigned int SyncOutFlags;
1750  unsigned int SyncOutPulseSteps;
1751  unsigned int SyncOutPeriod;
1752  float Accuracy;
1754 
1771  typedef struct
1772  {
1773  unsigned int EXTIOSetupFlags;
1774  unsigned int EXTIOModeFlags;
1775  } extio_settings_t;
1776 
1791  typedef struct
1792  {
1793  unsigned int t1;
1794  unsigned int t2;
1795  unsigned int t3;
1796  unsigned int t4;
1797  unsigned int BrakeFlags;
1798  } brake_settings_t;
1799 
1825  typedef struct
1826  {
1827  unsigned int MaxSpeed[10];
1828  unsigned int uMaxSpeed[10];
1829  unsigned int Timeout[9];
1830  unsigned int MaxClickTime;
1831  unsigned int Flags;
1835 
1861  typedef struct
1862  {
1863  float MaxSpeed[10];
1864  unsigned int Timeout[9];
1865  unsigned int MaxClickTime;
1866  unsigned int Flags;
1869 
1902  typedef struct
1903  {
1904  unsigned int JoyLowEnd;
1905  unsigned int JoyCenter;
1906  unsigned int JoyHighEnd;
1907  unsigned int ExpFactor;
1908  unsigned int DeadZone;
1909  unsigned int JoyFlags;
1911 
1930  typedef struct
1931  {
1932  unsigned int CTPMinError;
1933  unsigned int CTPFlags;
1934  } ctp_settings_t;
1935 
1950  typedef struct
1951  {
1952  unsigned int Speed;
1953  unsigned int UARTSetupFlags;
1954  } uart_settings_t;
1955 
1969  typedef struct
1970  {
1971  unsigned int DHCPEnabled;
1972  unsigned int IPv4Address[4];
1973  unsigned int SubnetMask[4];
1974  unsigned int DefaultGateway[4];
1976 
1990  typedef struct
1991  {
1992  char UserPassword[21];
1994 
2009  typedef struct
2010  {
2011  float CSS1_A;
2012  float CSS1_B;
2013  float CSS2_A;
2014  float CSS2_B;
2018 
2028  typedef struct
2029  {
2030  char ControllerName[17];
2031  unsigned int CtrlFlags;
2033 
2043  typedef struct
2044  {
2045  unsigned int UserData[7];
2047 
2066  typedef struct
2067  {
2068  float L;
2069  float R;
2070  float Km;
2071  unsigned int BackEMFFlags;
2072  } emf_settings_t;
2073 
2090  typedef struct
2091  {
2092  unsigned int stepcloseloop_Kw;
2093  unsigned int stepcloseloop_Kp_low;
2094  unsigned int stepcloseloop_Kp_high;
2096 
2112  typedef struct
2113  {
2114  unsigned int Param1;
2116 
2131  typedef struct
2132  {
2133  int Position;
2135  long_t EncPosition;
2136  } get_position_t;
2137 
2151  typedef struct
2152  {
2153  float Position;
2154  long_t EncPosition;
2156 
2169  typedef struct
2170  {
2171  int Position;
2173  long_t EncPosition;
2174  unsigned int PosFlags;
2175  } set_position_t;
2176 
2189  typedef struct
2190  {
2191  float Position;
2192  long_t EncPosition;
2193  unsigned int PosFlags;
2195 
2208  typedef struct
2209  {
2210  unsigned int MoveSts;
2211  unsigned int MvCmdSts;
2212  unsigned int PWRSts;
2213  unsigned int EncSts;
2214  unsigned int WindSts;
2217  long_t EncPosition;
2218  int CurSpeed;
2220  int Ipwr;
2221  int Upwr;
2222  int Iusb;
2223  int Uusb;
2224  int CurT;
2225  unsigned int Flags;
2226  unsigned int GPIOFlags;
2227  unsigned int CmdBufFreeSpace;
2228  } status_t;
2229 
2242  typedef struct
2243  {
2244  unsigned int MoveSts;
2245  unsigned int MvCmdSts;
2246  unsigned int PWRSts;
2247  unsigned int EncSts;
2248  unsigned int WindSts;
2249  float CurPosition;
2250  long_t EncPosition;
2251  float CurSpeed;
2252  int Ipwr;
2253  int Upwr;
2254  int Iusb;
2255  int Uusb;
2256  int CurT;
2257  unsigned int Flags;
2258  unsigned int GPIOFlags;
2259  unsigned int CmdBufFreeSpace;
2260  } status_calb_t;
2261 
2272  typedef struct
2273  {
2274  int Speed[25];
2275  int Error[25];
2276  unsigned int Length;
2277  } measurements_t;
2278 
2292  typedef struct
2293  {
2300  unsigned int Pot;
2301  unsigned int Joy;
2303  } chart_data_t;
2304 
2315  typedef struct
2316  {
2317  char Manufacturer[5];
2318  char ManufacturerId[3];
2319  char ProductDescription[9];
2320  unsigned int Major;
2321  unsigned int Minor;
2322  unsigned int Release;
2324 
2335  typedef struct
2336  {
2337  unsigned int SN;
2338  uint8_t Key[32];
2339  unsigned int Major;
2340  unsigned int Minor;
2341  unsigned int Release;
2342  } serial_number_t;
2343 
2357  typedef struct
2358  {
2359  unsigned int A1Voltage_ADC;
2360  unsigned int A2Voltage_ADC;
2361  unsigned int B1Voltage_ADC;
2362  unsigned int B2Voltage_ADC;
2363  unsigned int SupVoltage_ADC;
2364  unsigned int ACurrent_ADC;
2365  unsigned int BCurrent_ADC;
2366  unsigned int FullCurrent_ADC;
2367  unsigned int Temp_ADC;
2368  unsigned int Joy_ADC;
2369  unsigned int Pot_ADC;
2370  unsigned int Enc_Check_ADC;
2371  unsigned int deprecated0;
2377  int ACurrent;
2378  int BCurrent;
2380  int Temp;
2381  int Joy;
2382  int Pot;
2384  unsigned int deprecated1[2];
2385  int R;
2386  int L;
2387  } analog_data_t;
2388 
2400  typedef struct
2401  {
2402  uint8_t DebugData[128];
2403  } debug_read_t;
2404 
2416  typedef struct
2417  {
2418  uint8_t DebugData[128];
2419  } debug_write_t;
2420 
2430  typedef struct
2431  {
2432  char PositionerName[17];
2433  } stage_name_t;
2434 
2446  typedef struct
2447  {
2448  char Manufacturer[17];
2449  char PartNumber[25];
2451 
2463  typedef struct
2464  {
2466  char Units[9];
2467  float MaxSpeed;
2468  float TravelRange;
2474  } stage_settings_t;
2475 
2487  typedef struct
2488  {
2489  char Manufacturer[17];
2490  char PartNumber[25];
2492 
2504  typedef struct
2505  {
2506  unsigned int MotorType;
2507  unsigned int ReservedField;
2508  unsigned int Poles;
2509  unsigned int Phases;
2518  float StallTorque;
2524  float MaxSpeed;
2525  float MaxCurrent;
2528  float NoLoadSpeed;
2529  } motor_settings_t;
2530 
2542  typedef struct
2543  {
2544  char Manufacturer[17];
2545  char PartNumber[25];
2547 
2559  typedef struct
2560  {
2565  unsigned int PPR;
2566  unsigned int EncoderSettings;
2568 
2580  typedef struct
2581  {
2582  char Manufacturer[17];
2583  char PartNumber[25];
2585 
2597  typedef struct
2598  {
2603  unsigned int PPR;
2605 
2617  typedef struct
2618  {
2619  char Manufacturer[17];
2620  char PartNumber[25];
2622 
2634  typedef struct
2635  {
2636  float ReductionIn;
2642  float Efficiency;
2643  } gear_settings_t;
2644 
2656  typedef struct
2657  {
2658  char MagneticBrakeInfo[25];
2661  float MBTorque;
2662  unsigned int MBSettings;
2663  char TemperatureSensorInfo[25];
2664  float TSMin;
2665  float TSMax;
2666  float TSGrad;
2667  unsigned int TSSettings;
2668  unsigned int LimitSwitchesSettings;
2670 
2683  typedef struct
2684  {
2685  uint8_t key[16];
2686  } init_random_t;
2687 
2697  typedef struct
2698  {
2699  unsigned int UniqueID0;
2700  unsigned int UniqueID1;
2701  unsigned int UniqueID2;
2702  unsigned int UniqueID3;
2704 
2705 /*
2706  --------------------------------------------
2707  BEGIN OF GENERATED function declarations
2708  --------------------------------------------
2709 */
2710 
2723 
2742  result_t XIMC_API set_feedback_settings (device_t id, const feedback_settings_t* feedback_settings);
2743 
2762  result_t XIMC_API get_feedback_settings (device_t id, feedback_settings_t* feedback_settings);
2763 
2780  result_t XIMC_API set_home_settings (device_t id, const home_settings_t* home_settings);
2781 
2800  result_t XIMC_API set_home_settings_calb (device_t id, const home_settings_calb_t* home_settings_calb, const calibration_t* calibration);
2801 
2818  result_t XIMC_API get_home_settings (device_t id, home_settings_t* home_settings);
2819 
2838  result_t XIMC_API get_home_settings_calb (device_t id, home_settings_calb_t* home_settings_calb, const calibration_t* calibration);
2839 
2852  result_t XIMC_API set_move_settings (device_t id, const move_settings_t* move_settings);
2853 
2868  result_t XIMC_API set_move_settings_calb (device_t id, const move_settings_calb_t* move_settings_calb, const calibration_t* calibration);
2869 
2882  result_t XIMC_API get_move_settings (device_t id, move_settings_t* move_settings);
2883 
2898  result_t XIMC_API get_move_settings_calb (device_t id, move_settings_calb_t* move_settings_calb, const calibration_t* calibration);
2899 
2918  result_t XIMC_API set_engine_settings (device_t id, const engine_settings_t* engine_settings);
2919 
2940  result_t XIMC_API set_engine_settings_calb (device_t id, const engine_settings_calb_t* engine_settings_calb, const calibration_t* calibration);
2941 
2960  result_t XIMC_API get_engine_settings (device_t id, engine_settings_t* engine_settings);
2961 
2982  result_t XIMC_API get_engine_settings_calb (device_t id, engine_settings_calb_t* engine_settings_calb, const calibration_t* calibration);
2983 
2996  result_t XIMC_API set_entype_settings (device_t id, const entype_settings_t* entype_settings);
2997 
3010  result_t XIMC_API get_entype_settings (device_t id, entype_settings_t* entype_settings);
3011 
3025  result_t XIMC_API set_power_settings (device_t id, const power_settings_t* power_settings);
3026 
3040  result_t XIMC_API get_power_settings (device_t id, power_settings_t* power_settings);
3041 
3055  result_t XIMC_API set_secure_settings (device_t id, const secure_settings_t* secure_settings);
3056 
3070  result_t XIMC_API get_secure_settings (device_t id, secure_settings_t* secure_settings);
3071 
3086  result_t XIMC_API set_edges_settings (device_t id, const edges_settings_t* edges_settings);
3087 
3112  result_t XIMC_API set_edges_settings_calb (device_t id, const edges_settings_calb_t* edges_settings_calb, const calibration_t* calibration);
3113 
3128  result_t XIMC_API get_edges_settings (device_t id, edges_settings_t* edges_settings);
3129 
3154  result_t XIMC_API get_edges_settings_calb (device_t id, edges_settings_calb_t* edges_settings_calb, const calibration_t* calibration);
3155 
3174  result_t XIMC_API set_pid_settings (device_t id, const pid_settings_t* pid_settings);
3175 
3193  result_t XIMC_API get_pid_settings (device_t id, pid_settings_t* pid_settings);
3194 
3211  result_t XIMC_API set_sync_in_settings (device_t id, const sync_in_settings_t* sync_in_settings);
3212 
3231  result_t XIMC_API set_sync_in_settings_calb (device_t id, const sync_in_settings_calb_t* sync_in_settings_calb, const calibration_t* calibration);
3232 
3249  result_t XIMC_API get_sync_in_settings (device_t id, sync_in_settings_t* sync_in_settings);
3250 
3269  result_t XIMC_API get_sync_in_settings_calb (device_t id, sync_in_settings_calb_t* sync_in_settings_calb, const calibration_t* calibration);
3270 
3287  result_t XIMC_API set_sync_out_settings (device_t id, const sync_out_settings_t* sync_out_settings);
3288 
3307  result_t XIMC_API set_sync_out_settings_calb (device_t id, const sync_out_settings_calb_t* sync_out_settings_calb, const calibration_t* calibration);
3308 
3323  result_t XIMC_API get_sync_out_settings (device_t id, sync_out_settings_t* sync_out_settings);
3324 
3343  result_t XIMC_API get_sync_out_settings_calb (device_t id, sync_out_settings_calb_t* sync_out_settings_calb, const calibration_t* calibration);
3344 
3362  result_t XIMC_API set_extio_settings (device_t id, const extio_settings_t* extio_settings);
3363 
3379  result_t XIMC_API get_extio_settings (device_t id, extio_settings_t* extio_settings);
3380 
3393  result_t XIMC_API set_brake_settings (device_t id, const brake_settings_t* brake_settings);
3394 
3407  result_t XIMC_API get_brake_settings (device_t id, brake_settings_t* brake_settings);
3408 
3433  result_t XIMC_API set_control_settings (device_t id, const control_settings_t* control_settings);
3434 
3461  result_t XIMC_API set_control_settings_calb (device_t id, const control_settings_calb_t* control_settings_calb, const calibration_t* calibration);
3462 
3487  result_t XIMC_API get_control_settings (device_t id, control_settings_t* control_settings);
3488 
3515  result_t XIMC_API get_control_settings_calb (device_t id, control_settings_calb_t* control_settings_calb, const calibration_t* calibration);
3516 
3545  result_t XIMC_API set_joystick_settings (device_t id, const joystick_settings_t* joystick_settings);
3546 
3574  result_t XIMC_API get_joystick_settings (device_t id, joystick_settings_t* joystick_settings);
3575 
3595  result_t XIMC_API set_ctp_settings (device_t id, const ctp_settings_t* ctp_settings);
3596 
3614  result_t XIMC_API get_ctp_settings (device_t id, ctp_settings_t* ctp_settings);
3615 
3632  result_t XIMC_API set_uart_settings (device_t id, const uart_settings_t* uart_settings);
3633 
3650  result_t XIMC_API get_uart_settings (device_t id, uart_settings_t* uart_settings);
3651 
3671  result_t XIMC_API set_network_settings (device_t id, const network_settings_t* network_settings);
3672 
3692  result_t XIMC_API get_network_settings (device_t id, network_settings_t* network_settings);
3693 
3707  result_t XIMC_API set_password_settings (device_t id, const password_settings_t* password_settings);
3708 
3722  result_t XIMC_API get_password_settings (device_t id, password_settings_t* password_settings);
3723 
3740  result_t XIMC_API set_calibration_settings (device_t id, const calibration_settings_t* calibration_settings);
3741 
3758  result_t XIMC_API get_calibration_settings (device_t id, calibration_settings_t* calibration_settings);
3759 
3772  result_t XIMC_API set_controller_name (device_t id, const controller_name_t* controller_name);
3773 
3786  result_t XIMC_API get_controller_name (device_t id, controller_name_t* controller_name);
3787 
3800  result_t XIMC_API set_nonvolatile_memory (device_t id, const nonvolatile_memory_t* nonvolatile_memory);
3801 
3814  result_t XIMC_API get_nonvolatile_memory (device_t id, nonvolatile_memory_t* nonvolatile_memory);
3815 
3833  result_t XIMC_API set_emf_settings (device_t id, const emf_settings_t* emf_settings);
3834 
3851  result_t XIMC_API get_emf_settings (device_t id, emf_settings_t* emf_settings);
3852 
3871  result_t XIMC_API set_engine_advanced_setup (device_t id, const engine_advanced_setup_t* engine_advanced_setup);
3872 
3891  result_t XIMC_API get_engine_advanced_setup (device_t id, engine_advanced_setup_t* engine_advanced_setup);
3892 
3907  result_t XIMC_API set_extended_settings (device_t id, const extended_settings_t* extended_settings);
3908 
3923  result_t XIMC_API get_extended_settings (device_t id, extended_settings_t* extended_settings);
3924 
3925 
3927 
3940 
3958  result_t XIMC_API command_stop (device_t id);
3959 
3974  result_t XIMC_API command_power_off (device_t id);
3975 
3994  result_t XIMC_API command_move (device_t id, int Position, int uPosition);
3995 
4022  result_t XIMC_API command_move_calb (device_t id, float Position, const calibration_t* calibration);
4023 
4040  result_t XIMC_API command_movr (device_t id, int DeltaPosition, int uDeltaPosition);
4041 
4066  result_t XIMC_API command_movr_calb (device_t id, float DeltaPosition, const calibration_t* calibration);
4067 
4103  result_t XIMC_API command_home (device_t id);
4104 
4115  result_t XIMC_API command_left (device_t id);
4116 
4127  result_t XIMC_API command_right (device_t id);
4128 
4140  result_t XIMC_API command_loft (device_t id);
4141 
4152  result_t XIMC_API command_sstp (device_t id);
4153 
4167  result_t XIMC_API get_position (device_t id, get_position_t* the_get_position);
4168 
4191  result_t XIMC_API get_position_calb (device_t id, get_position_calb_t* the_get_position_calb, const calibration_t* calibration);
4192 
4207  result_t XIMC_API set_position (device_t id, const set_position_t* the_set_position);
4208 
4223  result_t XIMC_API set_position_calb (device_t id, const set_position_calb_t* the_set_position_calb, const calibration_t* calibration);
4224 
4235  result_t XIMC_API command_zero (device_t id);
4236 
4237 
4239 
4252 
4263  result_t XIMC_API command_save_settings (device_t id);
4264 
4275  result_t XIMC_API command_read_settings (device_t id);
4276 
4287  result_t XIMC_API command_save_robust_settings (device_t id);
4288 
4299  result_t XIMC_API command_read_robust_settings (device_t id);
4300 
4313  result_t XIMC_API command_eesave_settings (device_t id);
4314 
4325  result_t XIMC_API command_eeread_settings (device_t id);
4326 
4337  result_t XIMC_API command_start_measurements (device_t id);
4338 
4357  result_t XIMC_API get_measurements (device_t id, measurements_t* measurements);
4358 
4375  result_t XIMC_API get_chart_data (device_t id, chart_data_t* chart_data);
4376 
4389  result_t XIMC_API get_serial_number (device_t id, unsigned int* SerialNumber);
4390 
4407  result_t XIMC_API get_firmware_version (device_t id, unsigned int* Major, unsigned int* Minor, unsigned int* Release);
4408 
4419  result_t XIMC_API service_command_updf (device_t id);
4420 
4421 
4423 
4436 
4455  result_t XIMC_API set_serial_number (device_t id, const serial_number_t* serial_number);
4456 
4469  result_t XIMC_API get_analog_data (device_t id, analog_data_t* analog_data);
4470 
4485  result_t XIMC_API get_debug_read (device_t id, debug_read_t* debug_read);
4486 
4499  result_t XIMC_API set_debug_write (device_t id, const debug_write_t* debug_write);
4500 
4501 
4503 
4516 
4529  result_t XIMC_API set_stage_name (device_t id, const stage_name_t* stage_name);
4530 
4543  result_t XIMC_API get_stage_name (device_t id, stage_name_t* stage_name);
4544 
4559  result_t XIMC_API set_stage_information (device_t id, const stage_information_t* stage_information);
4560 
4573  result_t XIMC_API get_stage_information (device_t id, stage_information_t* stage_information);
4574 
4589  result_t XIMC_API set_stage_settings (device_t id, const stage_settings_t* stage_settings);
4590 
4603  result_t XIMC_API get_stage_settings (device_t id, stage_settings_t* stage_settings);
4604 
4619  result_t XIMC_API set_motor_information (device_t id, const motor_information_t* motor_information);
4620 
4633  result_t XIMC_API get_motor_information (device_t id, motor_information_t* motor_information);
4634 
4649  result_t XIMC_API set_motor_settings (device_t id, const motor_settings_t* motor_settings);
4650 
4663  result_t XIMC_API get_motor_settings (device_t id, motor_settings_t* motor_settings);
4664 
4679  result_t XIMC_API set_encoder_information (device_t id, const encoder_information_t* encoder_information);
4680 
4693  result_t XIMC_API get_encoder_information (device_t id, encoder_information_t* encoder_information);
4694 
4709  result_t XIMC_API set_encoder_settings (device_t id, const encoder_settings_t* encoder_settings);
4710 
4723  result_t XIMC_API get_encoder_settings (device_t id, encoder_settings_t* encoder_settings);
4724 
4739  result_t XIMC_API set_hallsensor_information (device_t id, const hallsensor_information_t* hallsensor_information);
4740 
4753  result_t XIMC_API get_hallsensor_information (device_t id, hallsensor_information_t* hallsensor_information);
4754 
4769  result_t XIMC_API set_hallsensor_settings (device_t id, const hallsensor_settings_t* hallsensor_settings);
4770 
4783  result_t XIMC_API get_hallsensor_settings (device_t id, hallsensor_settings_t* hallsensor_settings);
4784 
4799  result_t XIMC_API set_gear_information (device_t id, const gear_information_t* gear_information);
4800 
4813  result_t XIMC_API get_gear_information (device_t id, gear_information_t* gear_information);
4814 
4829  result_t XIMC_API set_gear_settings (device_t id, const gear_settings_t* gear_settings);
4830 
4843  result_t XIMC_API get_gear_settings (device_t id, gear_settings_t* gear_settings);
4844 
4859  result_t XIMC_API set_accessories_settings (device_t id, const accessories_settings_t* accessories_settings);
4860 
4873  result_t XIMC_API get_accessories_settings (device_t id, accessories_settings_t* accessories_settings);
4874 
4891  result_t XIMC_API get_bootloader_version (device_t id, unsigned int* Major, unsigned int* Minor, unsigned int* Release);
4892 
4905  result_t XIMC_API get_init_random (device_t id, init_random_t* init_random);
4906 
4922  result_t XIMC_API get_globally_unique_identifier (device_t id, globally_unique_identifier_t* globally_unique_identifier);
4923 
4924 
4925 /*
4926  -------------------------
4927  END OF GENERATED CODE
4928  -------------------------
4929 */
4930 
4931 /* hand-crafted functions begin */
4932 
4945  result_t XIMC_API goto_firmware(device_t id, uint8_t* ret);
4946 
4959  result_t XIMC_API has_firmware(const char* uri, uint8_t* ret);
4960 
4976  result_t XIMC_API command_update_firmware(const char* uri, const uint8_t* data, uint32_t data_size);
4977 
4992  result_t XIMC_API write_key (const char* uri, uint8_t* key);
4993 
5006  result_t XIMC_API command_reset(device_t id);
5007 
5020  result_t XIMC_API command_clear_fram(device_t id);
5021 
5023 
5024  // ------------------------------------
5025 
5037 
5065  device_t XIMC_API open_device (const char* uri);
5066 
5081  result_t XIMC_API close_device (device_t* id);
5082 
5127  result_t XIMC_API set_correction_table(device_t id, const char* namefile);
5128 
5141  result_t XIMC_API probe_device (const char* uri);
5142 
5253  device_enumeration_t XIMC_API enumerate_devices(int enumerate_flags, const char *hints);
5254 
5265  result_t XIMC_API free_enumerate_devices(device_enumeration_t device_enumeration);
5266 
5277  int XIMC_API get_device_count(device_enumeration_t device_enumeration);
5278 
5287  typedef char* pchar;
5288 
5303  pchar XIMC_API get_device_name(device_enumeration_t device_enumeration, int device_index);
5304 
5305 
5322  result_t XIMC_API get_enumerate_device_serial(device_enumeration_t device_enumeration, int device_index, uint32_t* serial);
5323 
5340  result_t XIMC_API get_enumerate_device_information(device_enumeration_t device_enumeration, int device_index, device_information_t* device_information);
5341 
5358  result_t XIMC_API get_enumerate_device_controller_name(device_enumeration_t device_enumeration, int device_index, controller_name_t* controller_name);
5359 
5376  result_t XIMC_API get_enumerate_device_stage_name(device_enumeration_t device_enumeration, int device_index, stage_name_t* stage_name);
5377 
5394  result_t XIMC_API get_enumerate_device_network_information(device_enumeration_t device_enumeration, int device_index, device_network_information_t* device_network_information);
5395 
5403  result_t XIMC_API reset_locks ();
5404 
5414  void XIMC_API msec_sleep (unsigned int msec);
5415 
5425  void XIMC_API ximc_version (char* version);
5426 
5427 #if !defined(MATLAB_IMPORT) && !defined(LABVIEW64_IMPORT) && !defined(LABVIEW32_IMPORT)
5428 
5440  typedef void (XIMC_CALLCONV *logging_callback_t)(int loglevel, const wchar_t* message, void* user_data);
5441 
5453  void XIMC_API logging_callback_stderr_wide(int loglevel, const wchar_t* message, void* user_data);
5454 
5466  void XIMC_API logging_callback_stderr_narrow(int loglevel, const wchar_t* message, void* user_data);
5467 
5480  void XIMC_API set_logging_callback(logging_callback_t logging_callback, void* user_data);
5481 
5482 #endif
5483 
5507  result_t XIMC_API get_status (device_t id, status_t* status);
5508 
5534  result_t XIMC_API get_status_calb (device_t id, status_calb_t* status, const calibration_t* calibration);
5535 
5561  result_t XIMC_API get_device_information (device_t id, device_information_t* device_information);
5562 
5581  result_t XIMC_API command_wait_for_stop(device_t id, uint32_t refresh_interval_ms);
5582 
5595  result_t XIMC_API command_homezero(device_t id);
5597 
5598 #if defined(__cplusplus)
5599 };
5600 #endif
5601 
5602 #endif
5603 
5604 // vim: ts=4 shiftwidth=4
5605 
unsigned int AntiplaySpeed
Speed in antiplay mode, full steps/s (stepper motor) or RPM (DC).
Definition: ximc.h:1397
unsigned int StepsPerRev
Number of full steps per revolution (Used with stepper motor only).
Definition: ximc.h:1520
unsigned int FullCurrent_ADC
"Full current" raw data from ADC.
Definition: ximc.h:2366
float FastHome
Speed used for first motion.
Definition: ximc.h:1374
result_t XIMC_API get_gear_information(device_t id, gear_information_t *gear_information)
Deprecated.
Control position settings (used with stepper motor only)
Definition: ximc.h:1930
result_t XIMC_API write_key(const char *uri, uint8_t *key)
Write controller key.
Globally unique identifier.
Definition: ximc.h:2697
unsigned int EngineType
Flags of engine type.
Definition: ximc.h:1542
result_t XIMC_API set_extio_settings(device_t id, const extio_settings_t *extio_settings)
Set EXTIO settings.
uint32_t axis_state
flags representing device state
Definition: ximc.h:341
Position information.
Definition: ximc.h:2151
unsigned int uSpeed
Target speed in microsteps/s.
Definition: ximc.h:1685
unsigned int EnderFlags
Limit switches flags.
Definition: ximc.h:1632
unsigned int MotorType
Motor Type flags.
Definition: ximc.h:2506
unsigned int KiU
Integral gain for voltage PID routine.
Definition: ximc.h:1657
unsigned int LowUpwrOff
Lower voltage limit to turn off the motor, in tens of mV.
Definition: ximc.h:1579
int R
Motor winding resistance in mOhms (is only used with stepper motors).
Definition: ximc.h:2385
unsigned int uFastHome
Fractional part of the speed for first motion, microsteps.
Definition: ximc.h:1349
unsigned int PPR
The number of counts per revolution.
Definition: ximc.h:2603
unsigned int SyncOutPulseSteps
This value specifies the duration of output pulse.
Definition: ximc.h:1750
unsigned int NomVoltage
Rated voltage in tens of mV.
Definition: ximc.h:1514
result_t XIMC_API set_sync_out_settings_calb(device_t id, const sync_out_settings_calb_t *sync_out_settings_calb, const calibration_t *calibration)
Set output user unit synchronization settings.
result_t XIMC_API get_sync_in_settings_calb(device_t id, sync_in_settings_calb_t *sync_in_settings_calb, const calibration_t *calibration)
Read input user unit synchronization settings.
result_t XIMC_API set_move_settings(device_t id, const move_settings_t *move_settings)
Movement settings set command (speed, acceleration, threshold, etc.).
Debug data.
Definition: ximc.h:2416
result_t XIMC_API set_position(device_t id, const set_position_t *the_set_position)
Sets position in steps and microsteps for stepper motor.
int RightBorder
Right border position, used if BORDER_IS_ENCODER flag is set.
Definition: ximc.h:1610
float MaxCurrent
The maximum current in the winding (A).
Definition: ximc.h:2525
Analog data.
Definition: ximc.h:2357
result_t XIMC_API get_motor_settings(device_t id, motor_settings_t *motor_settings)
Deprecated.
result_t XIMC_API get_status_calb(device_t id, status_calb_t *status, const calibration_t *calibration)
Return device state.
float CSS2_B
Offset for the analog measurements of the B winding current.
Definition: ximc.h:2014
unsigned int uAntiplaySpeed
Speed in antiplay mode, microsteps/s.
Definition: ximc.h:1398
float CSS2_A
Scaling factor for the analog measurements of the B winding current.
Definition: ximc.h:2013
int device_t
Type describes device identifier.
Definition: ximc.h:107
Deprecated.
Definition: ximc.h:2597
int Ipwr
Engine current, mA.
Definition: ximc.h:2220
int uDeltaPosition
Fractional part of the shift in micro steps.
Definition: ximc.h:1833
unsigned int Major
The major number of the hardware version.
Definition: ximc.h:2320
result_t XIMC_API set_home_settings_calb(device_t id, const home_settings_calb_t *home_settings_calb, const calibration_t *calibration)
Set user unit home settings.
float ReductionIn
Input reduction coefficient.
Definition: ximc.h:2636
int Uusb
USB voltage, tens of mV.
Definition: ximc.h:2255
float SupplyVoltageMax
Maximum supply voltage (V).
Definition: ximc.h:2601
float MBRatedVoltage
Rated voltage for controlling the magnetic brake (V).
Definition: ximc.h:2659
result_t XIMC_API get_debug_read(device_t id, debug_read_t *debug_read)
Read data from firmware for debug purpose.
struct calibration_t calibration_t
Calibration structure.
result_t XIMC_API command_move(device_t id, int Position, int uPosition)
Move to position.
int A1Voltage
"Voltage on pin 1 winding A" calibrated data (in tens of mV).
Definition: ximc.h:2372
result_t XIMC_API command_move_calb(device_t id, float Position, const calibration_t *calibration)
Move to position using user units.
unsigned int ClutterTime
Input synchronization pulse dead time (us).
Definition: ximc.h:1681
unsigned int GPIOFlags
Status flags of the GPIO outputs.
Definition: ximc.h:2258
unsigned int TSSettings
Temperature sensor settings flags.
Definition: ximc.h:2667
unsigned int PWRSts
Flags of power state of stepper motor.
Definition: ximc.h:2212
UART settings.
Definition: ximc.h:1950
float LeftBorder
Left border position, used if BORDER_IS_ENCODER flag is set.
Definition: ximc.h:1633
unsigned int SyncOutPeriod
This value specifies the number of encoder pulses or steps between two output synchronization pulses ...
Definition: ximc.h:1728
unsigned int MicrostepMode
Flags of microstep mode.
Definition: ximc.h:1519
result_t XIMC_API set_stage_name(device_t id, const stage_name_t *stage_name)
Write the user&#39;s stage name to EEPROM.
int CurSpeed
Motor shaft speed in steps/s or rpm.
Definition: ximc.h:2218
unsigned int Enc_Check_ADC
Voltage on encoder check line, raw ADC data.
Definition: ximc.h:2370
result_t XIMC_API get_engine_settings_calb(device_t id, engine_settings_calb_t *engine_settings_calb, const calibration_t *calibration)
Read user unit engine settings.
float SupplyVoltageMax
Maximum supply voltage (V).
Definition: ximc.h:2563
float VerticalLoadCapacity
Vertical load capacity (kg).
Definition: ximc.h:2473
result_t XIMC_API set_engine_settings_calb(device_t id, const engine_settings_calb_t *engine_settings_calb, const calibration_t *calibration)
Set user unit engine settings.
int BCurrent
"Winding B current" calibrated data (in mA).
Definition: ximc.h:2378
float HorizontalLoadCapacity
Horizontal load capacity (kg).
Definition: ximc.h:2472
int Iusb
USB current, mA.
Definition: ximc.h:2222
int Joy
Joystick, calibrated data.
Definition: ximc.h:2381
unsigned int DHCPEnabled
Indicates the method to get the IP-address.
Definition: ximc.h:1971
unsigned int stepcloseloop_Kp_high
Manufacturer only.
Definition: ximc.h:2094
float NoLoadCurrent
The current consumption in idle mode (A).
Definition: ximc.h:2527
int uLeftBorder
Left border position in microsteps (used with stepper motor only).
Definition: ximc.h:1609
Movement limitations and settings, related to the motor.
Definition: ximc.h:1512
result_t XIMC_API get_status(device_t id, status_t *status)
Return device state.
result_t XIMC_API set_control_settings(device_t id, const control_settings_t *control_settings)
Set motor control settings.
result_t XIMC_API get_stage_information(device_t id, stage_information_t *stage_information)
Deprecated.
int WindingVoltageC
In case of a brushless motor, it contains the voltage on the third winding (in tens of mV); in the ca...
Definition: ximc.h:2296
int Position
Desired position or shift (full steps)
Definition: ximc.h:1682
result_t XIMC_API set_emf_settings(device_t id, const emf_settings_t *emf_settings)
Set electromechanical coefficients.
unsigned int uAccuracy
This is the neighborhood around the target coordinates in microsteps (used with a stepper motor only)...
Definition: ximc.h:1730
long_t EncPosition
Current encoder position.
Definition: ximc.h:2250
pchar XIMC_API get_device_name(device_enumeration_t device_enumeration, int device_index)
Get device name from the device enumeration.
int HomeDelta
Distance from break point (full steps).
Definition: ximc.h:1352
unsigned int SyncInFlags
Flags for synchronization input setup.
Definition: ximc.h:1704
Deprecated.
Definition: ximc.h:2617
result_t XIMC_API command_update_firmware(const char *uri, const uint8_t *data, uint32_t data_size)
Update firmware.
result_t XIMC_API set_control_settings_calb(device_t id, const control_settings_calb_t *control_settings_calb, const calibration_t *calibration)
Set motor control settings with user units.
unsigned int SyncOutFlags
Flags of synchronization output.
Definition: ximc.h:1749
result_t XIMC_API set_sync_out_settings(device_t id, const sync_out_settings_t *sync_out_settings)
Set output synchronization settings.
unsigned int SyncInFlags
Flags for synchronization input setup.
Definition: ximc.h:1680
unsigned int WindSts
Winding state.
Definition: ximc.h:2214
int Upwr
Power supply voltage, tens of mV.
Definition: ximc.h:2221
float Decel
Deceleration.
Definition: ximc.h:1439
float SpeedConstant
Velocity constant, which determines the value or the amplitude of the induced voltage on the motion o...
Definition: ximc.h:2521
result_t XIMC_API command_read_settings(device_t id)
Read all settings from the controller&#39;s flash memory to the controller&#39;s RAM, replacing previous data...
unsigned int MvCmdSts
Move command state.
Definition: ximc.h:2245
int Position
The position of the whole steps in the engine.
Definition: ximc.h:2171
int uCurSpeed
Fractional part of motor shaft speed in microsteps.
Definition: ximc.h:2219
struct device_network_information_t device_network_information_t
Device network information structure.
unsigned int SN
New board serial number.
Definition: ximc.h:2337
unsigned int t1
Time in ms between turning on motor power and turning off the brake.
Definition: ximc.h:1793
float SupplyVoltageMin
Minimum supply voltage (V).
Definition: ximc.h:2562
result_t XIMC_API command_loft(device_t id)
Upon receiving the command "loft", the engine is shifted from the current position to a distance Anti...
result_t XIMC_API set_encoder_settings(device_t id, const encoder_settings_t *encoder_settings)
Deprecated.
result_t XIMC_API set_engine_settings(device_t id, const engine_settings_t *engine_settings)
Set engine settings.
unsigned int CountsPerTurn
The number of encoder counts per shaft revolution.
Definition: ximc.h:1329
unsigned int UARTSetupFlags
UART parity flags.
Definition: ximc.h:1953
unsigned int uNomSpeed
The fractional part of a nominal speed in microsteps (is only used with stepper motor).
Definition: ximc.h:1487
Feedback settings.
Definition: ximc.h:1324
unsigned int GPIOFlags
Status flags of the GPIO outputs.
Definition: ximc.h:2226
result_t XIMC_API get_gear_settings(device_t id, gear_settings_t *gear_settings)
Deprecated.
result_t XIMC_API get_home_settings(device_t id, home_settings_t *home_settings)
Read home settings.
Position information.
Definition: ximc.h:2131
unsigned int Poles
Number of pole pairs for DC or BLDC motors or number of steps per rotation for stepper motors...
Definition: ximc.h:2508
float TSMin
The minimum measured temperature (degrees Celsius) Data type: float.
Definition: ximc.h:2664
unsigned int NomVoltage
Rated voltage in tens of mV.
Definition: ximc.h:1484
unsigned int DeadZone
Joystick deviation from the central position in 0.1% units that do not result in a start of motion...
Definition: ximc.h:1908
float RatedInputSpeed
Maximum speed on the input shaft (rpm).
Definition: ximc.h:2639
Additional device state.
Definition: ximc.h:2292
unsigned int CmdBufFreeSpace
This field is a service field.
Definition: ximc.h:2227
float SupplyVoltageMax
Maximum supply voltage (V).
Definition: ximc.h:2470
result_t XIMC_API command_eesave_settings(device_t id)
Save settings from the controller&#39;s RAM to the stage&#39;s EEPROM.
void(XIMC_CALLCONV * logging_callback_t)(int loglevel, const wchar_t *message, void *user_data)
Logging callback prototype.
Definition: ximc.h:5440
Synchronization settings which use user units.
Definition: ximc.h:1747
float FullCurrent_B
Offset for the analog measurements of the full current.
Definition: ximc.h:2016
unsigned int KpU
Proportional gain for voltage PID routine.
Definition: ximc.h:1656
unsigned int NomCurrent
Rated current (in mA).
Definition: ximc.h:1485
result_t XIMC_API get_calibration_settings(device_t id, calibration_settings_t *calibration_settings)
Read calibration settings.
int CurPosition
Current position.
Definition: ximc.h:2215
unsigned int SyncOutPeriod
This value specifies the number of encoder pulses or steps between two output synchronization pulses ...
Definition: ximc.h:1751
result_t XIMC_API get_encoder_settings(device_t id, encoder_settings_t *encoder_settings)
Deprecated.
unsigned int stepcloseloop_Kp_low
Manufacturer only.
Definition: ximc.h:2093
Position information.
Definition: ximc.h:2169
unsigned int FastHome
Speed used for first motion (full steps).
Definition: ximc.h:1348
device_t XIMC_API open_device(const char *uri)
Open a device with OS uri and return identifier of the device which can be used in calls...
int uRightBorder
Right border position in microsteps.
Definition: ximc.h:1611
result_t XIMC_API set_power_settings(device_t id, const power_settings_t *power_settings)
Set settings of step motor power control.
unsigned int CriticalT
Maximum temperature, which triggers ALARM state, in tenths of degrees Celsius.
Definition: ximc.h:1582
Device network information structure.
Definition: ximc.h:336
result_t XIMC_API command_start_measurements(device_t id)
Start measurements and buffering of speed and the speed error (target speed minus real speed)...
unsigned int Flags
Flags of secure settings.
Definition: ximc.h:1586
result_t XIMC_API get_home_settings_calb(device_t id, home_settings_calb_t *home_settings_calb, const calibration_t *calibration)
Read user unit home settings.
unsigned int MinimumUusb
Deprecated.
Definition: ximc.h:1585
unsigned int uSlowHome
Part of the speed for second motion, microsteps.
Definition: ximc.h:1351
float CurSpeed
Motor shaft speed.
Definition: ximc.h:2251
result_t XIMC_API get_move_settings(device_t id, move_settings_t *move_settings)
Movement settings read command (speed, acceleration, threshold, etc.).
float SlowHome
Speed used for second motion.
Definition: ximc.h:1375
float CSS1_B
Offset for the analog measurements of the A winding current.
Definition: ximc.h:2012
unsigned int CurrentSetTime
Time in ms to reach the nominal current.
Definition: ximc.h:1562
unsigned int EncSts
Encoder state.
Definition: ximc.h:2213
int AveragedPowerRatio
The ratio of motor supplied power to nominal motor power, as a percentage.
Definition: ximc.h:2302
result_t XIMC_API get_encoder_information(device_t id, encoder_information_t *encoder_information)
Deprecated.
float Km
Electromechanical ratio of the motor.
Definition: ximc.h:2070
Edges settings.
Definition: ximc.h:1604
result_t XIMC_API get_chart_data(device_t id, chart_data_t *chart_data)
Return device electrical parameters, useful for charts.
result_t XIMC_API get_sync_in_settings(device_t id, sync_in_settings_t *sync_in_settings)
Read input synchronization settings.
Engine type and driver type settings.
Definition: ximc.h:1540
float DetentTorque
Holding torque position with unpowered windings (mN * m).
Definition: ximc.h:2519
unsigned int SlowHome
Speed used for second motion (full steps).
Definition: ximc.h:1350
result_t XIMC_API command_reset(device_t id)
Reset controller.
result_t XIMC_API get_enumerate_device_stage_name(device_enumeration_t device_enumeration, int device_index, stage_name_t *stage_name)
Get stage name from the device enumeration.
result_t XIMC_API get_serial_number(device_t id, unsigned int *SerialNumber)
Read device serial number.
result_t XIMC_API set_debug_write(device_t id, const debug_write_t *debug_write)
Write data to firmware for debug purpose.
unsigned int JoyHighEnd
Joystick upper end position.
Definition: ximc.h:1906
float WindingInductance
Inductance of windings for DC engines, inductance of each of two windings for stepper motors...
Definition: ximc.h:2516
float TravelRange
Travel range (Units).
Definition: ximc.h:2468
unsigned int BorderFlags
Border flags.
Definition: ximc.h:1631
unsigned int UniqueID1
Unique ID 1.
Definition: ximc.h:2700
result_t XIMC_API get_ctp_settings(device_t id, ctp_settings_t *ctp_settings)
Read control position settings (used with stepper motor only).
unsigned int Length
Actual sequence length.
Definition: ximc.h:2276
unsigned int ClutterTime
Input synchronization pulse dead time (us).
Definition: ximc.h:1705
int CurT
Temperature, tenths of degrees Celsius.
Definition: ximc.h:2224
int WindingVoltageB
In case of a step motor, it contains the voltage across the winding B (in tens of mV); in case of a b...
Definition: ximc.h:2295
#define XIMC_CALLCONV
Library calling convention macros.
Definition: ximc.h:46
unsigned int B2Voltage_ADC
"Voltage on pin 2 winding B" raw data from ADC.
Definition: ximc.h:2362
result_t XIMC_API set_position_calb(device_t id, const set_position_calb_t *the_set_position_calb, const calibration_t *calibration)
Sets any position value and encoder value of all engines.
unsigned int Accel
Motor shaft acceleration, steps/s^2 (stepper motor) or RPM/s (DC).
Definition: ximc.h:1395
float R
Motor winding resistance.
Definition: ximc.h:2069
float NominalVoltage
Nominal voltage on winding (B).
Definition: ximc.h:2510
EMF settings.
Definition: ximc.h:2066
result_t XIMC_API set_entype_settings(device_t id, const entype_settings_t *entype_settings)
Set engine type and driver type.
int WindingVoltageA
In case of a step motor, it contains the voltage across the winding A (in tens of mV); in case of a b...
Definition: ximc.h:2294
unsigned int t4
Time in ms between turning on the brake and turning off motor power.
Definition: ximc.h:1796
This structure contains protection parameters: critical electrical values, flags for protection algor...
Definition: ximc.h:1577
result_t XIMC_API set_accessories_settings(device_t id, const accessories_settings_t *accessories_settings)
Deprecated.
unsigned int SyncOutFlags
Flags of synchronization output.
Definition: ximc.h:1726
Network settings.
Definition: ximc.h:1969
User unit control settings.
Definition: ximc.h:1861
unsigned int UniqueID3
Unique ID 3.
Definition: ximc.h:2702
int LeftBorder
Left border position, used if BORDER_IS_ENCODER flag is set.
Definition: ximc.h:1608
int B1Voltage
"Voltage on pin 1 winding B" calibrated data (in tens of mV).
Definition: ximc.h:2374
result_t XIMC_API set_sync_in_settings(device_t id, const sync_in_settings_t *sync_in_settings)
Set input synchronization settings.
unsigned int MicrostepMode
Flags of microstep mode.
Definition: ximc.h:1490
result_t XIMC_API set_stage_information(device_t id, const stage_information_t *stage_information)
Deprecated.
unsigned int Release
Number of edits this release of hardware.
Definition: ximc.h:2341
result_t XIMC_API get_device_information(device_t id, device_information_t *device_information)
Return device information.
result_t XIMC_API get_stage_name(device_t id, stage_name_t *stage_name)
Read the user&#39;s stage name from the EEPROM.
Calibration settings.
Definition: ximc.h:2009
result_t XIMC_API get_edges_settings(device_t id, edges_settings_t *edges_settings)
Read border and limit switches settings.
unsigned int DriverType
Flags of driver type.
Definition: ximc.h:1543
result_t XIMC_API get_init_random(device_t id, init_random_t *init_random)
Read a random number from the controller.
result_t XIMC_API set_ctp_settings(device_t id, const ctp_settings_t *ctp_settings)
Set control position settings (used with stepper motor only).
int XIMC_API get_device_count(device_enumeration_t device_enumeration)
Get device count.
device_enumeration_t XIMC_API enumerate_devices(int enumerate_flags, const char *hints)
Search and list of available devices.
float Position
The position in the engine.
Definition: ximc.h:2191
float NomSpeed
Nominal speed.
Definition: ximc.h:1516
float Accuracy
This is the neighborhood around the target coordinates, every point in which is treated as the target...
Definition: ximc.h:1752
result_t XIMC_API get_joystick_settings(device_t id, joystick_settings_t *joystick_settings)
Read joystick settings.
result_t XIMC_API set_gear_information(device_t id, const gear_information_t *gear_information)
Deprecated.
int ACurrent
"Winding A current" calibrated data (in mA).
Definition: ximc.h:2377
result_t XIMC_API command_clear_fram(device_t id)
Clear controller FRAM.
result_t XIMC_API get_power_settings(device_t id, power_settings_t *power_settings)
Read settings of step motor power control.
result_t XIMC_API get_entype_settings(device_t id, entype_settings_t *entype_settings)
Return engine type and driver type.
result_t XIMC_API command_stop(device_t id)
Immediately stops the engine, moves it to the STOP state, and sets switches to BREAK mode (windings a...
result_t XIMC_API set_secure_settings(device_t id, const secure_settings_t *secure_settings)
Set protection settings.
unsigned int EXTIOModeFlags
External IO mode flags.
Definition: ximc.h:1774
int L
Motor winding pseudo inductance in uH (is only used with stepper motors).
Definition: ximc.h:2386
result_t XIMC_API set_uart_settings(device_t id, const uart_settings_t *uart_settings)
Set UART settings.
float MBTorque
Retention moment (mN * m).
Definition: ximc.h:2661
unsigned int EngineFlags
Flags of engine settings.
Definition: ximc.h:1517
float MaxCurrentTime
Safe duration of overcurrent in the winding (ms).
Definition: ximc.h:2526
unsigned int BrakeFlags
Brake settings flags.
Definition: ximc.h:1797
unsigned int Joy_ADC
Joystick raw data from ADC.
Definition: ximc.h:2368
result_t XIMC_API set_edges_settings(device_t id, const edges_settings_t *edges_settings)
Set border and limit switches settings.
#define XIMC_API
Library import macro.
Definition: ximc.h:31
unsigned int MoveSts
Flags of move state.
Definition: ximc.h:2244
result_t XIMC_API command_save_robust_settings(device_t id)
Save important settings (calibration coefficients, etc.) from the controller&#39;s RAM to the controller&#39;...
void XIMC_API logging_callback_stderr_narrow(int loglevel, const wchar_t *message, void *user_data)
Simple callback for logging to stderr in narrow (single byte) chars.
unsigned int MaxClickTime
Maximum click time (in ms).
Definition: ximc.h:1865
unsigned int HoldCurrent
Holding current, as percent of the nominal current.
Definition: ximc.h:1559
unsigned int StepsPerRev
Number of full steps per revolution (Used with stepper motor only).
Definition: ximc.h:1491
result_t XIMC_API get_nonvolatile_memory(device_t id, nonvolatile_memory_t *nonvolatile_memory)
Read user data from FRAM.
int CurT
Temperature, tenths of degrees Celsius.
Definition: ximc.h:2256
void XIMC_API set_logging_callback(logging_callback_t logging_callback, void *user_data)
Sets a logging callback.
unsigned int MicrostepMode
Controller setting which is determine a step division mode.
Definition: ximc.h:326
result_t XIMC_API goto_firmware(device_t id, uint8_t *ret)
Reboot to firmware.
unsigned int A2Voltage_ADC
"Voltage on pin 2 winding A" raw data from ADC.
Definition: ximc.h:2360
float MaxCurrentConsumption
Maximum current consumption (mA).
Definition: ximc.h:2602
result_t XIMC_API get_brake_settings(device_t id, brake_settings_t *brake_settings)
Read break control settings.
result_t XIMC_API command_left(device_t id)
Start continuous moving to the left.
result_t XIMC_API free_enumerate_devices(device_enumeration_t device_enumeration)
Free memory returned by enumerate_devices.
result_t XIMC_API get_uart_settings(device_t id, uart_settings_t *uart_settings)
Read UART settings.
result_t XIMC_API set_correction_table(device_t id, const char *namefile)
Command of loading a correction table from a text file.
unsigned int EnderFlags
Limit switches flags.
Definition: ximc.h:1607
result_t XIMC_API command_sstp(device_t id)
Soft stop the engine.
result_t XIMC_API get_control_settings_calb(device_t id, control_settings_calb_t *control_settings_calb, const calibration_t *calibration)
Read motor control settings with user units.
result_t XIMC_API command_right(device_t id)
Start continuous moving to the right.
unsigned int t3
Time in ms between motor stop and the brake turning on.
Definition: ximc.h:1795
unsigned int BCurrent_ADC
"Winding B current" raw data from ADC.
Definition: ximc.h:2365
int uPosition
The fractional part of a position or shift in microsteps.
Definition: ximc.h:1683
int Iusb
USB current, mA.
Definition: ximc.h:2254
Deprecated.
Definition: ximc.h:2463
float DeltaPosition
Position shift (delta)
Definition: ximc.h:1867
unsigned int UniqueID0
Unique ID 0.
Definition: ximc.h:2699
int WindingCurrentA
In case of a step motor, it contains the current in the winding A (in mA); in case of a brushless mot...
Definition: ximc.h:2297
unsigned int SyncOutPulseSteps
This value specifies the duration of output pulse.
Definition: ximc.h:1727
unsigned int HomeFlags
Home settings flags.
Definition: ximc.h:1377
float Accel
Acceleration:
Definition: ximc.h:1427
int result_t
Type specifies result of any operation.
Definition: ximc.h:117
float Position
Desired position or shift.
Definition: ximc.h:1706
unsigned int NomCurrent
Rated current (in mA).
Definition: ximc.h:1515
Position calibration settings which use user units.
Definition: ximc.h:1372
float TorqueConstant
Torque constant that determines the proportionality constant between the maximum rotor torque and cur...
Definition: ximc.h:2520
int Enc_Check
Voltage on encoder check line, exponentially filtrated ADC codes.
Definition: ximc.h:2383
int B2Voltage
"Voltage on pin 2 winding B" calibrated data (in tens of mV).
Definition: ximc.h:2375
Movement limitations and settings related to the motor.
Definition: ximc.h:1482
Random key.
Definition: ximc.h:2683
result_t XIMC_API set_home_settings(device_t id, const home_settings_t *home_settings)
Set home settings.
uint32_t ipv4
IPv4 address, passed in network byte order (big-endian byte order)
Definition: ximc.h:338
Calibration structure.
Definition: ximc.h:296
int A2Voltage
"Voltage on pin 2 winding A" calibrated data (in tens of mV).
Definition: ximc.h:2373
float MaxCurrentConsumption
Maximum current consumption (A).
Definition: ximc.h:2471
result_t XIMC_API command_zero(device_t id)
Sets the current position to 0.
result_t XIMC_API has_firmware(const char *uri, uint8_t *ret)
Check for firmware on device.
result_t XIMC_API get_stage_settings(device_t id, stage_settings_t *stage_settings)
Deprecated.
result_t XIMC_API service_command_updf(device_t id)
The command switches the controller to update the firmware state.
Move settings.
Definition: ximc.h:1391
int uCurPosition
Step motor shaft position in microsteps.
Definition: ximc.h:2216
result_t XIMC_API reset_locks()
Resets the error of incorrect data transmission.
unsigned int Release
Release version.
Definition: ximc.h:2322
Controller name and settings flags.
Definition: ximc.h:2028
Deprecated.
Definition: ximc.h:2446
result_t XIMC_API get_sync_out_settings_calb(device_t id, sync_out_settings_calb_t *sync_out_settings_calb, const calibration_t *calibration)
Read output user unit synchronization settings.
unsigned int Minor
The minor number of the hardware version.
Definition: ximc.h:2321
unsigned int HomeFlags
Home settings flags.
Definition: ximc.h:1354
result_t XIMC_API set_stage_settings(device_t id, const stage_settings_t *stage_settings)
Deprecated.
result_t XIMC_API get_position(device_t id, get_position_t *the_get_position)
Reads the value position in steps and microsteps for stepper motor and encoder steps for all engines...
float CSS1_A
Scaling factor for the analog measurements of the A winding current.
Definition: ximc.h:2011
result_t XIMC_API get_engine_settings(device_t id, engine_settings_t *engine_settings)
Read engine settings.
unsigned int PosFlags
Position setting flags.
Definition: ximc.h:2193
unsigned int JoyLowEnd
Joystick lower end position.
Definition: ximc.h:1904
void XIMC_API msec_sleep(unsigned int msec)
Sleeps for a specified amount of time.
float MaxOperatingFrequency
Maximum operation frequency (kHz).
Definition: ximc.h:2599
float Kdf
Differential gain for BLDC position PID routine.
Definition: ximc.h:1661
long_t EncPosition
Encoder position.
Definition: ximc.h:2154
Controller information structure.
Definition: ximc.h:2315
Brake settings.
Definition: ximc.h:1791
unsigned int CurrReductDelay
Time in ms from going to STOP state to the end of current reduction.
Definition: ximc.h:1560
User unit device&#39;s state.
Definition: ximc.h:2242
result_t XIMC_API set_motor_information(device_t id, const motor_information_t *motor_information)
Deprecated.
result_t XIMC_API close_device(device_t *id)
Close specified device.
unsigned int ACurrent_ADC
"Winding A current" raw data from ADC.
Definition: ximc.h:2364
unsigned int MoveFlags
Flags of the motion parameters.
Definition: ximc.h:1399
result_t XIMC_API command_eeread_settings(device_t id)
Read settings from the stage&#39;s EEPROM to the controller&#39;s RAM.
float CurPosition
Current position.
Definition: ximc.h:2249
result_t XIMC_API set_hallsensor_information(device_t id, const hallsensor_information_t *hallsensor_information)
Deprecated.
unsigned int EngineFlags
Flags of engine settings.
Definition: ximc.h:1488
float MechanicalTimeConstant
Mechanical time constant (ms).
Definition: ximc.h:2523
result_t XIMC_API command_read_robust_settings(device_t id)
Read important settings (calibration coefficients, etc.) from the controller&#39;s flash memory to the co...
float MaxCurrentConsumption
Max current consumption (mA).
Definition: ximc.h:2564
float WindingResistance
Resistance of windings for DC engines, of each of two windings for stepper motors, or of each of three windings for BLDC engines (Ohm).
Definition: ximc.h:2515
unsigned int Phases
Number of phases for BLDC motors.
Definition: ximc.h:2509
float MaxSpeed
The maximum speed for stepper motors (steps/s) or DC and BLDC motors (rmp).
Definition: ximc.h:2524
float LeadScrewPitch
Lead screw pitch (mm).
Definition: ximc.h:2465
Deprecated.
Definition: ximc.h:2656
unsigned int Flags
Control flags.
Definition: ximc.h:1866
unsigned int Decel
Motor shaft deceleration, steps/s^2 (stepper motor) or RPM/s (DC).
Definition: ximc.h:1396
result_t XIMC_API get_edges_settings_calb(device_t id, edges_settings_calb_t *edges_settings_calb, const calibration_t *calibration)
Read border and limit switches settings in user units.
float NoLoadSpeed
Idle speed (rpm).
Definition: ximc.h:2528
long_t EncPosition
Current encoder position.
Definition: ximc.h:2217
time_t locked_time
time the lock was acquired at (UTC, microseconds since the epoch)
Definition: ximc.h:344
The structure contains a sequence of measured axis motion parameters - velocities and position errors...
Definition: ximc.h:2272
unsigned int CTPFlags
Position control flags.
Definition: ximc.h:1933
result_t XIMC_API set_pid_settings(device_t id, const pid_settings_t *pid_settings)
Set PID settings.
Deprecated.
Definition: ximc.h:2559
result_t XIMC_API set_brake_settings(device_t id, const brake_settings_t *brake_settings)
Set brake control settings.
result_t XIMC_API get_firmware_version(device_t id, unsigned int *Major, unsigned int *Minor, unsigned int *Release)
Read the controller&#39;s firmware version.
unsigned int Speed
UART baudrate (in bauds)
Definition: ximc.h:1952
float Kpf
Proportional gain for BLDC position PID routine.
Definition: ximc.h:1659
unsigned int IPS
The number of encoder counts per shaft revolution.
Definition: ximc.h:1326
unsigned int Temp_ADC
Voltage from temperature sensor, raw data from ADC.
Definition: ximc.h:2367
unsigned int FeedbackType
Feedback type.
Definition: ximc.h:1327
int uHomeDelta
Fractional part of the delta distance, microsteps.
Definition: ximc.h:1353
unsigned int WindSts
Winding state.
Definition: ximc.h:2248
unsigned int MoveFlags
Flags of the motion parameters.
Definition: ximc.h:1463
result_t XIMC_API set_encoder_information(device_t id, const encoder_information_t *encoder_information)
Deprecated.
unsigned int BorderFlags
Border flags.
Definition: ximc.h:1606
float FullCurrent_A
Scaling factor for the analog measurements of the full current.
Definition: ximc.h:2015
result_t XIMC_API get_measurements(device_t id, measurements_t *measurements)
A command to read the data buffer to build a speed graph and a speed error graph. ...
int FullCurrent
"Full current" calibrated data (in mA).
Definition: ximc.h:2379
result_t XIMC_API set_password_settings(device_t id, const password_settings_t *password_settings)
Sets the password.
long_t EncPosition
Encoder position.
Definition: ximc.h:2173
Deprecated.
Definition: ximc.h:2634
result_t XIMC_API get_feedback_settings(device_t id, feedback_settings_t *feedback_settings)
Feedback settings.
result_t XIMC_API set_joystick_settings(device_t id, const joystick_settings_t *joystick_settings)
Set joystick position.
float L
Motor winding inductance.
Definition: ximc.h:2068
result_t XIMC_API get_move_settings_calb(device_t id, move_settings_calb_t *move_settings_calb, const calibration_t *calibration)
User unit movement settings read command (speed, acceleration, threshold, etc.).
int Ipwr
Engine current, mA.
Definition: ximc.h:2252
float RatedInputTorque
Maximum continuous torque (N * m).
Definition: ximc.h:2638
result_t XIMC_API command_movr_calb(device_t id, float DeltaPosition, const calibration_t *calibration)
Shift by a set offset using user units.
unsigned int Pot
Analog input value, dimensionless.
Definition: ximc.h:2300
result_t XIMC_API set_serial_number(device_t id, const serial_number_t *serial_number)
Write device serial number and hardware version to the controller&#39;s flash memory. ...
unsigned int CriticalUusb
Deprecated.
Definition: ximc.h:1584
unsigned int FeedbackFlags
Describes feedback flags.
Definition: ximc.h:1328
result_t XIMC_API set_feedback_settings(device_t id, const feedback_settings_t *feedback_settings)
Feedback settings.
result_t XIMC_API get_network_settings(device_t id, network_settings_t *network_settings)
Read network settings.
unsigned int Speed
Target speed (for stepper motor: steps/s, for DC: rpm).
Definition: ximc.h:1684
int uPosition
Microstep position is only used with stepper motors.
Definition: ximc.h:2134
User units move settings.
Definition: ximc.h:1413
result_t XIMC_API get_engine_advanced_setup(device_t id, engine_advanced_setup_t *engine_advanced_setup)
Read engine advanced settings.
Debug data.
Definition: ximc.h:2400
result_t XIMC_API get_secure_settings(device_t id, secure_settings_t *secure_settings)
Read protection settings.
result_t XIMC_API get_accessories_settings(device_t id, accessories_settings_t *accessories_settings)
Deprecated.
unsigned int JoyFlags
Joystick flags.
Definition: ximc.h:1909
float Speed
Speed.
Definition: ximc.h:1415
float SpeedTorqueGradient
Speed torque gradient (rpm / mN * m).
Definition: ximc.h:2522
int SupVoltage
"Supply voltage on the top of H-bridge&#39;s MOSFETs" calibrated data (in tens of mV).
Definition: ximc.h:2376
float SupplyVoltageMin
Minimum supply voltage (V).
Definition: ximc.h:2469
Step motor power settings.
Definition: ximc.h:1557
Stage username.
Definition: ximc.h:2430
float NominalPower
Nominal power (W).
Definition: ximc.h:2514
unsigned int PeakCurrent
Rated peak current (in mA).
Definition: ximc.h:1521
result_t XIMC_API command_homezero(device_t id)
Make home command, wait until it is finished and make zero command.
User unit synchronization settings.
Definition: ximc.h:1702
Position calibration settings.
Definition: ximc.h:1346
unsigned int Flags
Status flags.
Definition: ximc.h:2225
unsigned int KdU
Differential gain for voltage PID routine.
Definition: ximc.h:1658
unsigned int EncSts
Encoder state.
Definition: ximc.h:2247
float RightBorder
Right border position, used if BORDER_IS_ENCODER flag is set.
Definition: ximc.h:1634
double A
Conversion coefficient equal to the number of millimeters (or other user units) per one step...
Definition: ximc.h:298
result_t XIMC_API command_save_settings(device_t id)
Save all settings from the controller&#39;s RAM to the controller&#39;s flash memory, replacing previous data...
Device state.
Definition: ximc.h:2208
EXTIO settings.
Definition: ximc.h:1771
Structure contains user data to save into the FRAM.
Definition: ximc.h:2043
unsigned int ExpFactor
Exponential nonlinearity factor.
Definition: ximc.h:1907
Deprecated.
Definition: ximc.h:2542
unsigned int CmdBufFreeSpace
This field is a service field.
Definition: ximc.h:2259
unsigned int JoyCenter
Joystick center position.
Definition: ximc.h:1905
unsigned int Minor
The minor number of the hardware version.
Definition: ximc.h:2340
result_t XIMC_API get_control_settings(device_t id, control_settings_t *control_settings)
Read motor control settings.
result_t XIMC_API set_gear_settings(device_t id, const gear_settings_t *gear_settings)
Deprecated.
unsigned int BackEMFFlags
Flags of auto-detection of characteristics of windings of the engine.
Definition: ximc.h:2071
unsigned int NomSpeed
Nominal (maximum) speed (in whole steps/s or rpm for DC and stepper motor as a master encoder)...
Definition: ximc.h:1486
int DeltaPosition
Position Shift (delta) (full step)
Definition: ximc.h:1832
result_t XIMC_API get_hallsensor_information(device_t id, hallsensor_information_t *hallsensor_information)
Deprecated.
result_t XIMC_API get_bootloader_version(device_t id, unsigned int *Major, unsigned int *Minor, unsigned int *Release)
Read the controller&#39;s bootloader version.
float Speed
Target speed.
Definition: ximc.h:1707
unsigned int ReservedField
Reserved.
Definition: ximc.h:2507
int WindingCurrentC
In case of a brushless motor, it contains the current in the winding C (in mA); in case of a step mot...
Definition: ximc.h:2299
The structure contains a new serial number, hardware version, and valid key.
Definition: ximc.h:2335
unsigned int PowerFlags
Flags of power settings of stepper motor.
Definition: ximc.h:1563
result_t XIMC_API get_analog_data(device_t id, analog_data_t *analog_data)
Read the analog data structure that contains raw analog data from the embedded ADC.
result_t XIMC_API set_move_settings_calb(device_t id, const move_settings_calb_t *move_settings_calb, const calibration_t *calibration)
User unit movement settings set command (speed, acceleration, threshold, etc.).
unsigned int MBSettings
Magnetic brake settings flags.
Definition: ximc.h:2662
float HomeDelta
Distance from break point.
Definition: ximc.h:1376
unsigned int PPR
The number of counts per revolution.
Definition: ximc.h:2565
Deprecated.
Definition: ximc.h:2504
unsigned int Flags
Status flags.
Definition: ximc.h:2257
int Antiplay
Number of pulses or steps for backlash (play) compensation procedure.
Definition: ximc.h:1489
unsigned int Joy
The joystick position, dimensionless.
Definition: ximc.h:2301
result_t XIMC_API set_extended_settings(device_t id, const extended_settings_t *extended_settings)
Set extended settings.
result_t XIMC_API get_controller_name(device_t id, controller_name_t *controller_name)
Read user&#39;s controller name and internal settings from the FRAM.
unsigned int CriticalIpwr
Maximum motor current which triggers ALARM state, in mA.
Definition: ximc.h:1580
void XIMC_API ximc_version(char *version)
Returns a library version.
unsigned int PosFlags
Position setting flags.
Definition: ximc.h:2174
unsigned int EncoderSettings
Encoder settings flags.
Definition: ximc.h:2566
EST settings This data is stored in the controller&#39;s flash memory.
Definition: ximc.h:2112
int Temp
Temperature, calibrated data (in tenths of degrees Celsius).
Definition: ximc.h:2380
Deprecated.
Definition: ximc.h:2487
unsigned int EXTIOSetupFlags
External IO setup flags.
Definition: ximc.h:1773
Deprecated.
Definition: ximc.h:2580
unsigned int Speed
Target speed (for stepper motor: steps/s, for DC: rpm).
Definition: ximc.h:1393
unsigned int UniqueID2
Unique ID 2.
Definition: ximc.h:2701
int WindingCurrentB
In case of a step motor, it contains the current in the winding B (in mA); in case of a brushless mot...
Definition: ximc.h:2298
result_t XIMC_API get_extended_settings(device_t id, extended_settings_t *extended_settings)
Read extended settings.
result_t XIMC_API get_emf_settings(device_t id, emf_settings_t *emf_settings)
Read electromechanical settings.
result_t XIMC_API get_pid_settings(device_t id, pid_settings_t *pid_settings)
Read PID settings.
result_t XIMC_API get_motor_information(device_t id, motor_information_t *motor_information)
Deprecated.
unsigned int CtrlFlags
Flags of internal controller settings.
Definition: ximc.h:2031
result_t XIMC_API set_network_settings(device_t id, const network_settings_t *network_settings)
Set network settings.
float MBRatedCurrent
Rated current for controlling the magnetic brake (A).
Definition: ximc.h:2660
unsigned int MvCmdSts
Move command state.
Definition: ximc.h:2211
float NominalTorque
Nominal torque (mN * m).
Definition: ximc.h:2513
result_t XIMC_API get_password_settings(device_t id, password_settings_t *password_settings)
Read the password.
result_t XIMC_API set_controller_name(device_t id, const controller_name_t *controller_name)
Write user&#39;s controller name and internal settings to the FRAM.
float SupplyVoltageMin
Minimum supply voltage (V).
Definition: ximc.h:2600
float Kif
Integral gain for BLDC position PID routine.
Definition: ximc.h:1660
float AntiplaySpeed
Antiplay speed.
Definition: ximc.h:1451
float Position
The position in the engine.
Definition: ximc.h:2153
long_t EncPosition
Encoder position.
Definition: ximc.h:2135
unsigned int uSpeed
Target speed in microstep fractions/s.
Definition: ximc.h:1394
float MaxOutputBacklash
Output backlash of the reduction gear (degree).
Definition: ximc.h:2640
result_t XIMC_API command_home(device_t id)
Moving to home position.
unsigned int stepcloseloop_Kw
Manufacturer only.
Definition: ximc.h:2092
User unit edges settings.
Definition: ximc.h:1629
void XIMC_API logging_callback_stderr_wide(int loglevel, const wchar_t *message, void *user_data)
Simple callback for logging to stderr in wide chars.
unsigned int LimitSwitchesSettings
Temperature sensor settings flags.
Definition: ximc.h:2668
float RotorInertia
Rotor inertia (g * cm2).
Definition: ximc.h:2517
Control settings.
Definition: ximc.h:1825
float MaxOperatingFrequency
Maximum operation frequency (kHz).
Definition: ximc.h:2561
int Upwr
Power supply voltage, tens of mV.
Definition: ximc.h:2253
result_t XIMC_API probe_device(const char *uri)
Check if a device with OS uri uri is XIMC device.
float TSMax
The maximum measured temperature (degrees Celsius) Data type: float.
Definition: ximc.h:2665
result_t XIMC_API set_motor_settings(device_t id, const motor_settings_t *motor_settings)
Deprecated.
result_t XIMC_API command_wait_for_stop(device_t id, uint32_t refresh_interval_ms)
Wait for stop.
result_t XIMC_API get_extio_settings(device_t id, extio_settings_t *extio_settings)
Read EXTIO settings.
unsigned int B1Voltage_ADC
"Voltage on pin 1 winding B" raw data from ADC.
Definition: ximc.h:2361
User unit position information.
Definition: ximc.h:2189
unsigned int CriticalUpwr
Maximum motor voltage which triggers ALARM state, in tens of mV.
Definition: ximc.h:1581
unsigned int Pot_ADC
Voltage on analog input, raw data from ADC.
Definition: ximc.h:2369
result_t XIMC_API get_globally_unique_identifier(device_t id, globally_unique_identifier_t *globally_unique_identifier)
This value is unique to each individual device, but is not a random value.
unsigned int MaxClickTime
Maximum click time (in ms).
Definition: ximc.h:1830
The web-page user password.
Definition: ximc.h:1990
unsigned int SupVoltage_ADC
"Supply voltage of H-bridge&#39;s MOSFETs" raw data from ADC.
Definition: ximc.h:2363
unsigned int PeakCurrent
Rated peak current (in mA).
Definition: ximc.h:1492
result_t XIMC_API get_position_calb(device_t id, get_position_calb_t *the_get_position_calb, const calibration_t *calibration)
Reads position value in user units for stepper motor and encoder steps for all engines.
result_t XIMC_API get_enumerate_device_serial(device_enumeration_t device_enumeration, int device_index, uint32_t *serial)
Get device serial number from the device enumeration.
result_t XIMC_API set_hallsensor_settings(device_t id, const hallsensor_settings_t *hallsensor_settings)
Deprecated.
unsigned int PWRSts
Flags of power state of stepper motor.
Definition: ximc.h:2246
float InputInertia
Equivalent input gear inertia (g * cm2).
Definition: ximc.h:2641
int uPosition
Microstep position is only used with stepper motors.
Definition: ximc.h:2172
Synchronization settings.
Definition: ximc.h:1724
result_t XIMC_API get_enumerate_device_information(device_enumeration_t device_enumeration, int device_index, device_information_t *device_information)
Get device information from the device enumeration.
float TSGrad
The temperature gradient (V/degrees Celsius).
Definition: ximc.h:2666
result_t XIMC_API get_enumerate_device_controller_name(device_enumeration_t device_enumeration, int device_index, controller_name_t *controller_name)
Get controller name from the device enumeration.
result_t XIMC_API set_calibration_settings(device_t id, const calibration_settings_t *calibration_settings)
Set calibration settings.
float MaxSpeed
Maximum speed (Units/c).
Definition: ximc.h:2467
float NominalCurrent
Maximum direct current in winding for DC and BLDC engines, nominal current in windings for stepper mo...
Definition: ximc.h:2511
unsigned int Accuracy
This is the neighborhood around the target coordinates, every point in which is treated as the target...
Definition: ximc.h:1729
result_t XIMC_API command_movr(device_t id, int DeltaPosition, int uDeltaPosition)
Shift by a set offset.
result_t XIMC_API set_nonvolatile_memory(device_t id, const nonvolatile_memory_t *nonvolatile_memory)
Write user data into the FRAM.
unsigned int CTPMinError
The minimum difference between the SM position in steps and the encoder position that causes the sett...
Definition: ximc.h:1932
result_t XIMC_API set_edges_settings_calb(device_t id, const edges_settings_calb_t *edges_settings_calb, const calibration_t *calibration)
Set border and limit switches settings in user units.
int Uusb
USB voltage, tens of mV.
Definition: ximc.h:2223
unsigned int PowerOffDelay
Time in s from going to STOP state to turning power off.
Definition: ximc.h:1561
unsigned int Major
The major number of the hardware version.
Definition: ximc.h:2339
uint32_t device_enumeration_t
Type describes device enumeration structure.
Definition: ximc.h:130
unsigned int MoveSts
Flags of move state.
Definition: ximc.h:2210
unsigned int t2
Time in ms between the brake turning off and moving readiness.
Definition: ximc.h:1794
result_t XIMC_API get_enumerate_device_network_information(device_enumeration_t device_enumeration, int device_index, device_network_information_t *device_network_information)
Get device network information from the device enumeration.
float NominalSpeed
Not used.
Definition: ximc.h:2512
float Antiplay
Number of pulses or steps for backlash (play) compensation procedure.
Definition: ximc.h:1518
float Efficiency
Reduction gear efficiency (%).
Definition: ximc.h:2642
PID settings.
Definition: ximc.h:1654
unsigned int Flags
Control flags.
Definition: ximc.h:1831
Synchronization settings.
Definition: ximc.h:1678
int Pot
Analog input, calibrated data.
Definition: ximc.h:2382
result_t XIMC_API get_hallsensor_settings(device_t id, hallsensor_settings_t *hallsensor_settings)
Deprecated.
unsigned int A1Voltage_ADC
"Voltage on pin 1 winding A" raw data from ADC.
Definition: ximc.h:2359
result_t XIMC_API get_sync_out_settings(device_t id, sync_out_settings_t *sync_out_settings)
Read output synchronization settings.
Joystick settings.
Definition: ximc.h:1902
long_t EncPosition
Encoder position.
Definition: ximc.h:2192
result_t XIMC_API command_power_off(device_t id)
Immediately power off the motor regardless its state.
result_t XIMC_API set_engine_advanced_setup(device_t id, const engine_advanced_setup_t *engine_advanced_setup)
Set engine advanced settings.
float ReductionOut
Output reduction coefficient.
Definition: ximc.h:2637
unsigned int CriticalIusb
Deprecated.
Definition: ximc.h:1583
char * pchar
Nevermind.
Definition: ximc.h:5287
EAS settings.
Definition: ximc.h:2090
float StallTorque
Torque hold position for a stepper motor or torque at a motionless rotor for other types of engines (...
Definition: ximc.h:2518
result_t XIMC_API set_sync_in_settings_calb(device_t id, const sync_in_settings_calb_t *sync_in_settings_calb, const calibration_t *calibration)
Set input user unit synchronization settings.
int Position
The position of the whole steps in the engine.
Definition: ximc.h:2133