UI Robot Technology Co. Ltd.
M4120170509EN
Page 19
UIM241 Miniature Integrated Stepper Motor Controller(
Closed-loop
)
3.0
RS232 COMMUNICATION
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
Any out-of-box UIM241 controller has a factory default baud rate 9600. User can use the
9600 baud rate to connect to a new UIM241 controller.
If the baud rate has been changed, the 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.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;
A message started with AA,
AB, AC at the user device implies a successful hand-shake.
A greeting Message from UIM241XX has the following structure:
Byte
1
2
3
4
5
6
7
8
9
10
11
12
13
Value
AA
AB
AC
18
01
CUR Module
Firmware Version
00
00
FF
Where,
AA AB AC
denotes the greeting message
18 01
denotes the UIM241 controller.
[CUR]
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 10-1.
3.3 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.