UGEB Project FSM
UGEB Project FSM
Set got_disk_command = 1 if
input is between 49 to 55
S_read_data
If delta_move !=0,
if ‘w’ transit to S_twist_move.
else transit to S_xy_move.
Clear all past jobs.
Else If got_command !=0,
transit to S_change_fn.
Clear all past jobs.
Else If got_disk_command !=0,
transit to S_disk_fn.
Clear all past jobs.
Set parameters so that motor will stop Move the pen attached to arm in X or Y
at the user input selection (if current direction, or move the least joint angle
pattern is the selection, disk will move
until it is not, then search it again) that
detected by line tracker sensors.
Input ‘1’ for pattern 001, S_move_selected_joint
‘2’ for 010
‘3’ for 011 Move the selected joint
‘4’ for 100
‘5’ for 101
‘6’ for 110
‘7’ for 111
Transit to S_find_disk_pattern S_change_fn
S_read_data
S_micro_move
_arm
S_draw_sq
S_draw_circle
Generate fx, fy, ft from
array c [ ][ ]. Then Generate fx,fy,ft from
frame_transform() S_micro_find_angles yx,xc,
G_radius and
Calculate joint angle by IK, cir_pen_grad. Then
find the three joints angles frame_transform()
S_micro_transform2control
Map to control commands of
robot arm
S_find_disk_pattern
Read pattern, if it is the one needed, stop motor and show
how much time it take. Transit to S_read_data always.
Checking the movement of arm
Due to gravity and the accuracy of motors, the
real movements of arm have a large different to
the desired positions.
Below is the setting of demo. You can check the
performance of the arm.
3,pattern 011
6,pattern 110
7,pattern 111
2,pattern 010
4,pattern 100
Center ring, ring 1
Ring 2
Ring 3
Ring 4
Additional information