English
Language : 

AN2350 Datasheet, PDF (39/41 Pages) STMicroelectronics – Guidelines for the control of a multiaxial planar robot with ST10F276
Control algorithm
AN2350
Figure 31. The teach and repeat procedure
Teach Procedure
Execute homing procedure
Stop the control
Stop the motors (PWM=50%)
Reset timer T0
Enable interrupt CC8
index=0;
Start timer T0
ISR for teach
Reload of Compare unit
CC8
Read Incremental
Encoder for the shoulder
(T2)
Store T2 in
shoulder array teach[]
while index<1500
Disable interrupt CC8
Stop timer T0
Read Incremental
Encoder for the elbow
(T4)
Store T4 in
elbow-array-teach[]
index++
Repeat Procedure
Execute homing procedure
Reset Timer T0
Enable interrupts CC2 and CC3
Start timer T0
elbow_array_teach[]
shoulder_array_teach[]
Control
Algorithm
39/41