1. Select the menu command Debug > Synchronization
14.1 General Level Structure and Program Structure
When using S7-Graph, remember that the sequencer is designed primarily to configure process sequences simply. Apart from these sequences with which, for example, the parts of a manufacturing unit can be coordinated, additional higher-level functions (cell higher-level) and lower-higher-level functions (function or unit higher-level) are also required.
Level Structure Based on the Example of a Manufacturing Cell
The sequencer programmed with S7-Graph belongs to the coordination level, but must take into account the interdependencies from the cell level and the unit level.
Enable
The individual levels have the following significance:
• Cell level
The cell level encompasses functions with a central or wider reaching significance, for example preparations for enabling operation and modes.
The blocks at the cell level provide signals that are relevant for all blocks of the coordination and unit level in this cell.
• Coordination level
The coordination level includes various coordination functions, for example for the automatic mode and retraction following a break in operation. For each station, at least one sequencer is required for coordination at this level.
• Unit level
The unit level includes functions for activating individual units of equipment, for example motors and valves. This includes all the lower-level functions, for example interlocks and supervision conditions independent of the sequencer and direct manual intervention in the operation of the units.
Specifying the Program Structure and Incorporating the Sequencer
For each sequencer, S7-Graph creates an FB with its instance DB. This S7-Graph FB must be called in a block (for example OB, FB or FC). Since other programs are normally required along with the programs created by S7-Graph, it is usually the best policy to call all the FBs created by F7 Graph in one block (FC or FB) as shown in the following example.
Station n Save
Manual mode, Interlocks OB 1
(cyclic)
Sequencers
Modes
Release operation
Poss. robot interface
Hydraulics Pneumatics
Unit station 1 Station 1 Turn Station 1 Insert, weld
Unit station n General
functions
The various functions at the individual levels are executed cyclically in the order in which they are called:
• The sequencers are preceded by the central, higher-level functions of the cell level.
• The various sequencers for the individual stations are called by an FB
"Sequencers" that is called in OB1.
• The program sections for manual mode, the interlocks and permanent monitoring functions for the units follow the sequencers.
• If the manufacturing cell includes robots, program sections for supplying and clearing robot interface are also required.
Enabling Operation
In production facilities, utilities such as hydraulic and pneumatic systems are often required and the functions of all other units depend on them being available. It therefore makes sense to turn on the hydraulic and pneumatic systems centrally after turning on the machinery and to generate ready signals for the other blocks.
T1
InitR "Unit_ready"
R "Process_enabled"
Controller_on N "Controller_on"
CMP N "Unit_ready"
S4 Pro...
Process_enabled N "Unit_ready"
N "Process_enabled"
"Door_
• After turning on the controller, step 1 (initial step) is activated using the
INIT_SQ parameter and the signals Unit_ready and Process_enabled are reset.
• After a specified minimum waiting time, step 2 the hydraulic and pneumatic units are turned on dependent on the signal Controlpow_ok (control voltage OK) by the Controller_on action.
• After the feedback indicating that the hydraulic and pneumatic systems are OK, step 3 outputs the message Unit_ready (to various recipients including the central controller).
• Triggered by the signal "Central_start" (start main console of the production equipment), step 4 sets the unit to the ready state and enables automatic execution.
• With "Emer_off" or loss of the signal "Door_closed", the change to step 5
• If an OK signal from one of the power systems is canceled while the
Process_enabled (step 4) is active, the enable signals are also canceled with the change to step 2. Once the OK_Signals of the power systems are present again, Central_start can return the unit to the enabled state again.
• The signals "Controller_on", "Unit_ready" and "Process_enabled" are sent to the other blocks and the central controller.
• The signal "Unit_ready" also enables the mode selection in the mode block.
• The "Process_enabled" signal enables the automatic mode.
Handling Modes
Depending on the situation, the user requires different modes for the system and machinery. In unlinked manufacturing cells, for example in body work assembly, these are the modes:
• Automatic
• Inching, in other words a variant of the automatic mode with a stoppage after each process step
• Automatic or switch to next; in other words the automatic mode with an addition step enabling condition
• Manual/setup, in other words direct influence on the units or functions The modes, however, do not have the same effects at all levels. The following overview lists the modes and their effects at the coordination level and unit level (motors, valves etc.).
Mode Effect at the coordination level Effect at the unit level Automatic => Sequencer switches to next step
when the transition is satisfied.
=> Enabling of the drive by the sequencer
Inching => The sequencer switches to the next step when the transition is satisfied and the "Inching" button signal enables the next step.
=> Enabling of the drive by the sequencer
Automatic or step by step mode
=> The sequencer progresses when the transition is satisfied or the
"Inching" button signal enables the next step.
=> Enabling of the drive by the sequencer
Manual or => Enabling of next step suppressed, => Drive enabled by direction
Representing the Mode in the Sequencer
If, for example, a selector switch on the control panel supplies the signals automatic, inching and manual as individual single signals, only relatively simple logic is required to derive the mode signals for the sequencers and for the underlying drives of the units as shown in principle in the following diagram.
FB unit group n Automatic
FB unit group 1 Automatic
The modes selected at the console are passed on to the sequencers when Process_enabled is active. If Process_enabled is not set, the modes of the sequencers are switched to SW_MAN and step enabling is suppressed.
In the automatic or inching modes, the automatic mode is set for the unit functions.
The manual mode is passed on directly. If Process_enabled is not set, both modes are canceled and movements stopped. The functions of the unit groups are represented in an FB created with LAD/FBD or STL.
Handling the Interlocks and Manual Control in the Manual Mode
In S7-Graph, the sequencer controls the functions for the automatic mode. The functions for the manual mode required over and above those of the automatic mode are included in a separate FB. Using action bits (for example Carr_fwd) the sequencer is connected to the interlock and manual control.
S 4
S 5
&
&
&
Carr_fwd Autom.
Man Btn_fwd
KM_on Carr_fwd Spind_on
Execute Mot_on S
S N
FB interlock/manual control FB sequencer
&
Cnd1 Cnd2 Cnd3 Cnd4
( )
( )
>1
Enable_fwd
Valve1_fwd Enable_fwd
The permanent monitoring functions required for the units can be programmed with S7 PDIAG. Depending on the requirements, the supervision conditions can be formulated so that they are effective both in the automatic and manual modes or specific supervision conditions are programmed for the automatic mode and for the manual mode.