This section, placed at the start of the task is used to initialize the chart:
! (*Chart initialization*)
IF NOT Start_cycle OR %S1 THEN SET %S21; END_IF;
! (*Initialization of movement values*)
%MF50 := %MF52 := 1000.0; (*Ready position*)
%MF54 := 2000.0; (*Move to belt B axis X*)
%MF56 := 1500.0; (*Move to belt B axis Y*)
%MF58 := 2000.0; (*Move to belt C axis X*)
%MF60 := 500.0; (*Move to belt C axis Y*)
%MF102 := 10000.0; (*Auto speed*)
%MF104 := 2000.0; (*Manual speed*)
%MF106:= 1000.0; (*Reference point speed*)
(*Initialization of channel 0*)
%Q1.2.26 := NOT %S0;
%L10: