0% found this document useful (0 votes)
255 views

Working With SFC Charts PDF

The document discusses Sequential Function Charts (SFC) which are used for sequential control systems. An SFC consists of steps and transitions, with steps represented by rectangles and transitions by smaller rectangles. It describes how SFCs can control devices, groups, units, and entire plants. The document outlines the basic elements of an SFC including sequence paths, start conditions, priorities, and cyclic actions. It also notes that each SFC chart has an external view as a block in the Continuous Function Chart (CFC) editor.

Uploaded by

sina20795
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
255 views

Working With SFC Charts PDF

The document discusses Sequential Function Charts (SFC) which are used for sequential control systems. An SFC consists of steps and transitions, with steps represented by rectangles and transitions by smaller rectangles. It describes how SFCs can control devices, groups, units, and entire plants. The document outlines the basic elements of an SFC including sequence paths, start conditions, priorities, and cyclic actions. It also notes that each SFC chart has an external view as a block in the Continuous Function Chart (CFC) editor.

Uploaded by

sina20795
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 55

‫شرکت پتروفن – بندر ام ام‬ SIMATIC PCS7 Training ‫ صادق اکبری‬: ‫مدرس‬

P# 1 Sequential Function Chart


96 ‫ پاییز‬-‫آب نیرو‬ Tel. 09123182734
‫شرکت پتروفن – بندر ام ام‬ SIMATIC PCS7 Training ‫ صادق اکبری‬: ‫مدرس‬
P# 2 Sequential Function Chart
96 ‫ پاییز‬-‫آب نیرو‬ Tel. 09123182734
What is SFC?
SFC (Sequential Function Chart) is a sequential control system partitioned to ensure step-by-step execution with control passing
from one state to the next state dependent on conditions. With a sequential control system, basic
automation functions, for example CFC charts are controlled based on state changes and can be
selectively processed. You create SFC charts in the SFC Editor.

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.

Each statement line consists of the following elements:


The button with the line number for selecting the line 
The radio button that you can use to select the statement as an OS comment 
An edit box for the left address, the operator, and the edit box for the right address 

‫شرکت پتروفن – بندر ام ام‬ 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. 

Compiling and downloading in the SFC editor


In the SFC editor on an ES, you can compile SFC charts and download them to AS.
As the function of compiling or downloading is relevant to the whole S7 program, there is no difference if the program is compiled/downloaded in the CFC
editor or SFC editor.

‫شرکت پتروفن – بندر ام ام‬ 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).

Sequencer Operating Mode Logic (OML)


Processing of sequencers is controlled by the sequencer OSL. The
operating mode logic for the sequencer is defined in the diagram
showing state transitions for sequencer operating mode logic.

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.

Manipulating the SFC Type


The SFC type is a manipulable object like the SFC chart; however, it has its own symbol to distinguish it
from the latter. The attributes necessary for the SFC type (e.g. S7_m_c) are preset. Seven messages
requiring acknowledgement and five that do not require acknowledgement can be configured for each
SFC type. The other available messages are required by the SFC type itself.

Configuring Using the SFC Type


Only the interfaces for the SFC type can be used to configure actions in the steps and the start and step
enabling conditions. In other words, external access is via the SFC type interface only.

‫شرکت پتروفن – بندر ام ام‬ 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.

SFC instance messages can be configured in the SFC via Messages


SFC -> Message
or in the CFC in the Object Properties dialog box. The reports are PCS-7-compliant and can also be
provided with associated values, for instance.

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‬‬

You might also like