Constant - Omron SYSMAC FH Series User Manual

Vision sensor vision system
Hide thumbs Also See for SYSMAC FH Series:
Table of Contents

Advertisement

Constant

Among the values and character strings used in programming, a constant is a value that never changes and has
a unique assigned name.
Use constants for fixed numeric values and character strings that you want to use repeatedly in a program.
How to Use Constants
Constants are used as shown below.
(Example)
A& = 255
AA& = &h7f
B# = 3.14
C$ = "TEST STRING"
Constant Data Types
Constants that can be used in macro customize functions are shown below.
Constant type
Integer
Double precision
real number
Character string
Integer constants can be written in several bases, including decimal. Base notations that can be used in
macro customize functions are shown below.
Base
Decimal
Hexadecimal
Octal
Binary
Note
When a program that uses hexadecimal constants is displayed using the List function, the hexadecimal notation is
converted to decimal notation.
Example: When a program with "A& = &hff" is displayed using the List function, this is shown as "A& = 255".
208
Basic Knowledge For Macro Customize Functions
Description
Used for signed integer values.
Used for double precision type
real numbers.
Used for character strings.
Notation method
Not required
&h
&o
&b
Data range
-2147483648 to
4 bytes
2147483647
-1.0E30 to 1.0E30
8 bytes
Up to 255 characters
Max. 256 bytes
Example
100, 3456
100, 3456
&hff, &h7fff
(ff)
&o77, &o3447
(77)
&b1111, &b01100111
(1111)
WWW.NNC.IR
Number of bytes per data item
Mathematical notation
, (7fff)
16
16
, (3447)
8
8
, (01100111)
2
2
Vision System FH/FZ5 Series
User's Manual (Z340)

Advertisement

Table of Contents
loading

Table of Contents