UIrobot UIM2842 User manual

User Manual
UIM2842
CAN2.0B Instruction Control
Miniature Integrated Stepper Motor Controller
(Closed-loop)
V1.0

Page 2
M4220170607EN
UI Robot Technology Co. Ltd.
UIM2842
Please pay attention to the following before using the UIROBOT products:
1. UIROBOT products meet the specification contained in their particular Data Sheet.
2. UIROBOT will only work with the customer who respects the Intellectual Property (IP) protection.
3. Attempts to break UIROBOT’s IP protection feature may be a violation of the local Copyright Acts. If such acts lead to unauthorized
access to UIROBOT’s IP work, UIROBOT has a right to sue for relief under that Act.
Information contained in this publication regarding controller applications and the like is provided only for your convenienc e
and may be superseded by updates. It is your responsibility to ensure that your application meets with your specifications.
UIROBOT MAKES NO REPRESENTATIONS OR WARRANTIES OF ANY KIND WHETHER EXPRESS OR
IMPLIED, WRITTEN OR ORAL, STATUTORY OR OTHERWISE, RELATED TO THE INFORMATION,
INCLUDING BUT NOT LIMITED TO ITS CONDITION, QUALITY, PERFORMANCE, MERCHANTABILITY OR
FITNESS FOR PURPOSE. UIROBOT disclaims all liability arising from this information and its use. Use of UIROBOT
products in life support and/or safety applications is entirely at the buyer’s risk, and the buyer agrees to defend, indemnif y and
hold harmless UIROBOT from any and all damages, claims, suits, or expenses resulting from such use. No licenses are
conveyed, implicitly or otherwise, under any UIROBOT intellectual property rights.
[Trade Mark/ Layout-design/Patent]
The UIROBOT name and logo are registered trademarks of UIROBOT Ltd. in the P.R. China and other countries.
UIROBOT’s UIM24XXX series Step Motor Controllers, UIM25XX series CAN-RS232 Converter and their layout designs are
patent protected.
[Contact]
SHANGHAI UNITED INTELLIGENCE ROBOTICS INC.
ADD : Rm 202-203, Building Y2, No, 112 Liang Xiu Rd, Zhangjiang Innopark,Shanghai,China
Z I P : 201203
T E L :021 – 61182435(sales,Marketing)
F A X:021 – 61182431
N E T:www.uirobot.com
Email:[email protected]
[UIM2842 Ordering Information]
In order to serve you quicker and better, please provide the product number in following format.
UIM2842 PART NUMBERING SYSTEM
Category
Motor
Control
2
8
4
UIM
2
Series
For NEMA 28
stepper motors
CAN2.0
Control

UI Robot Technology Co. Ltd.
M4220170607EN
Page 3
Miniature Integrated Stepper Motor Controller(Closed-loop)
UIM2842
CAN2.0Instruction Control
Miniature Integrated Stepper Motor Contrller
Miniature Integral Design
Miniature size 23mm*28.1mm*15mm
Fit onto motors seamlessly
Die-cast aluminum enclosure, improving
heat dissipation and durability
Motor Driving Characteristics
Wide supply voltage range 12 ~ 28VDC
Output current 1A, instruction adjustable
Full to 16th micro-step resolution
Dual full H-bridge with PWM constant
current control
Network Communication
CAN2.0 A / B
2-wire interface, max 1M bps operation,
long distance
Differential bus, high noise immunity,
max 100 nodes
Embedded DSP Microprocessor
Hardware DSP, 64bits calculating
precision
Abundant and simple instructions
Intelligent control, intuitive and fault-
tolerating
SDK and underlying control drive of
host
VC++, C, C# , VB demo
Advanced Motion Control
Absolute position record / feedback,
Power-failure position protection
Quadrature encoder based closed-loop
control
linear and non-linear acceleration and
deceleration, S-curve, PT/PVT
displacement control
Backlash compensation
Advanced I / O Control (without host)
3 sensor input ports, 1 analog input
(12bit)
1 TTL output
3 trigger mode (continuous /
intermittent / single)
8 independent motion parameter group
Pre-set action controlled by I/O
I/O triggers real-time event-based
change notification(RTCN)
12 real-time event-based change
notifications
14 programmable actions triggered by 8
sensor events
Others
Initial status configurate
Auto-lock when emergency
User program

Page 4
M4220170607EN
UI Robot Technology Co. Ltd.
UIM2842
GENERAL DESCRIPTION
UIM2842 is a kind of miniature stepper motor controller with CAN network interface.
UIM2842 controller can be mounted onto NEMA11 series stepper motor through adapting
flanges. Total thickness of the controller is less than 15mm.
With UIM2842 controller, it is simple to construct a control system. Users can control the
whole “motor-sensor-third party actuator” system through their own CAN based host by
using “SimpleCAN” protocol. Users also can control the system through a gateway
produced by UIrobot, such as UIM2501, USBC9100 and PCI120, by using RS232 based
string or “SimpleCAN” protocol. One gateway can network with up to 100 UIM242
controllers.
UIM2842 can realize encoder-based closed-loop control. Its architecture includes
communication system, basic motion control system, advanced motion control module
(linear/non-linear acceleration/deceleration, S-curve PT/PVT displacement control),
sensor input control module, TTL output control module and user programming module.
Embedded 64-bit calculating precision DSP controller guarantees the entire control
process finish within 1 millisecond. Instructions are simple and intuitive. UIROBOT
provides free Microsoft Windows based VB/VC demo software and corresponding source
code.
Enclosure is made of die-cast aluminum to provide a rugged durable protection and
improves the heat dissipation.

UI Robot Technology Co. Ltd.
M4220170607EN
Page 5
Miniature Integrated Stepper Motor Controller(Closed-loop)
TERMINAL DESCRIPTION
Figure0-1: Connection Terminal - Front
Figure0-2: Connection Terminal –Back
Control Terminal
Terminal
No.
Designator
Description
1
+5V
5V voltage output (80mA)
2
AG
Analog ground for sensors
3
S3
Sensor input port 3
4
P4
TTL signal output port
5
S1
Sensor input port 1
6
S2
Sensor input port 2
7
CANH
CAN signal dominant high
8
CANL
CAN signal dominant low
9,10
GND
Supply voltage ground
(positive and negative can not be connected wrong)
11,12
VCC
Supply voltage,12~28VDC
Control Treminal
VCC
GND
CANH
CANL
S2
S1
S3
P4
+5V
AG
2
1
12
11
LED
UIM2842
Motor
Terminal
A-
A+
B+
B-
Encoder
terminal
Z
B
A
GND
+5V

Page 6
M4220170607EN
UI Robot Technology Co. Ltd.
UIM2842
Motor Terminals
Terminal No.
Description
A+ / A-
Connect to the stepper motor phase A
B+ / B-
Connect to the stepper motor phase B
WARNING: Incorrect connection of phase winds will permanently damage the controller!
Resistance between leads of different phases is usually > 100KΩ. Resistance between
leads of the same phase is usually < 100Ω. It can simply measured by a multimeter.
Encoder Terminal
Terminal No.
Description
+5V
Positive input of 5V power(For encoder,max. current 80mA)
GND
Ground of 5V power(For encoder,max. current 80mA)
A
A phase input of encoder(50KΩ pull-up resistor in the controller)
B
B phase input of encoder(50KΩ pull-up resistor in the controller)
Z
Z phase input of encoder
WARNING: Except supply voltage port and motor terminal, voltage on port must be kept
between -0.3~5.3V. Otherwise, the controller will be damaged.
Attention:
If no special instructions, users use UIROBOT controllers must strictly follow the
specification that one controller can only drive one motor. Be careful to avoid connecting
more than one motor to the controller. The user should be responsible for the loss caused
by that error operation, our company will be not responsible for it.

UI Robot Technology Co. Ltd.
M4220170607EN
Page 7
Miniature Integrated Stepper Motor Controller(Closed-loop)
TYPICAL APPLICATION
UIM2842 controllers can work standalone or within a CAN network. Working standalone
means only one UIM2842 controller is linked to the CAN based host (such as UIM2501).
When working in a CAN network, up to 100 UIM242 controllers can be linked together.
Under both scenarios, sensor input S1/S2/S3 should be connected to terminal 5/6/3, and
signal ground should be connected to terminal 2. Furthermore, please be aware:
• User is responsible for the power supply for sensors.
• Voltage on terminal 5/6/3 must be kept between -0.3V and 5.3V
• Signal line of TTL output port P4 should be connected to terminal 4,and signal ground
should be connected to AG port (terminal 2)
• For TTL output, the max sourcing / sinking current must be kept in 0~20mA.
• Output voltage of P4 is 0~5 V (Relative to terminal 2)
Futhermore, users must note:
• Hot plugging is forbidden. Hot plugging will cause ground-wire missing: the supply
voltage (red port) is on, while the supply voltage ground (black port) is not on. In this
case, the supply voltage flows into the CAN driver chip, then flows into other controllers
in the net through CAN bus, and finally causes damage to numbers of controllers.
• All controllers, gateways and subscriber equipments must be common-
grounded. Connect the ground wire of all controllers and gateway through one wire.
If there are two ground (G1 and G2)in CAN bus, once a high-power device on G1
ground is on, the voltage on G1 will be pulled up instantly (higher than dozens volt),
then this high-voltage will flow into G2 through CAN bus. Normally, the voltage on CAN
bus is only 2.5V, so the dozens-volt differential will cause damage to all CAN bus chip
and controllers.

Page 8
M4220170607EN
UI Robot Technology Co. Ltd.
UIM2842
Standalone Operation
When working standalone, user can use the wiring scheme shown in figure 0-3.
Please note that, this wiring scheme should be used for setting the ID of a UIM2842
controller.
For long distance transfer, both ends of the CAN bus should be terminated with120Ω
terminating resistors. As UIM2501 converter has a build-in terminating resistor, user only
needs to attach a resistor at the other end of the bus. Please refer to the UIM2501 user
manual for how to enable the UIM2501 converter’s terminating resistor. CANH and CANL
should use a twisted wire pair.
Figure 0-3:Wiring Scheme for StandaloneOperation
Warning:Hot plugging is forbidden.
Warning: All controllers, gateways and subscriber equipments must be common-
grounded.
Except supply voltage port and
motor terminal, voltage on port
must be kept between -0.3~5.3V.
UIM2842
Controller
12
11
8
7
5
3
4
6
CANH/CANL
VCC
GND
S1/S2
S3/P4
1
A-
A+
B+
B-
2
+5V/AG
10
9
12 - 28VDC
Power Sipply
UIM2501
Converter
CAN
L
RS232 Cable
DB9 Port
1
2
3
4
CANH
Twist Wire
Pair
120
6 - 40VDC
Sensor 1
Sensor 2
Sensor 3
Stepper Motor

UI Robot Technology Co. Ltd.
M4220170607EN
Page 9
Miniature Integrated Stepper Motor Controller(Closed-loop)
Network Operation
CAN bus provides a reliable and simple method of network construction.
In figure 0-4, a wiring scheme is presented for such network operation with one
RS232/CAN converter connected with multiple UIM2842 controllers. For detailed terminal
wiring on each controller, please refer to figure 0-2.
Note:
• All nodes are connected onto a twist wire pair.
• Star connection scheme must be avoided.
• Each stub must not exceed 2cm (The shorter, the better).
• Both ends of the bus should be terminated with120Ω terminating resistors. Shielded
120 ohm CAN bus cable is recommended if the transfer distance is over 50 meters.
• In practice only one terminating resistor is need at the other end of CAN bus since
UIM2501 already has a built-in terminating resistor. To activate this built-in terminating
resistor, see UIM2501 user manual.
Figure 0-4:Wiring Scheme for Network Operation
Warning: Hot plugging is forbidden.
Warning: All controllers, gateways and subscriber equipments must be common-
grounded.
RS232
Motor# 1
6-40
VDC
CANH
CANL
120
CANH
CANL
Factory
Control Room
UIM2501
Converter
12-28
VDC
UIM2842
Controller
Motor# 2
12-28
VDC
UIM2842
Controller
Motor# 100
12-28
VDC
UIM2842
Controller
Stub < 2cm

Page 10
M4220170607EN
UI Robot Technology Co. Ltd.
UIM2842
There is another wiring scheme of network in Figure 0-5. When wiring in this way, the
length of stub does not need be shorten than 2CM, it is more flexible:
Figure 0-5:Wiring Scheme for Network Operation-2
Warning: Hot plugging is forbidden.
Warning: All controllers, gateways and subscriber equipments must be common-
grounded.
RS232
Moter# 1
6-40
VDC
120
CANH
CANL
Factory
Control Room
UIM2501
Converter
12-28
VDC
UIM2842
Controller
12-28
VDC
UIM2842
Controller
Moter# 100
12-28
VDC
UIM2842
Controller
With or without casing
can be selected according
to the actual situation
Length: 0–500M
Length:0–500M
Moter# 2

UI Robot Technology Co. Ltd.
M4220170607EN
Page 11
Miniature Integrated Stepper Motor Controller(Closed-loop)
INSTRUCTION SET SUMMARY
Network Communication
Realized by gateway UIM2501/USBC9100/PCIC120, please refer to user manual of
gateway for details.
Instruction
Description
Feedback
Header
Message
ID
BTR;
Set CAN network communication bit rate index
AA
BC
BTR;
Check current CAN network bit rate index
AA
BC
SET;
Assign an to UIM242 controller
AA
DD
gOFF;
Disable H-bridge circuit
AA
AD
gCUR;
Set output phase current
AA
AD
gACR;
Enable/disable automatic current reduction
AA
AD
gMCS
Set micro-stepping resolution
AA
AD
gORG;
Set zero/origin position
CC
AD
gSPD;
Set the desired speed, the sign decides direction
AA
AD
gSTP;
Set relative position, the sign decides direction
AA
AD
gPOS;
Set desired position, the sign decides direction
AA
AD
gQEC;
Set encoder based position, the sign decides direction
AA
AD
gDOUT;
Set output TTL level
AA
AD
Model Check
Instruction
Description
Feedback
Header
Message
ID
Page
MDL;
Check the model of controller
CC
DE
82
Function Configuration
Instruction
Description
Feedback
Header
Message
ID
Page
ENA;
Set enable time, boot time after ms enable
AA
A0
70
ENAxFFFF;
Check enable time
AA
A0
71
ICF;
Set initial configuration register
AA
DA
73
ICF;
Check initial configuration register
AA
DA
74
MCF;
Set master configuration register
AA
B0
77
MCF;
Check master configuration register
AA
B0
78
SCF;
Set sensor control configuration register
AA
C0
94
SCF;
Check sensor control configuration register
AA
C0
96
General Check
Instruction
Description
Feedback
Header
Message
ID
Page
;
Check desired motor status
AA
-
61
FBK;
Check current motor status
CC
-
72
SFB;
Check sensor status
CC
C1
97

Page 12
M4220170607EN
UI Robot Technology Co. Ltd.
UIM2842
Motor Configuration
Instruction
Description
Feedback
Header
Message
ID
Page
ACR;
Set auto-current reduction ratio
AA
-
62
ACR;
Check auto-current reduction ratio
AA
BA
63
CUR;
Set output phase current
AA
-
66
ENA;
Enable H-bridge circuit
AA
-
69
MCS;
Set micro-stepping resolution
AA
-
79
OFF;
Disable H-bridge circuit
AA
-
87
Motion Control
Instruction
Description
Feedback
Header
Message
ID
Page
BLC;
Set backlash compensation value η
AA
DE
64
BLC;
Check backlash compensation value
AA
DE
65
MAC;
Set acceleration rate
AA
B1
75
MAC;
Check acceleration rate
AA
B1
76
MDE;
Set deceleration rate
AA
B2
80
MDE;
Check deceleration rate
AA
B2
81
MMD
Set maximum cessation speed
AA
B4
83
MMD;
Check maximum cessation speed
AA
B4
84
MMS;
Set maximum starting speed
AA
B3
85
MMS;
Check maximum starting speed
AA
B3
86
ORG;
Set zero/origin position
AA
B7
88
ORG;
Reset the position to a given value
AA
B7
89
SPD;
Set the desired speed
AA
B5
98
SPD;
Check current speed
CC
B2
99
STO;
Bind motion control parameters to sensor edge
AA
D1
103
STP;
Set desired incremental displacement
AA
B6
105
STP;
Check current incremental displacement
CC
B3
106
Closed-Loop Control
Instruction
Description
Feedback
Header
Message
ID
Page
QECη;
Set desired quadrature encoder’s position η
AA
B8
90
QEC;
Check current quadrature encoder’s position
CC
B1
91
QERη;
Set quadrature encoder’s resolution η
AA
C2
92
QER;
Check quadrature encoder’s resolution
AA
C2
93
SQTη;
Set tolerance η of blocked alarm
AA
B8
100
I/O Control
Instruction
Description
Feedback
Header
Message
ID
Page
DOUη;
Set output TTL levelη
AA
C1
67
DOU;
Check current output TTL level
AA
C1
68
STG;
Set digital input sampling mode
AA
C9
101
STG;
Check digital input sampling mode
AA
C9
102

UI Robot Technology Co. Ltd.
M4220170607EN
Page 13
Miniature Integrated Stepper Motor Controller(Closed-loop)
CHARACTERISTICS
Absolute Maximum Ratings
Specifications
Supply Voltage
10V - 35VDC
Voltage on S1/S2/S3/P4 with respect to GND
-0.3V ~ +5.3V
Maximum output current sunk by
S1/S2/S3/P4
20 mA
Maximum output current sourced by
S1/S2/S3/P4
20 mA
Ambient temperature under bias
-20°C ~ +85°C
Storage temperature
-50°C ~ +150°C
NOTE:Working under environment exceeding the above maximum value could result in permanent damage to controller.
Working under conditions at the maximum value is not recommended as operation at maximum value for extended period
may have negative effect on device reliability.
Electrical Characteristics(Ambient Temperature 25°C )
Supply Power Voltage
12V - 28VDC
Motor Output Current
Max 1A per phase (instruction adjustable)
Driving Mode
PWM constant current
Stepping Resolution
full-step, half-step, 1/4, 1/8 and 1/16 step
Communication (Ambient Temperature 25°C)
Protocol
Active CAN 2.0
Wiring method
2-wire,CANH、CANL
CAN bus drive
• Supports 1 Mb/s operation
• ISO-11898 standard physical layer requirements
• Short-circuit protection
• High voltage transient protection
• Auto-thermal shutdown protection
• Up to 100 nodes can be connected
• Differential bus, high noise immunity
Environment Requirements
Cooling
Free air
Working environment
Avoid dust, oil mist and corrosive gases
Working temperature
-40 °C ~ 85°C
Humidity
<80%RH,no condensation, no frosting
Vibration
3G Max
Storage temperature
-50 °C ~ 150 °C

Page 14
M4220170607EN
UI Robot Technology Co. Ltd.
UIM2842
Size and Weight
Size
23mm x 28.1mm x 15mm
Weight
0.1 kg

UI Robot Technology Co. Ltd.
M4220170607EN
Page 15
Miniature Integrated Stepper Motor Controller(Closed-loop)
CONTENTS
General Description.................................................................................................................................... 4
Terminal description...................................................................................................................................5
Typical Application.....................................................................................................................................7
Instruction set summary........................................................................................................................... 11
Characteristics.......................................................................................................................................... 13
1.0 Overview................................................................................................................................... 18
1.1 Basic Control System .................................................................................................................. 18
1.2 Advanced Motion Control Module ................................................................................................ 19
1.3 Sensor Input Control Module ....................................................................................................... 19
1.4 TTL Output Control Module ......................................................................................................... 20
1.5 Encoder-based Closed-loop Control Module ................................................................................ 20
1.6 Instructions and Interface ............................................................................................................ 20
2.0 Instruction and Feedback Structure......................................................................................... 21
2.1 UIM2842 Message Communication Mode ................................................................................... 21
2.2 Instruction Structure .................................................................................................................... 22
2.3 Macro Operator and Null Instruction ............................................................................................ 22
2.4 Instruction List ............................................................................................................................ 23
3.0 CAN2.0 Communication ........................................................................................................... 24
3.1 Controller ID Assignment ............................................................................................................ 24
3.2 Instruction List ............................................................................................................................ 24
4.0 Real-time Change Notification.................................................................................................. 25
4.1 RTCN Structure .......................................................................................................................... 25
4.2 Enable/Disable RTCN ................................................................................................................. 26
5.0 initial and Hardware/Firmware Configuration .......................................................................... 27
5.1 Initial Configuration Register ....................................................................................................... 27
5.2 Auto-enable ................................................................................................................................ 28
5.3 User Program ............................................................................................................................. 28
5.4 Master Configuration Register ..................................................................................................... 28
5.5 Instruction List ............................................................................................................................ 29
6.0 Basic Control Instructions........................................................................................................ 30
6.1 General Introduction of Motion Control Modes ............................................................................. 30
6.2 Basic Instruction Acknowledgment (ACK) .................................................................................... 32
6.3 Motor Status Feedback Message ................................................................................................ 33
6.4 Instruction List ............................................................................................................................ 34
7.0 Advanced Motion Control......................................................................................................... 35
7.1 Linear Acceleration ..................................................................................................................... 35
7.2 Linear Deceleration ..................................................................................................................... 35
7.3 Nonlinear Acceleration ................................................................................................................ 35
7.4 Nonlinear Deceleration................................................................................................................ 36
7.5 S-curve Displacement Control ..................................................................................................... 38
7.6 Direction Control and Position Counter ........................................................................................ 39
7.7 Backlash Compensation ............................................................................................................. 39
7.8 Advanced Motion Control Instructions.......................................................................................... 40
7.9 Enable/disable Advanced Motion Control Module (MCFG) ........................................................... 41
7.10 Instruction List ............................................................................................................................ 41
8.0 Sensor Input Control ................................................................................................................ 42
8.1 Rising and Falling Edge .............................................................................................................. 45
8.2 Analog Input and Thresholds ....................................................................................................... 45
8.3 Digital Input Sampling Mode........................................................................................................ 46

Page 16
M4220170607EN
UI Robot Technology Co. Ltd.
UIM2842
8.4 Sensor Event, Action and Binding ............................................................................................... 46
8.5 Introduction to Sensor Input Control Instructions .......................................................................... 47
8.6 Sensor Input Control Register S12CON ....................................................................................... 48
8.7 Sensor Input Control Register S34CON ....................................................................................... 48
8.8 Analog Threshold Control Register ATCONH & ATCONL............................................................. 50
8.9 Instruction List ............................................................................................................................ 50
8.10 Example of S12CON Configuration ............................................................................................. 50
8.11 Example of ATCONH, ATCONL Configuration ............................................................................. 51
9.0 Encoder and closed-loop control............................................................................................. 53
9.1 Enable/ Disable Encoder and Closed-loop Module (MCFG).......................................................... 53
9.2 Instruction List ............................................................................................................................ 54
10.0 TTL Output control ................................................................................................................... 55
10.1 Introduction to TTL Output Control Instructions ............................................................................ 55
10.2 TTL Output Control Register S34CON ......................................................................................... 55
10.3 Output Control Configuration Instruction(SCF) ........................................................................ 56
10.4 Instruction List ............................................................................................................................ 56
10.5 Example of TTL Output Control and S34CON Configuration......................................................... 57
11.0 Instruction................................................................................................................................. 58
11.1 Instruction Structure .................................................................................................................... 58
11.2 Feedback Message Structure ...................................................................................................... 58
11.3 Instruction Description ................................................................................................................ 61
1. ; Check desired motor status ....................................................................................................... 61
2. ACRη Set auto-current reduction ratio ......................................................................................... 62
3. ACR Check auto-current reduction ratio....................................................................................... 63
4. BLCη Backlash compensation ..................................................................................................... 64
5. BLC Check backlash compensation ............................................................................................ 65
6. CURη Motor Current Adjusting .................................................................................................... 66
7. DOUη Set TTL Output ................................................................................................................ 67
8. DOU Check TTL Output Level ..................................................................................................... 68
9. ENA H-Bridge Enable ................................................................................................................. 69
10. ENAη Set enable time ................................................................................................................. 70
11. ENAxFFFF Check enable time .................................................................................................... 71
12. FBK Motor Status Feedback Inquiry ............................................................................................ 72
13. ICFxη Initial Configuration Register Instruction ............................................................................. 73
14. ICF Check Initial Configuration Register ..................................................................................... 74
15. MACη Set Acceleration Rate ....................................................................................................... 75
16. MAC Check Current Acceleration Rate ........................................................................................ 76
17. MCFη / MCFxη Master Configuration Register Instruction ............................................................ 77
18. MCF Check Master Configuration Register .................................................................................. 78
19. MCSη Setup Micro Stepping ....................................................................................................... 79
20. MDEη Set Deceleration Rate ...................................................................................................... 80
21. MDE Check Current Deceleration Rate ....................................................................................... 81
22. MDLη Check Controller Model..................................................................................................... 82
23. MMDη Set Maximum Cessation Speed ....................................................................................... 83
24. MMD Check current Maximum Cessation Speed ......................................................................... 84
25. MMSη Set Maximum Starting Speed ........................................................................................... 85
26. MMS Check current Maximum Starting Speed ............................................................................. 86
27. OFF H- Bridge Disable ................................................................................................................ 87
28.ORG Reset Position Counter ...................................................................................................... 88
29. ORGη Reset Position Counter..................................................................................................... 89
30. QECη Set desired quadrature encoder’s position ......................................................................... 90
31. QEC Check Current Encoder Positon .......................................................................................... 91
32. QERη Set Quadrature Encoder Resolution .................................................................................. 92
33. QER Check Quadrature Encoder Resolution ............................................................................... 93

UI Robot Technology Co. Ltd.
M4220170607EN
Page 17
Miniature Integrated Stepper Motor Controller(Closed-loop)
34. SCFη / SCFxη Set Sensor Configuration ..................................................................................... 94
35. SCF Check the value of Sensor Configuration ............................................................................. 96
36. SFB Check Sensor Data ............................................................................................................. 97
37. SPDη Speed Adjusting................................................................................................................ 98
38. SPD Check Current Speed ......................................................................................................... 99
39. SQTη Set Tolerance of Blocked Alarm ...................................................................................... 100
40. STGxη Set Digital Input Sampling Mode .................................................................................... 101
41. STG Check Digital Input Sampling Mode ................................................................................... 102
42. STOη Parameter Banding ......................................................................................................... 103
43. STPη Displacement Control ...................................................................................................... 105
44. STP Check Displacement ......................................................................................................... 106
APPENDIX A Dimensions..................................................................................................................... 107
APPENDIX B Installation instruction ................................................................................................... 108

Page 18
M4220170607EN
UI Robot Technology Co. Ltd.
UIM2842
1.0 OVERVIEW
UIM2842 is a kind of miniature integrated stepper motor controller with CAN2.0B Active
bus communication capability.
UIM2842 has a size of 23mm*28.1mm*15mm and is designed to mount onto NEMA28
stepper motor seamlessly. UIM2842 can provide 0-1A output current, current value is
adjustable within the range through instructions. Once set, the value is stored in EEPROM.
UIM2842 controller also has the function of high speed current compensation to offset the
effect of Back Electromotive Force (BEMF) of motor at high speed and therefore to facilitate
motor’s high-speed performance. UIM2842 series of controllers work with 12 ~ 28VDC
power supply.
UIM2842 can perform encoder-based closed-loop motion control. The control system
comprises communication system, basic motion control system, absolute position counter,
quadrature encoder interface and real-time event-based change notification system. There
are also four optional modules to be added on customer request:Advanced Motion Module
(linear/non-linear acceleration/deceleration, S-curve PV/PVT displacement control),
Encoder-based Closed-loop Control Module, Sensor Input control Module and User
Program Module.
The embedded 64-bit calculation precision DSP controller guarantees the real-time
processing of the motion control and change notifications (similar to the interrupters of
CPU). Entire control process is finished within 1 millisecond.
UIM2842 controller applies CAN2.0B communication protocol, which, due to its high-
speed (1 million bit rate) long-distance (10km) transference and high noise immunity, is
widely used in applications with serious signal interference and yet requiring high
reliability, such as automobile industry, automated manufacturing and traffic control. The
whole CAN bus network is based on a twisted wire pair. Similar to the network of home
appliances, multiple UIM2842 controllers are connected to the twisted pair in parallel just
like multiple pulps connected to the two-wire power cord. CAN bus network boosts many
advantages, one of them is controllers never compete for bus transference.
A UIM2501 CAN-R232 converter is used to connect UIM2842 controller(s) to user device
through serial port. Meanwhile, ASCII-coded instructions from user device are converted
and transfers in CAN protocol in high speed to long distance reliably to control stepper
motor(s)’ motion parameters such as direction, speed, steps, micro-steps, current, enable
and disable the H-bridge. For network operation, each controller should be set a unique ID
and up to 100 UIM2842 controllers can be controlled through this UIM2501 converter.
1.1 Basic Control System
UIM2842 controller’s basic control system comprises communication system, basic motion
control system, absolute position counter, and real-time event-based change notification
system.
Communication System
CAN bus protocol communication is used to realize the control to UIM2842. Through one
CAN-RS232 converter (the UIM2501), user device can command multiple UIM2842
controllers through RS232 using ASCII coded instructions. The CAN bit rate can be
changed through instruction.
Basic Motion Control

UI Robot Technology Co. Ltd.
M4220170607EN
Page 19
Miniature Integrated Stepper Motor Controller(Closed-loop)
UIM2842 has a build-in basic motion control system. User device can control the following
basic motion parameters through instructions in real-time: direction, speed, angular
displacement, phase current, micro-stepping, and enable/disable the H-bridge, etc. Speed
input range is +/-65,000 pulses/sec, and displacement input range is +/- 2,000,000,000
pulses.
Absolute Position Counter / Quadrature Encoder Interface
UIM2842 has a hardware pulse counter. The counter can be reset either by user instruction
or automatically by the configurable sensor input event. Under most conditions, through
the advanced motion control, this counter can provide the absolute position of the motor
with enough accuracy. When the counter reaches zero position, there could be
automatically generated message feedback to the user device, given the corresponding
configuration through user instruction.
UIM2842 controller has Quadrature Encoder Interface and can work with quadrature
encoder when sensor input module is installed. Furthermore, with the encoder-based
closed-loop control module, the UIM2842 can perform self closed-loop control.
Real-time Change Notification (RTCN)
Similar to CPU’s interrupters, UIM2842 can automatically generate certain messages after
predefined events and sends them to the user device. The time is less than 1 millisecond
from the occurring of the event to the message being sent. Message transfer time depends
on the baud rate of the RS232 setup. The transfer time will be less than 1 millisecond if the
baud rate is set to 115200. UIM2842’s RTCN system supports 12 events: displacement
control done absolution position reset; sensor 1/2/3 rising edge and falling edge; analog
input beyond upper threshold, analog input lower than lower threshold; and TTL status, etc.
All RTCNs can be enabled or disabled by instructions.
1.2 Advanced Motion Control Module
With advanced motion control module installed, UIM2842 controller can maintain linear
and non-linear acceleration/deceleration, S-curve displacement control, PT/PVT control,
auto direction control, etc. There are two ways to define acceleration/deceleration rate:
1. Value Mode: Input range: 1 ~ 65,000,000 PPS/Sec (pulse/sec2).
2. Period Mode: Input range: 1 ~60,000 milliseconds (time to fulfill the acceleration or
deceleration).
The input range of the displacement control is +/- 2 billion pulses (steps). In advanced
motion control mode, the actual direction is decided by module calculation. When
displacement is in place, there will be a RTCN (Instruction configurable). Advanced motion
control module can be disabled/enabled through user instruction.
1.3 Sensor Input Control Module
UIM2842’s Sensor Input Control Module supports 3 channels of sensor input. They can
accept a TTL level input of 0~5V. There is 1 channel can be configured as analog input
(Precision: 12bit; Sample frequency: 50K; mean of 16 calculation; Update frequency:
1000Hz). User can configure the desired automatic action triggered by sensor status
change. There are 14 actions listed below that can be triggered by sensor event:
• Start and run forwardly at preset-speed and acceleration
• Start and run reversely at preset-speed and acceleration
• Change direction and run at preset-speed and acceleration

Page 20
M4220170607EN
UI Robot Technology Co. Ltd.
UIM2842
• Forword displacement control follow the preset motion parameters (speed,
displacement, acceleration)
• Reverse displacement control follow the preset motion parameters (speed,
displacement, acceleration)
• Direction-change displacement control follow the preset motion parameters (speed,
displacement, acceleration)
• Decelerate at preset deceleration until stop
• Emergency stop
• Reset position and encoder counter
• Reset position and encoder counter + Displacement control follow the preset motion
parameters (speed, displacement, acceleration)
• Reset position and encoder counter + Decelerate at preset deceleration until stop
• Reset position and encoder counter + Emergency stop
• Execute preset interrupt program (controller firmware version requires 1302)
• Off
1.4 TTL Output Control Module
UIM2842’s TTL Output Control Module supports 1 channel of TTL voltage level output. The
output port P4 is capable of providing +/-20mA sourcing or sinking current. In practice,
please keep the current consumption as low as possible to avoid overheating the controller.
Port P4 also can output setting level when detects events list below (pre-configuration):
• Run/Stop status. The output voltage level is determined by if the speed is zero or not.
• Direction change. The output voltage level is determined by if the current motor
direction is forward or reverse.
• Origin point hit. The output voltage level is determined by if current position is zero
point or just crosses over the zero point.
1.5 Encoder-based Closed-loop Control Module
With the encoder-based closed-loop control module, UIM2842 controller can perform self
closed-loop motion control. Without this module, UIM2842 can still interface with a
quadrature encoder and provide reading to user device, but the self closed-loop is not
available.
1.6 Instructions and Interface
Instructions for UIM2842 are simple, intuitive and fault-tolerating.
For example, in order to command a speed of 1000 steps/sec, the following instructions
are all valid: "SPD = 1000;", "SPD: 1000;", "SPD 1000;", "SPD1000;" or even "SPD %?&%*
1000;".
In case that a wrong instruction is entered, the controller will return an ACK of error
message. Incorrect instructions will not be executed to prevent accidents.
UIROBOT provides free Microsoft Windows based VB / VC demo software and
corresponding source code to facilitate the quick start of user device side programming.
Table of contents
Other UIrobot Controllers manuals