Actions
(Original Document)
At a glance
The next tasks, written in LD and ST are used in different steps of the grafcet.
NOTE: To use the following actions, in Tools/Project Setting/Languages extension, select Allow dynamic arrays and Directly represented array variables options.
Init step
The action associated to the Init step is as follows:
Move_to_Next_Position step
Two actions are associated to the Move_to_Next_Position step.
The first action is as follows:
(* Definition of the target position*)
CASE Sequence_number OF
1: Lexium.Target_Position:=Position_B;
2: Lexium.Target_Position:=Position_A;
3: Lexium.Target_Position:=Position_C;
END_CASE;
IF (Sequence_number<4) AND NOT (Stop) THEN
(* Start the new positionning *)
New_SetPoint:=1;
Ready_for_Stop:=0;
END IF;
The second action is as follows:
(*Incrementation before new move starts*)
INC(Sequence_Number);
NOTE: For the incrementation action, the qualifier must be positionned on P (rising edge).
Return_to_Start_Point step
The action associated to the Return_to_Start_Point step is as follows:
(*Target Position Loading*)
Lexium.Target_Position:=0;
(*Start a new positioning*)
New_Setpoint:=1;
Disable_Lexium
The action associated to the Disable_Lexium step is as follows:
(*Lexium voltage disabling*)
Lexium.Controlword:=Lexium_disabling;