Omron SFC INTRODUCTION GUIDE

Introduction

- Please be sure to read and understand Precautions and Introductions in CX-Programmer Operation Manual SFC, CX-Programmer Operation Manual and CX-Programmer Operation Manual Function Block/Structured Text before using the product.
- This guide describes the basic operation procedure of CX-Programmer. Refer to the Help or the Operation Manual of the PDF file for detailed descriptions.
- You can display the PDF files from the [Start ] menu on your desktop after installing the CX-Programmer.
-The screen views used in this guide may be different from the actual view, and be subject to change without notice.
- The product names, service names, function names, and logos are the trademarks or registered trademarks of the respective company.
-"TM"and the (R) mark do not appear with product or company names in this guide.
- The product names of the other companies may be abbreviated in this guide.

Table of Contents

Table of Contents
Section 1 SFC Overview ..............................................................................1-1
1-1 Introduction of SFC ....................................................................................1-1
1-1-1 Describing Programs with SFC ................................................................................ 1-1
1-1-2 Correspondence of Steps and Programs ................................................................. 1-1
1-2 What Can CX-Programmer Do? ................................................................1-2
1-2-1 Choosing a Programming Language for Your Application ....................................... 1-2
1-3 SFC Operation ...........................................................................................1-4
1-3-1 Elements of SFC ...................................................................................................... 1-4
1-3-2 SFC Program Operation .......................................................................................... 1-5
Section 2 Creating Programs with SFC .......................................................2-1
2-1 Workflow ....................................................................................................2-1
2-2 Designing Programs ..................................................................................2-2
2-2-1 Parking Gate System Operation .............................................................................. 2-2
2-2-2 Action Flow Diagram ................................................................................................ 2-5
2-2-3 Programming Example ............................................................................................. 2-6
2-3 Creating Projects .......................................................................................2-9
2-4 Creating SFC Programs ..........................................................................2-11
2-5 Creating Steps and Transitions ...............................................................2-13
2-5-1 Renaming Steps/Transitions .................................................................................. 2-13
2-5-2 Adding Steps/Transitions ....................................................................................... 2-15
2-5-3 Creating Transitions ............................................................................................... 2-18
2-5-4 Creating Loops to Initial Steps ............................................................................... 2-22
2-6 Compiling .................................................................................................2-24
2-6-1 Checking for Program Errors ................................................................................. 2-24
2-6-2 Saving Projects ...................................................................................................... 2-24
2-7 Simulated Transition Test ........................................................................2-25
2-7-1 Online Connection to Simulator ............................................................................. 2-25
2-7-2 Setting Transition Conditions ................................................................................. 2-26
2-8 Creating Action Blocks .............................................................................2-28
2-8-1 Creating Actions ..................................................................................................... 2-28
2-8-2 Assigning Action Qualifiers .................................................................................... 2-30
2-9 Simulated Operation Test ........................................................................2-32
Table of Contents
Appendix .................................................................................................... A-1
A-1 Reference ................................................................................................. A-1
A-1-1 Main Window ........................................................................................................... A-1
A-1-2 Action Qualifier (AQ) List .........................................................................................A-3
A-2 Creating SFC Elements ............................................................................ A-4
A-2-1 Simultaneous Sequence Divergences/Convergences ............................................A-4
A-2-2 Divergences/Convergences ....................................................................................A-6
A-3 Online Editing ........................................................................................... A-9
A-3-1 Transferring Programs to PLC ................................................................................A-9
A-3-2 Online Editing ........................................................................................................A-11
Section 1
SFC Overview
This section explains the features and the operations of SFC.

1-1 Introduction of SFC

1-1
1-1-1 Describing Programs with SFC
Introduction of SFC
This section provides an overview of SFC.
Sequential Function Chart (hereafter called SFC) is a graphical programming language that displays the process flow as a diagram, thereby allowing the user to control the sequential processes by describing the transition conditions and actions for each step. SFC is suitable for understanding the processing order and status transition of a program.
1
SFC Overview
1-1-2 Correspondence of Steps and Programs
Program controls correspond to the actual step flow, making it easy to understand the program as a whole. This reduces the workload in debugging and maintaining the programs.
1-1

1-2 What Can CX-Programmer Do?

1-2
1
SFC Overview
What Can CX-Programmer Do?
This section explains the features and the usage of SFC.
1-2-1 Choosing a Programming Language for Your Application
Each program can be coded in any combination of SFC, ladder, and ST (Structured Text). From the three, select the suitable programming language for the process. For example, you can code step progression with SFC, device control with ladder, and arithmetic processes with ST.
Flow and order of controls can be coded with SFC, while actions within steps and transitions between steps can be coded with ladder, ST or Boolean variables (contacts).
: Action Program (Ladder) : Action Program (ST) : Transition Program (Ladder) : Transition Program (ST)
1-2
1-2 What Can CX-Programmer Do?
The SFC editor allows simultaneous viewing and editing of both the SFC chart and action/ transition programs. This allows for process and transition conditions to be viewed and edited while maintaining a perspective on the program as a whole, allowing the user to fully utilize the features of SFC.
:SFC View : Program View
1
SFC Overview
The SFC editor can display the SFC view and the Program view in horizontal or vertical alignment. To display the views in vertical alignment,
SFC Horizontal Split
check the
Options
dialog box.
on the
SFC
tab of
1-3

1-3 SFC Operation

1-3
1
SFC Overview
SFC Operation
This section explains the elements of SFC and the operation of SFC programs.
1-3-1 Elements of SFC
:Step
A step is an element of SFC programs, and represents a single process within the overall process flow. When a step becomes active, action blocks assigned to that step are executed. The first step of a program is referred to as the "initial step".
: Action Block
An action block contains the step processes (actions) for a single step.
: Action Qualifier
An action qualifier defines the execution timing and status retention preference for each action.
: Action Name
For each action, specify a Boolean variable (contact) or an action program name.
: Transition
A transition represents the condition that transfers the active status from the step before the transition to the step after the transition.
: Simultaneous Sequence Divergence/
Convergence A simultaneous sequence divergence is a structure in which a single transition is followed by multiple steps. When the transition condition is satisfied, all of the connected steps become active simultaneously. A simultaneous sequence convergence is a structure in which multiple steps are followed by a single transition. Active status is transferred when the transition condition is satisfied and after all the steps have been activated.
1-4
1-3-2 SFC Program Operation
A step can be either active or inactive. When a step becomes active, actions defined within that step are executed. When the transition condition is satisfied, the step immediately before the transition becomes inactive, and the step immediately after the transition becomes active.
1-3 SFC Operation
: Divergence/Convergence
A divergence is a structure in which a single step is followed by multiple transitions. The active status is transferred to the transition for which the condition is satisfied. A convergence is a structure in which multiple transitions are each followed by a step. This structure merges a flow that has been branched.
For details on SFC elements, refer to CX- Programmer Operation Manual SFC .
1
SFC Overview
The following example illustrates a case in which transition condition "Trans1" is satisfied, and the active status is transferred from step 1 to step 2. The bullet symbol indicates the active step.
1-5
1-3 SFC Operation
1
SFC Overview
Memo
1-6

2-1 Workflow

Section 2
Creating Programs with SFC
This section explains the process of coding an SFC program with CX-Programmer, using a parking gate system as an example.
2-1
Workflow
This section explains the SFC programming workflow, from creation to simulated debugging. When creating a program for actual use, test the program with the actual devices after completing the steps below.
1.Define Operation Define the operation of the system to perform.
Refer to 2-2 Designing Programs.
2.Create Project Start CX-Programmer, and begin programming. Refer to 2-3 Creating Projects.
3.Create SFC Chart Organize the overall process flow into actions and transitions, and create an SFC chart. Assign the created program to a task. Create an SFC chart, and program the transition conditions. Refer to 2-4 Creating SFC Programs.
2
Creating Programs with SFC
4.Compiling Check for errors in the program. Refer to 2-6 Compiling.
5.Simulate Using the simulator, check that the transitions between steps actually take place when the transition conditions are satisfied. Refer to 2-7 Simulated Transition Test.
6.Add Actions Program the actions for each step. Refer to 2-8 Creating Action Blocks.
7.Debug Test the operation of the program as a whole. Refer to 2-9 Simulated Operation Test. For details on debugging, refer to CX- Programmer Operation Manual .
2-1

2-2 Designing Programs

2-2
2
Creating Programs with SFC
Designing Programs
Design the program based on system operation.
2-2-1 Parking Gate System Operation
When a car approaches the gate, a ticket is issued. The gate is opened when the ticket is taken. When the car passes the gate, the gate is closed, and the system returns to the initial state. A display panel is used to display status messages. Transitions between actions are initiated by inputs from the sensors.
The program design process is outlined below.
• Define the operation of the parking gate system.
• Clarify the conditions by which transitions of action take place.
• Create an SFC chart based on action flow.
• Create the actual I/O device control programs for each action.
When the system is waiting for a car (wait status), the gate is closed.
: Vehicle sensor is OFF.
: Ticket sensor is OFF.
: Gate open limit sensor is OFF.
: Gate close limit sensor is ON.
: Nothing is displayed on the display panel.
2-2
When a car enters, the vehicle sensor turns ON.
When the vehicle sensor turns ON, a ticket is issued. "Take ticket" is displayed on the display panel.
When the ticket is taken, the ticket sensor turns ON.
2-2 Designing Programs
5
2
When the ticket sensor turns ON, the gate opens. "Opening gate" is displayed on the display panel. Gate close limit sensor turns OFF.
When the gate is fully open, the gate open limit sensor turns ON. When the gate open limit sensor turns ON, the gate stops.
"Go" is displayed on the display panel.
8
When the car passes the gate, the vehicle sensor turns OFF.
Creating Programs with SFC
4
2-3
2-2 Designing Programs
2
Creating Programs with SFC
When the vehicle sensor turns OFF, the timer counts 3 seconds for safety, and then the gate closes. "Closing gate" is displayed on the display panel. The gate open limit sensor turns OFF.
When the gate is fully closed, the gate close limit sensor turns ON. When the gate close limit sensor turns ON, the gate stops. The system returns to the wait status.
2-4
2-2-2 Action Flow Diagram
The action flow diagram for the parking gate system is shown below. The numbering in the diagram corresponds to the numbering in 2-2-1 Parking Gate System Operation.
2-2 Designing Programs
This is the initial state of the parking gate system (wait status). Maintain wait status until the vehicle sensor turns ON.
When a car enters, the vehicle sensor turns ON. When the vehicle sensor turns ON, make a transition from to .
2
Activate the ticket dispenser and issue a ticket. Display "Take ticket" on the display panel. Maintain this state until the ticket sensor turns ON.
When the driver takes the ticket, the ticket sensor turns ON. When the ticket sensor turns ON, make a transition from to .
Rotate the gate operating motor in the normal direction to open the gate. Display "Opening gate" on the display panel. Maintain this state until the gate open limit sensor turns ON.
When the gate is fully open, the gate open limit sensor turns ON.
When the gate open limit sensor turns ON, make a transition from to .
Creating Programs with SFC
The gate is stopped at the open limit. Display "Go" on the display panel. Maintain this state until the vehicle sensor turns OFF.
8
When the car passes the gate, the vehicle sensor turns OFF. When the vehicle sensor turns OFF, make a transition from to .
2-5
2-2 Designing Programs
2-2-3 Programming Example
Wait 3 seconds after the transition, then rotate the gate operating motor in the reverse direction to close the gate. Display "Closing gate" on the display panel. Maintain this state until the gate close limit sensor turns ON.
When the gate is fully closed, the gate close
limit sensor turns ON. When the gate close limit sensor turns ON, make a transition from to .
2
Creating Programs with SFC
SFC Chart
An example program for the described parking gate system is shown below. The numbering in the diagram corresponds to the numbering in 2-2-2 Action Flow Diagram.
The programs used in this manual are provided for educational purposes only, to aid in understanding how CX-Programmer works. When designing a program for actual use, be sure to make considerations for safety in terms of hardware devices and control methods.
Create an SFC chart based on the system operation. Use a Step to code steps, an Action Program for processes within a step, an Action Qualifier for execution timing, and a Transition for transition conditions.
2-6
Memory Allocation
Set memory allocation for the external devices as follows.
External Device I/O Address
Vehicle Sensor Input 0.00
Ticket Sensor Input 0.01
Gate Open Limit Sensor Input 0.02
Gate Close Limit Sensor Input 0.03
Issue Ticket Output 10.00
Normal Gate Operating Motor Rotation Output 11.00
2-2 Designing Programs
Reversed Gate Operating Motor Rotation Output 11.01
Ticket Issuance Message Output 20.00
Gate Opening Message Output 20.01
Pass Gate Message Output 20.02
Gate Closing Message Output 20.03
Transitions
Set the transition conditions between steps. Example ladder programs are shown below. For a ladder output coil, use the Boolean variable output, having the same name as the transition program.
"Vehicle Detected" Program
2
Creating Programs with SFC
"Ticket Received" Program
"Gate Fully Open" Program
"Gate Fully Closed" Program
"Gate Passed" Program
2-7
2-2 Designing Programs
Actions
Describe the processes for each step. Example ladder programs are shown below.
"Ticket Issuance" Program
"Passing Gate" Program
2
Creating Programs with SFC
"Opening Gate" Program
"Closing Gate" Program
2-8
Loading...
+ 42 hidden pages