UI Robot Technology Co. Ltd.
M4120170509EN
Page 45
UIM241 Miniature Integrated Stepper Motor Controller(
Closed-loop
)
8.8 Instruction List
The following table shows the instructions mentioned in this chapter, the detail of those
instructions is descriped at the end of the document.
Instruction Description
Page
SCF
;
Set sensor control configuration register η
SCF;
Check sensor control configuration register
SFB;
Check sensor status
STG
;
Set digital input sampling mode
STG;
Check digital input sampling mode
STO;
Store motion control parameters
STO
;
Bind motion control parameters to sensor edge
8.9 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).
An example is provided below.
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.
Requirements:
1.
As soon as one sensor S2 is hit, the stepper motor starts to run reversely until the
table hits the other sensor S1.
2.
As soon as S1 is hit, the stepper motor starts to run positively, until the table hits S2.
Realization:
1.
First stop the motor by sending:
OFF;
2.
We are not interested in the rising edge of S2, 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 2, 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)=0x20A0 (hex)=8352 (decimal)
8.
Send instruction:
SCFx 20A0;
or
SCF 8352;
9.
Set up desired speed, by sending instruction:
SPD 5000;
10.
Burn parameters into EEPROM, by sending:
STO;
11.
Press any one of the limit sensors, the mobile platform will work.
12.
Disconnect the user device, and restart the UIM241 controller, the system will
automatically run.