![background image](http://html1.mh-extra.com/html/omron/fh-1-series/fh-1-series_user-manual_742686211.webp)
WWW.NNC.IR
Basic Knowledge For Macro Customize
Functions
209
5
Optimizing Scene
s (
M
ea
su
re
men
t Flo
w
s)
(M
acr
o
Custo
m
ize
Fu
ncti
ons)
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:
Naming 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)
Содержание fh-1 series
Страница 8: ...WWW NNC IR 6 Vision System FH FZ5 Series User s Manual Z340...
Страница 14: ...WWW NNC IR 12 Vision System FH FZ5 Series User s Manual Z340 MEMO...
Страница 22: ...WWW NNC IR 20 Vision System FH FZ5 Series User s Manual Z340 MEMO...
Страница 48: ...WWW NNC IR Initializing the Controller 46 Vision System FH FZ5 Series User s Manual Z340 MEMO...
Страница 68: ...WWW NNC IR Editing Scene Groups 66 Vision System FH FZ5 Series User s Manual Z340 MEMO...
Страница 132: ...WWW NNC IR Useful Functions for Operation 130 Vision System FH FZ5 Series User s Manual Z340 MEMO...
Страница 172: ...WWW NNC IR Saving Scene Groups in External Memory 170 Vision System FH FZ5 Series User s Manual Z340 MEMO...
Страница 254: ...WWW NNC IR Basic Knowledge For Macro Customize Functions 252 Vision System FH FZ5 Series User s Manual Z340 MEMO...
Страница 650: ...WWW NNC IR Macro Reference 648 Vision System FH FZ5 Series User s Manual Z340 Related Items None...
Страница 881: ...WWW NNC IR...