Example Of Atconh, Atconl Configuration - 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(
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, 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 UIM242 controller, the system will
automatically run.
13. If enable auto-feedback, once the motor touches limit switch, user device will receive
a feedback message of falling-edge on port S1/S2.

8.11 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.
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 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.
Realization:
1.
First stop the motor by sending:OFF;
2.
Set MCFG<ANE>=1, MCFG<CHS> =0, MCFG<S1IE> =1, get:
MCFG = 1000 0000 0000 0001 (binary) = 0x8001 (hex) = 32769 (decimal)
3.
Send instruction: MCF x8001; or MCF 32769;
4.
It is required Start and Run Forwardly on S1 falling edge (when analog input < 0.6V),
therefore, S1FACT<3:0> =1010
UI Robot Technology Co. Ltd.
M4220170607EN
)
Closed-loop
Page 51

Advertisement

Table of Contents
loading

Table of Contents