Working With SFC Charts PDF
Working With SFC Charts PDF
Principles of SFC
Typical applications of sequential control system involve processes and plants with discontinuous characteristics. Sequential
control can also be used for continuous processes and plants, for example, for approaching and
withdrawing movements, operating point changes, and state changes due to faults.
شرکت پتروفن – بندر ام ام SIMATIC PCS7 Training صادق اکبری: مدرس
P# 3 Sequential Function Chart
96 پاییز-آب نیرو Tel. 09123182734
:) میتواند در سطوح مختلف زیر اجرا شودSequential control( کنترل ترتیبی
راهاندازی موتور، ) مانند باز کردن یک ولوDevice control( کنترل در سطح کنترل دستگاه
: ) مانندGroup control( کنترل در سطح گروهی
proportioning, stirring, heating, filling –
راکتور، میکسر، کنترل در سطح واحد مانند مخزن
: کنترل در سطح پلنت مانند
synchronization of units and common resources, routing –
Note
SFC stands for Sequential Function Chart. While, there are other terms related. SFC chart means a chart editable in the SFC editor and SFC
type a chart created as a type in the SIMATIC Manger and edited in the SFC editor.
شرکت پتروفن – بندر ام ام SIMATIC PCS7 Training صادق اکبری: مدرس
P# 4 Sequential Function Chart
96 پاییز-آب نیرو Tel. 09123182734
SFC stands for Sequential Function Chart.
SFC chart means a chart editable in the SFC editor
SFC type a chart created as a type in the SIMATIC Manger and edited in the SFC editor.
شرکت پتروفن – بندر ام ام SIMATIC PCS7 Training صادق اکبری: مدرس
P# 5 Sequential Function Chart
96 پاییز-آب نیرو Tel. 09123182734
A sequential control system consists primarily of two basic elements: Steps and transitions.
The transition is a condition that controls the execution of a step. Transitions are represented by small
rectangles in the SFC chart.
The step is the control instance for processing the assigned actions on the programmable controller. It is
executed until the following transition is satisfied.
Steps are represented by large rectangles in the SFC chart.
When you open a new SFC chart in the SFC Editor, you will first see two steps and one transition:
Step "START“
Transition 1
Step "END"
شرکت پتروفن – بندر ام ام SIMATIC PCS7 Training صادق اکبری: مدرس
P# 6 Sequential Function Chart
96 پاییز-آب نیرو Tel. 09123182734
Sequencer
A SFC can contain several sequence paths which can be used for different applications.
Different start conditions can be used to ensure that the respective sequence path is executed when certain events occur.
You can thus, for example configure a separate sequence path for each operating state (ready, active, error, etc.)
or for each operating characteristic (heating, cooling, temperature equalization, etc.).
You can insert up to 8 sequence paths in a SFC chart.
In Picture above ,there are 6 paths.
Functions to handle sequence paths are included in the context menu shown in Picture ,where you can insert, move, and delete a sequence path, etc.
The first sequence path of a chart has the condition "SFC.RUN=1"
where SFC is the chart name and RUN a variable of the chart (Refer to the external view of a SFC chart).
شرکت پتروفن – بندر ام ام SIMATIC PCS7 Training صادق اکبری: مدرس
P# 7 Sequential Function Chart
96 پاییز-آب نیرو Tel. 09123182734
Start condition
The start condition of each newly added sequence path is empty and is thus not fulfilled, meaning that the path will not be executed.
You have to define the start condition for a new sequence path. Picture (2) shows that the start condition is
defined in the Sequence Properties window.
It is possible that several start conditions are fulfilled simultaneously. You can assign different priorities to the individual sequence paths.
Priority
A path with higher priority is executed earlier than a path with lower priority if they have same start conditions. You can assign a priority of 1 to 32 to a
sequence path with 1 being the highest priority.
If several start conditions are fulfilled at the same time, the most-far-left sequence path will be activated and it will be the only one executed.
Note that There can be only one sequence path active at any time.
Cyclic action
A cyclic action can be configured for each sequence path. The cyclic action consists of a section called Preprocessing, which is executed before the cyclic
sequence path processing and a section called Post processing, which is executed after the cyclic sequence path.
Both sections are configured in the Sequence Properties dialog window. Refer to Picture 1or Picture 2.
شرکت پتروفن – بندر ام ام SIMATIC PCS7 Training صادق اکبری: مدرس
P# 8 Sequential Function Chart
96 پاییز-آب نیرو Tel. 09123182734
CFC View Of SFC
Each SFC chart has an external view and the view is a block in the CFC. Picture (1) shows the external view of Chart, SFC_val.
External view of a chart is called up by following the menu path, (in the SFC editor)
View > External view or
(in the SIMATIC Manager) Right-click a chart > Open External view.
شرکت پتروفن – بندر ام ام SIMATIC PCS7 Training صادق اکبری: مدرس
P# 9 Sequential Function Chart
96 پاییز-آب نیرو Tel. 09123182734
شرکت پتروفن – بندر ام ام SIMATIC PCS7 Training صادق اکبری: مدرس
P# 10 Sequential Function Chart
96 پاییز-آب نیرو Tel. 09123182734
Step and Transition
با کلیک روی
اگر ماوس در باالی Transitionقرار گیرد .یک المان TSوارد می شود.
و اگر ماوس زیر Transitionقرار گیرد یک المان STبه توالی اظافه میشود.
تا زمانی که یک STیا TSخالی از فرامین یا فاقد دستوریا شرط می باشد سفید میباشد.
برای حذف یا کپی یک Stepبایستی به همراه Transitionانتخاب شود.
همین طور برای حذف یک Transitionبایستی به همراه یک Stepانتخاب شود.
مستطیلهای STو TSدر صورت اضافه کردن دستور یا شرط به رنگ خاکستری تبدیل میشود.
بهتر است نام این دو المان را درقسمت generalبرای هر مرحله و شرط با یک اسم با معنی عوض کرد.
شرکت پتروفن – بندر ام ام SIMATIC PCS7 Training مدرس :صادق اکبری
P# 11 Sequential Function Chart
آب نیرو -پاییز 96 Tel. 09123182734
شرکت پتروفن – بندر ام ام SIMATIC PCS7 Training صادق اکبری: مدرس
P# 12 Sequential Function Chart
96 پاییز-آب نیرو Tel. 09123182734
شرکت پتروفن – بندر ام ام SIMATIC PCS7 Training صادق اکبری: مدرس
P# 13 Sequential Function Chart
96 پاییز-آب نیرو Tel. 09123182734
شرکت پتروفن – بندر ام ام SIMATIC PCS7 Training صادق اکبری: مدرس
P# 14 Sequential Function Chart
96 پاییز-آب نیرو Tel. 09123182734
شرکت پتروفن – بندر ام ام SIMATIC PCS7 Training صادق اکبری: مدرس
P# 15 Sequential Function Chart
96 پاییز-آب نیرو Tel. 09123182734
شرکت پتروفن – بندر ام ام SIMATIC PCS7 Training صادق اکبری: مدرس
P# 16 Sequential Function Chart
96 پاییز-آب نیرو Tel. 09123182734
Phases of a step
Each step is divided into three phases of actions. See Picture
Initialization is the action for the first execution of a step
Processing is the action for cyclic execution of a step
Termination is the action for last execution of step
Picture shows the phases of a step in conjunction with a transition (Condition for exit from step):
on the left, the elements in the chart topology, on the right, the corresponding phases
شرکت پتروفن – بندر ام ام SIMATIC PCS7 Training صادق اکبری: مدرس
P# 17 Sequential Function Chart
96 پاییز-آب نیرو Tel. 09123182734
The Start step is activated when the chart is started without querying conditions and its actions are executed.
A Step can have the states "active" and "inactive". A Step becomes active after the preceding transition passes control to it. The actions are then triggered
and executed. A Step becomes inactive after the successor transition is satisfied.
A transition has the states "FALSE" and "TRUE". The state of the successor transition of the active step is queried. If the successor transition is true (the
condition is true), the previous step is deactivated and the next step activated. If a minimum run time is configured,
the transition is queried (depending on the step control mode) only after this time has elapsed.
The actions of the END step are executed once only.When the chart progresses from one step to the next, the predecessor step is terminated in the same
cycle as the first action (initialization or execution) of the next step.
This satisfies the "non-latching behavior" specified in IEC 1131 - 3.
Example:
In Step S4 (as in Picture), the execution opens a valve and in the termination, the valve is closed. If the same valve is opened again in the first action of the
next step (S5), the overlapping of the two actions (both in one cycle) means that the valve is not closed.
شرکت پتروفن – بندر ام ام SIMATIC PCS7 Training صادق اکبری: مدرس
P# 18 Sequential Function Chart
96 پاییز-آب نیرو Tel. 09123182734
شرکت پتروفن – بندر ام ام SIMATIC PCS7 Training صادق اکبری: مدرس
P# 19 Sequential Function Chart
96 پاییز-آب نیرو Tel. 09123182734
Actions
Within the step, you must configure actions that determine "what" the step is meant to trigger within the process (specify parameters, trigger switching
processes, etc.). You can enter up to 50 actions per step section.
Step
A step consists of actions that run in three sections:
Initialization: This is run once (for a processing call from the OB) when the step becomes active.
Processing: This part is run with every call from the OB until the next transition is fulfilled. If the
transition is fulfilled, the sequencer for the completion part (see below) is run when the next OB call is
made.
Completion: This part is run once when the next transition is fulfilled. After the last command, the step
becomes inactive and simultaneously, the following step becomes active (with its initialization), depending
on the topology.
Transitions
These contain the step enabling conditions for the next step in the sequence control. You can evaluate the validity of up to 16 conditions using five logical
gates. If you mouse-click the gate or connecting line, you can convert it to AND, NAND, OR or NOR.
شرکت پتروفن – بندر ام ام SIMATIC PCS7 Training صادق اکبری: مدرس
P# 20 Sequential Function Chart
96 پاییز-آب نیرو Tel. 09123182734
Formulating a Step – step programming
با وارد کردن یک آدرس سختافزاری در بخش آدرس (مانند )%Q0.0عالمت %به ابتدای آن اضافه میشود.
متغیرهای از نوع Word ،Byteو DWرا به صورت پیش فرض هگز در نظر میگیرد.
اعداد دسیمال به صورت اتوماتیک به هگز تبدیل میشوند.
جمع کردن دو تا متغیر همانند متغیرهای MWو MDرا نمیپذیرد.
ارتباط Actionبا بالک CFC
در قسمت Actionیک Stepبه جای فرمان مستقیم به یک خروجی میتوان به
ورودی یک بالک CFCفرمان اعمال کرد .به عنوان مثال فرمان باز شدن یک
واحد که از طریق بالک Valveدر CFCکنترل میشود در یک Stepصادر میشود.
برای این منظور از طریق دگمه Browseدر پایین پنجره Processingکلیک کرده و در
پنجره باز شده CFCمورد نظر را انتخاب کرده و به پایههای بالک Valveلینک
میدهیم.
در اینجا هدف اعمال فرمانه به ورودی AUTO_OCبرای باز شدن ولو است با
انتخاب آن از لیست سیگنالها و تخصیص مقدار 1یا Trueفرمان باز شدن ولو
ایجاد میگردد.
شرکت پتروفن – بندر ام ام SIMATIC PCS7 Training مدرس :صادق اکبری
P# 21 Sequential Function Chart
آب نیرو -پاییز 96 Tel. 09123182734
در بخش Actionهر Stepمیتوان به ورودی بالکهای بکار رفته در چارتهای CFCدستور اعمال کرد.
با باز کردن چارت CFCحاوی بالکهایی که ورودیهای آنها در چارت SFCاستفاده شده است ،مشاهده میشود که
در کنار این ورودیها عالمت مستطیل شکل کوچک وجود دارد.
با دابل کلیک روی این ورودیها ،در پنجره پراپرتی باز شده برای ورودی بالک مشاهده میشود که گزینه جدیدی
به نام SFC Accessبه پنجره پراپرتی مربوطه اضافه شده است.
با کلیک روی SFC Accessپنجرهای باز میشود که نشان میدهد که در کدام SFCو در کدام Stepاز آن استفاده شده
است.
با گزینه Gotoمیتوان به محل استفاده از این ورودی در SFCپرش کرد.
اگر روی بالک مربوطه در CFCدابل کلیک کنیم و بخش I/Oرا مشاهده کنیم میبینیم که گزینه SFC Accessبرای
ورودی مربوطه تیک خورده است.
شرکت پتروفن – بندر ام ام SIMATIC PCS7 Training مدرس :صادق اکبری
P# 22 Sequential Function Chart
آب نیرو -پاییز 96 Tel. 09123182734
Interaction with Basic Automation (CFC)
The sequential control in the AS is connected to the basic
automation via the action and transition functions. A specific runtime
behavior is assigned to each SFC. Basic automation using the
blocks contained in the CFC charts can have a different runtime
behavior than the SFC. You can control an SFC chart using the
external view of the SFC chart contained in the CFC chart. The
structure of the sequence system makes it possible for the sequential
control and the basic automation blocks to run in different cycles,
thereby reducing the cyclical load. In the same way, SFCs can be
integrated into runtime groups, and can be given a different scan rate
or phase offset via these groups.
SFC Runtime Options
You can set the sequential control behavior in the runtime options.
These can be set in the dialog field
"SFC > Properties > Tab: AS operating parameters"
On: The actions of active steps will be processed. Command Output
Off: The actions of active steps will not be processed.
When "Cyclic mode" is "on", the program will automatically revert to Cyclic Mode
"Starting" following the operating state "Completed".
When "Cyclic mode" is "off", the program remains in "Completed"
state.
When "Timeout" is "on", the active time of the step is continuously Timeout
compared against the monitoring time after the step is activated
(object properties for the step, "General" tab, "Maximum runtime"
option), and a step error is reported if the time is exceeded.
شرکت پتروفن – بندر ام ام SIMATIC PCS7 Training صادق اکبری: مدرس
P# 23 Sequential Function Chart
96 پاییز-آب نیرو Tel. 09123182734
Statements
You can enter up to 50 statements per phase. In the Properties dialog, 10 of the statements can be seen and other 6 statements
can be viewed using the scroll bar.
شرکت پتروفن – بندر ام ام SIMATIC PCS7 Training صادق اکبری: مدرس
P# 24 Sequential Function Chart
96 پاییز-آب نیرو Tel. 09123182734
شرکت پتروفن – بندر ام ام SIMATIC PCS7 Training صادق اکبری: مدرس
P# 25 Sequential Function Chart
96 پاییز-آب نیرو Tel. 09123182734
مودهای تست آنالین چارتهای SFCهمانند ویرایشگر CFCعبارت از مود Processو مود Laboratoryمیباشد.
در پنجره پراپرتی یک Conditionاز طریق فلشهای زیرپنجره میتوان بین Transitionها حرکت کرد.
بخش : Condition
شرطهای مورد نظر در این بخش نوشته میشوند .شرطهای نوشته شده به صورت الجیکی با هم ترکیب می-
شوند.
الجیک موجود در این پنجره به صورت پیشفرض Andاست که با راست کلیک بر روی آن ،میتوان گزینههای
NAND ،ORو XORرا انتخاب کرد.
بخش: OS Comment
در این بخش برای شرطهای وارد شده توضیحاتی در راستای خطوط راهنما برای اپراتور نوشته میشود .این
توضیحات در زمان Run Timeدر محیط OSظاهر میشوند.
وارد کردن :Condition
برای وارد کردن شرطهای مورد نیاز ،در سمت چپ آدرس یا متغیرهای مورد نظر وارد میشود و در سمت راست
مقادیر مقایسه شرط و در وسط پنجره نوع مقایسه وارد میشود.
ارتباط Conditionبا بالک CFCمشابه Actionمیباشد .در اینجا نیز میتوان یک شرط را به یک خروجی از یک
بالک CFCمرتبط کرد .این کار با کلیک روی Browseانجام میگیرد.
در پنجره باز شده با ، Browseتمام ورودی و خروجیهای بالک انتخاب شده فهرست میگردد.
شرکت پتروفن – بندر ام ام SIMATIC PCS7 Training مدرس :صادق اکبری
P# 26 Sequential Function Chart
آب نیرو -پاییز 96 Tel. 09123182734
شرکت پتروفن – بندر ام ام SIMATIC PCS7 Training صادق اکبری: مدرس
P# 27 Sequential Function Chart
96 پاییز-آب نیرو Tel. 09123182734
Selecting a target step
In the test mode (in the SFC editor or the SFC visualization on OS), a step can be selected as the target step from which the chart is started meaning:
the stopped SFC chart starts at the selected target step instead of at the START step with the next “Start”
command.
the held SFC chart resumes at the target step after interrupted steps when the “Continue” command is
issued.
A target step is set in the Properties dialog of the step. See Picture.
The target step marker is valid only for the next “Start” command. If the CPU is restarted and if there is a change from “Manual” to “Auto”, the target step
marker will be deleted.
Note
It is also possible to select multiple steps as target steps (e.g. in parallel branches).
The user is responsible for selecting the target steps so that the processing is feasible, which is to mean no blockages or endless loops.
شرکت پتروفن – بندر ام ام SIMATIC PCS7 Training صادق اکبری: مدرس
P# 28 Sequential Function Chart
96 پاییز-آب نیرو Tel. 09123182734
Linear Sequence Start position: S1 and T12 active
Step enabling: if T12 is fulfilled, then S1 becomes inactive, and S2 and T23
become active.
Parallel Branch Start position: S1 and T12 active
Step enabling: if T12 is fulfilled, then S1 is inactive, and S21, S22 and T23
become active.
Alternative Branch Start position: S1, T12 and T13 active
Step enabling:
1. If T12 is fulfilled, then S1 is inactive, and S2 and T24 are active (T13, S3,
T34 inactive).
2. If T13 is fulfilled, then S1 is inactive, and S3 and T34 are active (T12, S2,
T24 inactive).
3. If T12 and T13 are fulfilled, priority is to upper left, i.e. left branch is active.
Loop Start position: S1 and T12 active
Step enabling:
1. If T12 is fulfilled, then S2 is active, and T23 and T2 are active.
2. If T23 is fulfilled, then S2 is completed and S3 is active.
3. If T2 is fulfilled, then S2 is completed and reinitialized.
4. If T23 and T2 are fulfilled, then as per S3.
Jump Start position: S1, T12 and T13 active
Step enabling:
1. If T12 is fulfilled, then S2 is active and T23 is active.
2. If T2 is fulfilled, then S3 is active, along with the next transition
3. If T12 and T2 are fulfilled, priority is to upper left, i.e. normal sequence (no
jump).
شرکت پتروفن – بندر ام ام SIMATIC PCS7 Training صادق اکبری: مدرس
P# 29 Sequential Function Chart
96 پاییز-آب نیرو Tel. 09123182734
Simultaneous Branch: Execution of a parallel (simultaneous) sequence
The parallel sequences are executed simultaneously in one cycle and executed independently of each other.
The transition after the parallel sequence is executed when all the steps at the end of the sequence paths are active and the transition conditions are satisfied.
شرکت پتروفن – بندر ام ام SIMATIC PCS7 Training صادق اکبری: مدرس
P# 30 Sequential Function Chart
96 پاییز-آب نیرو Tel. 09123182734
Alternative Branch :
Execution of an alternative sequence
The path of an alternative sequence to be executed is the sequence with the transition whose condition is
satisfied first.
If several transitions are satisfied at the same time, the transition furthest left in the chart topology is
activated.
Note
In an alternative sequence, every transition should have parameters defined at the start of a step. Transitions without parameters are always true and are
therefore automatically satisfied. This means that they are always true before a transition with parameters.
شرکت پتروفن – بندر ام ام SIMATIC PCS7 Training صادق اکبری: مدرس
P# 31 Sequential Function Chart
96 پاییز-آب نیرو Tel. 09123182734
Loop Branch
Picture illustrates the phases of a loop. To the left, are the elements in the chart topology and to the right the corresponding phases.
شرکت پتروفن – بندر ام ام SIMATIC PCS7 Training صادق اکبری: مدرس
P# 32 Sequential Function Chart
96 پاییز-آب نیرو Tel. 09123182734
Execution of a Jump
Depending on a transition condition, jumps can be used to continue the execution of the SFC chart at any step within the same
chart.
A jump always leads immediately out of the sequence following a step (origin of the jump).
The use of several jumps is also possible. See Picture.
A jump consists of an initiating transition and an arrow specifying the jump target.
The jump is executed when the transition of the jump is satisfied. If there is more than one jump following the origin of a jump
(S4), then (just as in alternative sequences), the jump whose transition is satisfied first is
executed.
If several transitions are true at the same time, the transition furthest left is activated.
شرکت پتروفن – بندر ام ام SIMATIC PCS7 Training صادق اکبری: مدرس
P# 33 Sequential Function Chart
96 پاییز-آب نیرو Tel. 09123182734
شرکت پتروفن – بندر ام ام SIMATIC PCS7 Training صادق اکبری: مدرس
P# 34 Sequential Function Chart
96 پاییز-آب نیرو Tel. 09123182734
SFC charts are installed in the default OB (OB35) when they are newly inserted. The scan rate for the charts are therefore determinate. Normally, you
should check if a SFC chart is installed in an appropriate OB taking into account of the time response.
Operating modes
The operating mode decides how the chart executes. The following modes are possible for a SFC chart:
Auto (program mode): controlled by a control block or another SFC chart.
Manual (operator mode): controlled by an operator (in the test mode or at the faceplate on OS). Execution
of the chart is controlled manually by an operator (for example during commissioning).
شرکت پتروفن – بندر ام ام SIMATIC PCS7 Training صادق اکبری: مدرس
P# 35 Sequential Function Chart
96 پاییز-آب نیرو Tel. 09123182734
پس از دانلود چارت SFCبه درون CPUمیتوان گزینه Test Modeرا برای نمایش چارت در وضعیت آنالین فعال کرد.
در این حالت رفتار توالی نوشته شده در SFCنمایش داده میشود .مد نمایش آنالین SFCصرفاً برای عیبیابی و بررسی چارت توسط
مهندسین طراح استفاده میشود .اپراتور فرآیند توالی را در محیط OSبر روی Faceplateچارت SFC
مشاهده میکند.
Stepهایی که در مد Holdقرار میگیرند به رنگ زرد ظاهر میشوند.
Transitionهایی که قبالً شرط آنها برقرار شده به رنگ خاکستری درمیآیند.
Transitionهایی که شرط آنها برقرار نشده است و فعالً در حال بررسی هستند .به رنگ قهوهای نمایش داده میشوند.
Transitionهایی که شرط آنها برقرار شده ولی هنوز از شرط خارج نشده است ،به رنگ سبز تیره درمیآیند.
Transitionهایی که هنوز چک نشدهاند به رنگ خاکستری نمایش داده میشوند.
On the External view In SFC Editor
SCT T
Step control with transition Transition only
C
Confirmation by operator
SCT_TAC T and C
Step control and transition Transition and confirmation by operator
- T or C
Transition or confirmation by operator
- T/T and C
Step-specific confirmation by operator
شرکت پتروفن – بندر ام ام SIMATIC PCS7 Training مدرس :صادق اکبری
P# 36 Sequential Function Chart
آب نیرو -پاییز 96 Tel. 09123182734
Consistency check
Blocks could be deleted while SFC charts may still access the blocks’ variables.
These accesses are virtual addresses and colored in yellow in the Properties of steps or Transitions. In Picture, a virtual address is highlighted.
Virtual accesses can be found by using the consistency check function, menu path:
Chart > Consistency Check.
شرکت پتروفن – بندر ام ام SIMATIC PCS7 Training صادق اکبری: مدرس
P# 37 Sequential Function Chart
96 پاییز-آب نیرو Tel. 09123182734
SFC charts are available in OS after compiling OS. By default, all SFC charts will be transferred to OS. See Picture 8.22.
If a SFC chart is in the same plant hierarchy where a picture is set to have block icon derived from the plant hierarchy, a SFC icon will be automatically
inserted into the picture when compiling OS. Picture 8.23 shows a SFC icon.
شرکت پتروفن – بندر ام ام SIMATIC PCS7 Training صادق اکبری: مدرس
P# 38 Sequential Function Chart
96 پاییز-آب نیرو Tel. 09123182734
A double clicking on the icon opens the SFC faceplate as shown in Picture.
A further clicking on the Section button opens the chart view as shown in Picture above.
شرکت پتروفن – بندر ام ام SIMATIC PCS7 Training صادق اکبری: مدرس
P# 39 Sequential Function Chart
96 پاییز-آب نیرو Tel. 09123182734
A double clicking on any Step or Transition opens detailed view of the Step or Transition. Refer to Picture.
شرکت پتروفن – بندر ام ام SIMATIC PCS7 Training صادق اکبری: مدرس
P# 40 Sequential Function Chart
96 پاییز-آب نیرو Tel. 09123182734
After downloading to the CPU, the sequence control will be in a States
defined state. This defined status is determined using the SFC editor
(default: ready). The sequence control can now start either
automatically (SFC chart properties -> Start options -> Autostart) or
only following a start commend (menu Chart -> Properties -> Start
options -> Operating parameters).
Sequence control can be switched between state types using Operator Commands
commands, e.g. Start, Hold, Resume, Abort, Complete.
The various switching modes change the behavior of initialized or Switching Modes
fulfilled transitions. Switching modes can be changed in all operating
mode types. The individual switching modes are mutually exclusive.
The following switching modes are available:
with Transition T
with Transition or Confirmation by User T or C
with Transition and Confirmation by User T and C
with Confirmation by User C
with Step-specific Confirmation by Operator T/T and C
شرکت پتروفن – بندر ام ام SIMATIC PCS7 Training صادق اکبری: مدرس
P# 41 Sequential Function Chart
96 پاییز-آب نیرو Tel. 09123182734
اجرای یک توالی به صورت پیشفرض توسط شرطهای Transitionها کنترل میشود .عالوه بر این میتوان کنترل
توالی را با تایید اپراتور نیز انجام داد .برای این منظور در پایین پنجره Test Modeیک
لیست انتخابی در نظر گرفته شده است.
گزینه :Tدر این حالت شرط عبور وابسته به Transitionاست و اپراتور نقشی ندارد.
گزینه :Tor Cدر این حالت اگر شرط برقرار شود و یا اپراتور روی آیکون مربوطه کلیک کند عبور میکند .این کار
در تمام Transitionها تکرار میشود.
گزینه :T and Cاین حالت فقط با برقراری شرط از Transitionعبور نمیکند اپراتور نیز بایستی بر روی آیکون
مربوطه که پس از برقراری شرط ظاهر میشود کلیک کند.
گزینه :Oعبور از یک مرحله وابسته به برقراری شرط نیست بلکه فقط به تایید اپراتور بستگی دارد.
گزینه :T/T and Cدر این حالت فقط Transitionفعلی وابسته به شرط و اپراتور خواهد بود بقیه Transitionها وابسته به
شرط میباشند.
گزینههای مربوط به تایید اپراتور را میتوان در محیط Plant Viewاز پنجره ویژگیهای SFCنیز به صورت پیش
فرض تنظیم کرد.
شرکت پتروفن – بندر ام ام SIMATIC PCS7 Training مدرس :صادق اکبری
P# 42 Sequential Function Chart
آب نیرو -پاییز 96 Tel. 09123182734
گزینههای انتخابی و تکمیلی پنجره کنترل اجرای :SFC
Command Outputبه صورت پیشفرض فعال است .با غیرفعال شدن این گزینه دستورات ( )Actionنوشته شده در
Stepاجرا نمیشود برای انجام این کار در مد Autoبایستی ورودی INSTROUTبالک
SFCرا صفر کنیم.
Cyclic Operationبه صورت پیش فرض غیرفعال است لذا توالی فقط یکبار انجام میشود .با فعال شدن این گزینه
توالی به صورت مداوم اجرا میشود .به این معنی که پس از ENDدوباره به Startبرمی-
گردد .در برخی فرآیندها کنترل ترکیبی فقط در هنگام راهاندازی صورت میگیرد و لذا
پس از تکمیل مراحل راهاندازی توسط SFCکار کنترل پیوسته توسط CFCشروع می-
شود .در این شرایط اجرای SFCفقط یکبار کافی است .برای دسترسی به این گزینه در
مد Autoاز پایه CYCLEEXECبالک SFCاستفاده میشود که به صورت پیشفرض صفر
است.
Time Monitoringبرای یک Stepمیتوان پارامتری تحت عنوان حداکثر زمان Runtimeتعریف کرد که شبیه یک تایمر
Watchdogعمل میکند .اگر این گزینه فعال نباشد زمان مکث در Stepبا حداکثر زمان
مقایسه نشده و اخطاری تولید نمیشود .در صورت فعال شدن این گزینه و باالتر رفتن
حد ماکزیمم زمان مکث ،Stepرنگ Stepقرمز میشود .در این حالت توالی در Step
قرمز رنگ میماند و تا زمانی که اپراتور دگمه Acknowledgeرا نزده است از این مرحله
عبور نمیکند .این گزینه از طریق TIMEMONبالک SFCقابل دسترسی است.
شرکت پتروفن – بندر ام ام SIMATIC PCS7 Training مدرس :صادق اکبری
P# 43 Sequential Function Chart
آب نیرو -پاییز 96 Tel. 09123182734
کلیدهای تغییر مد
کلید : Auto/Manualدر حالت Autoتمامی کلیدها غیرفعال بوده و تنها از طریق پایههای بلوک SFCظاهر شده در
CFCمیتوان کنترل کرد .یعنی کنترل بدون دخالت اپراتور صورت میگیرد.
: Start/Stopدر مد کاری دستی برای شروع و توقف پردازش توالی بکار میرود .با زدن کلید ، Stopکنترل به مرحله
Endمیرود.
برای شروع مجدد بایستی Resetیا Abortفعال گردد.
کلید :Holdبا فعال کردن این مد ،کنترلکننده در مد Holdقرار میگیرد بهطوری که کنترلکننده سایر کارهای سیکلی
خود را انجام میدهد و صرفاً در اجرای Stepجاری معلق میگردد.
کلید Resumeبرای برگشت کنترلکننده به حالت عادی پس از Holdمیباشد.
کلید Restartاجرای توالی را به مرحله اول برمیگرداند.
کلید Abortپردازش را قطع میکند و مانند دستور Stopبه Endنمیرود و در همان مرحله میماند تفاوت این
دستور با Holdاین است که در این حالت کنترلکننده معلق نمیماند و با انجام پردازش
از روی Stepهای دیگر پرش میکنند.
کلید :Resetکنترلکننده را به وضعیت Idleبرمیگرداند.
شرکت پتروفن – بندر ام ام SIMATIC PCS7 Training مدرس :صادق اکبری
P# 44 Sequential Function Chart
آب نیرو -پاییز 96 Tel. 09123182734
شرکت پتروفن – بندر ام ام SIMATIC PCS7 Training صادق اکبری: مدرس
P# 45 Sequential Function Chart
96 پاییز-آب نیرو Tel. 09123182734
Sequential controls are implemented at various levels:
Device control level (opening valve, starting motor)
Group control level (proportioning, stirring, heating, filling)
Unit level (tank, mixer, scale, reactor)
Plant level (synchronization of units and common resources, routing)
The operating state is influenced as below:
In the Manual mode with the commands;
In the Auto mode via the external view of the chart.
All commends or actions of a SFC chart are listed in the lower part of Picture, which are Start, Abort, Restart, Hold, Complete,
Reset, Resume, Stop, and Error.
Actions will cause SFC into different states, namely, Idle, Starting, Run (Active), Completing, Holding, Error, Held, Held-
Error, Resuming, Aborting, Aborted, Stopping, and Stopped.
شرکت پتروفن – بندر ام ام SIMATIC PCS7 Training صادق اکبری: مدرس
P# 46 Sequential Function Chart
96 پاییز-آب نیرو Tel. 09123182734
Supplement the sequential control for Reactor C as follows: Exercise
If the plant operator issues a hold command for the control, a second "hold control" will start up. This is
to ensure that valves V1, V2 and V3 close, the mixer is switched off and the temperature controller is set
to manual operation with a preset manual value. If the control is no longer in "held" state, the valves,
mixer and controller are to switch back to the state they were in when the HOLD command was issued.
----------------------------------------------------------------------------------------------------
1. Enter an additional sequencer in the SFC_ReacC. Steps
2. Set the chart properties for the two sequencers.
3. Data block to save data when on hold.
4. Finish programming the "run sequencer" and "hold sequencer" in SFC_ReacC".
----------------------------------------------------------------------------------------------------
Procedure
Insert a second sequencer in SFC_ReacC1. With the SFC open, go to the "RUN" tab (below) and activate Expand SFC
the command
Right-click: Insert sequence at end
to insert another sequencer. One SFC can process up to eight sequencers in alternation.
With the SFC open, set the chart properties via
Chart -> Properties -> Operating parameters tab
as follows:
Switching mode: T; operating mode: Auto; Command output, Use defaults at SFC start.
شرکت پتروفن – بندر ام ام SIMATIC PCS7 Training صادق اکبری: مدرس
P# 47 Sequential Function Chart
96 پاییز-آب نیرو Tel. 09123182734
In SFC V6.0 there is an SFC type in addition to the SFC chart. This makes it possible to define sequential SFC Type
controls, including an interface. The runtime logic of the SFC type is based on the interface of the SFC
type, i.e. the SFC type cannot access just any process signals. Like function blocks, SFC types must be
placed on a CFC chart, where they are given an SFC instance.
Creating an SFC Type
SFC types cannot be inserted into the plant hierarchy, since they cannot run on their own. Instead, they
are created using
Insert new object -> SFC type
in the component view in the SIMATIC Manager or
SFC -> New (select "SFC type" in the "Object type" field)
in the SFC editor.
شرکت پتروفن – بندر ام ام SIMATIC PCS7 Training صادق اکبری: مدرس
P# 48 Sequential Function Chart
96 پاییز-آب نیرو Tel. 09123182734
If an SFC type is used, it is inserted into a CFC chart. An SFC instance will be assigned to it at this point. SFC Instance
SFC instances are therefore always assigned to the CFC chart and are addressed via the chart. By
assigning the CFC chart to the plant hierarchy, the instances that it contains are also indirectly assigned to
the plant hierarchy.
When you configure SFC instances, the interface and the sequencers must not be changed, as the same Configuration
ones must be specified by the SFC type for all instances. Changes that are made directly to the instances
may be loaded at any time, even if the SFC instances in the automation system are currently being
processed.
After you have configured any changes, you must use the function
OS -> Compile
to ensure that the current data is also available on the OS.
If the program is compiled at the ES end, the SFC instances will be compiled along with them. For any Compile
given SFC instance, 1+n data blocks will be created (where n = number of sequencers within an SFC).
شرکت پتروفن – بندر ام ام SIMATIC PCS7 Training صادق اکبری: مدرس
P# 49 Sequential Function Chart
96 پاییز-آب نیرو Tel. 09123182734
شرکت پتروفن – بندر ام ام SIMATIC PCS7 Training صادق اکبری: مدرس
P# 50 Sequential Function Chart
96 پاییز-آب نیرو Tel. 09123182734
شرکت پتروفن – بندر ام ام SIMATIC PCS7 Training صادق اکبری: مدرس
P# 51 Sequential Function Chart
96 پاییز-آب نیرو Tel. 09123182734
شرکت پتروفن – بندر ام ام SIMATIC PCS7 Training صادق اکبری: مدرس
P# 52 Sequential Function Chart
96 پاییز-آب نیرو Tel. 09123182734
شرکت پتروفن – بندر ام ام SIMATIC PCS7 Training صادق اکبری: مدرس
P# 53 Sequential Function Chart
96 پاییز-آب نیرو Tel. 09123182734
ابتدا چارت CFCرا طراحی و پیاده سازی میکنیم .بالکهای مورد نیاز در چارت CFCعبارتند از:
بالکهای درایور کانالهای دیجیتال و آنالوگ CH_AI،CH_D0 ،CH_DI
بالکهای MOTORبرای پمپ و VALVE
دریافت فرمان Startاز اپراتور
در بخش 1چارت CFCیک بالک CH-DIوارد کرده و نام آن را به Start_Processتغییر میدهیم و
سپس آن را به ورودی I0.0متصل می کنیم.
کنترل ولو ورودی
در بخش 2از چارت CFCبلوک Valveرا وارد کرده و نام آن را به Inlet_Valveتغییر میدهیم و
ورودی Monitorاین بالک را offمیکنیم تا منتظر فیدبک نباشد .برای فعال کردن مد اتوماتیک ،به
ورودیهای LIOP_SELو AUT_Lیک وارد کرده و یک بالک درایور CH_D0برای اتصال خروجی
بلوک ولو به سیگنال خروجی Qوارد چارت کنید .نام آن را به Inlet_Vlave_D0تغییر میدهیم ورودی
این بالک را به خروجی بالک Valveو خروجی آن را به Q0.1متصل میکنیم.
کنترل پمپ:
در بخش 3چارت ،CFCبالک Motorرا درج کرده و نام آن را به Pumpتغییر میدهیم .ورودی
Monitorرا offمیکنیم تا نیازی به فیدبک نباشد .ورودیهای LIOP_SELو AUT_Lرا در این بلوک
نیز برای فعال کردن حالت اتوماتیک یک میکنیم .بالک CH_D0جدیدی را وارد کرده و نام آن را به
Mot_Start_Stopتغییر میدهیم .ورودی آن را به خروجی Motorو خروجی آن را Q0.0وصل میکنیم.
کنترل ولو خروجی
در بخش 4چارت CFCبالک Valveرا وارد کرده و نام آن را به Outlet_Valveتغییر میدهیم ورودی
Monitorاین بالک را نیز offمیکنیم ورودیهای ورودیهای LIOP_SELو AUT_Lرا در این بلوک نیز
یک میکنیم.
دریافت مقدار ترانسمیتر سطح -در بخش 5چارت ،CFCبالک CH_AIرا وارد کرده و نام آن را به
Tank_Levelتغییر داده و سپس آن را به آدرس IW512متصل میکنیم .ورودیهای Scaleاعداد 100و
0را اختصاص میدهیم.
شرکت پتروفن – بندر ام ام SIMATIC PCS7 Training مدرس :صادق اکبری
P# 54 Sequential Function Chart
آب نیرو -پاییز 96 Tel. 09123182734
پس از تکمیل چارت ،CFCچارت SFCرا باز کرده و سه Stepو Transitionمطابق شکل وارد میکنیم .مراحل Startو Endحاوی دستورات خاصی نیستند.
Transitionاول
در این TSسیستم بایستی منتظر استارت اپراتور بماند نام آن را به Check Startتغییر میدهیم .در قسمت
Conditionبا کلیک روی ،Browseاز پنجره باز شده بالک Pocess_Startرا پیدا کرده و خروجی Qرا انتخاب
و سپس شرط= را انتخاب و مقدار 1را وارد میکنیم.
اکشن Stepاول:
در این مرحله بایستی ولو ورودی باز شود بنابراین نام آن را به Open Inlet Valveتغییر داده و در قسمت
Processingآن با کلیک روی Browseاز لیست باز شده ،بالک Inlet Valveرا انتخاب و ورودی AUTO_OCرا
به مقدار یک اختصاص میدهیم .این مرحله طبق الجیک بایستی 3ثانیه مکث کند و سپس مرحله بعد
که مربوط به استارت پمپ است اجرا شود .بنابراین در بخش Generalحداقل زمان را T#3sوارد میکنیم.
Transitionدوم نیاز به شرط خاصی ندارد و نام آن را به Null-01تغییر میدهیم.
در Stepدوم:
پمپ باید روشن شود .نام آن به Pump Startتغییر داده و در بخش پردازش با کلیک روی Browseو
انتخاب بالک Motorورودی AUTO_OCرا یک میکنیم.
در Transitionسوم :
ضعیت سطح مخزن چک میشود .نام آن را به Check Levelتغییر داده و در Conditionآن با کلیک روی
Browseاز لیست یاز شده بالک CH_AIرا انتخاب و خروجی آن را به مقدار 70مقایسه میکنیم.
در Stepسوم:
ولو خروجی باز میشود .نام آن را به Open outlet Valveتغییر میدهیم و در بخش پردازش ،بالک
Outlet_Valveرا انتخاب و ورودی AUTO_OCرا یک میکنیم.
Transitionچهارم نیاز به شرط خاصی ندارد و نام آن را به Null-02تغییر میدهیم.
در نعایت چارتها را کامپایل کرده ،به CPUدانلود و چارت را تست میکنیم.
شرکت پتروفن – بندر ام ام SIMATIC PCS7 Training مدرس :صادق اکبری
P# 55 Sequential Function Chart
آب نیرو -پاییز 96 Tel. 09123182734