Common Rules For Macro - Omron FZ4 Series User Manual

Vision sensor
Table of Contents

Advertisement

Common rules for Macro

Grammar of program approximately conform basic BASIC grammar, it also contains part contents that
Macro program specially has.
Please see each item for details.
Reference:
Calculation (p.159)
Reference:
Character (p.160)
Reference:
Comment (p.161)
Reference:
Constant (p.161)
Reference:
Convert Type (p.161)
Reference:
Expression (p.161)
Reference:
Label (p.162)
Reference:
Line Number (p.162)
Reference:
Line (p.162)
Reference:
Reserved Word (p.162)
Reference:
Reserved Word List (p.163)
Reference:
Statement (p.166)
Reference:
Subroutine (p.166)
Reference:
Variable (p.166)
Reference:
Wildcard (p.168)
Calculation
Calculation can be divided into arithmetic calculation, relative calculation and logic calculation.
Arithmetic calculation includes four fundamental calculation, index calculation and getting-remainder
calculation. Following is various kinds of calculation.
Arithmetic
Calculation
+
Addition Calculation
-
Subtraction Calculation
*
Multiplication Calculation
/
Division Calculation
^
Exponent Calculation
Mod
Mod Calculation
Division 0 calculation will be wrong.
Do addition calculation, subtraction calculation and multiplication calculation. If result overstep -1.0e30
to 1.0e30, then it will be wrong.
Relative calculation is comparatively calculation of two numerical data or two character data. If
comparatively result is true, return -1, else return 0.
Following is all kinds of relative calculation.
Relative Calculation
=
<>, ><
<
>
<=, =<
>=, =>
FZ4 User's Manual
Calculation Content
Content
Equal
Not Equal
Less Than
More Than
Less Than or Equal
More Than or Equal
Example
Mathematics Expression
A+B
A+B
A-B
A-B
A × B or AB
A*B
A ÷ B or A/B
A/B
B
A^B
A
A-[A/B] × B
A mod B
[]is Gauss symbol
Example
A=B
A<>B, A><B
A<B
A>B
A<=B, A=<B
A>=B, A=>B
Using Custom Command
4
159

Advertisement

Table of Contents
loading

This manual is also suitable for:

Fz4 series

Table of Contents