Creating the program in SFC for managing the move sequence
(Original Document)
At a glance
The main program is written in SFC (Grafcet). The different sections of the grafcet steps and transitions are written in LD. This program is declared in a MAST task, and will depend on the status of a Boolean variable.
The main advantage of SFC language is that its graphic animation allows us to monitor in real time the execution of an application.
Several sections are declared in the MAST task:
In the project browser, the sections are represented as follow:
NOTE: The LD, SFC and FBD-type sections used in the application must be animated in online mode (See Execution of Application in Standard Mode), with the PLC in RUN
NOTE: If task cycle is faster than CANopen Master cycle, outputs can be overwritted. To avoid that, it is recommended to have a task cycle higher than the CANopen Master cycle.
Procedure for Creating an SFC Section
The table below shows the procedure for creating an SFC section for the application.
Step
Action
1
In Project Browser\Program\Tasks, double-click on MAST.
2
Right click on Section then select New section. Give your section a name (Movement_sequence for the SFC section) then select SFC language.
3
The name of your section appears, and can now be edited by double clicking on it.
4
The SFC edit tools appear in the window, which you can use to create your Grafcet.
For example, to create a step with a transition:
  • To create the step, click on then place it in the editor,
  • To create the transition, click on then place it in the editor (generally under the preceding step).
Illustration of the Move_Sequence section
The following screen shows the application Grafcet. There is no condition defined:
For actions and transitions used in the grafcet, see Actions and transitions
NOTE: For more information on creating an SFC section, refer to chapter SFC Editor.
Description of the Move_Sequence Section
The following table describes the different steps and transitions of the Move_Sequence Grafcet:
Step / Transition
Description
Init
This is the initial state.
Start_Configuration
This transition is active when the variables:
  • Stop = 0,
  • Run = 1.
Lexium_Configuration
The Lexium 05 is enabled and the 0 position is defined (using the Lexium’s Homing function).
Configuration_done
The transition is active when the Lexium is initialized.
Move_to_next_position
The next target position is loaded in the Lexium 05. When this step is activated, the sequence number is incremented.
Target_reached
This variable is set to ‘1’ by the Lexium 5 when the target position is reached.
Mobile_action
The mobile is at the target position and is operating an action.
Operation_done
This transition is active when the mobile operation is over.
Back_to_start_point
This transition is active when the sequence is over or when a stop request is ordered.
Return_to_start_point
The start point is defined at the target position.
Disable_Lexium
The Lexium 05 drive is disabled.
Lexium_disabled
This transition is valid when the Lexium is disabled.
NOTE: You can see all the steps and actions and transitions of your SFC by clicking on in front of the name of your SFC section.