User Manual

Add to my manuals
50 Pages

advertisement

User Manual | Manualzz

User Manual

UIM241XX Series

RS232 Instruction Control

Miniature Integrated Stepper Motor Controller

UIM24102/04/08

Please pay attention to the following before using the UIROBOT products:

• UIROBOT products meet the specification contained in their particular Data Sheet.

• UIROBOT will only work with the customer who respects the Intellectual Property (IP) protection.

• 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 convenience 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, indemnify 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 t t t t d

[UIM241XX Ordering Information]

In order to serve you quicker and better, please provide the product number in following format.

UIM241XX PART NUMBERING SYSTEM

UIM

2 4 1

-

-

Category

UIM

Motor

Control

Series

241

RS232

Control

Optional

Optional

Optional

Control

Connector 

Phase Current

E = External Encoder Closed-Loop

IE= Internal Encoder Closed-Loop

S = 2 Sensor Input Ports

M= Advanced Motion Control

T = Screw Terminal

P = Plug / Socket

02 = 2A; 04 = 4A; 08 = 8A

Note:  If not selected, the code box can be deleted. Default control connector is T (screw terminal), if not selected.

Examples: UIM24104P, UIM24104T-M, UIM24104-M-S-E, UIM24104-S

Examples of Control Connector options:

Screw Terminal Rectangular Plug / Socket

M41110923EN Page 2 UI Robot Technology Co. Ltd

UIM241XX Miniature Integrated Stepper Motor Controller

UIM24102 / 04 / 08

RS232 Instruction Control

Miniature Integrated Stepper Motor Controller

Miniature Integral Design

Miniature size 42.3mm*42.3mm*16.5mm

Fit onto motors seamlessly

Die-cast aluminum enclosure, improving heat dissipation and durability

Motor Driving Characteristics

Wide supply voltage range 12 ~ 40VDC

Output current 2/4/8A, instruction adjustable

Full to 16th micro-step resolution

Dual full H-bridge with PWM constant current control

Accurate micro-stepping and current control

RS232 Interface

RS232 three-wire serial communication

Max baud rate 57600 bps

Embedded DSP Microprocessor

Hardware DSP, 64bit calculation precision

Quadrature encoder based closed-loop control

Advanced motion control, linear and non-linear acceleration and deceleration, S-curve, PT/PVT displacement control

Power-failure position protection

2 sensor input ports, 1 analog input (12Bits)

8 programmable real-time event-based change notifications

9 programmable actions triggered by 6 sensor events

Simple instructions, intuitive and fault-tolerating

General Description

UIM24102 / UIM24104 / UIM24108 are miniature stepper motor controllers with RS232 interface. User device can command these controllers through RS232 protocol using ASCII coded instructions.

Instructions are simple, intuitive and fault-tolerating. User is not required to have advanced knowledge on stepper motor driving.

UIM241’s architecture includes communication system, basic motion control system, Quadrature encoder interface and real-time event-based change notification system. Furthermore, there are three optional modules can be installed per customer request: Advanced Motion Control Module (linear/nonlinear acceleration/deceleration, S-curve PT/PVT displacement control), Encoder-based Closed-loop

Control Module and Sensor Input Control Module.

Embedded 64-bit calculating precision DSP controller guarantees the real-time processing of the motion control and change notifications. Entire control process is finished within 1 millisecond.

UIM241controllers can be mounted onto NEMA17/23/34/42 series stepper motor through adapting flanges. Total thickness of the controller is less than 16.5 mm. Enclosure is made of die-cast aluminum to provide a rugged durable protection and improves the heat dissipation.

UI Robot Technology Co. Ltd. M41110923EN Page 3

Terminal Description

Figure 0-1: Terminal Description

UIM24102/04/08

To avoid loss of screws, please always keep screws tightened.

Motor

Terminal

A+

A-

B-

B+

V+ GND RX TX GND AG S1 S2 RST

Control Terminal

Control Terminals

Terminal No. Designator

1

2

V+

GND

3 RX

4 TX

5 GND

6 AG

7 S1

8 S2

9 RST

Description

Supply voltage, 12 - 40VDC

Supply voltage ground

To the RX pin on user device

(1)

To the TX pin on user device

(1)

To signal ground on user device

(2)

Analog Ground for Sensor

(2)

Sensor 1 Input

Sensor 2 Input

Reset R232 baud rate to 9600

Note:

(1) Please refer to “Typical Application” section for details.

(2) Internally linked to supply voltage ground.

Motor Terminals

Terminal No. Designator

1/2

3/4

A+ / A-

B- / B+

Description

Connect to the stepper motor phase A

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

.

M41110923EN Page 4 UI Robot Technology Co. Ltd

UIM241XX Miniature Integrated Stepper Motor Controller

Typical Application

UIM241xx controllers use 3-wire RS232 interface to communicate with user devices. Terminal 3 should be connected to the RX of user device; Terminal 4 should be connected to the TX of user device;

Terminal 5 should be connected to the GND of user device. An example is provided in figure 0-2.

If the sensor inputs are used, make sure the signal are wired to the terminal 7 and/or terminal 8, and the signal ground are wired to the terminal 6. Furthermore, please be aware:

 user is responsible for the power supply for sensors,

 voltage on terminal 7 and 8 must be kept between -0.3V and 5.3V, or smoke will be produced, and

 if using an external encoder, channel A should be connected to S1; channel B to S2; GND to AG.

Figure 0-2: Typical Application

Stepper motor

12 ~ 40VDC

Sensor 1

Sensor 2

3

4

5

1

2

V+

GND

RX

6

7

8

S1

S2

TX

GND

AG

A+ A- B- B+

UIM241XX

Controller

9

RST

Terminal 9 is for resetting Baud Rate

(details in chapter 3.4)

PIN2 to RX (UIM terminal 3)

PIN3 to TX (UIM terminal 4)

PIN5 to GND (UIM terminal 5)

UI Robot Technology Co. Ltd. M41110923EN Page 5

UIM24102/04/08

Instruction Set Summary

Instruction Description

BDR=X;

MDL;

Set RS232 communication Baud Rate

Check controller model

MCFG=X; Set master configuration register

MCFG; Check configuration register

ENA;

OFF;

CUR=X;

Enable H-bridge circuit

Disable H-bridge circuit

Set output phase current

MCS=X;

DIR=X;

SPD=X;

SPD;

STP=X;

STP;

POS=X;

POS;

FBK;

MACC;

MDEC=X;

MDEC;

MMSS=X;

MMSS;

MMDS=X;

MMDS;

SCFG=X;

SCFG;

STORE;

QER=X;

QER;

QEC=X;

QEC;

Set micro-stepping resolution

Set motor direction (obsoleted)

Set the desired speed (with direction)

Check current speed

Set desired incremental displacement

Check current incremental displacement

Set desired position

Check current position

Check current motor status

Check acceleration rate

Set deceleration rate

Check deceleration rate

Set maximum starting speed

Check maximum starting speed

Set maximum cessation speed

Check maximum cessation speed

Set sensor control configuration register

Check sensor control configuration register

Store motion control parameters

Set quadrature encoder’s resolution

Check quadrature encoder’s resolution

Set desired quadrature encoder’s position

Check current quadrature encoder’s position

0xAA

0xAA

0xAA

0xAA

0xAA

0xAA

0xAA

0xCC

0xAA

0xCC

0xAA

0xCC

0xCC

0xAA

0xAA

0xAA

Feedback Header Message ID

0xAA

0xCC

0xAA

0xAA

0xBD

0xDE

0xB0

0xB0

0xAA

0xAA

0xAA

0xAA

0xAA

-

-

-

-

-

0xAA N/A

0xCC 0xB0

0xAA 0xB5

0xCC 0xC1

0xAA 0xD1

0xAA

0xAA

0xAA

0xC2

0xC2

0xB8

0xCC 0xB1

0xB2

0xB3

0xB3

0xB3

0xB3

0xC0

0xC0

0xB2

0xB6

0xB3

0xB7

0xB0

-

0xB1

0xB1

0xB2

M41110923EN Page 6 UI Robot Technology Co. Ltd

UIM241XX Miniature Integrated Stepper Motor Controller

Characteristics

Absolute Maximum Ratings

Supply voltage........................................................................................................................... 10V to 40V

Voltage on S1/S2 with respect to GND…………................................................................. -0.3V to +5.3V

Maximum output current sunk by S1/S2........................................................................................ 20 mA

Maximum output current sourced by S1/S2................................................................................... 20 mA

Voltage on RX with respect to GND....................................................................................... -25V to +25V

Voltage on TX with respect to GND................................................................................. -13.2V to +13.2V

Ambient temperature under bias........................................................................................ -20°C to +85°C

Storage temperature........................................................................................................ -50°C to +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 CharacteristicsAmbient Temperature 25°C

Supply Power Voltage

Motor Output Current

Driving Mode

Stepping Resolution

12V ~ 40VDC

Max 2A/4A/8A per phase (instruction adjustable)

PWM constant current full-step, half-step, 1/4, 1/8 and 1/16 step

Communication (Ambient Temperature 25°C

Communication Protocol RS232

Wiring Method Three-wire, TX, RX, GND

Baud Rate Max 57600 bps, instruction adjustable, hardware reset to 9600

Environment Requirements

Working environment

Working temperature

Humidity

Vibration

Storage temperature

Size and Weight

Size

Avoid dust, oil mist and corrosive gases

-40°C ~ 85°C

<80%RH,no condensation, no frosting

3G Max

-50°C ~ 150°C

42.3mm x 42.3mm x 16.5mm

UI Robot Technology Co. Ltd. M41110923EN Page 7

UIM24102/04/08

CONTENTS

General Description ................................................................................................................ 3

 

Terminal Description ............................................................................................................... 4

 

Typical Application .................................................................................................................. 5

 

Instruction Set Summary ........................................................................................................ 6

 

Characteristics ......................................................................................................................... 7

 

1.0

 

Overview .................................................................................................................. 10

 

1.1

 

Basic Control System ...................................................................................................................... 10

 

1.2

 

Advanced Motion Control Module .................................................................................................... 11

 

1.3

  Sensor Input Control Module ........................................................................................................... 11  

1.4

  Encoder-based Closed-loop Control Module ................................................................................... 11  

1.5

  Instructions and Interface ................................................................................................................ 11  

2.0

 

Instruction and Feedback Structure ...................................................................... 12

 

2.1

  Instruction Structure ........................................................................................................................ 12  

2.2

 

Macro Operator and Null Instruction ................................................................................................ 12

 

2.3

 

Feedback Message Structure .......................................................................................................... 13

 

3.0

 

RS232 communication ........................................................................................... 14

 

3.1

 

User Device RS232 Port Configuration ........................................................................................... 14

 

3.2

  Hand-Shaking .................................................................................................................................. 14  

3.3

  Baud Rate Change Instruction(BDR) .......................................................................................... 15  

3.4

  Reset Baud Rate to Factory Default 9600 ....................................................................................... 15  

3.5

  Check Controller Model (MDL) ........................................................................................................ 15  

4.0

 

Real-time Change Notification ............................................................................... 16

 

4.1

 

RTCN Structure ............................................................................................................................... 16

 

4.2

 

Enable/Disable RTCN ..................................................................................................................... 16

 

5.0

 

Hardware/Firmware Configuration ........................................................................ 17

 

5.1

  Master Configuration Register ......................................................................................................... 17  

5.2

  Master Configuration Register Instruction (MCFG) .......................................................................... 18  

5.3

  Check Master Configuration Register .............................................................................................. 18  

6.0

 

Basic Control Instructions ..................................................................................... 19

 

6.1

  General Introduction of Motion Control Modes ................................................................................ 20  

6.2

 

H-Bridge Enable Instruction (ENA) .................................................................................................. 22

 

6.3

 

H-Bridge Disable Instruction (OFF) ................................................................................................. 22

 

6.4

 

Motor Current Adjusting Instruction(CUR) ....................................................................................... 23

 

6.5

  Automatic Current Reduction Instruction (ACR) .............................................................................. 23  

6.6

  Micro Stepping Setup Instruction (MCS) ......................................................................................... 23  

6.7

  Motion Direction Instruction (DIR) .................................................................................................... 23  

6.8

  Absolute Position Counter Reset Instruction (ORG) ........................................................................ 24  

6.9

  Speed Adjusting Instruction (SPD) .................................................................................................. 24  

6.10

 

To Check Current Speed (SPD) ...................................................................................................... 24

 

6.11

 

Displacement Control Instruction (STP) .......................................................................................... 25

 

6.12

 

To check STP displacement ............................................................................................................ 25

 

6.13

  Absolute Position Inquiry Instruction (POS) ..................................................................................... 26  

6.14

  To Check Current Absolute Position (POS) ..................................................................................... 26  

6.15

  Basic Instruction Acknowledgment (ACK) ....................................................................................... 27  

M41110923EN Page 8 UI Robot Technology Co. Ltd

UIM241XX Miniature Integrated Stepper Motor Controller

6.16

 

Motor Status Feedback Inquiry Instruction (FBK) ............................................................................ 28

 

6.17

  Motor Status Feedback Message .................................................................................................... 28  

7.0

 

Advanced Motion Control ...................................................................................... 29

 

7.1

  Linear Acceleration .......................................................................................................................... 29  

7.2

  Linear Deceleration .......................................................................................................................... 29  

7.3

  Nonlinear Acceleration ..................................................................................................................... 30  

7.4

 

Nonlinear Deceleration .................................................................................................................... 31

 

7.5

 

S-curve Displacement Control ......................................................................................................... 32

 

7.6

 

Direction Control and Position Counter ............................................................................................ 33

 

7.7

 

Advanced Motion Control Instructions ............................................................................................. 33

 

7.8

  Enable/disable Advanced Motion Control Module (MCFG) ............................................................. 34  

7.9

  Acceleration Rate Setup Instruction (mACC) ................................................................................... 35  

7.10

  Deceleration Rate Setup Instruction (mDEC) .................................................................................. 36  

7.11

  Maximum Starting Speed Setup Instruction (mMSS) ....................................................................... 37  

7.12

 

Maximum Cessation Speed Setup Instruction (mMDS) ................................................................... 37

 

8.0

 

Sensor Input Control .............................................................................................. 38

 

8.1

 

Rising and Falling Edge ................................................................................................................... 39

 

8.2

 

Analog Input and Thresholds ........................................................................................................... 39

 

8.3

  Sensor Event, Action and Binding ................................................................................................... 39  

8.4

  Introduction to Sensor Input Control Instructions ............................................................................. 40  

8.5

  Sensor Input Control Register S12CON .......................................................................................... 41  

8.6

  Analog Threshold Control Register ATCON & ATCONL ................................................................. 42  

8.7

  Sensor Configuration Register Instruction (SCFG) .......................................................................... 43  

8.8

 

Check the Value of S12CON, ATCONH and ATCONL .................................................................... 43

 

8.9

 

EEPROM Store Instruction (STORE) .............................................................................................. 43

 

8.10

 

Sensor Data Inquiry Instruction (SFBK) ........................................................................................... 44

 

8.11

  Examples of S12CON Configuration ............................................................................................... 44  

8.12

  Configuring the ATCONH, ATCONL ................................................................................................ 45  

9.0

 

Encoder and Closed-loop Control ......................................................................... 46

 

9.1

  Enable/Disable Encoder and Closed-loop Control Module (MCFG) ................................................ 46  

9.2

  Closed-loop Position Control Instruction (QEC) ............................................................................... 47  

9.3

 

Check Current Encoder Position ...................................................................................................... 47

 

9.4

 

Quadrature Encoder Resolution Setting Instruction (QER) .............................................................. 48

 

9.5

 

Check Quadrature Encoder Resolution ........................................................................................... 48

 

9.6

  Duality of STP Instruction ................................................................................................................ 48  

9.7

  SPD Instruction Definition ................................................................................................................ 48  

9.8

  Restrictions on POS Instruction ....................................................................................................... 48  

APPENDIX A Dimensions ............................................................................................... 49

 

APPENDIX B Installation ................................................................................................. 50

 

UI Robot Technology Co. Ltd. M41110923EN Page 9

UIM24102/04/08

1.0 Overview

UIM241 miniature integrated stepper motor controllers communicate with user device using RS232 protocol. The user device controls UIM241 through ASCII coded instructions. Communication baud rate can be changed through instruction and will be burned into on-board EEPROM.

UIM241 controller has a size of 42.3 x 42.3 x 16.5mm and is designed to mount onto NEMA17/23/34/42 stepper motors seamlessly. UIM24102 can provide 0.7-2A output phase current, UIM24104 can provide

1.5-4A output phase current and UIM24108 can provide 3-8A output phase current. Phase current is adjustable through instructions. Once set, the value is stored into on-board EEPROM. UIM241 controller also has high speed current compensation to offset the effect of Back Electromotive Force (BEMF) to facilitate the motor’s high-speed performance. UIM241 controllers use 12 ~ 40VDC power supply.

UIM241’s architecture includes communication system, basic motion control system, Quadrature encoder interface and real-time event-based change notification system. Furthermore, there are three optional modules can be installed per customer request: Advanced Motion Control Module (linear/nonlinear acceleration/deceleration, S-curve PT/PVT displacement control), Encoder-based Closed-loop

Control Module

and Sensor Input Control Module.

Embedded 64-bit calculating precision DSP controller guarantees the real-time processing of the motion control and change notifications. Entire control process is finished within 1 millisecond.

UIM241’s enclosure is made of die-cast aluminum to provide a rugged durable protection and improves the heat dissipation.

1.1 Basic Control System

UIM241XX controller’s basic control system comprises communication system, basic motion control system, absolute position counter, quadrature encoder interface and real-time event-based change notification system.

Communication System

UIM241 controller communicates with user device using RS232 protocol. User device controls the

UIM241 controller through ASCII coded instructions. Communication baud rate can be changed through instruction and will be burned into on-board EEPROM.

Basic Motion Control

UIM241XX controller has firmware and hardware supporting motor driving and motion control. All basic motion parameters can be configured through instructions in real-time, such as: speed, position, phase current, micro-stepping resolution and enable/disable the H-bridge, etc. Speed input range is +/-65,000 pulses/sec. Angular position/displacement input range is +/-2,000,000,000 pulses.

Absolute Position Counter/Quadrature Encoder Interface

UIM241XX has a hardware pulse counter. Output of the counter is signed. The counter can be reset either by user instruction or 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.

UIM241XX 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

UIM241XX can perform self closed-loop control.

Real-time Change Notification (RTCN)

Similar to CPU’s interrupters, UIM241XX 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 57600. UIM241XX’s RTCN system supports 8 events: displacement control done, falling edge, analog input beyond upper threshold, analog input lower than lower threshold. All RTCNs can be enabled or disabled by instructions.

M41110923EN Page 10 UI Robot Technology Co. Ltd

UIM241XX Miniature Integrated Stepper Motor Controller

1.2 Advanced Motion Control Module

With advanced motion control module installed, UIM241XX 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).

Advanced motion control module can be disabled/enabled through user instruction.

1.3 Sensor Input Control Module

UIM241’s Sensor Input Module supports 2 channels of sensor input. Input types are configured through instruction. There is 1 channel can be configured as analog input. The on-board ADC has 12bit and 50K

Hz sampling rate. Analog input is averaged over 16 samples.

User can configure the desired automatic action triggered by sensor status change. There are 9 actions listed below that can be triggered by 6 sensor events:

1. Start and Run Reversely (DIR=0) at desired speed and acceleration rate.

2. Start and Run Forwardly (DIR=1) at desired speed and acceleration rate.

3. Decelerate until Stop.

4. Reset position and encoder counter + Decelerate until Stop.

6. Reset position and encoder counter + Emergency Stop.

7. Execute reverse (DIR=0) displacement control.

8. Execute forward (DIR=1) displacement control.

9. Reset position and encoder counter.

1.4 Encoder-based Closed-loop Control Module

With the encoder-based closed-loop control module, UIM241 controller can perform self closed-loop motion control. Without this module, UIM241 can still interface with a quadrature encoder and provide reading to user device, but the self closed-loop is not available.

1.5 Instructions and Interface

Instructions for UIM241XX are simple, intuitive and fault-tolerating.

For example, in order to achieve a speed of 1000 steps/sec, the following instructions are all valid: "SPD

= 1000;" or "SPD: 1000;" or "SPD 1000;" or "SPD1000;" or "SPD %?&%* 1000;"

In case the user enters a wrong instruction, the controller will return an ACK of error message. Incorrect instructions will not the executed to avoid accidents.

UIRobot provides free Microsoft Windows XP based VB / VC demo software and corresponding source code, to facilitate the quick start of user device side programming.

UI Robot Technology Co. Ltd. M41110923EN Page 11

UIM24102/04/08

2.0 Instruction and Feedback Structure

Once UIM241XX receives a message (instructions) from the user device, it will first ACK back (repeat) the received instruction, and then execute the instruction. If the real-time change notification (RTCN) is enabled, UIM241XX will further send back a message to inform the user device of the completion of the instruction. Before a new instruction is received, UIM241XX will keep current working status (e.g. running, stop, etc.)

2.1 Instruction Structure

An instruction is a message sent from the user device to UIM241XX to command certain operation.

Instructions of UIM241XX follow the rules listed below:

1. Length of an instruction (including the ending semicolon “;”) should be within 20 characters

2. Coded with standard 7 bits ASCII code (1-127). Expended ASCII code is NOT accepted.

3. Instruction structure as follows:

Instruction Symbol = Value;

or

Instruction Symbol;

Where,

Instruction Symbol

comprises letters with no space between them, and is not case sensitive.

Value

comprises set of numbers, with no other characters between them. Some instructions have no Value, such as “SPD;”, “STP;” etc.

Terminator

is the semicolon “;”. Instruction without terminator will cause the UIM241XX to wait until the presence of the “;”. In most situations, that will cause unpredictable results.

Note:

the equal symbol “=” is optional. User can use other characters except “{” and “}”.

4. Only the first three letters of an instruction are used by the UIM241XX. Therefore the following two instructions are the same: “ENABLE;” and “ENA;”

2.2 Macro Operator and Null Instruction

In practice, users will combine several instructions together and send them at once. For example:

CUR=20; MCS=16; DIR=1; SPD=5000; ENA;

Normally, the user device will receive an ACK message on every instruction sent. Thus the above instruction set will cause 5 ACK messages being transferred on the RS232 bus. Especially for those basic motion instructions like SPD, DIR, MCS, which have the same ACK, sending a set of ACK is unnecessary. To facilitate the above situation, user can use the following method to send a set of instructions:

{Instruction 1; Instruction 2; …Instruction N; };

(N<10)

For example:

{CUR=20; MCS=16; DIR=1; SPD=5000; ENABLE; };

UIM241XX will only send back 1 ACK on receiving the above message. In the above example, “{” and “}” is called Macro Operator. Instructions between a pair of macro operators will get no ACK message. The semicolon at the end of the instruction set has no letter or number before it. That is called Null

Instruction

. The only purpose of a Null Instruction is to tell the UIM241XX to feedback all the inquired parameters of the basic motion control. (i.e. Enable/disable, Current, Micro-stepping, Auto current reduction, Direction, Speed, and Displacement) Actually, user can simply send the null instruction“;” alone to check the status of the above parameters. If there is no null instruction “;” after the “}” in the above example, there will be no ACK message at all.

M41110923EN Page 12 UI Robot Technology Co. Ltd

UIM241XX Miniature Integrated Stepper Motor Controller

2.3 Feedback Message Structure

Feedback Message is the message sent to user device from UIM241XX controller. The maximum length of feedback messages is 13 bytes.

Feedback messages from UIM241XX follow the structure below:

[Header] [Controller ID] [Message ID] [Data] [Terminator]

Header

denotes the start of a feedback message. There are 3 kinds of headers:

1. 0xAA represents the ACK message, which is a repeat of the received instruction.

2. 0xCC represents the status feedback, which is a description of current working status.

3. 0xEE represents the error message.

Controller ID

is the identification number of current controller in a controller network. For UIM241XX,

Controller ID is always 0.

Message ID

denotes the property of the current message.

For example, 0xCC 0x00 0xA0 0xFF, where 0xA0 denotes that the current message means a falling edge happened at sensor S1 port.

Data

has a 7bits data structure. In figure 2-1and figure 2-2, examples are shown on how to convert a set of 7bits data into 16bits data and 32 bits data. Obviously, 16bits data takes three 7bits data, and 32bits data needs five 7btis data to represent.

Terminator

denotes the end of a feedback message. UIM241XX controller utilizes “0xFF”as the terminator.

Note:

there are two types of feedback that has NO Message ID: ACK message and Motor Status feedback (controller’s response to FBK instruction). Other messages could have NO data, such as some real-time change notification messages.

Figure2-1: Conversion from three 7bits message to a 16bits data

16bits data(binary)

X X X bit 15 14 13

X

12

X

11

X

10

X

9

X

8

X

7

X

6

X

5

X X X X X

4 3 2 1 0

2 bit data bit

Message byte1

0 0 0

7 6 5

0 0 X

4 3 2

X

1

7 bit

Message byte2

0 X X X X X X

7 6 5 4 3 2 1

7 bit

Message byte3

0 X X X X X X

7 6 5 4 3 2 1

Figure2-2: Conversion from 5 7bits message to 32bits data

32bits data (binary)

X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X

31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0

Message byte2

0 X X X X X X X

7 6 5 4 3 2 1 0

0 0 0 0 X X X X

7 6 5 4 3 2 1 0

Message byte1

Message byte4

0 X X X X X X X

7 6 5 4 3 2 1 0

Message byte3

0 X X X X X X X

7 6 5 4 3 2 1 0 data bit

Message byte5

0 X X X X X X X

7 6 5 4 3 2 1 0

UI Robot Technology Co. Ltd. M41110923EN Page 13

UIM24102/04/08

UIM241xx controllers communicate and exchange information with user devices throughRS232 serial protocol. The RS232 configuration of user device, the hand-shaking methods and the instruction used to change the baud rate will be introduced in this Chapter, along with the method to reset the baud rate to factory default.

3.1 User Device RS232 Port Configuration

To communicate with UIM241XX, user device needs to have following RS232 port settings:

8 bits data

1 stop bit

None Parity

3.2 Hand-Shaking

If user device knows the baud rate, it can start sending instructions without hand-shaking. Hand-shaking is more used as a method to check the existence and firmware version of the controller.

Under following two situations the UIM241XX will issue a greeting message:

1. When UIM241XX is powered up.

2. When UIM241XX receives following ASCII message: ABC; (case sensitive and ended with a semicolon) A message started with 0xAA, 0xAB, 0xAC at the user device implies a successful hand-shake.

A greeting Message from UIM241XX has the following structure: value 0xAA 0xAB 0xAC 0x18 0x1 Current Module 0 0 0xFF

Where,

[0xAA] [0xAB] [0xAC]

denotes the greeting message.

[0x18] [0x01]

denotes the UIM241 controller.

[Current]

denotes the maximum motor current the controller can provide.

[Module]

denotes the optional control modules the controller installed

[Firmware Version]

denotes the firmware version. Data is in 7 bits format. Conversion from three

7bits message data to a 16bits integer is illustrated in figure 2-1.

Note: For above [Firmware Version], Byte 8 / Byte 9 / Byte10 is the 1st Byte / 2nd Byte / 3rd Byte shown in figure 2-1 respectively.

M41110923EN Page 14 UI Robot Technology Co. Ltd

UIM241XX Miniature Integrated Stepper Motor Controller

3.3 Baud Rate Change InstructionBDR

Factory default baud rate of UIM241XX controller is 9600. User can change the baud rate as described below, using the instruction BDR. On receiving the BDR instruction, the new baud rate will be stored in the EEPROM and will take effect after the controller is restarted.

Function

Variable

ACK

Comment

BDR = x;

Set the RS232 communication baud rate of UIM241XX controller to x.

Integer x = 9600 … 57600

0xAA [reserved] 0xBD 0xFF

0xBD is the Message ID of instruction BDR

[reserved] is for factory use

New Baud Rate will be stored in the controller’s non-volatile memory

(EEPROM).New baud rate will take effect after the controller is restarted.

3.4 Reset Baud Rate to Factory Default 9600

In case of forgotten the baud rate and cannot establish the connection, please take the following steps to reset the baud rate to factory default of 9600.

1. Reboot the controller.

2. In 10 seconds, short the terminal 9 (figure 0-1) to analog ground (terminal 6) for 2 times, with intervals around 1 second.

3. Each time, the LED on the controller will flash. If exceed 10 seconds, please restart from step 1.

4. If successful, the LED will turn off for one second and re-lit. That indicates the baud rate has been changed to 9600 and ready to use.

5. Use BDR instruction to change the baud rate to desired value.

3.5 Check Controller Model (MDL)

Function

Variable

Feedback

Comment

MDL=x;

Check the Model, installed optional modules and firmware version

N/A

0xCC 0x00 0xDE 0x18 0x1 [CUR] [ASM] V2 V1 V0 0xFF

0xDE is the Message ID of instruction MDL.

[CUR] denotes the max phase current. e.g., “20” means 2.0 A.

[ASM] denotes the installed optional modules. It has the following structure: bit 7 6 5 4 3 2 1 0

---------------------------------------------------------------------------------------------------

Meaning 0 Int. QE Closed-loop Adv. Motion No. of Sensor Ports

For example, if bit 4 is 1, the Advanced Motion Control module is installed.

V2 – V0 denote the firmware version. Data is in 7 bits format. Conversion from three 7bits message data to a 16bits data is illustrated in figure 2-1.

UI Robot Technology Co. Ltd. M41110923EN Page 15

UIM24102/04/08

4.0 Real-time Change Notification

UIM241XX controllers support Real-time Change Notification (RTCN). Similar to interrupter of CPU, a

RTCN is generated and sent when a user predefined event happens. The length of a RTCN is 4 bytes.

The time from the occurrence of the event to the sending of the RTCN is less than 0.5 milliseconds. If using the 57600 baud rate, the transfer time on theRS232 bus is around 0.8 milliseconds. Therefore, the time from the event happening till user device gets the information is less than 1.5 milliseconds.

4.1 RTCN Structure

The structure of an RTCN message is shown below:

0xAA [0x00] [Message ID] 0xFF

The RTCN system is able to response to the following events:

Figure 3-1: Real-time change notification events

No. Event Message Description

1 falling edge of S1

2 rising edge of S1

3 falling edge of S2

4 rising edge of S2

5 beyond upper limit

6 below lower limit

0xA0

0xA1

0xA2

0xA3

0xA1*

0xA0**

Voltage on S1: High >>>Low

Voltage on S1: Low >>>High

Voltage on S2: High >>>Low

Voltage on S2: Low >>>High

Analog input > user preset upper limit

Analog input < user preset lower limit

7 displacement control complete 0xA8

0xA9

The desired position is reached

Position counter reaches/passes zero

Note:

* When S1 is configured as analog, 0xA1 denotes event 5, otherwise 0xA1 denotes event 2.

** When S1 is configured as analog, 0xA0 denotes event 6, otherwise 0xA0 denotes event 3.

4.2 Enable/Disable RTCN

Every RTCN can be enabled or disabled by user instruction.

Enable/disable the RTCN is achieved by writing to the Master Configuration Register’s ORGIE bit

(MCFG<5>), STPIE bit (MCFG<4>), S2IE bit (MCFG<1>) and S1IE bit(MCFG<0>). Please refer to section 5.1 for details. Please note, to realize the sensor event control, user needs to further configure the sensor control registers S12CON, S34CON and ATCON. Please refer to chapter 8.0 for details.

M41110923EN Page 16 UI Robot Technology Co. Ltd

UIM241XX Miniature Integrated Stepper Motor Controller

UIM241XX’s hardware and firmware can be configured by user instructions. This is realized through writing the corresponding configuration register(s). There are 4 configuration registers in UIM241XX:

Master Configuration Register, Sensor Input Control Register and two Analog Threshold Registers.

In this chapter, the Mater Configuration Register will be described. The other three registers will be detailed in Chapter 8.0 Sensor Input Control.

5.1 Master Configuration Register

Master Configuration Register is used to enable/disable the hardware/firmware functions. Once configured, it will be effective immediately and its value will be burned into the on-board EEPROM. The burning process will not affect any real-time process.

Master Configuration Register is a 16bits register with the following structure: bit 15 14 13 12 11 10 9 8 7 value ANE CHS QEI X QEM CM AM DM X

Bit 15

Bit 14

Bit 13

Bit 12

Bit 11

Bit 10

Bit 9

Bit 8

Bit 7-6

Bit 5

Bit 4

Bit 3-2

6 5 4 3 2 1 0

X ORGIE STPIE X X S2IE S1IE

ANE Enable / Disable Analog Input

0 = Disable the analog input, port S1 is digital

1 = Enable the analog input

Input

This bit is always 0, for UIM241, means only S1 can be configured as Analog Input.

QEI Enable/Disable

0 = Disable Quadrature Encoder Interface

1 = Disable Quadrature Encoder Interface

Unimplemented. Read as 0.

QEM Enable/Disable Quadrature Encoder-based Closed-loop Control Module

0 = Disable Quadrature Encoder-based Closed-loop Control Module

1 = Enable Quadrature Encoder-based Closed-loop Control Module

CM Advanced Motion Control Mode

0 = Disable advanced motion control module, use basic control mode

1 = Enable advanced motion control module

AM Acceleration Mode

0 = Value mode. Unit is pps/sec, or pulse/ (square second)

1 = Period mode. Unit is millisecond.

DM Deceleration Mode

0 = Value mode. Unit is pps/sec, or pulse/ (square second)

1 = Period mode. Unit is millisecond.

Unimplemented. Read as 0.

ORGIE Origin (Zero) Position RTCN

0 = Disable the Origin (zero) position RTCN.

1 = Enable the Origin (zero) position RTCN.

STPIE Displacement Control (STP/POS/QEC) Completion RTCN

0 = Disable the displacement control completion RTCN.

1 = Enable the displacement control completion RTCN.

Unimplemented. Read as 0.

UI Robot Technology Co. Ltd. M41110923EN Page 17

UIM24102/04/08

Bit 1

Bit 0

S2IE S2 Status Change RTCN

0 = Disable S2 status change RTCN

1 = Enable S2 status change RTCN

S1IE S1 Status Change RTCN

0 = Disable S1 status change RTCN

1 = Enable S1 status change RTCN

5.2 Master Configuration Register Instruction (MCFG)

Function

Variable

ACK

Comment

Example

MCFG = x;

Setup Master Configuration Register.

Integer x = 0, 1 … 65535, or Hexadecimal x= 0x0000 … 0xFFFF

0xAA 0x00 0xB0 CFG2 CFG1 CFG0 0xFF

0xB0 is the Message ID of MCFG

CFG2 – CFG0 denotes the master configuration register value. See figure 2-1 for how to convert to a 16bit integer.

If x using decimal, first fill each bit of the master configuration register with 0 or

1, and then convert them to a decimal based number.

If x using hexadecimal, the number must start with “0x”.

User Send

ACK Message

Interpretation

MCFG=34611; or MCFG=0x8733;

0xAA 0x00 0xB0 0x02 0x0E 0x33 0xFF

Convert 0x2 0xE 0x33 into 16bits data, we get: 0x8733 (That is

34611 decimal)

5.3 Check Master Configuration Register

Function

Variable

ACK

Comment

MCFG;

Check the value of the Master Configuration Register.

N/A

0xAA 0x00 0xB0 CFG2 CFG1 CFG0 0xFF

0xB0 is the Message ID of MCFG.

CFG2 – CFG0 denotes the master configuration register value. See figure 2-1 for how to convert to a 16bit integer.

M41110923EN Page 18 UI Robot Technology Co. Ltd

UIM241XX Miniature Integrated Stepper Motor Controller

6.0 Basic Control Instructions

UIM241XX controllers support the following basic control instructions.

1 ENA

2 OFF

3 CUR

4 MCS

5 ACR

6 DIR

7 SPD

8 STP

9 FBK

10 ORG

11 POS

Example

Enable the motor driving circuit

Disable the motor driving circuit

Set desired motor phase current

Set micro-stepping resolution

Enable / disable Automatic Current Reduction ACR=1; ACR1;

Set desired motor direction (obsoleted)

Set desired speed PPS (pulse per second)

Check present speed

Set desired incremental displacement

Check present incremental displacement

SPD65000; SPD-65000;

STP =-30000;

Inquiry present motor working status

Reset the position/encoder counter

Set desired position

Check present position

ENA;

OFF;

CUR=17; CUR17;

MCS16;

FBK;

ORG;

POS+20000000;

The above instructions are valid for both basic motion control (without acceleration/deceleration or Scurve displacement control) and advanced motion control (if the module is installed and enabled). User can select either basic or advanced motion control by configuring the Master Configuration Registration

(MCFG).

In this Chapter, introduction to UIM241XX motion control modes is first provided, followed by detailed description of above instructions.

UI Robot Technology Co. Ltd. M41110923EN Page 19

UIM24102/04/08

6.1 General Introduction of Motion Control Modes

There are three motion control modes for UIM241XX controller: Velocity Tracking (VT), Position Tracking

(PT) and Position Velocity Tracking (PVT).

Velocity Tracking (VT)

In the Velocity Tracking (VT) mode, UIM241XX controller controls the motor speed to track desired speed.

Figure 6-1 Velocity Tracking

Instruction “SPD=1000;” received at this point

Speed

1000

Current Speed

Basic motion control, speed rises without acceleration process

Advanced motion control, linear/non-linear acceleration

T (Time)

Speed

Current Speed

Instruction “SPD= - 1000;” received at this point

Basic motion control, speed falls without deceleration process

Advanced motion control, linear/nonlinear deceleration

-1000

T (Time)

Please note that:

Sign (+/-) of the value of SPD instruction instructs the motion direction. For example: both the instruction “SPD=1000;” and “SPD=+1000;” make motor run forward at 1000pps. Meanwhile, the instruction “SPD= -1000;” can cause motor to run backward at 1000pps.

The DIR instruction is obsoleted. However, if a DIR instruction occurs after an SPD instruction, it will still affect motor direction.

If Advanced Motion Control Module is installed, speed control can be achieved through linear or nonlinear acceleration/deceleration. For details, please refer to Chapter 7.0 Advanced Motion Control.

Position Tracking (PT)

In the Position Tracking (PT) mode, UIM241 controller will keep motor running at a speed close to the set value until it reaches the desired steps. After setting the desired speed, user can enter desired positions or incremental displacement continuously or discontinuously. UIM241 controller will make sure that the desired position is achieved when trying to approach the desired speed to the greatest extent.

As shown in Figure 6-2, UIM241 controller operates in PT mode automatically on receiving position instruction such as POS, STP or QEC until an instruction of “STP=0;” is given.

STP is a displacement control instruction. Logically “STP=0;” means no displacement. It is contradictory to send a displacement instruction of no displacement. Therefore, UIM241 will take this instruction as a request to shift from PT mode to VT mode.

M41110923EN Page 20 UI Robot Technology Co. Ltd

UIM241XX Miniature Integrated Stepper Motor Controller

Figure 6-2 Position Tracking Mode (without acceleration/deceleration)

Position

2000

1000

0

-2000

T (Time)

Actual

Motor

Speed

2000

1000

0

-1000

T (Time)

1 2 3 4 5 6 7 8 9 10 11 12 13

No.

1

Operation or

Event

Power up

2

3

ORG VT

4

5

SPD PT

6

Position reached PT

7

POS PT

8

Position reached PT

9

SPD PT

10

11

Position reached PT

12

PT mode off

13

OFF

VT

VT

Control

Mode

Desired

Position

VT 0

0

2000

2000

-2000

-2000

-2000

1000

1000

0

Current

Position

Stored position

Position Error

- Stored position

Desired

Speed

0

Motor

Direction

1

Motor

Speed

0

- Stored position 0 1 0

0 0 0 1 0

0 2000 0 1 0

0 2000 1000 1 1000

2000

2000

-2000

-2000

0

-4000

0

0

1000

1000

1000

-2000

1

0

0

0

0

1000

0

0

1000

1000

1000

0

0

-1000

1000

0

0

1 2000

1 0

1

1

0

0

UI Robot Technology Co. Ltd. M41110923EN Page 21

UIM24102/04/08

Position Velocity Tracking (PVT)

Position Velocity Tracking (PVT) mode is an extended mode of Position Tracking (PT) mode. In this mode, user can enter both desired position and desired speed.

UIM241XX controller will instruct motor to run at the desired speed until it reaches the desired position and then stop. User can enter, successively or discontinuously, both desired speed and desired position.

Shifting between the three modes is displayed in the following chart:

Figure 6-3 Shifting between Motion Control Modes

Power up offline

1) H-bridge disabled, logic circuit working

2) can accept, buffer and operate instructions

Instruction OFF;

Instruction ENA;

VT Mode

1) Approach the desired speed

2) Keep running at the desired speed

3) Set the desired speed at 0 to stop

Instruction STP=0;

Instruction STP=x;

Instruction POS=x; or

InstructionQEC=x;

PT Mode

1) set the desired speed, and then set the desired position

(or displacement) successively or discontinuously

1) approach the desired speed while making sure the desired position is achieved

2) keep running at the desired speed

3) stop after reaching the desired position

{SPD=x;POS=x;}

{SPD=x;STP=x;} or

{SPD=x;QEC=x;}

Instruction STP=x;

Instruction POS=x; or

Instruction QEC=x;

PVT Mode

2) set the desired speed and position (or displacement) successively or discontinuously

3) approach the desired speed while making sure the

4) desired position is achieved keep running at the desired speed

5) stop after reaching the desired position

6.2 H-Bridge Enable Instruction (ENA)

Function

Variable

ACK

Comment

ENA;

Enable the stepper motor driver (i.e. H-bridge driving circuit).

N/A

Refer to the following “Basic Instruction ACK” for details

Only after the H-bridge enabled, can the controller drive the motor

6.3 H-Bridge Disable Instruction (OFF)

Function

Variable

ACK

Comment

OFF;

Disable the stepper motor driver (i.e. H-bridge driving circuit).

N/A

Refer to the “Basic Instruction ACK” for details

OFF instruction turns off the dual H-bridge motor driving circuit. Once an OFF instruction is executed, the motor will have no power supply, the power consumption is cut to minimum (the logic circuit is still working). User needs to use the ENABLE instruction to turn the motor driver back to working.

M41110923EN Page 22 UI Robot Technology Co. Ltd

UIM241XX Miniature Integrated Stepper Motor Controller

6.4 Motor Current Adjusting Instruction (CUR)

Function

Variable

ACK

Comment

CUR = x;

Set the output phase current to x.

Integer x = 0、1 … 80

Refer to the “Basic Instruction ACK” for details.

Integers 0 ... 80 represent 0 ... 8.0 amps.

Once received, the current value will be stored in the controller’s EEPROM. If the received current value is not one of the above integers, an Error ACK will be sent to the user device through RS232. Incorrect instructions will be discarded without being executed.

6.5 Automatic Current Reduction Instruction (ACR)

Function

Variable

ACK

Comment

ACR = x;

Enable/disable ACR (automatic current reduction) function.

Integer x = 0,1

Refer to the “Basic Instruction ACK” for details.

If ACR = 1; the function is enabled, vice versa. When ACR is enabled, the current will be reduced after motor stops, which means a decrease of holding torque. Value of this instruction will be stored in EEPROM.

6.6 Micro Stepping Setup Instruction (MCS)

Function

Variable

ACK

Comment

MCS = x;

Set micro-stepping resolution.

Integer x = 1, 2, 4, 8, 16

Refer to the “Basic Instruction ACK” for details. x = 1, 2, 4, 8, 16 represents the full, half, quarter, eighth and sixteenth step resolution, respectively.

Once received, the MCS value will be stored in the controller’s EEPROM. If the received current value is not one of the above integers, an Error ACK will be sent to the user device through RS232.

6.7 Motion Direction Instruction (DIR)

Function

Variable

ACK

Comment

DIR = x; (obsoleted, do not use)

Set the desired motor direction.

Integer x = 0, 1

Refer to the “Basic Instruction ACK” for details.

Motor direction is now determined by the sign of the speed.

The actual motor direction also depends on the wiring between motor and controller.

UI Robot Technology Co. Ltd. M41110923EN Page 23

UIM24102/04/08

6.8 Absolute Position Counter Reset Instruction (ORG)

Function

Variable

Feedback

Comment

ORG;

Reset the position/encoder counter, create an origin point.

N/A

0xCC 0x00 0xB0 0x00 0x00 0x00 0x00 0x00 0xFF

0xCC indicates that a feedback message is received

0xB0 is the Message ID of ORG

6.9 Speed Adjusting Instruction (SPD)

Function

Variable

ACK

Comment

Example

SPD = x;

Set the desired speed to x.

Integer x = - 65535…-1, 0, 1 … + 65535

0xAA 0x00 0xB5 SPD2 SPD1 SPD0 0xFF

0xAA indicates confirm of instruction (ACK)

0xB5 is the Message ID for desired speed (SPD)

SPD2 – SPD0 denotes the desired motor speed. See figure 2-1 for how to convert to a signed 16bit integer. Unit is pulse/second, PPS or Hz. The sign of the value decides motor direction.

If no “+” or “-” specified before “x”, it is taken as “+”.

Once H-bridge is enabled, motor starts running on receiving the instruction

“SPD=x;” (x≠0) until another instruction “SPD=0;” is given.

For a 1.8° stepper motor, if the SPD =100;

User sent: SPD = 100;

If MCS = 1; motor speed = 1.8*100 = 180°/sec = 30 rpm

If MCS =16; motor speed = 1.8*100/16 = 11.25°/ s = 1.875rpm

6.10 To Check Current Speed (SPD)

Function

Variable

Feedback

Comment

SPD;

Check current speed.

N/A

0xCC 0x00 0xB2 SPD2 SPD1 SPD0 0xFF

0xCC denotes feedback of current status

0xB2 is the Message ID of current speed (SPD)

SPD2 – SPD0 denotes the current motor speed. See figure 2-1 for how to convert to a signed 16bit integer. Unit is pulse/second, PPS or Hz. The sign of the value denotes motor direction.

M41110923EN Page 24 UI Robot Technology Co. Ltd

UIM241XX Miniature Integrated Stepper Motor Controller

6.11 Displacement Control Instruction (STP)

Function

Variable

ACK

Comment

Example

STP = x;

Set the desired incremental displacement (steps or micro-steps if MCS≠1).

Integer x = - 2,000,000,000…-1, 0, 1 … + 2,000,000,000

0xAA 0x00 0xB6 STP4 STP3 STP2 STP1 STP0 0xFF

0xB6 is the Message ID of STP

STP4 – STP0 denotes the desired motor displacement. See figure 2-2 for how to convert to a signed 32bit integer. Displacement is essentially defined as counts of the pulse or encoder counter. Therefore the actual motor displacement is also relative to the micro-stepping resolution or encoder resolution.

If an STP=0; instruction is received before the former STP instruction is completed, UIM241 will execute the current instruction and stop motor. The former STP instruction is regarded as being completed. Meanwhile, system will shift from PT mode to VT mode.

If an STP instruction is received while the motor is already running, the former steps will not be counted in the displacement of current STP instruction.

For a 1.8° stepper motor, if STP =200;

User sent: STP = 200;

If MCS = 1, motor rotation angle = 1.8 * 200 = 360°

If MCS = 16, motor rotation angle = 1.8 * 200 / 16 = 22.5°

6.12 To check STP displacement

Function

Variable

Feedback

Comment

STP;

Check current incremental displacement.

N/A

0xCC 0x00 0xB3 STP4 STP3 STP2 STP1 STP0 0xFF

0xCC denotes current status feedback

0xB3 is the Message ID of current incremental displacement (STP)

STP4 – STP0 denotes the current incremental displacement. See figure 2-2 for how to convert to a signed 32bit integer. Displacement is essentially defined as counts from the pulse counter or encoder. Therefore the actual angular displacement is relative to micro-stepping resolution or encoder resolution.

UI Robot Technology Co. Ltd. M41110923EN Page 25

UIM24102/04/08

6.13 Position Control Instruction (POS)

Function

Variable

ACK

Comment

POS=x;

Set desired position (for open-loop control).

Integer x = - 2,000,000,000…-1, 0, 1 … + 2,000,000,000

0xAA 0x00 0xB7 P4 P3 P2 P1 P0 0xFF

0xB7 is the Message ID of desired position (POS)

P4 – P0 denotes the desired absolute position. See figure 2-2 for how to convert to a signed 32bit integer. Position is essentially recorded from counts of the pulse counter. Therefore the actual motor position is also relative to the microstepping resolution.

The position counter records the total pulses sent to motor. When the direction is positive (DIR=1), the counter increases by 1; when the direction is negative

(DIR=0), the counter decreases by 1. Therefore, the value of the counter is a signed 32bits integer, with positive representing the final position is of the same direction of DIR=1, and vice versa.

POS position control is open-loop control.

The absolute position counter only resets (back to zero) in two situations:

1. User issues the instruction ORG (described later);

2. User pre-configured sensor ORG event takes place.

Power Failure Protection: Should a Power Failure situation happen, the value of the pulse counter will be pushed into EEPROM and restored when reboot next time. However, passive movement after power off cannot be recorded.

6.14 Check Current Position (POS)

Function

Variable

Feedback

Comment

POS;

Check current position.

N/A

0xCC 0x00 0xB0 P4 P3 P2 P1 P0 0xFF

0xB0 is the Message ID of current position (POS)

P4 – P0 denotes the desired absolute position. See figure 2-2 for how to convert to a signed 32bit integer. Position is essentially recorded from counts of the pulse counter. Therefore the actual motor position is also relative to the microstepping resolution.

M41110923EN Page 26 UI Robot Technology Co. Ltd

UIM241XX Miniature Integrated Stepper Motor Controller

6.15 Basic Instruction Acknowledgment (ACK)

Upon receiving an instruction, the UIM241XX controller will immediately send back an Acknowledgment

(ACK) message. For all basic instructions describe before except POS and ORG, there are only two

ACK messages for all of them, as described below.

Error Message

If the received instruction is incorrect, UIM241 will issue an error message and the incorrect instruction will not be executed.

There are two kinds of errors: Syntax error and value error (i.e., variable is incorrect). The structure of an error message is:

0xEE [Error Code] 0xFF

Where,

0xEE denotes an error message.

The error code is list below:

Error Code

Meaning

0x65 0x66

Syntax Error Value Error

Basic ACK Message

When a valid instruction is received, the UIM241 will send back a basic ACK message. The basic ACK message contains all desired settings. Specifically, following information is included in the ACK message:

STP, SPD, DIR, MCS, CUR, ENABLE/OFFLINE, and ACR. The basic ACK message is 13bytes long and has a structure as shown below: value 0xAA 0 ASM CUR SPD2 SPD1 SPD0 STP4 STP3 STP2 STP1 STP0 0xFF

Where,

1. 0xAA denotes a basic ACK message

2. ASM (Assembled byte) structure: bit 7 6 5 4 3 2 1 0 value N/A(=0) ACR ENA/OFF DIR

MCS – 1(0 = full step,15 = 1/16 step)

3. CUR (desired phase current) structure: bit 7 6 5 4 3 2 1 0 value N/A(=0) Phase Current (e.g. 27 = 2.7 Amp)

4. SPD2 – SPD0 denotes the desired motor speed. See figure 2-1 for how to convert to a signed 16bit integer. Unit is pulse/second, PPS or Hz. The sign of the value decides motor direction.

5. STP4 – STP0 denotes the desired motor displacement. See figure 2-2 for how to convert to a signed 32bit integer. Displacement is essentially defined as counts from the pulse counter or encoder. Therefore the actual angular displacement is relative to micro-stepping resolution or encoder resolution.

UI Robot Technology Co. Ltd. M41110923EN Page 27

UIM24102/04/08

6.16 Motor Status Feedback Inquiry Instruction (FBK)

If user wants to check the current motor status, following instruction should be used. Please note that, motor status and desired settings could be different.

Function

Variable

Feedback

FBK;

Check the current motor status.

N/A

See the following section

Comment

FBK is the abbreviation for Feedback.

6.17 Motor Status Feedback Message

Upon receiving the FBK instruction, the controller will send back the feedback message comprising the following up-to-date motor status: incremental displacement, speed, direction, micro-stepping resolution, and phase current, enabled/offline status and ACR status.

The feedback Message is 13 bytes long in the following format: value 0xCC 0 ASM CUR SPD2 SPD1 SPD0 STP4 STP3 STP2 STP1 STP0 0xFF

Where,

1. 0xCC denotes a Motor Status Feedback Message. (i.e., the present value of motor status)

2. ASM (assembled) byte structure: bit 7 6 5 4 3 2 1 0 value N/A(=0) ACR ENA/OFF DIR MCS – 1 (0 = full step,15 = 1/16 step)

3. CUR (current phase current) structure bit 7 6 5 4 3 2 1 0 value N/A(=0) Phase Current (e.g. 27 = 2.7 Amp)

4. SPD2 – SPD0 denotes the current motor speed. See figure 2-1 for how to convert to a signed 16bit integer. Unit is pulse/second, PPS or Hz. The sign of the value decides motor direction.

5. STP4 – STP0 denotes the current motor displacement. See figure 2-2 for how to convert to a signed 32bit integer. Displacement is essentially defined as counts from the pulse counter or encoder. Therefore the actual angular displacement is relative to micro-stepping resolution or encoder resolution.

For more details on above conversion, please refer to the source code of the provided demo software.

These software and related source code are VC++/VB based and free.

M41110923EN Page 28 UI Robot Technology Co. Ltd

UIM241XX Miniature Integrated Stepper Motor Controller

7.0 Advanced Motion Control

UIM241XX has an optional Advanced Motion Control Module (sold separately) to perform linear/nonlinear acceleration/deceleration and S-curve displacement and position control. User can specify corresponding motion control parameters through instructions.

Instructions for the advanced motion control includes all the basic motion instructions and 5 additional instructions. Once the advanced motion control module is enabled, all basic control instructions are automatically turned into advanced control instructions.

Instruction Function

1 MCFG

2 MACC

3 MDEC

4 MMSS

5 MMDS

Enable/disable the advanced motion control module.

Set the acceleration rate

Set the deceleration rate

Set the Maximum Starting Speed

Set the Maximum Cessation Speed

Example

MCFG1792;

MACC=200;

MDE500;

MMS1600;

MMDS1000;

It takes less than 1 millisecond for the specified parameter to take effect after the instruction is received.

Values of above instructions will be stored in the EEPROM. Once the parameters are set, the controller will perform the advanced motion control automatically. At any time, user can use instructions (e.g., FBK,

POS, SPD, etc.) to get the current status of the motor.

In this chapter, the Advanced Motion Control processes are first introduced, followed by introduction to above 5 instructions.

7.1 Linear Acceleration

Linear acceleration is defined as acceleration at constant rate. The relationship between the speed and time is shown in figure 7-1. After the acceleration rate and desired speed is set, UIM241 controller will perform the acceleration process automatically.

Figure 7-1: Linear Acceleration Control

Speed

Acceleration Rate

Desired Speed

Current Speed

T (Time)

7.2 Linear Deceleration

Linear deceleration is defined as deceleration at constant rate. The relationship between the speed and time is shown in figure 7-2. After the deceleration rate and desired speed is set, UIM241 controller will perform the deceleration process automatically.

Figure 7-2: Linear Deceleration Control

Speed

Current Speed

Uniform Deceleration

Desired Speed

T (Time)

UI Robot Technology Co. Ltd. M41110923EN Page 29

UIM24102/04/08

7.3 Nonlinear Acceleration

To minimize the response time and to avoid resonance point, user can use UIM241XX’s non-linear acceleration function. Experiments show that through non-linear acceleration, UIM241XX can make

NEMA17/23 4000RPM (quad step) in 0.25 seconds. UIM241XX controller has the following non-linear acceleration functions.

If the desired speed is higher than a certain value (i.e. the Maximum Starting Speed, defined by instruction), and current motor speed is lower than the Max. Starting Speed, then the motor speed will first step up to the Max Starting Speed and then linearly accelerated according to the acceleration rate, as shown in figure 7-3.

Figure 7-3: Nonlinear Acceleration Control (case 1)

Uniform acceleration

Desired Speed

Speed

Step acceleration

Maximum Starting Speed

Current Speed

T (Time)

If the desired speed is less than the Max Starting Speed, then the motor speed will step up to the desired speed immediately, as shown in figure 7-4.

Figure 7-4: Nonlinear Acceleration Control (case 2)

Speed

Step Acceleration

Maximum Starting Speed

Desired Speed

Current Speed

T (Time)

If the current speed is higher than the Max Starting Speed, the UIM241 will use the linear Acceleration

Control Algorithm to control the speed.

Figure 7-5: Nonlinear Acceleration Control (case 3)

Speed

Uniform acceleration

Current Speed

Desired Speed

Maximum Starting Speed

T (Time)

M41110923EN Page 30 UI Robot Technology Co. Ltd

UIM241XX Miniature Integrated Stepper Motor Controller

7.4 Nonlinear Deceleration

Similar to the nonlinear acceleration control, there are three cases and corresponding control algorithms as listed below.

If the desired speed is higher than a certain user preset value (i.e. the Maximum Cessation Speed),

UIM241XX will use the Uniform Deceleration Control algorithm.

Figure 7-6: Nonlinear Deceleration Control (case 1)

Speed

Current Speed

Uniform Deceleration

Desired Speed

Maximum Cessation Speed

T (Time)

If desired speed is lower than the Max Cessation Speed and current motor speed is higher than the Max.

Cessation Speed, the Uniform Deceleration Control will be first applied and followed by a step deceleration to the desired speed.

Figure 7-7: Nonlinear Deceleration Control (case 2)

Speed

Current Speed

Uniform deceleration

Step Deceleration

Maximum Cessation Speed

Desired Speed

T (Time)

If the desired speed is lower than the Max Cessation Speed and current motor speed is lower than Max.

Cessation Speed, then the speed will be adjusted to the desired speed through step deceleration.

Figure 7-8: Nonlinear Deceleration Control (case 3)

Speed

Current Speed

Step Deceleration

Maximum Cessation Speed

Desired Speed

T (Time)

Note: Setting the Max Starting Speed or the Maximum Cessation Speed to 0 (zero) will force the controller use Linear Acceleration / Deceleration Control Algorithm.

UI Robot Technology Co. Ltd. M41110923EN Page 31

UIM24102/04/08

7.5 S-curve Displacement Control

S-curve displacement control essentially is the displacement control under the linear acceleration and deceleration speed control. The name is originated from the shape of the motion trajectory. The original

S-curve displacement control is the acceleration-coast-deceleration speed control. In the entire trajectory, there is no knee point, which makes the motion very smooth without impact or vibration. The control process is shown in figure 7-9.

Figure 7-9: S-curve Relative Displacement Control (case 1)

Speed

Desired Speed

Uniform Acceleration

Uniform Deceleration

T (Time)

Angular

Displacement

Stop Position

Trajectory

Start Position

T (Time)

In the control process, UIM241XX’s advance motion control module will continuously calculate the deceleration happening point (time) and then perform the deceleration to guarantee that when desired displacement is reached, the speed is right zero. The entire calculation time is around 50 micro-seconds with 64bit accuracy. In practice, when the desired displacement is small and the desired speed is high, deceleration starts before the desired speed is achieved to ensure that the speed decelerate to right zero when desired displacement is completed. The process is shown in figure 7-10.

Figure 7-10: S-curve Relative Displacement Control (case 2)

Speed

Desired Speed

Uniform

Acceleration Uniform

Deceleration

T (Time)

All the acceleration/deceleration methods may be applied in the S-curve displacement control, including linear acceleration/deceleration and non-linear acceleration/deceleration which is not described in the above figures though. Please note that for the non-linear acceleration/deceleration, as there are knee points in its trajectory, is not suitable for applications requiring motion smoothness. In this case, user can set the maximum start speed and maximum cessation speed at zero to disable non-linear acceleration/deceleration. This process is shown is figure 7-11.

M41110923EN Page 32 UI Robot Technology Co. Ltd

UIM241XX Miniature Integrated Stepper Motor Controller

Figure 7-11: S-curve Displacement Control

Speed

Uniform Acceleration

Max. Start

Speed

Desired Speed

Angular

Displacement

Stop Position

Trajectory

Uniform Deceleration

Max. Cessation

Speed

T (Time)

Knee point

Start Position

T (Time)

Knee point

7.6 Direction Control and Position Counter

When the user enables the advanced motion control module, the actual motor direction is controlled by the module. This is because if the user input commands a motion direction different from the current motion direction, the desired direction cannot be executed immediately. The motor must first be decelerated to zero speed before turned to the desired direction.

UIM241 has two types of position counters: absolute position counter and displacement counter.

Absolute position counter is for recording the absolute position of motor. The actual angular displacement is also relative to micro stepping. The value recorded in absolute position counter will be stored automatically on Power Failure situation and can only be cleared on user instruction or preset sensor event. When DIR=1, the counter (pulse) increases and when DIR=0, the counter decreases.

Absolute position counter value can be read through POS instruction.

Displacement counter is mainly used for displacement control. The former information is cleared when it receives a new displacement instruction. It can also be used to record the displacement since last time it was cleared.

7.7 Advanced Motion Control Instructions

Once the advanced motion control module is enabled, all basic control instructions are automatically turned into advanced control instructions. This transition is transparent to the user. Furthermore, there are 5 additional instructions added as listed below.

1. MCFG

This is the instruction to enable or disable the advanced motion control module. User can clear the

CM bit of Master Configuration Register (MCFG<CM>=0) to disable the module or set the CM bit

(MCFG<CM>=1) to enable the module.

2. mACC

This is the instruction set the acceleration rate. There are two ways to set the acceleration rate:

UI Robot Technology Co. Ltd. M41110923EN Page 33

UIM24102/04/08

If the AM bit of the Master Configuration Register is clear to zero (MCFG<AM>=0), then the value of the instruction will be interpreted as the value of the acceleration rate. The range of the input value is 1 ~ 65,000,000 and unit is pulse/sec/sec or pulse / square-second.

If the AM bit of Master Configuration Register is set to one (MCFG<AM>=1), then the value of the instruction will be interpreted as the period of the acceleration, or in other words, the time used for motor to accelerate to the desired speed from current speed. The range of the input value is 1 ~ 60,000 milliseconds, i.e., 0.001~ 60 seconds.

Figure 7-12: Two modes to Set the of Acceleration Rate

(1). Acc. Period

Speed

Desired Speed

Max. Start Speed

(2). Acc. Rate (Slope)

Current Speed

T (Time)

3. mDEC

Similar to mACC, the deceleration also has two ways to set as listed below.

If the DM bit of the Master Configuration Register is clear to zero (MCFG<DM>=0), then the value of the instruction will be interpreted as the value of the deceleration rate. The range of the input value is 1 ~ 65,000,000 and unit is pulse/sec/sec or pulse / square-second.

If the DM bit of Master Configuration Register is set to one (MCFG<DM>=1), then the value of the instruction will be interpreted as the period of the acceleration, or in other words, the time used for motor to decelerate to the desired speed from current speed. The range of the input value is 1 ~ 60,000 milliseconds, i.e., 0.001~ 60 seconds.

4. mMSS

This is the instruction to set the Maximum Starting Speed.

5. mMDS

This is the instruction to set the Maximum Cessation Speed.

Since the definitions of Maximum Starting Speed and Maximum Cessation Speed were already discussed in the previous sections, here they are omitted. The unit of Maximum Starting Speed and

Maximum Cessation Speed is pps (pulse per second).

7.8 Enable/disable Advanced Motion Control Module (MCFG)

Advanced Motion Control Module can be enabled or disabled by setting the CM bit of MCFG

(MCFG<10>). Setting the CM bit (MCFG<CM>=1) will enable the module and clearing the CM bit

(MCFG<CM>=0) will disable the advanced motion control module. (For details of setting, please refer to

Section 5.1 Master Configuration Register.) Meanwhile, the AM and DM bit of MCFG also defines the input methods of acceleration/deceleration.

M41110923EN Page 34 UI Robot Technology Co. Ltd

UIM241XX Miniature Integrated Stepper Motor Controller

7.9 Acceleration Rate Setup Instruction (mACC)

Value Mode (pre-requiring MCFG<AM> = 0)

Function

Variable

ACK

Comment mACC= x;

Set the acceleration rate to x (in value mode).

Integer x = 1、2 … 65,000,000

0xAA 0x00 0xB1 ACF AC4 AC3 AC2 AC1 AC0 0xFF

0xB1 is the Message ID of mACC.

AC4 – AC0 represents the value of the acceleration rate. See figure 2-2 for how to convert to an unsigned 32bit integer.

ACF = the AM bit of the MCFG (here always =0).

ACF = 0 means the input value will be interpreted as the acceleration rate with the unit of pps/s (or pulse/square-second). mACC is the abbreviation of “motion Acceleration”.

Period Mode (pre-requiring MCFG<AM> = 1)

Function

Variable

ACK

Comment mACC= x;

Set the acceleration period to x (in period mode)

Integer x = 1、2 … 60,000

0xAA 0x00 0xB1 ACF AC4 AC3 AC2 AC1 AC0 0xFF

0xB1 is the Message ID of mACC.

AC4 – AC0 represents the value of the acceleration period. See figure 2-2 for how to convert to an unsigned 32bit integer.

ACF = the AM bit of the MCFG (here always =1).

ACF = 1 means the input value will be interpreted as period of acceleration with the unit of milliseconds.

Check the Current Acceleration Rate

Function

Variable

Feedback

Comment mACC;

Check current acceleration rate.

N/A

0xAA 0x00 0xB1 ACF AC4 AC3 AC2 AC1 AC0 0xFF

See comments in above two modes.

UI Robot Technology Co. Ltd. M41110923EN Page 35

UIM24102/04/08

7.10 Deceleration Rate Setup Instruction (mDEC)

Value Mode (pre-requiring MCFG<DM> = 0)

Function

Variable

ACK

Comment mDEC= x;

Set the deceleration rate to x (in value mode).

Integer x = 1、2 … 65,000,000

0xAA 0x00 0xB2 DCF DC4 DC3 DC2 DC1 DC0 0xFF

0xB2 is the Message ID of mDEC.

DC4 – DC0 represents the value of the deceleration rate. See figure 2-2 for how to convert to an unsigned 32bit integer.

DCF = the DM bit of the MCFG (here always =0).

DCF = 0 means the input value will be interpreted as the deceleration rate with the unit of pps/s (or pulse/square-second). mDEC is the abbreviation of “motion Deceleration”.

Period Method (pre-requiring MCFG<DM> = 1)

Function

Variable

ACK

Comment mDEC=x;

Set the deceleration rate to x (in period mode). integer x = 1、2 … 60,000

0xAA 0x00 0xB2 DCF DC4 DC3 DC2 DC1 DC0 0xFF

0xB2 is the Message ID of mDEC.

DC4 – DC0 represents the value of the deceleration period. See figure 2-2 for how to convert to an unsigned 32bit integer.

DCF = the DM bit of the MCFG (here always =1).

DCF = 1 means the input value will be interpreted as period of deceleration with the unit of milliseconds.

Check the Current Deceleration Rate

Function

Variable

ACK

Comment mDEC;

Check current deceleration rate.

N/A

0xAA 0x00 0xB2 DCF DC4 DC3 DC2 DC1 DC0 0xFF

See comments in above two modes.

M41110923EN Page 36 UI Robot Technology Co. Ltd

UIM241XX Miniature Integrated Stepper Motor Controller

7.11 Maximum Starting Speed Setup Instruction (mMSS)

Set the Maximum Starting Speed

Function

Variable

ACK

Comment mMSS=x;

Set the Maximum Starting Speed at x.

Integer x = 1、2 … 65,000

0xAA 0x00 0xB3 MS2 MS1 MS0 0xFF

0xB3 is Message ID of mMSS

MS2 – MS0 represents the value of Maximum Starting Speed. See figure 2-1 for how to convert to an unsigned 16bit integer. mMSS is the abbreviation of “motion Maximum Starting Speed”.

Unit: pps (pulse/second).

Check current Maximum Starting Speed

Function

Variable

ACK

Comment mMSS;

Check the Maximum Starting Speed

N/A

0xAA 0x00 0xB3 MS2 MS1 MS0 0xFF

See comments in above table.

7.12 Maximum Cessation Speed Setup Instruction (mMDS)

Set the Maximum Cessation Speed

Function

Variable

ACK

Comment mMDS=x;

Set the Maximum Cessation Speed at x.

Integer x = 1、2 … 65,000

0xAA 0x00 0xB3 MD2 MD1 MD0 0xFF

0xB4 is the Message ID for mMDS.

MD2 – MD0 represents the value of Maximum Cessation Speed. See figure 2-1 for how to convert to an unsigned 16bit integer. mMDS is the abbreviation of “motion Maximum Deceleration Speed”.(mMCS is not used to avoid confusing with the micro stepping instruction MCS.)

Unit: pps (pulse/second).

Check current Maximum Cessation Speed

Function

Variable

ACK

Comment mMDS;

Check the Maximum Cessation Speed.

N/A

0xAA 0x00 0xB3 MD2 MD1 MD0 0xFF

See comments in above table.

UI Robot Technology Co. Ltd. M41110923EN Page 37

UIM24102/04/08

8.0 Sensor Input Control

UIM241XX Motion Controller has an optional (sold separately) Sensor Control Module which supports two sensor input ports: S1 and S2. Both sensor input ports accept digital TTL input from 0V-5V.

Furthermore, port S1 can be configured for either digital input or analog input.

Besides digital input condition circuit, UIM241XX has a 12 bits ADC (analog/digital converter) and a 5V reference voltage. If the input voltage is 0~5V, the feedback value will be 0~4095. The ADC sample rate is 50K Hz. The analog feedback value is a mathematic average of 16 samples, and the update rate is

1000 Hz. Regardless of whether it’s digital or analog, the input voltage cannot exceed -0.3V ~ 5.3V, otherwise permanent damage can be done.

Besides measuring the voltage input and providing the reads to the user device when inquired, the sensor control module is able to carry out a certain control action when a sensor event happens. Actions and sensor events can be defined by instructions. With the Sensor Control Module, UIM241 can perform motion controls without the user device.

There are 6 sensor events that can be configured for S1 and S2, as listed below:

Table 8-1: Sensor Events

Description

1 S1 Falling Edge

2 S1 Rising Edge

3 S2 Falling Edge

4 S2 Rising Edge

5 Exceeding the Upper Limit

6 Exceeding the Lower Limit

S1 Voltage Level Change, High >>>Low

S1 Voltage Level Change, Low >>>High

S2 Voltage Level Change, High >>>Low

S2 Voltage Level Change, Low >>>High

S1 analog input voltage is higher than upper limit

S1 analog input voltage is lower than lower limit

There are 9 actions that can be furthermore bound to sensor events:

1. Start and Run Reversely (DIR=0) at desired speed and acceleration rate.

2. Start and Run Forwardly (DIR=1) at desired speed and acceleration rate.

3. Decelerate until Stop.

4. Reset position and encoder counter + Decelerate until Stop.

6. Reset position and encoder counter + Emergency Stop.

7. Execute reverse (DIR=0) displacement control.

8. Execute forward (DIR=1) displacement control.

9. Reset position and encoder counter.

M41110923EN Page 38 UI Robot Technology Co. Ltd

UIM241XX Miniature Integrated Stepper Motor Controller

8.1 Rising and Falling Edge

When port Sx (x=1, 2) is configured for digital input, if the sensor module detects a voltage change on

Sx from 0V to 5V, an Sx rising-edge event will be created, meanwhile Sx is assigned a logic value 1 (i.e.

Sx=1). If the sensor module detects a change on Sx from 5V to 0V, an Sx falling-edge event will be created, meanwhile Sx=0.

Figure 8-1: Rising and Falling Edge of a Digital Sensor Input

Voltage on port Sx

Sx Logic Value

5V 1

0V

Voltage on port Sx

Rising

Edge

Falling

Edge

0

T (Time)

8.2 Analog Input and Thresholds

Figure 8-2: Analog Input and Thresholds

Voltage on

Sensor Port

Here S1 is still 1

5V

Thd_H

Analog

Input

Thd_L

0V

S1 Logic Value

S1 logic value

1

0

T (Time)

Here S1 is still 0

1

Falling

Edge

0

S1 value

Rising

Edge

Rising

Edge

T (Time)

Sensor input port S1 can be configured for analog input by instruction. To do that, user needs to first enable the analog input function by set the ANE bit of the master configuration register (i.e.,

MCFG<ANE> =1). Then, user needs to select the analog input port by clear the CHS bit of the master configuration register (i.e., make MCFG<CHS> =0).

Once configured, the analog voltage on port S1 can be obtained by instruction sFBK.

In order to use the sensor events, user may need to further setup the input upper and lower thresholds

(i.e., AH / AL in figure 8-2). If the sensor module detects the analog input voltage is changing from lower than AH to high than AH, an S1 rising-edge event will be created, meanwhile S1 is assigned a logic value 1 (i.e. S1=1). If the sensor module detects a change on S1 from higher than AL to lower than AL, an S1 falling-edge event will be created, meanwhile S1=0. Otherwise, S1 is kept unchanged.

8.3 Sensor Event, Action and Binding

A sensor event is defined as the sensor voltage change matches a user-defined condition. Binding means assigning a sensor action to a sensor event. UIM241XXs support 6 sensor events as listed in section 8.0. There are 9 actions that can be bound to those 6 sensor events. The binding between

UI Robot Technology Co. Ltd. M41110923EN Page 39

UIM24102/04/08

events and actions are realized through the configuration of the Sensor Control Register S12CON.

These 9 actions are described below:

1. Start and Run Reversely (DIR=0)

Run Backwards means starting and continuously running the motor backward using motion parameters (i.e., SPD, ACC/DEC, MSS/MDS, etc.) stored in the EEPROM. (Motion direction is defined by the S12CON.) Before making usage of this action, user has to first configure the

S12CON, setup the desired speed (SPD), and (if applicable) the acceleration rate, maximum starting speed, etc. After that, user has to burn the SPD and S12CON into the EEPROM using the

STORE instruction.

2. Start and Run Forwardly (DIR=1)

Same as above, except that the direction is opposite (forward instead of backward).

3. Decelerate until Stop

Decelerating the motor speed until stop according to the motion parameters (i.e., mDEC, mMDS) stored in the EEPROM. To use this action, the advanced motion control must be enabled.

4. Reset position and encoder counter + Decelerate until Stop

Absolute Position Counter will be reset when the sensor event happens and then deceleration process starts according to motion parameters (or advanced motion parameter) stored in

EEPROM until stop.

Set speed to zero immediately when the sensor event happens to force the motor stop.

6. Reset position and encoder counter + Emergency Stop

Absolute Position Counter will be reset when the sensor event happens and set speed to zero.

7. Reverse (DIR=0) Displacement Control

Control the motor to realize a backward displacement using motion parameters (i.e., SPD, STP,

ACC/DEC, MSS/MDS, etc.) stored in the EEPROM. Before making usage of this action, user has to first configure the S12CON, setup the desired speed (SPD), the desired displacement (STP), and (if applicable) the acceleration rate, maximum starting speed, etc. After that, the user has to burn the parameters into the EEPROM using the STORE instruction.

8. Forward (DIR=1) Displacement Control

Same as above, except that the displacement control is forward instead of backward.

9. Reset position and encoder counter

This action resets the absolute position counter to zero and creates a zero position or origin.

8.4 Introduction to Sensor Input Control Instructions

There are only 4 instructions related to the sensor input control.

1. MCFG

The ANE bit (MCFG<15>) and CHS bit (MCFG<14>) of the master configuration register define the digital/analog input of the sensor port. The S1IE bit (MCFG<0>) and S2IE bit (MCFG<1>) enable/disable the sensor real-time change notification (RTCN). See section 5.1 for details.

2. SCFG (Sensor Configuration Register)

SCFG is used to configure following sensor input control registers: S12CON and Analog threshold control register ATCONH and ATCONL.

3. STORE (Sensor Parameter Store into EEPROM)

STORE is used for storing parameters such as S12CON, ATCONH, ATCONL, SPD, and STP into

EEPROM so that Sensor Input Control Module can perform the control when user device is absent.

4. sFBK (Sensor Status Feedback)

At any time and under any scenario, using the instruction sFBK can always read back the logic value of S1 and S2 as well as the analog measurement (given MCFG<ANE>=1, MCFG<CHS> =0).

M41110923EN Page 40 UI Robot Technology Co. Ltd

UIM241XX Miniature Integrated Stepper Motor Controller

8.5 Sensor Input Control Register S12CON

S12CON (Sensor 1/2 Control) defines the binding relationship between S1 and S3 sensor events and actions, as well as the activation of corresponding RTCNs. It is a 16bits register inside the controller, and can be configured using the instruction SCFG. When writing to it user needs to affix a 4bits suffixcode to point to this register. For details of SCFG, please refer to Section 8.7.

The suffix-code for S12CON is 0000 (binary). S12CON structure is as follows:

S12CON Structure

bit 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0 value S2RACT S2FACT S1RACT S1FACT

Bit 15-12 S2RACT<3:0> S2 Rising-edge Action

S2RACTbinary

Action

0000

0001

0010

1010

0011

1011

0100

1100

0101

1101

0110

N/A

N/A

Start and Run Reversely

Start and Run Forwardly

Decelerate until Stop

Reset position and encoder counter +

Decelerate until Stop

Emergency Stop

Reset position and encoder counter +

Emergency Stop

Reverse Displacement Control

Forward Displacement Control

Reset position and encoder counter

Bit 11-8

S2FACT<3:0>

S2 Falling-edge Action

S2FACTbinary

Action

0000

0001

0010

1010

0011

1011

0100

1100

0101

1101

0110

N/A

N/A

Start and Run Reversely

Start and Run Forwardly

Decelerate until Stop

Reset position and encoder counter +

Decelerate until Stop

Emergency Stop

Reset position and encoder counter +

Emergency Stop

Reverse Displacement Control

Forward Displacement Control

Reset position and encoder counter

Bit 7-4

S1RACT<3:0>

S1 Rising-edge Action

S1RACTbinary

Action

0000

0001

0010

1010

0011

1011

0100

1100

N/A

N/A

Start and Run Reversely

Start and Run Forwardly

Decelerate until Stop

Reset position and encoder counter +

Decelerate until Stop

Emergency Stop

Reset position and encoder counter +

Emergency Stop

RTCN or Not

No RTCN (Ignore MCFG<S2IE>).

Depends on MCFG<S2IE>

Depends on MCFG<S2IE>

Depends on MCFG<S2IE>

Depends on MCFG<S2IE>

Depends on MCFG<S2IE>

Depends on MCFG<S2IE>

Depends on MCFG<S2IE>

Depends on MCFG<S2IE>

Depends on MCFG<S2IE>

Depends on MCFG<S2IE>

RTCN or Not

No RTCN (Ignore MCFG<S2IE>).

Depends on MCFG<S2IE>

Depends on MCFG<S2IE>

Depends on MCFG<S2IE>

Depends on MCFG<S2IE>

Depends on MCFG<S2IE>

Depends on MCFG<S2IE>

Depends on MCFG<S2IE>

Depends on MCFG<S2IE>

Depends on MCFG<S2IE>

Depends on MCFG<S2IE>

RTCN or Not

No RTCN (Ignore MCFG<S1IE>).

Depends on MCFG<S1IE>

Depends on MCFG<S1IE>

Depends on MCFG<S1IE>

Depends on MCFG<S1IE>

Depends on MCFG<S1IE>

Depends on MCFG<S1IE>

Depends on MCFG<S1IE>

UI Robot Technology Co. Ltd. M41110923EN Page 41

0101

1101

0110

Reverse Displacement Control

Forward Displacement Control

Reset position and encoder counter

Bit 3-0

S1FACT<3:0>

S1 Falling-edge Action

S1FACTbinary

Action

0000

0001

0010

1010

0011

1011

0100

1100

0101

1101

0110

N/A

N/A

Start and Run Reversely

Start and Run Forwardly

Decelerate until Stop

Reset position and encoder counter +

Decelerate until Stop

Emergency Stop

Reset position and encoder counter +

Emergency Stop

Reverse Displacement Control

Forward Displacement Control

Reset position and encoder counter

UIM24102/04/08

Depends on MCFG<S1IE>

Depends on MCFG<S1IE>

Depends on MCFG<S1IE>

RTCN or Not

No RTCN (Ignore MCFG<S1IE>).

Depends on MCFG<S1IE>

Depends on MCFG<S1IE>

Depends on MCFG<S1IE>

Depends on MCFG<S1IE>

Depends on MCFG<S1IE>

Depends on MCFG<S1IE>

Depends on MCFG<S1IE>

Depends on MCFG<S1IE>

Depends on MCFG<S1IE>

Depends on MCFG<S1IE>

8.6 Analog Threshold Control Register ATCON & ATCONL

ATCONH and ATCONL define the upper and lower limit of the analog threshold.

Both registers are 16bits registers in the controller memory space, configured through SCFG instructions. However, when configuring, user needs to affix a 4bits suffix-code to point to a specific register.

The suffix-code for ATCONL is 0010 (binary),

The suffix-code for ATCONH is 0011 (binary).

ATCONH structure is as follows: bit 15 14 13 12 11 value Reserved

10 9 8 7 6 5 4 3 2 1 0

Bit 15-12 Unimplemented, read as 0.

Bit 11- 0 AH<11:0> Upper limit of analog threshold.

ATCONL structure is as follows: bit 15 14 13 12 11 value Reserved

10 9 8 7 6 5 4 3 2 1 0

Bit 15-12 Unimplemented, read as 0.

Bit 11- 0 AL<11:0> Lower limit of analog threshold.

Note

:

ATCONH / ATCONL input range is 0 ~ 4095, with 0 corresponding to 0V and 4095 corresponding to 5V. (4095 is the maximum of a 12bits data).

M41110923EN Page 42 UI Robot Technology Co. Ltd

UIM241XX Miniature Integrated Stepper Motor Controller

8.7 Sensor Configuration Register Instruction (SCFG)

Function

Variable

ACK

Comment

SCFG=x

Configure the S12CON, ATCONH and ATCONL.

Integer x = 0,1 … 1048575, or hexadecimal x=0x00000 … 0xFFFFF

0xAA 0x0 0xC0 0x0 0x0 S2 S1 S0 AL1 AL0 AH1 AH0 0xFF

0xC0 is the Message ID of SCFG.

S2 – S0 represent the value of S12CON.

AL1 – AL0 represent the value of the lower limit of analog input.

AH1 ~ AH0 represent the value of the upper limit of the analog input.

See figure 2-1 for how to convert above bytes to unsigned 16bit integers.

S12CON, ATCONH and ATCONL are 16bits registers in the controller. But when configuring through SCFG, user has to affix a 4bits suffix code to specify the desired register to be written.

The suffix code for S12CON is 0000 (binary);

The suffix code for ATCONL is 0010(binary);

The suffix code for ATCONH is 0011(binary).

8.8 Check the Value of S12CON, ATCONH and ATCONL

Function

Variable

ACK

Comment

SCFG

Check the current value of S12CON, ATCONH and ATCONL

N/A

0xAA 0x0 0xC0 0x0 0x0 S2 S1 S0 AL1 AL0 AH1 AH0 0xFF

See comments in above table.

8.9 EEPROM Store Instruction (STORE)

STORE instruction is used to burn the values of Sensor Control Configuration, Analog Thresholds, desired speed, and desired displacement into the EEPROM so that the Sensor Input Module automatically participates in system control when user device is absent.

STORE instruction will affect the system’s real-time performance.

Function

Variable

ACK

Comment

STORE;

Burn MCFG, sensor CFG, motion control parameters into EEPROM.

N/A

0xAA 0x0 0XD1 0xFF

0xD1 is the Message ID of STORE.

STORE is used to burn MCFG, sensor configuration, speed, displacement, acceleration/deceleration rate, etc., into EEPROM

STORE instruction will affect real time performance. It takes around 20 ms for the instruction to be executed. It is recommended that sending this instruction when the motor is idle, and wait 20ms before sending other instructions.

UI Robot Technology Co. Ltd. M41110923EN Page 43

UIM24102/04/08

8.10 Sensor Data Inquiry Instruction (SFBK)

Function

Variable

ACK

Comment

SFBK

Check sensor readings and status.

N/A

0xCC 0x0 0xC1 D1 D2 0X00 AN1 AN0 0xFF

0xC1 is the Message ID of SFBK.

D1 and D2 represent the logic level of S1 and S2 respectively (0/1).

AN1 – AN0 is the converted value for analog input (12 bits).

See figure 2-1 for how to convert above bytes to an unsigned 16bit integer.

AN1 and AN0 are 0 if no analog input port is configured.

This instruction can be used for sensor data inquiry at any time and under any condition.

8.11 Example of S12CON Configuration

When configuring S12CON, user needs to first fill every bit of the S12CON according to the information provided in previous sections, and then affixes the suffix code 0000 (binary). Then, user can use the instruction SCFG to realize the configuration. An example is provided below.

Example 8.11

System Description:

A reciprocating mobile platform has one ON/OFF stroke limit sensor at each end. When the mobile table hit the sensor, a 0V presents. Otherwise, a 5V presents.

Requirements:

1. As soon as one sensor S2 is hit, the stepper motor starts to run reversely (DIR=0) until the table hits the other sensor S1.

2. As soon as S1 is hit, the stepper motor starts to run positively (DIR=1), until the table hits the S2.

3. Keep the reciprocating motion without the user control device.

Realization:

1. First stop the motor by sending: OFF;

2. We are not interested in the rising edge, so set S2RACT<3:0> = 0000

3. It is required Start and Run Reversely on S2 failing edge, so, set S2FACT<3:0> =0010

4. Same as 1, set S1RACT<3:0> = 0000

5. It is required Start and Run Forwardly on S1 failing edge, so, set S1FACT<3:0> =1010

6. Fill the S12CON with above bits, get: S12CON = 0000 0010 0000 1010 (binary)

7. Affix the suffix-code 0000 to S12CON, get:

SCFG = 0000 0010 0000 1010 0000 (binary) = 0x020A0 (hex) = 8352 (decimal) instruction: or SCFG = 8352;

9. Set up desired speed, by sending instruction: SPD=5000;

10. Burn parameters into EEPROM, by sending: STORE;

11. Press any one of the limit sensors, the mobile platform will work.

12. If user enables the RTCNs, the user device will get feedback every time the S1 or S2 is hit.

13. Disconnect the user device, and restart the UIM241 controller, the system will automatically run.

M41110923EN Page 44 UI Robot Technology Co. Ltd

UIM241XX Miniature Integrated Stepper Motor Controller

8.12 Example of ATCONH, ATCONL Configuration

Similar to S12CON configuration, user needs to first fill every bit of the ATCONH (ATCONL) according to the information provided in previous sections, and then affixes the suffix code 0011 (0010).

An example is provided below.

Example 8.12:

System Description:

A reciprocating mobile platform has one linear potentiometer attached to the mobile table. Within the stroke range, the potentiometer outputs 0.6V ~4V.

Requirements:

1. As soon as the sensor output is less than 0.6V, the stepper motor starts to run forward (DIR=1) until the potentiometer outputs arrives 4V.

2. As soon as the sensor output is higher than 4V, the stepper motor starts to run backward (DIR=0) until the potentiometer outputs reaches 0.6V.

3. Keep the reciprocating motion without the user control device.

Realization:

1. First stop the motor by sending: OFF;

2. Set MCFG<ANE>=1, MCFG<CHS> =0, get:

MCFG = 1000 0000 0000 0001 (binary) = 0x8001 (hex) = 32769 (decimal) instruction: or MCFG = 32769;

4. It is required Start and Run Forwardly on S1 falling edge (when analog input < 0.6V), so,

S1FACT<3:0> =1010

5. It is required Start and Run Reversely on S1 rising edge (when analog input >4V), therefore,

S1RACT<3:0> =0010

6. Fill the S12CON with above bits, get: S12CON = 0000 0000 0010 1010 (binary)

7. Add suffix-code 0000 (for S12CON), get:

SCFG = 0000 0000 0010 1010 0000 (binary) = 0x002A0 (hex) = 672 (decimal) instruction: or SCFG = 672;

9. Calculate the upper limit: (4V/5V)*4095 = 3276 = 0000 1100 1100 1100 (binary)

10. Add suffix-code 0011 (for ATCONH), get:

SCFG = 0000 1100 1100 1100 0011(binary) = 0x0CCC3 (hex) = 52419(decimal) instruction: or SCFG = 52419;

12. Calculate the lower limit: (0.6V/5V)*4095 = 491 (value is rounded)

13. Add suffix-code 0010 (for ATCONL), get:

14. SCFG = 0000 0001 1110 1011 0010(binary) = 0x01EB2 (hex) = 7858 (decimal) instruction: or SCFG = 7858;

16. Set desired speed, by sending instruction: SPD=5000;

17. Burn parameters into EEPROM, by sending: STORE;

18. Initiate the motion by sending: ENABLE;

19. The system starts to work continuously.

20. Disconnect the user device, and restart the UIM241 controller, the system will automatically run.

UI Robot Technology Co. Ltd. M41110923EN Page 45

UIM24102/04/08

9.0 Encoder and Closed-loop Control

Quadrature Encoder (also known as Incremental Encoder or Optical Encoder) is used for tracking the angular position and velocity of rotary motion. It can be applied for closed-loop control of various motors.

A typical quadrature encoder consists of a slotted wheel for motor shaft and a transmitter/detection module for detection of the slot on the wheel. Usually there are 3 channels - channels A, B and Z

(INDEX). Information from the three channels can be read and decoded to provide motion status of shaft, including position and velocity.

The relationship between channel A (QEA) and channel B (QEB) is as simple as which phase leads.

When phase A leads B, then the shaft is rotating in the clockwise direction. When phase B leads A, then the shaft is rotating in the counter-clockwise direction. Channel Z is called index pulse which is generated per revolution as a reference for tracking of absolute position.

The quadrature signals from encoder can be decoded into four types of messages, the order of which reverse when rotation direction is reversed. The phase signals and index pulses are detected by encoder and further decoded to produce a count up pulse (for one direction of shaft rotation) or a countdown pulse (for the other direction of shaft rotation).

UIM241 controller has a built-in quadrature encoder (hereinafter referred to as encoder) interface circuit, which is capable of decoding encoder signals of less than 200KHz input. Another option is user can connect external encoder of their own choice to UIM241 controller, using S1 and S2 ports for channel A and B. In this case, however, INDEX decoding function is not available. S1/S2 supports 0-5V TTL input.

The input range for S1 and S2 ports of UIM241 controller is -0.3V ~ 5.3V. Any input beyond this range can result in permanent damage. Also, for this case, encoder power supply is to be provided by user.

For UIROBOT UIM241 controller with internal encoder, the S1 and S2 ports are not occupied and therefore are available for sensors. Whether the encoder is built-in or external, the controlling mode and the instructions are the same.

Instructions relative to encoder control function are listed below:

Instruction Function

1 MCFG

2 QEC

3 STP

4 QER

Enable encoder function encoder-based position control encoder-based displacement control

Set encoder resolution

Example

MCFG1792;

QEC= - 200000;

STP500;

QER=500;

9.1 Enable/Disable Encoder and Closed-loop Control Module (MCFG)

Enable Encoder Interface

The Encoder Decoding Module is enabled / disabled through configuring the QEI bit of MCFG

(MCFG<13>). When MCFG<QEI>=0, the encoder decoding module is disabled; when MCFG< QEI>=1, the encoder decoding module is enabled. If external encoder is used, S1 and S2 ports must be used for channel A and channel B respectively. If user chooses UIROBOT internal encoder, S1 and S2 ports are available for sensors. Please note encoder interface is a standard module which is available as long as

Sensor Input Module is installed.

Enable Closed-loop Control Module

The Encoder-based Closed-loop Control Module (hereinafter referred to as Closed-loop Control Module) is enabled by configuring the QEM bit of MCFG (MCFG<11>). When MCFG<QEM>=0, this module is disabled; when MCFG<QEI>=1, it is enabled.

Please note, closed-loop control module is a must even if user uses external encoders. Otherwise,

UIM241 controller can only read the external encoder data, but cannot maintain closed-loop motion control with this data. However, if the internal encoder is installed, Closed-loop Control Module is automatically included.

For master configuration register (MCFG), please refer to Section 5.1.

M41110923EN Page 46 UI Robot Technology Co. Ltd

UIM241XX Miniature Integrated Stepper Motor Controller

9.2 Closed-loop Position Control Instruction (QEC)

Function

Variable

ACK

Comment

QEC=x;

Set desired encoder position to x (for closed-loop control).

Integer x = - 2,000,000,000…-1, 0, 1 … + 2,000,000,000

0xAA 0x00 0xB8 Q4 Q3 Q2 Q1 Q0 0xFF

0xB8 is the Message ID of desired encoder position (QEC).

Q4-Q0 represents the desired quadrature encoder position. See figure 2-2 for how to convert to a signed 32bit integer.

Actual motor position is also relative to the encoder resolution.

The encoder counter records encoder pulses. When the direction is positive

(DIR=1), the counter increases; when the direction is negative (DIR=0), the counter decreases. Therefore, the value of the counter is a signed 32bits integer, with positive representing the final position is of the same direction of

DIR=1, and vice versa.

Encoder counter can only be reset/cleared under following situations:

1. Commanded by user instruction ORG

2. User preset sensor ORG event happens

Please be aware:

1. Power Failure Protection. Should a Power Failure situation happen, the value of the encoder counter will be pushed into EEPROM and restored when reboot next time. However, passive movement after power off cannot be recorded.

2. For every slot, the encoder counter records 4 pulses. For example, when

QEC=500, the encoder counter records 500*4 =2000 pulses each turn.

QEC is the abbreviation for Quadrature Encoder Counter.

QEC instruction is basically of the same use as POS.

The difference is that POS is for open-loop control while QEC is for closed-loop control. When closedloop control module is enabled (MCFG<QEM> = 1), QEC instruction can be used; however, a POS instruction can only leads to an error ACK (except when it is used for status inquiry). On the other hand, in open-loop control, POS instruction can be used while QEC instruction can only be used for status inquiry (provided that an encoder is included in the system whose QER is correctly configured and the

Encoder Decoding Module is enabled, i.e. MCFG<QEI> = 1).

9.3 Check Current Encoder Position

Function

Variable

Feedback

Comment

QEC;

Check current encoder position.

N/A

0xCC 0x00 0xB1 Q4 Q3 Q2 Q1 Q0 0xFF

0xB1 is the Message ID of current encoder position (QEC).

Q4-Q0 represents the desired quadrature encoder position. See figure 2-2 for how to convert to a signed 32bit integer.

UI Robot Technology Co. Ltd. M41110923EN Page 47

UIM24102/04/08

9.4 Quadrature Encoder Resolution Setting Instruction (QER)

Function

Variable

ACK

Comment

QER=x;

Set the quadrature encoder resolution to x.

Integer x=0, 1 … 65000

0xAA 0x00 0xC2 R2 R1 R0 0xFF

0xC2 is the Message ID of QER.

R2-R0 represents encoder resolution. See figure 2-1 for how to convert to an unsigned 16bit integer.

QER is the abbreviation for Quadrature Encoder Resolution.

WARNING:

Incorrect QER value can result in unpredictable closed-loop control operations.

9.5 Check Quadrature Encoder Resolution

Function

Variable

ACK

Comment

QER;

Check current quadrature encoder resolution.

N/A

0xAA 0x00 0xC2 R2 R1 R0 0xFF

0xC2 is the Message ID for QER.

R2-R0 represents encoder resolution. See figure 2-1 for how to convert to an unsigned 16bit integer.

9.6 Duality of STP Instruction

When closed-loop control module is enabled (MCFG<QEM>=1), STP=x defines encoder-based relative position instead of relative pulse. On the contrary when this module is disabled, STP=x defines relative pulse.

9.7 SPD Instruction Definition

Whether closed-loop control module is enabled or not, SPD=x; defines pulses sent to motor per second.

9.8 Restrictions on POS Instruction

In the closed-loop control mode, an instruction of “POS=x” will generate an error ACK, but the instruction

“POS;” can be used to check the current pulses accumulated since the origin point was set (increases for positive running; decrease for reverse running).

Similarly, in open-loop control mode, an instruction of “QEC=x” will generate an error ACK, but the instruction “QEC;” can be used to check the quadrature encoder pulses accumulated since the origin point was set (increases for positive running; decrease for reverse running).

M41110923EN Page 48 UI Robot Technology Co. Ltd

UIM241XX Miniature Integrated Stepper Motor Controller

APPENDIX A Dimensions

Unit:mm

UI Robot Technology Co. Ltd. M41110923EN Page 49

APPENDIX B Installation

NEMA 17 Stepper Installation (without adapting flange)

1.

Screw mount UIM controller / driver onto the motor

2.

Wire the motor leads.

UIM24102/04/08

NEMA 23 and Larger Stepper Installation (with adapting flange)

1.

Screw mount the adapting flange onto the motor

2.

Screw mount UIM controller / driver onto the adapting flange

3.

Wire the motor leads.

M41110923EN Page 50 UI Robot Technology Co. Ltd

advertisement

Was this manual useful for you? Yes No
Thank you for your participation!

* Your assessment is very important for improving the workof artificial intelligence, which forms the content of this project

Related manuals

Download PDF

advertisement