Defining Function Blocks Created By User - Omron CX-PROGRAMMER V8.1 Operation Manual

Function blocks/ structured text
Table of Contents

Advertisement

Procedures
Note
3-2-3

Defining Function Blocks Created by User

Registering Variables First
Registering Variables in
the Variable Table
1,2,3...
Function block definitions are not displayed in the default settings for OMRON
FB Library files (.cxf). To display definitions, select the Display the inside of
FB option in the function block properties. (Select the OMRON FB Library file
in the project workspace, right-click, select Properties, and select the Dis-
play the inside of FB option in the General Tab.)
A function block is defined by registering variables and creating an algorithm.
There are two ways to do this.
• Register the variables first and then input the ladder program or structure
text.
• Register variables as they are required while inputting input the ladder
program or structure text.
The variables are divided by type into five sheets in the variable table: Inter-
nals, Inputs, Outputs, Input-Output, and Externals.
These sheets must be switched while registering or displaying the variables.
1. Make the sheet for the type of variable to be registered active in the vari-
able table. (See note.) Place the cursor in the sheet, right-click, and per-
form either of the following operations:
• To add a variable to the last line, select Insert Variable from the pop-
up menu.
• To add the variable to the line above or below a line within the list, se-
lect Insert Variable - Above or Below from the pop-up menu.
Note The sheet where a variable is registered can also be switched
when inserting a variable by setting the usage (N: Internals, I: In-
puts, O: Outputs, E: Externals, P: In Out).
The New Variable Dialog Box shown below will be displayed.
• Name: Input the name of the variable.
• Data Type: Select the data type.
• Usage: Select the variable type.
• Initial Value: Select the initial value of the variable at the start of oper-
ation.
• Retain: Select if the value of the variable is to be maintained when the
power is turned ON or when the operating mode is changed from
PROGRAM or MONITOR mode to RUN mode. The value will be
cleared at these times if Retain is not selected.
Section 3-2
Variable table
Ladder program
85

Hide quick links:

Advertisement

Table of Contents
loading

This manual is also suitable for:

Sysmac ws02-cxpc1-v8Sysmac cx-programmer 8.1

Table of Contents