Omron FZ4 Series User Manual page 163

Vision sensor
Table of Contents

Advertisement

Comment
We can add the comment arbitrarily in the Macro program if necessary.
It is considered as comment from single quotation mark or rem command to the end of this line.
Constant
It can be classified to integer constant, double constant and character constant. The range of value is as
follows:
Integer Constant
Double Constant
Character Constant
Integer constant can be indicated by decimal, it also can be indicated by hexadecimal, octal and binary.
The method is as follows.
Hexadecimal:&h (Example:&hff,&h7fff)
Octal:&o (Example:&o77,&o3447)
Binary:&b (Example:&b1111,&b01100111)
In the "A&=&hff" condition, if we uselist command to show procedure, the result will be expressed using
decimal such as A&=255.
Convert Type
Calculate
When calculation between integer and double, integer is converted into double.
When doing logic calculation, all digits are operated as integer, and the result is integer.
When division calculation between integer, the result will be to round up to the nearest integer. Example:
A&=5/2
print A&
→ Result 3
Variable assignment
If double variable is endowed with integer, decimal digit part will discard four, but treat five as whole.
If integer variable is not endowed in -2147483648 to 2147483647, the result will be overflow error.
If double variable is not endowed in -1.0E30 to 1.0E30, the result will be overflow error.
Expression
The following contents are collectively called expression.
The expression is composed by numerical constant and numerical variable using calculation
sign.
The expression is composed by character constant and character variable using plus sign.
The expression only have constant.
The expression only have variable.
Function as so on.
The mathematical expression that return value is numerical.
Numerical constant, numerical variable and function of return value compose the mathematic expression
FZ4 User's Manual
-2147483648 to 2147483647
-1.0E30 to 1.0E30
255 Characters
Using Custom Command
4
161

Advertisement

Table of Contents
loading

This manual is also suitable for:

Fz4 series

Table of Contents