EasyManuals Logo
Home>Omron>Industrial Equipment>SYSMAC FH Series

Omron SYSMAC FH Series User Manual

Omron SYSMAC FH Series
882 pages
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Page #211 background imageLoading...
Page #211 background image
WWW.NNC.IR
Basic Knowledge For Macro Customize
Functions
209
5
Optimizing Scenes (Measurement Flows) (Macro Customize
Functions)
Vision System FH/FZ5 Series
User’s Manual (Z340)
Variable
Among the values and character strings used in programming, a variable has a unique assigned name and is
used for data that changes. Use a variable for a numeric value or character string that you want to use
repeatedly in a program, but whose specific value or character string changes.
How to Use Variables
Variables are used as shown below.
(Example)
1. Declare the variable
By declaring a variable, you allocate the data area required for the variable and enable use of the variable
in the remainder of the program. Declaration is only required for array variables, and the Dim function is
used for this purpose. For variables other than array variables, the data area is automatically allocated
when the program is executed, and thus declaration is not necessary.
2. Assign a value to the variable
Assign a value to a variable. Only values of the same data type as the variable can be assigned. In the
case of a variable other than an array variable, the variable can be used without being declared. Add the
type identifier to the end of the name, and use a variable name that is not used by any other variables.
For details on type identifiers, refer to the "Naming Rules for Variables" section.
Reference: XNaming Rules for Variables (p.210)
3. Reference the variable
Reference the value that is assigned to a variable. You can also pass the variable to a macro function as
an argument.
Rem 1. Declare the variable
Dim POSITION#(1)
Rem 2. Assign a value to the variable
A# = 320.0
B# = 310.0
Rem 3. Reference the variable
POSITION#(0) = A#
POSITION#(1) = B#
C# = POSITION#(0) + POSITION#(1)

Table of Contents

Other manuals for Omron SYSMAC FH Series

Questions and Answers:

Question and Answer IconNeed help?

Do you have a question about the Omron SYSMAC FH Series and is the answer not in the manual?

Omron SYSMAC FH Series Specifications

General IconGeneral
BrandOmron
ModelSYSMAC FH Series
CategoryIndustrial Equipment
LanguageEnglish

Related product manuals