UI Robot Technology Co. Ltd.
M4120170509EN
Page 21
UIM241 Miniature Integrated Stepper Motor Controller(
Closed-loop
)
4.0
REAL-TIME CHANGE NOTIFICATION
UIM241 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 1 millisecond. The time is decided by baud rate. The transfer time is
about 0.8ms (0.0008s) when the baud rate is 57600. Then, it takes only 1.5ms from an
event happening to a RTCN being received.
4.1 RTCN Structure
The structure of an RTCN message is shown below:
CC [Controller ID] [Message ID] FF
The RTCN system is able to response to the following events:
Table4-1: Real-time change notification events
No. Event
Message ID
Description
1
falling edge of S1
A0
Voltage on S1: High >>>Low
2
rising edge of S1
A1
Voltage on S1: Low >>>High
3
falling edge of S2
A2
Voltage on S2: High >>>Low
4
rising edge of S2
A3
Voltage on S2: Low >>>High
5
exceed upper limits
A1*
Analog input > user preset upper limit
6
below lower limit
A0**
Analog input < user preset lower limit
7
displacement control complete
A8
The desired position is reached
8
zero position
A9
Position counter reaches/passes zero
Note:
*
When S1 is configured as analog, A1 denotes event 9, otherwise A1 denotes event 2.
**
When S1 is configured as analog, A0 denotes event 10, otherwise A0 denotes event 1.
4.2 Enable/Disable RTCN
Every RTCN can be enabled or disabled through user instruction.
Enable/disable the
RTCN is achieved by the 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.4 for details.
Please note, to realize the sensor event control, user needs to further configure the sensor
control registers S12CON and ATCON. Please refer to Chapter 8.0 for details.