Encoder And Closed-Loop Control; Enable/ Disable Encoder And Closed-Loop Module (Mcfg) - UIrobot UIM2842 User Manual

Can2.0b instruction control, miniature integrated stepper motor controller (closed-loop) v1.0
Table of Contents

Advertisement

Miniature Integrated Stepper Motor Controller(
ENCODER AND CLOSED-LOOP
9.0
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).
UIM2842 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 UIM2842
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 UIM2842 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 UIM2842 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
MCF
2
QEC
3
STP
4
QER
5
SQT

9.1 Enable/ Disable Encoder and Closed-loop 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
UI Robot Technology Co. Ltd.
enable encoder function
encoder-based position control
encoder-based displacement control
set encoder resolution
Set tolerance of blocked alarm
M4220170607EN
Closed-loop
CONTROL
Example
MCF 1792;
QEC - 200000;
STP 500;
QER 500;
SQT 150;
Page 53
)

Advertisement

Table of Contents
loading

Table of Contents