8SMC4 USB Programming Manual Eng

8SMC4-USB_Programming_manual_Eng

User Manual:

Open the PDF directly: View PDF PDF.
Page Count: 152

Download8SMC4-USB Programming Manual Eng
Open PDF In BrowserView PDF
libximc
2.2.2

Generated by Doxygen 1.8.1.2
Fri Nov 29 2013 01:25:06

Contents
1

2

3

4

Introduction

1

1.1

About . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

1

1.2

System requirements . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

1

1.2.1

For rebuilding library . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

1

1.2.2

For using library . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

2

How to rebuild library

3

2.1

Building on generic UNIX . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

3

2.2

Building on debian-based linux systems

. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

3

2.3

Building on redhat-based linux systems . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

3

2.4

Building on FreeBSD . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

4

2.5

Buliding on Mac OS X . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

4

2.6

Buliding on Windows . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

4

2.7

Source code access . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

4

How to use with...

5

3.1

Usage with C . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

5

3.1.1

Visual C++ . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

5

3.1.2

MinGW . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

5

3.1.3

C++ Builder . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

5

3.1.4

XCode . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

6

3.1.5

GCC . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

6

3.2

.NET . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

6

3.3

Delphi . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

6

3.4

MATLAB . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

6

Data Structure Documentation
4.1

7

accessories settings t Struct Reference

. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

7

4.1.1

Detailed Description

. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

7

4.1.2

Field Documentation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

8

4.1.2.1

LimitSwitchesSettings . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

8

4.1.2.2

MagneticBrakeInfo . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

8

CONTENTS

4.2

4.3

4.4

ii

4.1.2.3

MBRatedCurrent . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

8

4.1.2.4

MBRatedVoltage . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

8

4.1.2.5

MBSettings . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

8

4.1.2.6

MBTorque . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

8

4.1.2.7

TemperatureSensorInfo . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

8

4.1.2.8

TSGrad . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

8

4.1.2.9

TSMax . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

8

4.1.2.10 TSMin . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

8

4.1.2.11 TSSettings . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

8

add sync in action calb t Struct Reference . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

9

4.2.1

Field Documentation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

9

4.2.1.1

Position

. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

9

4.2.1.2

Speed . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

9

add sync in action t Struct Reference

. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

9

4.3.1

Detailed Description

. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

9

4.3.2

Field Documentation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

9

4.3.2.1

Speed . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

9

4.3.2.2

uPosition . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

10

4.3.2.3

uSpeed . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

10

analog data t Struct Reference . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

10

4.4.1

Detailed Description

. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

11

4.4.2

Field Documentation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

11

4.4.2.1

A1Voltage . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

11

4.4.2.2

A1Voltage ADC . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

11

4.4.2.3

A2Voltage . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

11

4.4.2.4

A2Voltage ADC . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

12

4.4.2.5

ACurrent . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

12

4.4.2.6

ACurrent ADC . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

12

4.4.2.7

B1Voltage . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

12

4.4.2.8

B1Voltage ADC . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

12

4.4.2.9

B2Voltage . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

12

4.4.2.10 B2Voltage ADC . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

12

4.4.2.11 BCurrent . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

12

4.4.2.12 BCurrent ADC . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

12

4.4.2.13 FullCurrent . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

12

4.4.2.14 FullCurrent ADC . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

12

4.4.2.15 Joy . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

12

4.4.2.16 Joy ADC . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

13

4.4.2.17 L . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

13

4.4.2.18 L5

13

. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

Generated on Fri Nov 29 2013 01:25:06 for libximc by Doxygen

CONTENTS

iii

4.4.2.19 L5 ADC

4.5

4.6

4.7

4.8

4.9

. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

13

4.4.2.20 Pot . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

13

4.4.2.21 R . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

13

4.4.2.22 SupVoltage . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

13

4.4.2.23 SupVoltage ADC . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

13

4.4.2.24 Temp . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

13

4.4.2.25 Temp ADC . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

13

brake settings t Struct Reference . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

13

4.5.1

Detailed Description

. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

14

4.5.2

Field Documentation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

14

4.5.2.1

BrakeFlags . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

14

4.5.2.2

t1 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

14

4.5.2.3

t2 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

14

4.5.2.4

t3 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

14

4.5.2.5

t4 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

14

calibration t Struct Reference . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

14

4.6.1

. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

15

chart data t Struct Reference . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

15

4.7.1

Detailed Description

. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

15

4.7.2

Field Documentation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

16

4.7.2.1

DutyCycle . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

16

4.7.2.2

WindingCurrentA . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

16

4.7.2.3

WindingCurrentB . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

16

4.7.2.4

WindingCurrentC . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

16

4.7.2.5

WindingVoltageA . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

16

4.7.2.6

WindingVoltageB . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

16

4.7.2.7

WindingVoltageC . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

16

control settings calb t Struct Reference . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

16

4.8.1

Field Documentation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

17

4.8.1.1

Flags . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

17

4.8.1.2

MaxClickTime . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

17

4.8.1.3

MaxSpeed . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

17

4.8.1.4

Timeout

. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

17

control settings t Struct Reference . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

17

4.9.1

Detailed Description

. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

17

4.9.2

Field Documentation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

18

4.9.2.1

Flags . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

18

4.9.2.2

MaxClickTime . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

18

4.9.2.3

MaxSpeed . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

18

4.9.2.4

Timeout

18

Detailed Description

. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

Generated on Fri Nov 29 2013 01:25:06 for libximc by Doxygen

CONTENTS

iv

4.9.2.5

uDeltaPosition . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

18

4.9.2.6

uMaxSpeed . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

18

4.10 controller name t Struct Reference . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

18

4.10.1 Detailed Description

. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

19

4.10.2 Field Documentation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

19

4.10.2.1 ControllerName . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

19

4.10.2.2 CtrlFlags . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

19

4.11 ctp settings t Struct Reference . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

19

4.11.1 Detailed Description

. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

19

4.11.2 Field Documentation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

20

4.11.2.1 CTPFlags

. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

20

4.11.2.2 CTPMinError . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

20

4.12 debug read t Struct Reference . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

20

4.12.1 Detailed Description

. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

20

4.12.2 Field Documentation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

20

4.12.2.1 DebugData . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

20

4.13 device information t Struct Reference . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

20

4.13.1 Detailed Description

. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

21

4.14 edges settings calb t Struct Reference . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

21

4.14.1 Field Documentation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

21

4.14.1.1 BorderFlags . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

21

4.14.1.2 EnderFlags . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

21

4.14.1.3 LeftBorder . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

21

4.14.1.4 RightBorder . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

21

4.15 edges settings t Struct Reference . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

21

4.15.1 Detailed Description

. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

22

4.15.2 Field Documentation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

22

4.15.2.1 BorderFlags . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

22

4.15.2.2 EnderFlags . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

22

4.15.2.3 LeftBorder . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

22

4.15.2.4 RightBorder . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

22

4.15.2.5 uLeftBorder

. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

22

4.15.2.6 uRightBorder . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

23

4.16 encoder information t Struct Reference . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

23

4.16.1 Detailed Description

. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

23

4.16.2 Field Documentation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

23

4.16.2.1 Manufacturer . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

23

4.16.2.2 PartNumber . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

23

4.17 encoder settings t Struct Reference
4.17.1 Detailed Description

. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

23

. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

24

Generated on Fri Nov 29 2013 01:25:06 for libximc by Doxygen

CONTENTS

v

4.17.2 Field Documentation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

24

4.17.2.1 EncoderSettings . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

24

4.17.2.2 MaxCurrentConsumption

. . . . . . . . . . . . . . . . . . . . . . . . . . . . .

24

4.17.2.3 MaxOperatingFrequency . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

24

4.17.2.4 SupplyVoltageMax . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

24

4.17.2.5 SupplyVoltageMin . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

24

4.18 engine settings calb t Struct Reference . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

24

4.18.1 Field Documentation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

25

4.18.1.1 Antiplay

. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

25

4.18.1.2 EngineFlags . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

25

4.18.1.3 MicrostepMode . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

25

4.18.1.4 NomCurrent . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

25

4.18.1.5 NomSpeed . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

25

4.18.1.6 NomVoltage . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

25

4.18.1.7 StepsPerRev . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

26

4.19 engine settings t Struct Reference . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

26

4.19.1 Detailed Description

. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

26

4.19.2 Field Documentation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

26

4.19.2.1 Antiplay

. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

26

4.19.2.2 EngineFlags . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

27

4.19.2.3 MicrostepMode . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

27

4.19.2.4 NomCurrent . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

27

4.19.2.5 NomSpeed . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

27

4.19.2.6 NomVoltage . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

27

4.19.2.7 StepsPerRev . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

27

4.19.2.8 uNomSpeed . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

27

4.20 entype settings t Struct Reference . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

27

4.20.1 Detailed Description

. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

28

4.20.2 Field Documentation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

28

4.20.2.1 DriverType . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

28

4.20.2.2 EngineType

. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

28

4.21 extio settings t Struct Reference . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

28

4.21.1 Detailed Description

. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

28

4.21.2 Field Documentation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

28

4.21.2.1 EXTIOModeFlags . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

28

4.21.2.2 EXTIOSetupFlags . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

29

4.22 feedback settings t Struct Reference . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

29

4.22.1 Detailed Description

. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

29

4.22.2 Field Documentation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

29

4.22.2.1 FeedbackFlags . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

29

Generated on Fri Nov 29 2013 01:25:06 for libximc by Doxygen

CONTENTS

vi

4.22.2.2 FeedbackType . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

29

4.22.2.3 HallShift . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

29

4.22.2.4 HallSPR . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

29

4.23 gear information t Struct Reference . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

30

4.23.1 Detailed Description

. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

30

4.23.2 Field Documentation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

30

4.23.2.1 Manufacturer . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

30

4.23.2.2 PartNumber . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

30

4.24 gear settings t Struct Reference

. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

30

. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

31

4.24.2 Field Documentation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

31

4.24.2.1 Efficiency . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

31

4.24.2.2 InputInertia . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

31

4.24.2.3 MaxOutputBacklash . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

31

4.24.2.4 RatedInputSpeed . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

31

4.24.2.5 RatedInputTorque . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

31

4.24.2.6 ReductionIn . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

31

4.24.2.7 ReductionOut

32

4.24.1 Detailed Description

. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

4.25 get position calb t Struct Reference

. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

32

4.25.1 Field Documentation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

32

4.25.1.1 EncPosition

. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

32

. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

32

4.26 get position t Struct Reference . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

32

4.25.1.2 Position

4.26.1 Detailed Description

. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

32

4.26.2 Field Documentation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

33

4.26.2.1 EncPosition

. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

33

4.27 hallsensor information t Struct Reference . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

33

4.27.1 Detailed Description

. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

33

4.27.2 Field Documentation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

33

4.27.2.1 Manufacturer . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

33

4.27.2.2 PartNumber . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

33

4.28 hallsensor settings t Struct Reference . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

33

4.28.1 Detailed Description

. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

34

4.28.2 Field Documentation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

34

4.28.2.1 MaxCurrentConsumption

. . . . . . . . . . . . . . . . . . . . . . . . . . . . .

34

4.28.2.2 MaxOperatingFrequency . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

34

4.28.2.3 SupplyVoltageMax . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

34

4.28.2.4 SupplyVoltageMin . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

34

4.29 home settings calb t Struct Reference . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

34

4.29.1 Field Documentation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

35

Generated on Fri Nov 29 2013 01:25:06 for libximc by Doxygen

CONTENTS

vii

4.29.1.1 FastHome . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

35

4.29.1.2 HomeDelta . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

35

4.29.1.3 HomeFlags . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

35

4.29.1.4 SlowHome . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

35

4.30 home settings t Struct Reference . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

35

4.30.1 Detailed Description

. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

35

4.30.2 Field Documentation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

36

4.30.2.1 FastHome . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

36

4.30.2.2 HomeDelta . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

36

4.30.2.3 HomeFlags . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

36

4.30.2.4 SlowHome . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

36

4.30.2.5 uFastHome . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

36

4.30.2.6 uHomeDelta . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

36

4.30.2.7 uSlowHome . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

36

4.31 joystick settings t Struct Reference . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

36

4.31.1 Detailed Description

. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

37

4.31.2 Field Documentation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

37

4.31.2.1 DeadZone . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

37

4.31.2.2 ExpFactor . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

37

4.31.2.3 JoyCenter . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

37

4.31.2.4 JoyFlags . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

37

4.31.2.5 JoyHighEnd . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

38

4.31.2.6 JoyLowEnd . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

38

4.32 motor information t Struct Reference . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

38

4.32.1 Detailed Description

. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

38

4.32.2 Field Documentation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

38

4.32.2.1 Manufacturer . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

38

4.32.2.2 PartNumber . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

38

4.33 motor settings t Struct Reference . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

38

4.33.1 Detailed Description

. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

40

4.33.2 Field Documentation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

40

4.33.2.1 DetentTorque . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

40

4.33.2.2 MaxCurrent

. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

40

4.33.2.3 MaxCurrentTime . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

40

4.33.2.4 MaxSpeed . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

40

4.33.2.5 MechanicalTimeConstant . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

40

4.33.2.6 MotorType . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

40

4.33.2.7 NoLoadCurrent . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

40

4.33.2.8 NoLoadSpeed . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

40

4.33.2.9 NominalCurrent . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

41

Generated on Fri Nov 29 2013 01:25:06 for libximc by Doxygen

CONTENTS

viii

4.33.2.10 NominalPower . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

41

4.33.2.11 NominalSpeed . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

41

4.33.2.12 NominalTorque . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

41

4.33.2.13 NominalVoltage . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

41

4.33.2.14 Phases . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

41

4.33.2.15 Poles . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

41

4.33.2.16 RotorInertia

41

. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

4.33.2.17 SpeedConstant

. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

41

4.33.2.18 SpeedTorqueGradient . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

41

4.33.2.19 StallTorque . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

42

4.33.2.20 TorqueConstant . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

42

4.33.2.21 WindingInductance . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

42

4.33.2.22 WindingResistance

. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

42

4.34 move settings calb t Struct Reference . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

42

4.34.1 Field Documentation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

42

4.34.1.1 Accel . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

42

4.34.1.2 AntiplaySpeed . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

42

4.34.1.3 Decel . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

42

4.34.1.4 Speed . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

43

4.35 move settings t Struct Reference . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

43

4.35.1 Detailed Description

. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

43

4.35.2 Field Documentation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

43

4.35.2.1 Accel . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

43

4.35.2.2 AntiplaySpeed . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

43

4.35.2.3 Decel . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

43

4.35.2.4 Speed . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

44

4.35.2.5 uAntiplaySpeed . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

44

4.35.2.6 uSpeed . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

44

4.36 pid settings t Struct Reference . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

44

4.36.1 Detailed Description

. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

44

4.37 power settings t Struct Reference . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

44

4.37.1 Detailed Description

. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

45

4.37.2 Field Documentation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

45

4.37.2.1 CurrentSetTime . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

45

4.37.2.2 CurrReductDelay . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

45

4.37.2.3 HoldCurrent . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

45

4.37.2.4 PowerFlags

. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

45

4.37.2.5 PowerOffDelay . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

45

4.38 secure settings t Struct Reference . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

46

4.38.1 Detailed Description

. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

Generated on Fri Nov 29 2013 01:25:06 for libximc by Doxygen

46

CONTENTS

ix

4.38.2 Field Documentation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

46

4.38.2.1 CriticalIpwr . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

46

4.38.2.2 CriticalIusb . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

46

4.38.2.3 CriticalT . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

46

4.38.2.4 CriticalUpwr . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

47

4.38.2.5 CriticalUusb . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

47

4.38.2.6 Flags . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

47

4.38.2.7 LowUpwrOff . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

47

4.38.2.8 MinimumUusb . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

47

4.39 serial number t Struct Reference . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

47

4.39.1 Detailed Description

. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

47

4.39.2 Field Documentation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

48

4.39.2.1 Key . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

48

4.39.2.2 SN . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

48

4.40 set position calb t Struct Reference . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

48

4.40.1 Field Documentation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

48

4.40.1.1 EncPosition

. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

48

4.40.1.2 PosFlags . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

48

4.40.1.3 Position

. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

48

4.41 set position t Struct Reference . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

48

4.41.1 Detailed Description

. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

49

4.41.2 Field Documentation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

49

4.41.2.1 EncPosition

. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

49

4.41.2.2 PosFlags . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

49

4.42 stage information t Struct Reference . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

49

4.42.1 Detailed Description

. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

49

4.42.2 Field Documentation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

49

4.42.2.1 Manufacturer . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

49

4.42.2.2 PartNumber . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

49

4.43 stage name t Struct Reference . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

50

4.43.1 Detailed Description

. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

50

4.43.2 Field Documentation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

50

4.43.2.1 PositionerName . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

50

4.44 stage settings t Struct Reference . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

50

4.44.1 Detailed Description

. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

51

4.44.2 Field Documentation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

51

4.44.2.1 HorizontalLoadCapacity . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

51

4.44.2.2 LeadScrewPitch . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

51

4.44.2.3 MaxCurrentConsumption

. . . . . . . . . . . . . . . . . . . . . . . . . . . . .

51

4.44.2.4 MaxSpeed . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

51

Generated on Fri Nov 29 2013 01:25:06 for libximc by Doxygen

CONTENTS

x

4.44.2.5 SupplyVoltageMax . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

51

4.44.2.6 SupplyVoltageMin . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

51

4.44.2.7 TravelRange . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

51

4.44.2.8 Units . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

52

4.44.2.9 VerticalLoadCapacity

. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

52

4.45 status calb t Struct Reference . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

52

4.45.1 Field Documentation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

53

4.45.1.1 CmdBufFreeSpace . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

53

4.45.1.2 CurPosition . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

53

4.45.1.3 CurSpeed . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

53

4.45.1.4 CurT . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

53

4.45.1.5 EncPosition

. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

53

4.45.1.6 EncSts . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

53

4.45.1.7 Flags . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

53

4.45.1.8 GPIOFlags . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

53

4.45.1.9 Ipwr

. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

53

4.45.1.10 Iusb

. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

53

4.45.1.11 MoveSts . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

53

4.45.1.12 MvCmdSts . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

53

4.45.1.13 PWRSts . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

54

4.45.1.14 Upwr . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

54

4.45.1.15 Uusb . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

54

4.45.1.16 WindSts . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

54

4.46 status t Struct Reference . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

54

4.46.1 Detailed Description

. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

55

4.46.2 Field Documentation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

55

4.46.2.1 CmdBufFreeSpace . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

55

4.46.2.2 CurPosition . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

55

4.46.2.3 CurSpeed . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

55

4.46.2.4 CurT . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

55

4.46.2.5 EncPosition

. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

55

4.46.2.6 EncSts . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

55

4.46.2.7 Flags . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

55

4.46.2.8 GPIOFlags . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

56

4.46.2.9 Ipwr

. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

56

4.46.2.10 Iusb

. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

56

4.46.2.11 MoveSts . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

56

4.46.2.12 MvCmdSts . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

56

4.46.2.13 PWRSts . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

56

4.46.2.14 uCurPosition . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

56

Generated on Fri Nov 29 2013 01:25:06 for libximc by Doxygen

CONTENTS

xi

4.46.2.15 uCurSpeed . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

56

4.46.2.16 Upwr . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

56

4.46.2.17 Uusb . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

56

4.46.2.18 WindSts . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

56

4.47 sync in settings calb t Struct Reference . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

57

4.47.1 Field Documentation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

57

4.47.1.1 ClutterTime . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

57

4.47.1.2 Position

. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

57

4.47.1.3 Speed . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

57

4.47.1.4 SyncInFlags . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

57

4.48 sync in settings t Struct Reference . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

57

4.48.1 Detailed Description

. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

58

4.48.2 Field Documentation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

58

4.48.2.1 ClutterTime . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

58

4.48.2.2 Speed . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

58

4.48.2.3 SyncInFlags . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

58

4.48.2.4 uPosition . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

58

4.48.2.5 uSpeed . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

58

4.49 sync out settings calb t Struct Reference . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

58

4.49.1 Field Documentation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

59

4.49.1.1 Accuracy . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

59

4.49.1.2 SyncOutFlags . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

59

4.49.1.3 SyncOutPeriod . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

59

4.49.1.4 SyncOutPulseSteps . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

59

4.50 sync out settings t Struct Reference . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

59

4.50.1 Detailed Description

. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

60

4.50.2 Field Documentation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

60

4.50.2.1 Accuracy . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

60

4.50.2.2 SyncOutFlags . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

60

4.50.2.3 SyncOutPeriod . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

60

4.50.2.4 SyncOutPulseSteps . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

60

4.50.2.5 uAccuracy . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

60

4.51 uart settings t Struct Reference . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

60

4.51.1 Detailed Description

. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

61

4.51.2 Field Documentation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

61

4.51.2.1 UARTSetupFlags
5

. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

61

File Documentation

62

5.1

ximc.h File Reference . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

62

5.1.1

81

Detailed Description

. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

Generated on Fri Nov 29 2013 01:25:06 for libximc by Doxygen

CONTENTS

5.1.2

xii

Macro Definition Documentation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

82

5.1.2.1

ALARM ON DRIVER OVERHEATING . . . . . . . . . . . . . . . . . . . . . .

82

5.1.2.2

BORDER IS ENCODER . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

82

5.1.2.3

BORDER STOP LEFT . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

82

5.1.2.4

BORDER STOP RIGHT . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

82

5.1.2.5

BORDERS SWAP MISSET DETECTION . . . . . . . . . . . . . . . . . . . . .

82

5.1.2.6

BRAKE ENABLED . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

82

5.1.2.7

BRAKE ENG PWROFF . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

82

5.1.2.8

CONTROL BTN LEFT PUSHED OPEN

. . . . . . . . . . . . . . . . . . . . .

82

5.1.2.9

CONTROL BTN RIGHT PUSHED OPEN . . . . . . . . . . . . . . . . . . . . .

82

5.1.2.10 CONTROL MODE BITS . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

82

5.1.2.11 CONTROL MODE JOY . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

82

5.1.2.12 CONTROL MODE LR . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

83

5.1.2.13 CONTROL MODE OFF . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

83

5.1.2.14 CTP ALARM ON ERROR . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

83

5.1.2.15 CTP BASE . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

83

5.1.2.16 CTP ENABLED . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

83

5.1.2.17 DRIVER TYPE DISCRETE FET

. . . . . . . . . . . . . . . . . . . . . . . . .

83

5.1.2.18 DRIVER TYPE EXTERNAL . . . . . . . . . . . . . . . . . . . . . . . . . . . .

83

5.1.2.19 DRIVER TYPE INTEGRATE . . . . . . . . . . . . . . . . . . . . . . . . . . .

83

5.1.2.20 EEPROM PRECEDENCE . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

83

5.1.2.21 ENC STATE ABSENT . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

83

5.1.2.22 ENC STATE MALFUNC . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

83

5.1.2.23 ENC STATE OK . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

83

5.1.2.24 ENC STATE REVERS . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

84

5.1.2.25 ENC STATE UNKNOWN . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

84

5.1.2.26 ENDER SW1 ACTIVE LOW . . . . . . . . . . . . . . . . . . . . . . . . . . . .

84

5.1.2.27 ENDER SW2 ACTIVE LOW . . . . . . . . . . . . . . . . . . . . . . . . . . . .

84

5.1.2.28 ENDER SWAP . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

84

5.1.2.29 ENGINE ACCEL ON

. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

84

5.1.2.30 ENGINE ANTIPLAY . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

84

5.1.2.31 ENGINE LIMIT CURR . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

84

5.1.2.32 ENGINE LIMIT RPM . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

84

5.1.2.33 ENGINE LIMIT VOLT . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

84

5.1.2.34 ENGINE MAX SPEED . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

84

5.1.2.35 ENGINE REVERSE . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

85

5.1.2.36 ENGINE TYPE 2DC . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

85

5.1.2.37 ENGINE TYPE BRUSHLESS . . . . . . . . . . . . . . . . . . . . . . . . . . .

85

5.1.2.38 ENGINE TYPE DC

. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

85

5.1.2.39 ENGINE TYPE NONE . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

85

Generated on Fri Nov 29 2013 01:25:06 for libximc by Doxygen

CONTENTS

xiii

5.1.2.40 ENGINE TYPE STEP . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

85

5.1.2.41 ENGINE TYPE TEST . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

85

5.1.2.42 ENUMERATE PROBE . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

85

5.1.2.43 EXTIO SETUP INVERT . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

85

5.1.2.44 EXTIO SETUP MODE IN HOME . . . . . . . . . . . . . . . . . . . . . . . . .

85

5.1.2.45 EXTIO SETUP MODE IN MOVR . . . . . . . . . . . . . . . . . . . . . . . . .

85

5.1.2.46 EXTIO SETUP MODE IN NOP . . . . . . . . . . . . . . . . . . . . . . . . . .

86

5.1.2.47 EXTIO SETUP MODE IN PWOF . . . . . . . . . . . . . . . . . . . . . . . . .

86

5.1.2.48 EXTIO SETUP MODE IN STOP . . . . . . . . . . . . . . . . . . . . . . . . .

86

5.1.2.49 EXTIO SETUP MODE OUT ALARM . . . . . . . . . . . . . . . . . . . . . . .

86

5.1.2.50 EXTIO SETUP MODE OUT MOTOR FOUND . . . . . . . . . . . . . . . . . .

86

5.1.2.51 EXTIO SETUP MODE OUT MOTOR ON . . . . . . . . . . . . . . . . . . . . .

86

5.1.2.52 EXTIO SETUP MODE OUT MOVING

. . . . . . . . . . . . . . . . . . . . . .

86

5.1.2.53 EXTIO SETUP MODE OUT OFF . . . . . . . . . . . . . . . . . . . . . . . . .

86

5.1.2.54 EXTIO SETUP MODE OUT ON

. . . . . . . . . . . . . . . . . . . . . . . . .

86

5.1.2.55 EXTIO SETUP OUTPUT . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

86

5.1.2.56 FEEDBACK EMF . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

86

5.1.2.57 FEEDBACK ENC REVERSE . . . . . . . . . . . . . . . . . . . . . . . . . . .

86

5.1.2.58 FEEDBACK ENCODER . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

87

5.1.2.59 FEEDBACK ENCODERHALL . . . . . . . . . . . . . . . . . . . . . . . . . . .

87

5.1.2.60 FEEDBACK HALL REVERSE . . . . . . . . . . . . . . . . . . . . . . . . . . .

87

5.1.2.61 FEEDBACK NONE . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

87

5.1.2.62 H BRIDGE ALERT . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

87

5.1.2.63 HOME DIR FIRST . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

87

5.1.2.64 HOME DIR SECOND . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

87

5.1.2.65 HOME HALF MV

. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

87

5.1.2.66 HOME MV SEC EN . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

87

5.1.2.67 HOME STOP FIRST BITS

. . . . . . . . . . . . . . . . . . . . . . . . . . . .

87

5.1.2.68 HOME STOP FIRST LIM . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

87

5.1.2.69 HOME STOP FIRST REV . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

87

5.1.2.70 HOME STOP FIRST SYN . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

88

5.1.2.71 HOME STOP SECOND BITS . . . . . . . . . . . . . . . . . . . . . . . . . . .

88

5.1.2.72 HOME STOP SECOND LIM

. . . . . . . . . . . . . . . . . . . . . . . . . . .

88

5.1.2.73 HOME STOP SECOND REV . . . . . . . . . . . . . . . . . . . . . . . . . . .

88

5.1.2.74 HOME STOP SECOND SYN . . . . . . . . . . . . . . . . . . . . . . . . . . .

88

5.1.2.75 JOY REVERSE . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

88

5.1.2.76 LOW UPWR PROTECTION . . . . . . . . . . . . . . . . . . . . . . . . . . . .

88

5.1.2.77 MICROSTEP MODE FRAC 128

. . . . . . . . . . . . . . . . . . . . . . . . .

88

5.1.2.78 MICROSTEP MODE FRAC 16 . . . . . . . . . . . . . . . . . . . . . . . . . .

88

5.1.2.79 MICROSTEP MODE FRAC 2 . . . . . . . . . . . . . . . . . . . . . . . . . . .

88

Generated on Fri Nov 29 2013 01:25:06 for libximc by Doxygen

CONTENTS

xiv

5.1.2.80 MICROSTEP MODE FRAC 256

. . . . . . . . . . . . . . . . . . . . . . . . .

88

5.1.2.81 MICROSTEP MODE FRAC 32 . . . . . . . . . . . . . . . . . . . . . . . . . .

88

5.1.2.82 MICROSTEP MODE FRAC 4 . . . . . . . . . . . . . . . . . . . . . . . . . . .

89

5.1.2.83 MICROSTEP MODE FRAC 64 . . . . . . . . . . . . . . . . . . . . . . . . . .

89

5.1.2.84 MICROSTEP MODE FRAC 8 . . . . . . . . . . . . . . . . . . . . . . . . . . .

89

5.1.2.85 MICROSTEP MODE FULL . . . . . . . . . . . . . . . . . . . . . . . . . . . .

89

5.1.2.86 MOVE STATE ANTIPLAY . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

89

5.1.2.87 MOVE STATE MOVING . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

89

5.1.2.88 MOVE STATE TARGET SPEED . . . . . . . . . . . . . . . . . . . . . . . . .

89

5.1.2.89 MVCMD ERROR

. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

89

5.1.2.90 MVCMD HOME . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

89

5.1.2.91 MVCMD LEFT . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

89

5.1.2.92 MVCMD LOFT . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

89

5.1.2.93 MVCMD MOVE . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

89

5.1.2.94 MVCMD MOVR . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

90

5.1.2.95 MVCMD NAME BITS . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

90

5.1.2.96 MVCMD RIGHT . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

90

5.1.2.97 MVCMD RUNNING . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

90

5.1.2.98 MVCMD SSTP . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

90

5.1.2.99 MVCMD STOP

. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

90

5.1.2.100 MVCMD UKNWN . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

90

5.1.2.101 POWER OFF ENABLED . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

90

5.1.2.102 POWER REDUCT ENABLED . . . . . . . . . . . . . . . . . . . . . . . . . . .

90

5.1.2.103 POWER SMOOTH CURRENT . . . . . . . . . . . . . . . . . . . . . . . . . .

90

5.1.2.104 PWR STATE MAX . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

90

5.1.2.105 PWR STATE NORM . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

90

5.1.2.106 PWR STATE OFF . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

91

5.1.2.107 PWR STATE REDUCT . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

91

5.1.2.108 PWR STATE UNKNOWN . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

91

5.1.2.109 REV SENS INV . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

91

5.1.2.110 SETPOS IGNORE ENCODER . . . . . . . . . . . . . . . . . . . . . . . . . .

91

5.1.2.111 SETPOS IGNORE POSITION . . . . . . . . . . . . . . . . . . . . . . . . . . .

91

5.1.2.112 STATE ALARM . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

91

5.1.2.113 STATE BORDERS SWAP MISSET . . . . . . . . . . . . . . . . . . . . . . . .

91

5.1.2.114 STATE BRAKE . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

91

5.1.2.115 STATE BUTTON LEFT . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

91

5.1.2.116 STATE BUTTON RIGHT . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

91

5.1.2.117 STATE CONTR . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

91

5.1.2.118 STATE CONTROLLER OVERHEAT . . . . . . . . . . . . . . . . . . . . . . .

92

5.1.2.119 STATE CTP ERROR . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

92

Generated on Fri Nov 29 2013 01:25:06 for libximc by Doxygen

CONTENTS

xv

5.1.2.120 STATE DIG SIGNAL

. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

92

5.1.2.121 STATE EEPROM CONNECTED . . . . . . . . . . . . . . . . . . . . . . . . .

92

5.1.2.122 STATE ENC A . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

92

5.1.2.123 STATE ENC B . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

92

5.1.2.124 STATE ERRC . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

92

5.1.2.125 STATE ERRD . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

92

5.1.2.126 STATE ERRV . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

92

5.1.2.127 STATE GPIO LEVEL . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

92

5.1.2.128 STATE GPIO PINOUT

. . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

92

5.1.2.129 STATE HALL A . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

92

5.1.2.130 STATE HALL B . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

93

5.1.2.131 STATE HALL C . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

93

5.1.2.132 STATE LEFT EDGE . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

93

5.1.2.133 STATE LOW USB VOLTAGE . . . . . . . . . . . . . . . . . . . . . . . . . . .

93

5.1.2.134 STATE OVERLOAD POWER CURRENT

. . . . . . . . . . . . . . . . . . . .

93

5.1.2.135 STATE OVERLOAD POWER VOLTAGE . . . . . . . . . . . . . . . . . . . . .

93

5.1.2.136 STATE OVERLOAD USB CURRENT . . . . . . . . . . . . . . . . . . . . . . .

93

5.1.2.137 STATE OVERLOAD USB VOLTAGE . . . . . . . . . . . . . . . . . . . . . . .

93

5.1.2.138 STATE POWER OVERHEAT . . . . . . . . . . . . . . . . . . . . . . . . . . .

93

5.1.2.139 STATE REV SENSOR

. . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

93

5.1.2.140 STATE RIGHT EDGE . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

93

5.1.2.141 STATE SECUR . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

93

5.1.2.142 STATE SYNC INPUT . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

94

5.1.2.143 STATE SYNC OUTPUT . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

94

5.1.2.144 SYNCIN ENABLED . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

94

5.1.2.145 SYNCIN GOTOPOSITION

. . . . . . . . . . . . . . . . . . . . . . . . . . . .

94

5.1.2.146 SYNCIN INVERT . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

94

5.1.2.147 SYNCOUT ENABLED . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

94

5.1.2.148 SYNCOUT IN STEPS . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

94

5.1.2.149 SYNCOUT INVERT . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

94

5.1.2.150 SYNCOUT ONPERIOD . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

94

5.1.2.151 SYNCOUT ONSTART . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

94

5.1.2.152 SYNCOUT ONSTOP . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

94

5.1.2.153 SYNCOUT STATE . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

94

5.1.2.154 UART PARITY BITS . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

95

5.1.2.155 WIND A STATE ABSENT . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

95

5.1.2.156 WIND A STATE MALFUNC . . . . . . . . . . . . . . . . . . . . . . . . . . . .

95

5.1.2.157 WIND A STATE OK . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

95

5.1.2.158 WIND A STATE UNKNOWN . . . . . . . . . . . . . . . . . . . . . . . . . . .

95

5.1.2.159 WIND B STATE ABSENT . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

95

Generated on Fri Nov 29 2013 01:25:06 for libximc by Doxygen

CONTENTS

5.1.3

5.1.4

xvi

5.1.2.160 WIND B STATE MALFUNC . . . . . . . . . . . . . . . . . . . . . . . . . . . .

95

5.1.2.161 WIND B STATE OK . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

95

5.1.2.162 WIND B STATE UNKNOWN . . . . . . . . . . . . . . . . . . . . . . . . . . .

95

5.1.2.163 XIMC API . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

95

Typedef Documentation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

95

5.1.3.1

logging callback t . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

95

Function Documentation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

96

5.1.4.1

close device . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

96

5.1.4.2

command clear fram . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

96

5.1.4.3

command eeread settings . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

96

5.1.4.4

command eesave settings . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

96

5.1.4.5

command home . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

96

5.1.4.6

command left

. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

97

5.1.4.7

command loft

. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

97

5.1.4.8

command move . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

97

5.1.4.9

command movr . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

97

5.1.4.10 command power off . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

98

5.1.4.11 command read settings . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

98

5.1.4.12 command reset . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

98

5.1.4.13 command right . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

98

5.1.4.14 command save settings . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

98

5.1.4.15 command sstp . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

99

5.1.4.16 command stop . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

99

5.1.4.17 command update firmware . . . . . . . . . . . . . . . . . . . . . . . . . . . .

99

5.1.4.18 command zero . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

99

5.1.4.19 enumerate devices . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

99

5.1.4.20 free enumerate devices . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 100
5.1.4.21 get accessories settings . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 100
5.1.4.22 get analog data . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 100
5.1.4.23 get bootloader version . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 100
5.1.4.24 get brake settings . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 100
5.1.4.25 get chart data . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 101
5.1.4.26 get control settings

. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 101

5.1.4.27 get controller name . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 101
5.1.4.28 get ctp settings

. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 101

5.1.4.29 get debug read

. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 102

5.1.4.30 get device count . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 102
5.1.4.31 get device information . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 102
5.1.4.32 get device name . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 102
5.1.4.33 get edges settings . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 102
Generated on Fri Nov 29 2013 01:25:06 for libximc by Doxygen

CONTENTS

xvii

5.1.4.34 get encoder information . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 103
5.1.4.35 get encoder settings . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 103
5.1.4.36 get engine settings

. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 103

5.1.4.37 get entype settings

. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 103

5.1.4.38 get enumerate device information . . . . . . . . . . . . . . . . . . . . . . . . . 104
5.1.4.39 get enumerate device serial . . . . . . . . . . . . . . . . . . . . . . . . . . . . 104
5.1.4.40 get extio settings . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 104
5.1.4.41 get feedback settings . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 104
5.1.4.42 get firmware version . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 105
5.1.4.43 get gear information . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 105
5.1.4.44 get gear settings . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 105
5.1.4.45 get hallsensor information . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 105
5.1.4.46 get hallsensor settings . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 105
5.1.4.47 get home settings . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 106
5.1.4.48 get joystick settings . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 106
5.1.4.49 get motor information . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 106
5.1.4.50 get motor settings . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 106
5.1.4.51 get move settings . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 107
5.1.4.52 get pid settings
5.1.4.53 get position

. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 107

. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 107

5.1.4.54 get power settings . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 107
5.1.4.55 get secure settings

. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 107

5.1.4.56 get serial number . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 108
5.1.4.57 get stage information . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 108
5.1.4.58 get stage name . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 108
5.1.4.59 get stage settings . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 108
5.1.4.60 get status

. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 108

5.1.4.61 get status calb . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 109
5.1.4.62 get sync in settings . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 109
5.1.4.63 get sync out settings

. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 109

5.1.4.64 get uart settings . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 109
5.1.4.65 goto firmware . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 110
5.1.4.66 has firmware . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 110
5.1.4.67 logging callback stderr narrow . . . . . . . . . . . . . . . . . . . . . . . . . . . 110
5.1.4.68 logging callback stderr wide . . . . . . . . . . . . . . . . . . . . . . . . . . . . 110
5.1.4.69 msec sleep . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 110
5.1.4.70 open device . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 111
5.1.4.71 probe device . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 111
5.1.4.72 service command updf

. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 111

5.1.4.73 set accessories settings . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 111
Generated on Fri Nov 29 2013 01:25:06 for libximc by Doxygen

CONTENTS

xviii

5.1.4.74 set add sync in action . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 111
5.1.4.75 set brake settings . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 112
5.1.4.76 set control settings . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 112
5.1.4.77 set controller name . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 112
5.1.4.78 set ctp settings . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 112
5.1.4.79 set edges settings . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 112
5.1.4.80 set encoder information . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 113
5.1.4.81 set encoder settings . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 113
5.1.4.82 set engine settings . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 113
5.1.4.83 set entype settings . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 113
5.1.4.84 set extio settings . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 114
5.1.4.85 set feedback settings . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 114
5.1.4.86 set gear information . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 114
5.1.4.87 set gear settings . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 114
5.1.4.88 set hallsensor information . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 115
5.1.4.89 set hallsensor settings . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 115
5.1.4.90 set home settings . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 115
5.1.4.91 set joystick settings . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 115
5.1.4.92 set logging callback . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 116
5.1.4.93 set motor information . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 116
5.1.4.94 set motor settings . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 116
5.1.4.95 set move settings . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 116
5.1.4.96 set pid settings . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 117
5.1.4.97 set position . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 117
5.1.4.98 set power settings . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 117
5.1.4.99 set secure settings . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 117
5.1.4.100 set serial number . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 118
5.1.4.101 set stage information

. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 118

5.1.4.102 set stage name . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 118
5.1.4.103 set stage settings . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 118
5.1.4.104 set sync in settings . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 118
5.1.4.105 set sync out settings . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 119
5.1.4.106 set uart settings . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 119
5.1.4.107 write key . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 119
5.1.4.108 ximc fix usbser sys . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 120
5.1.4.109 ximc version . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 120

Generated on Fri Nov 29 2013 01:25:06 for libximc by Doxygen

Chapter 1

Introduction
1.1 About
Congratulations on choosing XIMC multi-platform programming library! This document contains all information
about XIMC library. It utilizes well known virtual COM-port interface, so you can use it on Windows 7, Windows
Vista, Windows XP, Windows Server 2003, Windows 2000, Linux, Mac OS X. XIMC multi-platform programing
library supports plug/unplug on the fly. One program can control one device. Multiple processes (programs) that
control one device simultaneously are not allowed.

1.2 System requirements
1.2.1 For rebuilding library
On Windows:
• Windows 2000 or later, 64-bit system (if compiling both arhitectures) or 32-bit system.
• Microsoft Visual C++ 2008 or later
• cygwin with tar, bison, flex installed
On Linux or FreeBSD:
• 64-bit or/and 32-bit system system
• gcc 4 or later
• common autotools: autoconf, autoheader, aclocal, automake, autoreconf, libtool
• gmake
• doxygen - for building docs
• LaTeX distribution (teTeX or texlive) - for building docs
• flex 2.5.30+
• bison
• mercurial (for building developer version from hg)
On Mac OS X:
• XCode 4

1.2 System requirements

• doxygen
• mactex
• autotools
• mercurial (for building developer version from hg)
If mercurial is used, please enable ’purge’ extension by adding to ∼/.hgrc following lines:
[extensions]
hgext.purge=

1.2.2 For using library
Supported operating systems (32 or 64 bit):
• Mac OS X 10.6
• Windows 2000 or later
• Autotools-compatible unix. Package is installed from sources.
• Linux debian-based. DEB package is built against Debian Squeeze 6
• Linux rpm-based. RPM is built against OpenSUSE 10
• FreeBSD 9. Package is provided.
Build requirements:
• Windows: Microsoft Visual C++ 2008 or mingw (currently not supported)
• UNIX: gcc 4, gmake
• Mac OS X: XCode 4

Generated on Fri Nov 29 2013 01:25:06 for libximc by Doxygen

2

Chapter 2

How to rebuild library
2.1 Building on generic UNIX
Generic version could be built with standard autotools.
./build.sh lib

Built files (library, headers, documentation) are installed to ./dist/local directory. It is a generic developer build.
Sometimes you need to specify additional parameters to command line for your machine. Please look to following
OS sections.

2.2 Building on debian-based linux systems
Requirement: 64-bit and 32-bit debian system, ubuntu Typical set of packages: gcc, autotools, autoconf, libtool,
dpkg-dev, flex, bison, doxygen, texlive, mercurial
It’s required to match library and host architecture: 64-bit library can be built only at 64-bit host, 32-bit library - only
at 32-bit host.
To build library and package Invoke a script:
$ ./build.sh libdeb

Grab packages from ./dist/latest/deb and locally installed binaries from ./dist/local.

2.3 Building on redhat-based linux systems
Requirement: 64-bit redhat-based system (Fedora, Red Hat, SUSE) Typical set of packages: gcc, autotools, autoconf, libtool, flex, bison, doxygen, texlive, mercurial
It’s possible to build both 32- and 64-bit libraries on 64-bit host system. 64-bit library can’t be built on 32-bit system.
To build library and package invoke a script:
$ ./build.sh librpm

Grab packages from ./dist/latest/rpm and locally installed binaries from ./dist/local.

2.4 Building on FreeBSD

4

2.4 Building on FreeBSD
Requirement: 64-bit or 32-bit FreeBSD Typical set of packages: gcc, autotools, autoconf, libtool, flex, bison, doxygen, teTeX, mercurial
It’s required to match library and host architecture. Also you need to fix a configure.ac to exclude SOVER from the
package name (freebsd does not use linux conventions on library versioning).
Attention! It’s needed to specify additional parameters for a simple build.
$ ./build.sh lib LEX=/usr/local/bin/flex CXXFLAGS=-I/usr/local/include/flex

To build a library and package invoke following command. It requires sudo privileges for port installing and specially
crafted /usr/ports/local tree. Consult a script for details.
$ ./build.sh libfreebsd

Grab packages from ./dist/latest/freebsd.

2.5 Buliding on Mac OS X
To build and package a script invoke a script:
$ ./build.sh libosx

Built library (classical and framework), examples (classical and .app), documentation are located at ./dist/latest/macosx, locally installed binaries from ./dist/local.

2.6 Buliding on Windows
Requirements: 64-bit windows (build script builds both architectures), cygwin (must be installed to a default path),
mercurial.
Invoke a script:
$ ./build.bat

Grab packages from ./dist/latest/win32 and ./dist/latest/win64

2.7 Source code access
XIMC source codes are given under special request.

Generated on Fri Nov 29 2013 01:25:06 for libximc by Doxygen

Chapter 3

How to use with...
Library usage can be examinated from test application testapp. Non-C languages are supported because library
supports stdcall calling convention and so can be used with a variety of languages.
C test project is located at ’examples/testapp’ directory, C# test project - at ’examples/testcs’, VB.NET - ’examples/testvbnet’, Delphi 6 - ’examples/testdelphi’, sample bindings for MATLAB - ’examples/testmatlab’

3.1 Usage with C
3.1.1 Visual C++
Testapp can be built using testapp.sln. Library must be compiled with MS Visual C++ too, mingw-library isn’t
supported. Make sure that Microsoft Visual C++ Redistributable Package is installed.
NOTE: Example compiled with(MS Visual C++ 2008 SP1 and needs package 9.0.307291 (provided with SDK vcredist x86 or vcredist x64)
Open solution examples/testapp/testapp.sln, build and run from the IDE.

3.1.2 MinGW
MinGW is a port of GCC to win32 platform. It’s required to install MinGW package. Currently not supported
MinGW-compiled testapp can be built with MS Visual C++ or mingw library.
$ mingw32-make -f Makefile.mingw all

Then copy library libximc.dll to current directory and launch testapp.exe.

3.1.3 C++ Builder
First of all you should create C++ Builder-style import library. Visual C++ library is not compatible with BCB. Invoke:
$ implib libximc.lib libximc.def

Then compile test application:
$ bcc32 -I..\..\ximc\win32 -L..\..\ximc\win32 -DWIN32 -DNDEBUG -D WINDOWS
testapp.c libximc.lib

3.2 .NET

6

3.1.4 XCode
Test app should be built with XCode project testapp.xcodeproj. Library is a Mac OS X framework, and at example
application it’s bundled inside testapp.app
Then launch application testapp.app and check activity output in Console.app.

3.1.5 GCC
Make sure that libximc (rpm, deb, freebsd package or tarball) is installed at your system. Installation of package
should be performed with a package manager of operating system. On OS X plain dylib library and a framework is
provided.
Note that user should belong to system group which allows access to a serial port (dip or serial, for example).
Test application can be built with the installed library with the following script:
$ make

In case of cross-compilation (target architecture differs from the current system architecture) feed -m64 or -m32 flag
to compiler. On OS X it’s needed to use -arch flag instead to build an universal binary. Please consult a compiler
documentation.
Then launch the application as:
$ make run

Note: make run on OS X copies a library to the current directory. If you want to use library from the custom directory
please be sure to specify LD LIBRARY PATH or DYLD LIBRARY PATH to the directory with the library.

3.2 .NET
Wrapper assembly for libximc.dll is wrappers/csharp/ximcnet.dll. It is provided with two different architectures and
depends on .NET 2.0.
Test .NET applications for Visual Studio 2008 is located at testcs (for C#) and testvbnet (for VB.NET) respectively.
Open solutions, build and run.

3.3 Delphi
Wrapper for libximc.dll is a unit wrappers/delphi/ximc.pas
Console test application for is located at testdelphi. Tested with Delphi 6 and only 32-bit version.
Just compile, place DLL near the executable and run program.

3.4 MATLAB
Sample MATLAB program testximc.m is provided at the directory examples/testmatlab. Fix first lines with the actual
location of the XIMC library and launch M-file as:
$ testximc

Generated on Fri Nov 29 2013 01:25:06 for libximc by Doxygen

Chapter 4

Data Structure Documentation
4.1 accessories settings t Struct Reference
Additional accessories information.

Data Fields
• char MagneticBrakeInfo [25]
The manufacturer and the part number of magnetic brake, the maximum string length is 24 characters.

• float MBRatedVoltage
Rated voltage for controlling the magnetic brake (B).

• float MBRatedCurrent
Rated current for controlling the magnetic brake (A).

• float MBTorque
Retention moment (mN m).

• unsigned int MBSettings
Magnetic brake settings flags.

• char TemperatureSensorInfo [25]
The manufacturer and the part number of the temperature sensor, the maximum string length: 24 characters.

• float TSMin
The minimum measured temperature (degrees Celsius) Data type: float.

• float TSMax
The maximum measured temperature (degrees Celsius) Data type: float.

• float TSGrad
The temperature gradient (V/degrees Celsius).

• unsigned int TSSettings
Temperature sensor settings flags.

• unsigned int LimitSwitchesSettings
Temperature sensor settings flags.

4.1.1 Detailed Description
Additional accessories information.

See Also
set accessories settings
get accessories settings
get accessories settings, set accessories settings

4.1 accessories settings t Struct Reference

4.1.2 Field Documentation
4.1.2.1

unsigned int LimitSwitchesSettings

Temperature sensor settings flags.

4.1.2.2

char MagneticBrakeInfo[25]

The manufacturer and the part number of magnetic brake, the maximum string length is 24 characters.

4.1.2.3

float MBRatedCurrent

Rated current for controlling the magnetic brake (A).
Data type: float.

4.1.2.4

float MBRatedVoltage

Rated voltage for controlling the magnetic brake (B).
Data type: float.

4.1.2.5

unsigned int MBSettings

Magnetic brake settings flags.

4.1.2.6

float MBTorque

Retention moment (mN m).
Data type: float.

4.1.2.7

char TemperatureSensorInfo[25]

The manufacturer and the part number of the temperature sensor, the maximum string length: 24 characters.

4.1.2.8

float TSGrad

The temperature gradient (V/degrees Celsius).
Data type: float.

4.1.2.9

float TSMax

The maximum measured temperature (degrees Celsius) Data type: float.

4.1.2.10

float TSMin

The minimum measured temperature (degrees Celsius) Data type: float.

4.1.2.11

unsigned int TSSettings

Temperature sensor settings flags.
Generated on Fri Nov 29 2013 01:25:06 for libximc by Doxygen

8

4.2 add sync in action calb t Struct Reference

4.2 add sync in action calb t Struct Reference
Data Fields
• float Position
Desired position or shift.

• float Speed
Target speed.

4.2.1 Field Documentation
4.2.1.1

float Position

Desired position or shift.

4.2.1.2

float Speed

Target speed.

4.3 add sync in action t Struct Reference
This command adds one element of the FIFO commands.

Data Fields
• int Position
Desired position or shift (whole steps)

• int uPosition
The fractional part of a position or shift in microsteps (-255 .

• unsigned int Speed
Target speed(for stepper motor: steps / c, for DC: rpm).

• unsigned int uSpeed
Target speed in microsteps/s.

4.3.1 Detailed Description
This command adds one element of the FIFO commands.

See Also
set add sync in action

4.3.2 Field Documentation
4.3.2.1

unsigned int Speed

Target speed(for stepper motor: steps / c, for DC: rpm).
Range: 0..1000000.

Generated on Fri Nov 29 2013 01:25:06 for libximc by Doxygen

9

4.4 analog data t Struct Reference

4.3.2.2

int uPosition

The fractional part of a position or shift in microsteps (-255 .
. 255)(is only used with stepper motor)

4.3.2.3

unsigned int uSpeed

Target speed in microsteps/s.
Using with stepper motor only. Range: 0..255.

4.4 analog data t Struct Reference
Analog data.

Data Fields
• unsigned int A1Voltage ADC
”Voltage on pin 1 winding A” raw data from ADC.

• unsigned int A2Voltage ADC
”Voltage on pin 2 winding A” raw data from ADC.

• unsigned int B1Voltage ADC
”Voltage on pin 1 winding B” raw data from ADC.

• unsigned int B2Voltage ADC
”Voltage on pin 2 winding B” raw data from ADC.

• unsigned int SupVoltage ADC
”Voltage on the top of MOSFET full bridge” raw data from ADC.

• unsigned int ACurrent ADC
”Winding A current” raw data from ADC.

• unsigned int BCurrent ADC
”Winding B current” raw data from ADC.

• unsigned int FullCurrent ADC
”Full current” raw data from ADC.

• unsigned int Temp ADC
Voltage from temperature sensor, raw data from ADC.

• unsigned int Joy ADC
Joystick raw data from ADC.

• unsigned int Pot ADC
Voltage on ”Potentiometer”, raw data from ADC.

• unsigned int L5 ADC
USB supply voltage after the current sense resistor, from ADC.

• unsigned int H5 ADC
Power supply USB from ADC.

• int A1Voltage
”Voltage on pin 1 winding A” calibrated data.

• int A2Voltage
”Voltage on pin 2 winding A” calibrated data.

• int B1Voltage
”Voltage on pin 1 winding B” calibrated data.

• int B2Voltage
Generated on Fri Nov 29 2013 01:25:06 for libximc by Doxygen

10

4.4 analog data t Struct Reference

11

”Voltage on pin 2 winding B” calibrated data.

• int SupVoltage
”Voltage on the top of MOSFET full bridge” calibrated data.

• int ACurrent
”Winding A current” calibrated data.

• int BCurrent
”Winding B current” calibrated data.

• int FullCurrent
”Full current” calibrated data.

• int Temp
Temperature, calibrated data.

• int Joy
Joystick, calibrated data.

• int Pot
Potentiometer, calibrated data.

• int L5
USB supply voltage after the current sense resistor.

• int H5
Power supply USB.

• unsigned int deprecated
• int R
Motor winding resistance in mOhms(is only used with stepper motor).

• int L
Motor winding pseudo inductance in uHn(is only used with stepper motor).

4.4.1 Detailed Description
Analog data.
This structure contains raw analog data from ADC embedded on board. These data used for device testing and
deep recalibraton by manufacturer only.

See Also
get analog data
get analog data

4.4.2 Field Documentation
4.4.2.1

int A1Voltage

”Voltage on pin 1 winding A” calibrated data.

4.4.2.2

unsigned int A1Voltage ADC

”Voltage on pin 1 winding A” raw data from ADC.

4.4.2.3

int A2Voltage

”Voltage on pin 2 winding A” calibrated data.

Generated on Fri Nov 29 2013 01:25:06 for libximc by Doxygen

4.4 analog data t Struct Reference

4.4.2.4

unsigned int A2Voltage ADC

”Voltage on pin 2 winding A” raw data from ADC.

4.4.2.5

int ACurrent

”Winding A current” calibrated data.

4.4.2.6

unsigned int ACurrent ADC

”Winding A current” raw data from ADC.

4.4.2.7

int B1Voltage

”Voltage on pin 1 winding B” calibrated data.

4.4.2.8

unsigned int B1Voltage ADC

”Voltage on pin 1 winding B” raw data from ADC.

4.4.2.9

int B2Voltage

”Voltage on pin 2 winding B” calibrated data.

4.4.2.10

unsigned int B2Voltage ADC

”Voltage on pin 2 winding B” raw data from ADC.

4.4.2.11

int BCurrent

”Winding B current” calibrated data.

4.4.2.12

unsigned int BCurrent ADC

”Winding B current” raw data from ADC.

4.4.2.13

int FullCurrent

”Full current” calibrated data.

4.4.2.14

unsigned int FullCurrent ADC

”Full current” raw data from ADC.

4.4.2.15

int Joy

Joystick, calibrated data.

Generated on Fri Nov 29 2013 01:25:06 for libximc by Doxygen

12

4.5 brake settings t Struct Reference

4.4.2.16

unsigned int Joy ADC

Joystick raw data from ADC.

4.4.2.17

int L

Motor winding pseudo inductance in uHn(is only used with stepper motor).

4.4.2.18

int L5

USB supply voltage after the current sense resistor.

4.4.2.19

unsigned int L5 ADC

USB supply voltage after the current sense resistor, from ADC.

4.4.2.20

int Pot

Potentiometer, calibrated data.

4.4.2.21

int R

Motor winding resistance in mOhms(is only used with stepper motor).

4.4.2.22

int SupVoltage

”Voltage on the top of MOSFET full bridge” calibrated data.

4.4.2.23

unsigned int SupVoltage ADC

”Voltage on the top of MOSFET full bridge” raw data from ADC.

4.4.2.24

int Temp

Temperature, calibrated data.

4.4.2.25

unsigned int Temp ADC

Voltage from temperature sensor, raw data from ADC.

4.5 brake settings t Struct Reference
Brake settings.

Data Fields
• unsigned int t1
Time in ms between turn on motor power and turn off brake.

Generated on Fri Nov 29 2013 01:25:06 for libximc by Doxygen

13

4.6 calibration t Struct Reference

• unsigned int t2
Time in ms between turn off brake and moving readiness.

• unsigned int t3
Time in ms between motor stop and turn on brake.

• unsigned int t4
Time in ms between turn on brake and turn off motor power.

• unsigned int BrakeFlags
Brake settings flags.

4.5.1 Detailed Description
Brake settings.
This structure contains parameters of brake control.

See Also
set brake settings
get brake settings
get brake settings, set brake settings

4.5.2 Field Documentation
4.5.2.1

unsigned int BrakeFlags

Brake settings flags.

4.5.2.2

unsigned int t1

Time in ms between turn on motor power and turn off brake.
Range: 0..65535.

4.5.2.3

unsigned int t2

Time in ms between turn off brake and moving readiness.
All moving commands will execute after this interval. Range: 0..65535.

4.5.2.4

unsigned int t3

Time in ms between motor stop and turn on brake.
Range: 0..65535.

4.5.2.5

unsigned int t4

Time in ms between turn on brake and turn off motor power.
Range: 0..65535.

4.6 calibration t Struct Reference
Calibration companion structure.
Generated on Fri Nov 29 2013 01:25:06 for libximc by Doxygen

14

4.7 chart data t Struct Reference

15

Data Fields
• double A
Mulitiplier.

• unsigned int MicrostepMode
Microstep mode.

4.6.1 Detailed Description
Calibration companion structure.

4.7 chart data t Struct Reference
Additional device state.

Data Fields
• int WindingVoltageA
In the case step motor, the voltage across the winding A; in the case of a brushless, the voltage on the first coil, in the
case of the only DC.

• int WindingVoltageB
In the case step motor, the voltage across the winding B; in case of a brushless, the voltage on the second winding,
and in the case of DC is not used.

• int WindingVoltageC
In the case of a brushless, the voltage on the third winding, in the case step motor and DC is not used.

• int WindingCurrentA
In the case step motor, the current in the coil A; brushless if the current in the first coil, and in the case of a single DC.

• int WindingCurrentB
In the case step motor, the current in the coil B; brushless if the current in the second coil, and in the case of DC is
not used.

• int WindingCurrentC
In the case of a brushless, the current in the third winding, in the case step motor and DC is not used.

• unsigned int Pot
Potentiometer in ten-thousandths of [0, 10000].

• unsigned int Joy
The joystick to the ten-thousandths [0, 10000].

• int DutyCycle
Duty cycle of PWM.

4.7.1 Detailed Description
Additional device state.
This structure contains additional values such as winding’s voltages, currents and temperature.

See Also
get chart data
get chart data

Generated on Fri Nov 29 2013 01:25:06 for libximc by Doxygen

4.8 control settings calb t Struct Reference

16

4.7.2 Field Documentation
4.7.2.1

int DutyCycle

Duty cycle of PWM.

4.7.2.2

int WindingCurrentA

In the case step motor, the current in the coil A; brushless if the current in the first coil, and in the case of a single
DC.

4.7.2.3

int WindingCurrentB

In the case step motor, the current in the coil B; brushless if the current in the second coil, and in the case of DC is
not used.

4.7.2.4

int WindingCurrentC

In the case of a brushless, the current in the third winding, in the case step motor and DC is not used.

4.7.2.5

int WindingVoltageA

In the case step motor, the voltage across the winding A; in the case of a brushless, the voltage on the first coil, in
the case of the only DC.

4.7.2.6

int WindingVoltageB

In the case step motor, the voltage across the winding B; in case of a brushless, the voltage on the second winding,
and in the case of DC is not used.

4.7.2.7

int WindingVoltageC

In the case of a brushless, the voltage on the third winding, in the case step motor and DC is not used.

4.8 control settings calb t Struct Reference
Data Fields
• float MaxSpeed [10]
Array of speeds using with joystick and button control.

• unsigned int Timeout [9]
timeout[i] is time in ms, after that max speed[i+1] is applying.

• unsigned int MaxClickTime
Maximum click time.

• unsigned int Flags
Control flags.

• float DeltaPosition
Shift (delta) of position.

Generated on Fri Nov 29 2013 01:25:06 for libximc by Doxygen

4.9 control settings t Struct Reference

17

4.8.1 Field Documentation
4.8.1.1

unsigned int Flags

Control flags.

4.8.1.2

unsigned int MaxClickTime

Maximum click time.
Prior to the expiration of this time the first speed isn’t enabled.

4.8.1.3

float MaxSpeed[10]

Array of speeds using with joystick and button control.

4.8.1.4

unsigned int Timeout[9]

timeout[i] is time in ms, after that max speed[i+1] is applying.
It is using with buttons control only. Range: 0..65535.

4.9 control settings t Struct Reference
Control settings.

Data Fields
• unsigned int MaxSpeed [10]
Array of speeds (full step) using with joystick and button control.

• unsigned int uMaxSpeed [10]
Array of speeds (1/256 microstep) using with joystick and button control.

• unsigned int Timeout [9]
timeout[i] is time in ms, after that max speed[i+1] is applying.

• unsigned int MaxClickTime
Maximum click time.

• unsigned int Flags
Control flags.

• int DeltaPosition
Shift (delta) of position.

• int uDeltaPosition
Fractional part of the shift in micro steps (-255 .

4.9.1 Detailed Description
Control settings.
This structure contains control parameters. When choosing CTL MODE=1 switches motor control with the joystick.
In this mode, the joystick to the maximum engine tends Move at MaxSpeed [i], where i=0 if the previous use This
mode is not selected another i. Buttons switch the room rate i. When CTL MODE=2 is switched on motor control
using the Left / right. When you click on the button motor starts to move in the appropriate direction at a speed
MaxSpeed [0], at the end of time Timeout[i] motor move at a speed MaxSpeed [i+1]. at Transition from MaxSpeed
Generated on Fri Nov 29 2013 01:25:06 for libximc by Doxygen

4.10 controller name t Struct Reference

18

[i] on MaxSpeed [i+1] to acceleration, as usual. The figure above shows the sensitivity of the joystick feature on its
position.

See Also
set control settings
get control settings
get control settings, set control settings

4.9.2 Field Documentation
4.9.2.1

unsigned int Flags

Control flags.

4.9.2.2

unsigned int MaxClickTime

Maximum click time.
Prior to the expiration of this time the first speed isn’t enabled.

4.9.2.3

unsigned int MaxSpeed[10]

Array of speeds (full step) using with joystick and button control.
Range: 0..1000000.

4.9.2.4

unsigned int Timeout[9]

timeout[i] is time in ms, after that max speed[i+1] is applying.
It is using with buttons control only. Range: 0..65535.

4.9.2.5

int uDeltaPosition

Fractional part of the shift in micro steps (-255 .
. 255) is only used with stepper motor

4.9.2.6

unsigned int uMaxSpeed[10]

Array of speeds (1/256 microstep) using with joystick and button control.
Range: 0..255.

4.10 controller name t Struct Reference
Controller user name and flags of setting.

Data Fields
• char ControllerName [17]
User conroller name.

• unsigned int CtrlFlags
Generated on Fri Nov 29 2013 01:25:06 for libximc by Doxygen

4.11 ctp settings t Struct Reference

19

Flags of internal controller settings.

4.10.1 Detailed Description
Controller user name and flags of setting.

See Also
get controller name, set controller name

4.10.2 Field Documentation
4.10.2.1

char ControllerName[17]

User conroller name.
Can be set by user for his/her convinience. Max string length: 16 chars.

4.10.2.2

unsigned int CtrlFlags

Flags of internal controller settings.

4.11 ctp settings t Struct Reference
Control position settings(is only used with stepper motor).

Data Fields
• unsigned int CTPMinError
Minimum contrast steps from step motor encoder position, wich set STATE CTP ERROR flag.

• unsigned int CTPFlags
Position control flags.

4.11.1 Detailed Description
Control position settings(is only used with stepper motor).
When controlling the step motor with encoder (CTP BASE 0) it is possible to detect the loss of steps. The controller
knows the number of steps per revolution (GENG :: StepsPerRev) and the encoder resolution (GFBS :: IPT). When
the control (flag CTP ENABLED), the controller stores the current position in the footsteps of SM and the current
position of the encoder. Further, at each step of the position encoder is converted into steps and if the difference
is greater CTPMinError, a flag STATE CTP ERROR and set ALARM state. When controlling the step motor with
speed sensor (CTP BASE 1), the position is controlled by him. The active edge of input clock controller stores the
current value of steps. Further, at each turn checks how many steps shifted. When a mismatch CTPMinError a flag
STATE CTP ERROR and set ALARM state.

See Also
set ctp settings
get ctp settings
get ctp settings, set ctp settings

Generated on Fri Nov 29 2013 01:25:06 for libximc by Doxygen

4.12 debug read t Struct Reference

4.11.2 Field Documentation
4.11.2.1

unsigned int CTPFlags

Position control flags.

4.11.2.2

unsigned int CTPMinError

Minimum contrast steps from step motor encoder position, wich set STATE CTP ERROR flag.
Measured in steps step motor. Range: 0..255.

4.12 debug read t Struct Reference
Debug data.

Data Fields
• unsigned int DebugData [128]
Arbitrary debug data.

4.12.1 Detailed Description
Debug data.
These data are used for device debugging by manufacturer only.

See Also
get debug read

4.12.2 Field Documentation
4.12.2.1

unsigned int DebugData[128]

Arbitrary debug data.

4.13 device information t Struct Reference
Read command controller information.

Data Fields
• char Manufacturer [5]
Manufacturer.

• char ManufacturerId [3]
Manufacturer id.

• char ProductDescription [9]
Product description.

Generated on Fri Nov 29 2013 01:25:06 for libximc by Doxygen

20

4.14 edges settings calb t Struct Reference

21

4.13.1 Detailed Description
Read command controller information.
The controller responds to this command in any state. Manufacturer field for all XI ∗∗ devices should contain the
string ”XIMC” (validation is performed on it) The remaining fields contain information about the device.

See Also
get device information
get device information impl

4.14 edges settings calb t Struct Reference
Data Fields
• unsigned int BorderFlags
Border flags.

• unsigned int EnderFlags
Limit switches flags.

• float LeftBorder
Left border position, used if BORDER IS ENCODER flag is set.

• float RightBorder
Right border position, used if BORDER IS ENCODER flag is set.

4.14.1 Field Documentation
4.14.1.1

unsigned int BorderFlags

Border flags.

4.14.1.2

unsigned int EnderFlags

Limit switches flags.

4.14.1.3

float LeftBorder

Left border position, used if BORDER IS ENCODER flag is set.

4.14.1.4

float RightBorder

Right border position, used if BORDER IS ENCODER flag is set.

4.15 edges settings t Struct Reference
Edges settings.

Generated on Fri Nov 29 2013 01:25:06 for libximc by Doxygen

4.15 edges settings t Struct Reference

22

Data Fields
• unsigned int BorderFlags
Border flags.

• unsigned int EnderFlags
Limit switches flags.

• int LeftBorder
Left border position, used if BORDER IS ENCODER flag is set.

• int uLeftBorder
Left border position in 1/256 microsteps(used with stepper motor only).

• int RightBorder
Right border position, used if BORDER IS ENCODER flag is set.

• int uRightBorder
Right border position in 1/256 microsteps.

4.15.1 Detailed Description
Edges settings.
This structure contains border and limit switches settings. Please load new engine settings when you change
positioner etc. Please note that wrong engine settings lead to device malfunction, can lead to irreversible damage
of board.

See Also
set edges settings
get edges settings
get edges settings, set edges settings

4.15.2 Field Documentation
4.15.2.1

unsigned int BorderFlags

Border flags.

4.15.2.2

unsigned int EnderFlags

Limit switches flags.

4.15.2.3

int LeftBorder

Left border position, used if BORDER IS ENCODER flag is set.
Range: -2147483647..2147483647.

4.15.2.4

int RightBorder

Right border position, used if BORDER IS ENCODER flag is set.
Range: -2147483647..2147483647.

4.15.2.5

int uLeftBorder

Left border position in 1/256 microsteps(used with stepper motor only).
Range: -255..255.
Generated on Fri Nov 29 2013 01:25:06 for libximc by Doxygen

4.16 encoder information t Struct Reference

4.15.2.6

int uRightBorder

Right border position in 1/256 microsteps.
Range: -255..255(used with stepper motor only).

4.16 encoder information t Struct Reference
Encoder information.

Data Fields
• char Manufacturer [17]
Manufacturer.

• char PartNumber [25]
Series and PartNumber.

4.16.1 Detailed Description
Encoder information.

See Also
set encoder information
get encoder information
get encoder information, set encoder information

4.16.2 Field Documentation
4.16.2.1

char Manufacturer[17]

Manufacturer.
Max string length: 16 chars.

4.16.2.2

char PartNumber[25]

Series and PartNumber.
Max string length: 24 chars.

4.17 encoder settings t Struct Reference
Encoder settings.

Data Fields
• float MaxOperatingFrequency
Max operation frequency (kHz).

• float SupplyVoltageMin
Minimum supply voltage (V).

Generated on Fri Nov 29 2013 01:25:06 for libximc by Doxygen

23

4.18 engine settings calb t Struct Reference

• float SupplyVoltageMax
Maximum supply voltage (V).

• float MaxCurrentConsumption
Max current consumption (mA).

• unsigned int PPR
The number of counts per revolution.

• unsigned int EncoderSettings
Encoder settings flags.

4.17.1 Detailed Description
Encoder settings.

See Also
set encoder settings
get encoder settings
get encoder settings, set encoder settings

4.17.2 Field Documentation
4.17.2.1

unsigned int EncoderSettings

Encoder settings flags.

4.17.2.2

float MaxCurrentConsumption

Max current consumption (mA).
Data type: float.

4.17.2.3

float MaxOperatingFrequency

Max operation frequency (kHz).
Data type: float.

4.17.2.4

float SupplyVoltageMax

Maximum supply voltage (V).
Data type: float.

4.17.2.5

float SupplyVoltageMin

Minimum supply voltage (V).
Data type: float.

4.18 engine settings calb t Struct Reference
Data Fields
• unsigned int NomVoltage
Generated on Fri Nov 29 2013 01:25:06 for libximc by Doxygen

24

4.18 engine settings calb t Struct Reference

25

Rated voltage.

• unsigned int NomCurrent
Rated current.

• float NomSpeed
Nominal speed.

• unsigned int EngineFlags
Flags of engine settings.

• float Antiplay
Number of pulses or steps for backlash (play) compensation procedure.

• unsigned int MicrostepMode
Flags of microstep mode.

• unsigned int StepsPerRev
Number of full steps per revolution(Used with steper motor only).

4.18.1 Field Documentation
4.18.1.1

float Antiplay

Number of pulses or steps for backlash (play) compensation procedure.
Used if ENGINE ANTIPLAY flag is set.

4.18.1.2

unsigned int EngineFlags

Flags of engine settings.

4.18.1.3

unsigned int MicrostepMode

Flags of microstep mode.

4.18.1.4

unsigned int NomCurrent

Rated current.
Controller will keep current consumed by motor below this value if ENGINE LIMIT CURR flag is set. Range:
1..65535

4.18.1.5

float NomSpeed

Nominal speed.
Controller will keep motor speed below this value if ENGINE LIMIT RPM flag is set.

4.18.1.6

unsigned int NomVoltage

Rated voltage.
Controller will keep the voltage drop on motor below this value if ENGINE LIMIT VOLT flag is set(Used with DC
only). Range: 1..65535

Generated on Fri Nov 29 2013 01:25:06 for libximc by Doxygen

4.19 engine settings t Struct Reference

4.18.1.7

26

unsigned int StepsPerRev

Number of full steps per revolution(Used with steper motor only).
Range: 1..65535.

4.19 engine settings t Struct Reference
Engine settings.

Data Fields
• unsigned int NomVoltage
Rated voltage.

• unsigned int NomCurrent
Rated current.

• unsigned int NomSpeed
Nominal speed (in whole steps / s or rpm for DC and stepper motor as a master encoder).

• unsigned int uNomSpeed
The fractional part of a nominal speed in microsteps (is only used with stepper motor).

• unsigned int EngineFlags
Flags of engine settings.

• int Antiplay
Number of pulses or steps for backlash (play) compensation procedure.

• unsigned int MicrostepMode
Flags of microstep mode.

• unsigned int StepsPerRev
Number of full steps per revolution(Used with steper motor only).

4.19.1 Detailed Description
Engine settings.
This structure contains useful motor settings. These settings specify motor shaft movement algorithm, list of limitations and rated characteristics. All boards are supplied with standart set of engine setting on controller’s flash
memory. Please load new engine settings when you change motor, encoder, positioner etc. Please note that wrong
engine settings lead to device malfunction, can lead to irreversible damage of board.

See Also
set engine settings
get engine settings
get engine settings, set engine settings

4.19.2 Field Documentation
4.19.2.1

int Antiplay

Number of pulses or steps for backlash (play) compensation procedure.
Used if ENGINE ANTIPLAY flag is set. Range: -32768..32767

Generated on Fri Nov 29 2013 01:25:06 for libximc by Doxygen

4.20 entype settings t Struct Reference

4.19.2.2

27

unsigned int EngineFlags

Flags of engine settings.

4.19.2.3

unsigned int MicrostepMode

Flags of microstep mode.

4.19.2.4

unsigned int NomCurrent

Rated current.
Controller will keep current consumed by motor below this value if ENGINE LIMIT CURR flag is set. Range:
1..65535

4.19.2.5

unsigned int NomSpeed

Nominal speed (in whole steps / s or rpm for DC and stepper motor as a master encoder).
Controller will keep motor shaft RPM below this value if ENGINE LIMIT RPM flag is set. Range: 1..1000000.

4.19.2.6

unsigned int NomVoltage

Rated voltage.
Controller will keep the voltage drop on motor below this value if ENGINE LIMIT VOLT flag is set(Used with DC
only). Range: 1..65535

4.19.2.7

unsigned int StepsPerRev

Number of full steps per revolution(Used with steper motor only).
Range: 1..65535.

4.19.2.8

unsigned int uNomSpeed

The fractional part of a nominal speed in microsteps (is only used with stepper motor).
Range: 0..255

4.20 entype settings t Struct Reference
Engine type and driver type settings.

Data Fields
• unsigned int EngineType
Flags of engine type.

• unsigned int DriverType
Flags of driver type.

Generated on Fri Nov 29 2013 01:25:06 for libximc by Doxygen

4.21 extio settings t Struct Reference

28

4.20.1 Detailed Description
Engine type and driver type settings.

Parameters
id
EngineType
DriverType

an identifier of device
engine type
driver type

See Also
get entype settings, set entype settings

4.20.2 Field Documentation
4.20.2.1

unsigned int DriverType

Flags of driver type.

4.20.2.2

unsigned int EngineType

Flags of engine type.

4.21 extio settings t Struct Reference
EXTIO settings.

Data Fields
• unsigned int EXTIOSetupFlags
External IO setup flags.

• unsigned int EXTIOModeFlags
External IO mode flags.

4.21.1 Detailed Description
EXTIO settings.
This structure contains all EXTIO settings. By default input event are signalled through rising front and output states
are signalled by high logic state.

See Also
get extio settings
set extio settings
get extio settings, set extio settings

4.21.2 Field Documentation
4.21.2.1

unsigned int EXTIOModeFlags

External IO mode flags.
Generated on Fri Nov 29 2013 01:25:06 for libximc by Doxygen

4.22 feedback settings t Struct Reference

4.21.2.2

29

unsigned int EXTIOSetupFlags

External IO setup flags.

4.22 feedback settings t Struct Reference
Feedback settings.

Data Fields
• unsigned int IPS
The number of measured counts per revolution encoder.

• unsigned int FeedbackType
Feedback type.

• unsigned int FeedbackFlags
Describes feedback flags.

• unsigned int HallSPR
The number of hall steps per revolution.

• int HallShift
Phase shift between output signal on BLDC engine and hall sensor input(0 - when only active the Hall sensor, the
output state is a positive voltage on the winding A and a negative voltage on the winding B).

4.22.1 Detailed Description
Feedback settings.
This structure contains feedback settings.

See Also
get feedback settings, set feedback settings

4.22.2 Field Documentation
4.22.2.1

unsigned int FeedbackFlags

Describes feedback flags.

4.22.2.2

unsigned int FeedbackType

Feedback type.

4.22.2.3

int HallShift

Phase shift between output signal on BLDC engine and hall sensor input(0 - when only active the Hall sensor, the
output state is a positive voltage on the winding A and a negative voltage on the winding B).

4.22.2.4

unsigned int HallSPR

The number of hall steps per revolution.

Generated on Fri Nov 29 2013 01:25:06 for libximc by Doxygen

4.23 gear information t Struct Reference

4.23 gear information t Struct Reference
Gear information.

Data Fields
• char Manufacturer [17]
Manufacturer.

• char PartNumber [25]
Series and PartNumber.

4.23.1 Detailed Description
Gear information.

See Also
set gear information
get gear information
get gear information, set gear information

4.23.2 Field Documentation
4.23.2.1

char Manufacturer[17]

Manufacturer.
Max string length: 16 chars.

4.23.2.2

char PartNumber[25]

Series and PartNumber.
Max string length: 24 chars.

4.24 gear settings t Struct Reference
Gear setings.

Data Fields
• float ReductionIn
Input reduction coefficient.

• float ReductionOut
Output reduction coefficient.

• float RatedInputTorque
Max continuous torque (N m).

• float RatedInputSpeed
Max speed on the input shaft (rpm).

• float MaxOutputBacklash
Output backlash of the reduction gear(degree).

Generated on Fri Nov 29 2013 01:25:06 for libximc by Doxygen

30

4.24 gear settings t Struct Reference

• float InputInertia
Equivalent input gear inertia (g cm2).

• float Efficiency
Reduction gear efficiency (%).

4.24.1 Detailed Description
Gear setings.

See Also
set gear settings
get gear settings
get gear settings, set gear settings

4.24.2 Field Documentation
4.24.2.1

float Efficiency

Reduction gear efficiency (%).
Data type: float.

4.24.2.2

float InputInertia

Equivalent input gear inertia (g cm2).
Data type: float.

4.24.2.3

float MaxOutputBacklash

Output backlash of the reduction gear(degree).
Data type: float.

4.24.2.4

float RatedInputSpeed

Max speed on the input shaft (rpm).
Data type: float.

4.24.2.5

float RatedInputTorque

Max continuous torque (N m).
Data type: float.

4.24.2.6

float ReductionIn

Input reduction coefficient.
(Output = (ReductionOut / ReductionIn) ∗ Input) Data type: float.

Generated on Fri Nov 29 2013 01:25:06 for libximc by Doxygen

31

4.25 get position calb t Struct Reference

4.24.2.7

32

float ReductionOut

Output reduction coefficient.
(Output = (ReductionOut / ReductionIn) ∗ Input) Data type: float.

4.25 get position calb t Struct Reference
Data Fields
• float Position
The position in the engine.

• long t EncPosition
Encoder position.

4.25.1 Field Documentation
4.25.1.1

long t EncPosition

Encoder position.

4.25.1.2

float Position

The position in the engine.

4.26 get position t Struct Reference
Position information.

Data Fields
• int Position
The position of the whole steps in the engine.

• int uPosition
Microstep position is only used with stepper motors.

• long t EncPosition
Encoder position.

4.26.1 Detailed Description
Position information.
Useful structure that contains position value in steps and micro for stepper motor and encoder steps of all engines.

See Also
get position

Generated on Fri Nov 29 2013 01:25:06 for libximc by Doxygen

4.27 hallsensor information t Struct Reference

4.26.2 Field Documentation
4.26.2.1

long t EncPosition

Encoder position.

4.27 hallsensor information t Struct Reference
Hall sensor information.

Data Fields
• char Manufacturer [17]
Manufacturer.

• char PartNumber [25]
Series and PartNumber.

4.27.1 Detailed Description
Hall sensor information.

See Also
set hallsensor information
get hallsensor information
get hallsensor information, set hallsensor information

4.27.2 Field Documentation
4.27.2.1

char Manufacturer[17]

Manufacturer.
Max string length: 16 chars.

4.27.2.2

char PartNumber[25]

Series and PartNumber.
Max string length: 24 chars.

4.28 hallsensor settings t Struct Reference
Hall sensor settings.

Data Fields
• float MaxOperatingFrequency
Max operation frequency (kHz).

• float SupplyVoltageMin
Minimum supply voltage (V).

Generated on Fri Nov 29 2013 01:25:06 for libximc by Doxygen

33

4.29 home settings calb t Struct Reference

• float SupplyVoltageMax
Maximum supply voltage (V).

• float MaxCurrentConsumption
Max current consumption (mA).

• unsigned int PPR
The number of counts per revolution.

4.28.1 Detailed Description
Hall sensor settings.

See Also
set hallsensor settings
get hallsensor settings
get hallsensor settings, set hallsensor settings

4.28.2 Field Documentation
4.28.2.1

float MaxCurrentConsumption

Max current consumption (mA).
Data type: float.

4.28.2.2

float MaxOperatingFrequency

Max operation frequency (kHz).
Data type: float.

4.28.2.3

float SupplyVoltageMax

Maximum supply voltage (V).
Data type: float.

4.28.2.4

float SupplyVoltageMin

Minimum supply voltage (V).
Data type: float.

4.29 home settings calb t Struct Reference
Data Fields
• float FastHome
Speed used for first motion.

• float SlowHome
Speed used for second motion.

• float HomeDelta
Distance from break point.

Generated on Fri Nov 29 2013 01:25:06 for libximc by Doxygen

34

4.30 home settings t Struct Reference

• unsigned int HomeFlags
Home settings flags.

4.29.1 Field Documentation
4.29.1.1

float FastHome

Speed used for first motion.

4.29.1.2

float HomeDelta

Distance from break point.

4.29.1.3

unsigned int HomeFlags

Home settings flags.

4.29.1.4

float SlowHome

Speed used for second motion.

4.30 home settings t Struct Reference
Position calibration settings.

Data Fields
• unsigned int FastHome
Speed used for first motion.

• unsigned int uFastHome
Part of the speed for first motion, microsteps.

• unsigned int SlowHome
Speed used for second motion.

• unsigned int uSlowHome
Part of the speed for second motion, microsteps.

• int HomeDelta
Distance from break point.

• int uHomeDelta
Part of the delta distance, microsteps.

• unsigned int HomeFlags
Home settings flags.

4.30.1 Detailed Description
Position calibration settings.
This structure contains settings used in position calibrating. It specify behaviour of calibrating position.

Generated on Fri Nov 29 2013 01:25:06 for libximc by Doxygen

35

4.31 joystick settings t Struct Reference

See Also
get home settings
set home settings
command home
get home settings, set home settings

4.30.2 Field Documentation
4.30.2.1

unsigned int FastHome

Speed used for first motion.
Range: 0..1000000.

4.30.2.2

int HomeDelta

Distance from break point.
Range: -2147483647..2147483647.

4.30.2.3

unsigned int HomeFlags

Home settings flags.

4.30.2.4

unsigned int SlowHome

Speed used for second motion.
Range: 0..1000000.

4.30.2.5

unsigned int uFastHome

Part of the speed for first motion, microsteps.
Range: 0..255.

4.30.2.6

int uHomeDelta

Part of the delta distance, microsteps.
Range: -255..255.

4.30.2.7

unsigned int uSlowHome

Part of the speed for second motion, microsteps.
Range: 0..255.

4.31 joystick settings t Struct Reference
Joystick settings.

Generated on Fri Nov 29 2013 01:25:06 for libximc by Doxygen

36

4.31 joystick settings t Struct Reference

37

Data Fields
• unsigned int JoyLowEnd
Joystick lower end position.

• unsigned int JoyCenter
Joystick center position.

• unsigned int JoyHighEnd
Joystick higher end position.

• unsigned int ExpFactor
Exponential nonlinearity factor.

• unsigned int DeadZone
Joystick dead zone.

• unsigned int JoyFlags
Joystick flags.

4.31.1 Detailed Description
Joystick settings.
This structure contains joystick parameters. If joystick position is outside DeadZone limits from the central position
a movement with speed, defined by the joystick DeadZone edge to 100% deviation, begins. Joystick positions
inside DeadZone limits correspond to zero speed (soft stop of motion) and positions beyond Low and High limits
correspond MaxSpeed [i] or -MaxSpeed [i] (see command SCTL), where i = 0 by default and can be changed
with left/right buttons (see command SCTL). If next speed in list is zero (both integer and microstep parts), the
button press is ignored. First speed in list shouldn’t be zero. The relationship between the deviation and the rate is
exponential, allowing no switching speed combine high mobility and accuracy.

See Also
set joystick settings
get joystick settings
get joystick settings, set joystick settings

4.31.2 Field Documentation
4.31.2.1

unsigned int DeadZone

Joystick dead zone.

4.31.2.2

unsigned int ExpFactor

Exponential nonlinearity factor.

4.31.2.3

unsigned int JoyCenter

Joystick center position.

4.31.2.4

unsigned int JoyFlags

Joystick flags.

Generated on Fri Nov 29 2013 01:25:06 for libximc by Doxygen

4.32 motor information t Struct Reference

4.31.2.5

unsigned int JoyHighEnd

Joystick higher end position.

4.31.2.6

unsigned int JoyLowEnd

Joystick lower end position.

4.32 motor information t Struct Reference
motor information.

Data Fields
• char Manufacturer [17]
Manufacturer.

• char PartNumber [25]
Series and PartNumber.

4.32.1 Detailed Description
motor information.

See Also
set motor information
get motor information
get motor information, set motor information

4.32.2 Field Documentation
4.32.2.1

char Manufacturer[17]

Manufacturer.
Max string length: 16 chars.

4.32.2.2

char PartNumber[25]

Series and PartNumber.
Max string length: 24 chars.

4.33 motor settings t Struct Reference
motor settings.

Generated on Fri Nov 29 2013 01:25:06 for libximc by Doxygen

38

4.33 motor settings t Struct Reference

39

Data Fields
• unsigned int MotorType
Motor Type flags.

• unsigned int ReservedField
Reserved.

• unsigned int Poles
Number of pole pairs for DC or BLDC motors or number of steps per rotation for stepper motor.

• unsigned int Phases
Number of phases for BLDC motors.

• float NominalVoltage
Nominal voltage on winding (B).

• float NominalCurrent
Maximum direct current in winding for DC and BLDC engines, nominal current in windings for stepper motor (A).

• float NominalSpeed
Nominal speed(rpm).

• float NominalTorque
Nominal torque(mN m).

• float NominalPower
Nominal power(W).

• float WindingResistance
Resistance of windings for DC engine, each of two windings for stepper motor or each of there windings for BLDC
engine(Ohm).

• float WindingInductance
Inductance of windings for DC engine, each of two windings for stepper motor or each of there windings for BLDC
engine(mH).

• float RotorInertia
Rotor inertia(g cm2).

• float StallTorque
Torque hold position for a stepper motor or torque at a motionless rotor for other types of engines (mN m).

• float DetentTorque
Holding torque position with un-powered coils (mN m).

• float TorqueConstant
Torque constant, which determines the aspect ratio of maximum moment of force from the rotor current flowing in the
coil (mN m / A).

• float SpeedConstant
Velocity constant, which determines the value or amplitude of the induced voltage on the motion of DC or BLDC motor
(rpm / V) or stepper motor (steps/s / V).

• float SpeedTorqueGradient
Speed torque gradient (rpm / mN m).

• float MechanicalTimeConstant
Mechanical time constant (ms).

• float MaxSpeed
The maximum speed for stepper motors (steps/s) or DC and BLDC motors (rmp).

• float MaxCurrent
The maximum current in the winding (A).

• float MaxCurrentTime
Safe duration of overcurrent in the winding (ms).

• float NoLoadCurrent
The current consumption in idle mode (A).

• float NoLoadSpeed
Idle speed (rpm).

Generated on Fri Nov 29 2013 01:25:06 for libximc by Doxygen

4.33 motor settings t Struct Reference

4.33.1 Detailed Description
motor settings.

See Also
set motor settings
get motor settings
get motor settings, set motor settings

4.33.2 Field Documentation
4.33.2.1

float DetentTorque

Holding torque position with un-powered coils (mN m).
Data type: float.

4.33.2.2

float MaxCurrent

The maximum current in the winding (A).
Data type: float.

4.33.2.3

float MaxCurrentTime

Safe duration of overcurrent in the winding (ms).
Data type: float.

4.33.2.4

float MaxSpeed

The maximum speed for stepper motors (steps/s) or DC and BLDC motors (rmp).
Data type: float.

4.33.2.5

float MechanicalTimeConstant

Mechanical time constant (ms).
Data type: float.

4.33.2.6

unsigned int MotorType

Motor Type flags.

4.33.2.7

float NoLoadCurrent

The current consumption in idle mode (A).
Used for DC and BLDC motors. Data type: float.

4.33.2.8

float NoLoadSpeed

Idle speed (rpm).
Used for DC and BLDC motors. Data type: float.
Generated on Fri Nov 29 2013 01:25:06 for libximc by Doxygen

40

4.33 motor settings t Struct Reference

4.33.2.9

41

float NominalCurrent

Maximum direct current in winding for DC and BLDC engines, nominal current in windings for stepper motor (A).
Data type: float.

4.33.2.10

float NominalPower

Nominal power(W).
Used for DC and BLDC engine. Data type: float.

4.33.2.11

float NominalSpeed

Nominal speed(rpm).
Used for DC and BLDC engine. Data type: float.

4.33.2.12

float NominalTorque

Nominal torque(mN m).
Used for DC and BLDC engine. Data type: float.

4.33.2.13

float NominalVoltage

Nominal voltage on winding (B).
Data type: float

4.33.2.14

unsigned int Phases

Number of phases for BLDC motors.

4.33.2.15

unsigned int Poles

Number of pole pairs for DC or BLDC motors or number of steps per rotation for stepper motor.

4.33.2.16

float RotorInertia

Rotor inertia(g cm2).
Data type: float.

4.33.2.17

float SpeedConstant

Velocity constant, which determines the value or amplitude of the induced voltage on the motion of DC or BLDC
motor (rpm / V) or stepper motor (steps/s / V).
Data type: float.

4.33.2.18

float SpeedTorqueGradient

Speed torque gradient (rpm / mN m).
Data type: float.
Generated on Fri Nov 29 2013 01:25:06 for libximc by Doxygen

4.34 move settings calb t Struct Reference

4.33.2.19

42

float StallTorque

Torque hold position for a stepper motor or torque at a motionless rotor for other types of engines (mN m).
Data type: float.

4.33.2.20

float TorqueConstant

Torque constant, which determines the aspect ratio of maximum moment of force from the rotor current flowing in
the coil (mN m / A).
Used mainly for DC motors. Data type: float.

4.33.2.21

float WindingInductance

Inductance of windings for DC engine, each of two windings for stepper motor or each of there windings for BLDC
engine(mH).
Data type: float.

4.33.2.22

float WindingResistance

Resistance of windings for DC engine, each of two windings for stepper motor or each of there windings for BLDC
engine(Ohm).
Data type: float.

4.34 move settings calb t Struct Reference
Data Fields
• float Speed
Target speed.

• float Accel
Motor shaft acceleration, steps/s∧ 2(stepper motor) or RPM/s(DC).

• float Decel
Motor shaft deceleration, steps/s∧ 2(stepper motor) or RPM/s(DC).

• float AntiplaySpeed
Speed in antiplay mode.

4.34.1 Field Documentation
4.34.1.1

float Accel

Motor shaft acceleration, steps/s∧ 2(stepper motor) or RPM/s(DC).

4.34.1.2

float AntiplaySpeed

Speed in antiplay mode.

4.34.1.3

float Decel

Motor shaft deceleration, steps/s∧ 2(stepper motor) or RPM/s(DC).
Generated on Fri Nov 29 2013 01:25:06 for libximc by Doxygen

4.35 move settings t Struct Reference

4.34.1.4

float Speed

Target speed.

4.35 move settings t Struct Reference
Move settings.

Data Fields
• unsigned int Speed
Target speed(for stepper motor: steps / c, for DC: rpm).

• unsigned int uSpeed
Target speed in 1/256 microsteps/s.

• unsigned int Accel
Motor shaft acceleration, steps/s∧ 2(stepper motor) or RPM/s(DC).

• unsigned int Decel
Motor shaft deceleration, steps/s∧ 2(stepper motor) or RPM/s(DC).

• unsigned int AntiplaySpeed
Speed in antiplay mode, full steps/s(stepper motor) or RPM(DC).

• unsigned int uAntiplaySpeed
Speed in antiplay mode, 1/256 microsteps/s.

4.35.1 Detailed Description
Move settings.

See Also
set move settings
get move settings
get move settings, set move settings

4.35.2 Field Documentation
4.35.2.1

unsigned int Accel

Motor shaft acceleration, steps/s∧ 2(stepper motor) or RPM/s(DC).
Range: 0..65535.

4.35.2.2

unsigned int AntiplaySpeed

Speed in antiplay mode, full steps/s(stepper motor) or RPM(DC).
Range: 0..1000000.

4.35.2.3

unsigned int Decel

Motor shaft deceleration, steps/s∧ 2(stepper motor) or RPM/s(DC).
Range: 0..65535.

Generated on Fri Nov 29 2013 01:25:06 for libximc by Doxygen

43

4.36 pid settings t Struct Reference

4.35.2.4

44

unsigned int Speed

Target speed(for stepper motor: steps / c, for DC: rpm).
Range: 0..1000000.

4.35.2.5

unsigned int uAntiplaySpeed

Speed in antiplay mode, 1/256 microsteps/s.
Used with stepper motor only. Range: 0..255.

4.35.2.6

unsigned int uSpeed

Target speed in 1/256 microsteps/s.
Using with stepper motor only. Range: 0..255.

4.36 pid settings t Struct Reference
PID settings.

Data Fields
• unsigned int KpU
Proportional gain for voltage PID routine.

• unsigned int KiU
Integral gain for voltage PID routine.

• unsigned int KdU
Differential gain for voltage PID routine.

4.36.1 Detailed Description
PID settings.
This structure contains factors for PID routine. Range: 0..65535. It specify behaviour of PID routine for voltage.
These factors are slightly different for different positioners. All boards are supplied with standart set of PID setting
on controller’s flash memory. Please load new PID settings when you change positioner. Please note that wrong
PID settings lead to device malfunction.

See Also
set pid settings
get pid settings
get pid settings, set pid settings

4.37 power settings t Struct Reference
Step motor power settings.

Generated on Fri Nov 29 2013 01:25:06 for libximc by Doxygen

4.37 power settings t Struct Reference

Data Fields
• unsigned int HoldCurrent
Current in holding regime, percent of nominal.

• unsigned int CurrReductDelay
Time in ms from going to STOP state to reducting current.

• unsigned int PowerOffDelay
Time in s from going to STOP state to turning power off.

• unsigned int CurrentSetTime
Time in ms to reach nominal current.

• unsigned int PowerFlags
Flags of power settings of stepper motor.

4.37.1 Detailed Description
Step motor power settings.

See Also
set move settings
get move settings
get power settings, set power settings

4.37.2 Field Documentation
4.37.2.1

unsigned int CurrentSetTime

Time in ms to reach nominal current.
Range: 0..65535.

4.37.2.2

unsigned int CurrReductDelay

Time in ms from going to STOP state to reducting current.
Range: 0..65535.

4.37.2.3

unsigned int HoldCurrent

Current in holding regime, percent of nominal.
Range: 0..100.

4.37.2.4

unsigned int PowerFlags

Flags of power settings of stepper motor.

4.37.2.5

unsigned int PowerOffDelay

Time in s from going to STOP state to turning power off.
Range: 0..65535.

Generated on Fri Nov 29 2013 01:25:06 for libximc by Doxygen

45

4.38 secure settings t Struct Reference

4.38 secure settings t Struct Reference
This structure contains raw analog data from ADC embedded on board.

Data Fields
• unsigned int LowUpwrOff
Lower voltage limit to turn off the motor, in mV.

• unsigned int CriticalIpwr
Maximum motor current which triggers ALARM state, in mA.

• unsigned int CriticalUpwr
Maximum motor voltage which triggers ALARM state, in mV.

• unsigned int CriticalT
Maximum temperature, which triggers ALARM state, in tenths of degrees Celcius.

• unsigned int CriticalIusb
Maximum USB current which triggers ALARM state, in mA.

• unsigned int CriticalUusb
Maximum USB voltage which triggers ALARM state, in mV.

• unsigned int MinimumUusb
Minimum USB voltage which triggers ALARM state, in mV.

• unsigned int Flags
Flags of secure settings.

4.38.1 Detailed Description
This structure contains raw analog data from ADC embedded on board.
These data used for device testing and deep recalibraton by manufacturer only.

See Also
get secure settings
set secure settings
get secure settings, set secure settings

4.38.2 Field Documentation
4.38.2.1

unsigned int CriticalIpwr

Maximum motor current which triggers ALARM state, in mA.
Range: 0..65535.

4.38.2.2

unsigned int CriticalIusb

Maximum USB current which triggers ALARM state, in mA.
Range: 0..65535.

4.38.2.3

unsigned int CriticalT

Maximum temperature, which triggers ALARM state, in tenths of degrees Celcius.
Range: 0..65535.
Generated on Fri Nov 29 2013 01:25:06 for libximc by Doxygen

46

4.39 serial number t Struct Reference

4.38.2.4

47

unsigned int CriticalUpwr

Maximum motor voltage which triggers ALARM state, in mV.
Range: 0..65535.

4.38.2.5

unsigned int CriticalUusb

Maximum USB voltage which triggers ALARM state, in mV.
Range: 0..65535.

4.38.2.6

unsigned int Flags

Flags of secure settings.

4.38.2.7

unsigned int LowUpwrOff

Lower voltage limit to turn off the motor, in mV.
Range: 0..65535.

4.38.2.8

unsigned int MinimumUusb

Minimum USB voltage which triggers ALARM state, in mV.
Range: 0..65535.

4.39 serial number t Struct Reference
Serial number structure.

Data Fields
• unsigned int SN
New board serial number.

• unsigned int Key [32]
Protection key (256 bit).

4.39.1 Detailed Description
Serial number structure.
The structure keep new serial number and valid key. The SN is changed and saved when transmitted key matches
stored key. Can be used by manufacturer only.

See Also
set serial number

Generated on Fri Nov 29 2013 01:25:06 for libximc by Doxygen

4.40 set position calb t Struct Reference

4.39.2 Field Documentation
4.39.2.1

unsigned int Key[32]

Protection key (256 bit).

4.39.2.2

unsigned int SN

New board serial number.

4.40 set position calb t Struct Reference
Data Fields
• float Position
The position in the engine.

• long t EncPosition
Encoder position.

• unsigned int PosFlags
Position setting flags.

4.40.1 Field Documentation
4.40.1.1

long t EncPosition

Encoder position.

4.40.1.2

unsigned int PosFlags

Position setting flags.

4.40.1.3

float Position

The position in the engine.

4.41 set position t Struct Reference
Position information.

Data Fields
• int Position
The position of the whole steps in the engine.

• int uPosition
Microstep position is only used with stepper motors.

• long t EncPosition
Encoder position.

• unsigned int PosFlags
Position setting flags.

Generated on Fri Nov 29 2013 01:25:06 for libximc by Doxygen

48

4.42 stage information t Struct Reference

49

4.41.1 Detailed Description
Position information.
Useful structure that contains position value in steps and micro for stepper motor and encoder steps of all engines.

See Also
set position

4.41.2 Field Documentation
4.41.2.1

long t EncPosition

Encoder position.

4.41.2.2

unsigned int PosFlags

Position setting flags.

4.42 stage information t Struct Reference
Stage information.

Data Fields
• char Manufacturer [17]
Manufacturer.

• char PartNumber [25]
Series and PartNumber.

4.42.1 Detailed Description
Stage information.

See Also
set stage information
get stage information
get stage information, set stage information

4.42.2 Field Documentation
4.42.2.1

char Manufacturer[17]

Manufacturer.
Max string length: 16 chars.

4.42.2.2

char PartNumber[25]

Series and PartNumber.
Max string length: 24 chars.
Generated on Fri Nov 29 2013 01:25:06 for libximc by Doxygen

4.43 stage name t Struct Reference

4.43 stage name t Struct Reference
Stage user name.

Data Fields
• char PositionerName [17]
User positioner name.

4.43.1 Detailed Description
Stage user name.

See Also
get stage name, set stage name

4.43.2 Field Documentation
4.43.2.1

char PositionerName[17]

User positioner name.
Can be set by user for his/her convinience. Max string length: 16 chars.

4.44 stage settings t Struct Reference
Stage settings.

Data Fields
• float LeadScrewPitch
Lead screw pitch (mm).

• char Units [9]
Units for MaxSpeed and TravelRange fields of the structure (steps, degrees, mm, ...).

• float MaxSpeed
Max speed (Units/c).

• float TravelRange
Travel range (Units).

• float SupplyVoltageMin
Supply voltage minimum (V).

• float SupplyVoltageMax
Supply voltage maximum (V).

• float MaxCurrentConsumption
Max current consumption (A).

• float HorizontalLoadCapacity
Horizontal load capacity (kg).

• float VerticalLoadCapacity
Vertical load capacity (kg).

Generated on Fri Nov 29 2013 01:25:06 for libximc by Doxygen

50

4.44 stage settings t Struct Reference

4.44.1 Detailed Description
Stage settings.

See Also
set stage settings
get stage settings
get stage settings, set stage settings

4.44.2 Field Documentation
4.44.2.1

float HorizontalLoadCapacity

Horizontal load capacity (kg).
Data type: float.

4.44.2.2

float LeadScrewPitch

Lead screw pitch (mm).
Data type: float.

4.44.2.3

float MaxCurrentConsumption

Max current consumption (A).
Data type: float.

4.44.2.4

float MaxSpeed

Max speed (Units/c).
Data type: float.

4.44.2.5

float SupplyVoltageMax

Supply voltage maximum (V).
Data type: float.

4.44.2.6

float SupplyVoltageMin

Supply voltage minimum (V).
Data type: float.

4.44.2.7

float TravelRange

Travel range (Units).
Data type: float.

Generated on Fri Nov 29 2013 01:25:06 for libximc by Doxygen

51

4.45 status calb t Struct Reference

4.44.2.8

char Units[9]

Units for MaxSpeed and TravelRange fields of the structure (steps, degrees, mm, ...).
Max string length: 8 chars.

4.44.2.9

float VerticalLoadCapacity

Vertical load capacity (kg).
Data type: float.

4.45 status calb t Struct Reference
Data Fields
• unsigned int MoveSts
Flags of move state.

• unsigned int MvCmdSts
Move command state.

• unsigned int PWRSts
Flags of power state of stepper motor.

• unsigned int EncSts
Encoder state.

• unsigned int WindSts
Winding state.

• float CurPosition
Current position.

• long t EncPosition
Current encoder position.

• float CurSpeed
Motor shaft speed.

• int Ipwr
Engine current.

• int Upwr
Power supply voltage.

• int Iusb
USB current consumption.

• int Uusb
USB voltage.

• int CurT
Temperature in tenths of degrees C.

• unsigned int Flags
Status flags.

• unsigned int GPIOFlags
Status flags.

• unsigned int CmdBufFreeSpace
This field shows the amount of free cells buffer synchronization chain.

Generated on Fri Nov 29 2013 01:25:06 for libximc by Doxygen

52

4.45 status calb t Struct Reference

4.45.1 Field Documentation
4.45.1.1

unsigned int CmdBufFreeSpace

This field shows the amount of free cells buffer synchronization chain.

4.45.1.2

float CurPosition

Current position.

4.45.1.3

float CurSpeed

Motor shaft speed.

4.45.1.4

int CurT

Temperature in tenths of degrees C.

4.45.1.5

long t EncPosition

Current encoder position.

4.45.1.6

unsigned int EncSts

Encoder state.

4.45.1.7

unsigned int Flags

Status flags.

4.45.1.8

unsigned int GPIOFlags

Status flags.

4.45.1.9

int Ipwr

Engine current.

4.45.1.10

int Iusb

USB current consumption.

4.45.1.11

unsigned int MoveSts

Flags of move state.

4.45.1.12

unsigned int MvCmdSts

Move command state.

Generated on Fri Nov 29 2013 01:25:06 for libximc by Doxygen

53

4.46 status t Struct Reference

4.45.1.13

unsigned int PWRSts

Flags of power state of stepper motor.

4.45.1.14

int Upwr

Power supply voltage.

4.45.1.15

int Uusb

USB voltage.

4.45.1.16

unsigned int WindSts

Winding state.

4.46 status t Struct Reference
Device state.

Data Fields
• unsigned int MoveSts
Flags of move state.

• unsigned int MvCmdSts
Move command state.

• unsigned int PWRSts
Flags of power state of stepper motor.

• unsigned int EncSts
Encoder state.

• unsigned int WindSts
Winding state.

• int CurPosition
Current position.

• int uCurPosition
Step motor shaft position in 1/256 microsteps.

• long t EncPosition
Current encoder position.

• int CurSpeed
Motor shaft speed.

• int uCurSpeed
Part of motor shaft speed in 1/256 microsteps.

• int Ipwr
Engine current.

• int Upwr
Power supply voltage.

• int Iusb
USB current consumption.

• int Uusb

Generated on Fri Nov 29 2013 01:25:06 for libximc by Doxygen

54

4.46 status t Struct Reference

USB voltage.

• int CurT
Temperature in tenths of degrees C.

• unsigned int Flags
Status flags.

• unsigned int GPIOFlags
Status flags.

• unsigned int CmdBufFreeSpace
This field shows the amount of free cells buffer synchronization chain.

4.46.1 Detailed Description
Device state.
Useful structure that contains current controller state, including speed, position and boolean flags.

See Also
get status impl

4.46.2 Field Documentation
4.46.2.1

unsigned int CmdBufFreeSpace

This field shows the amount of free cells buffer synchronization chain.

4.46.2.2

int CurPosition

Current position.

4.46.2.3

int CurSpeed

Motor shaft speed.

4.46.2.4

int CurT

Temperature in tenths of degrees C.

4.46.2.5

long t EncPosition

Current encoder position.

4.46.2.6

unsigned int EncSts

Encoder state.

4.46.2.7

unsigned int Flags

Status flags.

Generated on Fri Nov 29 2013 01:25:06 for libximc by Doxygen

55

4.46 status t Struct Reference

4.46.2.8

unsigned int GPIOFlags

Status flags.

4.46.2.9

int Ipwr

Engine current.

4.46.2.10

int Iusb

USB current consumption.

4.46.2.11

unsigned int MoveSts

Flags of move state.

4.46.2.12

unsigned int MvCmdSts

Move command state.

4.46.2.13

unsigned int PWRSts

Flags of power state of stepper motor.

4.46.2.14

int uCurPosition

Step motor shaft position in 1/256 microsteps.
Used only with stepper motor.

4.46.2.15

int uCurSpeed

Part of motor shaft speed in 1/256 microsteps.
Used only with stepper motor.

4.46.2.16

int Upwr

Power supply voltage.

4.46.2.17

int Uusb

USB voltage.

4.46.2.18

unsigned int WindSts

Winding state.

Generated on Fri Nov 29 2013 01:25:06 for libximc by Doxygen

56

4.47 sync in settings calb t Struct Reference

4.47 sync in settings calb t Struct Reference
Data Fields
• unsigned int SyncInFlags
Flags for synchronization input setup.

• unsigned int ClutterTime
Input synchronization pulse dead time (mks).

• float Position
Desired position or shift.

• float Speed
Target speed.

4.47.1 Field Documentation
4.47.1.1

unsigned int ClutterTime

Input synchronization pulse dead time (mks).
Range: 0..65535

4.47.1.2

float Position

Desired position or shift.

4.47.1.3

float Speed

Target speed.

4.47.1.4

unsigned int SyncInFlags

Flags for synchronization input setup.

4.48 sync in settings t Struct Reference
Synchronization settings.

Data Fields
• unsigned int SyncInFlags
Flags for synchronization input setup.

• unsigned int ClutterTime
Input synchronization pulse dead time (mks).

• int Position
Desired position or shift (whole steps)

• int uPosition
The fractional part of a position or shift in microsteps (-255 .

• unsigned int Speed
Target speed(for stepper motor: steps / c, for DC: rpm).

• unsigned int uSpeed
Target speed in microsteps/s.

Generated on Fri Nov 29 2013 01:25:06 for libximc by Doxygen

57

4.49 sync out settings calb t Struct Reference

58

4.48.1 Detailed Description
Synchronization settings.
This structure contains all synchronization settings, modes, periods and flags. It specifes behaviour of input synchronization. All boards are supplied with standart set of these settings.

See Also
get sync in settings
set sync in settings
get sync in settings, set sync in settings

4.48.2 Field Documentation
4.48.2.1

unsigned int ClutterTime

Input synchronization pulse dead time (mks).
Range: 0..65535

4.48.2.2

unsigned int Speed

Target speed(for stepper motor: steps / c, for DC: rpm).
Range: 0..1000000.

4.48.2.3

unsigned int SyncInFlags

Flags for synchronization input setup.

4.48.2.4

int uPosition

The fractional part of a position or shift in microsteps (-255 .
. 255)(is only used with stepper motor)

4.48.2.5

unsigned int uSpeed

Target speed in microsteps/s.
Using with stepper motor only. Range: 0..255.

4.49 sync out settings calb t Struct Reference
Data Fields
• unsigned int SyncOutFlags
Flags of synchronization output.

• unsigned int SyncOutPulseSteps
This value specifies duration of output pulse.

• unsigned int SyncOutPeriod
This value specifies number of encoder pulses or steps between two output synchronization pulses when SYNCOUT ONPERIOD is set.

Generated on Fri Nov 29 2013 01:25:06 for libximc by Doxygen

4.50 sync out settings t Struct Reference

59

• float Accuracy
This is the neighborhood around the target coordinates, which is getting hit in the target position and the momentum
generated by the stop.

4.49.1 Field Documentation
4.49.1.1

float Accuracy

This is the neighborhood around the target coordinates, which is getting hit in the target position and the momentum
generated by the stop.

4.49.1.2

unsigned int SyncOutFlags

Flags of synchronization output.

4.49.1.3

unsigned int SyncOutPeriod

This value specifies number of encoder pulses or steps between two output synchronization pulses when SYNCOUT ONPERIOD is set.
Range: 0..65535

4.49.1.4

unsigned int SyncOutPulseSteps

This value specifies duration of output pulse.
It is measured microseconds when SYNCOUT IN STEPS flag is cleared or in encoder pulses or motor steps when
SYNCOUT IN STEPS is set. Range: 0..65535

4.50 sync out settings t Struct Reference
Synchronization settings.

Data Fields
• unsigned int SyncOutFlags
Flags of synchronization output.

• unsigned int SyncOutPulseSteps
This value specifies duration of output pulse.

• unsigned int SyncOutPeriod
This value specifies number of encoder pulses or steps between two output synchronization pulses when SYNCOUT ONPERIOD is set.

• unsigned int Accuracy
This is the neighborhood around the target coordinates, which is getting hit in the target position and the momentum
generated by the stop.

• unsigned int uAccuracy
This is the neighborhood around the target coordinates in micro steps (only used with stepper motor).

Generated on Fri Nov 29 2013 01:25:06 for libximc by Doxygen

4.51 uart settings t Struct Reference

60

4.50.1 Detailed Description
Synchronization settings.
This structure contains all synchronization settings, modes, periods and flags. It specifes behaviour of output
synchronization. All boards are supplied with standart set of these settings.

See Also
get sync out settings
set sync out settings
get sync out settings, set sync out settings

4.50.2 Field Documentation
4.50.2.1

unsigned int Accuracy

This is the neighborhood around the target coordinates, which is getting hit in the target position and the momentum
generated by the stop.
Range: 0..4294967295.

4.50.2.2

unsigned int SyncOutFlags

Flags of synchronization output.

4.50.2.3

unsigned int SyncOutPeriod

This value specifies number of encoder pulses or steps between two output synchronization pulses when SYNCOUT ONPERIOD is set.
Range: 0..65535

4.50.2.4

unsigned int SyncOutPulseSteps

This value specifies duration of output pulse.
It is measured microseconds when SYNCOUT IN STEPS flag is cleared or in encoder pulses or motor steps when
SYNCOUT IN STEPS is set. Range: 0..65535

4.50.2.5

unsigned int uAccuracy

This is the neighborhood around the target coordinates in micro steps (only used with stepper motor).
Range: 0 .. 255.

4.51 uart settings t Struct Reference
UART settings.

Data Fields
• unsigned int Speed
UART speed.

Generated on Fri Nov 29 2013 01:25:06 for libximc by Doxygen

4.51 uart settings t Struct Reference

• unsigned int UARTSetupFlags
UART parity flags.

4.51.1 Detailed Description
UART settings.
This structure contains UART settings.

See Also
get uart settings
set uart settings
get uart settings, set uart settings

4.51.2 Field Documentation
4.51.2.1

unsigned int UARTSetupFlags

UART parity flags.

Generated on Fri Nov 29 2013 01:25:06 for libximc by Doxygen

61

Chapter 5

File Documentation
5.1 ximc.h File Reference
Header file for libximc library.

Data Structures
• struct calibration t
Calibration companion structure.

• struct feedback settings t
Feedback settings.

• struct home settings t
Position calibration settings.

• struct home settings calb t
• struct move settings t
Move settings.

• struct move settings calb t
• struct engine settings t
Engine settings.

• struct engine settings calb t
• struct entype settings t
Engine type and driver type settings.

• struct power settings t
Step motor power settings.

• struct secure settings t
This structure contains raw analog data from ADC embedded on board.

• struct edges settings t
Edges settings.

• struct edges settings calb t
• struct pid settings t
PID settings.

• struct sync in settings t
Synchronization settings.

• struct sync in settings calb t
• struct sync out settings t
Synchronization settings.

• struct sync out settings calb t

5.1 ximc.h File Reference

• struct extio settings t
EXTIO settings.

• struct brake settings t
Brake settings.

• struct control settings t
Control settings.

• struct control settings calb t
• struct joystick settings t
Joystick settings.

• struct ctp settings t
Control position settings(is only used with stepper motor).

• struct uart settings t
UART settings.

• struct controller name t
Controller user name and flags of setting.

• struct add sync in action t
This command adds one element of the FIFO commands.

• struct add sync in action calb t
• struct get position t
Position information.

• struct get position calb t
• struct set position t
Position information.

• struct set position calb t
• struct status t
Device state.

• struct status calb t
• struct chart data t
Additional device state.

• struct device information t
Read command controller information.

• struct serial number t
Serial number structure.

• struct analog data t
Analog data.

• struct debug read t
Debug data.

• struct stage name t
Stage user name.

• struct stage information t
Stage information.

• struct stage settings t
Stage settings.

• struct motor information t
motor information.

• struct motor settings t
motor settings.

• struct encoder information t
Encoder information.

• struct encoder settings t
Encoder settings.

Generated on Fri Nov 29 2013 01:25:06 for libximc by Doxygen

63

5.1 ximc.h File Reference

• struct hallsensor information t
Hall sensor information.

• struct hallsensor settings t
Hall sensor settings.

• struct gear information t
Gear information.

• struct gear settings t
Gear setings.

• struct accessories settings t
Additional accessories information.

Macros
• #define XIMC API
Library import macro Macros allows to automatically import function from shared library.

• #define XIMC CALLCONV
Library calling convention macros.

• #define device undefined -1
Handle specified undefined device.

Result statuses
• #define result ok 0
success

• #define result error -1
generic error

• #define result not implemented -2
function is not implemented

• #define result value error -3
value error

• #define result nodevice -4
device is lost

Logging level
• #define LOGLEVEL ERROR 0x01
Logging level - error.

• #define LOGLEVEL WARNING 0x02
Logging level - warning.

• #define LOGLEVEL INFO 0x03
Logging level - info.

• #define LOGLEVEL DEBUG 0x04
Logging level - debug.

Enumerate devices flags
• #define ENUMERATE PROBE 0x01
Check if a device with OS name name is XIMC device.

• #define ENUMERATE ALL COM 0x02
Check all COM devices.

Flags of move state
Specify move states.
Generated on Fri Nov 29 2013 01:25:06 for libximc by Doxygen

64

5.1 ximc.h File Reference

65

See Also
get status
status t::move state
status t::MoveSts, get status impl
• #define MOVE STATE MOVING 0x01
This flag indicates that controller is trying to move the motor.

• #define MOVE STATE TARGET SPEED 0x02
Target speed is reached, if flag set.

• #define MOVE STATE ANTIPLAY 0x04
Motor is playing compensation, if flag set.

Flags of internal controller settings

See Also
set controller name
get controller name
controller name t::CtrlFlags, get controller name, set controller name
• #define EEPROM PRECEDENCE 0x01
If the flag is set settings from external EEPROM override controller settings.

Flags of power state of stepper motor
Specify power states.

See Also
status t::power state
get status
status t::PWRSts, get status impl
• #define PWR STATE UNKNOWN 0x00
Unknown state, should never happen.

• #define PWR STATE OFF 0x01
Motor windings are disconnected from the driver.

• #define PWR STATE NORM 0x03
Motor windings are powered by nominal current.

• #define PWR STATE REDUCT 0x04
Motor windings are powered by reduced current to lower power consumption.

• #define PWR STATE MAX 0x05
Motor windings are powered by maximum current driver can provide at this voltage.

Status flags
GPIO state flags returned by device query. Contains boolean part of controller state. May be combined with
bitwise OR.

See Also
status t::flags
get status
status t::GPIOFlags, get status impl
• #define STATE CONTR 0x0003F
Flags of controller states.

• #define STATE ERRC 0x00001
Command error encountered.

• #define STATE ERRD 0x00002
Data integrity error encountered.

• #define STATE ERRV 0x00004
Generated on Fri Nov 29 2013 01:25:06 for libximc by Doxygen

5.1 ximc.h File Reference

Value error encountered.

• #define STATE EEPROM CONNECTED 0x00010
EEPROM with settings is connected.

• #define STATE SECUR 0x3FFC0
Flags of security.

• #define STATE ALARM 0x00040
Controller is in alarm state indicating that something dangerous had happened.

• #define STATE CTP ERROR 0x00080
Control position error(is only used with stepper motor).

• #define STATE POWER OVERHEAT 0x00100
Power driver overheat.

• #define STATE CONTROLLER OVERHEAT 0x00200
Controller overheat.

• #define STATE OVERLOAD POWER VOLTAGE 0x00400
Power voltage exceeds safe limit.

• #define STATE OVERLOAD POWER CURRENT 0x00800
Power current exceeds safe limit.

• #define STATE OVERLOAD USB VOLTAGE 0x01000
USB voltage exceeds safe limit.

• #define STATE LOW USB VOLTAGE 0x02000
USB voltage is insufficient for normal operation.

• #define STATE OVERLOAD USB CURRENT 0x04000
USB current exceeds safe limit.

• #define STATE BORDERS SWAP MISSET 0x08000
Engine stuck at the wrong edge.

• #define STATE LOW POWER VOLTAGE 0x10000
Power voltage is lower than Low Voltage Protection limit.

• #define STATE H BRIDGE FAULT 0x20000
Signal from the driver that fault happened.

• #define STATE DIG SIGNAL 0xFFFF
Flags of digital signals.

• #define STATE RIGHT EDGE 0x0001
Engine stuck at the right edge.

• #define STATE LEFT EDGE 0x0002
Engine stuck at the left edge.

• #define STATE BUTTON RIGHT 0x0004
Button ”right” state (1 if pressed).

• #define STATE BUTTON LEFT 0x0008
Button ”left” state (1 if pressed).

• #define STATE GPIO PINOUT 0x0010
External GPIO works as Out, if flag set; otherwise works as In.

• #define STATE GPIO LEVEL 0x0020
State of external GPIO pin.

• #define STATE HALL A 0x0040
State of Hall a pin.

• #define STATE HALL B 0x0080
State of Hall b pin.

• #define STATE HALL C 0x0100
State of Hall c pin.

• #define STATE BRAKE 0x0200
State of Brake pin.

• #define STATE REV SENSOR 0x0400
State of Revolution sensor pin.

• #define STATE SYNC INPUT 0x0800
State of Sync input pin.

• #define STATE SYNC OUTPUT 0x1000
State of Sync output pin.

• #define STATE ENC A 0x2000
State of encoder A pin.

Generated on Fri Nov 29 2013 01:25:06 for libximc by Doxygen

66

5.1 ximc.h File Reference

67

• #define STATE ENC B 0x4000
State of encoder B pin.

Encoder state
Encoder state returned by device query.

See Also
status t::encsts
get status
status t::EncSts, get status impl
• #define ENC STATE ABSENT 0x00
Encoder is absent.

• #define ENC STATE UNKNOWN 0x01
Encoder state is unknown.

• #define ENC STATE MALFUNC 0x02
Encoder is connected and malfunctioning.

• #define ENC STATE REVERS 0x03
Encoder is connected and operational but counts in otyher direction.

• #define ENC STATE OK 0x04
Encoder is connected and working properly.

Winding state
Motor winding state returned by device query.

See Also
status t::windsts
get status
status t::WindSts, get status impl
• #define WIND A STATE ABSENT 0x00
Winding A is disconnected.

• #define WIND A STATE UNKNOWN 0x01
Winding A state is unknown.

• #define WIND A STATE MALFUNC 0x02
Winding A is short-circuited.

• #define WIND A STATE OK 0x03
Winding A is connected and working properly.

• #define WIND B STATE ABSENT 0x00
Winding B is disconnected.

• #define WIND B STATE UNKNOWN 0x10
Winding B state is unknown.

• #define WIND B STATE MALFUNC 0x20
Winding B is short-circuited.

• #define WIND B STATE OK 0x30
Winding B is connected and working properly.

Move command state
Move command (command move, command movr, command left, command right, command stop, command home, command loft, command sstp) and its state (run, finished, error).

Generated on Fri Nov 29 2013 01:25:06 for libximc by Doxygen

5.1 ximc.h File Reference

68

See Also
status t::mvcmdsts
get status
status t::MvCmdSts, get status impl
• #define MVCMD NAME BITS 0x3F
Move command bit mask.

• #define MVCMD UKNWN 0x00
Unknown command.

• #define MVCMD MOVE 0x01
Command move.

• #define MVCMD MOVR 0x02
Command movr.

• #define MVCMD LEFT 0x03
Command left.

• #define MVCMD RIGHT 0x04
Command rigt.

• #define MVCMD STOP 0x05
Command stop.

• #define MVCMD HOME 0x06
Command home.

• #define MVCMD LOFT 0x07
Command loft.

• #define MVCMD SSTP 0x08
Command soft stop.

• #define MVCMD ERROR 0x40
Finish state (1 - move command have finished with an error, 0 - move command have finished correctly).

• #define MVCMD RUNNING 0x80
Move command state (0 - move command have finished, 1 - move command is being executed).

Flags of engine settings
Specify motor shaft movement algorithm and list of limitations. Flags returned by query of engine settings. May
be combined with bitwise OR.

See Also
engine settings t::flags
set engine settings
get engine settings
engine settings t::EngineFlags, get engine settings, set engine settings
• #define ENGINE REVERSE 0x01
Reverse flag.

• #define ENGINE MAX SPEED 0x04
Max speed flag.

• #define ENGINE ANTIPLAY 0x08
Play compensation flag.

• #define ENGINE ACCEL ON 0x10
Acceleration enable flag.

• #define ENGINE LIMIT VOLT 0x20
Maxumum motor voltage limit enable flag(is only used with DC motor).

• #define ENGINE LIMIT CURR 0x40
Maxumum motor current limit enable flag(is only used with DC motor).

• #define ENGINE LIMIT RPM 0x80
Maxumum motor speed limit enable flag.

Flags of microstep mode
Specify settings of microstep mode. Using with step motors. Flags returned by query of engine settings. May
be combined with bitwise OR
Generated on Fri Nov 29 2013 01:25:06 for libximc by Doxygen

5.1 ximc.h File Reference

See Also
engine settings t::flags
set engine settings
get engine settings
engine settings t::MicrostepMode, get engine settings, set engine settings
• #define MICROSTEP MODE FULL 0x01
Full step mode.

• #define MICROSTEP MODE FRAC 2 0x02
1/2 step mode.

• #define MICROSTEP MODE FRAC 4 0x03
1/4 step mode.

• #define MICROSTEP MODE FRAC 8 0x04
1/8 step mode.

• #define MICROSTEP MODE FRAC 16 0x05
1/16 step mode.

• #define MICROSTEP MODE FRAC 32 0x06
1/32 step mode.

• #define MICROSTEP MODE FRAC 64 0x07
1/64 step mode.

• #define MICROSTEP MODE FRAC 128 0x08
1/128 step mode.

• #define MICROSTEP MODE FRAC 256 0x09
1/256 step mode.

Flags of engine type
Specify motor type. Flags returned by query of engine settings.

See Also
engine settings t::flags
set entype settings
get entype settings
entype settings t::EngineType, get entype settings, set entype settings
• #define ENGINE TYPE NONE 0x00
A value that shouldn’t be used.

• #define ENGINE TYPE DC 0x01
DC motor.

• #define ENGINE TYPE 2DC 0x02
2 DC motors.

• #define ENGINE TYPE STEP 0x03
Step motor.

• #define ENGINE TYPE TEST 0x04
Duty cycle are fixed.

• #define ENGINE TYPE BRUSHLESS 0x05
Brushless motor.

Flags of driver type
Specify driver type. Flags returned by query of engine settings.

See Also
engine settings t::flags
set entype settings
get entype settings
entype settings t::DriverType, get entype settings, set entype settings
• #define DRIVER TYPE DISCRETE FET 0x01
Generated on Fri Nov 29 2013 01:25:06 for libximc by Doxygen

69

5.1 ximc.h File Reference

Driver with discrete FET keys.

• #define DRIVER TYPE INTEGRATE 0x02
Driver with integrated IC.

• #define DRIVER TYPE EXTERNAL 0x03
External driver.

Flags of power settings of stepper motor
Specify power settings. Flags returned by query of power settings.

See Also
power settings t::flags
get power settings
set power settings
power settings t::PowerFlags, get power settings, set power settings
• #define POWER REDUCT ENABLED 0x01
Current reduction enabled after CurrReductDelay, if this flag is set.

• #define POWER OFF ENABLED 0x02
Power off enabled after PowerOffDelay, if this flag is set.

• #define POWER SMOOTH CURRENT 0x04
Current ramp-up/down is performed smoothly during current set time, if this flag is set.

Flags of secure settings
Specify secure settings. Flags returned by query of secure settings.

See Also
secure settings t::flags
get secure settings
set secure settings
secure settings t::Flags, get secure settings, set secure settings
• #define ALARM ON DRIVER OVERHEATING 0x01
If this flag is set enter Alarm state on driver overheat signal.

• #define LOW UPWR PROTECTION 0x02
If this flag is set turn off motor when voltage is lower than LowUpwrOff.

• #define H BRIDGE ALERT 0x04
If this flag is set then turn off the power unit with a signal problem in one of the transistor bridge.

• #define ALARM ON BORDERS SWAP MISSET 0x08
If this flag is set enter Alarm state on borders swap misset.

• #define ALARM FLAGS STICKING 0x10
If this flag is set only a STOP command can turn all alarms to 0.

• #define USB BREAK RECONNECT 0x20
If this flag is set USB brake reconnect module will be enable.

Position setting flags
Flags used in setting of position.

See Also
get position
set position
set position t::PosFlags, set position
• #define SETPOS IGNORE POSITION 0x01
Will not reload position in steps/microsteps if this flag is set.

• #define SETPOS IGNORE ENCODER 0x02
Will not reload encoder state if this flag is set.

Feedback type.
Generated on Fri Nov 29 2013 01:25:06 for libximc by Doxygen

70

5.1 ximc.h File Reference

71

See Also
set feedback settings
get feedback settings
feedback settings t::FeedbackType, get feedback settings, set feedback settings
• #define FEEDBACK ENCODER 0x01
Feedback by encoder.

• #define FEEDBACK ENCODERHALL 0x03
Feedback by Hall detector.

• #define FEEDBACK EMF 0x04
Feedback by EMF.

• #define FEEDBACK NONE 0x05
Feedback is absent.

Describes feedback flags.

See Also
set feedback settings
get feedback settings
feedback settings t::FeedbackFlags, get feedback settings, set feedback settings
• #define FEEDBACK ENC REVERSE 0x01
Reverse count of encoder.

• #define FEEDBACK HALL REVERSE 0x02
Reverce count position on the Hall sensor.

Flags for synchronization input setup

See Also
sync settings t::syncin flags
get sync settings
set sync settings
sync in settings t::SyncInFlags, get sync in settings, set sync in settings
• #define SYNCIN ENABLED 0x01
Synchronization in mode is enabled, if this flag is set.

• #define SYNCIN INVERT 0x02
Trigger on falling edge if flag is set, on rising edge otherwise.

• #define SYNCIN GOTOPOSITION 0x04
The engine is go to position specified in Position and uPosition, if this flag is set.

Flags of synchronization output

See Also
sync settings t::syncout flags
get sync settings
set sync settings
sync out settings t::SyncOutFlags, get sync out settings, set sync out settings
• #define SYNCOUT ENABLED 0x01
Synchronization out pin follows the synchronization logic, if set.

• #define SYNCOUT STATE 0x02
When output state is fixed by negative SYNCOUT ENABLED flag, the pin state is in accordance with this flag
state.

• #define SYNCOUT INVERT 0x04
Low level is active, if set, and high level is active otherwise.

• #define SYNCOUT IN STEPS 0x08
Use motor steps/encoder pulses instead of milliseconds for output pulse generation if the flag is set.

Generated on Fri Nov 29 2013 01:25:06 for libximc by Doxygen

5.1 ximc.h File Reference

• #define SYNCOUT ONSTART 0x10
Generate synchronization pulse when movement starts.

• #define SYNCOUT ONSTOP 0x20
Generate synchronization pulse when movement stops.

• #define SYNCOUT ONPERIOD 0x40
Generate synchronization pulse every SyncOutPeriod encoder pulses.

External IO setup flags

See Also
extio settings t::setup flags
get extio settings
set extio settings
extio settings t::EXTIOSetupFlags, get extio settings, set extio settings
• #define EXTIO SETUP OUTPUT 0x01
EXTIO works as output if flag is set, works as input otherwise.

• #define EXTIO SETUP INVERT 0x02
Interpret EXTIO states and fronts inverted if flag is set.

External IO mode flags

See Also
extio settings t::extio mode flags
get extio settings
set extio settings
extio settings t::EXTIOModeFlags, get extio settings, set extio settings
• #define EXTIO SETUP MODE IN NOP 0x00
Do nothing.

• #define EXTIO SETUP MODE IN STOP 0x01
Issue STOP command, ceasing the engine movement.

• #define EXTIO SETUP MODE IN PWOF 0x02
Issue PWOF command, powering off all engine windings.

• #define EXTIO SETUP MODE IN MOVR 0x03
Issue MOVR command with last used settings.

• #define EXTIO SETUP MODE IN HOME 0x04
Issue HOME command.

• #define EXTIO SETUP MODE OUT OFF 0x00
EXTIO pin always set in inactive state.

• #define EXTIO SETUP MODE OUT ON 0x10
EXTIO pin always set in active state.

• #define EXTIO SETUP MODE OUT MOVING 0x20
EXTIO pin stays active during moving state.

• #define EXTIO SETUP MODE OUT ALARM 0x30
EXTIO pin stays active during Alarm state.

• #define EXTIO SETUP MODE OUT MOTOR ON 0x40
EXTIO pin stays active when windings are powered.

• #define EXTIO SETUP MODE OUT MOTOR FOUND 0x50
EXTIO pin stays active when motor is connected (first winding).

Border flags
Specify types of borders and motor behaviour on borders. May be combined with bitwise OR.

Generated on Fri Nov 29 2013 01:25:06 for libximc by Doxygen

72

5.1 ximc.h File Reference

73

See Also
get edges settings
set edges settings
edges settings t::BorderFlags, get edges settings, set edges settings
• #define BORDER IS ENCODER 0x01
Borders are fixed by predetermined encoder values, if set; borders position on limit switches, if not set.

• #define BORDER STOP LEFT 0x02
Motor should stop on left border.

• #define BORDER STOP RIGHT 0x04
Motor should stop on right border.

• #define BORDERS SWAP MISSET DETECTION 0x08
Motor should stop on both borders.

Limit switches flags
Specify electrical behaviour of limit switches like order and pulled positions. May be combined with bitwise OR.

See Also
get edges settings
set edges settings
edges settings t::EnderFlags, get edges settings, set edges settings
• #define ENDER SWAP 0x01
First limit switch on the right side, if set; otherwise on the left side.

• #define ENDER SW1 ACTIVE LOW 0x02
1 - Limit switch connnected to pin SW1 is triggered by a low level on pin.

• #define ENDER SW2 ACTIVE LOW 0x04
1 - Limit switch connnected to pin SW2 is triggered by a low level on pin.

Brake settings flags
Specify behaviour of brake. May be combined with bitwise OR.

See Also
get brake settings
set brake settings
brake settings t::BrakeFlags, get brake settings, set brake settings
• #define BRAKE ENABLED 0x01
Brake control is enabled, if this flag is set.

• #define BRAKE ENG PWROFF 0x02
Brake turns off power of step motor, if this flag is set.

Control flags
Specify motor control settings by joystick or buttons. May be combined with bitwise OR.

See Also
get control settings
set control settings
control settings t::Flags, get control settings, set control settings
• #define CONTROL MODE BITS 0x03
Bits to control engine by joystick or buttons.

• #define CONTROL MODE OFF 0x00
Control is disabled.

• #define CONTROL MODE JOY 0x01
Control by joystick.

• #define CONTROL MODE LR 0x02
Generated on Fri Nov 29 2013 01:25:06 for libximc by Doxygen

5.1 ximc.h File Reference

Control by left/right buttons.

• #define CONTROL BTN LEFT PUSHED OPEN 0x04
Pushed left button corresponds to open contact, if this flag is set.

• #define CONTROL BTN RIGHT PUSHED OPEN 0x08
Pushed right button corresponds to open contact, if this flag is set.

Joystick flags
Control joystick states.

See Also
set joystick settings
get joystick settings
joystick settings t::JoyFlags, get joystick settings, set joystick settings
• #define JOY REVERSE 0x01
Joystick action is reversed.

Position control flags
Specify settings of position control. May be combined with bitwise OR.

See Also
get ctp settings
set ctp settings
ctp settings t::CTPFlags, get ctp settings, set ctp settings
• #define CTP ENABLED 0x01
Position control is enabled, if flag set.

• #define CTP BASE 0x02
Position control is based on revolution sensor, if this flag is set; otherwise it is based on encoder.

• #define CTP ALARM ON ERROR 0x04
Set ALARM on mismatch, if flag set.

• #define REV SENS INV 0x08
Sensor is active when it 0 and invert makes active level 1.

Home settings flags
Specify behaviour for home command. May be combined with bitwise OR.

See Also
get home setting s
set home settings
command home
home settings t::HomeFlags, get home settings, set home settings
• #define HOME DIR FIRST 0x01
Flag defines direction of 1st motion after execution of home command.

• #define HOME DIR SECOND 0x02
Flag defines direction of 2nd motion.

• #define HOME MV SEC EN 0x04
Use the second phase of calibration to the home position, if set; otherwise the second phase is skipped.

• #define HOME HALF MV 0x08
If the flag is set, the stop signals are ignored in start of second movement the first half-turn.

• #define HOME STOP FIRST BITS 0x30
Bits of the first stop selector.

• #define HOME STOP FIRST REV 0x10
First motion stops by revolution sensor.

• #define HOME STOP FIRST SYN 0x20
First motion stops by synchronization input.

Generated on Fri Nov 29 2013 01:25:06 for libximc by Doxygen

74

5.1 ximc.h File Reference

• #define HOME STOP FIRST LIM 0x30
First motion stops by limit switch.

• #define HOME STOP SECOND BITS 0xC0
Bits of the second stop selector.

• #define HOME STOP SECOND REV 0x40
Second motion stops by revolution sensor.

• #define HOME STOP SECOND SYN 0x80
Second motion stops by synchronization input.

• #define HOME STOP SECOND LIM 0xC0
Second motion stops by limit switch.

UART parity flags

See Also
uart settings t::UARTSetupFlags, get uart settings, set uart settings
• #define UART PARITY BITS 0x03
Bits of the parity.

• #define UART PARITY BIT EVEN 0x00
Parity bit 1, if even.

• #define UART PARITY BIT ODD 0x01
Parity bit 1, if odd.

• #define UART PARITY BIT SPACE 0x02
Parity bit always 0.

• #define UART PARITY BIT MARK 0x03
Parity bit always 1.

• #define UART PARITY BIT USE 0x04
None parity.

• #define UART STOP BIT 0x08
If set - one stop bit, else two stop bit.

Motor Type flags

See Also
motor settings t::MotorType, get motor settings, set motor settings
• #define MOTOR TYPE STEP 0x01
Step engine.

• #define MOTOR TYPE DC 0x02
DC engine.

• #define MOTOR TYPE BLDC 0x03
BLDC engine.

Encoder settings flags

See Also
encoder settings t::EncoderSettings, get encoder settings, set encoder settings
• #define ENCSET DIFFERENTIAL OUTPUT 0x001
If flag is set the encoder has differential output, else single ended output.

• #define ENCSET PUSHPULL OUTPUT 0x004
If flag is set the encoder has push-pull output, else open drain output.

• #define ENCSET INDEXCHANNEL PRESENT 0x010
If flag is set the encoder has index channel, else encoder hasn‘t it.

• #define ENCSET REVOLUTIONSENSOR PRESENT 0x040
If flag is set the encoder has revolution sensor, else encoder hasn‘t it.

• #define ENCSET REVOLUTIONSENSOR ACTIVE HIGH 0x100
If flag is set the revolution sensor active state is high logic state, else active state is low logic state.

Magnetic brake settings flags
Generated on Fri Nov 29 2013 01:25:06 for libximc by Doxygen

75

5.1 ximc.h File Reference

See Also
accessories settings t::MBSettings, get accessories settings, set accessories settings
• #define MB AVAILABLE 0x01
If flag is set the magnetic brake is available.

• #define MB POWERED HOLD 0x02
If this flag is set the magnetic brake is on when powered.

Temperature sensor settings flags

See Also
accessories settings t::LimitSwitchesSettings, get accessories settings, set accessories settings
• #define TS TYPE BITS 0x07
Bits of the temperature sensor type.

• #define TS TYPE THERMOCOUPLE 0x01
Thermocouple.

• #define TS TYPE SEMICONDUCTOR 0x02
The semiconductor temperature sensor.

• #define TS AVAILABLE 0x08
If flag is set the temperature sensor is available.

• #define LS ON SW1 AVAILABLE 0x01
If flag is set the limit switch connnected to pin SW1 is available.

• #define LS ON SW2 AVAILABLE 0x02
If flag is set the limit switch connnected to pin SW2 is available.

• #define LS SW1 ACTIVE LOW 0x04
If flag is set the limit switch connnected to pin SW1 is triggered by a low level on pin.

• #define LS SW2 ACTIVE LOW 0x08
If flag is set the limit switch connnected to pin SW2 is triggered by a low level on pin.

• #define LS SHORTED 0x10
If flag is set the Limit switches is shorted.

Typedefs
• typedef unsigned long long ulong t
• typedef long long long t
• typedef int device t
Type describes device identifier.

• typedef int result t
Type specifies result of any operation.

• typedef uint32 t device enumeration t
Type describes device enumeration structure.

• typedef struct calibration t calibration t
Calibration companion structure.

Functions
Controller settings setup
Functions for adjusting engine read/write almost all controller settings.
• result t XIMC API set feedback settings (device t id, const feedback settings t ∗feedback settings)
Set feedback settings.

• result t XIMC API get feedback settings (device t id, feedback settings t ∗feedback settings)
Read feedback settings.

Generated on Fri Nov 29 2013 01:25:06 for libximc by Doxygen

76

5.1 ximc.h File Reference

77

• result t XIMC API set home settings (device t id, const home settings t ∗home settings)
Set 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)
• result t XIMC API get home settings (device t id, home settings t ∗home settings)
Read home settings.

• result t XIMC API get home settings calb (device t id, home settings calb t ∗home settings calb, const
calibration t ∗calibration)
• result t XIMC API set move settings (device t id, const move settings t ∗move settings)
Set command setup movement (speed, acceleration, threshold and etc).

• result t XIMC API set move settings calb (device t id, const move settings calb t ∗move settings calb,
const calibration t ∗calibration)
• result t XIMC API get move settings (device t id, move settings t ∗move settings)
Read command setup movement (speed, acceleration, threshold and etc).

• result t XIMC API get move settings calb (device t id, move settings calb t ∗move settings calb, const
calibration t ∗calibration)
• result t XIMC API set engine settings (device t id, const engine settings t ∗engine settings)
Set engine settings.

• result t XIMC API set engine settings calb (device t id, const engine settings calb t ∗engine settings calb, const calibration t ∗calibration)
• result t XIMC API get engine settings (device t id, engine settings t ∗engine settings)
Read engine settings.

• result t XIMC API get engine settings calb (device t id, engine settings calb t ∗engine settings calb,
const calibration t ∗calibration)
• 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 entype settings (device t id, entype settings t ∗entype settings)
Return engine type and driver type.

• 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 get power settings (device t id, power settings t ∗power settings)
Read settings of step motor power control.

• result t XIMC API set secure settings (device t id, const secure settings t ∗secure settings)
Set protection settings.

• result t XIMC API get secure settings (device t id, secure settings t ∗secure settings)
Read protection settings.

• 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 set edges settings calb (device t id, const edges settings calb t ∗edges settings calb,
const calibration t ∗calibration)
• 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 edges settings calb (device t id, edges settings calb t ∗edges settings calb, const
calibration t ∗calibration)
• result t XIMC API set pid settings (device t id, const pid settings t ∗pid settings)
Set PID settings.

• result t XIMC API get pid settings (device t id, pid settings t ∗pid settings)
Read PID settings.

• 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 set sync in settings calb (device t id, const sync in settings calb t ∗sync in settingscalb, const calibration t ∗calibration)
• 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 sync in settings calb (device t id, sync in settings calb t ∗sync in settings calb,
const calibration t ∗calibration)
• 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 set sync out settings calb (device t id, const sync out settings calb t ∗sync out settings calb, const calibration t ∗calibration)
Generated on Fri Nov 29 2013 01:25:06 for libximc by Doxygen

5.1 ximc.h File Reference

78

• 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 sync out settings calb (device t id, sync out settings calb t ∗sync out settings calb, const calibration t ∗calibration)
• result t XIMC API set extio settings (device t id, const extio settings t ∗extio settings)
Set EXTIO settings.

• result t XIMC API get extio settings (device t id, extio settings t ∗extio settings)
Read EXTIO settings.

• result t XIMC API set brake settings (device t id, const brake settings t ∗brake settings)
Set settings of brake control.

• result t XIMC API get brake settings (device t id, brake settings t ∗brake settings)
Read settings of brake control.

• result t XIMC API set control settings (device t id, const control settings t ∗control settings)
Set settings of motor control.

• result t XIMC API set control settings calb (device t id, const control settings calb t ∗control settings calb, const calibration t ∗calibration)
• result t XIMC API get control settings (device t id, control settings t ∗control settings)
Read settings of motor control.

• result t XIMC API get control settings calb (device t id, control settings calb t ∗control settings calb,
const calibration t ∗calibration)
• result t XIMC API set joystick settings (device t id, const joystick settings t ∗joystick settings)
Set settings of joystick.

• result t XIMC API get joystick settings (device t id, joystick settings t ∗joystick settings)
Read settings of joystick.

• result t XIMC API set ctp settings (device t id, const ctp settings t ∗ctp settings)
Set settings of control position(is only used with stepper motor).

• result t XIMC API get ctp settings (device t id, ctp settings t ∗ctp settings)
Read settings of control position(is only used with stepper motor).

• result t XIMC API set uart settings (device t id, const uart settings t ∗uart settings)
Set UART settings.

• result t XIMC API get uart settings (device t id, uart settings t ∗uart settings)
Read UART settings.

• result t XIMC API set controller name (device t id, const controller name t ∗controller name)
Write user controller name and flags of setting from FRAM.

• result t XIMC API get controller name (device t id, controller name t ∗controller name)
Read user controller name and flags of setting from FRAM.

Group of commands movement control
• result t XIMC API command stop (device t id)
Immediately stop the engine, the transition to the STOP, mode key BREAK (winding short-circuited), the regime
”retention” is deactivated for DC motors, keeping current in the windings for stepper motors (with Power management settings).

• result t XIMC API set add sync in action (device t id, const add sync in action t ∗add sync in action)
This command adds one element of the FIFO commands that are executed when input clock pulse.

• result t XIMC API set add sync in action calb (device t id, const add sync in action calb t ∗add sync in action calb, const calibration t ∗calibration)
• result t XIMC API command power off (device t id)
Immediately power off motor regardless its state.

• result t XIMC API command move (device t id, int Position, int uPosition)
Upon receiving the command ”move” the engine starts to move with pre-set parameters (speed, acceleration,
retention), to the point specified to the Position, uPosition.

• result t XIMC API command move calb (device t id, float Position, const calibration t ∗calibration)
• result t XIMC API command movr (device t id, int DeltaPosition, int uDeltaPosition)
Upon receiving the command ”movr” engine starts to move with pre-set parameters (speed, acceleration, hold),
left or right (depending on the sign of DeltaPosition) by the number of pulses specified in the fields DeltaPosition,
uDeltaPosition.

• result t XIMC API command movr calb (device t id, float DeltaPosition, const calibration t ∗calibration)
• result t XIMC API command home (device t id)
The positive direction is to the right.
Generated on Fri Nov 29 2013 01:25:06 for libximc by Doxygen

5.1 ximc.h File Reference

79

• result t XIMC API command left (device t id)
Start continous moving to the left.

• result t XIMC API command right (device t id)
Start continous moving to the right.

• result t XIMC API command loft (device t id)
Upon receiving the command ”loft” the engine is shifted from the current point to a distance GENG :: Antiplay, then
move to the same point.

• result t XIMC API command sstp (device t id)
soft stop engine.

• result t XIMC API get position (device t id, get position t ∗the get position)
Reads the value position in steps and micro for stepper motor and encoder steps all engines.

• result t XIMC API get position calb (device t id, get position calb t ∗the get position calb, const
calibration t ∗calibration)
• result t XIMC API set position (device t id, const set position t ∗the set position)
Sets any position value in steps and micro for stepper motor and encoder steps of all engines.

• result t XIMC API set position calb (device t id, const set position calb t ∗the set position calb, const
calibration t ∗calibration)
• result t XIMC API command zero (device t id)
Sets the current position and the position in which the traffic moves by the move command and movr zero for all
cases, except for movement to the target position.

Group of commands to save and load settings
• result t XIMC API command save settings (device t id)
Save all settings from controller’s RAM to controller’s flash memory, replacing previous data in controller’s flash
memory.

• result t XIMC API command read settings (device t id)
Read all settings from controller’s flash memory to controller’s RAM, replacing previous data in controller’s RAM.

• result t XIMC API command eesave settings (device t id)
Save settings from controller’s RAM to stage’s EEPROM memory, whitch spontaneity connected to stage and it
isn‘t change without it mechanical reconstruction.

• result t XIMC API command eeread settings (device t id)
Read settings from controller’s RAM to stage’s EEPROM memory, whitch spontaneity connected to stage and it
isn‘t change without it mechanical reconstruction.

• 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 serial number (device t id, unsigned int ∗SerialNumber)
Read device serial number.

• result t XIMC API get firmware version (device t id, unsigned int ∗Major, unsigned int ∗Minor, unsigned int
∗Release)
Read controller’s firmware version.

• result t XIMC API service command updf (device t id)
Command puts the controller to update the firmware.

Service commands
• result t XIMC API set serial number (device t id, const serial number t ∗serial number)
Write device serial number to controller’s flash memory.

• result t XIMC API get analog data (device t id, analog data t ∗analog data)
Read analog data structure that contains raw analog data from ADC embedded on board.

• result t XIMC API get debug read (device t id, debug read t ∗debug read)
Read data from firmware for debug purpose.

Group of commands to work with EEPROM
• result t XIMC API set stage name (device t id, const stage name t ∗stage name)
Write user stage name from EEPROM.

• result t XIMC API get stage name (device t id, stage name t ∗stage name)
Read user stage name from EEPROM.

Generated on Fri Nov 29 2013 01:25:06 for libximc by Doxygen

5.1 ximc.h File Reference

80

• result t XIMC API set stage information (device t id, const stage information t ∗stage information)
Set stage information to EEPROM.

• result t XIMC API get stage information (device t id, stage information t ∗stage information)
Read stage information from EEPROM.

• result t XIMC API set stage settings (device t id, const stage settings t ∗stage settings)
Set stage settings to EEPROM.

• result t XIMC API get stage settings (device t id, stage settings t ∗stage settings)
Read stage settings from EEPROM.

• result t XIMC API set motor information (device t id, const motor information t ∗motor information)
Set motor information to EEPROM.

• result t XIMC API get motor information (device t id, motor information t ∗motor information)
Read motor information from EEPROM.

• result t XIMC API set motor settings (device t id, const motor settings t ∗motor settings)
Set motor settings to EEPROM.

• result t XIMC API get motor settings (device t id, motor settings t ∗motor settings)
Read motor settings from EEPROM.

• result t XIMC API set encoder information (device t id,
information)

const encoder information t ∗encoder -

Set encoder information to EEPROM.

• result t XIMC API get encoder information (device t id, encoder information t ∗encoder information)
Read encoder information from EEPROM.

• result t XIMC API set encoder settings (device t id, const encoder settings t ∗encoder settings)
Set encoder settings to EEPROM.

• result t XIMC API get encoder settings (device t id, encoder settings t ∗encoder settings)
Read encoder settings from EEPROM.

• result t XIMC API set hallsensor information (device t id, const hallsensor information t ∗hallsensor information)
Set hall sensor information to EEPROM.

• result t XIMC API
information)

get hallsensor information

(device t

id,

hallsensor information t

∗hallsensor -

Read hall sensor information from EEPROM.

• result t XIMC API set hallsensor settings (device t id, const hallsensor settings t ∗hallsensor settings)
Set hall sensor settings to EEPROM.

• result t XIMC API get hallsensor settings (device t id, hallsensor settings t ∗hallsensor settings)
Read hall sensor settings from EEPROM.

• result t XIMC API set gear information (device t id, const gear information t ∗gear information)
Set gear information to EEPROM.

• result t XIMC API get gear information (device t id, gear information t ∗gear information)
Read gear information from EEPROM.

• result t XIMC API set gear settings (device t id, const gear settings t ∗gear settings)
Set gear settings to EEPROM.

• result t XIMC API get gear settings (device t id, gear settings t ∗gear settings)
Read gear settings from EEPROM.

• result t XIMC API set accessories settings (device t id, const accessories settings t ∗accessories settings)
Set additional accessories information to EEPROM.

• result t XIMC API get accessories settings (device t id, accessories settings t ∗accessories settings)
Read additional accessories information from EEPROM.

• result t XIMC API get bootloader version (device t id, unsigned int ∗Major, unsigned int ∗Minor, unsigned
int ∗Release)
Read controller’s firmware version.

• result t XIMC API goto firmware (device t id, uint8 t ∗ret)
Reboot to firmware.

• result t XIMC API has firmware (const char ∗name, uint8 t ∗ret)
Check for firmware on device.

• result t XIMC API command update firmware (const char ∗name, const uint8 t ∗data, uint32 t data size)
Update firmware.

• result t XIMC API write key (const char ∗name, uint8 t ∗key)
Write controller key.

• result t XIMC API command reset (device t id)
Reset controller.

• result t XIMC API command clear fram (device t id)
Clear controller FRAM.
Generated on Fri Nov 29 2013 01:25:06 for libximc by Doxygen

5.1 ximc.h File Reference

81

Boards and drivers control
Functions for searching and opening/closing devices
• typedef char ∗ pchar
Nevermind.

• typedef void(XIMC CALLCONV ∗ logging callback t )(int loglevel, const wchar t ∗message)
Logging callback prototype.

• device t XIMC API open device (const char ∗name)
Open a device with OS name name and return identifier of the device which can be used in calls.

• result t XIMC API close device (device t ∗id)
Close specified device.

• result t XIMC API probe device (const char ∗name)
Check if a device with OS name name is XIMC device.

• device enumeration t XIMC API enumerate devices (int probe flags)
Enumerate all devices that looks like valid.

• result t XIMC API free enumerate devices (device enumeration t device enumeration)
Free memory returned by enumerate devices.

• int XIMC API get device count (device enumeration t device enumeration)
Get device count.

• pchar XIMC API get device name (device enumeration t device enumeration, int device index)
Get device name from the device enumeration.

• 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 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 reset locks ()
Reset library locks in a case of deadlock.

• result t XIMC API ximc fix usbser sys (const char ∗device name)
Fix for errors in Windows USB driver stack.

• void XIMC API msec sleep (unsigned int msec)
Sleeps for a specified amount of time.

• void XIMC API ximc version (char ∗version)
Returns a library version.

• void XIMC API logging callback stderr wide (int loglevel, const wchar t ∗message)
Simple callback for logging to stderr in wide chars.

• void XIMC API logging callback stderr narrow (int loglevel, const wchar t ∗message)
Simple callback for logging to stderr in narrow (single byte) chars.

• void XIMC API set logging callback (logging callback t logging callback)
Sets a logging callback.

• result t XIMC API get status (device t id, status t ∗status)
Return device state.

• result t XIMC API get status calb (device t id, status calb t ∗status, const calibration t ∗calibration)
Calibrated device state.

• result t XIMC API get device information (device t id, device information t ∗device information)
Return device information.

5.1.1 Detailed Description
Header file for libximc library.
Generated on Fri Nov 29 2013 01:25:06 for libximc by Doxygen

5.1 ximc.h File Reference

5.1.2 Macro Definition Documentation
5.1.2.1

#define ALARM ON DRIVER OVERHEATING 0x01

If this flag is set enter Alarm state on driver overheat signal.

5.1.2.2

#define BORDER IS ENCODER 0x01

Borders are fixed by predetermined encoder values, if set; borders position on limit switches, if not set.

5.1.2.3

#define BORDER STOP LEFT 0x02

Motor should stop on left border.

5.1.2.4

#define BORDER STOP RIGHT 0x04

Motor should stop on right border.

5.1.2.5

#define BORDERS SWAP MISSET DETECTION 0x08

Motor should stop on both borders.
Need to save motor then wrong border settings is set

5.1.2.6

#define BRAKE ENABLED 0x01

Brake control is enabled, if this flag is set.

5.1.2.7

#define BRAKE ENG PWROFF 0x02

Brake turns off power of step motor, if this flag is set.

5.1.2.8

#define CONTROL BTN LEFT PUSHED OPEN 0x04

Pushed left button corresponds to open contact, if this flag is set.

5.1.2.9

#define CONTROL BTN RIGHT PUSHED OPEN 0x08

Pushed right button corresponds to open contact, if this flag is set.

5.1.2.10

#define CONTROL MODE BITS 0x03

Bits to control engine by joystick or buttons.

5.1.2.11

#define CONTROL MODE JOY 0x01

Control by joystick.

Generated on Fri Nov 29 2013 01:25:06 for libximc by Doxygen

82

5.1 ximc.h File Reference

5.1.2.12

#define CONTROL MODE LR 0x02

Control by left/right buttons.

5.1.2.13

#define CONTROL MODE OFF 0x00

Control is disabled.

5.1.2.14

#define CTP ALARM ON ERROR 0x04

Set ALARM on mismatch, if flag set.

5.1.2.15

#define CTP BASE 0x02

Position control is based on revolution sensor, if this flag is set; otherwise it is based on encoder.

5.1.2.16

#define CTP ENABLED 0x01

Position control is enabled, if flag set.

5.1.2.17

#define DRIVER TYPE DISCRETE FET 0x01

Driver with discrete FET keys.
Default option.

5.1.2.18

#define DRIVER TYPE EXTERNAL 0x03

External driver.

5.1.2.19

#define DRIVER TYPE INTEGRATE 0x02

Driver with integrated IC.

5.1.2.20

#define EEPROM PRECEDENCE 0x01

If the flag is set settings from external EEPROM override controller settings.

5.1.2.21

#define ENC STATE ABSENT 0x00

Encoder is absent.

5.1.2.22

#define ENC STATE MALFUNC 0x02

Encoder is connected and malfunctioning.

5.1.2.23

#define ENC STATE OK 0x04

Encoder is connected and working properly.

Generated on Fri Nov 29 2013 01:25:06 for libximc by Doxygen

83

5.1 ximc.h File Reference

5.1.2.24

84

#define ENC STATE REVERS 0x03

Encoder is connected and operational but counts in otyher direction.

5.1.2.25

#define ENC STATE UNKNOWN 0x01

Encoder state is unknown.

5.1.2.26

#define ENDER SW1 ACTIVE LOW 0x02

1 - Limit switch connnected to pin SW1 is triggered by a low level on pin.

5.1.2.27

#define ENDER SW2 ACTIVE LOW 0x04

1 - Limit switch connnected to pin SW2 is triggered by a low level on pin.

5.1.2.28

#define ENDER SWAP 0x01

First limit switch on the right side, if set; otherwise on the left side.

5.1.2.29

#define ENGINE ACCEL ON 0x10

Acceleration enable flag.
If it set, motion begins with acceleration and ends with deceleration.

5.1.2.30

#define ENGINE ANTIPLAY 0x08

Play compensation flag.
If it set, engine makes backlash (play) compensation procedure and reach the predetermined position accurately
on low speed.

5.1.2.31

#define ENGINE LIMIT CURR 0x40

Maxumum motor current limit enable flag(is only used with DC motor).

5.1.2.32

#define ENGINE LIMIT RPM 0x80

Maxumum motor speed limit enable flag.

5.1.2.33

#define ENGINE LIMIT VOLT 0x20

Maxumum motor voltage limit enable flag(is only used with DC motor).

5.1.2.34

#define ENGINE MAX SPEED 0x04

Max speed flag.
If it is set, engine uses maxumum speed achievable with the present engine settings as nominal speed.

Generated on Fri Nov 29 2013 01:25:06 for libximc by Doxygen

5.1 ximc.h File Reference

5.1.2.35

85

#define ENGINE REVERSE 0x01

Reverse flag.
It determines motor shaft rotation direction that corresponds to feedback counts increasing. If not set (default),
motor shaft rotation direction under positive voltage corresponds to feedback counts increasing and vice versa.
Change it if you see that positive directions on motor and feedback are opposite.

5.1.2.36

#define ENGINE TYPE 2DC 0x02

2 DC motors.

5.1.2.37

#define ENGINE TYPE BRUSHLESS 0x05

Brushless motor.

5.1.2.38

#define ENGINE TYPE DC 0x01

DC motor.

5.1.2.39

#define ENGINE TYPE NONE 0x00

A value that shouldn’t be used.

5.1.2.40

#define ENGINE TYPE STEP 0x03

Step motor.

5.1.2.41

#define ENGINE TYPE TEST 0x04

Duty cycle are fixed.
Used only manufacturer.

5.1.2.42

#define ENUMERATE PROBE 0x01

Check if a device with OS name name is XIMC device.
Be carefuly with this flag because it sends some data to the device.

5.1.2.43

#define EXTIO SETUP INVERT 0x02

Interpret EXTIO states and fronts inverted if flag is set.
Falling front as input event and low logic level as active state.

5.1.2.44

#define EXTIO SETUP MODE IN HOME 0x04

Issue HOME command.

5.1.2.45

#define EXTIO SETUP MODE IN MOVR 0x03

Issue MOVR command with last used settings.
Generated on Fri Nov 29 2013 01:25:06 for libximc by Doxygen

5.1 ximc.h File Reference

5.1.2.46

#define EXTIO SETUP MODE IN NOP 0x00

Do nothing.

5.1.2.47

#define EXTIO SETUP MODE IN PWOF 0x02

Issue PWOF command, powering off all engine windings.

5.1.2.48

#define EXTIO SETUP MODE IN STOP 0x01

Issue STOP command, ceasing the engine movement.

5.1.2.49

#define EXTIO SETUP MODE OUT ALARM 0x30

EXTIO pin stays active during Alarm state.

5.1.2.50

#define EXTIO SETUP MODE OUT MOTOR FOUND 0x50

EXTIO pin stays active when motor is connected (first winding).

5.1.2.51

#define EXTIO SETUP MODE OUT MOTOR ON 0x40

EXTIO pin stays active when windings are powered.

5.1.2.52

#define EXTIO SETUP MODE OUT MOVING 0x20

EXTIO pin stays active during moving state.

5.1.2.53

#define EXTIO SETUP MODE OUT OFF 0x00

EXTIO pin always set in inactive state.

5.1.2.54

#define EXTIO SETUP MODE OUT ON 0x10

EXTIO pin always set in active state.

5.1.2.55

#define EXTIO SETUP OUTPUT 0x01

EXTIO works as output if flag is set, works as input otherwise.

5.1.2.56

#define FEEDBACK EMF 0x04

Feedback by EMF.

5.1.2.57

#define FEEDBACK ENC REVERSE 0x01

Reverse count of encoder.

Generated on Fri Nov 29 2013 01:25:06 for libximc by Doxygen

86

5.1 ximc.h File Reference

5.1.2.58

#define FEEDBACK ENCODER 0x01

Feedback by encoder.

5.1.2.59

#define FEEDBACK ENCODERHALL 0x03

Feedback by Hall detector.

5.1.2.60

#define FEEDBACK HALL REVERSE 0x02

Reverce count position on the Hall sensor.

5.1.2.61

#define FEEDBACK NONE 0x05

Feedback is absent.

5.1.2.62

#define H BRIDGE ALERT 0x04

If this flag is set then turn off the power unit with a signal problem in one of the transistor bridge.

5.1.2.63

#define HOME DIR FIRST 0x01

Flag defines direction of 1st motion after execution of home command.
Direction is right, if set; otherwise left.

5.1.2.64

#define HOME DIR SECOND 0x02

Flag defines direction of 2nd motion.
Direction is right, if set; otherwise left.

5.1.2.65

#define HOME HALF MV 0x08

If the flag is set, the stop signals are ignored in start of second movement the first half-turn.

5.1.2.66

#define HOME MV SEC EN 0x04

Use the second phase of calibration to the home position, if set; otherwise the second phase is skipped.

5.1.2.67

#define HOME STOP FIRST BITS 0x30

Bits of the first stop selector.

5.1.2.68

#define HOME STOP FIRST LIM 0x30

First motion stops by limit switch.

5.1.2.69

#define HOME STOP FIRST REV 0x10

First motion stops by revolution sensor.
Generated on Fri Nov 29 2013 01:25:06 for libximc by Doxygen

87

5.1 ximc.h File Reference

5.1.2.70

#define HOME STOP FIRST SYN 0x20

First motion stops by synchronization input.

5.1.2.71

#define HOME STOP SECOND BITS 0xC0

Bits of the second stop selector.

5.1.2.72

#define HOME STOP SECOND LIM 0xC0

Second motion stops by limit switch.

5.1.2.73

#define HOME STOP SECOND REV 0x40

Second motion stops by revolution sensor.

5.1.2.74

#define HOME STOP SECOND SYN 0x80

Second motion stops by synchronization input.

5.1.2.75

#define JOY REVERSE 0x01

Joystick action is reversed.
Joystick deviation to the upper values correspond to negative speeds and vice versa.

5.1.2.76

#define LOW UPWR PROTECTION 0x02

If this flag is set turn off motor when voltage is lower than LowUpwrOff.

5.1.2.77

#define MICROSTEP MODE FRAC 128 0x08

1/128 step mode.

5.1.2.78

#define MICROSTEP MODE FRAC 16 0x05

1/16 step mode.

5.1.2.79

#define MICROSTEP MODE FRAC 2 0x02

1/2 step mode.

5.1.2.80

#define MICROSTEP MODE FRAC 256 0x09

1/256 step mode.

5.1.2.81

#define MICROSTEP MODE FRAC 32 0x06

1/32 step mode.

Generated on Fri Nov 29 2013 01:25:06 for libximc by Doxygen

88

5.1 ximc.h File Reference

5.1.2.82

#define MICROSTEP MODE FRAC 4 0x03

1/4 step mode.

5.1.2.83

#define MICROSTEP MODE FRAC 64 0x07

1/64 step mode.

5.1.2.84

#define MICROSTEP MODE FRAC 8 0x04

1/8 step mode.

5.1.2.85

#define MICROSTEP MODE FULL 0x01

Full step mode.

5.1.2.86

#define MOVE STATE ANTIPLAY 0x04

Motor is playing compensation, if flag set.

5.1.2.87

#define MOVE STATE MOVING 0x01

This flag indicates that controller is trying to move the motor.

5.1.2.88

#define MOVE STATE TARGET SPEED 0x02

Target speed is reached, if flag set.

5.1.2.89

#define MVCMD ERROR 0x40

Finish state (1 - move command have finished with an error, 0 - move command have finished correctly).
This flags is actual when MVCMD RUNNING signals movement finish.

5.1.2.90

#define MVCMD HOME 0x06

Command home.

5.1.2.91

#define MVCMD LEFT 0x03

Command left.

5.1.2.92

#define MVCMD LOFT 0x07

Command loft.

5.1.2.93

#define MVCMD MOVE 0x01

Command move.

Generated on Fri Nov 29 2013 01:25:06 for libximc by Doxygen

89

5.1 ximc.h File Reference

5.1.2.94

#define MVCMD MOVR 0x02

Command movr.

5.1.2.95

#define MVCMD NAME BITS 0x3F

Move command bit mask.

5.1.2.96

#define MVCMD RIGHT 0x04

Command rigt.

5.1.2.97

#define MVCMD RUNNING 0x80

Move command state (0 - move command have finished, 1 - move command is being executed).

5.1.2.98

#define MVCMD SSTP 0x08

Command soft stop.

5.1.2.99

#define MVCMD STOP 0x05

Command stop.

5.1.2.100

#define MVCMD UKNWN 0x00

Unknown command.

5.1.2.101

#define POWER OFF ENABLED 0x02

Power off enabled after PowerOffDelay, if this flag is set.

5.1.2.102

#define POWER REDUCT ENABLED 0x01

Current reduction enabled after CurrReductDelay, if this flag is set.

5.1.2.103

#define POWER SMOOTH CURRENT 0x04

Current ramp-up/down is performed smoothly during current set time, if this flag is set.

5.1.2.104

#define PWR STATE MAX 0x05

Motor windings are powered by maximum current driver can provide at this voltage.

5.1.2.105

#define PWR STATE NORM 0x03

Motor windings are powered by nominal current.

Generated on Fri Nov 29 2013 01:25:06 for libximc by Doxygen

90

5.1 ximc.h File Reference

5.1.2.106

#define PWR STATE OFF 0x01

Motor windings are disconnected from the driver.

5.1.2.107

#define PWR STATE REDUCT 0x04

Motor windings are powered by reduced current to lower power consumption.

5.1.2.108

#define PWR STATE UNKNOWN 0x00

Unknown state, should never happen.

5.1.2.109

#define REV SENS INV 0x08

Sensor is active when it 0 and invert makes active level 1.
That is, if you do not invert, it is normal logic - 0 is the activation.

5.1.2.110

#define SETPOS IGNORE ENCODER 0x02

Will not reload encoder state if this flag is set.

5.1.2.111

#define SETPOS IGNORE POSITION 0x01

Will not reload position in steps/microsteps if this flag is set.

5.1.2.112

#define STATE ALARM 0x00040

Controller is in alarm state indicating that something dangerous had happened.
Most commands are ignored in this state. To reset the flag a STOP command must be issued.

5.1.2.113

#define STATE BORDERS SWAP MISSET 0x08000

Engine stuck at the wrong edge.

5.1.2.114

#define STATE BRAKE 0x0200

State of Brake pin.

5.1.2.115

#define STATE BUTTON LEFT 0x0008

Button ”left” state (1 if pressed).

5.1.2.116

#define STATE BUTTON RIGHT 0x0004

Button ”right” state (1 if pressed).

5.1.2.117

#define STATE CONTR 0x0003F

Flags of controller states.
Generated on Fri Nov 29 2013 01:25:06 for libximc by Doxygen

91

5.1 ximc.h File Reference

5.1.2.118

#define STATE CONTROLLER OVERHEAT 0x00200

Controller overheat.

5.1.2.119

#define STATE CTP ERROR 0x00080

Control position error(is only used with stepper motor).

5.1.2.120

#define STATE DIG SIGNAL 0xFFFF

Flags of digital signals.

5.1.2.121

#define STATE EEPROM CONNECTED 0x00010

EEPROM with settings is connected.

5.1.2.122

#define STATE ENC A 0x2000

State of encoder A pin.

5.1.2.123

#define STATE ENC B 0x4000

State of encoder B pin.

5.1.2.124

#define STATE ERRC 0x00001

Command error encountered.

5.1.2.125

#define STATE ERRD 0x00002

Data integrity error encountered.

5.1.2.126

#define STATE ERRV 0x00004

Value error encountered.

5.1.2.127

#define STATE GPIO LEVEL 0x0020

State of external GPIO pin.

5.1.2.128

#define STATE GPIO PINOUT 0x0010

External GPIO works as Out, if flag set; otherwise works as In.

5.1.2.129

#define STATE HALL A 0x0040

State of Hall a pin.

Generated on Fri Nov 29 2013 01:25:06 for libximc by Doxygen

92

5.1 ximc.h File Reference

5.1.2.130

#define STATE HALL B 0x0080

State of Hall b pin.

5.1.2.131

#define STATE HALL C 0x0100

State of Hall c pin.

5.1.2.132

#define STATE LEFT EDGE 0x0002

Engine stuck at the left edge.

5.1.2.133

#define STATE LOW USB VOLTAGE 0x02000

USB voltage is insufficient for normal operation.

5.1.2.134

#define STATE OVERLOAD POWER CURRENT 0x00800

Power current exceeds safe limit.

5.1.2.135

#define STATE OVERLOAD POWER VOLTAGE 0x00400

Power voltage exceeds safe limit.

5.1.2.136

#define STATE OVERLOAD USB CURRENT 0x04000

USB current exceeds safe limit.

5.1.2.137

#define STATE OVERLOAD USB VOLTAGE 0x01000

USB voltage exceeds safe limit.

5.1.2.138

#define STATE POWER OVERHEAT 0x00100

Power driver overheat.

5.1.2.139

#define STATE REV SENSOR 0x0400

State of Revolution sensor pin.

5.1.2.140

#define STATE RIGHT EDGE 0x0001

Engine stuck at the right edge.

5.1.2.141

#define STATE SECUR 0x3FFC0

Flags of security.

Generated on Fri Nov 29 2013 01:25:06 for libximc by Doxygen

93

5.1 ximc.h File Reference

5.1.2.142

94

#define STATE SYNC INPUT 0x0800

State of Sync input pin.

5.1.2.143

#define STATE SYNC OUTPUT 0x1000

State of Sync output pin.

5.1.2.144

#define SYNCIN ENABLED 0x01

Synchronization in mode is enabled, if this flag is set.

5.1.2.145

#define SYNCIN GOTOPOSITION 0x04

The engine is go to position specified in Position and uPosition, if this flag is set.
And it is shift on the Position and uPosition, if this flag is unset

5.1.2.146

#define SYNCIN INVERT 0x02

Trigger on falling edge if flag is set, on rising edge otherwise.

5.1.2.147

#define SYNCOUT ENABLED 0x01

Synchronization out pin follows the synchronization logic, if set.
It governed by SYNCOUT STATE flag otherwise.

5.1.2.148

#define SYNCOUT IN STEPS 0x08

Use motor steps/encoder pulses instead of milliseconds for output pulse generation if the flag is set.

5.1.2.149

#define SYNCOUT INVERT 0x04

Low level is active, if set, and high level is active otherwise.

5.1.2.150

#define SYNCOUT ONPERIOD 0x40

Generate synchronization pulse every SyncOutPeriod encoder pulses.

5.1.2.151

#define SYNCOUT ONSTART 0x10

Generate synchronization pulse when movement starts.

5.1.2.152

#define SYNCOUT ONSTOP 0x20

Generate synchronization pulse when movement stops.

5.1.2.153

#define SYNCOUT STATE 0x02

When output state is fixed by negative SYNCOUT ENABLED flag, the pin state is in accordance with this flag state.
Generated on Fri Nov 29 2013 01:25:06 for libximc by Doxygen

5.1 ximc.h File Reference

5.1.2.154

#define UART PARITY BITS 0x03

Bits of the parity.

5.1.2.155

#define WIND A STATE ABSENT 0x00

Winding A is disconnected.

5.1.2.156

#define WIND A STATE MALFUNC 0x02

Winding A is short-circuited.

5.1.2.157

#define WIND A STATE OK 0x03

Winding A is connected and working properly.

5.1.2.158

#define WIND A STATE UNKNOWN 0x01

Winding A state is unknown.

5.1.2.159

#define WIND B STATE ABSENT 0x00

Winding B is disconnected.

5.1.2.160

#define WIND B STATE MALFUNC 0x20

Winding B is short-circuited.

5.1.2.161

#define WIND B STATE OK 0x30

Winding B is connected and working properly.

5.1.2.162

#define WIND B STATE UNKNOWN 0x10

Winding B state is unknown.

5.1.2.163

#define XIMC API

Library import macro Macros allows to automatically import function from shared library.
It automatically expands to dllimport on msvc when including header file

5.1.3 Typedef Documentation
5.1.3.1

typedef void(XIMC CALLCONV ∗ logging callback t)(int loglevel, const wchar t ∗message)

Logging callback prototype.

Parameters
loglevel
message

a loglevel
a message

Generated on Fri Nov 29 2013 01:25:06 for libximc by Doxygen

95

5.1 ximc.h File Reference

96

5.1.4 Function Documentation
5.1.4.1 result t XIMC API close device ( device t ∗ id )
Close specified device.

Parameters
id

an identifier of device

5.1.4.2 result t XIMC API command clear fram ( device t id )
Clear controller FRAM.
Can be used by manufacturer only

Parameters
id

an identifier of device

5.1.4.3 result t XIMC API command eeread settings ( device t id )
Read settings from controller’s RAM to stage’s EEPROM memory, whitch spontaneity connected to stage and it isn‘t
change without it mechanical reconstruction.

Parameters
id

an identifier of device

5.1.4.4 result t XIMC API command eesave settings ( device t id )
Save settings from controller’s RAM to stage’s EEPROM memory, whitch spontaneity connected to stage and it isn‘t
change without it mechanical reconstruction.
Can be used by manufacturer only.

Parameters
id

an identifier of device

5.1.4.5 result t XIMC API command home ( device t id )
The positive direction is to the right.
A value of zero reverses the direction of the direction of the flag, the set speed. Restriction imposed by the trailer,
act the same, except that the limit switch contact does not stop. Limit the maximum speed, acceleration and
deceleration function. 1) moves the motor according to the speed FastHome, uFastHome and flag HOME DIR FAST until limit switch, if the flag is set HOME STOP ENDS, until the signal from the input synchronization if the
flag HOME STOP SYNC (as accurately as possible is important to catch the moment of operation limit switch) or
until the signal is received from the speed sensor, if the flag HOME STOP REV SN 2) then moves according to
the speed SlowHome, uSlowHome and flag HOME DIR SLOW until signal from the clock input, if the flag HOME MV SEC. If the flag HOME MV SEC reset skip this paragraph. 3) then move the motor according to the speed
FastHome, uFastHome and flag HOME DIR SLOW a distance HomeDelta, uHomeDelta. description of flags and
variable see in description for commands GHOM/SHOM

Generated on Fri Nov 29 2013 01:25:06 for libximc by Doxygen

5.1 ximc.h File Reference

97

Parameters
id

an identifier of device

See Also
home settings t
get home settings
set home settings

5.1.4.6 result t XIMC API command left ( device t id )
Start continous moving to the left.

Parameters
id

an identifier of device

5.1.4.7 result t XIMC API command loft ( device t id )
Upon receiving the command ”loft” the engine is shifted from the current point to a distance GENG :: Antiplay, then
move to the same point.

Parameters
id

an identifier of device

5.1.4.8 result t XIMC API command move ( device t id, int Position, int uPosition )
Upon receiving the command ”move” the engine starts to move with pre-set parameters (speed, acceleration, retention), to the point specified to the Position, uPosition.
For stepper motor uPosition sets the microstep for DC motor, this field is not used.

Parameters
Position
uPosition
id

position to move. Range: -2147483647..2147483647.
part of the position to move, microsteps. Range: -255..255.
an identifier of device

5.1.4.9 result t XIMC API command movr ( device t id, int DeltaPosition, int uDeltaPosition )
Upon receiving the command ”movr” engine starts to move with pre-set parameters (speed, acceleration, hold),
left or right (depending on the sign of DeltaPosition) by the number of pulses specified in the fields DeltaPosition,
uDeltaPosition.
For stepper motor uDeltaPosition sets the microstep for DC motor, this field is not used.

Parameters
DeltaPosition
uDeltaPosition
id

shift from initial position. Range: -2147483647..2147483647.
part of the offset shift, microsteps. Range: -255..255.
an identifier of device

Generated on Fri Nov 29 2013 01:25:06 for libximc by Doxygen

5.1 ximc.h File Reference

5.1.4.10

98

result t XIMC API command power off ( device t id )

Immediately power off motor regardless its state.
Shouldn’t be used during motion as the motor could be power on again automatically to continue movement. The
command is designed for manual motor power off. When automatic power off after stop is required, use power
management system.

Parameters
id

an identifier of device

See Also
get power settings
set power settings

5.1.4.11

result t XIMC API command read settings ( device t id )

Read all settings from controller’s flash memory to controller’s RAM, replacing previous data in controller’s RAM.

Parameters
id

5.1.4.12

an identifier of device

result t XIMC API command reset ( device t id )

Reset controller.
Can be used by manufacturer only

Parameters
id

5.1.4.13

an identifier of device

result t XIMC API command right ( device t id )

Start continous moving to the right.

Parameters
id

5.1.4.14

an identifier of device

result t XIMC API command save settings ( device t id )

Save all settings from controller’s RAM to controller’s flash memory, replacing previous data in controller’s flash
memory.

Parameters
id

an identifier of device

Generated on Fri Nov 29 2013 01:25:06 for libximc by Doxygen

5.1 ximc.h File Reference

5.1.4.15

99

result t XIMC API command sstp ( device t id )

soft stop engine.
The motor stops with deceleration speed.

Parameters
id

5.1.4.16

an identifier of device

result t XIMC API command stop ( device t id )

Immediately stop the engine, the transition to the STOP, mode key BREAK (winding short-circuited), the regime
”retention” is deactivated for DC motors, keeping current in the windings for stepper motors (with Power management
settings).

Parameters
id

5.1.4.17

an identifier of device

result t XIMC API command update firmware ( const char ∗ name, const uint8 t ∗ data,

uint32 t data size )
Update firmware.
Service command

Parameters
name
data
data size

5.1.4.18

a name of device
firmware byte stream
size of byte stream

result t XIMC API command zero ( device t id )

Sets the current position and the position in which the traffic moves by the move command and movr zero for all
cases, except for movement to the target position.
In the latter case, set the zero current position and the target position counted so that the absolute position of the
destination is the same. That is, if we were at 400 and moved to 500, then the command Zero makes the current
position of 0, and the position of the destination - 100. Does not change the mode of movement that is if the motion
is carried, it continues, and if the engine is in the ”hold”, the type of retention remains.

Parameters
id

5.1.4.19

an identifier of device

device enumeration t XIMC API enumerate devices ( int probe flags )

Enumerate all devices that looks like valid.

Parameters
in

probe flags

enumerate devices flags

Generated on Fri Nov 29 2013 01:25:06 for libximc by Doxygen

5.1 ximc.h File Reference

5.1.4.20

100

result t XIMC API free enumerate devices ( device enumeration t device enumeration )

Free memory returned by enumerate devices.

Parameters
in

5.1.4.21

device enumeration

opaque pointer to an enumeration device data

result t XIMC API get accessories settings ( device t id, accessories settings t ∗

accessories settings )
Read additional accessories information from EEPROM.

Parameters
id
accessories settings

out

5.1.4.22

an identifier of device
structure contains information about additional accessories

result t XIMC API get analog data ( device t id, analog data t ∗ analog data )

Read analog data structure that contains raw analog data from ADC embedded on board.
This function used for device testing and deep recalibraton by manufacturer only.

Parameters
id
analog data

out

5.1.4.23

an identifier of device
analog data coefficients

result t XIMC API get bootloader version ( device t id, unsigned int ∗ Major, unsigned int ∗

Minor, unsigned int ∗ Release )
Read controller’s firmware version.

Parameters
id
Major
Minor
Release

out
out
out

5.1.4.24

an identifier of device
major version
minor version
release version

result t XIMC API get brake settings ( device t id, brake settings t ∗ brake settings )

Read settings of brake control.

Parameters
out

id
brake settings

an identifier of device
structure contains settings of brake control

Generated on Fri Nov 29 2013 01:25:06 for libximc by Doxygen

5.1 ximc.h File Reference

5.1.4.25

101

result t XIMC API get chart data ( device t id, chart data t ∗ chart data )

Return device electrical parameters, useful for charts.
Useful function that fill structure with snapshot of controller voltages and currents.

See Also
chart data t

Parameters
id
chart data

out

5.1.4.26

an identifier of device
structure with snapshot of controller parameters.

result t XIMC API get control settings ( device t id, control settings t ∗ control settings )

Read settings of motor control.
When choosing CTL MODE = 1 switches motor control with the joystick. In this mode, the joystick to the maximum
engine tends Move at MaxSpeed [i], where i = 0 if the previous use This mode is not selected another i. Buttons
switch the room rate i. When CTL MODE = 2 is switched on motor control using the Left / right. When you click on
the button motor starts to move in the appropriate direction at a speed MaxSpeed [0], at the end of time Timeout
[i] motor move at a speed MaxSpeed [i+1]. at Transition from MaxSpeed [i] on MaxSpeed [i +1] to acceleration, as
usual.

Parameters
id
control settings

out

5.1.4.27

an identifier of device
structure contains settings motor control by joystick or buttons left/right.

result t XIMC API get controller name ( device t id, controller name t ∗ controller name )

Read user controller name and flags of setting from FRAM.

Parameters
id
controller name

out

5.1.4.28

an identifier of device
structure contains previously set user controller name

result t XIMC API get ctp settings ( device t id, ctp settings t ∗ ctp settings )

Read settings of control position(is only used with stepper motor).
When controlling the step motor with encoder (CTP BASE 0) it is possible to detect the loss of steps. The controller
knows the number of steps per revolution (GENG :: StepsPerRev) and the encoder resolution (GFBS :: IPT). When
the control (flag CTP ENABLED), the controller stores the current position in the footsteps of SM and the current
position of the encoder. Further, at each step of the position encoder is converted into steps and if the difference is
greater CTPMinError, a flag STATE CTP ERROR. When controlling the step motor with speed sensor (CTP BASE
1), the position is controlled by him. The active edge of input clock controller stores the current value of steps.
Further, at each turn checks how many steps shifted. When a mismatch CTPMinError a flag STATE CTP ERROR.

Parameters
out

id
ctp settings

an identifier of device
structure contains settings of control position

Generated on Fri Nov 29 2013 01:25:06 for libximc by Doxygen

5.1 ximc.h File Reference

5.1.4.29

102

result t XIMC API get debug read ( device t id, debug read t ∗ debug read )

Read data from firmware for debug purpose.
Its use depends on context, firmware version and previous history.

Parameters
id
DebugData[128]

out

5.1.4.30

an identifier of device
Debug data.

int XIMC API get device count ( device enumeration t device enumeration )

Get device count.

Parameters
in

5.1.4.31

device enumeration

opaque pointer to an enumeration device data

result t XIMC API get device information ( device t id, device information t ∗ device information

)
Return device information.
All fields must point to allocated string buffers with at least 10 bytes. Works with both raw or initialized device.

Parameters
id
device information

out

an identifier of device
device information Device information.

See Also
get device information

5.1.4.32

pchar XIMC API get device name ( device enumeration t device enumeration, int device index )

Get device name from the device enumeration.
Returns device index device name.

Parameters
in
in

5.1.4.33

device enumeration
device index

opaque pointer to an enumeration device data
device index

result t XIMC API get edges settings ( device t id, edges settings t ∗ edges settings )

Read border and limit switches settings.

Generated on Fri Nov 29 2013 01:25:06 for libximc by Doxygen

5.1 ximc.h File Reference

103

See Also
set edges settings

Parameters
id
edges settings

out

5.1.4.34

an identifier of device
edges settings, specify types of borders, motor behaviour and electrical behaviour of limit switches

result t XIMC API get encoder information ( device t id, encoder information t ∗

encoder information )
Read encoder information from EEPROM.

Parameters
id
encoder information

out

5.1.4.35

an identifier of device
structure contains information about encoder

result t XIMC API get encoder settings ( device t id, encoder settings t ∗ encoder settings )

Read encoder settings from EEPROM.

Parameters
id
encoder settings

out

5.1.4.36

an identifier of device
structure contains encoder settings

result t XIMC API get engine settings ( device t id, engine settings t ∗ engine settings )

Read engine settings.
This function fill structure with set of useful motor settings stored in controller’s memory. These settings specify
motor shaft movement algorithm, list of limitations and rated characteristics.

See Also
set engine settings

Parameters
id
engine settings

out

5.1.4.37

an identifier of device
engine settings

result t XIMC API get entype settings ( device t id, entype settings t ∗ entype settings )

Return engine type and driver type.

Parameters
out
out

id
EngineType
DriverType

an identifier of device
engine type
driver type

Generated on Fri Nov 29 2013 01:25:06 for libximc by Doxygen

5.1 ximc.h File Reference

5.1.4.38

104

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.
Returns device index device serial number.

Parameters
in
in
out

5.1.4.39

device enumeration
device index
device information

opaque pointer to an enumeration device data
device index
device information data

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.
Returns device index device serial number.

Parameters
in
in
out

5.1.4.40

device enumeration
device index
serial

opaque pointer to an enumeration device data
device index
device serial number

result t XIMC API get extio settings ( device t id, extio settings t ∗ extio settings )

Read EXTIO settings.
This function reads a structure with a set of EXTIO settings from controller’s memory.

See Also
set extio settings

Parameters
id
extio settings

out

5.1.4.41

an identifier of device
EXTIO settings

result t XIMC API get feedback settings ( device t id, feedback settings t ∗ feedback settings )

Read feedback settings.

Parameters
out
out
out

id
IPS
FeedbackType
FeedbackFlags

an identifier of device
number of encoder pulses per shaft revolution. Range: 1..65535
type of feedback
flags of feedback

Generated on Fri Nov 29 2013 01:25:06 for libximc by Doxygen

5.1 ximc.h File Reference

5.1.4.42

105

result t XIMC API get firmware version ( device t id, unsigned int ∗ Major, unsigned int ∗

Minor, unsigned int ∗ Release )
Read controller’s firmware version.

Parameters
id
Major
Minor
Release

out
out
out

5.1.4.43

an identifier of device
major version
minor version
release version

result t XIMC API get gear information ( device t id, gear information t ∗ gear information )

Read gear information from EEPROM.

Parameters
id
gear information

out

5.1.4.44

an identifier of device
structure contains information about step gearhead

result t XIMC API get gear settings ( device t id, gear settings t ∗ gear settings )

Read gear settings from EEPROM.

Parameters
id
gear settings

out

5.1.4.45

an identifier of device
structure contains step gearhead settings

result t XIMC API get hallsensor information ( device t id, hallsensor information t ∗

hallsensor information )
Read hall sensor information from EEPROM.

Parameters
id
hallsensor information

out

5.1.4.46

an identifier of device
structure contains information about hall sensor

result t XIMC API get hallsensor settings ( device t id, hallsensor settings t ∗ hallsensor settings

)
Read hall sensor settings from EEPROM.

Parameters
out

id
hallsensor settings

an identifier of device
structure contains hall sensor settings

Generated on Fri Nov 29 2013 01:25:06 for libximc by Doxygen

5.1 ximc.h File Reference

5.1.4.47

106

result t XIMC API get home settings ( device t id, home settings t ∗ home settings )

Read home settings.
This function fill structure with settings of calibrating position.

See Also
home settings t

Parameters
id
home settings

out

5.1.4.48

an identifier of device
calibrating position settings

result t XIMC API get joystick settings ( device t id, joystick settings t ∗ joystick settings )

Read settings of joystick.
If joystick position is outside DeadZone limits from the central position a movement with speed, defined by the
joystick DeadZone edge to 100% deviation, begins. Joystick positions inside DeadZone limits correspond to zero
speed (soft stop of motion) and positions beyond Low and High limits correspond MaxSpeed [i] or -MaxSpeed [i] (see
command SCTL), where i = 0 by default and can be changed with left/right buttons (see command SCTL). If next
speed in list is zero (both integer and microstep parts), the button press is ignored. First speed in list shouldn’t be
zero. The DeadZone ranges are illustrated on the following picture. !/attachments/download/5563/range25p.png!
The relationship between the deviation and the rate is exponential, allowing no switching speed combine high
mobility and accuracy. The following picture illustrates this: !/attachments/download/3092/ExpJoystick.png! The
nonlinearity parameter is adjustable. Setting it to zero makes deviation/speed relation linear.

Parameters
id
joystick settings

out

5.1.4.49

an identifier of device
structure contains joystick settings

result t XIMC API get motor information ( device t id, motor information t ∗ motor information

)
Read motor information from EEPROM.

Parameters
id
motor information

out

5.1.4.50

an identifier of device
structure contains motor information

result t XIMC API get motor settings ( device t id, motor settings t ∗ motor settings )

Read motor settings from EEPROM.

Parameters
out

id
motor settings

an identifier of device
structure contains motor settings

Generated on Fri Nov 29 2013 01:25:06 for libximc by Doxygen

5.1 ximc.h File Reference

5.1.4.51

107

result t XIMC API get move settings ( device t id, move settings t ∗ move settings )

Read command setup movement (speed, acceleration, threshold and etc).

Parameters
id
move settings

out

5.1.4.52

an identifier of device
structure contains move settings: speed, acceleration, deceleration etc.

result t XIMC API get pid settings ( device t id, pid settings t ∗ pid settings )

Read PID settings.
This function fill structure with set of motor PID settings stored in controller’s memory. These settings specify
behaviour of PID routine for voltage. These factors are slightly different for different positioners. All boards are
supplied with standart set of PID setting on controller’s flash memory.

See Also
set pid settings

Parameters
id
pid settings

out

5.1.4.53

an identifier of device
pid settings

result t XIMC API get position ( device t id, get position t ∗ the get position )

Reads the value position in steps and micro for stepper motor and encoder steps all engines.

Parameters
id
position

out

5.1.4.54

an identifier of device
structure contains move settings: speed, acceleration, deceleration etc.

result t XIMC API get power settings ( device t id, power settings t ∗ power settings )

Read settings of step motor power control.
Used with stepper motor only.

Parameters
id
power settings

out

5.1.4.55

an identifier of device
structure contains settings of step motor power control

result t XIMC API get secure settings ( device t id, secure settings t ∗ secure settings )

Read protection settings.

Parameters
out

id
secure settings

an identifier of device
critical parameter settings to protect the hardware

Generated on Fri Nov 29 2013 01:25:06 for libximc by Doxygen

5.1 ximc.h File Reference

108

See Also
status t::flags

5.1.4.56

result t XIMC API get serial number ( device t id, unsigned int ∗ SerialNumber )

Read device serial number.

Parameters
id
serial

out

5.1.4.57

an identifier of device
serial number

result t XIMC API get stage information ( device t id, stage information t ∗ stage information )

Read stage information from EEPROM.

Parameters
id
stage information

out

5.1.4.58

an identifier of device
structure contains stage information

result t XIMC API get stage name ( device t id, stage name t ∗ stage name )

Read user stage name from EEPROM.

Parameters
id
stage name

out

5.1.4.59

an identifier of device
structure contains previously set user stage name

result t XIMC API get stage settings ( device t id, stage settings t ∗ stage settings )

Read stage settings from EEPROM.

Parameters
id
stage settings

out

5.1.4.60

an identifier of device
structure contains stage settings

result t XIMC API get status ( device t id, status t ∗ status )

Return device state.

Parameters
out

id
status

an identifier of device
structure with snapshot of controller status Device state. Useful structure that
contains current controller status, including speed, position and boolean flags.

Generated on Fri Nov 29 2013 01:25:06 for libximc by Doxygen

5.1 ximc.h File Reference

109

See Also
get status

5.1.4.61

result t XIMC API get status calb ( device t id, status calb t ∗ status, const calibration t ∗

calibration )
Calibrated device state.
Useful structure that contains current controller status, including speed, position and boolean flags.

See Also
get status

5.1.4.62

result t XIMC API get sync in settings ( device t id, sync in settings t ∗ sync in settings )

Read input synchronization settings.
This function fill structure with set of input synchronization settings, modes, periods and flags, that specify behaviour
of input synchronization. All boards are supplied with standart set of these settings.

See Also
set sync in settings

Parameters
id
sync in settings

out

5.1.4.63

an identifier of device
synchronization settings

result t XIMC API get sync out settings ( device t id, sync out settings t ∗ sync out settings )

Read output synchronization settings.
This function fill structure with set of output synchronization settings, modes, periods and flags, that specify behaviour of output synchronization. All boards are supplied with standart set of these settings.

See Also
set sync out settings

Parameters
id
sync out settings

out

5.1.4.64

an identifier of device
synchronization settings

result t XIMC API get uart settings ( device t id, uart settings t ∗ uart settings )

Read UART settings.
This function fill structure with UART settings.

Generated on Fri Nov 29 2013 01:25:06 for libximc by Doxygen

5.1 ximc.h File Reference

110

See Also
uart settings t

Parameters
Speed
uart settings

out

5.1.4.65

UART speed
UART settings

result t XIMC API goto firmware ( device t id, uint8 t ∗ ret )

Reboot to firmware.

Parameters
id
ret

out

5.1.4.66

an identifier of device
RESULT OK, if reboot to firmware is possible. Reboot is done after reply to this
command. RESULT NO FIRMWARE, if firmware is not found. RESULT ALREADY IN FIRMWARE, if this command was sent when controller is already in
firmware.

result t XIMC API has firmware ( const char ∗ name, uint8 t ∗ ret )

Check for firmware on device.

Parameters
name
ret

out

5.1.4.67

a name of device
non-zero if firmware existed

void XIMC API logging callback stderr narrow ( int loglevel, const wchar t ∗ message )

Simple callback for logging to stderr in narrow (single byte) chars.

Parameters
loglevel
message

5.1.4.68

a loglevel
a message

void XIMC API logging callback stderr wide ( int loglevel, const wchar t ∗ message )

Simple callback for logging to stderr in wide chars.

Parameters
loglevel
message

5.1.4.69

a loglevel
a message

void XIMC API msec sleep ( unsigned int msec )

Sleeps for a specified amount of time.

Generated on Fri Nov 29 2013 01:25:06 for libximc by Doxygen

5.1 ximc.h File Reference

111

Parameters
msec

5.1.4.70

time in milliseconds

device t XIMC API open device ( const char ∗ name )

Open a device with OS name name and return identifier of the device which can be used in calls.

Parameters
in

5.1.4.71

name

- a device name - e.g. COM3 or /dev/tty.s123

result t XIMC API probe device ( const char ∗ name )

Check if a device with OS name name is XIMC device.
Be carefuly with this call because it sends some data to the device.

Parameters
in

5.1.4.72

name

- a device name

result t XIMC API service command updf ( device t id )

Command puts the controller to update the firmware.
After receiving this command, the firmware board sets a flag (for loader), sends echo reply and restarts the controller.

5.1.4.73

result t XIMC API set accessories settings ( device t id, const accessories settings t ∗

accessories settings )
Set additional accessories information to EEPROM.
Can be used by manufacturer only.

Parameters
id
accessories settings

in

5.1.4.74

an identifier of device
structure contains information about additional accessories

result t XIMC API set add sync in action ( device t id, const add sync in action t ∗

add sync in action )
This command adds one element of the FIFO commands that are executed when input clock pulse.
Each pulse synchronization or perform that action, which is described in SSNI, if the buffer is empty, or the oldest
loaded into the buffer action to temporarily replace the speed and coordinate in SSNI. In the latter case this action
is erased from the buffer. The number of remaining empty buffer elements can be found in the structure of GETS.

Parameters
id

an identifier of device

Generated on Fri Nov 29 2013 01:25:06 for libximc by Doxygen

5.1 ximc.h File Reference

5.1.4.75

112

result t XIMC API set brake settings ( device t id, const brake settings t ∗ brake settings )

Set settings of brake control.

Parameters
id
brake settings

in

5.1.4.76

an identifier of device
structure contains settings of brake control

result t XIMC API set control settings ( device t id, const control settings t ∗ control settings )

Set settings of motor control.
When choosing CTL MODE = 1 switches motor control with the joystick. In this mode, the joystick to the maximum
engine tends Move at MaxSpeed [i], where i = 0 if the previous use This mode is not selected another i. Buttons
switch the room rate i. When CTL MODE = 2 is switched on motor control using the Left / right. When you click on
the button motor starts to move in the appropriate direction at a speed MaxSpeed [0], at the end of time Timeout
[i] motor move at a speed MaxSpeed [i+1]. at Transition from MaxSpeed [i] on MaxSpeed [i +1] to acceleration, as
usual.

Parameters
id
control settings

in

5.1.4.77

an identifier of device
structure contains settings motor control by joystick or buttons left/right.

result t XIMC API set controller name ( device t id, const controller name t ∗ controller name )

Write user controller name and flags of setting from FRAM.

Parameters
id
controller name

in

5.1.4.78

an identifier of device
structure contains previously set user controller name

result t XIMC API set ctp settings ( device t id, const ctp settings t ∗ ctp settings )

Set settings of control position(is only used with stepper motor).
When controlling the step motor with encoder (CTP BASE 0) it is possible to detect the loss of steps. The controller
knows the number of steps per revolution (GENG :: StepsPerRev) and the encoder resolution (GFBS :: IPT). When
the control (flag CTP ENABLED), the controller stores the current position in the footsteps of SM and the current
position of the encoder. Further, at each step of the position encoder is converted into steps and if the difference is
greater CTPMinError, a flag STATE CTP ERROR. When controlling the step motor with speed sensor (CTP BASE
1), the position is controlled by him. The active edge of input clock controller stores the current value of steps.
Further, at each turn checks how many steps shifted. When a mismatch CTPMinError a flag STATE CTP ERROR.

Parameters
in

5.1.4.79

id
ctp settings

an identifier of device
structure contains settings of control position

result t XIMC API set edges settings ( device t id, const edges settings t ∗ edges settings )

Set border and limit switches settings.

Generated on Fri Nov 29 2013 01:25:06 for libximc by Doxygen

5.1 ximc.h File Reference

113

See Also
set edges settings

Parameters
id
edges settings

in

5.1.4.80

an identifier of device
edges settings, specify types of borders, motor behaviour and electrical behaviour of limit switches

result t XIMC API set encoder information ( device t id, const encoder information t ∗

encoder information )
Set encoder information to EEPROM.
Can be used by manufacturer only.

Parameters
id
encoder information

in

5.1.4.81

an identifier of device
structure contains information about encoder

result t XIMC API set encoder settings ( device t id, const encoder settings t ∗ encoder settings

)
Set encoder settings to EEPROM.
Can be used by manufacturer only.

Parameters
id
encoder settings

in

5.1.4.82

an identifier of device
structure contains encoder settings

result t XIMC API set engine settings ( device t id, const engine settings t ∗ engine settings )

Set engine settings.
This function send structure with set of engine settings to controller’s memory. These settings specify motor shaft
movement algorithm, list of limitations and rated characteristics. Use it when you change motor, encoder, positioner
etc. Please note that wrong engine settings lead to device malfunction, can lead to irreversible damage of board.

See Also
get engine settings

Parameters
in

5.1.4.83

id
engine settings

an identifier of device
engine settings

result t XIMC API set entype settings ( device t id, const entype settings t ∗ entype settings )

Set engine type and driver type.
Generated on Fri Nov 29 2013 01:25:06 for libximc by Doxygen

5.1 ximc.h File Reference

114

Parameters
id
EngineType
DriverType

in
in

5.1.4.84

an identifier of device
engine type
driver type

result t XIMC API set extio settings ( device t id, const extio settings t ∗ extio settings )

Set EXTIO settings.
This function writes a structure with a set of EXTIO settings to controller’s memory. By default input event are
signalled through rising front and output states are signalled by high logic state.

See Also
get extio settings

Parameters
id
extio settings

in

5.1.4.85

an identifier of device
EXTIO settings

result t XIMC API set feedback settings ( device t id, const feedback settings t ∗

feedback settings )
Set feedback settings.

Parameters
id
IPS
FeedbackType
FeedbackFlags

in
in
in

5.1.4.86

an identifier of device
number of encoder pulses per shaft revolution. Range: 1..65535
type of feedback
flags of feedback

result t XIMC API set gear information ( device t id, const gear information t ∗ gear information

)
Set gear information to EEPROM.
Can be used by manufacturer only.

Parameters
in

5.1.4.87

id
gear information

an identifier of device
structure contains information about step gearhead

result t XIMC API set gear settings ( device t id, const gear settings t ∗ gear settings )

Set gear settings to EEPROM.
Can be used by manufacturer only.

Generated on Fri Nov 29 2013 01:25:06 for libximc by Doxygen

5.1 ximc.h File Reference

115

Parameters
id
gear settings

in

5.1.4.88

an identifier of device
structure contains step gearhead settings

result t XIMC API set hallsensor information ( device t id, const hallsensor information t ∗

hallsensor information )
Set hall sensor information to EEPROM.
Can be used by manufacturer only.

Parameters
id
hallsensor information

in

5.1.4.89

an identifier of device
structure contains information about hall sensor

result t XIMC API set hallsensor settings ( device t id, const hallsensor settings t ∗

hallsensor settings )
Set hall sensor settings to EEPROM.
Can be used by manufacturer only.

Parameters
id
hallsensor settings

in

5.1.4.90

an identifier of device
structure contains hall sensor settings

result t XIMC API set home settings ( device t id, const home settings t ∗ home settings )

Set home settings.
This function send structure with calibrating position settings to controller’s memory.

See Also
home settings t

Parameters
id
home settings

in

5.1.4.91

an identifier of device
calibrating position settings

result t XIMC API set joystick settings ( device t id, const joystick settings t ∗ joystick settings

)
Set settings of joystick.
If joystick position is outside DeadZone limits from the central position a movement with speed, defined by the
joystick DeadZone edge to 100% deviation, begins. Joystick positions inside DeadZone limits correspond to zero
speed (soft stop of motion) and positions beyond Low and High limits correspond MaxSpeed [i] or -MaxSpeed [i] (see
command SCTL), where i = 0 by default and can be changed with left/right buttons (see command SCTL). If next

Generated on Fri Nov 29 2013 01:25:06 for libximc by Doxygen

5.1 ximc.h File Reference

116

speed in list is zero (both integer and microstep parts), the button press is ignored. First speed in list shouldn’t be
zero. The DeadZone ranges are illustrated on the following picture. !/attachments/download/5563/range25p.png!
The relationship between the deviation and the rate is exponential, allowing no switching speed combine high
mobility and accuracy. The following picture illustrates this: !/attachments/download/3092/ExpJoystick.png! The
nonlinearity parameter is adjustable. Setting it to zero makes deviation/speed relation linear.

Parameters
id
joystick settings

in

5.1.4.92

an identifier of device
structure contains joystick settings

void XIMC API set logging callback ( logging callback t logging callback )

Sets a logging callback.
Call resets a callback to default (stderr, syslog) if NULL passed.

Parameters
logging callback

5.1.4.93

a callback for log messages

result t XIMC API set motor information ( device t id, const motor information t ∗
motor information )

Set motor information to EEPROM.
Can be used by manufacturer only.

Parameters
id
motor information

in

5.1.4.94

an identifier of device
structure contains motor information

result t XIMC API set motor settings ( device t id, const motor settings t ∗ motor settings )

Set motor settings to EEPROM.
Can be used by manufacturer only.

Parameters
id
motor settings

in

5.1.4.95

an identifier of device
structure contains motor information

result t XIMC API set move settings ( device t id, const move settings t ∗ move settings )

Set command setup movement (speed, acceleration, threshold and etc).

Parameters
in

id
move settings

an identifier of device
structure contains move settings: speed, acceleration, deceleration etc.

Generated on Fri Nov 29 2013 01:25:06 for libximc by Doxygen

5.1 ximc.h File Reference

5.1.4.96

117

result t XIMC API set pid settings ( device t id, const pid settings t ∗ pid settings )

Set PID settings.
This function send structure with set of PID factors to controller’s memory. These settings specify behaviour of
PID routine for voltage. These factors are slightly different for different positioners. All boards are supplied with
standart set of PID setting on controller’s flash memory. Please use it for loading new PID settings when you
change positioner. Please note that wrong PID settings lead to device malfunction.

See Also
get pid settings

Parameters
id
pid settings

in

5.1.4.97

an identifier of device
pid settings

result t XIMC API set position ( device t id, const set position t ∗ the set position )

Sets any position value in steps and micro for stepper motor and encoder steps of all engines.
It means, that changing main indicator of position.

Parameters
id
position

out

5.1.4.98

an identifier of device
structure contains move settings: speed, acceleration, deceleration etc.

result t XIMC API set power settings ( device t id, const power settings t ∗ power settings )

Set settings of step motor power control.
Used with stepper motor only.

Parameters
id
power settings

in

5.1.4.99

an identifier of device
structure contains settings of step motor power control

result t XIMC API set secure settings ( device t id, const secure settings t ∗ secure settings )

Set protection settings.

Parameters
id
secure settings

an identifier of device
structure with secure data

See Also
status t::flags

Generated on Fri Nov 29 2013 01:25:06 for libximc by Doxygen

5.1 ximc.h File Reference

118

5.1.4.100 result t XIMC API set serial number ( device t id, const serial number t ∗ serial number )
Write device serial number to controller’s flash memory.
Along with the new serial number a ”Key” is transmitted. The SN is changed and saved when keys match. Can be
used by manufacturer only.

Parameters
in

id
serial

an identifier of device
number structure contains new serial number and secret key.

5.1.4.101 result t XIMC API set stage information ( device t id, const stage information t ∗
stage information )
Set stage information to EEPROM.
Can be used by manufacturer only.

Parameters
in

id
stage information

an identifier of device
structure contains stage information

5.1.4.102 result t XIMC API set stage name ( device t id, const stage name t ∗ stage name )
Write user stage name from EEPROM.

Parameters
in

id
stage name

an identifier of device
structure contains previously set user stage name

5.1.4.103 result t XIMC API set stage settings ( device t id, const stage settings t ∗ stage settings )
Set stage settings to EEPROM.
Can be used by manufacturer only

Parameters
in

id
stage settings

an identifier of device
structure contains stage settings

5.1.4.104 result t XIMC API set sync in settings ( device t id, const sync in settings t ∗ sync in settings
)
Set input synchronization settings.
This function send structure with set of input synchronization settings, that specify behaviour of input synchronization, to controller’s memory. All boards are supplied with standart set of these settings.

Generated on Fri Nov 29 2013 01:25:06 for libximc by Doxygen

5.1 ximc.h File Reference

119

See Also
get sync in settings

Parameters
in

id
sync in settings

an identifier of device
synchronization settings

5.1.4.105 result t XIMC API set sync out settings ( device t id, const sync out settings t ∗
sync out settings )
Set output synchronization settings.
This function send structure with set of output synchronization settings, that specify behaviour of output synchronization, to controller’s memory. All boards are supplied with standart set of these settings.

See Also
get sync out settings

Parameters
id
sync out settings

in

an identifier of device
synchronization settings

5.1.4.106 result t XIMC API set uart settings ( device t id, const uart settings t ∗ uart settings )
Set UART settings.
This function send structure with UART settings to controller’s memory.

See Also
uart settings t

Parameters
in

Speed
uart settings

UART speed
UART settings

5.1.4.107 result t XIMC API write key ( const char ∗ name, uint8 t ∗ key )
Write controller key.
Can be used by manufacturer only

Parameters
in

name
key

a name of device
protection key. Range: 0..4294967295

Generated on Fri Nov 29 2013 01:25:06 for libximc by Doxygen

5.1 ximc.h File Reference

5.1.4.108 result t XIMC API ximc fix usbser sys ( const char ∗ device name )
Fix for errors in Windows USB driver stack.
Resets a driver if a device exists and in a hanged state.

void XIMC API ximc version ( char ∗ version )

5.1.4.109

Returns a library version.

Parameters
version

a buffer to hold a version string, 32 bytes is enough

Generated on Fri Nov 29 2013 01:25:06 for libximc by Doxygen

120

Index
A1Voltage
analog data t, 11
A1Voltage ADC
analog data t, 11
A2Voltage
analog data t, 11
A2Voltage ADC
analog data t, 11
ACurrent
analog data t, 12
ACurrent ADC
analog data t, 12
Accel
move settings calb t, 42
move settings t, 43
accessories settings t, 7
LimitSwitchesSettings, 8
MBRatedCurrent, 8
MBRatedVoltage, 8
MBSettings, 8
MBTorque, 8
MagneticBrakeInfo, 8
TSGrad, 8
TSMax, 8
TSMin, 8
TSSettings, 8
TemperatureSensorInfo, 8
Accuracy
sync out settings calb t, 59
sync out settings t, 60
add sync in action calb t, 9
Position, 9
Speed, 9
add sync in action t, 9
Speed, 9
uPosition, 9
uSpeed, 10
analog data t, 10
A1Voltage, 11
A1Voltage ADC, 11
A2Voltage, 11
A2Voltage ADC, 11
ACurrent, 12
ACurrent ADC, 12
B1Voltage, 12
B1Voltage ADC, 12
B2Voltage, 12
B2Voltage ADC, 12
BCurrent, 12

BCurrent ADC, 12
FullCurrent, 12
FullCurrent ADC, 12
Joy, 12
Joy ADC, 12
L, 13
L5, 13
L5 ADC, 13
Pot, 13
R, 13
SupVoltage, 13
SupVoltage ADC, 13
Temp, 13
Temp ADC, 13
Antiplay
engine settings calb t, 25
engine settings t, 26
AntiplaySpeed
move settings calb t, 42
move settings t, 43
B1Voltage
analog data t, 12
B1Voltage ADC
analog data t, 12
B2Voltage
analog data t, 12
B2Voltage ADC
analog data t, 12
BCurrent
analog data t, 12
BCurrent ADC
analog data t, 12
BORDER IS ENCODER
ximc.h, 82
BORDER STOP LEFT
ximc.h, 82
BORDER STOP RIGHT
ximc.h, 82
BRAKE ENABLED
ximc.h, 82
BRAKE ENG PWROFF
ximc.h, 82
BorderFlags
edges settings calb t, 21
edges settings t, 22
brake settings t, 13
BrakeFlags, 14
t1, 14
t2, 14

INDEX

t3, 14
t4, 14
BrakeFlags
brake settings t, 14
CONTROL MODE BITS
ximc.h, 82
CONTROL MODE JOY
ximc.h, 82
CONTROL MODE LR
ximc.h, 82
CONTROL MODE OFF
ximc.h, 83
CTP ALARM ON ERROR
ximc.h, 83
CTP BASE
ximc.h, 83
CTP ENABLED
ximc.h, 83
CTPFlags
ctp settings t, 20
CTPMinError
ctp settings t, 20
calibration t, 14
chart data t, 15
DutyCycle, 16
WindingCurrentA, 16
WindingCurrentB, 16
WindingCurrentC, 16
WindingVoltageA, 16
WindingVoltageB, 16
WindingVoltageC, 16
close device
ximc.h, 96
ClutterTime
sync in settings calb t, 57
sync in settings t, 58
CmdBufFreeSpace
status calb t, 53
status t, 55
command clear fram
ximc.h, 96
command eeread settings
ximc.h, 96
command eesave settings
ximc.h, 96
command home
ximc.h, 96
command left
ximc.h, 97
command loft
ximc.h, 97
command move
ximc.h, 97
command movr
ximc.h, 97
command power off
ximc.h, 97
command read settings
Generated on Fri Nov 29 2013 01:25:06 for libximc by Doxygen

122

ximc.h, 98
command reset
ximc.h, 98
command right
ximc.h, 98
command save settings
ximc.h, 98
command sstp
ximc.h, 98
command stop
ximc.h, 99
command update firmware
ximc.h, 99
command zero
ximc.h, 99
control settings calb t, 16
Flags, 17
MaxClickTime, 17
MaxSpeed, 17
Timeout, 17
control settings t, 17
Flags, 18
MaxClickTime, 18
MaxSpeed, 18
Timeout, 18
uDeltaPosition, 18
uMaxSpeed, 18
controller name t, 18
ControllerName, 19
CtrlFlags, 19
ControllerName
controller name t, 19
CriticalIpwr
secure settings t, 46
CriticalIusb
secure settings t, 46
CriticalT
secure settings t, 46
CriticalUpwr
secure settings t, 46
CriticalUusb
secure settings t, 47
ctp settings t, 19
CTPFlags, 20
CTPMinError, 20
CtrlFlags
controller name t, 19
CurPosition
status calb t, 53
status t, 55
CurSpeed
status calb t, 53
status t, 55
CurT
status calb t, 53
status t, 55
CurrReductDelay
power settings t, 45

INDEX

CurrentSetTime
power settings t, 45
DRIVER TYPE EXTERNAL
ximc.h, 83
DeadZone
joystick settings t, 37
debug read t, 20
DebugData, 20
DebugData
debug read t, 20
Decel
move settings calb t, 42
move settings t, 43
DetentTorque
motor settings t, 40
device information t, 20
DriverType
entype settings t, 28
DutyCycle
chart data t, 16
EEPROM PRECEDENCE
ximc.h, 83
ENC STATE ABSENT
ximc.h, 83
ENC STATE MALFUNC
ximc.h, 83
ENC STATE OK
ximc.h, 83
ENC STATE REVERS
ximc.h, 83
ENC STATE UNKNOWN
ximc.h, 84
ENDER SW1 ACTIVE LOW
ximc.h, 84
ENDER SW2 ACTIVE LOW
ximc.h, 84
ENDER SWAP
ximc.h, 84
ENGINE ACCEL ON
ximc.h, 84
ENGINE ANTIPLAY
ximc.h, 84
ENGINE LIMIT CURR
ximc.h, 84
ENGINE LIMIT RPM
ximc.h, 84
ENGINE LIMIT VOLT
ximc.h, 84
ENGINE MAX SPEED
ximc.h, 84
ENGINE REVERSE
ximc.h, 84
ENGINE TYPE 2DC
ximc.h, 85
ENGINE TYPE DC
ximc.h, 85
ENGINE TYPE NONE
Generated on Fri Nov 29 2013 01:25:06 for libximc by Doxygen

123

ximc.h, 85
ENGINE TYPE STEP
ximc.h, 85
ENGINE TYPE TEST
ximc.h, 85
ENUMERATE PROBE
ximc.h, 85
EXTIO SETUP INVERT
ximc.h, 85
EXTIO SETUP OUTPUT
ximc.h, 86
EXTIOModeFlags
extio settings t, 28
EXTIOSetupFlags
extio settings t, 28
edges settings calb t, 21
BorderFlags, 21
EnderFlags, 21
LeftBorder, 21
RightBorder, 21
edges settings t, 21
BorderFlags, 22
EnderFlags, 22
LeftBorder, 22
RightBorder, 22
uLeftBorder, 22
uRightBorder, 22
Efficiency
gear settings t, 31
EncPosition
get position calb t, 32
get position t, 33
set position calb t, 48
set position t, 49
status calb t, 53
status t, 55
EncSts
status calb t, 53
status t, 55
encoder information t, 23
Manufacturer, 23
PartNumber, 23
encoder settings t, 23
EncoderSettings, 24
MaxCurrentConsumption, 24
MaxOperatingFrequency, 24
SupplyVoltageMax, 24
SupplyVoltageMin, 24
EncoderSettings
encoder settings t, 24
EnderFlags
edges settings calb t, 21
edges settings t, 22
engine settings calb t, 24
Antiplay, 25
EngineFlags, 25
MicrostepMode, 25
NomCurrent, 25

INDEX

NomSpeed, 25
NomVoltage, 25
StepsPerRev, 25
engine settings t, 26
Antiplay, 26
EngineFlags, 26
MicrostepMode, 27
NomCurrent, 27
NomSpeed, 27
NomVoltage, 27
StepsPerRev, 27
uNomSpeed, 27
EngineFlags
engine settings calb t, 25
engine settings t, 26
EngineType
entype settings t, 28
entype settings t, 27
DriverType, 28
EngineType, 28
enumerate devices
ximc.h, 99
ExpFactor
joystick settings t, 37
extio settings t, 28
EXTIOModeFlags, 28
EXTIOSetupFlags, 28
FEEDBACK EMF
ximc.h, 86
FEEDBACK ENC REVERSE
ximc.h, 86
FEEDBACK ENCODER
ximc.h, 86
FEEDBACK ENCODERHALL
ximc.h, 87
FEEDBACK NONE
ximc.h, 87
FastHome
home settings calb t, 35
home settings t, 36
feedback settings t, 29
FeedbackFlags, 29
FeedbackType, 29
HallSPR, 29
HallShift, 29
FeedbackFlags
feedback settings t, 29
FeedbackType
feedback settings t, 29
Flags
control settings calb t, 17
control settings t, 18
secure settings t, 47
status calb t, 53
status t, 55
free enumerate devices
ximc.h, 99
FullCurrent
Generated on Fri Nov 29 2013 01:25:06 for libximc by Doxygen

124

analog data t, 12
FullCurrent ADC
analog data t, 12
GPIOFlags
status calb t, 53
status t, 55
gear information t, 30
Manufacturer, 30
PartNumber, 30
gear settings t, 30
Efficiency, 31
InputInertia, 31
MaxOutputBacklash, 31
RatedInputSpeed, 31
RatedInputTorque, 31
ReductionIn, 31
ReductionOut, 31
get accessories settings
ximc.h, 100
get analog data
ximc.h, 100
get bootloader version
ximc.h, 100
get brake settings
ximc.h, 100
get chart data
ximc.h, 100
get control settings
ximc.h, 101
get controller name
ximc.h, 101
get ctp settings
ximc.h, 101
get debug read
ximc.h, 101
get device count
ximc.h, 102
get device information
ximc.h, 102
get device name
ximc.h, 102
get edges settings
ximc.h, 102
get encoder information
ximc.h, 103
get encoder settings
ximc.h, 103
get engine settings
ximc.h, 103
get entype settings
ximc.h, 103
get enumerate device information
ximc.h, 104
get enumerate device serial
ximc.h, 104
get extio settings
ximc.h, 104
get feedback settings

INDEX

ximc.h, 104
get firmware version
ximc.h, 104
get gear information
ximc.h, 105
get gear settings
ximc.h, 105
get hallsensor information
ximc.h, 105
get hallsensor settings
ximc.h, 105
get home settings
ximc.h, 105
get joystick settings
ximc.h, 106
get motor information
ximc.h, 106
get motor settings
ximc.h, 106
get move settings
ximc.h, 106
get pid settings
ximc.h, 107
get position
ximc.h, 107
get position calb t, 32
EncPosition, 32
Position, 32
get position t, 32
EncPosition, 33
get power settings
ximc.h, 107
get secure settings
ximc.h, 107
get serial number
ximc.h, 108
get stage information
ximc.h, 108
get stage name
ximc.h, 108
get stage settings
ximc.h, 108
get status
ximc.h, 108
get status calb
ximc.h, 109
get sync in settings
ximc.h, 109
get sync out settings
ximc.h, 109
get uart settings
ximc.h, 109
goto firmware
ximc.h, 110
H BRIDGE ALERT
ximc.h, 87
HOME DIR FIRST
ximc.h, 87
Generated on Fri Nov 29 2013 01:25:06 for libximc by Doxygen

125

HOME DIR SECOND
ximc.h, 87
HOME HALF MV
ximc.h, 87
HOME MV SEC EN
ximc.h, 87
HOME STOP FIRST LIM
ximc.h, 87
HOME STOP FIRST REV
ximc.h, 87
HOME STOP FIRST SYN
ximc.h, 87
HallSPR
feedback settings t, 29
HallShift
feedback settings t, 29
hallsensor information t, 33
Manufacturer, 33
PartNumber, 33
hallsensor settings t, 33
MaxCurrentConsumption, 34
MaxOperatingFrequency, 34
SupplyVoltageMax, 34
SupplyVoltageMin, 34
has firmware
ximc.h, 110
HoldCurrent
power settings t, 45
home settings calb t, 34
FastHome, 35
HomeDelta, 35
HomeFlags, 35
SlowHome, 35
home settings t, 35
FastHome, 36
HomeDelta, 36
HomeFlags, 36
SlowHome, 36
uFastHome, 36
uHomeDelta, 36
uSlowHome, 36
HomeDelta
home settings calb t, 35
home settings t, 36
HomeFlags
home settings calb t, 35
home settings t, 36
HorizontalLoadCapacity
stage settings t, 51
InputInertia
gear settings t, 31
Ipwr
status calb t, 53
status t, 56
Iusb
status calb t, 53
status t, 56

INDEX

JOY REVERSE
ximc.h, 88
Joy
analog data t, 12
Joy ADC
analog data t, 12
JoyCenter
joystick settings t, 37
JoyFlags
joystick settings t, 37
JoyHighEnd
joystick settings t, 37
JoyLowEnd
joystick settings t, 38
joystick settings t, 36
DeadZone, 37
ExpFactor, 37
JoyCenter, 37
JoyFlags, 37
JoyHighEnd, 37
JoyLowEnd, 38
Key
serial number t, 48
L
analog data t, 13
L5
analog data t, 13
L5 ADC
analog data t, 13
LOW UPWR PROTECTION
ximc.h, 88
LeadScrewPitch
stage settings t, 51
LeftBorder
edges settings calb t, 21
edges settings t, 22
LimitSwitchesSettings
accessories settings t, 8
logging callback stderr narrow
ximc.h, 110
logging callback stderr wide
ximc.h, 110
logging callback t
ximc.h, 95
LowUpwrOff
secure settings t, 47
MBRatedCurrent
accessories settings t, 8
MBRatedVoltage
accessories settings t, 8
MBSettings
accessories settings t, 8
MBTorque
accessories settings t, 8
MICROSTEP MODE FULL
ximc.h, 89
Generated on Fri Nov 29 2013 01:25:06 for libximc by Doxygen

126

MOVE STATE ANTIPLAY
ximc.h, 89
MOVE STATE MOVING
ximc.h, 89
MVCMD ERROR
ximc.h, 89
MVCMD HOME
ximc.h, 89
MVCMD LEFT
ximc.h, 89
MVCMD LOFT
ximc.h, 89
MVCMD MOVE
ximc.h, 89
MVCMD MOVR
ximc.h, 89
MVCMD NAME BITS
ximc.h, 90
MVCMD RIGHT
ximc.h, 90
MVCMD RUNNING
ximc.h, 90
MVCMD SSTP
ximc.h, 90
MVCMD STOP
ximc.h, 90
MVCMD UKNWN
ximc.h, 90
MagneticBrakeInfo
accessories settings t, 8
Manufacturer
encoder information t, 23
gear information t, 30
hallsensor information t, 33
motor information t, 38
stage information t, 49
MaxClickTime
control settings calb t, 17
control settings t, 18
MaxCurrent
motor settings t, 40
MaxCurrentConsumption
encoder settings t, 24
hallsensor settings t, 34
stage settings t, 51
MaxCurrentTime
motor settings t, 40
MaxOperatingFrequency
encoder settings t, 24
hallsensor settings t, 34
MaxOutputBacklash
gear settings t, 31
MaxSpeed
control settings calb t, 17
control settings t, 18
motor settings t, 40
stage settings t, 51
MechanicalTimeConstant

INDEX

motor settings t, 40
MicrostepMode
engine settings calb t, 25
engine settings t, 27
MinimumUusb
secure settings t, 47
motor information t, 38
Manufacturer, 38
PartNumber, 38
motor settings t, 38
DetentTorque, 40
MaxCurrent, 40
MaxCurrentTime, 40
MaxSpeed, 40
MechanicalTimeConstant, 40
MotorType, 40
NoLoadCurrent, 40
NoLoadSpeed, 40
NominalCurrent, 40
NominalPower, 41
NominalSpeed, 41
NominalTorque, 41
NominalVoltage, 41
Phases, 41
Poles, 41
RotorInertia, 41
SpeedConstant, 41
SpeedTorqueGradient, 41
StallTorque, 41
TorqueConstant, 42
WindingInductance, 42
WindingResistance, 42
MotorType
motor settings t, 40
move settings calb t, 42
Accel, 42
AntiplaySpeed, 42
Decel, 42
Speed, 42
move settings t, 43
Accel, 43
AntiplaySpeed, 43
Decel, 43
Speed, 43
uAntiplaySpeed, 44
uSpeed, 44
MoveSts
status calb t, 53
status t, 56
msec sleep
ximc.h, 110
MvCmdSts
status calb t, 53
status t, 56
NoLoadCurrent
motor settings t, 40
NoLoadSpeed
motor settings t, 40
Generated on Fri Nov 29 2013 01:25:06 for libximc by Doxygen

127

NomCurrent
engine settings calb t, 25
engine settings t, 27
NomSpeed
engine settings calb t, 25
engine settings t, 27
NomVoltage
engine settings calb t, 25
engine settings t, 27
NominalCurrent
motor settings t, 40
NominalPower
motor settings t, 41
NominalSpeed
motor settings t, 41
NominalTorque
motor settings t, 41
NominalVoltage
motor settings t, 41
open device
ximc.h, 111
POWER OFF ENABLED
ximc.h, 90
POWER REDUCT ENABLED
ximc.h, 90
POWER SMOOTH CURRENT
ximc.h, 90
PWR STATE MAX
ximc.h, 90
PWR STATE NORM
ximc.h, 90
PWR STATE OFF
ximc.h, 90
PWR STATE REDUCT
ximc.h, 91
PWR STATE UNKNOWN
ximc.h, 91
PWRSts
status calb t, 53
status t, 56
PartNumber
encoder information t, 23
gear information t, 30
hallsensor information t, 33
motor information t, 38
stage information t, 49
Phases
motor settings t, 41
pid settings t, 44
Poles
motor settings t, 41
PosFlags
set position calb t, 48
set position t, 49
Position
add sync in action calb t, 9
get position calb t, 32

INDEX

set position calb t, 48
sync in settings calb t, 57
PositionerName
stage name t, 50
Pot
analog data t, 13
power settings t, 44
CurrReductDelay, 45
CurrentSetTime, 45
HoldCurrent, 45
PowerFlags, 45
PowerOffDelay, 45
PowerFlags
power settings t, 45
PowerOffDelay
power settings t, 45
probe device
ximc.h, 111
R
analog data t, 13
REV SENS INV
ximc.h, 91
RatedInputSpeed
gear settings t, 31
RatedInputTorque
gear settings t, 31
ReductionIn
gear settings t, 31
ReductionOut
gear settings t, 31
RightBorder
edges settings calb t, 21
edges settings t, 22
RotorInertia
motor settings t, 41
SN
serial number t, 48
STATE ALARM
ximc.h, 91
STATE BRAKE
ximc.h, 91
STATE BUTTON LEFT
ximc.h, 91
STATE BUTTON RIGHT
ximc.h, 91
STATE CONTR
ximc.h, 91
STATE CTP ERROR
ximc.h, 92
STATE DIG SIGNAL
ximc.h, 92
STATE ENC A
ximc.h, 92
STATE ENC B
ximc.h, 92
STATE ERRC
ximc.h, 92
Generated on Fri Nov 29 2013 01:25:06 for libximc by Doxygen

128

STATE ERRD
ximc.h, 92
STATE ERRV
ximc.h, 92
STATE GPIO LEVEL
ximc.h, 92
STATE GPIO PINOUT
ximc.h, 92
STATE HALL A
ximc.h, 92
STATE HALL B
ximc.h, 92
STATE HALL C
ximc.h, 93
STATE LEFT EDGE
ximc.h, 93
STATE POWER OVERHEAT
ximc.h, 93
STATE REV SENSOR
ximc.h, 93
STATE RIGHT EDGE
ximc.h, 93
STATE SECUR
ximc.h, 93
STATE SYNC INPUT
ximc.h, 93
STATE SYNC OUTPUT
ximc.h, 94
SYNCIN ENABLED
ximc.h, 94
SYNCIN GOTOPOSITION
ximc.h, 94
SYNCIN INVERT
ximc.h, 94
SYNCOUT ENABLED
ximc.h, 94
SYNCOUT IN STEPS
ximc.h, 94
SYNCOUT INVERT
ximc.h, 94
SYNCOUT ONPERIOD
ximc.h, 94
SYNCOUT ONSTART
ximc.h, 94
SYNCOUT ONSTOP
ximc.h, 94
SYNCOUT STATE
ximc.h, 94
secure settings t, 46
CriticalIpwr, 46
CriticalIusb, 46
CriticalT, 46
CriticalUpwr, 46
CriticalUusb, 47
Flags, 47
LowUpwrOff, 47
MinimumUusb, 47
serial number t, 47

INDEX

Key, 48
SN, 48
service command updf
ximc.h, 111
set accessories settings
ximc.h, 111
set add sync in action
ximc.h, 111
set brake settings
ximc.h, 111
set control settings
ximc.h, 112
set controller name
ximc.h, 112
set ctp settings
ximc.h, 112
set edges settings
ximc.h, 112
set encoder information
ximc.h, 113
set encoder settings
ximc.h, 113
set engine settings
ximc.h, 113
set entype settings
ximc.h, 113
set extio settings
ximc.h, 114
set feedback settings
ximc.h, 114
set gear information
ximc.h, 114
set gear settings
ximc.h, 114
set hallsensor information
ximc.h, 115
set hallsensor settings
ximc.h, 115
set home settings
ximc.h, 115
set joystick settings
ximc.h, 115
set logging callback
ximc.h, 116
set motor information
ximc.h, 116
set motor settings
ximc.h, 116
set move settings
ximc.h, 116
set pid settings
ximc.h, 116
set position
ximc.h, 117
set position calb t, 48
EncPosition, 48
PosFlags, 48
Position, 48

Generated on Fri Nov 29 2013 01:25:06 for libximc by Doxygen

129

set position t, 48
EncPosition, 49
PosFlags, 49
set power settings
ximc.h, 117
set secure settings
ximc.h, 117
set serial number
ximc.h, 117
set stage information
ximc.h, 118
set stage name
ximc.h, 118
set stage settings
ximc.h, 118
set sync in settings
ximc.h, 118
set sync out settings
ximc.h, 119
set uart settings
ximc.h, 119
SlowHome
home settings calb t, 35
home settings t, 36
Speed
add sync in action calb t, 9
add sync in action t, 9
move settings calb t, 42
move settings t, 43
sync in settings calb t, 57
sync in settings t, 58
SpeedConstant
motor settings t, 41
SpeedTorqueGradient
motor settings t, 41
stage information t, 49
Manufacturer, 49
PartNumber, 49
stage name t, 50
PositionerName, 50
stage settings t, 50
HorizontalLoadCapacity, 51
LeadScrewPitch, 51
MaxCurrentConsumption, 51
MaxSpeed, 51
SupplyVoltageMax, 51
SupplyVoltageMin, 51
TravelRange, 51
Units, 51
VerticalLoadCapacity, 52
StallTorque
motor settings t, 41
status calb t, 52
CmdBufFreeSpace, 53
CurPosition, 53
CurSpeed, 53
CurT, 53
EncPosition, 53

INDEX

EncSts, 53
Flags, 53
GPIOFlags, 53
Ipwr, 53
Iusb, 53
MoveSts, 53
MvCmdSts, 53
PWRSts, 53
Upwr, 54
Uusb, 54
WindSts, 54
status t, 54
CmdBufFreeSpace, 55
CurPosition, 55
CurSpeed, 55
CurT, 55
EncPosition, 55
EncSts, 55
Flags, 55
GPIOFlags, 55
Ipwr, 56
Iusb, 56
MoveSts, 56
MvCmdSts, 56
PWRSts, 56
uCurPosition, 56
uCurSpeed, 56
Upwr, 56
Uusb, 56
WindSts, 56
StepsPerRev
engine settings calb t, 25
engine settings t, 27
SupVoltage
analog data t, 13
SupVoltage ADC
analog data t, 13
SupplyVoltageMax
encoder settings t, 24
hallsensor settings t, 34
stage settings t, 51
SupplyVoltageMin
encoder settings t, 24
hallsensor settings t, 34
stage settings t, 51
sync in settings calb t, 57
ClutterTime, 57
Position, 57
Speed, 57
SyncInFlags, 57
sync in settings t, 57
ClutterTime, 58
Speed, 58
SyncInFlags, 58
uPosition, 58
uSpeed, 58
sync out settings calb t, 58
Accuracy, 59

Generated on Fri Nov 29 2013 01:25:06 for libximc by Doxygen

130

SyncOutFlags, 59
SyncOutPeriod, 59
SyncOutPulseSteps, 59
sync out settings t, 59
Accuracy, 60
SyncOutFlags, 60
SyncOutPeriod, 60
SyncOutPulseSteps, 60
uAccuracy, 60
SyncInFlags
sync in settings calb t, 57
sync in settings t, 58
SyncOutFlags
sync out settings calb t, 59
sync out settings t, 60
SyncOutPeriod
sync out settings calb t, 59
sync out settings t, 60
SyncOutPulseSteps
sync out settings calb t, 59
sync out settings t, 60
t1
brake settings t, 14
t2
brake settings t, 14
t3
brake settings t, 14
t4
brake settings t, 14
TSGrad
accessories settings t, 8
TSMax
accessories settings t, 8
TSMin
accessories settings t, 8
TSSettings
accessories settings t, 8
Temp
analog data t, 13
Temp ADC
analog data t, 13
TemperatureSensorInfo
accessories settings t, 8
Timeout
control settings calb t, 17
control settings t, 18
TorqueConstant
motor settings t, 42
TravelRange
stage settings t, 51
UART PARITY BITS
ximc.h, 94
UARTSetupFlags
uart settings t, 61
uAccuracy
sync out settings t, 60
uAntiplaySpeed

INDEX

move settings t, 44
uCurPosition
status t, 56
uCurSpeed
status t, 56
uDeltaPosition
control settings t, 18
uFastHome
home settings t, 36
uHomeDelta
home settings t, 36
uLeftBorder
edges settings t, 22
uMaxSpeed
control settings t, 18
uNomSpeed
engine settings t, 27
uPosition
add sync in action t, 9
sync in settings t, 58
uRightBorder
edges settings t, 22
uSlowHome
home settings t, 36
uSpeed
add sync in action t, 10
move settings t, 44
sync in settings t, 58
uart settings t, 60
UARTSetupFlags, 61
Units
stage settings t, 51
Upwr
status calb t, 54
status t, 56
Uusb
status calb t, 54
status t, 56
VerticalLoadCapacity
stage settings t, 52
WIND A STATE ABSENT
ximc.h, 95
WIND A STATE OK
ximc.h, 95
WIND B STATE ABSENT
ximc.h, 95
WIND B STATE OK
ximc.h, 95
WindSts
status calb t, 54
status t, 56
WindingCurrentA
chart data t, 16
WindingCurrentB
chart data t, 16
WindingCurrentC
chart data t, 16
Generated on Fri Nov 29 2013 01:25:06 for libximc by Doxygen

131

WindingInductance
motor settings t, 42
WindingResistance
motor settings t, 42
WindingVoltageA
chart data t, 16
WindingVoltageB
chart data t, 16
WindingVoltageC
chart data t, 16
write key
ximc.h, 119
XIMC API
ximc.h, 95
ximc.h, 62
BORDER IS ENCODER, 82
BORDER STOP LEFT, 82
BORDER STOP RIGHT, 82
BRAKE ENABLED, 82
BRAKE ENG PWROFF, 82
CONTROL MODE BITS, 82
CONTROL MODE JOY, 82
CONTROL MODE LR, 82
CONTROL MODE OFF, 83
CTP ALARM ON ERROR, 83
CTP BASE, 83
CTP ENABLED, 83
close device, 96
command clear fram, 96
command eeread settings, 96
command eesave settings, 96
command home, 96
command left, 97
command loft, 97
command move, 97
command movr, 97
command power off, 97
command read settings, 98
command reset, 98
command right, 98
command save settings, 98
command sstp, 98
command stop, 99
command update firmware, 99
command zero, 99
EEPROM PRECEDENCE, 83
ENC STATE ABSENT, 83
ENC STATE MALFUNC, 83
ENC STATE OK, 83
ENC STATE REVERS, 83
ENC STATE UNKNOWN, 84
ENDER SWAP, 84
ENGINE ACCEL ON, 84
ENGINE ANTIPLAY, 84
ENGINE LIMIT CURR, 84
ENGINE LIMIT RPM, 84
ENGINE LIMIT VOLT, 84
ENGINE MAX SPEED, 84

INDEX

ENGINE REVERSE, 84
ENGINE TYPE 2DC, 85
ENGINE TYPE DC, 85
ENGINE TYPE NONE, 85
ENGINE TYPE STEP, 85
ENGINE TYPE TEST, 85
ENUMERATE PROBE, 85
EXTIO SETUP INVERT, 85
EXTIO SETUP OUTPUT, 86
enumerate devices, 99
FEEDBACK EMF, 86
FEEDBACK ENCODER, 86
FEEDBACK ENCODERHALL, 87
FEEDBACK NONE, 87
free enumerate devices, 99
get accessories settings, 100
get analog data, 100
get bootloader version, 100
get brake settings, 100
get chart data, 100
get control settings, 101
get controller name, 101
get ctp settings, 101
get debug read, 101
get device count, 102
get device information, 102
get device name, 102
get edges settings, 102
get encoder information, 103
get encoder settings, 103
get engine settings, 103
get entype settings, 103
get enumerate device information, 104
get enumerate device serial, 104
get extio settings, 104
get feedback settings, 104
get firmware version, 104
get gear information, 105
get gear settings, 105
get hallsensor information, 105
get hallsensor settings, 105
get home settings, 105
get joystick settings, 106
get motor information, 106
get motor settings, 106
get move settings, 106
get pid settings, 107
get position, 107
get power settings, 107
get secure settings, 107
get serial number, 108
get stage information, 108
get stage name, 108
get stage settings, 108
get status, 108
get status calb, 109
get sync in settings, 109
get sync out settings, 109

Generated on Fri Nov 29 2013 01:25:06 for libximc by Doxygen

132

get uart settings, 109
goto firmware, 110
H BRIDGE ALERT, 87
HOME DIR FIRST, 87
HOME DIR SECOND, 87
HOME HALF MV, 87
HOME MV SEC EN, 87
has firmware, 110
JOY REVERSE, 88
LOW UPWR PROTECTION, 88
logging callback stderr narrow, 110
logging callback stderr wide, 110
logging callback t, 95
MICROSTEP MODE FULL, 89
MOVE STATE ANTIPLAY, 89
MOVE STATE MOVING, 89
MVCMD ERROR, 89
MVCMD HOME, 89
MVCMD LEFT, 89
MVCMD LOFT, 89
MVCMD MOVE, 89
MVCMD MOVR, 89
MVCMD NAME BITS, 90
MVCMD RIGHT, 90
MVCMD RUNNING, 90
MVCMD SSTP, 90
MVCMD STOP, 90
MVCMD UKNWN, 90
msec sleep, 110
open device, 111
POWER OFF ENABLED, 90
PWR STATE MAX, 90
PWR STATE NORM, 90
PWR STATE OFF, 90
PWR STATE REDUCT, 91
PWR STATE UNKNOWN, 91
probe device, 111
REV SENS INV, 91
STATE ALARM, 91
STATE BRAKE, 91
STATE BUTTON LEFT, 91
STATE BUTTON RIGHT, 91
STATE CONTR, 91
STATE CTP ERROR, 92
STATE DIG SIGNAL, 92
STATE ENC A, 92
STATE ENC B, 92
STATE ERRC, 92
STATE ERRD, 92
STATE ERRV, 92
STATE GPIO LEVEL, 92
STATE GPIO PINOUT, 92
STATE HALL A, 92
STATE HALL B, 92
STATE HALL C, 93
STATE LEFT EDGE, 93
STATE REV SENSOR, 93
STATE RIGHT EDGE, 93

INDEX

STATE SECUR, 93
STATE SYNC INPUT, 93
STATE SYNC OUTPUT, 94
SYNCIN ENABLED, 94
SYNCIN GOTOPOSITION, 94
SYNCIN INVERT, 94
SYNCOUT ENABLED, 94
SYNCOUT IN STEPS, 94
SYNCOUT INVERT, 94
SYNCOUT ONPERIOD, 94
SYNCOUT ONSTART, 94
SYNCOUT ONSTOP, 94
SYNCOUT STATE, 94
service command updf, 111
set accessories settings, 111
set add sync in action, 111
set brake settings, 111
set control settings, 112
set controller name, 112
set ctp settings, 112
set edges settings, 112
set encoder information, 113
set encoder settings, 113
set engine settings, 113
set entype settings, 113
set extio settings, 114
set feedback settings, 114
set gear information, 114
set gear settings, 114
set hallsensor information, 115
set hallsensor settings, 115
set home settings, 115
set joystick settings, 115
set logging callback, 116
set motor information, 116
set motor settings, 116
set move settings, 116
set pid settings, 116
set position, 117
set power settings, 117
set secure settings, 117
set serial number, 117
set stage information, 118
set stage name, 118
set stage settings, 118
set sync in settings, 118
set sync out settings, 119
set uart settings, 119
UART PARITY BITS, 94
WIND A STATE OK, 95
WIND B STATE OK, 95
write key, 119
XIMC API, 95
ximc fix usbser sys, 119
ximc version, 120
ximc fix usbser sys
ximc.h, 119
ximc version

Generated on Fri Nov 29 2013 01:25:06 for libximc by Doxygen

133

ximc.h, 120



Source Exif Data:
File Type                       : PDF
File Type Extension             : pdf
MIME Type                       : application/pdf
PDF Version                     : 1.5
Linearized                      : No
Page Count                      : 152
Page Mode                       : UseOutlines
Author                          : 
Title                           : 
Subject                         : 
Creator                         : LaTeX with hyperref package
Producer                        : pdfTeX-1.40.13
Create Date                     : 2013:11:29 01:25:12+04:00
Modify Date                     : 2013:11:29 01:25:12+04:00
Trapped                         : False
PTEX Fullbanner                 : This is pdfTeX, Version 3.1415926-2.4-1.40.13 (TeX Live 2012/Debian) kpathsea version 6.1.0
EXIF Metadata provided by EXIF.tools

Navigation menu