WWW.NNC.IR
Basic Knowledge For Macro Customize
Functions
205
5
Optimizing Scenes (Measurement Flows) (Macro Customize
Functions)
Vision System FH/FZ5 Series
User’s Manual (Z340)
Basic Method for Writing Programs
The macro customize functions of the FH/FZ5 series use an interpreter-type programming language. Unlike a
compiler-type language, programs can be created in an interpreter programming language without the need for
a special development environment to compile the program. In contrast to programming languages such as C,
you can create and run programs on the FH/FZ5 without a development environment.
The programming language that is used for the macro customize functions is based on BASIC, which is also an
interpreter-type programming language. The programming syntax of the macro customize functions is based on
the syntax of BASIC, with the addition of some specialized syntax.
The syntax required to create programs for the macro customize functions is explained in the following, starting
from basic syntax.
Basic Syntax
There are some rules which must be known as a minimum in order to create programs.
The examples below include the basic program syntax that is used in the macro customize functions.
Basic syntax examples
Necessity of referring
to this manual
Unit Macro
Communication
Command Macro
Scene Control
Macro
Unit Calculation
Macro
Required
*MEASUREDISPT
Rem Displays text in the Detail result pane.
DrawText "Judgment OK", 1, 0
Return
Types of syntax Description
Character
Alphabetical characters, numbers, symbols, and special marks can be used as characters.
Reference: XCharacter (p.206)
Line
A unit that is composed of a line number and a statement is called a line.
Reference: XLine (p.206)
Line number
The number that is automatically assigned to each line when a program is loaded in the FH/
FZ5 system is called a line number.
Reference: XLine number (p.206)
Statement
The program processing text written on each line is called a statement.
Reference: XStatement (p.207)
Label
A name assigned to a line in the program to enable identification is called a label.
Reference: XLabel (p.207)
Subroutine
A part of a program that is enclosed by <label> - Return is called a subroutine.
Reference: XSubroutine (p.207)
Comment
Text that follows a Rem function or a single quotation is called a comment.
Reference: XComment (p.207)