STARDOM Technical Assist
Hands-on
Overview of IEC
Programming
- Function / Function Block -
Ng Chye Wee
Yokogawa Engineering Asia Pte Ltd
| Document Number | June 25, 2018 |
© Yokogawa Electric Corporation
Logic Designer Basic
Info/Online help Make Debug on
Project Control Dialog
(Download/Cold/Warm/Info/...)
Variable worksheet
(Local variables)
Code worksheet
Variable worksheet
(Globule variables)
Target Setting
Device Label Definition Edit Wizard
(Selecting Function and Function Block)
Offline Download
| Document Number | June 25, 2018 |
Online Download © Yokogawa Electric Corporation
Engineering Procedure
Create new project
Define device label variables
Create program
Assign to task
Build (make)
Download
Start FCN/FCJ
******
next hans-on training
Check operation (debug mode)
| Document Number | June 25, 2018 |
© Yokogawa Electric Corporation
Hands-on Creating FBD program
Exercise: Let’s create following program
A001 Project File
Q001
B001 ET001 T1.mwt
Hans-on 1: Placing function and function block.
(1) Double-click the [Main]-[Main] on the project tree to open the code worksheet.
(2) Select “Function” from the [Group] combo box of the [Edit Wizard].
(3) Select “AND” on the [Edit Wizard]. Drag & drop “AND” from [Edit Wizard] to the worksheet.
(4) Select “Function blocks” from the [Group] combo box of the [Edit Wizard].
(5) Select standard function block “TON” on the [Edit Wizard]. Drag & drop “TON” from [Edit Wizard] to the
worksheet, and Click [OK]. (4) Select
(2) Select
(1) Double-click
(3) Drag and drop
(5) Drag and drop[OK]
| Document Number | June 25, 2018 |
© Yokogawa Electric Corporation
Hands-on Creating FBD program
Hans-on 2: Function block TON online help (3 method)
(1) Select “Help on FB/FU” on the right-click menu of the “TON” in the Edit Wizard.
(2) Select [?] – [Help on Standard FB/FU]
Select [IEC 61131-3 function blocks]-[TON]
(3) Select TON function block. Select right-click menu [Help on FB/FJ]
(1)
(3)
(2)
| Document Number | June 25, 2018 |
© Yokogawa Electric Corporation
Hands-on Creating FBD program
Hans-on 3: Drawing connection. Specifying variables.
(1) Double Click the blue circle of the “AND”. Enter “A001” in the [Name] field, and click [OK].
(2) Double Click the blue circle of the “AND”. Enter “B001” in the [Name] field, and click [OK].
(3) Hold the mouse button down, and drag the mouse directly to the blue circle for “IN” of the
“TON” function block.
(4) Double Click the circle for the “PT” of the “TON”. Enter “TIME#15s” in the [Name] field
[OK].
(5) Double Click the circle for the “Q” of the “TON” . Enter “Q001” in the [Name] field [OK].
(6) Double Click the circle for the “ET” of the “TON”. Enter “ET001” in the [Name] field [OK].
(1) Double Click. Enter “A001” [OK] (2) Double Click. Enter “B001” [OK]
(3)(4) Drag
(5) “TIME#15s” (6) Q001
(7) Type “ET001” [OK]
| Document Number | June 25, 2018 |
© Yokogawa Electric Corporation
Hands-on Creating FBD program
Hans-on 4: Make. Download. Debug. (1) [Make]
(1) Click the toolbar icon [Make], or Push [F9] key to compile the project file.
(2) Click the toolbar icon [Project Control Dialog] .
(3) Click [Download]. Click [Download]. [YES][YES]
(2) [Project Control Dialog]
(4) Click [Cold] on the Project Control Dialog [OK].
(5) Click [Debug on] icon.
(6) Double Click “A001”. Click [Overwrite].
(7) Double Click “B001”. Click [Overwrite].
(6) Double Click “A001”
(5) [Debug on]
Click [Overwrite]
(3) [Project Control Dialog]
(4) [Cold]
(7) Double Click “B001”
Click [Overwrite]
(6)Click [Debug on] icon to quit from the debug mode.
| Document Number | June 25, 2018 |
© Yokogawa Electric Corporation
Tips: Usage / Local variables, Global variables
Specify the variable declaration keyword for "Usage". When "Show all variables
of worksheets" is selected, "VAR" or "VAR_GLOBAL" can be selected.
By selecting either "VAR" or "VAR_GLOBAL in the "Usage" combo box, the
usage of the variables is defined as follows:
VAR: Local variables declaration
VAR_GLORBAL: Global variables declaration
Local variables declaration
(local) variable worksheet
| Document Number | June 25, 2018 |
© Yokogawa Electric Corporation
Global and Local Variables
Global variables declaration
The system automatically creates a “VAR_EXTERNAL”
declaration on the variable worksheet of the POU and a
“VAR_GLOBAL” definition on the global variable worksheet.
Global variable worksheet (local) variable worksheet
| Document Number | June 25, 2018 |
© Yokogawa Electric Corporation
Thank you for your attention.
The names of corporations, organizations, products and logos herein are either registered trademarks or
trademarks of Yokogawa Electric Corporation and their respective holders.
| Document Number | June 25, 2018 |
© Yokogawa Electric Corporation