In Grafcet it is possible to program actions for each step. Three types of action are possible:
-
on activation
-
continuous
-
on deactivation
When for a given step the type of action is not described, this means that it has not been programmed.
Step 1: Action on activation
! (*Reference point taken along the X and Y axes*)
SMOVE (Axis_ch0, 1, 90, 14, 0, Vitesse_p_o, 16#0000);
SMOVE (Axis_ch1, 1, 90, 14, 0, Vitesse_p_o, 16#0000);
Step 2: Action on activation
! (*Movement to stand-by position (Xatt, Yatt*)
SMOVE (Axis_ch0, 2, 90, 9, X_attente, Vitesse_x_attente, 16#0000);
SMOVE (Axis_ch1, 2, 90, 9, Y_attente, Vitesse_y_attente, 16#0000);
Step 3: Action on activation
! (*Movement towards belt A*)
SMOVE (Axis_ch0, 3, 90, 10, 19500, Vitesse_pos_a_x, 16#0000);
SMOVE (Axis_ch1, 3, 90, 10, 19500, Vitesse_pos_a_y, 16#0000);
Step 4: Continuous action
! (*Close claw*)
SET(Claw);
Step 5: Action on activation
! (*Movement to conveyor belt B*)
SMOVE (Axis_ch0, 4, 90, 9, X_b, Vitesse_pos_b_x, 16#0000);
SMOVE (Axis_ch1, 4, 90, 9, Y_b, Vitesse_pos_b_y, 16#0000);
Step 8: Action on activation
! (*Movement to conveyor belt C*)
SMOVE (Axis_ch0, 5, 90, 9, X_c, Vitesse_pos_c_x, 16#0000);
SMOVE (Axis_ch1, 5, 90, 9, Y_c, Vitesse_pos_c_y, 16#0000);
Step 6: Continuous action
! (*Open claw*)
RESET (Claw);