libximc 3.0.2
ximc.h
Go to the documentation of this file.
1#ifndef INC_XIMC_H
2#define INC_XIMC_H
3
12
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
68typedef __int8 int8_t;
69typedef __int16 int16_t;
70typedef __int32 int32_t;
71typedef __int64 int64_t;
72typedef unsigned __int8 uint8_t;
73typedef unsigned __int16 uint16_t;
74typedef unsigned __int32 uint32_t;
75typedef 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)
82typedef unsigned __int64 ulong_t;
83typedef __int64 long_t;
84#else
85typedef unsigned long long ulong_t;
86typedef long long long_t;
87#endif
88
89#endif
90
91#include <time.h>
92
93#if defined(__cplusplus)
94extern "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
231#define LOGLEVEL_WARNING 0x02
240#define LOGLEVEL_INFO 0x03
249#define LOGLEVEL_DEBUG 0x04
251
252
296 typedef struct calibration_t
297 {
298 double A;
326 unsigned int MicrostepMode;
328
346
347
348
350#define LIBXIMC_VERSION 3.0.2
352
353
355#define LIBXIMC_PROTOCOL_VERSION 20.14
357
358
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 0x01
664#define ENGINE_CURRENT_AS_RMS 0x02
665#define ENGINE_MAX_SPEED 0x04
666#define ENGINE_ANTIPLAY 0x08
667#define ENGINE_ACCEL_ON 0x10
668#define ENGINE_LIMIT_VOLT 0x20
669#define ENGINE_LIMIT_CURR 0x40
670#define ENGINE_LIMIT_RPM 0x80
672
673
694#define MICROSTEP_MODE_FULL 0x01
695#define MICROSTEP_MODE_FRAC_2 0x02
696#define MICROSTEP_MODE_FRAC_4 0x03
697#define MICROSTEP_MODE_FRAC_8 0x04
698#define MICROSTEP_MODE_FRAC_16 0x05
699#define MICROSTEP_MODE_FRAC_32 0x06
700#define MICROSTEP_MODE_FRAC_64 0x07
701#define MICROSTEP_MODE_FRAC_128 0x08
702#define MICROSTEP_MODE_FRAC_256 0x09
704
705
726#define ENGINE_TYPE_NONE 0x00
727#define ENGINE_TYPE_DC 0x01
728#define ENGINE_TYPE_2DC 0x02
729#define ENGINE_TYPE_STEP 0x03
730#define ENGINE_TYPE_TEST 0x04
731#define ENGINE_TYPE_BRUSHLESS 0x05
733
734
755#define DRIVER_TYPE_INTEGRATE 0x02
756#define DRIVER_TYPE_EXTERNAL 0x03
758
759
778#define POWER_REDUCT_ENABLED 0x01
779#define POWER_OFF_ENABLED 0x02
780#define POWER_SMOOTH_CURRENT 0x04
782
783
802#define ALARM_ON_DRIVER_OVERHEATING 0x01
803#define LOW_UPWR_PROTECTION 0x02
804#define H_BRIDGE_ALERT 0x04
805#define ALARM_ON_BORDERS_SWAP_MISSET 0x08
806#define ALARM_FLAGS_STICKING 0x10
807#define BRAKING_OVERVOLTAGE_PROTECTION 0x20
808#define ALARM_WINDING_MISMATCH 0x40
809#define ALARM_ENGINE_RESPONSE 0x80
811
812
830#define SETPOS_IGNORE_POSITION 0x01
831#define SETPOS_IGNORE_ENCODER 0x02
833
834
850#define FEEDBACK_ENCODER 0x01
851#define FEEDBACK_EMF 0x04
852#define FEEDBACK_NONE 0x05
853#define FEEDBACK_ENCODER_MEDIATED 0x06
855
856
872#define FEEDBACK_ENC_REVERSE 0x01
873#define FEEDBACK_ENC_ADAPTIVE_HOLDING 0x02
874#define FEEDBACK_ENC_FILTER_NONE 0x00
875#define FEEDBACK_ENC_FILTER_WEAK 0x10
876#define FEEDBACK_ENC_FILTER_MEDIUM 0x20
877#define FEEDBACK_ENC_FILTER_STRONG 0x30
878#define FEEDBACK_ENC_FILTER_BITS 0x30
879#define FEEDBACK_ENC_TYPE_AUTO 0x00
880#define FEEDBACK_ENC_TYPE_SINGLE_ENDED 0x40
881#define FEEDBACK_ENC_TYPE_DIFFERENTIAL 0x80
882#define FEEDBACK_ENC_TYPE_BITS 0xC0
884
885
899#define SYNCIN_ENABLED 0x01
900#define SYNCIN_INVERT 0x02
901#define SYNCIN_GOTOPOSITION 0x04
903
904
918#define SYNCOUT_ENABLED 0x01
919#define SYNCOUT_STATE 0x02
920#define SYNCOUT_INVERT 0x04
921#define SYNCOUT_IN_STEPS 0x08
922#define SYNCOUT_ONSTART 0x10
923#define SYNCOUT_ONSTOP 0x20
924#define SYNCOUT_ONPERIOD 0x40
926
927
943#define EXTIO_SETUP_OUTPUT 0x01
944#define EXTIO_SETUP_INVERT 0x02
946
947
964#define EXTIO_SETUP_MODE_IN_BITS 0x0F
965#define EXTIO_SETUP_MODE_IN_NOP 0x00
966#define EXTIO_SETUP_MODE_IN_STOP 0x01
967#define EXTIO_SETUP_MODE_IN_PWOF 0x02
968#define EXTIO_SETUP_MODE_IN_MOVR 0x03
969#define EXTIO_SETUP_MODE_IN_HOME 0x04
970#define EXTIO_SETUP_MODE_IN_ALARM 0x05
971#define EXTIO_SETUP_MODE_OUT_BITS 0xF0
972#define EXTIO_SETUP_MODE_OUT_OFF 0x00
973#define EXTIO_SETUP_MODE_OUT_ON 0x10
974#define EXTIO_SETUP_MODE_OUT_MOVING 0x20
975#define EXTIO_SETUP_MODE_OUT_ALARM 0x30
976#define EXTIO_SETUP_MODE_OUT_MOTOR_ON 0x40
978
979
999#define BORDER_IS_ENCODER 0x01
1000#define BORDER_STOP_LEFT 0x02
1001#define BORDER_STOP_RIGHT 0x04
1002#define BORDERS_SWAP_MISSET_DETECTION 0x08
1004
1005
1025#define ENDER_SWAP 0x01
1026#define ENDER_SW1_ACTIVE_LOW 0x02
1027#define ENDER_SW2_ACTIVE_LOW 0x04
1029
1030
1050#define BRAKE_ENABLED 0x01
1051#define BRAKE_ENG_PWROFF 0x02
1053
1054
1074#define CONTROL_MODE_BITS 0x03
1075#define CONTROL_MODE_OFF 0x00
1076#define CONTROL_MODE_JOY 0x01
1077#define CONTROL_MODE_LR 0x02
1078#define CONTROL_BTN_LEFT_PUSHED_OPEN 0x04
1079#define CONTROL_BTN_RIGHT_PUSHED_OPEN 0x08
1081
1082
1100#define JOY_REVERSE 0x01
1102
1103
1123#define CTP_ENABLED 0x01
1124#define CTP_BASE 0x02
1125#define CTP_ALARM_ON_ERROR 0x04
1126#define REV_SENS_INV 0x08
1127#define CTP_ERROR_CORRECTION 0x10
1129
1130
1151#define HOME_DIR_FIRST 0x001
1152#define HOME_DIR_SECOND 0x002
1153#define HOME_MV_SEC_EN 0x004
1154#define HOME_HALF_MV 0x008
1155#define HOME_STOP_FIRST_BITS 0x030
1156#define HOME_STOP_FIRST_REV 0x010
1157#define HOME_STOP_FIRST_SYN 0x020
1158#define HOME_STOP_FIRST_LIM 0x030
1159#define HOME_STOP_SECOND_BITS 0x0C0
1160#define HOME_STOP_SECOND_REV 0x040
1161#define HOME_STOP_SECOND_SYN 0x080
1162#define HOME_STOP_SECOND_LIM 0x0C0
1163#define HOME_USE_FAST 0x100
1165
1166
1180#define UART_PARITY_BITS 0x03
1181#define UART_PARITY_BIT_EVEN 0x00
1182#define UART_PARITY_BIT_ODD 0x01
1183#define UART_PARITY_BIT_SPACE 0x02
1184#define UART_PARITY_BIT_MARK 0x03
1185#define UART_PARITY_BIT_USE 0x04
1186#define UART_STOP_BIT 0x08
1188
1189
1203#define MOTOR_TYPE_UNKNOWN 0x00
1204#define MOTOR_TYPE_STEP 0x01
1205#define MOTOR_TYPE_DC 0x02
1206#define MOTOR_TYPE_BLDC 0x03
1208
1209
1223#define ENCSET_DIFFERENTIAL_OUTPUT 0x001
1224#define ENCSET_PUSHPULL_OUTPUT 0x004
1225#define ENCSET_INDEXCHANNEL_PRESENT 0x010
1226#define ENCSET_REVOLUTIONSENSOR_PRESENT 0x040
1227#define ENCSET_REVOLUTIONSENSOR_ACTIVE_HIGH 0x100
1229
1230
1244#define MB_AVAILABLE 0x01
1245#define MB_POWERED_HOLD 0x02
1247
1248
1262#define TS_TYPE_BITS 0x07
1263#define TS_TYPE_UNKNOWN 0x00
1264#define TS_TYPE_THERMOCOUPLE 0x01
1265#define TS_TYPE_SEMICONDUCTOR 0x02
1266#define TS_AVAILABLE 0x08
1268
1269
1283#define LS_ON_SW1_AVAILABLE 0x01
1284#define LS_ON_SW2_AVAILABLE 0x02
1285#define LS_SW1_ACTIVE_LOW 0x04
1286#define LS_SW2_ACTIVE_LOW 0x08
1287#define LS_SHORTED 0x10
1289
1290
1306#define BACK_EMF_INDUCTANCE_AUTO 0x01
1307#define BACK_EMF_RESISTANCE_AUTO 0x02
1308#define BACK_EMF_KM_AUTO 0x04
1310
1311
1323 typedef struct
1324 {
1325 unsigned int IPS;
1326 unsigned int FeedbackType;
1327 unsigned int FeedbackFlags;
1328 unsigned int CountsPerTurn;
1330
1345 typedef struct
1346 {
1347 unsigned int FastHome;
1348 unsigned int uFastHome;
1349 unsigned int SlowHome;
1350 unsigned int uSlowHome;
1353 unsigned int HomeFlags;
1355
1371 typedef struct
1372 {
1373 float FastHome;
1374 float SlowHome;
1376 unsigned int HomeFlags;
1378
1390 typedef struct
1391 {
1392 unsigned int Speed;
1393 unsigned int uSpeed;
1394 unsigned int Accel;
1395 unsigned int Decel;
1396 unsigned int AntiplaySpeed;
1397 unsigned int uAntiplaySpeed;
1398 unsigned int MoveFlags;
1400
1412 typedef struct
1413 {
1414 float Speed;
1426 float Accel;
1438 float Decel;
1462 unsigned int MoveFlags;
1464
1481 typedef struct
1482 {
1483 unsigned int NomVoltage;
1484 unsigned int NomCurrent;
1485 unsigned int NomSpeed;
1486 unsigned int uNomSpeed;
1487 unsigned int EngineFlags;
1489 unsigned int MicrostepMode;
1490 unsigned int StepsPerRev;
1492
1510 typedef struct
1511 {
1512 unsigned int NomVoltage;
1513 unsigned int NomCurrent;
1514 float NomSpeed;
1515 unsigned int EngineFlags;
1516 float Antiplay;
1517 unsigned int MicrostepMode;
1518 unsigned int StepsPerRev;
1520
1537 typedef struct
1538 {
1539 unsigned int EngineType;
1540 unsigned int DriverType;
1542
1554 typedef struct
1555 {
1556 unsigned int HoldCurrent;
1557 unsigned int CurrReductDelay;
1558 unsigned int PowerOffDelay;
1559 unsigned int CurrentSetTime;
1560 unsigned int PowerFlags;
1562
1574 typedef struct
1575 {
1576 unsigned int LowUpwrOff;
1577 unsigned int CriticalIpwr;
1578 unsigned int CriticalUpwr;
1579 unsigned int CriticalT;
1580 unsigned int CriticalIusb;
1581 unsigned int CriticalUusb;
1582 unsigned int MinimumUusb;
1583 unsigned int Flags;
1585
1601 typedef struct
1602 {
1603 unsigned int BorderFlags;
1604 unsigned int EnderFlags;
1610
1626 typedef struct
1627 {
1628 unsigned int BorderFlags;
1629 unsigned int EnderFlags;
1633
1651 typedef struct
1652 {
1653 unsigned int KpU;
1654 unsigned int KiU;
1655 unsigned int KdU;
1656 float Kpf;
1657 float Kif;
1658 float Kdf;
1660
1675 typedef struct
1676 {
1677 unsigned int SyncInFlags;
1678 unsigned int ClutterTime;
1681 unsigned int Speed;
1682 unsigned int uSpeed;
1683 unsigned int reserved0;
1685
1699 typedef struct
1700 {
1701 unsigned int SyncInFlags;
1702 unsigned int ClutterTime;
1703 float Position;
1704 float Speed;
1705 unsigned int reserved0;
1707
1721 typedef struct
1722 {
1723 unsigned int SyncOutFlags;
1724 unsigned int SyncOutPulseSteps;
1725 unsigned int SyncOutPeriod;
1726 unsigned int Accuracy;
1727 unsigned int uAccuracy;
1729
1744 typedef struct
1745 {
1746 unsigned int SyncOutFlags;
1747 unsigned int SyncOutPulseSteps;
1748 unsigned int SyncOutPeriod;
1749 float Accuracy;
1751
1768 typedef struct
1769 {
1770 unsigned int EXTIOSetupFlags;
1771 unsigned int EXTIOModeFlags;
1773
1788 typedef struct
1789 {
1790 unsigned int t1;
1791 unsigned int t2;
1792 unsigned int t3;
1793 unsigned int t4;
1794 unsigned int BrakeFlags;
1796
1822 typedef struct
1823 {
1824 unsigned int MaxSpeed[10];
1825 unsigned int uMaxSpeed[10];
1826 unsigned int Timeout[9];
1827 unsigned int MaxClickTime;
1828 unsigned int Flags;
1832
1858 typedef struct
1859 {
1860 float MaxSpeed[10];
1861 unsigned int Timeout[9];
1862 unsigned int MaxClickTime;
1863 unsigned int Flags;
1866
1899 typedef struct
1900 {
1901 unsigned int JoyLowEnd;
1902 unsigned int JoyCenter;
1903 unsigned int JoyHighEnd;
1904 unsigned int ExpFactor;
1905 unsigned int DeadZone;
1906 unsigned int JoyFlags;
1908
1927 typedef struct
1928 {
1929 unsigned int CTPMinError;
1930 unsigned int CTPFlags;
1932
1947 typedef struct
1948 {
1949 unsigned int Speed;
1950 unsigned int UARTSetupFlags;
1952
1966 typedef struct
1967 {
1968 unsigned int DHCPEnabled;
1969 unsigned int IPv4Address[4];
1970 unsigned int SubnetMask[4];
1971 unsigned int DefaultGateway[4];
1973
1987 typedef struct
1988 {
1989 char UserPassword[21];
1991
2006 typedef struct
2007 {
2008 float CSS1_A;
2009 float CSS1_B;
2010 float CSS2_A;
2011 float CSS2_B;
2015
2025 typedef struct
2026 {
2028 unsigned int CtrlFlags;
2030
2040 typedef struct
2041 {
2042 unsigned int UserData[7];
2044
2063 typedef struct
2064 {
2065 float L;
2066 float R;
2067 float Km;
2068 unsigned int BackEMFFlags;
2070
2087 typedef struct
2088 {
2089 unsigned int stepcloseloop_Kw;
2093
2109 typedef struct
2110 {
2111 unsigned int Param1;
2113
2128 typedef struct
2129 {
2134
2148 typedef struct
2149 {
2150 float Position;
2153
2166 typedef struct
2167 {
2171 unsigned int PosFlags;
2173
2186 typedef struct
2187 {
2188 float Position;
2190 unsigned int PosFlags;
2192
2205 typedef struct
2206 {
2207 unsigned int MoveSts;
2208 unsigned int MvCmdSts;
2209 unsigned int PWRSts;
2210 unsigned int EncSts;
2211 unsigned int WindSts;
2217 int Ipwr;
2218 int Upwr;
2219 int Iusb;
2220 int Uusb;
2221 int CurT;
2222 unsigned int Flags;
2223 unsigned int GPIOFlags;
2224 unsigned int CmdBufFreeSpace;
2225 } status_t;
2226
2239 typedef struct
2240 {
2241 unsigned int MoveSts;
2242 unsigned int MvCmdSts;
2243 unsigned int PWRSts;
2244 unsigned int EncSts;
2245 unsigned int WindSts;
2248 float CurSpeed;
2249 int Ipwr;
2250 int Upwr;
2251 int Iusb;
2252 int Uusb;
2253 int CurT;
2254 unsigned int Flags;
2255 unsigned int GPIOFlags;
2256 unsigned int CmdBufFreeSpace;
2257 } status_calb_t;
2258
2269 typedef struct
2270 {
2271 int Speed[25];
2272 int Error[25];
2273 unsigned int Length;
2275
2301
2312 typedef struct
2313 {
2317 unsigned int Major;
2318 unsigned int Minor;
2319 unsigned int Release;
2321
2332 typedef struct
2333 {
2334 unsigned int SN;
2335 uint8_t Key[32];
2336 unsigned int Major;
2337 unsigned int Minor;
2338 unsigned int Release;
2340
2354 typedef struct
2355 {
2356 unsigned int A1Voltage_ADC;
2357 unsigned int A2Voltage_ADC;
2358 unsigned int B1Voltage_ADC;
2359 unsigned int B2Voltage_ADC;
2360 unsigned int SupVoltage_ADC;
2361 unsigned int ACurrent_ADC;
2362 unsigned int BCurrent_ADC;
2363 unsigned int FullCurrent_ADC;
2364 unsigned int Temp_ADC;
2365 unsigned int Joy_ADC;
2366 unsigned int Pot_ADC;
2367 unsigned int Enc_Check_ADC;
2368 unsigned int deprecated0;
2377 int Temp;
2378 int Joy;
2379 int Pot;
2381 unsigned int deprecated1[2];
2382 int R;
2383 int L;
2384 } analog_data_t;
2385
2397 typedef struct
2398 {
2399 uint8_t DebugData[128];
2400 } debug_read_t;
2401
2413 typedef struct
2414 {
2415 uint8_t DebugData[128];
2416 } debug_write_t;
2417
2427 typedef struct
2428 {
2430 } stage_name_t;
2431
2443 typedef struct
2444 {
2445 char Manufacturer[17];
2446 char PartNumber[25];
2448
2472
2484 typedef struct
2485 {
2486 char Manufacturer[17];
2487 char PartNumber[25];
2489
2527
2539 typedef struct
2540 {
2541 char Manufacturer[17];
2542 char PartNumber[25];
2544
2565
2577 typedef struct
2578 {
2579 char Manufacturer[17];
2580 char PartNumber[25];
2582
2602
2614 typedef struct
2615 {
2616 char Manufacturer[17];
2617 char PartNumber[25];
2619
2641
2653 typedef struct
2654 {
2658 float MBTorque;
2659 unsigned int MBSettings;
2661 float TSMin;
2662 float TSMax;
2663 float TSGrad;
2664 unsigned int TSSettings;
2667
2680 typedef struct
2681 {
2682 uint8_t key[16];
2683 } init_random_t;
2684
2694 typedef struct
2695 {
2696 unsigned int UniqueID0;
2697 unsigned int UniqueID1;
2698 unsigned int UniqueID2;
2699 unsigned int UniqueID3;
2701
2702/*
2703 --------------------------------------------
2704 BEGIN OF GENERATED function declarations
2705 --------------------------------------------
2706*/
2707
2718
2720
2740
2760
2778
2797 result_t XIMC_API set_home_settings_calb (device_t id, const home_settings_calb_t* home_settings_calb, const calibration_t* calibration);
2798
2816
2836
2850
2865 result_t XIMC_API set_move_settings_calb (device_t id, const move_settings_calb_t* move_settings_calb, const calibration_t* calibration);
2866
2880
2896
2916
2937 result_t XIMC_API set_engine_settings_calb (device_t id, const engine_settings_calb_t* engine_settings_calb, const calibration_t* calibration);
2938
2958
2980
2994
3008
3023
3039
3054
3069
3085
3110 result_t XIMC_API set_edges_settings_calb (device_t id, const edges_settings_calb_t* edges_settings_calb, const calibration_t* calibration);
3111
3127
3153
3173
3192
3210
3229 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);
3230
3248
3268
3286
3305 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);
3306
3322
3342
3361
3378
3392
3406
3432
3459 result_t XIMC_API set_control_settings_calb (device_t id, const control_settings_calb_t* control_settings_calb, const calibration_t* calibration);
3460
3486
3514
3544
3574
3595
3614
3632
3650
3671
3692
3707
3722
3740
3758
3772
3786
3800
3814
3833
3851
3871
3891
3907
3923
3924
3926
3937
3939
3958
3974
3993 result_t XIMC_API command_move (device_t id, int Position, int uPosition);
3994
4021 result_t XIMC_API command_move_calb (device_t id, float Position, const calibration_t* calibration);
4022
4039 result_t XIMC_API command_movr (device_t id, int DeltaPosition, int uDeltaPosition);
4040
4065 result_t XIMC_API command_movr_calb (device_t id, float DeltaPosition, const calibration_t* calibration);
4066
4103
4115
4127
4140
4152
4167
4190 result_t XIMC_API get_position_calb (device_t id, get_position_calb_t* the_get_position_calb, const calibration_t* calibration);
4191
4207
4222 result_t XIMC_API set_position_calb (device_t id, const set_position_calb_t* the_set_position_calb, const calibration_t* calibration);
4223
4235
4236
4238
4249
4251
4263
4275
4287
4299
4313
4325
4337
4357
4375
4388 result_t XIMC_API get_serial_number (device_t id, unsigned int* SerialNumber);
4389
4406 result_t XIMC_API get_firmware_version (device_t id, unsigned int* Major, unsigned int* Minor, unsigned int* Release);
4407
4419
4420
4422
4433
4435
4455
4469
4485
4499
4500
4502
4513
4515
4529
4543
4559
4573
4589
4603
4619
4633
4649
4663
4679
4693
4709
4723
4739
4753
4769
4783
4799
4813
4829
4843
4859
4873
4890 result_t XIMC_API get_bootloader_version (device_t id, unsigned int* Major, unsigned int* Minor, unsigned int* Release);
4891
4905
4922
4923
4924/*
4925 -------------------------
4926 END OF GENERATED CODE
4927 -------------------------
4928*/
4929
4930/* hand-crafted functions begin */
4931
4945
4958 result_t XIMC_API has_firmware(const char* uri, uint8_t* ret);
4959
4975 result_t XIMC_API command_update_firmware(const char* uri, const uint8_t* data, uint32_t data_size);
4976
4991 result_t XIMC_API write_key (const char* uri, uint8_t* key);
4992
5006
5020
5022
5023 // ------------------------------------
5024
5036
5064 device_t XIMC_API open_device (const char* uri);
5065
5081
5127
5140 result_t XIMC_API probe_device (const char* uri);
5141
5252 device_enumeration_t XIMC_API enumerate_devices(int enumerate_flags, const char *hints);
5253
5265
5277
5286 typedef char* pchar;
5287
5302 pchar XIMC_API get_device_name(device_enumeration_t device_enumeration, int device_index);
5303
5304
5321 result_t XIMC_API get_enumerate_device_serial(device_enumeration_t device_enumeration, int device_index, uint32_t* serial);
5322
5339 result_t XIMC_API get_enumerate_device_information(device_enumeration_t device_enumeration, int device_index, device_information_t* device_information);
5340
5358
5375 result_t XIMC_API get_enumerate_device_stage_name(device_enumeration_t device_enumeration, int device_index, stage_name_t* stage_name);
5376
5393 result_t XIMC_API get_enumerate_device_network_information(device_enumeration_t device_enumeration, int device_index, device_network_information_t* device_network_information);
5394
5403
5413 void XIMC_API msec_sleep (unsigned int msec);
5414
5424 void XIMC_API ximc_version (char* version);
5425
5426#if !defined(MATLAB_IMPORT) && !defined(LABVIEW64_IMPORT) && !defined(LABVIEW32_IMPORT)
5427
5439 typedef void (XIMC_CALLCONV *logging_callback_t)(int loglevel, const wchar_t* message, void* user_data);
5440
5452 void XIMC_API logging_callback_stderr_wide(int loglevel, const wchar_t* message, void* user_data);
5453
5465 void XIMC_API logging_callback_stderr_narrow(int loglevel, const wchar_t* message, void* user_data);
5466
5479 void XIMC_API set_logging_callback(logging_callback_t logging_callback, void* user_data);
5480
5481#endif
5482
5507
5534
5561
5580 result_t XIMC_API command_wait_for_stop(device_t id, uint32_t refresh_interval_ms);
5581
5596
5597#if defined(__cplusplus)
5598};
5599#endif
5600
5601#endif
5602
5603// vim: ts=4 shiftwidth=4
5604
Deprecated.
Definition ximc.h:2654
char MagneticBrakeInfo[25]
The manufacturer and the part number of magnetic brake, the maximum string length is 24 characters.
Definition ximc.h:2655
char TemperatureSensorInfo[25]
The manufacturer and the part number of the temperature sensor, the maximum string length: 24 charact...
Definition ximc.h:2660
float MBRatedCurrent
Rated current for controlling the magnetic brake (A).
Definition ximc.h:2657
unsigned int TSSettings
Temperature sensor settings flags.
Definition ximc.h:2664
unsigned int MBSettings
Magnetic brake settings flags.
Definition ximc.h:2659
float TSMax
The maximum measured temperature (degrees Celsius) Data type: float.
Definition ximc.h:2662
unsigned int LimitSwitchesSettings
Temperature sensor settings flags.
Definition ximc.h:2665
float MBRatedVoltage
Rated voltage for controlling the magnetic brake (V).
Definition ximc.h:2656
float TSGrad
The temperature gradient (V/degrees Celsius).
Definition ximc.h:2663
float TSMin
The minimum measured temperature (degrees Celsius) Data type: float.
Definition ximc.h:2661
float MBTorque
Retention moment (mN * m).
Definition ximc.h:2658
Analog data.
Definition ximc.h:2355
unsigned int Pot_ADC
Voltage on analog input, raw data from ADC
Definition ximc.h:2366
unsigned int B1Voltage_ADC
"Voltage on pin 1 winding B" raw data from ADC.
Definition ximc.h:2358
int Pot
Analog input, calibrated data.
Definition ximc.h:2379
int FullCurrent
"Full current" calibrated data (in mA).
Definition ximc.h:2376
int Enc_Check
Voltage on encoder check line, exponentially filtrated ADC codes.
Definition ximc.h:2380
unsigned int A2Voltage_ADC
"Voltage on pin 2 winding A" raw data from ADC.
Definition ximc.h:2357
int SupVoltage
"Supply voltage on the top of H-bridge's MOSFETs" calibrated data (in tens of mV).
Definition ximc.h:2373
unsigned int FullCurrent_ADC
"Full current" raw data from ADC.
Definition ximc.h:2363
unsigned int Joy_ADC
Joystick raw data from ADC.
Definition ximc.h:2365
int R
Motor winding resistance in mOhms (is only used with stepper motors).
Definition ximc.h:2382
unsigned int B2Voltage_ADC
"Voltage on pin 2 winding B" raw data from ADC.
Definition ximc.h:2359
int ACurrent
"Winding A current" calibrated data (in mA).
Definition ximc.h:2374
unsigned int A1Voltage_ADC
"Voltage on pin 1 winding A" raw data from ADC.
Definition ximc.h:2356
unsigned int BCurrent_ADC
"Winding B current" raw data from ADC.
Definition ximc.h:2362
int L
Motor winding pseudo inductance in uH (is only used with stepper motors).
Definition ximc.h:2383
int Joy
Joystick, calibrated data.
Definition ximc.h:2378
unsigned int Temp_ADC
Voltage from temperature sensor, raw data from ADC.
Definition ximc.h:2364
int A2Voltage
"Voltage on pin 2 winding A" calibrated data (in tens of mV).
Definition ximc.h:2370
int B2Voltage
"Voltage on pin 2 winding B" calibrated data (in tens of mV).
Definition ximc.h:2372
unsigned int ACurrent_ADC
"Winding A current" raw data from ADC.
Definition ximc.h:2361
unsigned int SupVoltage_ADC
"Supply voltage of H-bridge's MOSFETs" raw data from ADC.
Definition ximc.h:2360
int A1Voltage
"Voltage on pin 1 winding A" calibrated data (in tens of mV).
Definition ximc.h:2369
int BCurrent
"Winding B current" calibrated data (in mA).
Definition ximc.h:2375
int B1Voltage
"Voltage on pin 1 winding B" calibrated data (in tens of mV).
Definition ximc.h:2371
int Temp
Temperature, calibrated data (in tenths of degrees Celsius).
Definition ximc.h:2377
unsigned int Enc_Check_ADC
Voltage on encoder check line, raw ADC data.
Definition ximc.h:2367
Brake settings.
Definition ximc.h:1789
unsigned int t1
Time in ms between turning on motor power and turning off the brake.
Definition ximc.h:1790
unsigned int BrakeFlags
Brake settings flags.
Definition ximc.h:1794
unsigned int t4
Time in ms between turning on the brake and turning off motor power.
Definition ximc.h:1793
unsigned int t2
Time in ms between the brake turning off and moving readiness.
Definition ximc.h:1791
unsigned int t3
Time in ms between motor stop and the brake turning on.
Definition ximc.h:1792
Calibration settings.
Definition ximc.h:2007
float CSS1_A
Scaling factor for the analog measurements of the A winding current.
Definition ximc.h:2008
float CSS2_B
Offset for the analog measurements of the B winding current.
Definition ximc.h:2011
float CSS2_A
Scaling factor for the analog measurements of the B winding current.
Definition ximc.h:2010
float FullCurrent_B
Offset for the analog measurements of the full current.
Definition ximc.h:2013
float CSS1_B
Offset for the analog measurements of the A winding current.
Definition ximc.h:2009
float FullCurrent_A
Scaling factor for the analog measurements of the full current.
Definition ximc.h:2012
Calibration structure
Definition ximc.h:297
double A
Conversion coefficient equal to the number of millimeters (or other user units) per one step.
Definition ximc.h:298
unsigned int MicrostepMode
Controller setting which is determine a step division mode
Definition ximc.h:326
Additional device state.
Definition ximc.h:2290
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:2294
int AveragedPowerRatio
The ratio of motor supplied power to nominal motor power, as a percentage.
Definition ximc.h:2299
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:2295
unsigned int Pot
Analog input value, dimensionless.
Definition ximc.h:2297
unsigned int Joy
The joystick position, dimensionless.
Definition ximc.h:2298
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:2293
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:2296
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:2292
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:2291
User unit control settings.
Definition ximc.h:1859
float DeltaPosition
Position shift (delta)
Definition ximc.h:1864
unsigned int Flags
Control flags.
Definition ximc.h:1863
unsigned int Timeout[9]
Timeout[i] is timeout in ms.
Definition ximc.h:1861
float MaxSpeed[10]
Array of speeds used with the joystick and the button control.
Definition ximc.h:1860
unsigned int MaxClickTime
Maximum click time (in ms).
Definition ximc.h:1862
Control settings.
Definition ximc.h:1823
int uDeltaPosition
Fractional part of the shift in micro steps.
Definition ximc.h:1830
int DeltaPosition
Position Shift (delta) (full step)
Definition ximc.h:1829
unsigned int MaxSpeed[10]
Array of speeds (full step) used with the joystick and the button control.
Definition ximc.h:1824
unsigned int Flags
Control flags.
Definition ximc.h:1828
unsigned int Timeout[9]
Timeout[i] is timeout in ms.
Definition ximc.h:1826
unsigned int uMaxSpeed[10]
Array of speeds (in microsteps) used with the joystick and the button control.
Definition ximc.h:1825
unsigned int MaxClickTime
Maximum click time (in ms).
Definition ximc.h:1827
Controller name and settings flags
Definition ximc.h:2026
unsigned int CtrlFlags
Flags of internal controller settings.
Definition ximc.h:2028
char ControllerName[17]
User controller name.
Definition ximc.h:2027
Control position settings (used with stepper motor only)
Definition ximc.h:1928
unsigned int CTPMinError
The minimum difference between the SM position in steps and the encoder position that causes the sett...
Definition ximc.h:1929
unsigned int CTPFlags
Position control flags.
Definition ximc.h:1930
Debug data.
Definition ximc.h:2398
uint8_t DebugData[128]
Arbitrary debug data.
Definition ximc.h:2399
Debug data.
Definition ximc.h:2414
uint8_t DebugData[128]
Arbitrary debug data.
Definition ximc.h:2415
Controller information structure.
Definition ximc.h:2313
unsigned int Release
Release version.
Definition ximc.h:2319
char ProductDescription[9]
Product description
Definition ximc.h:2316
char Manufacturer[5]
Manufacturer
Definition ximc.h:2314
unsigned int Major
The major number of the hardware version.
Definition ximc.h:2317
unsigned int Minor
The minor number of the hardware version.
Definition ximc.h:2318
char ManufacturerId[3]
Manufacturer id
Definition ximc.h:2315
Device network information structure.
Definition ximc.h:337
char locker_nodename[16]
Bindy node name, which was used to lock the device (if any)
Definition ximc.h:343
char locker_username[16]
name of the user who locked the device (if any)
Definition ximc.h:342
char nodename[16]
name of the Bindy node which hosts the device
Definition ximc.h:339
time_t locked_time
time the lock was acquired at (UTC, microseconds since the epoch)
Definition ximc.h:344
uint32_t axis_state
flags representing device state
Definition ximc.h:341
uint32_t ipv4
IPv4 address, passed in network byte order (big-endian byte order)
Definition ximc.h:338
User unit edges settings.
Definition ximc.h:1627
unsigned int EnderFlags
Limit switches flags.
Definition ximc.h:1629
unsigned int BorderFlags
Border flags.
Definition ximc.h:1628
float LeftBorder
Left border position, used if BORDER_IS_ENCODER flag is set.
Definition ximc.h:1630
float RightBorder
Right border position, used if BORDER_IS_ENCODER flag is set.
Definition ximc.h:1631
Edges settings.
Definition ximc.h:1602
unsigned int EnderFlags
Limit switches flags.
Definition ximc.h:1604
unsigned int BorderFlags
Border flags.
Definition ximc.h:1603
int LeftBorder
Left border position, used if BORDER_IS_ENCODER flag is set.
Definition ximc.h:1605
int uRightBorder
Right border position in microsteps.
Definition ximc.h:1608
int uLeftBorder
Left border position in microsteps (used with stepper motor only).
Definition ximc.h:1606
int RightBorder
Right border position, used if BORDER_IS_ENCODER flag is set.
Definition ximc.h:1607
EMF settings.
Definition ximc.h:2064
unsigned int BackEMFFlags
Flags of auto-detection of characteristics of windings of the engine.
Definition ximc.h:2068
float R
Motor winding resistance.
Definition ximc.h:2066
float Km
Electromechanical ratio of the motor.
Definition ximc.h:2067
float L
Motor winding inductance.
Definition ximc.h:2065
Deprecated.
Definition ximc.h:2540
char Manufacturer[17]
Manufacturer.
Definition ximc.h:2541
char PartNumber[25]
Series and PartNumber.
Definition ximc.h:2542
Deprecated.
Definition ximc.h:2557
float MaxOperatingFrequency
Maximum operation frequency (kHz).
Definition ximc.h:2558
float MaxCurrentConsumption
Max current consumption (mA).
Definition ximc.h:2561
float SupplyVoltageMax
Maximum supply voltage (V).
Definition ximc.h:2560
unsigned int PPR
The number of counts per revolution
Definition ximc.h:2562
float SupplyVoltageMin
Minimum supply voltage (V).
Definition ximc.h:2559
unsigned int EncoderSettings
Encoder settings flags.
Definition ximc.h:2563
EAS settings.
Definition ximc.h:2088
unsigned int stepcloseloop_Kw
Manufacturer only.
Definition ximc.h:2089
unsigned int stepcloseloop_Kp_high
Manufacturer only.
Definition ximc.h:2091
unsigned int stepcloseloop_Kp_low
Manufacturer only.
Definition ximc.h:2090
Movement limitations and settings, related to the motor.
Definition ximc.h:1511
float Antiplay
Number of pulses or steps for backlash (play) compensation procedure.
Definition ximc.h:1516
unsigned int EngineFlags
Flags of engine settings.
Definition ximc.h:1515
unsigned int MicrostepMode
Flags of microstep mode.
Definition ximc.h:1517
unsigned int StepsPerRev
Number of full steps per revolution (Used with stepper motor only).
Definition ximc.h:1518
unsigned int NomVoltage
Rated voltage in tens of mV.
Definition ximc.h:1512
unsigned int NomCurrent
Rated current (in mA).
Definition ximc.h:1513
float NomSpeed
Nominal speed.
Definition ximc.h:1514
Movement limitations and settings related to the motor.
Definition ximc.h:1482
unsigned int NomSpeed
Nominal (maximum) speed (in whole steps/s or rpm for DC and stepper motor as a master encoder).
Definition ximc.h:1485
unsigned int EngineFlags
Flags of engine settings.
Definition ximc.h:1487
unsigned int MicrostepMode
Flags of microstep mode.
Definition ximc.h:1489
unsigned int StepsPerRev
Number of full steps per revolution (Used with stepper motor only).
Definition ximc.h:1490
unsigned int uNomSpeed
The fractional part of a nominal speed in microsteps (is only used with stepper motor).
Definition ximc.h:1486
unsigned int NomVoltage
Rated voltage in tens of mV.
Definition ximc.h:1483
unsigned int NomCurrent
Rated current (in mA).
Definition ximc.h:1484
int Antiplay
Number of pulses or steps for backlash (play) compensation procedure.
Definition ximc.h:1488
Engine type and driver type settings.
Definition ximc.h:1538
unsigned int EngineType
Flags of engine type.
Definition ximc.h:1539
unsigned int DriverType
Flags of driver type.
Definition ximc.h:1540
EST settings This data is stored in the controller's flash memory.
Definition ximc.h:2110
unsigned int Param1
Definition ximc.h:2111
EXTIO settings.
Definition ximc.h:1769
unsigned int EXTIOSetupFlags
External IO setup flags.
Definition ximc.h:1770
unsigned int EXTIOModeFlags
External IO mode flags.
Definition ximc.h:1771
Feedback settings.
Definition ximc.h:1324
unsigned int IPS
The number of encoder counts per shaft revolution.
Definition ximc.h:1325
unsigned int FeedbackType
Feedback type.
Definition ximc.h:1326
unsigned int FeedbackFlags
Describes feedback flags.
Definition ximc.h:1327
unsigned int CountsPerTurn
The number of encoder counts per shaft revolution.
Definition ximc.h:1328
Deprecated.
Definition ximc.h:2615
char Manufacturer[17]
Manufacturer.
Definition ximc.h:2616
char PartNumber[25]
Series and PartNumber.
Definition ximc.h:2617
Deprecated.
Definition ximc.h:2632
float ReductionIn
Input reduction coefficient.
Definition ximc.h:2633
float MaxOutputBacklash
Output backlash of the reduction gear (degree).
Definition ximc.h:2637
float InputInertia
Equivalent input gear inertia (g * cm2).
Definition ximc.h:2638
float Efficiency
Reduction gear efficiency (%).
Definition ximc.h:2639
float RatedInputSpeed
Maximum speed on the input shaft (rpm).
Definition ximc.h:2636
float ReductionOut
Output reduction coefficient.
Definition ximc.h:2634
float RatedInputTorque
Maximum continuous torque (N * m).
Definition ximc.h:2635
Position information.
Definition ximc.h:2149
float Position
The position in the engine.
Definition ximc.h:2150
long_t EncPosition
Encoder position.
Definition ximc.h:2151
Position information.
Definition ximc.h:2129
int uPosition
Microstep position is only used with stepper motors.
Definition ximc.h:2131
int Position
The position of the whole steps in the engine
Definition ximc.h:2130
long_t EncPosition
Encoder position.
Definition ximc.h:2132
Globally unique identifier.
Definition ximc.h:2695
unsigned int UniqueID1
Unique ID 1.
Definition ximc.h:2697
unsigned int UniqueID0
Unique ID 0.
Definition ximc.h:2696
unsigned int UniqueID3
Unique ID 3.
Definition ximc.h:2699
unsigned int UniqueID2
Unique ID 2.
Definition ximc.h:2698
Deprecated.
Definition ximc.h:2578
char Manufacturer[17]
Manufacturer.
Definition ximc.h:2579
char PartNumber[25]
Series and PartNumber.
Definition ximc.h:2580
Deprecated.
Definition ximc.h:2595
float MaxOperatingFrequency
Maximum operation frequency (kHz).
Definition ximc.h:2596
float MaxCurrentConsumption
Maximum current consumption (mA).
Definition ximc.h:2599
float SupplyVoltageMax
Maximum supply voltage (V).
Definition ximc.h:2598
unsigned int PPR
The number of counts per revolution
Definition ximc.h:2600
float SupplyVoltageMin
Minimum supply voltage (V).
Definition ximc.h:2597
Position calibration settings which use user units.
Definition ximc.h:1372
float HomeDelta
Distance from break point.
Definition ximc.h:1375
float FastHome
Speed used for first motion.
Definition ximc.h:1373
unsigned int HomeFlags
Home settings flags.
Definition ximc.h:1376
float SlowHome
Speed used for second motion.
Definition ximc.h:1374
Position calibration settings.
Definition ximc.h:1346
unsigned int SlowHome
Speed used for second motion (full steps).
Definition ximc.h:1349
unsigned int FastHome
Speed used for first motion (full steps).
Definition ximc.h:1347
unsigned int HomeFlags
Home settings flags.
Definition ximc.h:1353
int HomeDelta
Distance from break point (full steps).
Definition ximc.h:1351
int uHomeDelta
Fractional part of the delta distance, microsteps.
Definition ximc.h:1352
unsigned int uFastHome
Fractional part of the speed for first motion, microsteps.
Definition ximc.h:1348
unsigned int uSlowHome
Part of the speed for second motion, microsteps.
Definition ximc.h:1350
Random key.
Definition ximc.h:2681
uint8_t key[16]
Random key.
Definition ximc.h:2682
Joystick settings.
Definition ximc.h:1900
unsigned int JoyCenter
Joystick center position.
Definition ximc.h:1902
unsigned int ExpFactor
Exponential nonlinearity factor.
Definition ximc.h:1904
unsigned int JoyFlags
Joystick flags.
Definition ximc.h:1906
unsigned int JoyHighEnd
Joystick upper end position.
Definition ximc.h:1903
unsigned int JoyLowEnd
Joystick lower end position.
Definition ximc.h:1901
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:1905
The structure contains a sequence of measured axis motion parameters - velocities and position errors...
Definition ximc.h:2270
int Error[25]
Position error in microsteps (whole steps are recalculated considering the current step division mode...
Definition ximc.h:2272
unsigned int Length
Actual sequence length.
Definition ximc.h:2273
int Speed[25]
Sequence of measured speeds (in encoder counts/s or microsteps/sec, depending on the motor type and c...
Definition ximc.h:2271
Deprecated.
Definition ximc.h:2485
char Manufacturer[17]
Manufacturer.
Definition ximc.h:2486
char PartNumber[25]
Series and PartNumber.
Definition ximc.h:2487
Deprecated.
Definition ximc.h:2502
float MechanicalTimeConstant
Mechanical time constant (ms).
Definition ximc.h:2520
float DetentTorque
Holding torque position with unpowered windings (mN * m).
Definition ximc.h:2516
float WindingResistance
Resistance of windings for DC engines, of each of two windings for stepper motors,...
Definition ximc.h:2512
float StallTorque
Torque hold position for a stepper motor or torque at a motionless rotor for other types of engines (...
Definition ximc.h:2515
float SpeedTorqueGradient
Speed torque gradient (rpm / mN * m).
Definition ximc.h:2519
float NominalVoltage
Nominal voltage on winding (B).
Definition ximc.h:2507
unsigned int Phases
Number of phases for BLDC motors.
Definition ximc.h:2506
float TorqueConstant
Torque constant that determines the proportionality constant between the maximum rotor torque and cur...
Definition ximc.h:2517
unsigned int MotorType
Motor Type flags.
Definition ximc.h:2503
float NominalSpeed
Not used.
Definition ximc.h:2509
float NominalCurrent
Maximum direct current in winding for DC and BLDC engines, nominal current in windings for stepper mo...
Definition ximc.h:2508
unsigned int ReservedField
Reserved
Definition ximc.h:2504
float MaxSpeed
The maximum speed for stepper motors (steps/s) or DC and BLDC motors (rmp).
Definition ximc.h:2521
float SpeedConstant
Velocity constant, which determines the value or the amplitude of the induced voltage on the motion o...
Definition ximc.h:2518
unsigned int Poles
Number of pole pairs for DC or BLDC motors or number of steps per rotation for stepper motors.
Definition ximc.h:2505
float MaxCurrentTime
Safe duration of overcurrent in the winding (ms).
Definition ximc.h:2523
float WindingInductance
Inductance of windings for DC engines, inductance of each of two windings for stepper motors,...
Definition ximc.h:2513
float NominalPower
Nominal power (W).
Definition ximc.h:2511
float NoLoadSpeed
Idle speed (rpm).
Definition ximc.h:2525
float NoLoadCurrent
The current consumption in idle mode (A).
Definition ximc.h:2524
float NominalTorque
Nominal torque (mN * m).
Definition ximc.h:2510
float RotorInertia
Rotor inertia (g * cm2).
Definition ximc.h:2514
float MaxCurrent
The maximum current in the winding (A).
Definition ximc.h:2522
User units move settings.
Definition ximc.h:1413
unsigned int MoveFlags
Flags of the motion parameters.
Definition ximc.h:1462
float Decel
Deceleration
Definition ximc.h:1438
float Speed
Speed
Definition ximc.h:1414
float AntiplaySpeed
Antiplay speed
Definition ximc.h:1450
float Accel
Acceleration:
Definition ximc.h:1426
Move settings.
Definition ximc.h:1391
unsigned int Accel
Motor shaft acceleration, steps/s^2 (stepper motor) or RPM/s (DC).
Definition ximc.h:1394
unsigned int uAntiplaySpeed
Speed in antiplay mode, microsteps/s.
Definition ximc.h:1397
unsigned int MoveFlags
Flags of the motion parameters.
Definition ximc.h:1398
unsigned int AntiplaySpeed
Speed in antiplay mode, full steps/s (stepper motor) or RPM (DC).
Definition ximc.h:1396
unsigned int Speed
Target speed (for stepper motor: steps/s, for DC: rpm).
Definition ximc.h:1392
unsigned int uSpeed
Target speed in microstep fractions/s.
Definition ximc.h:1393
unsigned int Decel
Motor shaft deceleration, steps/s^2 (stepper motor) or RPM/s (DC).
Definition ximc.h:1395
Network settings.
Definition ximc.h:1967
unsigned int DefaultGateway[4]
Default value of the gateway in format x.x.x.x.
Definition ximc.h:1971
unsigned int SubnetMask[4]
The mask of the subnet in format x.x.x.x.
Definition ximc.h:1970
unsigned int DHCPEnabled
Indicates the method to get the IP-address.
Definition ximc.h:1968
unsigned int IPv4Address[4]
IP-address of the device in format x.x.x.x.
Definition ximc.h:1969
Structure contains user data to save into the FRAM.
Definition ximc.h:2041
unsigned int UserData[7]
User data.
Definition ximc.h:2042
The web-page user password.
Definition ximc.h:1988
char UserPassword[21]
Password for the web-page that the user can change with a USB command or via web-page.
Definition ximc.h:1989
PID settings.
Definition ximc.h:1652
unsigned int KdU
Differential gain for voltage PID routine
Definition ximc.h:1655
float Kpf
Proportional gain for BLDC position PID routine
Definition ximc.h:1656
float Kdf
Differential gain for BLDC position PID routine
Definition ximc.h:1658
float Kif
Integral gain for BLDC position PID routine
Definition ximc.h:1657
unsigned int KpU
Proportional gain for voltage PID routine
Definition ximc.h:1653
unsigned int KiU
Integral gain for voltage PID routine
Definition ximc.h:1654
Step motor power settings.
Definition ximc.h:1555
unsigned int HoldCurrent
Holding current, as percent of the nominal current.
Definition ximc.h:1556
unsigned int CurrReductDelay
Time in ms from going to STOP state to the end of current reduction.
Definition ximc.h:1557
unsigned int PowerFlags
Flags of power settings of stepper motor.
Definition ximc.h:1560
unsigned int CurrentSetTime
Time in ms to reach the nominal current.
Definition ximc.h:1559
unsigned int PowerOffDelay
Time in s from going to STOP state to turning power off.
Definition ximc.h:1558
This structure contains protection parameters: critical electrical values, flags for protection algor...
Definition ximc.h:1575
unsigned int CriticalT
Maximum temperature, which triggers ALARM state, in tenths of degrees Celsius.
Definition ximc.h:1579
unsigned int CriticalUusb
Deprecated.
Definition ximc.h:1581
unsigned int MinimumUusb
Deprecated.
Definition ximc.h:1582
unsigned int CriticalIusb
Deprecated.
Definition ximc.h:1580
unsigned int CriticalUpwr
Maximum motor voltage which triggers ALARM state, in tens of mV.
Definition ximc.h:1578
unsigned int LowUpwrOff
Lower voltage limit to turn off the motor, in tens of mV.
Definition ximc.h:1576
unsigned int Flags
Flags of secure settings.
Definition ximc.h:1583
unsigned int CriticalIpwr
Maximum motor current which triggers ALARM state, in mA.
Definition ximc.h:1577
The structure contains a new serial number, hardware version, and valid key.
Definition ximc.h:2333
unsigned int Release
Number of edits this release of hardware.
Definition ximc.h:2338
uint8_t Key[32]
Protection key (256 bit).
Definition ximc.h:2335
unsigned int SN
New board serial number.
Definition ximc.h:2334
unsigned int Major
The major number of the hardware version.
Definition ximc.h:2336
unsigned int Minor
The minor number of the hardware version.
Definition ximc.h:2337
User unit position information.
Definition ximc.h:2187
unsigned int PosFlags
Position setting flags.
Definition ximc.h:2190
float Position
The position in the engine.
Definition ximc.h:2188
long_t EncPosition
Encoder position.
Definition ximc.h:2189
Position information.
Definition ximc.h:2167
int uPosition
Microstep position is only used with stepper motors.
Definition ximc.h:2169
unsigned int PosFlags
Position setting flags.
Definition ximc.h:2171
int Position
The position of the whole steps in the engine
Definition ximc.h:2168
long_t EncPosition
Encoder position.
Definition ximc.h:2170
Deprecated.
Definition ximc.h:2444
char Manufacturer[17]
Manufacturer.
Definition ximc.h:2445
char PartNumber[25]
Series and PartNumber.
Definition ximc.h:2446
Stage username.
Definition ximc.h:2428
char PositionerName[17]
User's positioner name.
Definition ximc.h:2429
Deprecated.
Definition ximc.h:2461
float VerticalLoadCapacity
Vertical load capacity (kg).
Definition ximc.h:2470
char Units[9]
Units for MaxSpeed and TravelRange fields of the structure (steps, degrees, mm, .....
Definition ximc.h:2463
float MaxCurrentConsumption
Maximum current consumption (A).
Definition ximc.h:2468
float MaxSpeed
Maximum speed (Units/c).
Definition ximc.h:2464
float TravelRange
Travel range (Units).
Definition ximc.h:2465
float SupplyVoltageMax
Maximum supply voltage (V).
Definition ximc.h:2467
float HorizontalLoadCapacity
Horizontal load capacity (kg).
Definition ximc.h:2469
float SupplyVoltageMin
Minimum supply voltage (V).
Definition ximc.h:2466
float LeadScrewPitch
Lead screw pitch (mm).
Definition ximc.h:2462
User unit device's state.
Definition ximc.h:2240
int CurT
Temperature, tenths of degrees Celsius.
Definition ximc.h:2253
int Iusb
USB current, mA.
Definition ximc.h:2251
int Ipwr
Engine current, mA.
Definition ximc.h:2249
float CurPosition
Current position.
Definition ximc.h:2246
unsigned int MvCmdSts
Move command state.
Definition ximc.h:2242
int Upwr
Power supply voltage, tens of mV.
Definition ximc.h:2250
unsigned int PWRSts
Flags of power state of stepper motor.
Definition ximc.h:2243
unsigned int MoveSts
Flags of move state.
Definition ximc.h:2241
unsigned int CmdBufFreeSpace
This field is a service field.
Definition ximc.h:2256
int Uusb
USB voltage, tens of mV.
Definition ximc.h:2252
unsigned int WindSts
Winding state.
Definition ximc.h:2245
unsigned int EncSts
Encoder state.
Definition ximc.h:2244
unsigned int Flags
Status flags.
Definition ximc.h:2254
long_t EncPosition
Current encoder position.
Definition ximc.h:2247
unsigned int GPIOFlags
Status flags of the GPIO outputs.
Definition ximc.h:2255
float CurSpeed
Motor shaft speed.
Definition ximc.h:2248
Device state.
Definition ximc.h:2206
int CurT
Temperature, tenths of degrees Celsius.
Definition ximc.h:2221
int Iusb
USB current, mA.
Definition ximc.h:2219
int Ipwr
Engine current, mA.
Definition ximc.h:2217
unsigned int MvCmdSts
Move command state.
Definition ximc.h:2208
int CurSpeed
Motor shaft speed in steps/s or rpm.
Definition ximc.h:2215
int Upwr
Power supply voltage, tens of mV.
Definition ximc.h:2218
unsigned int PWRSts
Flags of power state of stepper motor.
Definition ximc.h:2209
unsigned int MoveSts
Flags of move state.
Definition ximc.h:2207
unsigned int CmdBufFreeSpace
This field is a service field.
Definition ximc.h:2224
int Uusb
USB voltage, tens of mV.
Definition ximc.h:2220
unsigned int WindSts
Winding state.
Definition ximc.h:2211
unsigned int EncSts
Encoder state.
Definition ximc.h:2210
unsigned int Flags
Status flags.
Definition ximc.h:2222
int CurPosition
Current position.
Definition ximc.h:2212
int uCurSpeed
Fractional part of motor shaft speed in microsteps.
Definition ximc.h:2216
long_t EncPosition
Current encoder position.
Definition ximc.h:2214
int uCurPosition
Step motor shaft position in microsteps.
Definition ximc.h:2213
unsigned int GPIOFlags
Status flags of the GPIO outputs.
Definition ximc.h:2223
User unit synchronization settings.
Definition ximc.h:1700
unsigned int ClutterTime
Input synchronization pulse dead time (us).
Definition ximc.h:1702
float Speed
Target speed.
Definition ximc.h:1704
unsigned int SyncInFlags
Flags for synchronization input setup.
Definition ximc.h:1701
float Position
Desired position or shift.
Definition ximc.h:1703
Synchronization settings.
Definition ximc.h:1676
int uPosition
The fractional part of a position or shift in microsteps.
Definition ximc.h:1680
unsigned int ClutterTime
Input synchronization pulse dead time (us).
Definition ximc.h:1678
int Position
Desired position or shift (full steps)
Definition ximc.h:1679
unsigned int Speed
Target speed (for stepper motor: steps/s, for DC: rpm).
Definition ximc.h:1681
unsigned int SyncInFlags
Flags for synchronization input setup.
Definition ximc.h:1677
unsigned int uSpeed
Target speed in microsteps/s.
Definition ximc.h:1682
Synchronization settings which use user units.
Definition ximc.h:1745
float Accuracy
This is the neighborhood around the target coordinates, every point in which is treated as the target...
Definition ximc.h:1749
unsigned int SyncOutPeriod
This value specifies the number of encoder pulses or steps between two output synchronization pulses ...
Definition ximc.h:1748
unsigned int SyncOutPulseSteps
This value specifies the duration of output pulse.
Definition ximc.h:1747
unsigned int SyncOutFlags
Flags of synchronization output.
Definition ximc.h:1746
Synchronization settings.
Definition ximc.h:1722
unsigned int uAccuracy
This is the neighborhood around the target coordinates in microsteps (used with a stepper motor only)...
Definition ximc.h:1727
unsigned int Accuracy
This is the neighborhood around the target coordinates, every point in which is treated as the target...
Definition ximc.h:1726
unsigned int SyncOutPeriod
This value specifies the number of encoder pulses or steps between two output synchronization pulses ...
Definition ximc.h:1725
unsigned int SyncOutPulseSteps
This value specifies the duration of output pulse.
Definition ximc.h:1724
unsigned int SyncOutFlags
Flags of synchronization output.
Definition ximc.h:1723
UART settings.
Definition ximc.h:1948
unsigned int Speed
UART baudrate (in bauds)
Definition ximc.h:1949
unsigned int UARTSetupFlags
UART parity flags.
Definition ximc.h:1950
result_t XIMC_API command_sstp(device_t id)
Soft stop the engine.
result_t XIMC_API get_accessories_settings(device_t id, accessories_settings_t *accessories_settings)
Deprecated.
result_t XIMC_API close_device(device_t *id)
Close specified device
void XIMC_API set_logging_callback(logging_callback_t logging_callback, void *user_data)
Sets a logging callback.
result_t XIMC_API goto_firmware(device_t id, uint8_t *ret)
Reboot to firmware
result_t XIMC_API get_gear_information(device_t id, gear_information_t *gear_information)
Deprecated.
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.
result_t XIMC_API set_accessories_settings(device_t id, const accessories_settings_t *accessories_settings)
Deprecated.
result_t XIMC_API set_network_settings(device_t id, const network_settings_t *network_settings)
Set network settings.
int XIMC_API get_device_count(device_enumeration_t device_enumeration)
Get device count.
result_t XIMC_API service_command_updf(device_t id)
The command switches the controller to update the firmware state.
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 get_move_settings(device_t id, move_settings_t *move_settings)
Movement settings read command (speed, acceleration, threshold, etc.).
result_t XIMC_API command_eeread_settings(device_t id)
Read settings from the stage's EEPROM to the controller's RAM.
result_t XIMC_API get_extio_settings(device_t id, extio_settings_t *extio_settings)
Read EXTIO settings.
result_t XIMC_API get_uart_settings(device_t id, uart_settings_t *uart_settings)
Read UART settings.
result_t XIMC_API get_status_calb(device_t id, status_calb_t *status, const calibration_t *calibration)
Return device state.
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.
result_t XIMC_API command_home(device_t id)
Moving to home position.
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.
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.).
result_t XIMC_API get_calibration_settings(device_t id, calibration_settings_t *calibration_settings)
Read calibration settings.
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.
result_t XIMC_API set_edges_settings(device_t id, const edges_settings_t *edges_settings)
Set border and limit switches settings.
result_t XIMC_API command_read_robust_settings(device_t id)
Read important settings (calibration coefficients, etc.) from the controller's flash memory to the co...
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 command_start_measurements(device_t id)
Start measurements and buffering of speed and the speed error (target speed minus real speed).
result_t XIMC_API set_emf_settings(device_t id, const emf_settings_t *emf_settings)
Set electromechanical coefficients.
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.
result_t XIMC_API get_debug_read(device_t id, debug_read_t *debug_read)
Read data from firmware for debug purpose.
result_t XIMC_API set_stage_name(device_t id, const stage_name_t *stage_name)
Write the user's stage name to EEPROM.
result_t XIMC_API get_sync_out_settings(device_t id, sync_out_settings_t *sync_out_settings)
Read output synchronization settings.
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.
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 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 get_chart_data(device_t id, chart_data_t *chart_data)
Return device electrical parameters, useful for charts.
void XIMC_API ximc_version(char *version)
Returns a library version
result_t XIMC_API get_engine_advanced_setup(device_t id, engine_advanced_setup_t *engine_advanced_setup)
Read engine advanced settings.
result_t XIMC_API command_reset(device_t id)
Reset controller.
uint32_t device_enumeration_t
Type describes device enumeration structure
Definition ximc.h:130
int device_t
Type describes device identifier
Definition ximc.h:107
result_t XIMC_API command_move_calb(device_t id, float Position, const calibration_t *calibration)
Move to position using user units.
result_t XIMC_API set_debug_write(device_t id, const debug_write_t *debug_write)
Write data to firmware for debug purpose.
result_t XIMC_API reset_locks()
Resets the error of incorrect data transmission.
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 set_extended_settings(device_t id, const extended_settings_t *extended_settings)
Set extended settings.
result_t XIMC_API set_sync_out_settings(device_t id, const sync_out_settings_t *sync_out_settings)
Set output synchronization settings.
result_t XIMC_API get_hallsensor_information(device_t id, hallsensor_information_t *hallsensor_information)
Deprecated.
result_t XIMC_API get_edges_settings(device_t id, edges_settings_t *edges_settings)
Read border and limit switches settings.
result_t XIMC_API get_engine_settings(device_t id, engine_settings_t *engine_settings)
Read engine settings.
result_t XIMC_API set_engine_settings(device_t id, const engine_settings_t *engine_settings)
Set engine settings.
result_t XIMC_API set_gear_settings(device_t id, const gear_settings_t *gear_settings)
Deprecated.
result_t XIMC_API write_key(const char *uri, uint8_t *key)
Write controller key.
result_t XIMC_API command_save_robust_settings(device_t id)
Save important settings (calibration coefficients, etc.) from the controller's RAM to the controller'...
result_t XIMC_API set_move_settings(device_t id, const move_settings_t *move_settings)
Movement settings set command (speed, acceleration, threshold, etc.).
char * pchar
Nevermind
Definition ximc.h:5286
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.
result_t XIMC_API command_clear_fram(device_t id)
Clear controller FRAM.
result_t XIMC_API set_power_settings(device_t id, const power_settings_t *power_settings)
Set settings of step motor power control.
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.
result_t XIMC_API set_entype_settings(device_t id, const entype_settings_t *entype_settings)
Set engine type and driver type.
result_t XIMC_API get_stage_information(device_t id, stage_information_t *stage_information)
Deprecated.
result_t XIMC_API set_encoder_settings(device_t id, const encoder_settings_t *encoder_settings)
Deprecated.
result_t XIMC_API get_password_settings(device_t id, password_settings_t *password_settings)
Read the password.
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.
result_t XIMC_API command_homezero(device_t id)
Make home command, wait until it is finished and make zero command.
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.
result_t XIMC_API set_stage_settings(device_t id, const stage_settings_t *stage_settings)
Deprecated.
device_enumeration_t XIMC_API enumerate_devices(int enumerate_flags, const char *hints)
Search and list of available devices.
result_t XIMC_API command_left(device_t id)
Start continuous moving to the left.
result_t XIMC_API get_device_information(device_t id, device_information_t *device_information)
Return device information.
void(XIMC_CALLCONV * logging_callback_t)(int loglevel, const wchar_t *message, void *user_data)
Logging callback prototype
Definition ximc.h:5439
result_t XIMC_API has_firmware(const char *uri, uint8_t *ret)
Check for firmware on device
result_t XIMC_API set_motor_settings(device_t id, const motor_settings_t *motor_settings)
Deprecated.
result_t XIMC_API get_stage_settings(device_t id, stage_settings_t *stage_settings)
Deprecated.
result_t XIMC_API get_encoder_information(device_t id, encoder_information_t *encoder_information)
Deprecated.
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.
result_t XIMC_API free_enumerate_devices(device_enumeration_t device_enumeration)
Free memory returned by enumerate_devices.
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.
result_t XIMC_API get_nonvolatile_memory(device_t id, nonvolatile_memory_t *nonvolatile_memory)
Read user data from FRAM.
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).
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 get_gear_settings(device_t id, gear_settings_t *gear_settings)
Deprecated.
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.).
result_t XIMC_API set_password_settings(device_t id, const password_settings_t *password_settings)
Sets the password.
result_t XIMC_API set_secure_settings(device_t id, const secure_settings_t *secure_settings)
Set protection settings.
result_t XIMC_API get_firmware_version(device_t id, unsigned int *Major, unsigned int *Minor, unsigned int *Release)
Read the controller's firmware version.
result_t XIMC_API set_extio_settings(device_t id, const extio_settings_t *extio_settings)
Set EXTIO settings.
result_t XIMC_API command_right(device_t id)
Start continuous moving to the right.
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
result_t XIMC_API get_status(device_t id, status_t *status)
Return device state.
result_t XIMC_API get_init_random(device_t id, init_random_t *init_random)
Read a random number from the controller.
#define XIMC_CALLCONV
Definition ximc.h:46
pchar XIMC_API get_device_name(device_enumeration_t device_enumeration, int device_index)
Get device name from the device enumeration.
void XIMC_API msec_sleep(unsigned int msec)
Sleeps for a specified amount of time
result_t XIMC_API command_move(device_t id, int Position, int uPosition)
Move to position.
result_t XIMC_API get_secure_settings(device_t id, secure_settings_t *secure_settings)
Read protection settings.
result_t XIMC_API get_brake_settings(device_t id, brake_settings_t *brake_settings)
Read break control settings.
result_t XIMC_API get_motor_settings(device_t id, motor_settings_t *motor_settings)
Deprecated.
result_t XIMC_API get_bootloader_version(device_t id, unsigned int *Major, unsigned int *Minor, unsigned int *Release)
Read the controller's bootloader version.
result_t XIMC_API set_sync_in_settings(device_t id, const sync_in_settings_t *sync_in_settings)
Set input synchronization settings.
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 command_zero(device_t id)
Sets the current position to 0.
result_t XIMC_API set_gear_information(device_t id, const gear_information_t *gear_information)
Deprecated.
result_t XIMC_API set_pid_settings(device_t id, const pid_settings_t *pid_settings)
Set PID settings.
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.
result_t XIMC_API set_joystick_settings(device_t id, const joystick_settings_t *joystick_settings)
Set joystick position.
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.
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.
result_t XIMC_API get_controller_name(device_t id, controller_name_t *controller_name)
Read user's controller name and internal settings from the FRAM.
#define XIMC_API
Definition ximc.h:31
result_t XIMC_API set_controller_name(device_t id, const controller_name_t *controller_name)
Write user's controller name and internal settings to the FRAM.
result_t XIMC_API get_encoder_settings(device_t id, encoder_settings_t *encoder_settings)
Deprecated.
result_t XIMC_API command_eesave_settings(device_t id)
Save settings from the controller's RAM to the stage's EEPROM.
result_t XIMC_API get_home_settings(device_t id, home_settings_t *home_settings)
Read home settings.
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.
result_t XIMC_API get_joystick_settings(device_t id, joystick_settings_t *joystick_settings)
Read joystick settings.
result_t XIMC_API set_engine_advanced_setup(device_t id, const engine_advanced_setup_t *engine_advanced_setup)
Set engine advanced settings.
result_t XIMC_API set_encoder_information(device_t id, const encoder_information_t *encoder_information)
Deprecated.
result_t XIMC_API command_save_settings(device_t id)
Save all settings from the controller's RAM to the controller's flash memory, replacing previous data...
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 set_calibration_settings(device_t id, const calibration_settings_t *calibration_settings)
Set calibration settings.
result_t XIMC_API set_motor_information(device_t id, const motor_information_t *motor_information)
Deprecated.
result_t XIMC_API get_emf_settings(device_t id, emf_settings_t *emf_settings)
Read electromechanical settings.
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.
result_t XIMC_API get_stage_name(device_t id, stage_name_t *stage_name)
Read the user's stage name from the EEPROM.
result_t XIMC_API set_nonvolatile_memory(device_t id, const nonvolatile_memory_t *nonvolatile_memory)
Write user data into the FRAM.
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 command_movr_calb(device_t id, float DeltaPosition, const calibration_t *calibration)
Shift by a set offset using user units.
int result_t
Type specifies result of any operation
Definition ximc.h:117
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's flash memory.
result_t XIMC_API get_feedback_settings(device_t id, feedback_settings_t *feedback_settings)
Feedback settings.
result_t XIMC_API set_stage_information(device_t id, const stage_information_t *stage_information)
Deprecated.
result_t XIMC_API set_uart_settings(device_t id, const uart_settings_t *uart_settings)
Set UART settings.
result_t XIMC_API probe_device(const char *uri)
Check if a device with OS uri uri is XIMC device.
result_t XIMC_API command_wait_for_stop(device_t id, uint32_t refresh_interval_ms)
Wait for stop
result_t XIMC_API set_hallsensor_information(device_t id, const hallsensor_information_t *hallsensor_information)
Deprecated.
result_t XIMC_API command_movr(device_t id, int DeltaPosition, int uDeltaPosition)
Shift by a set offset.
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
result_t XIMC_API get_extended_settings(device_t id, extended_settings_t *extended_settings)
Read extended settings.
result_t XIMC_API get_serial_number(device_t id, unsigned int *SerialNumber)
Read device serial number.
result_t XIMC_API get_network_settings(device_t id, network_settings_t *network_settings)
Read network settings.
result_t XIMC_API command_read_settings(device_t id)
Read all settings from the controller's flash memory to the controller's RAM, replacing previous data...
result_t XIMC_API command_power_off(device_t id)
Immediately power off the motor regardless its state.
result_t XIMC_API set_correction_table(device_t id, const char *namefile)
Command of loading a correction table from a text file.
result_t XIMC_API set_feedback_settings(device_t id, const feedback_settings_t *feedback_settings)
Feedback settings.
result_t XIMC_API command_update_firmware(const char *uri, const uint8_t *data, uint32_t data_size)
Update firmware.
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 get_control_settings(device_t id, control_settings_t *control_settings)
Read motor control settings.
result_t XIMC_API get_pid_settings(device_t id, pid_settings_t *pid_settings)
Read PID settings.
result_t XIMC_API get_ctp_settings(device_t id, ctp_settings_t *ctp_settings)
Read control position settings (used with stepper motor only).
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_hallsensor_settings(device_t id, hallsensor_settings_t *hallsensor_settings)
Deprecated.
result_t XIMC_API get_motor_information(device_t id, motor_information_t *motor_information)
Deprecated.
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 get_sync_in_settings(device_t id, sync_in_settings_t *sync_in_settings)
Read input synchronization settings.
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 set_brake_settings(device_t id, const brake_settings_t *brake_settings)
Set brake control settings.
result_t XIMC_API set_hallsensor_settings(device_t id, const hallsensor_settings_t *hallsensor_settings)
Deprecated.
result_t XIMC_API set_home_settings(device_t id, const home_settings_t *home_settings)
Set home settings.