F150-2 Vision Sensor Manual 3: EXPERT MENU

F150-2 Vision Sensor Manual 3: EXPERT MENU
Cat. No. Z134-E1-04
F150-2
Vision Sensor
Manual 3:
EXPERT MENU
OPERATION MANUAL
F150-2 Vision Sensor
Expert Menu Operation Manual
Revised May 2005
Notice:
OMRON products are manufactured for use according to proper procedures
by a qualified operator and only for the purposes described in this manual.
The following conventions are used to indicate and classify precautions in
this manual. Always heed the information provided with them. Failure to
heed precautions can result in injury to people or damage to property.
! DANGER
Indicates an imminently hazardous situation which, if not
avoided, will result in death or serious injury.
! WARNING Indicates a potentially hazardous situation which, if not
avoided, could result in death or serious injury.
! Caution
Indicates a potentially hazardous situation which, if not
avoided, may result in minor or moderate injury, or property
damage.
Visual Aids
The following headings will help you locate different types of information.
Note Indicates information of particular interest for efficient and convenient operation of the product.
Indicates pages where additional information can be found.
1 Indicates a procedure. The step numbers in the procedure
correspond to the numbers in any related illustrations.
 OMRON, 1999
All rights reserved. No part of this publication may be reproduced, stored in a retrieval system, or transmitted,
in any form, or by any means, mechanical, electronic, photocopying, recording, or otherwise, without the
prior written permission of OMRON.
No patent liability is assumed with respect to the use of the information contained herein. Moreover, because
OMRON is constantly striving to improve its high-quality products, the information contained in this manual is
subject to change without notice. Every precaution has been taken in the preparation of this manual. Nevertheless, OMRON assumes no responsibility for errors or omissions. Neither is any liability assumed for damages resulting from the use of the information contained in this publication.
iv
TABLE OF CONTENTS
PRECAUTIONS . . . . . . . . . . . . . . . . . . . . .
ix
1 Safety Precautions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
2 General Precautions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
x
xi
SECTION 1
The Expert Menu Mode . . . . . . . . . . . . . . .
1
1-1
1-2
1-3
1-4
Features . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Measurement Methods . . . . . . . . . . . . . . . . . . . . . . . .
Overview of F150 Installation and Operation . . . . . .
Input and Output . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
2
3
11
12
SECTION 2
Basic Operations . . . . . . . . . . . . . . . . . . . . .
13
2-1
2-2
2-3
Starting and Quitting . . . . . . . . . . . . . . . . . . . . . . . . .
Menu Operations . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Data Compatibility . . . . . . . . . . . . . . . . . . . . . . . . . . .
14
17
23
SECTION 3
Operating Procedures . . . . . . . . . . . . . . . . .
25
3-1
3-2
3-3
3-4
3-5
3-6
3-7
3-8
3-9
Adjusting Images . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Position Compensation . . . . . . . . . . . . . . . . . . . . . . . .
Measurement Regions . . . . . . . . . . . . . . . . . . . . . . . .
Output Expressions . . . . . . . . . . . . . . . . . . . . . . . . . . .
Monitor Mode . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Run Mode . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Changing Scenes . . . . . . . . . . . . . . . . . . . . . . . . . . . .
System Settings . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Saving to Flash Memory . . . . . . . . . . . . . . . . . . . . . .
26
39
56
86
96
102
103
106
120
SECTION 4
Terminal Block . . . . . . . . . . . . . . . . . . . . . .
123
4-1
4-2
4-3
I/O Formats . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Terminal Signal Operation and Timing . . . . . . . . . . .
Communications Settings . . . . . . . . . . . . . . . . . . . . . .
124
125
131
SECTION 5
RS-232C Normal Settings . . . . . . . . . . . . .
133
5-1
5-2
5-3
5-4
5-5
Communications Settings . . . . . . . . . . . . . . . . . . . . . .
Command List . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Input Format . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Input Commands . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Measurement Results Output Format . . . . . . . . . . . .
134
138
140
140
159
v
TABLE OF CONTENTS
SECTION 6
RS-232C Host Link Settings . . . . . . . . . . .
6-1
6-2
6-3
6-4
6-5
162
168
170
185
188
SECTION 7
CompoBus/D Settings . . . . . . . . . . . . . . . . .
193
7-1
7-2
7-3
7-4
7-5
7-6
vi
161
Communications Settings . . . . . . . . . . . . . . . . . . . . . .
Command Tables . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Input Format . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Output Format . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Sample Ladder Program . . . . . . . . . . . . . . . . . . . . . . .
Communications Settings . . . . . . . . . . . . . . . . . . . . . .
Input Format . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Output Format . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Timing Charts . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Allocation Charts . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Sample Ladder Program . . . . . . . . . . . . . . . . . . . . . . .
194
201
220
228
234
237
SECTION 8
RS-232C Menu Operation Settings . . . . . .
241
SECTION 9
Troubleshooting . . . . . . . . . . . . . . . . . . . . .
245
Index . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
249
Revision History . . . . . . . . . . . . . . . . . . . . .
255
About this Manual:
This manual describes the operation of the F150 Vision Sensor using the Expert Menu
and includes the sections described below. This is one of three manuals used to operate
the F150. Refer to the following table for the contents of each manual.
Manual
1: Setup
Manual
Contents
Provides information on system hardware and
installation. Be sure to read this manual first.
Cat. No.
Z132
2: Auto Menu Describes operation of the F150 using the Auto
Operation Menu. The Auto Menu enables the simplest
Manual
operation for OK/NG outputs based on registered
images of acceptable and unacceptable products.
Z133
3: Expert
Menu
Operation
Manual
Z134
Describes operation of the F150 using the Expert
Menu. The Expert Menu enables application of all
F150 capabilities, including setting region images
and criteria, and outputting judgement results and
data via the terminal block, RS-232C or
CompoBus/D.
Please read the above manuals carefully and be sure you understand the information
provided before attempting to install and operate the F150.
Section 1 The Expert Menu Mode outlines the features of the Expert Menu and explains
what can be achieved using it.
Section 2 Basic Operations describes the overall flow of F150 application and basic
operations.
Section 3 Operating Procedures describes how to operate the F150 using the Expert
Menu mode.
Section 4 Terminal Block describes the communications settings and I/O formats for
communications with external devices via the terminal blocks.
Section 5 RS-232C Normal Settings describes the communications settings for the
RS-232C port when communications are in Normal mode.
Section 6 RS-232C Host Link Settings describes the communications settings for the
RS-232C port when communications are in Host link mode.
Section 7 CompoBus/D Settings describes the communications settings required
when the F150 is used as a CompoBus/D Slave.
Section 8 RS-232C Menu Operation Settings describes the communications settings
for the RS-232C port when communications are in Menu operation mode.
Section 9 Troubleshooting lists the errors that may occur during F150 operation, along
with their probable causes and remedies.
! WARNING
Failure to read and understand the information provided in this
manual may result in personal injury or death, damage to the
product, or product failure. Please read each section in its
entirety and be sure you understand the information provided
in the section and related sections before attempting any of
the procedures or operations given.
vii
PRECAUTIONS
This section provides general precautions for using the F150 Vision Sensor.
The information contained in this section is important for the safe and reliable
application of the F150 Vision Sensor. You must read this section and understand the
information contained before attempting to set up or operate an F150 Vision Sensor.
1 Safety Precautions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
2 General Precautions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
x
xi
ix
1
PRECAUTIONS
1
Safety Precautions
! Caution Do not touch fluorescent or halogen lights while
the power is ON or immediately after the power is
turned OFF. These lights generate heat and can
cause burns.
! Caution Cover the terminal blocks with the Terminal Block
Protection Covers.
! Caution Use DC power supplies with safe extra low-voltage circuits on the secondary side for the main
F150 power supply and power supplies for the
terminal blocks.
! Caution Do not use the F150 in environments with flammable or explosive gases.
! Caution Install the F150 away from high-voltage equipment or motors to ensure safety during operation
and maintenance.
! Caution Use the power supply cables and crimp terminals
of specified sizes.
! Caution Use at the power supply voltages specified in this
manual.
! Caution Be sure to securely tighten the screws when
mounting F150 components.
! Caution Do not dismantle, repair or modify any F150 components.
! Caution Dispose of F150 components as industrial waste.
x
2
PRECAUTIONS
! Caution To prevent damage from static electricity, use a
wrist strap or another device for preventing electrostatic charges when touching terminals or connector signal lines.
! Caution Do not turn OFF the power while a message is
being displayed indicating that processing is
being performed. Data in memory will be
destroyed, and the F150 may not operate correctly the next time it is started.
2
General Precautions
The user must operate the product according to the performance
specifications described in the operation manuals.
Before using the product under conditions which are not
described in the manual or applying the product to nuclear control systems, railroad systems, aviation systems, vehicles, combustion systems, medical equipment, amusement machines,
safety equipment, and other systems, machines, and equipment
that may have a serious influence on lives and property if used
improperly, consult your OMRON representative.
Make sure that the ratings and performance characteristics of
the product are sufficient for the systems, machines, and equipment, and be sure to provide the systems, machines, and equipment with double safety mechanisms.
xi
SECTION 1
The Expert Menu Mode
This section outlines the features of the Expert Menu mode and explains what can be
achieved using it. The Expert Menu mode enables use of all the capabilities of the F150.
1-1
1-2
Features . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Measurement Methods . . . . . . . . . . . . . . . . . . . . . . . . .
1-2-1
1-2-2
1-2-3
1-2-4
1-2-5
1-2-6
1-2-7
1-3
1-4
2
3
Binary Center of Gravity and Area . . . . . . . . . . . .
Binary Center of Gravity and Axis Angle . . . . . . .
Gray Search and Precise Search . . . . . . . . . . . . . . .
Gray Edge Position . . . . . . . . . . . . . . . . . . . . . . . . .
Edge Pitch . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Surface Defect . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Menu Tree . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
3
4
5
6
7
8
10
Overview of F150 Installation and Operation . . . . . . .
Input and Output . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
11
12
1
Section 1-1
Features
1-1
Features
The F150 features supported by the Expert Menu mode are
described below.
Measurement Enhancement → p 28, 29
By emphasizing the edge of the measurement object and reducing noise, the F150 ensures effective object measurement.
Shutter Speed → p 27
The shutter speed can be selected to suit the speed of movement of the measurement object.
Position Displacement Compensation → p 39
Position displacement compensation can be used to correct the
position of the measurement object using gray search, binary
center of gravity and area, binary center of gravity and axis angle
or gray edge position.
Changing Scenes → p 103
Up to 16 different sets of measurement conditions can be set.
Each set of measurement conditions is called a “scene.” You can
switch scenes to automatically change the measurement conditions, e.g. to those for a different measurement object.
Seven Measurement Methods → p 3
Any of the following measurement methods can be used.
• Binary center of gravity and area
• Binary center of gravity and axis angle
• Gray search
• Precise search*
• Gray edge position*
• Edge pitch*
• Surface defect*
(Items marked with an asterisk indicate methods added for this
version.)
Measurement Images → p 111
Up to 23 measurement images are stored in memory for easy
confirmation of past images to see what problems have
occurred.
The images in memory are cleared when power is turned OFF or
the scene is changed. These images, however, can be backed
up to a computer.
2
Section 1-2
Measurement Methods
Calibration → p 30
The measurement value can be converted to physical units (e.g.,
cm or mm) and output to an external device.
Terminal Block, RS-232C Port, CompoBus/D → p 12, 86
The F150 can communicate with Programmable Controllers and
other external devices via terminal blocks, RS-232C port, or
CompoBus/D. Calculations can be performed on measurement
results, or math functions can be used to calculate the distance
between two regions or the maximum measurement results. The
external devices with which communications are supported, and
the formats for communications vary with the model.
1-2
Measurement Methods
1-2-1
Binary Center of Gravity and Area
This method is used to obtain the size and position of an object.
Density images with 256 gradations are read by the Camera.
These density images are separated into black pixels and white
pixels. The F150 uses the white pixels to measure the object.
Area
The area is the number of white pixels inside the measurement
region.
Measurement region
Number of white pixels = area
Note If the number of white pixels is the same as an acceptable product, the product will be accepted even if the shape is different. To
discriminate objects by shape, use either gray search or precise
search.
3
Measurement Methods
Center of
Gravity
Section 1-2
The center of gravity is calculated by regarding the white pixels
as a sheet of thick paper of uniform thickness. The center of gravity is the point at which the sheet of paper would balance when
placed on a sharp point. For example, the center of gravity for a
circular object would be the center of the circle. The center of
gravity of a rectangular object would be the intersection of lines
drawn from diagonally opposite corners.
The coordinates for the center of gravity are obtained. These
coordinates can be used for position displacement compensation.
1-2-2
Binary Center of Gravity and Axis Angle
In addition to the binary center of gravity and area calculations
described previously, an axis angle can also be calculated. This
method is used to obtain the orientation of an object. More processing time, however, is required to calculate the axis angle.
Use the binary center of gravity and area measurement method
unless alignment of the axis angle is required.
4
Section 1-2
Measurement Methods
Axis Angle
The axis angle is the angle of the major axis of an ellipse that is
diagrammatically equivalent to the area occupied by the white
pixels.
Measurement region
The coordinates for the center of gravity and the axis angle are
obtained. This data can be used for position displacement compensation.
1-2-3
Gray Search and Precise Search
Use gray search and precise search to inspect the shape of an
object.
1 An image pattern for a satisfactory product is registered in
advance. This is referred to as the model.
Model registered
5
Section 1-2
Measurement Methods
2 The part of the input image that most corresponds to the
model is found. The extent of conformity with the model is
expressed as a correlation value. A correlation value
between 0 and 100 is displayed. The higher the correlation
value, the more similar the input image is to the model. By
setting a threshold for this correlation value, OK (acceptable) and NG (unacceptable) products can be distinguished.
Search
Correlation value: 95
Search
Correlation value: 52
The correlation value is low because
part of the image is missing.
In addition to the correlation value, the coordinates of the position of the model can be obtained and used for position displacement compensation.
The level of precision with which the position is obtained, differs
between gray searches and precise searches.
• Gray Search
With gray searches, the position is obtained in pixel units.
• Precise Search
With precise searches, the position is obtained in sub-pixel
units (units smaller than pixels). The processing time for this
search method is longer than for a gray search.
1-2-4
Gray Edge Position
Use gray edge position to locate the edge of an object.
Set the search direction and the change in color for each region.
• Direction: select one from →, ←, ↑ or ↓.
• Color: select one from “Light → Dark,” “Dark → Light.”
6
Section 1-2
Measurement Methods
Example 1
To obtain the coordinate of this edge:
Measurement
region
Direction: →
Color: Light → Dark
This method can also be used for position displacement compensation.
Example 2
To calculate the position displacement
compensation required in the X direction.
To calculate the position displacement
compensation required in the Y direction.
1-2-5
Edge Pitch
Use edge pitch to find the number of objects. This method is useful when monitoring different models mixed together such as ICs
and connectors, and for distinguishing different types of model.
Width
Edge
Measurement region
Pitch (distance
between midpoints)
Number of objects
7
Section 1-2
Measurement Methods
1-2-6
Surface Defect
This method checks for surface defects by measuring variations
in density. The shape of the measurement region can be chosen
from arc, box, circumference, or line.
1 Small boxes are created in the measurement region. These
boxes are called “elements.” The density for each element
is calculated.
Element
Measurement
region
The size of the elements and the interval between
each one can be changed from the menu.
2 The difference in density between an element above and an
element to the left in the same row is calculated for each element. The larger of these intervals is the defect for the element.
Compared with element above.
Element
The larger of these two values
is the defect of element A.
Compared with element in same row.
3 The defect is calculated for all of the elements. If the largest
defect is larger than the evaluation criteria, the measurement region is judged to contain a defect. When deciding the
evaluation criteria, perform measurements of several samples and base the evaluation criteria on the defects for those
samples.
8
Measurement Methods
Section 1-2
Note Since inspection is performed by variations in density, if a design
or mark is contained inside the measurement region, this will be
detected as a defect. When inspecting an area containing a
design or mark, use a gray search or a precise search. The
image will be compared with the model, and the level of similarity
(the correlation) will be obtained.
9
Section 1-2
Measurement Methods
1-2-7
Scene
Menu Tree
Scene 0
to
Scene 15
→ p 103
Adjust
Shutter speed → p 27
Filtering → p. 28
BGS levels → p 29
Calibration → p 30
Position
compensation
Adjust
Region
Filtering → p 40
BGS levels → p 41
Region 0
Region 1
Gravity & area → p 41
Gravity & axis → p 41
Gray edge position → p 46
Set
mode
Direction → p 53
Measurement
region
Region
Region 0
to
Region 15
Gray search → p 48
Gravity & area → p 57
Gravity & axis → p 57
Gray edge position → p 66
Edge pitch → p 69
Gray search → p 72
Precise search → p 72
Defect (Arc)
Defect (Box)
Defect (Circum)
Output expression → p 86
Monitor mode → p 96
Defect (Line)
Run mode → p 102
System
Communications → p 131, 136, 166, 197, 242
Output → p 107
Backup → p 108
Display → p 111
Switch menu → p 117
Startup mode → p 117
Error method → p 119
Version → p 119
Save → p 120
10
→ p 80
Section 1-3
Overview of F150 Installation and Operation
1-3
Overview of F150 Installation and
Operation
The following table shows the basic steps that must be performed to use the F150.
Step
Manual
1: Unit Connections and Wiring
Programmable Controller
Setup Manual
Monitor
Power Supply
Console
Synchronous
sensor
IBM ProgramCamera with Light Source mable Controller/
AT or compatible
computer
2: Setting Measurement Conditions
Monitor
Easy Operation:
Auto Menu
Operation Manual
Advanced
Operation:
Expert Menu
Operation Manual
3: Confirming Operation, Measuring
Objects, and Outputting Results
IBM Programmable Controller/AT or compatible computer
Programmable
Controller
Monitor
Synchronous
sensor
11
Section 1-4
Input and Output
1-4
Input and Output
The kind of communications supported varies according to the
model as shown below.
Item
F150-C10E-2, F150-C15E-2
Connector for RS-232C
connections
External
communications
F150-C10E-2-DRT
Connector for RS-232C
connections
Terminal
block
Terminal
block
Connector for CompoBus/D
connections
Input
p
Console
Yes
Yes
Normal
Yes
Yes
Host
link
Yes
No
Terminal block
Yes
Yes (except DI0 to DI7)
CompoBus/D
No
Yes
Normal
Yes
Yes
Host
link
Yes
No
Terminal block
Yes
Yes (except DO0 to DO15)
CompoBus/D
No
Yes
RS232C
Output RS232C
12
SECTION 2
Basic Operations
This section describes the overall flow of F150 application and basic operations.
2-1
2-2
2-3
Starting and Quitting . . . . . . . . . . . . . . . . . . . . . . . . . .
14
2-1-1
2-1-2
Starting . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Quitting . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
14
15
Menu Operations . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
17
2-2-1
2-2-2
2-2-3
2-2-4
2-2-5
Input Devices . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Screen Displays . . . . . . . . . . . . . . . . . . . . . . . . . . .
Menu Tree . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Inputting Values . . . . . . . . . . . . . . . . . . . . . . . . . . .
Drawing a Region . . . . . . . . . . . . . . . . . . . . . . . . . .
17
18
20
21
22
Data Compatibility . . . . . . . . . . . . . . . . . . . . . . . . . . . .
23
13
Section 2-1
Starting and Quitting
2-1
Starting and Quitting
2-1-1
Starting
Use the following procedure to start up the F150.
1 Display the Basic Screen for Auto Menu.
2 Move the cursor to MON and press the ENT Key.
3 Select SYS.
4 Select Switch menu.
Switch menu
5 Move the cursor to Auto menu and press the ENT Key. A list
of options will be displayed.
14
Section 2-1
Starting and Quitting
6 Move the cursor to Expert menu and press the ENT Key.
7 Select End. The mode will change to the Expert Menu
mode. The screen from step 4 will be returned. Press the
ESC Key to return to the Basic Screen.
Note The startup scene and startup mode that appear when power is
turned ON can be set. Use these settings to make daily operation
more efficient once the F150 is ready for actual operation.
→ p 117
2-1-2
Quitting
Save all settings to flash memory before turning OFF the power.
The data in flash memory is loaded each time the F150 is started.
Any changes made will be lost unless they are saved to the flash
memory.
The measurement images and sample images in memory are
also cleared when the power is turned OFF. These images cannot be saved to flash memory, but they can be backed up on a
computer if required. → p 120
! Caution Do not turn OFF the power or input a RESET signal while a message is being displayed in any save or load operation. Data in
memory will be destroyed, and the F150 may not operate correctly the next time it is started.
1 Display the Basic Screen.
15
Section 2-1
Starting and Quitting
2 Move the cursor to MON and press the ENT Key.
3 Select SAVE.
4 A confirmation message will be displayed. Select Execute
to save any changes. When saving is completed, the screen
from step 1 will be returned.
5 Turn OFF the power to the F150.
16
Section 2-2
Menu Operations
2-2
Menu Operations
2-2-1
Input Devices
The menu operations are performed from either the Console or
the RS-232C.
Console
The Console is used to perform menu operations. Be sure to
familiarize yourself with Console operations before actually
using the menus.
TRIG (trigger) Key
ESC (escape) Key
ENT (enter) Key
Up, Down, Left,
and Right Keys
SHIFT Key
Key
Function
ESC: Escape Key
The function of this key varies with the screen displayed. The
function is displayed at the bottom of the screen.
When moving between menus, pressing this key interrupts
processing and returns the user to the previous menu display.
TRIG: Trigger Key
Starts object measurement.
ENT: Enter Key
Executes a function or sets a value.
Up and Down Keys
Used to move the cursor up and down to select items.
Also used to set values. The Up Key will increase a value by 1
and the Down Key will decrease a value by 1. Continue pressing
the Up or Down Key to quickly increase or decrease a value.
Left and Right Keys
Used to move the cursor left or right to select items.
SHIFT Key
Must be pressed in combination with another key to have any
effect. Specific functions are assigned to SHIFT + another key for
specific screens.
17
Section 2-2
Menu Operations
RS-232C
Operations equivalent to using the Console keys can be performed from RS-232C. Refer to Section 8 RS-232C Menu
Operation Settings to perform menu operations from RS-232C.
→ p 241
2-2-2
Screen Displays
The F150 is operated by selecting functions displayed on the
screen. Familiarize yourself with each function before operating
the F150.
Scene number
Mode
Key operations
Functions
Cursor
Scene
Number
18
Displayed image
The current scene number is given. There are 16 scenes that can
be created.
Section 2-2
Menu Operations
Mode
The current operating mode is displayed.
Display
Displayed
Image
Meaning
SET
Sets the measurement conditions.
MON
(Monitor)
Checks whether measurement is being performed
correctly under the set measurement conditions.
The measurement results are displayed on the
monitor only. The results cannot be output to
external devices.
RUN
Performs measurement. The measurement results
are output to an external device via a terminal
block or RS-232C.
SYS (System)
Sets system conditions for the F150.
SAVE
Saves data to flash memory. If new settings have
been made, be sure to save the data before
quitting.
The type of image being displayed is shown. → p 114
Display
Meaning
Through
The image taken by the Camera is displayed
directly.
Freeze
A still of the image taken by the Camera is
displayed.
...memoryjj
A previously measured image stored in memory is
displayed. With the F150, a maximum of 24 (0 to
23) measurement images can be stored in
memory.
Key
Operations
Displays special key combinations at the bottom of the screen
where available.
Functions
The available functions are displayed on the menus.
Cursor
The cursor is moved to the desired function by pressing the Cursor Keys.
19
Section 2-2
Menu Operations
2-2-3
Menu Tree
F150 menus are hierarchical. The cursor is moved to the
required functions to set measurement conditions. Use the following procedure to move around the menu tree.
1 Move the cursor to the desired function, using the Up,
Down, Left, and Right Cursor Keys.
2 Press the ENT Key. In this example, the cursor will move to
the Adjust menu. Repeat this step to move to lower levels.
3 Press the ESC Key. The display will move to the previous
menu level (here, the screen shown in step 1).
20
Section 2-2
Menu Operations
2-2-4
Inputting Values
This section explains how to input numerical values when setting
measurement conditions.
Specifying a Digit for Input Values
This procedure is mainly used for setting judgement conditions
and system conditions.
1 Move the cursor to the item for which a value is to be
changed and press the ENT Key. The cursor size will
change to a cursor the size of a single digit.
2 Using the Left and Right Keys, move the cursor to the digit
to be changed.
[ 2000.000: 0002300.000]
3 Use the Up and Down Keys to change the value. (Repeat
steps 2 and 3 to change other digits as required.)
[ 2000.000: 0002500.000]
4 Press the ENT Key when all digits have been changed as
desired. The value will be set.
[ 2000.000:
2500.000]
21
Section 2-2
Menu Operations
Increasing/Decreasing a Value
This procedure is used when setting the binary level and the
background suppression level.
1 Move the cursor to the item for which a value is to be
changed.
2 Use the Left and Right Keys to change the value. Press the
Right Key to increase the value by one. Press the Left Key
to decrease the value by one. Use together with the SHIFT
Key to increase/decrease by ten.
3 Move the cursor to another item. The value will be set.
2-2-5
Drawing a Region
Use the following method to draw model regions and measurement regions. Create the required shape by moving the cursor
with the Up, Down, Left and Right Keys. Use in together with the
SHIFT Key to move the cursor quickly.
Types of Region
Type of region
Drawing method
Box
Specify 2 opposite corners.
Ellipse
Specify 2 opposite corners for the circumscribed rectangle
of the ellipse.
Circle
Specify the center and the radius.
Circumference
Specify the center, radius, and thickness.
Polygon
Specify up to 10 neighboring vertices. At the last point,
press the ENT Key twice and the last point will be joined to
the first point and the region will be drawn.
22
Section 2-3
Data Compatibility
The type and number of regions that can be drawn, depend on
the measurement method.
Drawing Mode
Drawing
mode
Function
OR
Use this mode to draw a shape as a model or
measurement region.
NOT
Use to delete part of a region.
Example: Relationship between region number and drawing mode
Region 1 (draw with OR)
Region 2 (draw with NOT)
2-3
Region 2 (draw with OR)
Region 1 (draw with NOT)
Data Compatibility
Expert Menu (Version 1.jj)
Scene and system data for version 1.jj is not compatible with
this version and cannot be used. It is necessary to make new
data settings.
Auto Menu (Version 2.1j)
After setting measurement conditions in Auto Menu mode (version 2.1j), these conditions can be checked and adjusted by
switching the F150 to Expert Menu mode.
! Caution If the Auto Menu mode is re-entered and automatic registration is
executed, the Expert Menu settings will be cleared. Only the
shutter speed, filtering, and background suppression settings
will remain.
23
SECTION 3
Operating Procedures
This section describes how to operate the F150 using the Expert Menu mode.
3-1
3-2
Adjusting Images . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
26
3-1-1
3-1-2
3-1-3
3-1-4
Shutter Speed . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Filtering . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Background Suppression . . . . . . . . . . . . . . . . . . . .
Output Calibration . . . . . . . . . . . . . . . . . . . . . . . . .
27
28
29
30
Position Compensation . . . . . . . . . . . . . . . . . . . . . . . . .
39
3-2-1
Adjusting the Image for
Easier Position Displacement Compensation . . . . .
Setting Region for
Position Displacement Compensation . . . . . . . . . .
Selecting the Direction for
Position Displacement Compensation . . . . . . . . . .
41
Measurement Regions . . . . . . . . . . . . . . . . . . . . . . . . .
56
3-3-1
3-3-2
3-3-3
3-3-4
3-3-5
3-3-6
57
66
69
72
80
85
3-2-2
3-2-3
3-3
3-4
3-5
3-6
3-7
3-8
3-9
Binary Center of Gravity and Area and Axis Angle
Gray Edge Position . . . . . . . . . . . . . . . . . . . . . . . . .
Edge Pitch . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Gray Search and Precise Search . . . . . . . . . . . . . . .
Surface Defect . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Changing Settings and Clearing . . . . . . . . . . . . . . .
40
53
Output Expressions . . . . . . . . . . . . . . . . . . . . . . . . . . .
Monitor Mode . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Run Mode . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Changing Scenes . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
System Settings . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
86
96
102
103
106
3-8-1
3-8-2
3-8-3
3-8-4
3-8-5
3-8-6
3-8-7
3-8-8
System Menu . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Measurement Result Output Destinations . . . . . . .
Saving/Loading System and Scene Data . . . . . . . .
Measurement Screen Settings . . . . . . . . . . . . . . . .
Switching Menus . . . . . . . . . . . . . . . . . . . . . . . . . .
Startup Scene and Mode . . . . . . . . . . . . . . . . . . . . .
Selecting Output Method for Error Terminal . . . . .
Checking the Software Version . . . . . . . . . . . . . . .
106
107
108
111
117
117
119
119
Saving to Flash Memory . . . . . . . . . . . . . . . . . . . . . . .
120
25
Section 3-1
Adjusting Images
3-1
Adjusting Images
The following functions are available for image adjustment:
• Shutter speed: Sets the shutter speed for object movement/illumination.
• Image filtering: Prepares the Camera image for easier measurement.
• Background suppression: Deletes the background pattern for
easier measurement.
• Calibration: Outputs the measurement result in physical units,
such as mm.
Entering Set Mode
To set the measurement conditions, it is first necessary to enter
Set mode.
Procedure
1 Display the Basic Screen, move the cursor to MON, and
press the ENT Key.
26
Section 3-1
Adjusting Images
2 Select SET. The Set Mode Screen will be displayed.
3-1-1
Shutter Speed
Change the shutter speed when the object is moving quickly,
causing the image to be blurred.
Object movement
Slow
Fast
Shutter speed
1/100 s
1/500 s
1/2000 (*) s
1/10000 s
* Default setting
Procedure
1 Go to Adjust/Shutter speed.
2 Select the shutter speed while monitoring the image.
27
Section 3-1
Adjusting Images
3 Press the ENT Key to enter the setting.
3-1-2
Filtering
The image read by the Camera can be manipulated to create an
image that is easier to measure, by using smoothing or edge
enhancement.
Smoothing displays a smoothed image with reduced noise.
Smoothing allows suppression of the effects of uneven lighting
due to an uneven or damaged surface.
Edge enhancement displays an image with enhanced edges
between bright and dark regions to compensate for blurred
images.
The cursor can be moved on the image to see the effects of filtering.
Filtering method
Function
OFF
No filtering.
Smoothing
Displays a smooth image with reduced noise.
Select either weak or strong smoothing.
Enhance edges
Displays an image with enhanced edges
between bright and dark regions.
Extract edges
Displays an image with the edges between the
bright and dark regions extracted.
Note The filtering set here is used for object measurement. Filtering
can be set separately for position displacement compensation.
→ p 40
Procedure
1 Go to Adjust/Filtering.
2 Select the filtering method while monitoring the image.
28
Section 3-1
Adjusting Images
3 Press the ENT Key to enter the setting.
3-1-3
Background Suppression
Background suppression (BGS) excludes the background of the
measurement object from the measurement process.
BGS changes image areas with densities below the lower limit to
0, and image areas with densities above the upper limit to 255.
Image areas with densities between the lower and upper limits
are graded from 0 to 255 so that only images with densities
between the lower and upper limits are measured.
Look at the image and set the upper and lower limits of the density to eliminate the background.
Example
Lower limit: 150
Measurement object
Upper limit: 255
Density
Image areas with densities of 149 or lower
will not be measured and the density will
be changed to 0.
Only image areas with densities between
150 and 255 will be measured. The whole
image is graded from 0 to 255.
Background
Background density (cut)
Note The BGS levels set here are used for object measurement. BGS
levels can be set separately for position displacement compensation. → p 41
Procedure
1 Go to Adjust/BGS levels.
29
Section 3-1
Adjusting Images
2 Move the cursor to the upper-limit value and use the Left
and Right Keys to decrease or increase the value. Press
the Right Key to increase the smallest digit by 1 (use with
SHIFT Key to increase by 10). Press the Left Key to
decrease the smallest digit by 1 (use with SHIFT Key to
decrease by 10).
3 Repeat the previous step to change the lower limit.
4 Select OK to exit this screen.
2
3
4
3-1-4
Output Calibration
Calibration can be set to output the measurement results in
physical units, such as mm.
Set the relationship between the physical coordinates and the
camera coordinates to convert the measurement results from
pixels to physical units, such as µm, mm, or cm.
If calibration data is not set, the default settings will remain, and
measurements using the camera coordinates will be output.
Default Settings
• Coordinate system: Left-handed system
• Origin: Upper left corner of screen
• Magnification: 1.000
30
Section 3-1
Adjusting Images
• Unit: mm/pix
Origin
F150 screen
(Camera coordinates)
484 mm
(= 484 pixels)
512 mm
(= 512 pixels)
There are 2 settings for calibration: “Sampling” and “Parameter
input.”
Sampling
Register a model, and perform a sample measurement. Enter
the physical coordinates of the position of the model. The calibration will be calculated automatically. Sample measurements can
be made in up to 3 places.
• When the magnifications are the same for the X and the Y
directions, make sample measurements in 2 places only.
31
Section 3-1
Adjusting Images
• When the magnifications in the X and Y directions are different,
perform sampling measurement in 3 places.
Procedure
1 Go to Adjust/Calibration.
2 Select Model registration.
2
4
32
Adjusting Images
Section 3-1
3 Register the model image to be used for sampling.
4 Select Sampling.
5 Draw the sampling region. Press the SHIFT + ENT Keys to
display the screen for changing the size and position of the
region.
33
Adjusting Images
Section 3-1
6 Press the TRIG Key to execute sampling. A cross and a
frame will appear at the position where the model is found,
and the screen for inputting the physical coordinates will be
displayed.
7 Enter the physical coordinates of the center of the model
(the position of the cross) and select End. The screen from
step 5 will be returned.
If a mistake is made, press the SHIFT + ESC Keys and
repeat the previous sampling operation.
By repeating steps 5 to 7, make samples for the required
number of places.
• When making samples in 2 places, press the ESC Key
after the second sampling. A registration confirmation
message will be displayed.
• When making samples in 3 places, a registration confirmation message will be displayed after the third sampling.
34
Section 3-1
Adjusting Images
8 Select Execute.
Parameter Input
Use the following procedure to directly input parameters to be
used for calibration.
• Origin
Specify the physical coordinates for the position of the origin as
desired.
Upper-left corner of screen
Center of screen
Lower-left corner of screen
35
Section 3-1
Adjusting Images
• Coordinate System
Select the coordinate system for the physical coordinates.
Left-handed System
Origin upper left
Positive
direction
Positive
direction
Origin
center
Origin lower left
Positive
direction
Right-handed System
Origin upper left
Positive
direction
Positive
direction
Positive
direction
Origin
center
Origin lower left
• Magnification and Units
Set the physical unit that will correspond to one pixel. Set a
value in the range 0.010 to 9.999 for the magnification. Choose
a unit from µm, mm, or cm.
F150 screen
Camera
200 pixels
20 mm
The magnification is 20(mm)÷200(pixels)=0.1(mm/pix).
In other words, 1 pixel in camera coordinates will correspond to 0.1 mm in physical units. In the menu, pixel is
represented by “pix.”
36
Adjusting Images
Section 3-1
Procedure
1 Go to Adjust/Calibration/Parameter input.
2 Set the items.
3 Select End to exit this screen.
37
Section 3-1
Adjusting Images
Reference Parameters
This screen is used to check data settings.
The symbol, σ, represents the error standard deviation. It is the standard deviation value of the
difference between the physical coordinates input for calibration settings and the coordinates
after conversion based on the calculated conversion values A to F. It is calculated according to
the following formula:
s+
Ǹ
N
[ S ((RXi * XȀi) 2 ) (RYi * YȀi) 2)ńN]
i+1
(RXi,RYi): Physical coordinates input for calibration settings (i=1 to N).
(X’i,Y’i): Physical coordinates after conversion according to the conversion values (i=1 to N).
N: Data number (sampling places 1 to 3)
A to F represent the calibration
conversion values. The camera
coordinates are converted to physical units based on these calibration
conversion values. The formulae
for conversion to physical units are
as follows:
X’ = A × X + B × Y + C
Y’ = D × X + E × Y + F
(X,Y): measurement position
(camera coordinates),
unit: pixels
Indicates physical width (in X direction) of screen.
(X’,Y’): conversion position
(physical coordinates),
units: mm
“em” indicates the maximum error.
It is the largest value of the differences between the physical coordinates input for
calibration settings and the coordinates after conversion based on the calculated
conversion values A to F. It is calculated according to the following formula:
em + MAX Ǹ((RXi–XȀi) 2 ) (RYi–YȀi) 2)
MAX: Outputs the largest value of the expression for values (i = 1 to N).
(RXi,RYi): Physical coordinates input for calibration settings (i = 1 to N).
(X’i,Y’i): Physical coordinates obtained after conversion based on the conversion values (i = 1 to N).
N: Data number (sampling places 1 to 3)
Procedure
1 Go to Adjust/Calibration/Reference parameters.
The parameters will be displayed.
2 Select OK to exit this screen.
38
Position Compensation
3-2
Section 3-2
Position Compensation
The following functions are available for position compensation:
• Adjust: Adjusts images to make position displacement compensation easier.
• Region: Sets the regions and methods used for position displacement compensation:
Gravity and area.
Gravity and axis angle
Gray edge position
Gray search
Change/clear settings
• Direction: Sets the direction for position displacement compensation.
The position displacement compensation function is used when
the position and orientation of measurement objects are not consistent. By using this function, the displacement between the reference position and the current position is obtained, and this displacement is compensated for in measurements.
Reference Position
Measurement region
39
Position Compensation
Section 3-2
Measurement Object Displaced
Without compensation, measurement is performed with
“A” outside the measurement
region.
If position displacement compensation has been set, the image
will be scrolled the displaced distance (i.e.: to the reference position), and measurement will be performed.
Measurement is performed
with “A” inside the measurement region.
(When the display is set to “Through,” the frame of the measurement region will be moved the displaced distance.)
3-2-1
Adjusting the Image for Easier Position
Displacement Compensation
Filtering
A different kind of filtering is used for position displacement compensation to that used for ordinary measurement.
• For measurement: Smoothing is used to reduce noise.
40
Section 3-2
Position Compensation
• For position displacement compensation: Edges are
enhanced to make the shape of the measurement object
clearer.
The operating procedure, however, is the same as for ordinary
measurement. → p.28
Background Suppression
A different level of background suppression is used for position
displacement compensation to that used for ordinary measurement. The operating procedure, however, is the same as for ordinary measurement. → p.29
3-2-2
Setting Region for Position Displacement
Compensation
The following operation is possible from the screen for selecting
the region number.
Press the SHIFT + ESC Keys to reverse (dark ↔
clear) the background.
Press the SHIFT Key together with the Up/
Down Key to switch display images.
→ p. 114
Note Be sure to set the compensation direction after drawing the position displacement compensation region. Position displacement
compensation will not be executed just by drawing the region.
Binary Center of Gravity and Area, Binary Center of Gravity
and Axis Angle
Images taken by the Camera are made up of 256 gradations.
Binary processing is the process whereby these images are
divided into black pixels (0) and white pixels (1). The F150 performs measurements on the areas occupied by white pixels.
41
Section 3-2
Position Compensation
Binary Center of Gravity and Area
The center of gravity of the areas occupied by the white pixels is
calculated and the displacement between this and the reference
center of gravity is calculated.
Reference center of gravity
X displacement
Y displacement
Center of gravity of input image
Binary Center of Gravity and Axis Angle
The center of gravity and the axis angle of the area occupied by
the white pixels is obtained, and the displacements between
these values and those for the model are calculated.
Reference center of gravity
Angle displacement θ.
X displacement
Y displacement
Center of gravity of input image
Operational Flow
1 Set the binary level.
2 Draw the region.
3 Set the evaluation criteria.
42
Position Compensation
1
Section 3-2
Setting the Binary Level
Set the level for conversion of 256-gradation images into binary
images. The F150 performs measurement for the white areas.
Therefore, make the settings so that the areas for which the center of gravity or the axis angle are desired are white.
The procedure is the same as for ordinary measurement.
→ p. 59
Correct
Incorrect
Make the measurement
object white.
2
Drawing the Region
The center of gravity, or the center of gravity and the axis angle
for the white area contained inside the measurement region are
obtained. Make a region of a size and position that allows for
movement of the range of the measurement object. When drawing of the region has been completed, the center of gravity and
the axis angle (when set to find binary center of gravity and axis
angle) will be measured. This position will be taken as the reference. Therefore, draw the region after putting the measurement
object in a position where the part to be measured lies totally
inside the screen.
43
Section 3-2
Position Compensation
The procedure is the same as for ordinary measurement.
→ p. 61
Figure number
Coordinates of arrow cursor
Up to 3 figures can be combined
to produce 1 region.
3
Setting Evaluation Criteria
It is necessary to set evaluation criteria for position displacement
compensation in order to evaluate whether the measurement
object is contained within the field of view at the time of measurement.
The procedure is the same as for ordinary measurement.
→ p. 63
Judgement of Position Displacement Compensation and
Subsequent Measurement
Judgement
44
Processing
OK
Measurement is performed after position
displacement compensation.
NG
Measurement is performed without position
displacement compensation. Output to the OR
terminal is NG, irrespective of measurement result.
Section 3-2
Position Compensation
Examples
• Area
If the area is too small, position
displacement compensation
will not be performed. The
judgement will be NG.
• X Center of Gravity, Y Center of Gravity
Movement range for an OK judgement.
Position compensation performed.
If the center of gravity is outside the
range, position compensation will
not be performed. The judgement
will be NG.
45
Section 3-2
Position Compensation
• Axis Angle
Measurement value for
axis angle: 10.000
Measurement value for
axis angle: –10.000
If this range is to be
judged OK, set to
“–10.000: 10.000.”
Gray Edge Position
Edges are identified by changes in the density within the region.
The search direction and color change for edge detection can be
set for each region.
When calculating the displacement
in the X direction.
Direction: →
Color: Light → Dark
When calculating the displacement in
the Y direction.
Direction: ↑
Color: Light → Dark
Operational Flow
1 Draw the region.
2 Set the edge detection conditions and the evaluation criteria.
46
Section 3-2
Position Compensation
1
Drawing the Region
Draw the position displacement compensation region so as to
include the edge. Draw one box for each region. When drawing
of the regions has been completed, the edge positions will be
measured. These positions will be taken as the reference positions. Therefore, draw the regions after placing the measurement object in a position where the part to be measured lies
totally inside the screen.
The procedure is the same as for ordinary measurement.
→ p. 66
Correct
Incorrect
For edge detection
in Y direction.
For edge detection in X direction.
If the edge is not in the displacement region, edge
detection will not be possible. Make a region of a size
and position that allows for movement of the range of
the measurement object.
2
Setting Edge Detection Conditions and Evaluation Criteria
Set the conditions and evaluation criteria required to search for
an edge.
The procedure is the same as for ordinary measurement.
→ p. 68
47
Section 3-2
Position Compensation
Judgement of Position Displacement and Subsequent Measurement
Judgement
Processing
OK
Measurement is performed after position
displacement compensation.
NG
Measurement is performed without position
displacement compensation. Output to the OR
terminal is NG, irrespective of measurement result.
Unless a difference in density that is greater
than the set level is detected, position displacement compensation will not be performed. The judgement will be NG.
Gray Search
Register an image pattern (the “model”) in advance. The part of
an input image that is most similar to the model is found, and the
displacement of its position from that of the reference position is
obtained.
Model:
X displacement
Reference position (position of
model)
Y displacement
Input image
48
Section 3-2
Position Compensation
Operational Flow
1 Register the model.
2 Set the range in which a search is to be made for the model.
3 Set the evaluation criteria.
4 Change pixel-skipping parameter.
(This step is optional.)
1
Registering a Model
A characteristic part of the measurement image, such as a mark
or corner, is registered as a model. The model can be of any size.
The registered position will be taken as the reference. Therefore,
register the model after putting the measurement object in a
position where the part to be registered lies totally inside the
screen.
The procedure is the same as for ordinary measurement.
→ p. 73
Correct
Incorrect
Model
(Up to 3 figures can be combined to produce 1 region.)
Figure number
[0]
394,378
Position the measurement object so
that the part to be registered is in the
center of the screen.
[0]
394,378
A part to be registered lies
outside the screen.
49
Section 3-2
Position Compensation
2
Setting the Search Region
Set the region for which the model is to be searched for. It is possible to perform a search for the entire input image but processing time can be reduced and accuracy can be increased by setting limits on the search range.
The procedure is the same as for ordinary measurement.
→ p. 75
The model is displayed with a solid line.
Search region
The search range is
displayed with a
dotted line.
3
Setting Evaluation Criteria
If the correlation value with the model is low, the wrong place may
be found. In order to judge whether the model for position displacement compensation has been correctly identified, it is necessary to set evaluation criteria.
The procedure is the same as for ordinary measurement.
→ p. 77
50
Section 3-2
Position Compensation
Judgement of Position Displacement and Subsequent Measurement
Judgement
Processing
OK
Measurement is performed after position
displacement compensation.
NG
Measurement is performed without position
displacement compensation. Output to the OR
terminal is NG, irrespective of measurement result.
Movement range for OK judgement.
Position displacement compensation is not performed
because correlation value is low.
Judgement is NG.
Position displacement compensation is not performed
because search position is NG.
Judgement is NG.
4
Changing Pixel-skipping Parameter (Optional)
The pixel-skipping parameter for searching for the model can be
changed. The pixel-skipping parameter is determined according
to the speed setting in the evaluation conditions menu. However,
from this screen it is also possible to change the pixel-skipping
parameter directly.
By making the value larger, the processing time can be reduced.
However, the accuracy of the search will be reduced, and
depending on the image, the object may not be found. After
changing the settings, check whether measurement and search
are performed properly. If a new model is registered, the pixelskipping parameter will change according to the model. In this
case, it is necessary to remake the settings.
51
Section 3-2
Position Compensation
The procedure is the same as for ordinary measurement.
→ p. 78
Set how many pixels to skip when searching.
X pixel-skipping parameter
Y pixel-skipping parameter
Changing Settings and Clearing
The set data can be changed or cleared.
Procedure
1 Move the cursor to the number of the region to be changed
or cleared and press the ENT Key. The selection Change
settings/Clear will be displayed.
1
52
Section 3-2
Position Compensation
2 To change settings select Change settings. The items that
can be changed will be displayed.
2
3
3 To clear all the settings, select Clear. A confirmation message will be displayed. Select Execute to clear the settings
and exit this screen.
3-2-3
Selecting the Direction for Position
Displacement Compensation
Select the direction in which position displacement compensation is performed. Reference values for compensation can be set
for the X direction, Y direction, or θ direction regardless of
whether compensation is performed or not.
X, Y directions
θ direction
For binary center of
gravity and axis
angle only.
53
Section 3-2
Position Compensation
Midpoint, Relative Angle of 2 Regions
Position displacement compensation is performed using the
coordinates of the center of gravity (midpoint) and the angle (relative angle) of the line joining 2 regions. The relative angle is
expressed in the range 0 to 360° with the X axis taking a value of
0° and the direction from the X axis to the Y axis as positive.
Position
compensation region 0
Relative angle
of both regions
Midpoint of both regions
54
Position
compensation region 1
Section 3-2
Position Compensation
Examples:
Position
compensation region 0
(gray search)
Position
compensation region 0
(gray search)
X: position compensation region 0
Y: position compensation region 0
θ: none
X: midpoint of 2 regions
Y: midpoint of 2 regions
θ: Relative angle of 2
regions
Position compensation
region 1 (gray search)
Position compensation
region 0 (binary
center of gravity
and axis angle)
X: position compensation
region 0
Y: position compensation
region 0
θ: position compensation
region 0
Position
compensation region 0
(gray edge
position)
X: position compensation
region 0
Y: position compensation
region 1
θ: none
Position compensation region 1
(gray edge position)
55
Measurement Regions
Section 3-3
Procedure
1 Go to Position compensation/Direction.
2 Select reference values for X, Y, and θ.
3 Select End to exit this screen.
3-3
Measurement Regions
The following measurement methods are available for the measurement regions:
• Binary center of gravity and area
• Binary center of gravity and axis angle
• Gray edge position
• Edge pitch
• Gray search
• Precise search (high-precision gray search)
• Surface defect (measurement regions: arc, box, circum, line)
• Change/clear settings
There are 16 measurement regions, and a different measurement method can be set for each region.
56
Section 3-3
Measurement Regions
The following operation is possible from the screen for selecting
the region number.
Press the SHIFT + ESC Keys to reverse
(dark ↔ clear) the background.
Press the SHIFT Key together with
the Up/Down Keys to switch the display image. → p. 114
3-3-1
Binary Center of Gravity and Area and Axis
Angle
Images taken by the Camera are made up of 256 gradations. To
obtain the binary center of gravity and the area, or the binary center of gravity and the axis angle, these images are converted into
binary images. This conversion involves dividing the image into
black pixels (0) and white pixels (1). The F150 performs measurements on the areas occupied by white pixels.
57
Section 3-3
Measurement Regions
Binary Center of Gravity and Area
The area and the center of gravity of the area occupied by the
white pixels is obtained.
Measurement region
Center of gravity for parts occupied by white pixels
Area of parts occupied by white
pixels
Binary Center of Gravity and Axis Angle
The area, center of gravity, and axis angle of the area occupied
by the white pixels are obtained. The processing time will be
longer than the processing time to obtain the binary center of
gravity and area by the time taken to obtain the axis angle.
Measurement region
Axis angle for the parts occupied
by the white pixels
Center of gravity for the parts
occupied by the white pixels
Area for parts occupied by the
white pixels
58
Measurement Regions
Section 3-3
Operational Flow
1 Set the binary level.
2 Draw the measurement region
3 Set the evaluation criteria.
1
Setting the Binary Level
Set the level for conversion of 256-gradation images into binary
images. The F150 performs measurements on the white areas.
Therefore, set the binary level so that the measurement object is
represented by white pixels.
Procedure
1 Go to Measurement region/<Region number>/Gravity &
area (or Gravity & axis).
2 Select Binary.
2
3 Move the cursor to the upper limit and change the value as
desired using the Left and Right Keys. Press the Right Key
to increase the smallest digit by 1 (use with SHIFT Key to
increase by 10). Press the Left Key to decrease the smallest digit by 1 (use with SHIFT Key to decrease by 10).
4 Change the lower limit in the same way.
59
Section 3-3
Measurement Regions
5 Select OK to enter the settings and exit this screen. The
screen from step 2 will be returned.
Set so that the measurement object
will be represented by white pixels.
Lower limit
Upper limit
3
4
5
Select Reverse to reverse dark and clear in the
display.
If Auto is selected, the F150 will automatically
determine a binary level.
Note It is also possible to set the binary level so that measurement is
performed only for an intermediate density range. However, it is
not possible to reverse this range and perform measurement for
densities excluding this range.
Correct
White (object for measurement)
Density
Black
60
Incorrect
Section 3-3
Measurement Regions
2
Drawing the Measurement Region
Regions can be created by combining up to 3 different figures.
Procedure
1 Select Region.
1
2 Select New.
3 Select the shape of the desired figure.
4 Select the desired drawing mode (OR/NOT).
Figure number
2
3
4
5 Draw the region with the shape selected.
61
Measurement Regions
Section 3-3
6 If additional figures are to be drawn, select Add. Repeat
steps 3 to 5 as necessary to create the desired shape.
Figure number
6
If the figure drawn (in this
case figure 0) is selected,
the selections Correct/
Clear will be displayed. Use
the Up and Down Keys to
change the selected figure.
7 If the drawing for the region is finished, press the ESC Key
while in the screen for step 6. The measurement region will
be registered and the screen in step 1 will be returned. The
cursor arrow will be displayed at the position of the center of
gravity.
62
Measurement Regions
3
Section 3-3
Setting the Evaluation Criteria
Make settings for the area, center of gravity, and axis angle.
Binary Center of Gravity and Area
Area range for an OK judgement.
(0 to 9,999,999.999)
Range of movement of the measurement object in the X direction
for an OK judgement.
(–9,999.999 to 9,999.999)
Range of movement of the measurement object in the Y direction
for an OK judgement.
(–9,999.999 to 9,999.999)
Measurement result for the displayed
image (after calibration).
Use this value as a reference for setting
upper and lower limits.
The center of gravity must be
between the lower and upper limits
for an OK judgement.
The area should be between the
lower and upper limits for an OK
judgement.
63
Section 3-3
Measurement Regions
Binary Center of Gravity and Axis Angle
Area range for OK judgement.
(0 to 9,999,999.999)
Range of movement of the measurement object in the X direction for an
OK judgement.
(–9,999.999 to 9,999.999)
Range of movement of the measurement object in the Y direction for an
OK judgement.
(–9,999.999 to 9,999.999)
Measurement result for the displayed
image (after calibration).
Use this value as a reference for setting
upper and lower limits.
Rotation range of the measurement
object for an OK judgement. (Range:
–180.000 to 180.000. However, only
values in the range –90.000 to
90.000 will be output.)
The axis angle must be between the lower and
upper limits for an OK judgement.
The center of gravity must be between the lower
and upper limits for an OK judgement.
The area must be between the lower and upper
limits for an OK judgement.
64
Section 3-3
Measurement Regions
• Axis Angle
Measurement value for axis
angle: 10.000
Measurement value for axis
angle: –10.000
If this range is to be judged
OK, set to “–10.000:
10.000.”
Procedure
1 Select Conditions.
1
2 Set the items.
3 Select End to enter the settings and exit this screen.
The screen for step 1 will be returned.
65
Section 3-3
Measurement Regions
3-3-2
Gray Edge Position
Edges are identified by changes in the density within the measurement region. The search direction and color change for
edge detection can be set for each region.
Example: When the coordinates of
this edge are required
Measurement
region
Direction: →
Color: Light → Dark
Operational Flow
1 Draw the measurement region.
2 Set the edge detection conditions and the evaluation criteria.
1
Drawing the Measurement Region
Draw the measurement region so as to include the edge.
Correct
Incorrect
For edge detection in
Y direction.
For edge detection in X direction.
If the edge is not in the measurement region, edge detection will
not be possible. Make a region of a size and position that allows
for movement of the range of the measurement object.
66
Measurement Regions
Section 3-3
Procedure
1 Go to Measurement region/<Region Number>/Gray edge
position.
2 Select Region.
2
3 Draw a box-shaped measurement region. The screen for
step 2 will be returned.
67
Section 3-3
Measurement Regions
2
Setting Edge Detection Conditions and Evaluation Criteria
Set the conditions necessary for finding an edge, and the evaluation criteria.
Edge detection direction (↑, ↓, →, ←)
Edge color change
(Light → Dark, Dark → Light)
Edge position range for an OK
judgement
(–9,999.999 to 9,999.999)
Measurement result for the displayed image (after calibration).
If ↑ or ↓ are selected, the Y coordinate
value will be output.
If ← or → are selected, the X coordinate value
will be output.
(The origin and coordinate system will differ according to the calibration settings.)
Set the level of density change for identification as an edge. (0 to 100)
The default setting of 50% will be appropriate in most cases. If edges are not detected for this
default setting, however, adjust accordingly. For example, if edges are incorrectly detected
because of noise, set the level to a higher value.
Edges are detected in the following way:
1. The density distribution for the entire measurement range is obtained.
2. The range from the smallest density value to the largest is calibrated to a range of 0% to
100%.
3. Places where the change in density is above the set density level are detected as edges.
Maximum density value
Measurement
region (example)
Edge level
Smallest density value
68
Section 3-3
Measurement Regions
Procedure
1 Select Conditions.
1
2 Set the items.
3 Select End to exit this screen. The screen for step 1 will be
returned.
3-3-3
Edge Pitch
Use the following procedure to find edges through density variations and obtain the number of objects, width, and pitch.
Width
Edge
Measurement
region
Pitch (distance
between midpoints)
Number of objects
Operational Flow
1 Draw the measurement region.
2 Set the edge detection conditions and the evaluation criteria.
69
Section 3-3
Measurement Regions
1
Drawing the Measurement Region
Draw the measurement region so as to include all of the measurement objects.
(Example 1)
(Example 2)
Measurement
region
Edges are detected in the direction of the
long side of the measurement region.
Procedure
1 Go to Measurement region/<Region number>/Edge
pitch.
2 Select Region.
2
3 Draw a box-shaped measurement region. The screen for
step 2 will be returned.
70
Section 3-3
Measurement Regions
2
Setting Edge Detection Conditions and Evaluation Criteria
Set the conditions necessary for finding an edge, and the evaluation criteria.
Color of objects to be counted (White/
Black)
Minimum level: For prevention of incorrect detection due to noise (0 to 255). (If
the density variation is less than this
value, it will be considered to be noise.)
Range of number of objects for an OK
judgement (0 to 255)
Average pitch range for an OK judgement (0 to 9,999.999)
Press the Down Key to display the setting menu for the average width range
(0 to 9,999.999)
Measurement result for the displayed image
The values for average pitch and average width are values after calibration.
Threshold value for finding an edge (0 to 100).
If the measured number of objects is less than the actual number of objects, set the edge level (or the minimum
level) to a smaller value. If the measured number of objects is greater than the actual number of objects, set the
edge level (or the minimum level) to a larger value.
Edges are detected in the following way:
1. The density differentials for the entire measurement range are obtained.
2. The maximums and minimums that satisfy the edge level setting are detected as edges.
Measurement region
Edge level
Edge level
One object counted
71
Section 3-3
Measurement Regions
Procedure
1 Select Conditions.
2 Set the items.
1
3 Select End to enter the settings and exit this screen. The
screen for step 1 will be returned.
3-3-4
Gray Search and Precise Search
Register an image pattern (the “model”) in advance. The part of
an input image that is most similar to the model is found, and the
degree of similarity is expressed with a correlation value. Perform processing directly on the density image taken by the Camera.
Model
Search
Gray Search
With a gray search, the position is obtained in pixel units.
72
Measurement Regions
Section 3-3
Precise Search
With a precise search, the position is obtained in sub-pixel
(smaller than a pixel) units. The processing time is longer than
that for gray search.
Operational Flow
1 Register the model
2 Set the range in which a search is to be made for the model.
3 Set the evaluation criteria.
4 Change pixel-skipping parameter.
(This step is optional.)
1
Registering the Model
The area of the image to be inspected is registered as a model.
The model can be of any size.
Procedure
1 Go to Measurement region/<Region number>/Gray
search (either item).
2 Select Model registration.
2
3 Select New.
4 Select the shape of the figure to be drawn.
73
Section 3-3
Measurement Regions
5 Select the drawing mode (OR/NOT).
Figure number
Draw figure
3
New
4
Box
Ellipse OR
Circle
NOT
Circum
Polygon
5
6 Draw the figure in the range desired as the model.
7 If additional figures are to be drawn, select Add. Repeat
steps 4 to 6 as necessary to create the desired shape.
Figure number
Draw figure
7
Add
If the figure drawn (in this case figure 0)
is selected, the selection Correct/Clear
will be displayed. Use the Up and Down
Keys to change the selected figure.
8 If the drawing for the region is finished, press the ESC Key
while in the screen for step 7. The arrow cursor will be displayed.
74
Section 3-3
Measurement Regions
9 Move the arrow cursor to the point whose coordinates are to
be output as the search position, and press the ENT Key.
The screen for step 2 will be returned.
Draw figure
Move the arrow cursor to the point
whose coordinates are to be output.
2
Setting the Search Region
Set the region for which the model is to be searched for. It is possible to perform a search for the entire input image but processing time can be reduced and accuracy can be increased by setting limits on the search range.
The model is displayed with a solid line.
Search region
The search range is displayed
with a dotted line.
75
Measurement Regions
Section 3-3
Procedure
1 Select Search region.
1
2 Draw a box-shaped search region. When the coordinates of
the lower right corner are specified, the region will be registered, and the screen for step 1 will be returned.
Search region
Specify the coordinates of the upperleft hand corner.
Specify the coordinates of the lowerright hand corner.
76
Section 3-3
Measurement Regions
3
Setting Evaluation Criteria
Evaluation criteria are set for the correlation with the model and
the coordinates where the model is found.
Correlation value range for an OK judgement
(0 to 100)
Range of movement of the measurement
object in the X direction for an OK judgement.
(–9,999.999 to 9,999.999)
Range of movement of the measurement
object in the Y direction for an OK judgement.
(–9,999.999 to 9,999.999)
Search speed
LOW
1
2
3
HIGH
Slow
Fast
Measurement result for the displayed image (after calibration).
Use this value as a reference for setting upper and lower limits.
X, Y Coordinates:
Correlation:
When the correlation criteria is 70 to 100.
Image Image
0
1
Correlation:
Judgement:
Image
2
Image
3
Range of movement in X direction for an OK judgement.
Range of movement
in Y direction for an
OK judgement.
77
Section 3-3
Measurement Regions
Procedure
1 Select Conditions.
1
2 Set the items.
3 Select End to enter the settings and to exit this screen. The
screen for step 1 will be returned.
4
Changing Pixel-skipping Parameter (Optional)
The pixel-skipping parameter for searching for the model can be
changed. The pixel-skipping parameter is determined according
to the speed setting in the evaluation conditions menu. However,
from this screen it is also possible to change the pixel-skipping
parameter directly.
By making the value larger, the processing time can be reduced.
However, the accuracy of the search will be reduced, and
depending on the image, the object may not be found. After
changing the settings, check whether measurement and search
are performed properly. If a new model is registered, the pixelskipping parameter will change according to the model. In this
case, it is necessary to remake the settings.
X pixel-skipping parameter
Y pixel-skipping parameter
78
Set how many pixels to skip
when searching.
Measurement Regions
Section 3-3
Procedure
1 Press the SHIFT + ESC Keys with the screen in this state.
The screen for setting the pixel-skipping parameter will be
displayed.
2 Change the pixel-skipping parameters for X and Y as
desired.
Set in the range 2 to 15.
79
Measurement Regions
Section 3-3
3 Select End. The estimated search time for a search based
on the set pixel-skipping parameters will be displayed.
This is the estimated search time
for the region number currently
selected. The search time for one
scene will be displayed in the
upper-right corner of the screen
when measurement is actually
performed in Monitor mode or Run
mode.
4 Select OK to enter the settings and to exit this screen.
3-3-5
Surface Defect
Surface defects in the measurement region are checked for
through variations in density.
Operational Flow
1 Draw the measurement region.
2 Set the surface defect detection conditions and the evaluation criteria.
80
Section 3-3
Measurement Regions
1
Drawing the Measurement Region
Choose the shape of the measurement region from arc, box, circumference, or line.
Arc
Specify start angle, end angle, radius
and width.
Box
Specify 2 opposite corners.
Width
Radius
End angle
Start angle
Circumference
Specify center, radius and width.
Width
Line
Specify start point, end point and
width.
Width
Radius
Start point
End point
Center
Note
1. Do not include areas with marks and designs in the measurement region. It will not be possible to distinguish them
from surface detects, and measurement will not be performed properly.
2. The following kinds of arcs can not be drawn.
• Arcs whose center lies outside of the screen.
• Arcs with a radius of more than 483 pixels.
81
Measurement Regions
Section 3-3
Procedure
1 Go to Measurement region/<Region number>/Defect( ).
2 Select Region.
2
3 Draw the measurement region. The measurement region
will be registered and the screen for step number 2 will be
returned.
82
Section 3-3
Measurement Regions
2
Setting Surface Defect Detection Conditions and Evaluation Criteria
When the measurement region has been drawn, small boxes will
be created inside the measurement region. These boxes are
called “elements.” The density for each element is calculated,
and this density is compared with the density of the elements
around it. The degree of density dispersion is used to detect surface defects. The detection conditions “Element size” and
“Compare pitch” (the number of elements between a given element and the element it is compared with) can be set.
Defect Calculation Method
Element
Measurement region
Compared with element above
Element
The larger of these two values is
the defect of element A.
Compared with element in same row
The defect is calculated for all of the elements. If the largest defect is larger than
the evaluation criteria, the measurement region is judged to contain a defect.
When deciding the evaluation criteria, perform measurements of several samples and base the evaluation criteria on the defects for those samples.
Element Size and Compare Pitch
Element size
Compare pitch
83
Section 3-3
Measurement Regions
Condition Setting Screen
Scn
)
4 to 80 (default setting: 10)
1 to 6 (default setting: 1)
Defect evaluation criteria. If the
defect exceeds this value the
judgement will be NG. (0 to 255)
If the largest and smallest density
values in the inspected region lie
within the lower and upper limits,
the judgement will be OK. (0 to
255)
Measurement results for the displayed image.
Use these values as a reference for setting upper and lower limits.
Procedure
1 Select Conditions.
2
2 Set the items.
3 Select End to enter the settings and to exit this screen. The
screen for step 1 will be returned.
84
Section 3-3
Measurement Regions
3-3-6
Changing Settings and Clearing
The set data can be changed or cleared.
Procedure
1 Move the cursor to the number to be changed or cleared and
press the ENT Key. The selection Change settings/Clear
will be displayed.
1
2 To change settings select Change settings. The selections
for items that can be changed will be displayed.
2
3
3 To clear all the settings select Clear. A confirmation message will be displayed. Select Execute to clear all the settings and to exit this screen.
85
Section 3-4
Output Expressions
3-4
Output Expressions
This section explains how to set the contents of output made to
external devices via the terminal block, RS-232C, or CompoBus/D.
Even without setting output expressions, the judgement of the
drawn region will be output to the OR terminal of the terminal
block or OR control output of CompoBus/D.
Judgement
• The judgement for each region can be output.
• Calculations can be performed for the measurement results for
each region and OK/NG judgements can be given for the
results of the calculations.
Output number
16 expressions can be set in
judgement outputs 0 to 15
Expression
Calculation result for displayed
image.
Refer to this when setting evaluation
criteria.
Evaluation criteria
Set evaluation conditions for the calculation result.
(-9,999,999.999 to 9,999,999.999)
86
Section 3-4
Output Expressions
Data
• Measurement results can be output.
• Calculation results can be output.
Output number
Eight expressions can be set in
data outputs 0 to 7.
Expression
Calculation result for displayed
image.
Note The destinations for judgement and data outputs are as follows:
Vision Sensor
Judgement output
destination
Data output
destination
F150-C10E-2
F150-C15E-2
Terminal block
RS-232C
F150-C10E-2-DRT
CompoBus/D
CompoBus/D or
RS-232C
When using the F150-C10E-2-DRT, select either CompoBus/D
or RS-232C as the destination for data output in SYS/Output.
→ p. 107
87
Section 3-4
Output Expressions
Possible Settings
Region numbers. (R0 to R15: measurement regions, P0 to P1: position compensation regions)
The sub-menu displayed next will depend on the measurement item.
Functions
Calculations can be performed using values
from other expressions.
If this item is selected, a list of output numbers will be displayed. Use this feature when
a long expression that will not fit between the
parentheses is required.
Confirm expressions.
Delete item.
DEL: Deletes the item on the left of the cursor.
BS: Deletes the item on the right of the cursor.
Numbers in the range 0 to 999.999 can be set.
Use to move the cursor.
Sub-menus Displayed when R0 to 15, P0 to 1 are Selected
Center of Gravity and Area, Center of Gravity and Axis
Angle
Item
88
Explanation
Judge JG
Judgement result
Gravity X
X coordinate of measured center of gravity
Gravity Y
Y coordinate of measured center of gravity
Reference RX
X coordinate of reference center of gravity
Reference RY
Y coordinate of reference center of gravity
Displacement DX
Measured X coordinate of center of gravity –
reference X coordinate of center of gravity
Displacement DY
Measured Y coordinate of center of gravity –
reference Y coordinate of center of gravity
Area MA
Area of measured object
Reference area RM
Area when region drawn
Differential area DM
Measured area – reference area
Inverted area VM
Area of measurement region – measured
area
Axis angle AG (see
note)
Axis angle of measured object
Reference axis RA
(see note)
Axis angle when region drawn
Differential angle DA
(see note)
Measured axis angle – reference axis angle
Section 3-4
Output Expressions
Note Axis angle, reference axis, and differential angle are only displayed when a region with center of gravity and axis angle has
been selected.
Gray Edge Position
Item
Explanation
Judge JG
Judgement result
Edge EG
Coordinate of measured edge position
Reference RE
Coordinate when region drawn
Displacement DE
Coordinate of measured edge position –
reference edge position
Gray Search, Precise Search
Item
Explanation
Judge JG
Judgement result
Search X
Measured X coordinate
Search Y
Measured Y coordinate
Reference RX
Reference X coordinate
Reference RY
Reference Y coordinate
Displacement DX
Measured X coordinate – reference X
coordinate
Displacement DY
Measured Y coordinate – reference Y
coordinate
Correlation CR
Correlation with model
Surface Defect
Item
Explanation
Judge JG
Judgement result
Defect F
Measured defect
Density MAX GA
Greatest density value inside measurement
region
Density MIN GI
Smallest density value inside measurement
region
Edge Pitch
Item
Explanation
Judge JG
Judgement result
Numbers N
Number of detected objects
Pitch AVG P
Average pitch of detected edges
Pitch MAX PH
Maximum pitch of detected edges
Pitch MIN PL
Minimum pitch of detected edges
Width AVG W
Average width of detected edges
Width MAX WH
Maximum width of detected edges
Width MIN WL
Minimum width of detected edges
89
Section 3-4
Output Expressions
JG
If “JG” is set as a judgement output expression, judgement will be
performed in the following two stages.
1 Judgement is performed for each region based on the set
evaluation criteria giving a result of “0.000” (OK) or “–1.000”
(NG).
2 Judgement is performed on the judgement result (i.e.: 0.000
or –1.000), based on the upper and lower limits in the screen
for the output.
Example: Judgement results for R0 are output as “Judge 0.”
0.000: OK, –1.000: NG
Judgement is performed
according to the evaluation
criteria set when R0 was
drawn.
Evaluation
criteria
for
R0.JG
In order that only the value
0.000 is judged OK, set both
the upper and lower limits to
0.000.
If “JG” is set as a data output expression, only the judgement
described in 1 above will be performed. The result of this judgement (OK: 0.000, NG: –1.000) will be directly output to the external device.
90
Section 3-4
Output Expressions
Example
To obtain an OR judgement for regions 0 and 1:
If the upper and lower limits are both set to 0.000,
one of the following judgements will be made:
• If both regions receive OK judgement, the measurement result
will be 0.000, so the overall judgement will be OK
• If one region receives OK judgement, the measurement result
will be –1.000, so the overall judgement will be NG.
• If both regions receive OK judgement, the measurement result
will be –2.000, so the overall judgement will be NG.
Functions
Function
ABS
Meaning
Gives the absolute value.
Arguments
1
ABS(argument)
MAX
Gives the larger of two arguments.
2
MAX(argument 1, argument 2)
MIN
Gives the smaller of two arguments.
2
MIN(argument 1, argument 2)
SQRT
Calculates the square root. If the argument is negative, the
calculation result will be 0 and the judgement will be NG.
1
SQRT(argument)
91
Section 3-4
Output Expressions
Function
ANGL
Meaning
Calculates the angle between a straight line joining two points,
such as the center of gravity or the center of a model, and a
horizontal line. The result will be in the range –180 to 180°.
Arguments
2
Horizontal line
First point
Second point
ANGL(Y component, X component)
• Example:
Set the following to calculate the angle between the straight line
joining the center of gravity for region 0 and the center of gravity for region 1 and a horizontal line.
ANGL(R1.Y–R0.Y,R1.X–R0.X)
If both arguments are 0, the result will also be 0 and the
judgement will be NG.
ATAN
Calculates the arc tangent for the Y component/X component.
The result is given as a radian of –π to π.
2
ATAN(Y component, X component)
• Example:
Set the following to calculate the angle between a straight line
joining the center of gravity for region 0 and the center of gravity
for region 1 and a horizontal line.
ATAN(R1.Y–R0.Y,R1.X–R0.X)
If both arguments are 0, the calculation result will also be 0 and
the judgement will be NG.
DIST
Calculates the distance between two points, such as the center of
gravity and the center of the model.
4
DIST(X coordinate of first point, Y coordinate of first point,
X coordinate of second point, Y coordinate of second point)
• Example:
Set the following to calculate the distance between the center of
gravity for region 0 and center of gravity for region 1.
DIST(R0.X,R0.Y,R1.X,R1.Y)
• The following calculation is performed internally.
Ǹ(R1.X * R0.X) 2 ) (R1.Y * R0.Y)2
Judgement Expressions and Data Expressions
It is possible to perform calculations using measurement results
from other expressions. Use this feature when a long expression
that will not fit between the parentheses is required. These values are displayed as “PR.0” to “PR.15” for Judge 0 to 15, and as
“RS.0” to “RS.7” for Data 0 to 7.
92
Section 3-4
Output Expressions
Example 1: To obtain the length of the straight line joining 2 points and
add 120.25
Region 0
Region 1
Divide the calculations into Judge 0 and Judge 1 in the following way:
Judge 0
[DIST(R0.X,R0.Y,R1.X,R1.Y) ] The constant 120.25 cannot be entered because
there is not enough space.
Judge 1
[PR.0+120.25
] Add 120.25 to the calculation result of Judge 0.
PR.0 represents the calculation result of Judge 0
Note Only use expressions containing PR.j or RS.j for outputs of a
higher number. Calculations are performed in the following
order. If PR.j or RS.j are used in expressions for outputs with a
lower number, the previous calculation result will be used.
Data 0
Data 1
to
Data 7
Judge 0
Judge 1
to
Judge 15
If example 1 had been constructed in the opposite order:
Judge 0
[PR.1+120.25
] This will be calculated
before Judge 1 and so the previous value for PR.1 will be used
instead.
Judge 1
[DIST(R0.X,R0.Y,R1.X,R1.Y)
]
93
Section 3-4
Output Expressions
Example 2: To output the number of measurements
In this case a value is to be output so use a data output expression.
Data 0
[RS.0+1
]
Each time the Set mode is entered or the power is turned OFF,
the value of RS.0 will return to 0 along with the number of measurements.
Procedure
1 Go to Expression/Judge or Expression/Data. The screen
for selecting output numbers will be displayed.
0.R0.JG
1.R1.JG
2.R0.X+R1.
3.
4.
5.
6.
7.
↑↓
Expressions will be displayed for
outputs that have been set.
If the expression is long, only the
first part will be displayed.
2 Select the output number for which the expression is to be
set.
3 Move the cursor into the space between the parentheses for
the expression and press the ENT Key. The list of possible
settings will be displayed.
Example: If Judge is selected.
Judge0.
[
]
4 Select the item.
Example
Press the
ENT Key.
Select the item.
94
The selected item will be
entered in the expression.
Section 3-4
Output Expressions
5 When the expression has been set, select OK. The expression will be registered.
6 For judgement output, set the OK/NG evaluation criteria.
The calculation result for the displayed image will be displayed.
Set the upper and lower limits.
7 Press the ESC Key to exit this screen. The setting will be
saved and the screen for step 1 will be returned.
95
Section 3-5
Monitor Mode
3-5
Monitor Mode
This section explains how to check if measurements are being
correctly performed using the set measurement conditions.
Measurements are performed using the conditions set for the
displayed image. Measurement commands can be input via the
terminal block, RS-232C, or CompoBus/D, but the measurement results cannot be output to an external device. They can
only be confirmed on-screen.
Measurement time
Overall Judgement
(NG if there is an NG in one or
more measurement regions or
output expressions.)
Press the SHIFT Key together with the Up/Down
Keys to switch display image. → p. 114
Procedure
1 Go into Monitor mode.
Select MON.
2 Press the TRIG Key on the Console, or input the measurement command from an external device. The measurement
will be performed, and the measurement result will be displayed on the screen.
96
Section 3-5
Monitor Mode
Note To save measured images to memory, go to Display settings by
pressing the SHIFT + ESC Keys, and change the settings for
Image storage. → p 111
To perform measurement for the freeze image or memory image
currently displayed, press the SHIFT + TRIG Keys and the measurement result will be displayed.
Displaying Measurement Results on the Screen
The data that is displayed on the screen can be changed. Also,
the evaluation criteria can be adjusted while referring to measurement results.
Go to Display settings by pressing the SHIFT + ESC Keys, and
change the settings for Display result. → p. 111
None
If Display result is set to None, only the overall judgement will
be displayed.
Freeze
SFT+ESC:Display
97
Section 3-5
Monitor Mode
Position Compensation
The results for position displacement compensation can be displayed. There are 3 screens: one for position compensation
region 0, one for position compensation region 1, and one for displacement distance. Use the Up and Down Keys to switch
between the screens. The image displayed is the image after filtering and background suppression for position displacement
compensation.
Position compensation region 0, 1
Displacement
distance
(difference
between the reference position and the
measurement position)
The arrow cursor is at
the measurement position.
Position compensation
region is displayed.
Scn 0BMONB
Scn 0BMONB
Position compensation
Position compensation
0.Gray search
Distance
Judge: OK
Correlation: 85
Position X: 202.000
Position Y: 245.000
Freeze
SFT+ESC:Display ↑↓:Item
If the SHIFT + ENT Keys are pressed from
the screen for the individual region, the
screen for changing conditions will be displayed, and the evaluation criteria can be
changed while monitoring the measurement values. However, even if a trigger or a
STEP signal is input, measurement will not
be performed while this screen is displayed.
98
Freeze
SFT+ESC:Display ↑↓:Item
If the judgement for position displacement compensation is NG, the screen
will not be scrolled and so all of these
values will be 0.
Section 3-5
Monitor Mode
All Results of Regions
Judgement results for all the regions are displayed in one list.
Scn 0BMONB
All results of regions
Press the SHIFT + Left/Right Keys
to change the brightness of the
background (dark ↔ clear).
Freeze
SFT+ESC:Display
All Positions of Regions
Outlines of all the set measurement regions are displayed.
Scn 0BMONB
All positions of regions
Freeze
SFT+ESC:Display
99
Section 3-5
Monitor Mode
Individual Region
The measurement values for each region are displayed separately. If the SHIFT + ENT Keys are pressed from this screen, the
screen for changing conditions will be displayed, and the evaluation criteria can be changed while monitoring the measurement
values. However, even if a trigger or a STEP signal is input, measurement will not be performed while this screen is displayed.
Scn 0BMONB
Individual region
0.Gray search
Switch regions with the Up/Down
Keys.
Judge: NG
Correlation: 45
Position X: 202.000
Position Y: 256.000
Inverted display is used for NG
items.
Freeze
SFT+ESC:Display ↑↓:Region
All Judges
Judgement results for the judgement output expressions are displayed in one list.
Scn 0BMONB
All judges
Pressing SHIFT + Left/Right Keys
to change the brightness of the
background (dark ↔ clear).
Freeze
SFT+ESC:Display
100
Section 3-5
Monitor Mode
All Data
Measurement results for the data output expressions are displayed in one list.
Scn 0BMONB
All data
Pressing SHIFT + Left/Right Keys
to change the brightness of the
background (dark ↔ clear).
Freeze
SFT+ESC:Display
Individual Judge, Individual Data
Calculation results for the each of the output expressions are displayed individually. If the SHIFT + ENT Keys are pressed from
this screen, the screen for changing conditions will be displayed,
and the evaluation criteria can be changed while monitoring the
calculation results. However, even if a trigger or a STEP signal is
input, measurement will not be performed while this screen is
displayed.
Scn 0BMONB
Individual judge
Judge0.
Switch the displayed item using the
Up/Down Keys.
Individual judge (0 to 15)
Individual data (0 to 7)
Expression:
R0.JG-R1.X
Measurement:24.652
Freeze
SFT+ESC:Display ↑↓:Change
101
Section 3-6
Run Mode
3-6
Run Mode
Measurements are performed according to the conditions set for
the current scene.
The measurement results will also be output to an external
device.
Measurement time
Overall Judgement
(NG if there is an NG in one or
more measurement regions or
output expressions.)
Press the SHIFT Key together with the Up/Down
Keys to switch display image → p. 114
Procedure
1 Go into Run mode.
Select RUN.
2 Press the TRIG Key on the Console or input the measurement command from an external device. Measurement will
be performed and the measurement results will be displayed on the screen. Also, the measurement results will be
output to the external device. In addition to the Run command, it is possible to input various other commands from
an external device.
Input Commands
Via the Terminal Block → p 124
Via the RS-232C Port, Normal Communications → p 159
Via the RS-232C Port, Host Link Communications → p 168
102
Changing Scenes
Section 3-7
Via CompoBus/D → p 201
Output Formats
Via the Terminal Block → p 125
Via the RS-232C Port, Normal Communications → p 159
Via the RS-232C Port, Host Link Communications → p 185
Via CompoBus/D → p 220
Note To save measured images to memory, go to Display settings by
pressing the SHIFT + ESC Keys, and change the settings for
Image storage. → p 111
To perform measurement for the freeze image or memory image
currently displayed, press the SHIFT + TRIG Keys and the measurement result will be displayed.
To display measurement results on the screen, go to Display
settings by pressing the SHIFT + ESC Keys. For further details,
refer to the section on Monitor mode. → p 97
! Caution The lighting will become progressively darker if used for long
periods. Make periodic adjustments to the evaluation criteria.
The lighting will lose approximately 20% illumination after
1,500 hours of use.
3-7
Changing Scenes
All the settings for measurement conditions are input under
“scenes.” Up to 16 scenes can be set, numbered from 0 to 15
(see note). Scenes can be changed to switch between different
measurement conditions for different measurement setups or
measurement objects. Scene 0 will be displayed by default when
the power is turned ON.
Note It may not be possible to use all 16 scenes if there is a lack of
available memory. In this case, a warning message will be displayed on the screen. Make regions and models as small as possible and delete any regions and models that are not required,
before continuing operation.
103
Section 3-7
Changing Scenes
Procedure
1 Display the basic screen.
2 Move the cursor to Scn 0 and press the ENT Key. A list of
scenes, from scene 0 to scene 8, will be displayed. Use the
Down Key to scroll down and display the rest of the list, from
scene 9 to scene 15.
The default setting is for
scene 0 to be displayed
when the power is turned
ON.
3 Using the Up and Down Keys, move the cursor to the
desired scene and press the ENT Key. The selected scene
will be displayed. After the scene has been selected, the
mode will return to the original one.
104
Section 3-7
Changing Scenes
Copying Scene Data
Procedure
1 Move the cursor to the scene number to which data is to be
copied, and press the SHIFT + ESC Keys. The Copy/Clear
selection menu will be displayed.
2 Select Copy.
3 Enter the number of the scene from which data is to be
copied (Original scene), and select Execute. The data will
be copied.
Clearing Scene Data
Procedure
1 Move the cursor to the number of the scene to be cleared,
and press the SHIFT + ESC Keys. The Copy/Clear selection menu will be displayed.
2 Select Clear. A confirmation message will be displayed.
3 Select Execute. The scene will be cleared.
105
Section 3-8
System Settings
3-8
System Settings
The following system settings are available for the F150:
• Communications: Used to make settings necessary for communications with an external device. → p. 131, 136, 166,
197, 242
• Output: Used to select the output destination for measurement
results.
• Backup: Used to make backup to a computer.
• Display: Used to make settings related to measurement
screens.
• Switch menu: Used to change menus.
• Startup mode: Used to set the startup scene and startup mode.
• Error method: Used to select the output method for error terminals.
• Version: Used to display the system version.
3-8-1
System Menu
1 Display the basic screen.
2 Move the cursor to MON and press the ENT Key.
106
Section 3-8
System Settings
3 Select SYS. The system menu will be displayed.
3-8-2
Measurement Result Output Destinations
The F150 can output judgements and data for measured objects
to an external device. Select the destination for judgment output
and data output. With the F150-C10E-2-DRT, judgement output
is restricted to CompoBus/D, so settings are only required for
data output. With the F150-C10E-2 or F150-C15E-2, judgement
output is restricted to the terminal block and data output is
restricted to RS-232C, so no settings are required.
Output destination
Output
p item
F150-C10E-2-DRT
F150-C10E-2
F150-C15E-2
Judgement
CompoBus/D
Terminal block
Data
CompoBus/D or
RS-232C
RS-232C
Note Set the contents for the outputs in Expression. → p. 86
Procedure
1 Go to SYS/Output.
2 Select the output destinations.
107
Section 3-8
System Settings
3 Select End to enter the settings and to exit this screen.
F150-C10E-2-DRT
3-8-3
F150-C10E-2, F150-C15E-2
Saving/Loading System and Scene Data
The system and scene data can be backed up on a computer.
The same data can also be loaded from a computer to the F150.
Saving and loading data enables using the same data on other
F150 Controllers.
It is recommended that data is backed up in case data is lost or
the F150 malfunctions.
Data
Contents
System data
Settings for communications, output
destinations, screens, switching menus,
startup mode, and error output method.
Scene data
Settings for image adjustment, position
compensation, measurement regions, and
expressions.
System data and
scene data
Both the system data and scene data (0 to
15) together.
Image data
Memory images in BMP format. This is the
basic image format for Windows and so the
images can be displayed on a personal
computer.
Note Data is saved from the F150 to a computer, and loaded to the
F150 from a computer.
! Caution Do not turn OFF the power or input a RESET signal while a message is being displayed in any save or load operations. Data in
memory will be destroyed, and the F150 may not operate correctly the next time it is started.
Procedure
1 Go to SYS/Backup.
108
Section 3-8
System Settings
2 Select the kind of data to be loaded/saved.
3 Select Load or Save as required.
4 For scene data or image data, select the corresponding
number.
Scene number (0 to 15)
Image data (Mem 0 to 23)
5 A confirmation message will be displayed. Select Execute.
As an example, when saving system data the following
message will be displayed:
Sample Operation for Personal Computer
As an example, this section explains how to perform data transfers using HyperTerminal on Windows 95/98 or Windows NT 4.0.
It is assumed that an RS-232C cable is connected to COM1 on
the personal computer. If the COM number is different, adapt the
procedure accordingly. If different communications software is to
be used, refer to the relevant manual for that software. Data communications are performed according to Xmodem (-CRC or SUM) protocol.
! Caution Do not turn OFF the power or input a RESET signal while a message is being displayed in any save or load operations. Data in
memory will be destroyed, and the F150 may not operate correctly the next time it is started.
109
Section 3-8
System Settings
Saving Data to the Computer
1 Connect the COM 1 port on the computer and the F150
using an RS-232C cable.
2 Make the F150 communications settings. The default communications settings are as shown in the following table.
These settings can normally be used.
Item
Setting
Baud rate
38,400 bps
Data length
8 (bits)
Parity bits
None
Stop bits
1 (bit)
Delimiter
CR
3 Start the HyperTerminal program on the computer and
make the following communications settings. The same
communications settings must be used on both the F150
and the modem on the computer.
Item
Setting
Speed
38,400 bps
Data bits
8 (bits)
Parity bits
None
Stop bits
1 (bit)
Flow control
None (Xmodem protocol is used.)
4 Execute the saving operation from the F150. The data
transfer screen will be displayed.
The F150 will generate a timeout error if no response is
received from the external device within 30 seconds. An
error message will be displayed, and the error terminal will
turn ON.
5 Select Transfer/Receive File from the HyperTerminal
menu.
6 Specify where the file is to be saved and set the protocol to
Xmodem.
7 Select Receive. The data will be transferred from the F150
to the computer.
Loading Data from the Computer
1 Follow steps 1 to 3 in the above procedure to connect the
F150 and the computer.
110
Section 3-8
System Settings
2 Select Transfer/Send File from the HyperTerminal menu.
3 Select the file to be sent and set the protocol to Xmodem.
4 Select Send. The data transfer screen will be displayed.
5 Execute the loading operation from the F150.
The F150 will generate a timeout error if no response is
received from the external device within 30 seconds. An
error message will be displayed, and the error terminal will
turn ON.
3-8-4
Measurement Screen Settings
Image Types to be Stored and Measurement Result Display
The F150 can store up to 23 measured images. It is possible to
set the F150 to only store images which resulted in NG judgements, or to store all images regardless of the measurement
result. Also, measurement results and other information can be
displayed on the measurement screens and monitor screens.
Make settings to determine which information is displayed.
Production line
3 objects before
OK product
2 objects before
NG product
1 object before
NG product
Object just
inspected
OK product
Storage image
When conditions
for image storage
set to “only NG”
When conditions for
image storage
set to “All”
Last 3
Last 1
Last
Last 2
Last 1
Last
111
Section 3-8
System Settings
Note Stored images are cleared when the power is turned OFF. Save
the images by backing them up to a personal computer.
→ p. 108
Item
Display
p y image
g
Details
Select the display status for the screen.
Freeze (default
setting)
Displays a still image (updated each time a
measurement is performed.) When inspecting
moving objects, select “freeze.”
Through
Displays the image currently being taken by the
Camera. If measurement is performed in the
through state, depending on the input timing of
the measurement command, there will be a
time-delay of between 33.3 to 66.6 ms before
image input.
Measurement
command
Image input
Camera
run-cycle
(Image transferred
to F150)
33.3 ms
66.6 ms
Display result
Select the data displayed for measurement results.
For details refer to the section on Monitor mode. → p. 97
Image
g storage
g
Select the conditions for storage of measured images.
Coordinate
calculation
l l ti
112
None (default
setting)
Nothing stored.
Only NG
Only images with NG judgements are stored.
(However, the most recent image is stored
regardless of the judgement.)
All
All images are stored regardless of the
judgement.
Select the coordinates for output.
Before scroll
(default setting)
Output made using the coordinate values before
position displacement compensation.
After scroll
Output made using the coordinate values after
position displacement compensation.
System Settings
Section 3-8
Procedure
1 Go to SYS/Display.
2 Set the conditions.
3 Select End to enter the settings and to exit this screen.
113
Section 3-8
System Settings
Changing the Display Image
By displaying a stored image on the screen, the reason for a previous NG judgement can be checked. Also, measurement can
be re-performed on the stored image with different evaluation criteria. The message in the lower-right corner of the screen indicates the type of image being displayed.
Refer to the following table.
Display
Freeze
Through
_(Mem j)
114
Details
The image that has just been measured is displayed. Whether
this image is a freeze image or a through image depends on the
settings in SYS/Display.
A previously stored image is displayed. Up to 24 (Mem 0 to 23)
images are stored in accordance with the conditions for storage
of measured images (only NG or All). When the image is to be
backed up to a personal computer, specify a memory number in
j.
Last(Mem j)
The measured image most recently stored is displayed. If this
image had an NG judgement, “Last” will be in reverse
black/white.
Last * (Mem j)
The * after “Last” contains the number indicating how many
screens previously the image was stored. Up to 23 previous
images can be displayed. “Last *” will be displayed in reverse
black/white for NG images.
...(Mem j)
Either no image is stored in memory, or an image other than a
measurement image (an image loaded from a personal
computer or an image registered with the Auto Menu) is
displayed.
Section 3-8
System Settings
Example
Second most recently stored NG image.
Memory number for the
currently displayed image.
Image Switching
The displayed image can be switched in the following 4 screens:
• The region number selection screen in SET/Position compensation.
• The region number selection screen in SET/Measurement region.
• The Monitor mode screen.
• The Run mode screen.
115
Section 3-8
System Settings
Switching Method
Display any of the 4 screens listed above, and press the SHIFT +
Up/Down Keys.
Last * (Mem j)
Last 2 (Mem j)
Last 1 (Mem j)
Last (Mem j) (see
note 1)
Freeze or Through
Last 23 (Mem j)
(see note 2)
Last 22 (Mem j)
Note
116
1. Under the following conditions, the images for “Last (Mem
j)” and “Freeze” will be the same.
Display image: Set to freeze.
Image storage: Set to all.
or
Display image: Set to freeze.
Image storage: Set to only NG.
Last measurement was NG.
Section 3-8
System Settings
2. If the following conditions hold, the number of stored images
will not exceed 22.
Image memory: Set to only NG
Last measurement was OK.
3-8-5
Switching Menus
The F150 features 2 menus: Auto Menu and Expert Menu. Use
the following procedure to select which Menu is used when the
power to the F150 is turned ON.
Procedure
1 Go to SYS/Switch menu.
2 Select the desired menu.
3 Select End to enter the setting and to exit this screen.
3-8-6
Startup Scene and Mode
Use the following procedure to set the startup scene and mode
that will be used when the power is turned ON.
If the F150 is set to start in Run mode for the scene where the
desired measurement conditions are registered, measurement
of objects can be started by simply turning the power ON.
The default setting is for scene 0 and Monitor mode.
117
System Settings
Section 3-8
The following example illustrates operation when the startup
scene is set to 1 and the startup mode is set to Run.
The next time the power is turned
ON, the F150 will start at scene 1
and in Run mode.
Procedure
1 Go to SYS/Startup mode.
2 Select the startup scene number and the startup mode.
3 Select End to enter the settings and to exit this screen.
118
Section 3-8
System Settings
3-8-7
Selecting Output Method for Error Terminal
During processing (i.e.: while BUSY terminal is ON), even if the
STEP terminal is turned ON, the F150 will not perform measurement. It is possible to set the ERR terminal so that it turns ON to
indicate to an external device that input to the STEP terminal
could not be received.
Selection
Details
ERR ON
(default
setting)
During processing (i.e.: BUSY terminal ON), if the
STEP terminal turns ON, the ERR terminal will be
turned ON and measurement will not be performed.
The next time a STEP signal is input with the BUSY
terminal OFF, the ERR terminal will go OFF.
OFF
During processing (i.e.: BUSY terminal ON), if the
STEP terminal turns ON, the ERR terminal will not
come ON. Measurement will not be performed.
Procedure
1 Go to SYS/Error method.
2 Select the desired setting.
3 Select End to enter the setting and to exit this screen.
3-8-8
Checking the Software Version
Use the following procedure to check the Vision Sensor model
and the software system version.
Procedure
1 Go to SYS/Version.
119
Section 3-9
Saving to Flash Memory
2 Select OK to exit this screen.
Model number is displayed.
Software version and date
of creation are displayed.
3-9
Saving to Flash Memory
Use the following memory to save set data to flash memory.
Flash memory data is loaded each time the F150 is started up.
Therefore, when settings have been changed, be sure to save to
flash memory before turning the power OFF. If the power is
turned OFF without saving, all of the setting changes will be lost.
Procedure
1 Display the basic screen.
120
Saving to Flash Memory
Section 3-9
2 Move the cursor to MON and press the ENT Key.
3 Select SAVE. A confirmation message will be displayed.
4 Select Execute. When saving has been completed, the
screen for step 1 will be returned.
! Caution Do not turn OFF the power or input a RESET signal while a message is being displayed in any save or load operations. Data in
memory will be destroyed, and the F150 may not operate correctly the next time it is started.
121
SECTION 4
Terminal Block
This section describes the communications settings and I/O formats for communications
with external devices via the terminal blocks.
4-1
4-2
4-3
I/O Formats . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
124
4-1-1
4-1-2
Inputs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Outputs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
124
125
Terminal Signal Operation and Timing . . . . . . . . . . . .
125
4-2-1
4-2-2
No Handshaking . . . . . . . . . . . . . . . . . . . . . . . . . . .
Using Handshaking (F150-C10E-2, F150-C15E-2)
125
129
Communications Settings . . . . . . . . . . . . . . . . . . . . . . .
131
123
Section 4-1
I/O Formats
4-1
I/O Formats
The terminal blocks can be used to input and output various signals, e.g., to input a measurement trigger from a photoelectric or
other sensor and to output the overall judgement to a Programmable Controller or other external device.
4-1-1
Inputs
The following commands can be input in Monitor mode or Run
mode.
STEP Terminal
One measurement will be performed when the STEP terminal
turns ON.
DI0 to DI 7 Terminals (F150-C10E-2, F150-C15E-2)
The following commands can be input.
To use these inputs, turn ON DI7 for 1 ms or more after setting the
status of the DI0 to DI6 inputs.
The F150-C10E-2-DRT does not have any DI inputs and therefore does not support the following commands.
DI inputs
Command
Execute
7
Function
Command
6
5
4
Operand
3
2
0
0
1
*
Switching
scenes
1
0
1
0
Scene No.
1
0
1
0
0
1
1
0
0
Region number
Re-registers the model
based on the
measurement image
input immediately
before.
(This command is only
valid if a region for
gray search or precise
search has been
specified. If other
regions have been
specified this
command will be
ignored.)
1
1
0
0
0
Registers the model
for region 6.
Example
Example
0
1
*
0
1
Model
registration
*
1
Continuous
measurement
1
1
*
Measurement is
performed continually
during command input.
Switches the scene.
0
0
Switches to scene 2.
0: OFF
1: ON
*: Status is not read by F150, i.e., the status does not matter.
124
Section 4-2
Terminal Signal Operation and Timing
4-1-2
Outputs
Whenever a measurement is performed, the judgement is output.
The data is only output in Run mode. There is no output to the
terminals in Monitor mode.
The F150 can be set to turn ON terminals for either OK or NG
results. The default is for output to be ON for NG results.
→ p 131
! Caution After measurement is performed in Run mode, the data output to
the OR terminal and DO terminal will be held until the next time
measurment is performed in Run mode. The output status will be
held even if the mode is changed.
! Caution The initial status of the output terminals is OFF. The terminals,
however, may turn ON for approximately 0.5 s when the power is
turned ON. Be sure to allow for this when reading the status at an
external device.
OR Terminal
The overall judgement is output to the OR terminal. This overall
judgement will be NG if there is one or more NG judgements for
the set measurement regions or output expressions.
DO Terminals (F150-C10E-2, F150-C15E-2)
DO
terminals
0 to 15
Output
The judgement for the output expression for 0 to 15
will be output from the corresponding output
terminal.
There are no DO terminals for the F150-C10E-2-DRT.
4-2
Terminal Signal Operation and Timing
The following explains the operation of the terminal signals
based on the various communications settings that are possible.
Use the information provided here to determine which settings to
make.
4-2-1
No Handshaking
The F150 outputs the measurement results without synchronization with the external device. Read the measurement results
at the external device while the GATE terminal is ON.
125
Section 4-2
Terminal Signal Operation and Timing
Using the STEP Terminal as a Measurement Trigger
Enter Run mode
Leave Run mode
STEP input
B
Image read
STEP input
B
STEP input
Image read
Overall
judgement
B
Image read
Judgement
Gate ON delay
Gate ON time
Output period
Output Terminals
Terminal
Function
RUN
Turns ON during Run mode.
BUSY
Shows that the F150 is reading an image, changing a scene, etc.
Do not input the next command while the BUSY terminal is ON. Otherwise,
commands may not be properly executed.
OR
Outputs the overall judgements. (Can be set to turn ON for either OK or NG
judgement.)
The overall result will be NG if there is one or more NG judgements for the
measurement regions or output expressions.
DO 0 to
DO 15
Outputs the judgement results for the output expressions. (Can be set to
turn ON for either OK or NG judgement.)
Note There are no DO terminals for the F150-C10E-2-DRT.
GATE
Used to time the reading of the measurement result at the external device.
The time that GATE is turned ON can be set as required for the external
device to correctly read the measurement result.
Make the output time shorter than the duration of the measurement (STEP
input). If the period is longer, the output timing will fall behind as
measurements are repeated.
Note If the GATE terminal control output is set to user output in the communications specifications setting menu for CompoBus/D, the GATE terminal cannot be used to control timing.
126
Section 4-2
Terminal Signal Operation and Timing
Input Terminals
Terminal
STEP
Function
Inputs a measurement trigger from a photoelectric sensor or other external
device.
One measurement will be taken on the rising edge of the STEP signal. Turn
ON the STEP for at least 0.5 ms.
Note If a STEP signal is input while the BUSY terminal is ON, the ERR
terminal will come ON. → p. 119
Performing Continuous Measurements
(F150-C10E-2, F150-C15E-2)
Enter Run mode
Leave Run mode
DI0 to 6
Image read
Image read
Overall
judgement
Image read
Judgement
Gate ON delay
Gate ON time
Output period
Output
Terminals
The function of the output terminals is the same as when inputting a measurement trigger using the STEP terminal, as
described previously.
127
Section 4-2
Terminal Signal Operation and Timing
Input Terminals
Terminal
Function
DI 0 to
DI 3
OFF
DI4
ON
DI5 to
DI6
OFF
DI7
Execution trigger.
Leave at least 1 ms after setting DI 0 to 6 before turning DI 7 ON. During
command execution, the BUSY terminal will turn ON. During execution of
continuous measurement, the BUSY terminal will stay ON.
Scene Changing and Model Registration
(F150-C10E-2, F150-C15E-2)
Enter Run mode
Leave Run mode
DI0 to 6
Command executed
Output Terminals
Terminal
Function
RUN
Turns ON during Run mode.
BUSY
Shows that the F150 is reading an image, changing a scene, etc.
Do not input the next command while the BUSY terminal is ON. Otherwise,
commands may not be properly executed.
128
Section 4-2
Terminal Signal Operation and Timing
Input Terminals
Scene Changing
Terminal
Function
DI 0 to
DI 3
Set the scene number (0 to 15).
DI4
OFF
DI5
ON
DI6
OFF
DI7
Execution trigger.
Leave at least 1 ms after setting DI 0 to 6 before turning DI 7 ON. During
command execution, the BUSY terminal will turn ON. After confirming that
the BUSY terminal has turned ON, turn OFF DI 7 before turning OFF DI 0 to
6.
Model Registration
Terminal
Function
DI 0 to
DI 3
Set the region number (0 to 15).
DI4
OFF
DI5
OFF
DI6
ON
DI7
Execution trigger.
Leave at least 1 ms after setting DI 0 to 6 before turning DI 7 ON. During
command execution, the BUSY terminal will turn ON. After confirming that
the BUSY terminal has turned ON, turn OFF DI 7 before turning OFF DI 0 to
6.
4-2-2
Using Handshaking (F150-C10E-2, F150-C15E-2)
Handshaking can be used to synchronize the F150 with an external device to output the measurement result. This is an effective
way to output several measurement results in order, allowing
data to be properly transferred.
129
Section 4-2
Terminal Signal Operation and Timing
Using the STEP Terminal as a Measurement Trigger
Enter Run mode
Leave Run mode
STEP input
STEP input
B
STEP input
B
Image read
B
Image read
Overall
judgement
Judgement
Gate ON delay
Timeout time
Timeout time
A timeout error will occur if DSA
does not turn ON within the set
time after the image is read.
A timeout error will occur if DSA
does not turn OFF within the set
time after GATE turns ON.
The function of all terminals except the DSA terminal is the same
as for communications without handshaking. The DSA terminal
is only used with handshaking.
DSA Terminal
Terminal
DSA
Function
Requests the next data output from the external
device. The F150 will not output data until this
terminal is turned ON.
Turn ON the DSA terminal when the external device
is ready to receive data and the F150 has finished
measurement.
The BUSY terminal is ON during measurement, i.e.,
measurement will be completed when the BUSY
terminal turns OFF. Use the BUSY signal to time
reading measurement results.
130
Section 4-3
Communications Settings
Note If a STEP signal is input while the BUSY terminal is ON, the ERR
terminal will come ON. → p. 119
4-3
Communications Settings
The communications specifications must be set when communicating with an external device.
The following communications settings are required.
Item
Description
ON state
Handshaking
(F150-C10E-2,
F150-C15E-2)
Select whether to turn ON the OR and DO 0 to
DO 15 terminals for OK or NG. The default is ON
for NG.
OFF
Used to output the measurement result without
synchronizing with the external device.
This is the default setting.
ON
Used to output the measurement result while
synchronizing with the external device.
Output period
Set the output period for the measurement result.
(Only effective without
handshaking)
Set a value between 2 and 10,000.0 ms that is
greater than the Gate ON delay + Gate ON time,
and less than the measurement interval. If this
period is longer than the measurement interval,
the output timing will fall behind as the
measurements are repeated.
The default setting is 10.0 ms.
Gate ON delay
Set the time from when the result is output to the
terminal block to when the GATE signal is turned
ON.
This time is used to wait until the data output
becomes stable. Set a time between 1.0 and
1,000 ms that is longer than the delay time for
the external device.
The default setting is 1.0 ms.
Gate ON time
Set the time for which the GATE signal is ON.
(Only effective without
handshaking)
Set a value between 1.0 and 1,000 ms that will
allow the external device to read the
measurement result.
The default setting is 5.0 ms.
Timeout (F150-C10E-2,
F150-C15E-2)
A timeout error will occur if there is no response
from the external device within the set time.
(Only effective with
handshaking)
Set a value between 0.5 and 120.0 s.
The default setting is 10.0 s.
131
Section 4-3
Communications Settings
Procedure
1 Go to SYS/Communications/Terminal block.
2 Set the required items.
3 Select End to exit this screen.
F150-C10E-2, F150-C15E-2
132
F150-C10E-2-DRT
SECTION 5
RS-232C Normal Settings
This section describes the communications settings for the RS-232C port when communications are set for Normal mode.
5-1
5-2
5-3
5-4
5-5
Communications Settings . . . . . . . . . . . . . . . . . . . . . . .
134
5-1-1
5-1-2
Flowcharts . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Communications Settings . . . . . . . . . . . . . . . . . . . .
134
136
Command List . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Input Format . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Input Commands . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
138
140
140
5-4-1
5-4-2
5-4-3
5-4-4
5-4-5
5-4-6
5-4-7
5-4-8
5-4-9
5-4-10
5-4-11
5-4-12
5-4-13
5-4-14
5-4-15
5-4-16
5-4-17
5-4-18
5-4-19
5-4-20
DATASAVE: Data Save . . . . . . . . . . . . . . . . . . . . .
DISPIMG: Display Image . . . . . . . . . . . . . . . . . . .
EXP: Expression . . . . . . . . . . . . . . . . . . . . . . . . . .
EXPPARA (EP): Expression Parameter . . . . . . . . .
IMGLOAD: Image Load . . . . . . . . . . . . . . . . . . . .
IMGSAVE: Image Save . . . . . . . . . . . . . . . . . . . . .
MEASDATA (MD): Measure Data . . . . . . . . . . . .
MEASPARA (MP): Measure Parameter . . . . . . . .
MEASURE: Measure . . . . . . . . . . . . . . . . . . . . . . .
MENUKEY . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
MODELSET: Model Set . . . . . . . . . . . . . . . . . . . .
POSIDATA (PD): Position Data . . . . . . . . . . . . . .
POSIPARA (PP): Position Parameter . . . . . . . . . . .
RESET: Reset . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
SCENE: Scene . . . . . . . . . . . . . . . . . . . . . . . . . . . .
SCNLOAD: Scene Load . . . . . . . . . . . . . . . . . . . .
SCNSAVE: Scene Save . . . . . . . . . . . . . . . . . . . . .
SYSLOAD: System Load . . . . . . . . . . . . . . . . . . .
SYSSAVE: System Save . . . . . . . . . . . . . . . . . . . .
VERGET: Version Get . . . . . . . . . . . . . . . . . . . . . .
141
141
142
142
143
144
144
147
151
152
152
153
154
155
156
156
157
157
158
158
Measurement Results Output Format . . . . . . . . . . . . . .
159
133
Communications Settings
5-1
Communications Settings
5-1-1
Flowcharts
Section 5-1
If the Normal communications mode is selected, data can be output in non-procedural format to an external device via the
RS-232C port.
Set Mode
Command inputs cannot be received.
Monitor Mode
Command inputs can be received, but measurement results are
not output to external devices. Only the execution result itself
(i.e.: OK or ER) is output. If a command to read a set value is
input, that value will be output.
Run Mode
Both command input and measurement result output are supported.
Note
1. The output of data after measurement is performed in Run
mode, will continue until all of the data has been output,
even if the mode is changed. Data output will not be interrupted.
2. A timeout error will occur if there is no response from the
computer within the set time when RS/CS or Xon/off is
selected for flow control. An error message will appear on
the screen, and the error terminal will turn ON.
134
Section 5-1
Communications Settings
Measurement Commands
I/O via RS-232C Port
F150
Computer
Input command
Perform measurement
*The BUSY terminal turns ON while a
measurements are being performed.
Output result
Receive result
Inputting Measurement Trigger from STEP Terminal
F150
Computer
STEP
Perform measurement
*The BUSY terminal is ON while measurements are being performed.
Output result
Receive result
135
Section 5-1
Communications Settings
Non-measurement Commands
The following timing chart shows the basic flow of command
execution.
F150
Computer
Input command
Execute command
*The BUSY terminal is ON while the
commands are being executed.
Output result
Receive result
5-1-2
Communications Settings
Baud Rate and Communications Mode
The following explains how to set the baud rate, data length, and
other communications specifications.
The same communications settings must be used for both the
F150 and the external device.
Item
Setting
Use the same
settings
g on the
IBM
Programmable
Controller/AT or
compatible
computer
computer.
Baud rate
2,400, 4,800, 9,600, 19,200,
38,400* (bps)
Data length
7, 8* (bits)
Parity bits
None*, even, odd
Stop bits
1*, 2 (bits)
Delimiter
CR*, LF, CR+LF
Mode
Normal*, Host Link, Menu. Select Normal.
Note The default settings are marked with asterisks.*
136
Section 5-1
Communications Settings
Save and Load Commands
Make the following settings when using commands for save or
load operations.
Item
Setting
Data length
8 bits
Parity bits
None
Stop bits
1 bit
Flow control
None
Procedure
1 Go to SYS/Communications/RS-232C.
2 Set the required items.
3 Select End to exit this screen.
Flow Control Settings
Flow control allows communications to be performed while
checking the status of the external device. Timeout errors can be
set to occur when there is no response from the external device
after a set number of seconds.
An error message will appear on the screen if a timeout error has
occurred, and the error terminal will turn ON.
137
Section 5-2
Command List
Item
Flow control
Setting
None*
No flow control.
RS/CS
The hardware performs flow
control.
Use a cable that connects
the RS and CS signals of the
F150 and external device.
Data is transferred when the
CS signal from the external
device is ON.
Xon/off
The software performs flow
control.
Data is transferred according
to the Xon/off codes from the
external device.
Timeout
Set the number of seconds (1 to 120 s)
before a timeout error occurs.
The default is 5 s.
Note The default settings are marked with asterisks.*
Procedure
1 Go to SYS/Communications/Normal.
2 Set the required items.
3 Select End to enter the settings and to exit this screen.
5-2
Command List
The following commands can be input from a computer or other
host device connected to the RS-232C port. Commands are
input in ASCII.
138
Section 5-2
Command List
Ensure that the communications settings for the F150 and the
external device are the same.
Commands that Control Operation
The following commands are used to control F150 operation.
Command
DISPIMG
Function
Page
Reads the memory number of the currently
displayed image.
141
Changes the displayed image.
141
Performs one measurement.
151
Performs one measurement on the
currently displayed image.
151
Starts continuous measurement.
152
Stops continuous measurement.
152
MENUKEY
Switches RS-232C input to menu
operation.
152
MODELSET
Registers the model.
152
RESET
Resets the F150.
155
SCENE
Reads the scene number of the currently
displayed scene.
156
Changes the scene.
156
MEASURE or
M
Commands that Read Measurement Results
The following commands read the results of the most recent
measurement.
Command
Function
Page
POSIDATA
(PD)
Reads the position compensation result or
the displacement value.
153
MEASDATA
(MD)
Reads the measurement result.
144
EXP
Reads the calculation result for output
expressions.
142
Commands that Save/Load Data
The following commands are used to make and retrieve backup
for data set at the F150.
139
Section 5-4
Input Commands
Command
Function
Page
DATASAVE
Saves all data to flash memory.
141
SCNLOAD
Loads scene data from an external device.
156
SCNSAVE
Saves scene data to an external device.
157
SYSLOAD
Loads system data from an external
device.
157
SYSSAVE
Saves system data to an external device.
158
IMGLOAD
Loads image data from an external device.
143
IMGSAVE
Saves image data to an external device.
144
Commands that Read/Change Current Settings
The following commands are used to read or change settings
such as evaluation criteria. Operation can be controlled from the
host by changing parameters for settings at the F150.
Command
5-3
Setting
Page
POSIPARA
(PP)
Reads/sets parameters for position
compensation regions.
154
MEASPARA
(MP)
Reads/sets parameters for measurement
regions.
147
EXPPARA
(EP)
Reads/sets evaluation criteria for
judgement output expressions.
142
VERGET
Reads version information for the system.
158
Input Format
The commands are input in ASCII. Commands can be made in
either upper-case letters or lower-case letters.
a)
b)
c)
MEASDATA <Measurement_region_number> <Parameter> delimiter
a) Variables are indicated in italics in pointed brackets< >.
Actual values must be input for the variables.
b) A space is required between each of the parameters
(but not before a delimiter).
c) A delimiter is required at the end of the command.
Note The delimiters have been omitted from the commands and responses in this manual except where
required for clarity. Be sure to allow for delimiters in
programming.
5-4
Input Commands
The commands are explained in alphabetical order.
140
Section 5-4
Input Commands
5-4-1
DATASAVE: Data Save
DATASAVE is used to save all data to flash memory.
Input
DATASAVE
Output
Data correctly saved:
Data not correctly saved:
OK
ER
Note Do not turn OFF the power until a response has been received.
5-4-2
DISPIMG: Display Image
DISPIMG is used to read or change the memory number of the
currently displayed image.
Reading Memory Number of Currently Displayed Image
Input
DISPIMG
Output
Data correctly read:
<Memory_number>
OK
Command not correct:
ER
When a through or freeze image is being displayed, the memory
number for the latest measurement image is output. If there is no
measurement image stored in memory, –1 will be output.
Example
Input:
Output:
DISPIMG
12
OK
The memory image number 12 is being displayed.
Changing Currently Displayed Image
Input
DISPIMG <Memory_number>
• Specify a memory number in the range –1 to 23. If –1 is specified, the display will change to a through or freeze image,
depending on the display settings. → p. 111
Output
Command correctly executed:
Command not correct:
OK
ER
141
Section 5-4
Input Commands
Example
Input:
DISPIMG 8
Memory image number 8 is displayed.
Output: OK
5-4-3
EXP: Expression
EXP is used to read the results of output expressions.
Input
EXP <Output_type> <Output_number>
• Specify the following values for output type and output number:
Item
Output type
Output number
Judgement
0
0 to 15
Data
1
0 to 7
Output
Data correctly read:
Command not correct:
<Measurement_result>
OK
ER
Example
Input:
EXP 1 0
The measurement result of the output expression for data 0 is
read.
Output: 28.195
OK
The measurement value is 28.195.
5-4-4
EXPPARA (EP): Expression Parameter
EXPPARA can be used to read or set evaluation criteria for
judgement output expressions.
Reading Evaluation Criteria for Judgement Output
Expressions
Input
EXPPARA <Judgement_number> <Parameter>
or
EP <Judgement_number> <Parameter>
• Specify a judgment number in the range 0 to 15.
• The contents of the parameters are as follows:
Parameter
142
Contents
0
Upper limit
1
Lower limit
Section 5-4
Input Commands
Output
Data correctly read:
<Evaluation_criteria>
OK
Command not correct:
ER
Example
Input:
EXPPARA 0 0
The upper limit for judgement 0 is read.
Output:
100.000
OK
The upper limit is 100.000.
Setting Evaluation Criteria for Judgement Output
Expressions
Input
EXPPARA <Judgement_number> <Parameter>
<Value>
or
EP <Judgement_number> <Parameter> <Value>
• Specify a judgement number in the range 0 to 15.
• The contents and setting range for the parameters are as follows:
Parameter
Contents
0
Upper-limit value (–9,999,999.999 to
9,999,999.999)
1
Lower-limit value (–9,999,999.999 to
9,999,999.999)
Output
Correct settings made:
OK
Correct settings not made:
ER
Example
Input:
EXPPARA 0 0 150.000
The upper limit for judgement 0 is changed to 150.000.
Output:
5-4-5
OK
IMGLOAD: Image Load
IMGLOAD is used to load image data from an external device.
Input
IMGLOAD <Memory_image_number>
143
Section 5-4
Input Commands
• Specify a memory image number in the range 0 to 23. The
image data is loaded with Xmodem (-CRC or -SUM) protocol.
• When preparations to receive the data are completed, the
F150 will send a READY signal to the external device. Send
the data from the external device when the READY signal has
been received.
• Only image data that has been saved from an F150 can be
loaded.
Output
Data correctly loaded:
Data not correctly loaded:
OK
ER
Example
Input: IMGLOAD 2
Image data is loaded from the external device to memory
image 2.
Output: OK
5-4-6
IMGSAVE: Image Save
IMGSAVE is used to save image data to an external device.
Input
IMGSAVE <Memory_image_number>
• Specify a memory image number in the range 0 to 23. The
image data is saved with Xmodem (-CRC or -SUM) protocol.
• The memory image is transferred in BMP format.
• The Controller sends the character string “READY” to the external device when the Controller has completed preparatons.
Wait for the “READY” string to be received at the external device before starting the data transfer.
Output
Data correctly saved:
Data not correctly saved:
OK
ER
Example
Input: IMGSAVE 2
The data in memory image 2 is saved to the external device.
Output: OK
5-4-7
MEASDATA (MD): Measure Data
MEASDATA is used to read measurement results.
Input
MEASDATA <Region_number> <Parameter>
or
MD <Region_number> <Parameter>
144
Section 5-4
Input Commands
• Specify a region number in the range 0 to 15.
• The meaning of the parameter will vary according to the measurement method set for the region number specified. Refer to
the parameter lists following.
Output
Data correctly read:
<Measurement_result>
OK
ER
Command not correct:
Example
Input:
MD 0 2
Y coordinate measurement result for region 0 (gray search)
is read.
Output: 200.000
OK
The Y coordinate measurement value is 200.000.
Lists of Parameters (Common to MEASDATA/POSIDATA)
Binary Center of Gravity and Area, Binary Center of Gravity and Axis
Angle
Parameter
Meaning
0
Judgement result (0: OK, –1: NG, –2: no measurement)
1
X coordinate of measured center of gravity
2
Y coordinate of measured center of gravity
3
X coordinate of reference center of gravity
4
Y coordinate of reference center of gravity
5
Displacement in X direction (measured X coordinate of
center of gravity – reference X coordinate of center of
gravity)
6
Displacement in Y direction (measured Y coordinate of
center of gravity – reference Y coordinate of center of
gravity)
7
Measured value for area
8
Reference value for area
9
Measured value for area – reference value for area
10
Inverted area (area of measurement region – measured
area)
11
Measured axis angle
12
Reference axis angle
13
Axis displacement (measured axis angle – reference
axis angle)
Note Parameters 11 to 13 are only used when the measurement
method is binary center of gravity and axis angle.
145
Section 5-4
Input Commands
Edge Pitch (MEASDATA Command Only)
Parameter
Meaning
0
Judgement result (0: OK, –1: NG, –2: no measurement)
1
Number of detected objects
2
Average pitch
3
Maximum pitch
4
Minimum pitch
5
Average width
6
Maximum width
7
Minimum width
Gray Search, Precise Search
Parameter
Meaning
0
Judgement result (0: OK, –1: NG, –2: no measurement)
1
Measured X coordinate
2
Measured Y coordinate
3
Reference X coordinate
4
Reference Y coordinate
5
Displacement in X direction (measured X coordinate –
reference X coordinate)
6
Displacement in Y direction (measured Y coordinate –
reference Y coordinate)
7
Correlation value
Gray Edge Position
Parameter
Meaning
0
Judgement result (0: OK, –1: NG, –2: no measurement)
1
Measured edge coordinate
2
Reference edge coordinate
3
Displacement (measured coordinate – reference
coordinate)
Surface Defect (MEASDATA Command Only)
Parameter
146
Meaning
0
Judgement result (0: OK, –1: NG, –2: no measurement)
1
Measured defect
2
Maximum density value
3
Minimum density value
Section 5-4
Input Commands
5-4-8
MEASPARA (MP): Measure Parameter
MEASPARA can be used to read or set parameters for measurement regions.
Reading Measurement Region Parameters
Input
MEASPARA <Region_number> <Parameter>
or
MP <Region_number> <Parameter>
• Specify a region number in the range 0 to 15.
• The meaning of the parameter will vary according to the measurement method set for the region number specified. Refer to
the parameter lists following.
Output
Parameter correctly read:
Command not correct:
<Value>
OK
ER
Example
Input:
MP 0 1
Lower limit for X coordinate for region 0 (gray search) is
read.
Output:
200.000
OK
The parameter is set to 200.000.
Setting Measurement Region Parameters
Input
MEASPARA <Region_number> <Parameter> <Value>
or
MP <Region_number> <Parameter> <Value>
• Specify a region number in the range 0 to 15.
• The meaning of the parameter and the possible values will vary
according to the measurement method set for the region number specified. Refer to the parameter lists following.
Output
Parameter correctly set:
OK
Parameter not correctly set: ER
Example
Input: MP 0 1 400.000
147
Section 5-4
Input Commands
Lower limit for X coordinate for region 0 (gray search) is set
to 400.000.
Output:
OK
Lists of Parameters (Common to MEASPARA/POSIPARA)
Binary Center of Gravity and Area, Binary Center of Gravity and Axis
Angle
Parameter
Meaning
0
Upper limit of X coordinate of center of gravity
(–9,999.999 to 9,999.999)
1
Lower limit of X coordinate of center of gravity
(–9,999.999 to 9,999.999)
2
Upper limit of Y coordinate of center of gravity
(–9,999.999 to 9,999.999)
3
Lower limit of Y coordinate of center of gravity
(–9,999.999 to 9,999.999)
4
Upper limit of area (0 to 9,999,999.999)
5
Lower limit of area (0 to 9,999,999.999)
6
Upper-left X coordinate of region (0 to 511)
7
Upper-left Y coordinate of region (0 to 483)
8
Lower-right X coordinate of region (0 to 511)
9
Lower-right Y coordinate of region (0 to 483)
10
Upper limit of binary level (0 to 255)
11
Lower limit of binary level (0 to 255)
12
Binary level inversion (0: not inverted, 1: inverted)
13
Upper limit of axis angle (–180.000 to 180.000)
14
Lower limit of axis angle (–180.000 to 180.000)
Note Parameters 13 and 14 are only used when measurement
method is binary center of gravity and axis angle.
148
Section 5-4
Input Commands
Gray Edge Position
Parameter
Meaning
0
Upper limit of position (–9,999.999 to 9,999.999)
1
Lower limit of position (–9,999.999 to 9,999.999)
2
Upper-left X coordinate of region (0 to 511)
3
Upper-left Y coordinate of region (0 to 483)
4
Lower-right X coordinate of region (0 to 511)
5
Lower-right Y coordinate of region (0 to 483)
6
Edge search direction (↑: 0, ↓: 1, →: 2, ←: 3)
7
Edge color (Light → Dark: 0, Dark → Light: 1)
8
Level (0 to 100)
Gray Search, Precise Search
Parameter
Meaning
0
Upper limit of X coordinate (–9,999.999 to 9,999.999)
1
Lower limit of X coordinate (–9,999.999 to 9,999.999)
2
Upper limit of Y coordinate (–9,999.999 to 9,999.999)
3
Lower limit of Y coordinate (–9,999.999 to 9,999.999)
4
Upper limit of correlation value (0 to 100)
5
Lower limit of correlation value (0 to 100)
6
Upper-left X coordinate of search region (0 to 511)
7
Upper-left Y coordinate of search region (0 to 483)
8
Lower-right X coordinate of search region (0 to 511)
9
Lower-right Y coordinate of search region (0 to 483)
10
X coordinate of reference position (0 to 511)
11
Y coordinate of reference position (0 to 483)
12
Search speed (0: LOW → 1 → 2 → 3 → 4: HIGH)
149
Section 5-4
Input Commands
Edge Pitch (MEASPARA Command Only)
Parameter
Meaning
0
Upper limit of number of objects (0 to 255)
1
Lower limit of number of objects (0 to 255)
2
Upper limit of pitch (0 to 9,999.999)
3
Lower limit of pitch (0 to 9,999.999)
4
Upper limit of width (0 to 9,999.999)
5
Lower limit of width (0 to 9,999.999)
6
Upper-left X coordinate of region (0 to 511)
7
Upper-left Y coordinate of region (0 to 483)
8
Lower-right X coordinate of region (0 to 511)
9
Lower-right Y coordinate of region (0 to 483)
10
Counted object color (White: 0, Black: 1)
11
Edge level (0 to 100)
12
Minimum level (0 to 255)
Surface Defect (MEASDATA Command Only)
Parameter
Meaning
0
Defect (0 to 255)
1
Upper limit of density value (0 to 255)
2
Lower limit of density value (0 to 255)
3
Element size (4 to 80)
4
Compare pitch (1 to 6)
5 to 10
See note
Note The meaning of parameters 5 to 10 varies according to the shape
of the region.
150
Section 5-4
Input Commands
Parameter
Box
Line
Circumference
Arc
5
Upper-left X
coordinate of
region (0 to 511)
X coordinate of
start point (0 to
511)
X coordinate of
center (0 to 511)
X coordinate of
center (0 to 511)
6
Upper-left Y
coordinate of
region (0 to 483)
Y coordinate of
start point (0 to
483)
Y coordinate of
center (0 to 483)
Y coordinate of
center (0 to 483)
7
Lower-right X
coordinate of
region (0 to 511)
X coordinate of
end point (0 to
511)
Radius (1 to 512)
Radius (1 to 512)
8
Lower-right Y
coordinate of
region (0 to 483)
Y coordinate of
end point (0 to
483)
Width (1 to 64)
Width (1 to 64)
9
---
Width (1 to 64)
---
Start angle
(–180.00 to
180.00)
10
---
---
---
End angle
(–180.00 to
180.00)
5-4-9
MEASURE: Measure
MEASURE is used to perform measurements one at a time or to
stop and start continuous measurements.
Performing One Measurement
Input
MEASURE
or
M
Output
Measurement correctly performed:
<Measurement_results> → p 159
OK
Measurement not correctly performed: ER
Executing One Measurement on Currently Displayed Image
MEASURE /I
or
M /I
Output
Measurement correctly performed:
<Measurement_results> → p 159
OK
Measurement not correctly performed: ER
151
Section 5-4
Input Commands
Starting Continuous Measurements
Input
MEASURE /C
or
M /C
Output
Measurement correctly performed:
OK delimiter <Continuous_measurement_results>
→ p 159
Measurement not correctly performed: ER
Stopping Continuous Measurements
Input
MEASURE /E
or
M /E
Output
Measurement correctly stopped:
OK
Measurement not correctly stopped:
ER
5-4-10 MENUKEY
MENUKEY is used to switch RS-232C input to Menu operation
mode.
Input
MENUKEY
Output
Nothing is output for this command.
Return to Normal mode from Menu operation mode by inputting
CTRL + Q($11).
5-4-11 MODELSET: Model Set
MODELSET is used to re-register the model based on the measurement image input immediately before.
Input
MODELSET <Region_number>
• Specify a region number in the range 0 to 15. This command is
only valid for regions where the measurement method is gray
search or precise search.
152
Section 5-4
Input Commands
Output
Model correctly registered:
OK
Model not correctly registered:
ER
Example
Input:
MODELSET 2
The model for region 2 (gray search) is registered.
Output:
OK
If a region for which the measurement method is not gray search
or precise search is specified, the command will be ignored but
an OK will be output.
Example
If region 1, for which the measurement method is set to binary
center of gravity and area, is specified:
Input:
Output:
MODELSET 1
OK
No settings are made.
5-4-12 POSIDATA (PD): Position Data
POSIDATA is used to read position compensation results or
position displacements.
Reading Position Compensation Result
Input
POSIDATA
<Position_Compensation_Region_Number>
<Parameter>
• Specify a position compensation region number of 0 or 1.
• The meaning of the parameter will vary according to the position compensation method for the specified region. The
parameters are the same as for MEASDATA. Refer to the
MEASDATA parameter lists given previously in this section.
Output
Data correctly read:
<Position_compensation result>
OK
Command not correct:
ER
Example
Input:
POSIDATA 0 2
Y coordinate measurement value for position compensation
region 0 (gray search) is read.
153
Section 5-4
Input Commands
Output:
200.000
OK
Y coordinate measurement value is 200.000.
Reading Displacement Value
Input
POSIDATA 2 <Parameter>
• The meanings of the parameters are as follows:
Parameter
Meaning
0
Displacement in X direction (reference X coordinate –
measured X coordinate)
1
Displacement in Y direction (reference Y coordinate –
measured Y coordinate)
2
Angle displacement (reference angle – measured
angle)
Output
Data correctly read:
<Position_displacement>
OK
Command not correct:
ER
Example
Input:
POSIDATA 2 0
Position displacement in the X direction is read.
Output:
95.65
OK
Displacement in the X direction is 95.65.
5-4-13 POSIPARA (PP): Position Parameter
POSIPARA is used to read or set position compensation region
parameters.
Reading Position Compensation Region Parameters
Input
POSIPARA <Position_compensation_region_number>
<Parameter>
or
PP <Position_compensation_region_number>
<Parameter>
• Select a position compensation region number of 0 or 1.
154
Section 5-4
Input Commands
• The meaning of the parameter will vary according to the position compensation method for the specified region. The
parameters are the same as for MEASPARA. Refer to the
MEASPARA parameter lists given previously in this section.
Output
Parameter correctly read:
<Value>
OK
Command not correct:
ER
Example
Input:
PP 0 1
Lower limit of the X coordinate for position compensation
region 0 (gray search) is read.
Output:
200.000
OK
Lower limit of the X coordinate is set to 200.000.
Setting Position Compensation Region Parameters
Input
POSIPARA <Position_compensation_region_number>
<Parameter> <Value>
or
PP <Position_compensation_region_number>
<Parameter> <Value>
• Select a position compensation region number of 0 or 1.
• The meaning of the parameter will vary according to the position compensation method for the specified region. The
parameters are the same as for MEASPARA. Refer to the
MEASPARA parameter lists given previously in this section.
Output
Parameter correctly set:
OK
Parameter not correctly set: ER
Example
Input:
PP 0 1 400
Lower limit of the X coordinate for position compensation
region 0 (gray search) is changed to 400.000.
Output:
OK
5-4-14 RESET: Reset
RESET is used to reset the F150.
155
Section 5-4
Input Commands
Input
RESET
Output
Nothing is output for this command.
5-4-15 SCENE: Scene
SCENE is used to read the currently displayed scene number or
switch scene.
Reading the Scene Number
Input
SCENE
Output
Data correctly read:
Command not correct:
<Scene_number>
OK
ER
Example
Input:
Output:
SCENE
0
OK
Scene 0 is displayed.
Switching the Scene
Input
SCENE <Scene_number>
• Specify a scene number in the range 0 to 15.
Output
Scene correctly switched:
OK
Scene not correctly switched: ER
Example
Input:
SCENE 2
The measurement scene is changed to scene 2.
Output:
OK
5-4-16 SCNLOAD: Scene Load
SCNLOAD is used to load scene data from a computer or other
external device.
Input
SCNLOAD <Scene_number>
156
Section 5-4
Input Commands
• Specify a scene number in the range 0 to 15. The scene data is
transferred with Xmodem (-CRC or -SUM) protocol.
• When preparations to receive the data are completed, the
F150 will send a READY signal to the external device. Send
the data from the external device when the READY signal has
been received.
Output
Data correctly loaded:
Data not correctly loaded:
OK
ER
Example
Input:
SCNLOAD 2
Data is loaded to scene 2 from an external device.
Output:
OK
5-4-17 SCNSAVE: Scene Save
SCNSAVE is used to save scene data to a computer or other
external device.
Input
SCNSAVE <Scene_number>
• Specify a scene number in the range 0 to 15. The scene data is
transferred with Xmodem (-CRC or -SUM) protocol.
• The Controller sends the character string “READY” to the external device when the Controller has completed preparatons.
Wait for the “READY” string to be received at the external device before starting the data transfer.
Output
Data correctly saved:
Data not correctly saved:
OK
ER
Example
Input:
SCNSAVE 2
Data from scene 2 is saved to an external device.
Output:
OK
5-4-18 SYSLOAD: System Load
SYSLOAD is used to load system data from a computer or other
external device.
Input
SYSLOAD
• When preparations to receive the data are completed, the
F150 will send a READY signal to the external device. Send
the data from the external device when the READY signal has
been received.
157
Section 5-4
Input Commands
Output
Data correctly loaded:
Data not correctly loaded:
OK
ER
Example
Input:
SYSLOAD
System data is loaded from an external device.
Output:
OK
5-4-19 SYSSAVE: System Save
SYSSAVE is used to save system data to a computer or other
external device.
Input
SYSSAVE
• The Controller sends the character string “READY” to the external device when the Controller has completed preparatons.
Wait for the “READY” string to be received at the external device before starting the data transfer.
Output
Data correctly saved:
Data not correctly saved:
OK
ER
Example
Input:
SYSSAVE
System data is saved to an external device.
Output:
OK
5-4-20 VERGET: Version Get
VERGET is used to read information about the system version.
Input
VERGET
Output
Data correctly read:
Data not correctly read:
<Version_information>
OK
ER
Example
Input:
VERGET
Version information is read.
Output:
F150-C10E-2 Ver2.00 1998/11/01
12:00
OK
F150-C10E-2 is the Controller model, the software version
is 2.00, and the version was created on 1998/11/01 at 12:00.
158
Measurement Results Output Format
5-5
Section 5-5
Measurement Results Output Format
Measurement results are output in ASCII in order from the smallest output number to the largest.
The measurement results are output in the normal format even in
Menu operation mode.
The amount of output data will depend on the number of digits in
the measurement values.
[<Measurement_results_for_data_0>],
[<Measurement_results_for_data_1>],
[<Measurement_results_for_data_2>],
[<Measurement_results_for_data_3>],
[<Measurement_results_for_data_4>],
[<Measurement_results_for_data_5>],
[<Measurement_results_for_data_6>],
[<Measurement_results_for_data_7>]
• Outputs are made in decimal, with a maximum of 7 digits
before the decimal point and 3 digits after. The number of digits
before the decimal point that are actually displayed will vary
according to the measurement value but the number of digits
after the decimal point is fixed to 3.
• Calibrated values are output. Output values will be in the range
–9,999,999.999 to 9,999,999.999. If the measurement value is
less than –9,999,999.999, then –9,999,999.999 will be output.
If the measurement value is greater than 9,999,999.999, then
9,999,999.999 will be output.
• When a judgement is set, either 0 (OK) or –1 (NG) will be output.
159
SECTION 6
RS-232C Host Link Settings
This section describes the communications settings for the RS-232C port when communications are in Host Link mode.
Communications in Host Link mode are only supported for the F150-C10E-2 and
F150-C15E-2.
6-1
6-2
6-3
Communications Settings . . . . . . . . . . . . . . . . . . . . . . .
162
6-1-1
6-1-2
FlowCharts . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Communications Settings . . . . . . . . . . . . . . . . . . . .
162
166
Command Tables . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Input Format . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
168
170
6-3-1
6-3-2
6-3-3
6-3-4
6-3-5
6-3-6
6-3-7
6-3-8
6-3-9
6-3-10
6-3-11
6-3-12
6-3-13
6-3-14
170
170
170
170
171
171
171
171
172
172
172
175
178
6-3-15
6-3-16
6-3-17
6-3-18
6-4
6-5
0010: ONE MEASUREMENT . . . . . . . . . . . . . . .
0011: CONTINUOUS MEASUREMENT . . . . . . .
0012: STOP MEASUREMENT . . . . . . . . . . . . . . .
0020: SWITCH SCENE . . . . . . . . . . . . . . . . . . . . .
0021: INCREMENT SCENE . . . . . . . . . . . . . . . . .
0022: DECREMENT SCENE . . . . . . . . . . . . . . . .
0023: READ SCENE NUMBER . . . . . . . . . . . . . .
0040: MODEL REGISTER . . . . . . . . . . . . . . . . . .
0066: SAVE DATA . . . . . . . . . . . . . . . . . . . . . . . . .
0092: RESET . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
0080: READ MEASUREMENT . . . . . . . . . . . . . .
1060: SET PARAMETER . . . . . . . . . . . . . . . . . . .
1070: READ PARAMETER . . . . . . . . . . . . . . . . .
1100: SET JUDGEMENT OUTPUT EXPRESSION
CRITERIA . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
1110: READ JUDGEMENT OUTPUT EXPRESSION
CRITERIA . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
1210: READ POSITION . . . . . . . . . . . . . . . . . . . .
1220: READ JUDGEMENT OUTPUT EXPRESSION
RESULT . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
1221: READ DATA OUTPUT EXPRESSION
RESULT . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Output Format . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Sample Ladder Program . . . . . . . . . . . . . . . . . . . . . . . .
179
180
180
183
184
185
188
161
Communications Settings
6-1
Communications Settings
6-1-1
FlowCharts
Section 6-1
Select Host Link for the communications mode to communicate
in Host Link format with a Programmable Controller or other host
device via the RS-232C port.
Set Mode
Command inputs cannot be received.
Monitor Mode
Command inputs can be received, but measurement results are
not output to external devices. If a command to read a set value is
input, that value will be output.
Run Mode
Both command input and measurement result output are supported.
Note
1. The output of data after measurement is performed in Run
mode, will continue until all of the data has been output,
even if the mode is changed. Data output will not be interrupted.
2. The flow charts given here assume that the Programmable
Controller mode check has been set to “OFF.” → 167
162
Section 6-1
Communications Settings
I/O via RS-232C Port
Commands for the F150 are written to the Read Area in the Programmable Controller. The F150 will automatically read these
commands, execute them, and write any results to the Write
Area.
F150
Programmable Controller
Unit No.: 00 (fixed)
Checks Read Area for a
command.
Returns command.
Command sent to clear
Read Area.
* The rest of the operation
is not performed if the command format is incorrect.
Read Area cleared.
Executes command.
*Terminal block BUSY terminal turned ON during command execution.
No
Command
requires output of
results?
Yes
Writes data to Write Area.
*A timeout error will occur if there is
no response within 5 s. An error message will appear on the screen and
the error terminal will turn ON.
Returns write completed
response.
163
Section 6-1
Communications Settings
Inputting Measurement Trigger from STEP Terminal
F150
Programmable Controller
STEP signal input.
Unit No.: 00 (fixed)
Executes measurement.
*Terminal block BUSY terminal
turned ON during measurements.
Writes data to Write Area.
Returns write completed
response.
End
*A timeout error will occur if there is no response within 5 s. An error
message will appear on the screen and the error terminal will turn ON.
164
Section 6-1
Communications Settings
Using TXD Instructions
Commands are sent from the Programmable Controller to the
F150 using TXD instructions in the Programmable Controller’s
ladder program instead of the Read Area.
If TXD instructions are to be used to send commands, set the
Read Area to “None.”
Programmable Controller
F150
Unit No.: 00 (fixed)
Executes command.
Send the TXD
instruction.
*Set the number of bytes of send
data to 10. (Words that are not
included in the command format
must be set to 0.)
*Terminal block BUSY terminal
turned ON during command
execution.
No
Command
requires output of
results?
Yes
Writes data to Write Area.
Returns write completed
response.
End
*A timeout error will occur if there is no response within 5 s.
An error message will appear on the screen and the error
terminal will turn ON.
165
Section 6-1
Communications Settings
6-1-2
Communications Settings
Baud Rate and Communications Mode
The following explains how to set the baud rate, data length, and
other communications specifications.
The same communications settings must be used on both the
F150 and the external device (Programmable Controller).
Item
Setting
Use the same
settings
g on the
P
bl
Programmable
Controller.
Controller
Baud rate
2,400/4,800/9,600/19,200/
38,400* (bps)
Data length
7, 8* (bits)
Parity bits
None*, even, odd
Stop bits
1*, 2 (bits)
Delimiter
CR*, LF, CR+LF
Mode
Normal*, Host Link, Menu. Select Host Link
Use at a baud
rate of 9,600
bps or less.
Note The default settings are marked with asterisks (*).
Procedure
1 Go to SYS/Communications/RS-232C.
2 Set the required items.
3 Select End to exit this screen.
166
Section 6-1
Communications Settings
Setting the Read and Write Areas in the Programmable
Controller
This section explains how to set the Read Area from which the
F150 reads commands and the Write Area to which the F150
outputs results. Both of these areas are in the memory of the Programmable Controller.
Item
Selection
Read Area
Select the Read Area from which the
F150 reads commands.
I/O*, HR (holding relay), LR (link relay),
DM (data memory), None (See note 2.)
Begin read word
Set the first word to read in area
specified above (0 to 9995). The
default setting is 0.
Write Area
Select the Write Area to which the
F150 outputs results.
I/O*, HR (holding relay), LR (link relay),
DM (data memory), None (See note 3.)
Begin write word
Programmable
Controller mode
check
Note
Set the first word to write in the area
specified above (0 to 9996). The
default is 100.
ON*
Checks the mode of the Programmable
Controller when the F150 enters
Monitor or Run mode. Measurement
will not be performed unless the
Programmable Controller is in Monitor
mode. (An error message will be
displayed.)
OFF
Sends a command to the
Programmable Controller to change
mode to Monitor mode when the F150
enters Monitor or Run mode.
1. The default settings are marked with asterisks (*).
2. When the read area setting is “None,” the F150 will not read
data. However, TXD instructions are received.
3. When the write area setting is “None,” the F150 will not output data.
Procedure
1 Go to SYS/Communications/Host link.
2 Set the required items.
167
Section 6-2
Command Tables
3 Select End to exit this screen.
6-2
Command Tables
The following commands can be input from the host device to the
F150.
Set the command to be executed in the Read Area of the Programmable Controller.
Commands that Control F150 Operation
The following commands control F150 operation.
Command code
168
Function
Page
0010
Executes one measurement.
170
0011
Starts continuous measurement.
170
0012
Stops continuous measurement.
170
0020
Changes to a specified scene number.
170
0021
Increases the displayed scene number
by one.
171
0022
Decreases the displayed scene number
by one.
171
0040
Registers the model.
171
0066
Saves all data to flash memory.
172
0092
Resets the F150.
172
Section 6-2
Command Tables
Commands that Read Measurement Results
The following commands read the results of the most recent
measurement.
Command code
Function
Page
0080
Reads measurement results of the
measurement region.
172
1210
Reads distances scrolled for position
displacement compensation.
180
1220
Reads calculation results for judgement
output expressions.
183
1221
Reads calculation results for data output
expressions.
184
Commands that Read Current Settings
The following commands read settings such as evaluation criteria. F150 operation can be controlled from the host while monitoring F150 settings.
Command code
Function
Page
0023
Reads number of currently displayed
scene.
171
1070
Reads parameters for measurement
region.
178
1110
Reads evaluation criteria for judgement
output expressions.
180
Commands that Change F150 Settings
The following commands perform settings such as for evaluation
criteria. F150 operation can be controlled from the host while
monitoring F150 settings.
Command code
Function
Page
1060
Sets parameters for measurement
region.
175
1100
Sets evaluation criteria for judgement
output expressions.
179
169
Section 6-3
Input Format
6-3
Input Format
This section explains the command formats in order of the command codes. Commands are input in BCD. Set the commands
starting from the begin read word of the Read Area. The “-” indicates that either 0 or 1 can be set.
6-3-1
0010: ONE MEASUREMENT
Executes one measurement.
Input
Begin
g read
d
word
+0
Bits
15 to 12
0000
11 to 8
0000
Setting
g
7 to 4
0001
3 to 0
0000
Command code
Set all bits in words +1 to +4 to 0.
The measurement results are output. → p 185
6-3-2
0011: CONTINUOUS MEASUREMENT
Starts continuous measurement.
Input
Begin
g read
d
word
+0
Bits
15 to 12
0000
11 to 8
0000
Setting
g
7 to 4
0001
3 to 0
0001
Command code
Set all bits in words +1 to +4 to 0.
The measurement results are output. → p 185
6-3-3
0012: STOP MEASUREMENT
Stops continuous measurement.
Input
Begin
g read
word
d
+0
Bits
15 to 12
0000
11 to 8
0000
Setting
g
7 to 4
0001
3 to 0
0010
Command code
Set all bits in words +1 to +4 to 0.
6-3-4
0020: SWITCH SCENE
Switches to a specified scene number.
Input
Begin
g read
word
d
Bits
15 to 12
11 to 8
Setting
g
7 to 4
3 to 0
+0
0000
0000
0010
0000
Command code
+1
0000
0000
10’s digit
1’s digit
Scene No. (00 to 15)
Set all bits in words +2 to +4 to 0.
170
Section 6-3
Input Format
6-3-5
0021: INCREMENT SCENE
Increments the current scene number.
If the current scene number is 15, switches to scene 0.
Input
Begin
g read
word
d
+0
Bits
15 to 12
0000
11 to 8
0000
Setting
g
7 to 4
0010
3 to 0
0001
Command code
Set all bits in words +1 to +4 to 0.
6-3-6
0022: DECREMENT SCENE
Decrements the current scene number.
If the current scene number is 0, switches to scene 15.
Input
Begin
g read
word
d
+0
Bits
15 to 12
0000
11 to 8
0000
Setting
g
7 to 4
0010
3 to 0
0010
Command code
Set all bits in words +1 to +4 to 0.
6-3-7
0023: READ SCENE NUMBER
Reads the currently displayed scene number.
Input
Begin
g read
d
word
+0
Bits
15 to 12
0000
11 to 8
0000
Setting
g
7 to 4
0010
3 to 0
0011
Command code
Set all bits in words +1 to +4 to 0.
Output
Begin
g
write
it word
d
Bits
15 to 12
11 to 8
0000
3 to 0
+0
Write Flag
+1
0000
0000
10’s digit
1’s digit
Scene No. (00 to 15)
Write Flag: Changes between 0000 and 1111 each time data is output.
Monitor the flag to check if the data has been written.
6-3-8
0000
Setting
g
7 to 4
0000
Write Flag
0040: MODEL REGISTER
Re-registers the model based on the measurement image input
immediately before. Only valid when the measurement method
for the specified region is gray search or precise search. If any
other regions are specified the command will be ignored.
Input
Begin
g read
word
d
Bits
15 to 12
11 to 8
Setting
g
7 to 4
3 to 0
+0
0000
0000
0100
0000
Command code
+1
0000
0000
10’s digit
1’s digit
Region No. (00 to 15)
Set all bits in words +2 to +4 to 0.
171
Section 6-3
Input Format
6-3-9
0066: SAVE DATA
Saves all data to flash memory.
Input
Begin
g read
word
d
+0
Bits
15 to 12
0000
11 to 8
Setting
g
7 to 4
0000
0110
3 to 0
0110
Command code
Set all bits in words +1 to +4 to 0.
6-3-10 0092: RESET
Resets the F150.
Input
Begin
g read
word
d
+0
Bits
15 to 12
0000
11 to 8
Setting
g
7 to 4
0000
1001
3 to 0
0010
Command code
Set all bits in words +1 to +4 to 0.
6-3-11 0080: READ MEASUREMENT
Reads measurement results for the region measured last.
Input
Begin
g read
d
word
Bits
15 to 12
11 to 8
Setting
g
7 to 4
3 to 0
+0
0000
0000
1000
0000
Command code
+1
10’s digit
of region
number
1’s digit of
region
number
10’s digit
of data
type
1’s digit of
data type
Region No. (00 to 15)
Data type (00 to 13)
Set all bits in words +1 to +4 to 0.
Output
Begin
g
write
it word
d
Bits
15 to 12
11 to 8
Setting
g
7 to 4
3 to 0
+0
Write Flag
0000
0000
0000
Write Flag
+1
1,000’s
digit
100’s digit
10’s digit
1’s digit
Rightmost 4 digits of
integral portion.
+2
Sign
1,000,000
’s digit
100,000’s
digit
10,000’s
digit
Leftmost 3 digits of
integral portion and
sign.
+3
0000
1st
decimal
2nd
decimal
3rd
decimal
Decimal portion
Write Flag: Changes between 0000 and 1111 each time data is output.
Monitor the flag to check if the data has been written.
Sign: Positive: 0000, Negative: 1111
172
Section 6-3
Input Format
Data Types
The data types that can be read will vary according to the measurement method for the specified region.
Binary Center of Gravity and Area, Binary Center of Gravity and Axis
Angle
Parameter
Meaning
00
Judgement result (0: OK, –1: NG, –2: no measurement)
01
X coordinate of measured center of gravity
02
Y coordinate of measured center of gravity
03
X coordinate of reference center of gravity
04
Y coordinate of reference center of gravity
05
Displacement in X direction (measured X coordinate of
center of gravity – reference X coordinate of center of
gravity)
06
Displacement in Y direction (measured Y coordinate of
center of gravity – reference Y coordinate of center of
gravity)
07
Measured value for area
08
Reference value for area
09
Difference between reference and measured area
10
Inverted area (area of measurement region – measured
area)
11
Measured axis angle
12
Reference axis angle
13
Axis displacement (measured axis angle – reference
axis angle)
Note Parameters 11 to 13 are only used when measurement method
is binary center of gravity and axis angle.
Gray Edge Position
Parameter
Meaning
00
Judgement result (0: OK, –1: NG, –2: no measurement)
01
Measured edge coordinate
02
Reference edge coordinate
03
Displacement (measured coordinate – reference
coordinate)
173
Section 6-3
Input Format
Surface Defect
Parameter
Meaning
00
Judgement result (0: OK, –1: NG, –2: no measurement)
01
Measured defect
02
Maximum density value
03
Minimum density value
Gray Search, Precise Search
Parameter
Meaning
00
Judgement result (0: OK, –1: NG, –2: no measurement)
01
Measured X coordinate
02
Measured Y coordinate
03
Reference X coordinate
04
Reference Y coordinate
05
Displacement in X direction (measured X coordinate –
reference X coordinate)
06
Displacement in Y direction (measured Y coordinate –
reference Y coordinate)
07
Correlation value
Edge Pitch
Parameter
174
Meaning
00
Judgement result (0: OK, –1: NG, –2: no measurement)
01
Number of detected objects
02
Average pitch
03
Maximum pitch
04
Minimum pitch
05
Average width
06
Maximum width
07
Minimum width
Section 6-3
Input Format
6-3-12 1060: SET PARAMETER
Sets parameters for measurement regions.
Input
Begin
g read
word
d
Bits
15 to 12
11 to 8
Setting
g
7 to 4
3 to 0
+0
0001
0000
0110
0000
Command code
+1
10’s digit
of region
number
1’s digit of
region
number
10’s digit
of data
type
1’s digit of
data type
Region No. (00 to 15)
+2
1,000’s
digit
100’s digit
10’s digit
1’s digit
Rightmost 4 digits of
integral portion of
setting data.
+3
Sign
1,000,000
’s digit
100,000’s
digit
10,000’s
digit
Leftmost 3 digits of
integral portion of
setting data and sign.
+4
0000
1st
decimal
2nd
decimal
3rd
decimal
Decimal portion of
setting data.
Data type (00 to 14)
175
Section 6-3
Input Format
Data Types
The data types that can be set will vary according to the measurement method for the specified region.
Binary Center of Gravity and Area, Binary Center of Gravity and Axis
Angle
Parameter
Meaning
00
Upper limit of X coordinate of center of gravity
(–9,999.999 to 9,999.999)
01
Lower limit of X coordinate of center of gravity
(–9,999.999 to 9,999.999)
02
Upper limit of Y coordinate of center of gravity
(–9,999.999 to 9,999.999)
03
Lower limit of Y coordinate of center of gravity
(–9,999.999 to 9,999.999)
04
Upper limit of area (0 to 9,999,999.999)
05
Lower limit of area (0 to 9,999,999.999)
06
Upper-left X coordinate of region (0 to 511)
07
Upper-left Y coordinate of region (0 to 483)
08
Lower-right X coordinate of region (0 to 511)
09
Lower-right Y coordinate of region (0 to 483)
10
Upper limit of binary level (0 to 255)
11
Lower limit of binary level (0 to 255)
12
Binary level inversion (0: not inverted, 1: inverted)
13
Upper limit of axis angle (–180.000 to 180.000)
14
Lower limit of axis angle (–180.000 to 180.000)
Note Parameters 13 and 14 are only used when measurement
method is binary center of gravity and axis angle.
Gray Edge Position
Parameter
176
Meaning
00
Upper limit of position (–9,999.999 to 9,999.999)
01
Lower limit of position (–9,999.999 to 9,999.999)
02
Upper-left X coordinate of region (0 to 511)
03
Upper-left Y coordinate of region (0 to 483)
04
Lower-right X coordinate of region (0 to 511)
05
Lower-right Y coordinate of region (0 to 483)
06
Edge search direction (↑: 0, ↓: 1, →: 2, ←: 3)
07
Edge color (Light → Dark: 0, Dark → Light: 1)
08
Level (0 to 100)
Section 6-3
Input Format
Gray Search, Precise Search
Parameter
Meaning
00
Upper limit of X coordinate (–9,999.999 to 9,999.999)
01
Lower limit of X coordinate (–9,999.999 to 9,999.999)
02
Upper limit of Y coordinate (–9,999.999 to 9,999.999)
03
Lower limit of Y coordinate (–9,999.999 to 9,999.999)
04
Upper limit of correlation value (0 to 100)
05
Lower limit of correlation value (0 to 100)
06
Upper-left X coordinate of search region (0 to 511)
07
Upper-left Y coordinate of search region (0 to 483)
08
Lower-right X coordinate of search region (0 to 511)
09
Lower-right Y coordinate of search region (0 to 483)
10
X coordinate of reference position (0 to 511)
11
Y coordinate of reference position (0 to 483)
12
Search speed (0: LOW → 1 → 2 → 3 → 4: HIGH)
Edge Pitch
Parameter
Meaning
00
Upper limit of number of objects (0 to 255)
01
Lower limit of number of objects (0 to 255)
02
Upper limit of pitch (0 to 9,999.999)
03
Lower limit of pitch (0 to 9,999.999)
04
Upper limit of width (0 to 9,999.999)
05
Lower limit of width (0 to 9,999.999)
06
Upper-left X coordinate of region (0 to 511)
07
Upper-left Y coordinate of region (0 to 483)
08
Lower-right X coordinate of region (0 to 511)
09
Lower-right Y coordinate of region (0 to 483)
10
Counted object color (White: 0, Black: 1)
11
Edge level (0 to 100)
12
Minimum level (0 to 255)
177
Section 6-3
Input Format
Surface Defect
Parameter
Meaning
00
Defect (0 to 255)
01
Upper limit of density value (0 to 255)
02
Lower limit of density value (0 to 255)
03
Element size (4 to 80)
04
Compare pitch (1 to 6)
05 to 10
See note
Note The meanings of parameters 5 to 10 vary according to the shape
of the region.
Parameter
Box
Line
Circumference
Arc
05
Upper-left X
coordinate of
region (0 to 511)
X coordinate of
start point (0 to
511)
X coordinate of
center (0 to 511)
X coordinate of
center (0 to 511)
06
Upper-left Y
coordinate of
region (0 to 483)
Y coordinate of
start point (0 to
483)
Y coordinate of
center (0 to 483)
Y coordinate of
center (0 to 483)
07
Lower-right X
coordinate of
region (0 to 511)
X coordinate of
end point (0 to
511)
Radius (1 to 512)
Radius (1 to 512)
08
Lower-right Y
coordinate of
region (0 to 483)
Y coordinate of
end point (0 to
483)
Width (1 to 64)
Width (1 to 64)
09
---
Width (1 to 64)
---
Start angle
(–180.00 to
180.00)
10
---
---
---
End angle
(–180.00 to
180.00)
6-3-13 1070: READ PARAMETER
Reads parameters for measurement regions. The data types are
the same as for command 1060. Refer to the parameter lists
above.
Input
Begin
g read
word
d
Bits
15 to 12
11 to 8
Setting
g
7 to 4
3 to 0
+0
0001
0000
0111
0000
Command code
+1
10’s digit
of region
number
1’s digit of
region
number
10’s digit
of data
type
1’s digit of
data type
Region No. (00 to 15)
Set all bits in words +2 to +4 to 0.
178
Data type (00 to 14)
Section 6-3
Input Format
Output
Begin
g
it word
d
write
Bits
15 to 12
11 to 8
Setting
g
7 to 4
3 to 0
+0
Write Flag
0000
0000
0000
Write Flag
+1
1,000’s
digit
100’s digit
10’s digit
1’s digit
Rightmost 4 digits of
integral portion
+2
Sign
1,000,000
’s digit
100,000’s
digit
10,000’s
digit
Leftmost 3 digits of
integral portion and
sign
+3
0000
1st
decimal
2nd
decimal
3rd
decimal
Decimal portion
Write Flag: Changes between 0000 and 1111 each time data is output.
Monitor the flag to check if the data has been written.
Sign: Positive: 0000, Negative: 1111
6-3-14 1100: SET JUDGEMENT OUTPUT EXPRESSION
CRITERIA
Sets evaluation criteria for judgement output expressions.
Input
Begin
g read
d
word
Bits
15 to 12
11 to 8
Setting
g
7 to 4
3 to 0
+0
0001
0001
0000
0000
Command code
+1
0000
Type
10’s digit
1’s digit
Judgement number (00
to 15) and type
+2
1,000’s
digit
100’s digit
10’s digit
1’s digit
Rightmost 4 digits of
integral portion
+3
Sign
1,000,000
’s digit
100,000’s
digit
10,000’s
digit
Leftmost 3 digits of
integral portion and
sign
+4
0000
1st
decimal
2nd
decimal
3rd
decimal
Decimal portion
Type:
Sign:
Upper limit: 0000, Lower limit: 0001
Positive: 0000, Negative: 1111
179
Section 6-3
Input Format
6-3-15 1110: READ JUDGEMENT OUTPUT
EXPRESSION CRITERIA
Reads evaluation criteria for judgement output expressions.
Input
Begin
g read
d
word
Bits
15 to 12
11 to 8
Setting
g
7 to 4
3 to 0
+0
0001
0001
0001
0000
Command code
+1
0000
Type
10’s digit
of judgement
number
1’s digit of
judgement
number
Judgement number (00
to 15) and type
Set all bits in words +2 to +4 to 0.
Type:
Upper limit: 0000, Lower limit: 0001
Output
Begin
g
write
it word
d
Bits
15 to 12
11 to 8
Setting
g
7 to 4
3 to 0
+0
Write Flag
0000
0000
0000
Write Flag
+1
1,000’s
digit
100’s digit
10’s digit
1’s digit
Rightmost 4 digits of
integral portion
+2
Sign
1,000,000
’s digit
100,000’s
digit
10,000’s
digit
Leftmost 3 digits of
integral portion and
sign.
+3
0000
1st
decimal
2nd
decimal
3rd
decimal
Decimal portion
Write Flag: Changes between 0000 and 1111 each time data is output.
Monitor the flag to check if the data has been written.
Sign: Positive: 0000, Negative: 1111
6-3-16 1210: READ POSITION
Reads measurement values related to position displacement
compensation for most recent measurement.
Input
Begin
g read
word
d
Bits
15 to 12
11 to 8
Setting
g
7 to 4
3 to 0
+0
0001
0010
0001
0000
Command code
+1
0000
Region
No.
10’s digit
of data
type
1’s digit of
data type
Region No. (0 or 1; to
read displacement: 2)
180
Data type (00 to 13)
Section 6-3
Input Format
Output
Begin
g
write
it word
d
Bits
15 to 12
11 to 8
Setting
g
7 to 4
3 to 0
+0
Write Flag
0000
0000
0000
Write flag
+1
1,000’s
digit
100’s digit
10’s digit
1’s digit
Rightmost 4 digits of
integral portion
+2
Sign
1,000,000
’s digit
100,000’s
digit
10,000’s
digit
Leftmost 3 digits of
integral portion and
sign
+3
0000
1st
decimal
2nd
decimal
3rd
decimal
Decimal portion
Write Flag: Changes between 0000 and 1111 each time data is output.
Monitor the flag to check if the data has been written.
Sign: Positive: 0000, Negative: 1111
Data Types
The data types that can be read will vary according to the measurement method for the specified region.
Gray Edge Position
Parameter
Meaning
00
Judgement result (0: OK, –1: NG, –2: no measurement)
01
Measured edge coordinate
02
Reference edge coordinate
03
Displacement (measured coordinate – reference
coordinate)
Position Displacement
Parameter
Meaning
00
Displacement in X direction (reference X coordinate –
measured X coordinate)
01
Displacement in Y direction (reference Y coordinate –
measured Y coordinate)
02
Angle displacement (reference angle – measured
angle)
181
Section 6-3
Input Format
Binary Center of Gravity and Area, Binary Center of Gravity and Axis
Angle
Parameter
Meaning
00
Judgement result (0: OK, –1: NG, –2: no measurement)
01
X coordinate of measured center of gravity
02
Y coordinate of measured center of gravity
03
X coordinate of reference center of gravity
04
Y coordinate of reference center of gravity
05
Displacement in X direction (measured X coordinate of
center of gravity – reference X coordinate of center of
gravity)
06
Displacement in Y direction (measured Y coordinate of
center of gravity – reference Y coordinate of center of
gravity)
07
Measured value for area
08
Reference value for area
09
Difference between reference and measured area
10
Inverted area (area of measurement region – measured
area)
11
Measured axis angle
12
Reference axis angle
13
Axis displacement (measured axis angle – reference
axis angle)
Note Parameters 11 to 13 are only used when the measurement
method is binary center of gravity and axis angle.
Gray Search
Parameter
182
Meaning
00
Judgement result (0: OK, –1: NG, –2: no measurement)
01
Measured X coordinate
02
Measured Y coordinate
03
Reference X coordinate
04
Reference Y coordinate
05
Displacement in X direction (measured X coordinate –
reference X coordinate)
06
Displacement in Y direction (measured Y coordinate –
reference Y coordinate)
07
Correlation value
Section 6-3
Input Format
6-3-17 1220: READ JUDGEMENT OUTPUT
EXPRESSION RESULT
Reads calculation results of judgement output expressions for
the most recent measurement.
Input
Begin
g read
word
d
Bits
15 to 12
11 to 8
Setting
g
7 to 4
3 to 0
+0
0001
0010
0010
0000
Command code
+1
0000
0000
10’s digit
1’s digit
Judgement number (00
to 15)
Set all bits in words +2 to +4 to 0.
Output
Begin
g
write
it word
d
Bits
15 to 12
11 to 8
Setting
g
7 to 4
3 to 0
+0
Write Flag
0000
0000
0000
Write Flag
+1
1,000’s
digit
100’s digit
10’s digit
1’s digit
Rightmost 4 digits of
integral portion of
calculation result
+2
Sign
1,000,000
’s digit
100,000’s
digit
10,000’s
digit
Leftmost 3 digits of
integral portion of
calculation result and
sign
+3
0000
1st
decimal
2nd
decimal
3rd
decimal
Decimal portion
Write Flag: Changes between 0000 and 1111 each time data is output.
Monitor the flag to check if the data has been written.
Sign: Positive: 0000, Negative: 1111
183
Section 6-3
Input Format
6-3-18 1221: READ DATA OUTPUT EXPRESSION
RESULT
Reads calculation results of data output expressions for the most
recent measurement.
Input
Begin
g read
word
d
Bits
15 to 12
11 to 8
Setting
g
7 to 4
3 to 0
+0
0001
0010
0010
0001
Command code
+1
0000
0000
0000
1’s digit
Data number (0 to 7)
Set all bits in words +2 to +4 to 0.
Output
Begin
g
write
it word
d
Bits
15 to 12
11 to 8
Setting
g
7 to 4
3 to 0
+0
Write Flag
0000
0000
0000
Write Flag
+1
1,000’s
digit
100’s digit
10’s digit
1’s digit
Rightmost 4 digits of
integral portion
calculation result
+2
Sign
1,000,000
’s digit
100,000’s
digit
10,000’s
digit
Leftmost 3 digits of
integral portion of
calculation result and
sign
+3
0000
1st
decimal
2nd
decimal
3rd
decimal
Decimal portion
Write Flag: Changes between 0000 and 1111 each time data is output.
Monitor the flag to check if the data has been written.
Sign: Positive: 0000, Negative: 1111
184
Section 6-4
Output Format
6-4
Output Format
When a measurement is executed, the results are output in BCD
to the Write Area of the Programmable Controller. The output will
be in order, starting with the smallest output number.
Write Flag switches between 0000 and 1111 each time data is output.
Monitor this flag to see when measurement results have been written.
Begin
g
write
it word
d
Bits
15 to 12
11 to 8
Setting
g
7 to 4
3 to 0
+0
Write Flag
0000
0000
0000
Write Flag
+1
1,000’s
digit
100’s digit
10’s digit
1’s digit
Rightmost 4 digits of
integral portion
+2
Sign
1,000,000
’s digit
100,000’s
digit
10,000’s
digit
Leftmost 3 digits of
integral portion and
sign
+3
0000
1st
decimal
2nd
decimal
3rd
decimal
Decimal portion
0000: Positive
1111: Negative
Calibrated values are output.
Measurements from –9,999,999.999 to 9,999,999.999 can be output.
Measurements less than –9,999,999.999 are output as “–9,999,999.999.”
Measurement greater than 9,999,999.999 are output as “9,999,999.999.”
When the output is set to a judgment, the output will be one of the following:
OK: 0
NG: –1
185
Section 6-4
Output Format
Data 2
Data 0
Example 1:
Calculation result of 143.250 for data output 0.
No setting for data output 1.
Calculation result of –6943.298 for data output 2.
Bits
Begin
g
write
it word
d
15 to 12
+0
0000
0000
0000
0000
Write Flag (0000)
+1
0000
0001
0100
0011
Rightmost 4 digits of integral
portion
+2
0000
0000
0000
0000
Leftmost 2 digits of integral
portion and sign
+3
0000
0010
0101
0000
Decimal portion
+4
0000
0000
0000
0000
Write Flag (0000)
+5
0110
1001
0100
0011
Rightmost 4 digits of integral
portion
+6
1111
0000
0000
0000
Leftmost 2 digits of integral
portion and sign
+7
0000
0010
1001
1000
Decimal portion
11 to 8
Setting
g
7 to 4
3 to 0
Output numbers for which settings have not been made are not
output (as data output 1 above).
186
Section 6-4
Output Format
Example 2:
If expressions are set for all data outputs (0 to 7), the measurement results will be output in two groups.
Group 1: Calculation results for data outputs 0 to 6.
Group 2: Calculation result for data output 7.
15 to 12
+0
0000
0000
0000
0000
Write Flag (0000)
+1
0000
0001
0100
0011
Rightmost 4 digits of integral
portion
+2
0000
0000
0000
0000
Leftmost 2 digits of integral
portion and sign
0000
0010
0101
0000
Decimal portion
+(4 x n) + 0
0000
0000
0000
0000
Write Flag (0000)
+(4 x n) + 1
0110
1001
0100
0011
Rightmost 4 digits of integral
portion
+(4 x n) + 2
1111
0000
0000
0000
Leftmost 2 digits of integral
portion and sign
+(4 x n) + 3
0000
0010
1001
1000
Decimal portion
+28
1111
0000
0000
0000
Write Flag (1111)
+29
0000
0001
0100
0011
Rightmost 4 digits of integral
portion
+30
0000
0000
0000
0000
Leftmost 2 digits of integral
portion and sign
+31
0000
0010
0101
0000
Decimal portion
+3
Group 1
Bits
Begin
g
write
it word
d
11 to 8
Setting
g
7 to 4
3 to 0
.
.
.
Group 2
.
.
.
187
Section 6-5
Sample Ladder Program
6-5
Sample Ladder Program
This section provides a sample ladder program for the OMRON
C200H/C200HS Programmable Controller.
In this program, the Run command is input from the Programmable Controller to the F150, and the judgement results are output back to the Programmable Controller from the F150.
Programmable Controller Settings
Use the following communications settings for a Host Link Unit
on the Programmable Controller, or the Host Link port built into
the CPU Unit.
Refer to the Programmable Controller manuals for detailed setting instructions.
Item
Setting
Communications
protocol
SYSWAY (Host Link)
1:1/1:N
1:N
Unit no.
00
Baud rate
Make the same settings
g as for the F150.
Data length
Parity bits
Stop bits
F150 Settings
Settings for Communications Specifications
Item
Baud rate
Data length
Setting
Make the same settings
g as for the
P
Programmable
bl Controller.
C t ll
Parity bits
Stop bits
Read Area
DM
Begin read word
0100
Write Area
DM
Begin write word
0105
Settings for Output Expressions
Go to Expression/Data, and make the following settings in data
0 and data 1.
Data 0: RO.JG
Data 1: R1.JG
188
Sample Ladder Program
Section 6-5
Data Area Allocations
DM 0100
DM 0101
Input Command Area
(Read Area from F150)
DM 0102
DM 0103
DM 0104
Initial value of #0000 is stored
in DM 0100
DM 0105
Results Storage Area for data output 0
DM 0106
DM 0107
DM 0108
DM 0109
DM 0110
DM 0111
DM 0112
Initial value of #0000 is stored in
DM 0106
Host Link Communications
Area
Results Storage Area for data output 1
Initial value of #0000 is stored in
DM 0110
DM 0200
DM 0201
Result Storage Area for
ANDW Instruction
189
Section 6-5
Sample Ladder Program
Ladder Diagram
00001
DIFU(13)
00100
00100
CMP(20)
DM0100
#0000
25506
MOV(21)
#0010
On the rising edge of the external switch (00001), the Programmable Controller confirms
that the Input Command Area is
cleared to 0, and writes the Run
command.
DM0100
25313
MOV(21)
DM0105
010
01015
DIFU(13)
00200
Change in Overwrite Flag for
data output 0 is detected.
DIFD(14)
00201
00200
00215
00201
00215
ANDW(34)
DM0106
#0001
DM0200
25506
00300
190
If the 1’s digit of data output 0 is
1, 00300 comes ON (=NG).
Section 6-5
Sample Ladder Program
00215
ANDW(34)
DM0110
#0001
DM0201
If the 1’s digit of data output 1 is
1, 00301 comes ON (=NG).
25506
00301
00300
00100
00315
00301
The OR result of NG’s for data
0 and data 1 is output to 00315.
This is saved until the next
measurement.
00315
191
SECTION 7
CompoBus/D Settings
This section describes the communications settings required when the F150 is used as a
CompoBus/D Slave.
CompoBus/D communications are only supported for the F150-C10E-2-DRT.
For details on the baud rate and node address settings, refer to the Setup Manual.
For detailed information relating to CompoBus/D, such as system configuration and cable
connections, refer to the CompoBus/D (DeviceNet) Operation Manual (W267).
7-1
7-2
7-3
7-4
7-5
7-6
Communications Settings . . . . . . . . . . . . . . . . . . . . . . .
194
7-1-1
7-1-2
197
Communications Settings . . . . . . . . . . . . . . . . . . . .
Confirming CompoBus/D Communications Settings
.........................................
200
Input Format . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
201
7-2-1
7-2-2
Basic Mode . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Expand Mode . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
201
203
Output Format . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
220
7-3-1
7-3-2
7-3-3
7-3-4
7-3-5
222
223
224
224
Control Output (Word +0) . . . . . . . . . . . . . . . . . . .
Judgement Output (+1) . . . . . . . . . . . . . . . . . . . . . .
F150 Status Output (+2) . . . . . . . . . . . . . . . . . . . . .
Expand Command Response Output (+3 to 7) . . . .
Data Output in BCD or Binary (+3 to 26 or +8 to 31)
.........................................
225
Timing Charts . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
228
7-4-1
7-4-2
Basic Mode . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Expand Mode . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
228
231
Allocation Charts . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Sample Ladder Program . . . . . . . . . . . . . . . . . . . . . . . .
234
237
7-6-1
7-6-2
7-6-3
7-6-4
237
237
238
240
Programmable Controller Settings . . . . . . . . . . . . .
Allocations for Programmable Controller . . . . . . .
Timing Charts . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Ladder Program . . . . . . . . . . . . . . . . . . . . . . . . . . .
193
Communications Settings
7-1
Section 7-1
Communications Settings
The F150-C10E-2-DRT operates as a CompoBus/D Slave. Data
is automatically exchanged with the Master Unit using remote
I/O.
Set Mode
Command inputs cannot be received.
Monitor Mode
Command inputs can be received, but measurement results
(judgement output and data output) are not output to external
devices. Control output and F150 status output are supported,
however.
Run Mode
Both command input and output of measurement results are
supported.
194
Communications Settings
Section 7-1
Programmable Controller (Master)
Remote I/O
Communications
See the diagrams on the
next two pages for details
on the output and input
areas.
F150-C10E-2-DRT
F150-C10E-2-DRT
F150-C10E-2-DRT
195
Communications Settings
Section 7-1
Output Area
Set operational commands to be sent to the F150 here. Select
the input mode (Basic/Expand) in the communications specifications settings menu.
Basic
Word +0
Basic command (2 bytes)
Only a small number of allocated areas
are required.
Commands for measurement and scene
changing can be used.
Expand
Word +0
Word +1
Word +2
Word +3
Word +4
196
Expand
command
(10 bytes)
A variety of commands other than the
measurement command can be used,
such as parameter setting and reading
commands. Various F150’s functions can
be used.
Section 7-1
Communications Settings
Input Area
Measurement results are output from the F150 to this area.
Word +0
Control output (2 bytes)
Word +1
Judgement result output (2 bytes)
Word +2
F150 status output (2 bytes)
Word +3
Expand
command
response
output
(10 bytes)
Word +4
Word +5
Word +6
These outputs can be enabled or disabled. When the
“expand command response
output” is disabled, the data
output will be shifted up to
word +3.
Word +7
Word +8
Word +9
Word +10
Data output
(48 bytes)
to
Word +30
Word +31
7-1-1
Communications Settings
This section explains the setting methods required for communications specifications when performing communications with
the CompoBus/D.
Item
Input mode
Selections
Details
Basic
(default
setting)
Use this mode for measurement commands and
scene changing. The number of allocated areas
required in the Master in this mode is less than that
required in Expand mode (2 bytes).
Expand
In addition to measurement commands, commands
for reading and setting parameters are also
available. The number of allocated areas required in
this mode is greater than that required in Basic mode
(10 bytes).
197
Section 7-1
Communications Settings
Item
GATE terminal
control
Data output
Response output
Communications
errors (see below)
Selections
Details
Measure
output
(default setting)
The GATE terminal on the terminal block is used as
a timing signal for obtaining measurement results
output from the terminal block.
Any output
The GATE terminal on the terminal block is
controlled by commands, and used as required by
the user. (e.g.: Lighting control, etc.)
OFF
(default
setting)
Measurement results (data) are not output. There
are a fewer number of output bytes and so the
number of allocated areas can be decreased.
BCD
Measurement results (data) are output in BCD
format.
Binary
Measurement results (data) are output in binary
format.
OFF
(default
setting)
Responses to expand commands are not output.
There are a fewer number of output bytes and so the
number of allocated areas can be decreased.
However, even if commands for reading setting
values are input, the values will not be output.
Normally, if the input mode is Basic mode, this
setting should be OFF.
ON
Responses to expand commands are output. The
command code for the executed command will be
entered in the first read word. Commands that are
executed can be monitored with this word.
Keep
(default
setting)
When a network error occurs, the data that was sent
from the Programmable Controller to the F150
immediately before the error occurred (in the output
area) is saved, and the F150 continues operation
based on this data.
Clear
When a network error occurs, the data sent from the
Programmable Controller to the F150 is cleared to 0,
and the F150 continues operation based on this
data. The Command Enable Bit will also be reset to
0. Therefore, when the network error has been
cleared, if the output area of the Programmable
Controller is in the same state as it was when the
error occurred, the same command will be executed
twice.
Communications Errors
When a network error occurs, the status of data input from the
Programmable Controller to the F150 via the network may
change. Therefore, select the way the status of data input from
the Programmable Controller to the F150 is to be defined when
an error occurs.
198
Communications Settings
Section 7-1
Note Select CompoBus/D as the data output destination in SYS/Output. If RS-232C is selected, no value will be output to CompoBus/D regardless of whether BCD or binary is set for the data
output format. → p. 107
Procedure
1 Go to SYS/Communications/CompoBus/D Set.
2 Set the required items.
3 Select End. A confirmation message will be displayed.
4 Select OK.
Note In order to register these settings it is necessary to save the settings to flash memory and restart the F150. Also, the number of
I/O bytes will change in accordance with the new settings. Therefore, restart the whole network. → p. 120
199
Section 7-1
Communications Settings
7-1-2
Confirming CompoBus/D Communications
Settings
CompoBus/D communications settings can be confirmed by displaying them on the screen. If an error occurs in CompoBus/D
communications, take note of the contents of this screen and
contact your OMRON representative.
Item
ID
Details
Vendor ID (A), product type (B), product code
(C).
47, 0, 203
(A) (B) (C)
Rev.
DeviceNet specifications version.
Serial number
Serial number for the model. (20200001 on)
Baud rate
Baud rate set with DIP switch.
Node address
Node address set with DIP switch.
Number of input
bytes
Depends on the input mode in the
CompoBus/D settings.
2: Basic; 10: Expand
Number of output
bytes
Depends on the data outputs and response
outputs in the CompoBus/D settings.
6: Data output OFF; Response OFF
16: Data output OFF; Response ON
54: Data output BCD or binary; Response OFF
64: Data output BCD or binary; Response ON
Procedure
1 Go to SYS/Communications/CompoBus/D ref.
2 Select OK to exit this screen.
200
Section 7-2
Input Format
7-2
Input Format
This section explains the format of commands that are set in the
output area of the Programmable Controller in order to control
F150 operation.
7-2-1
Basic Mode
The word numbers given here are the offset values from the first
word in the allocated area of the Master. The “-” indicates that
either 0 or 1 can be set without affecting the setting.
ONE MEASUREMENT
When bit 8 turns ON, one measurement is executed.
Bits
Word
15 to 12
+0
0000
11 to 8
–001
Setting
g
7 to 4
0000
3 to 0
----
Bit 8: one
measurement
CONTINUOUS MEASUREMENT
Starts continuous measurement. Measurements are continued
until the STOP MEASUREMENT is input. To input other commands, input the STOP MEASUREMENT command. If other
commands are input while continuous measurement is being
executed, continuous measurement will be stopped temporarily
and start up again once processing for the input command has
been completed.
Bits
Word
15 to 12
+0
0000
11 to 8
–000
Setting
g
7 to 4
1001
3 to 0
----
Bit 4: Start continuous
measurement
Bit 7: Command Enable
Bit
After the command has been input, set bit 7 to 0 to start measurement.
STOP MEASUREMENT
Stops continuous measurement.
Bits
Word
15 to 12
+0
0000
11 to 8
–000
Setting
g
7 to 4
1000
3 to 0
----
Bit 4: Stops continuous
measurement
Bit 7: Command Enable
Bit
201
Section 7-2
Input Format
SWITCH SCENE
Switches to a specified scene number.
Bits
Word
15 to 12
+0
0000
11 to 8
Setting
g
7 to 4
–000
1010
3 to 0
Scene
number
Bit 5: Switch scene
Bit 7: Command Enable
Bit
Specify a number in the range 0
to 15 in binary format.
MODEL REGISTER
Re-registers the model based on the measurement image input
immediately before. Only valid when the measurement method
for the specified region is gray search or precise search. If other
regions are specified, this command will be ignored.
Bits
Word
15 to 12
+0
0000
11 to 8
Setting
g
7 to 4
–000
1100
3 to 0
Region
No.
Bit 6: Register model
Bit 7: Command Enable
Bit
Specify a number in the range 0
to 15 in binary format.
GATE TERMINAL OUTPUT CONTROL
When “any output” has been selected for GATE terminal control
in the communications specifications setting menu, bit 11 will
control the GATE terminal. If the GATE terminal is used for measurement output, the status of bit 11 will be ignored.
Bits
Word
15 to 12
+0
Output area
----
11 to 8
*–0–
Word +0, bit 11
GATE terminal
Input area
202
Word +0, bit 11
Setting
g
7 to 4
----
3 to 0
----
Bit 11: GATE terminal
control
Section 7-2
Input Format
Area
Bits
Function
OUT
Bit 11
Controls the output from the user terminal (GATE terminal).
IN
TERMSTAT
The status of the GATE terminal will be reflected by the status
of word +0, bit 11 of the input area (TERMSTAT). Therefore,
the status of the GATE terminal can be obtained by
monitoring this bit. There will be a time lag before changes in
bit 11 of the output area are reflected in the GATE terminal
due to DeviceNet communications delays and the status of
the F150.
RESET
Resets the F150.
Bits
Word
15 to 12
+0
7-2-2
0000
11 to 8
–010
Setting
g
7 to 4
0000
3 to 0
0000
Bit 9: system reset
Expand Mode
Commands that Control F150 Operation
The following commands control F150 operation.
Command code
Function
Page
0010
Executes one measurement.
205
0011
Starts continuous measurement.
205
0012
Stops continuous measurement.
205
0020
Changes to a specified scene number.
206
0021
Increases the displayed scene number
by one.
206
0022
Decreases the displayed scene number
by one.
206
0040
Registers the model.
207
0066
Saves all data to flash memory.
207
0092
Resets the F150.
207
Commands that Read Measurement Results
The following commands read the results of the most recent
measurement.
Command code
Function
Page
0080
Reads measurement results of the
measurement region.
207
1210
Reads distances scrolled for position
displacement compensation.
215
1220
Reads calculation results for judgement
output expressions.
218
1221
Reads calculation results for data output
expressions.
218
203
Section 7-2
Input Format
Commands that Read Current Settings
The following commands read settings such as evaluation criteria. F150 operation can be controlled from the Master while monitoring F150 settings.
Command code
Function
Page
0023
Reads number of currently displayed
scene.
206
1070
Reads parameters for measurement
region.
213
1110
Reads evaluation criteria for judgement
output expressions.
214
Commands that Change F150 Settings
The following commands perform settings such as for evaluation
criteria. F150 operation can be controlled from the Master while
monitoring F150 settings.
Command code
Function
Page
1060
Sets parameters for measurement
region.
210
1100
Sets evaluation criteria for judgement
output expressions.
214
Commands that Control User Terminal (GATE) Output
Command code
Function
Page
1300
Turns user terminal (GATE) output
ON/OFF.
219
1301
Reads the status of the user terminal
(GATE).
220
Format
The word numbers given here are the offset values from the first
word in the allocated area of the Master. “-” indicates that either 0
or 1 can be entered without affecting the setting. Commands are
set in words +0 to +4. Word +0, bit 15 is a command trigger. Commands are executed when the status of this bit changes (0 ↔ 1).
Response
If the response output has been set to ON in the communications
specifications settings menu, a response will be output from the
F150 when a command has been completed. For commands
that are given here without responses, the content of the
response that is output in words +3 to +7 will be the same as for
the commands in +0 to +4.
204
Section 7-2
Input Format
Example: for measurement (0010) commands.
Bits
Word
15 to 12
+0
*000
11 to 8
0000
Setting
g
7 to 4
0001
3 to 0
0000
Command code
All the bits in words +1 to +4 set to 0.
Response
Bits
Word
15 to 12
11 to 8
Setting
g
7 to 4
3 to 0
+3
*000
0000
0001
0000
Command code
+4
0000
0000
0000
0000
All 0
+5
0000
0000
0000
0000
+6
0000
0000
0000
0000
+7
0000
0000
0000
0000
0010: ONE MEASUREMENT
Executes one measurement of the camera image.
Bits
Word
15 to 12
+0
*000
11 to 8
0000
Setting
g
7 to 4
0001
3 to 0
0000
Command code
Set all bits in words +1 to +4 to 0.
0011: CONTINUOUS MEASUREMENT
Starts continuous measurement.
To input other commands, input the STOP MEASUREMENT
command. If other commands are input while continuous measurement is being executed, continuous measurement will be
stopped temporarily and started up again once processing for
the input command has been completed.
Bits
Word
15 to 12
+0
*000
11 to 8
0000
Setting
g
7 to 4
0001
3 to 0
0001
Command code
Set all bits in words +1 to +4 to 0.
0012: STOP MEASUREMENT
Stops continuous measurement.
Bits
Word
15 to 12
+0
*000
11 to 8
0000
Setting
g
7 to 4
0001
3 to 0
0010
Command code
Set all bits in words +1 to +4 to 0.
205
Section 7-2
Input Format
0020: SWITCH SCENE
Switches to a specified scene number.
Bits
Word
15 to 12
11 to 8
Setting
g
7 to 4
3 to 0
+0
*000
0000
0010
0000
Command code
+1
0000
0000
10’s digit
1’s digit
Scene No. (00 to 15)
Set all bits in words +2 to +4 to 0.
0021: INCREMENT SCENE
Increments the current scene number.
If the current scene number is 15, switches to scene 0.
Bits
Word
15 to 12
+0
*000
11 to 8
0000
Setting
g
7 to 4
0010
3 to 0
0001
Command code
Set all bits in words +1 to +4 to 0.
0022: DECREMENT SCENE
Decrements the current scene number.
If the current scene number is 0, switches to scene 15.
Bits
Word
15 to 12
+0
*000
11 to 8
0000
Setting
g
7 to 4
0010
3 to 0
0010
Command code
Set all bits in words +1 to +4 to 0.
0023: READ SCENE NUMBER
Reads the scene number of the image being displayed.
Bits
Word
15 to 12
+0
*000
11 to 8
0000
Setting
g
7 to 4
0010
3 to 0
0011
Command code
Set all bits in words +1 to +4 to 0.
Response
Bits
Word
15 to 12
11 to 8
Setting
g
7 to 4
3 to 0
+3
*000
0000
0001
0011
Command code
+4
0000
0000
0000
0000
All 0
+5
0000
0000
10’s digit
1’s digit
Scene No. (00 to 15)
+6
0000
0000
0000
0000
All 0
+7
0000
0000
0000
0000
All 0
206
Section 7-2
Input Format
0040: MODEL REGISTER
Re-registers the model based on the measurement image input
immediately before. Only valid when the measurement method
for the specified region is gray search or precise search. If any
other regions are specified the command will be ignored.
Bits
Word
15 to 12
11 to 8
Setting
g
7 to 4
3 to 0
+0
*000
0000
0100
0000
Command code
+1
0000
0000
10’s digit
1’s digit
Region No. (00 to 15)
Set all bits in words +2 to +4 to 0.
0066: SAVE DATA
Saves all data to flash memory.
Bits
Word
15 to 12
+0
*000
11 to 8
Setting
g
7 to 4
0000
0110
3 to 0
0110
Command code
Set all bits in words +1 to +4 to 0.
0092: RESET
Resets the F150.
Bits
Word
15 to 12
+0
*000
11 to 8
Setting
g
7 to 4
0000
1001
3 to 0
0010
Command code
Set all bits in words +1 to +4 to 0.
0080: READ MEASUREMENT
Reads measurement results for the region measured last.
Bits
Word
15 to 12
11 to 8
Setting
g
7 to 4
3 to 0
+0
*000
0000
1000
0000
Command code
+1
10’s digit
of region
number
1’s digit of
region
number
10’s digit
of data
type
1’s digit of
data type
Region No. (00 to 15)
Data type (00 to 13)
Set all bits in words +2 to +4 to 0.
207
Section 7-2
Input Format
Response
Bits
Word
15 to 12
11 to 8
Setting
g
7 to 4
3 to 0
+3
*000
0000
1000
0000
Command code
+4
10’s digit
of region
number
1’s digit of
region
number
10’s digit
of data
type
1’s digit of
data type
Region No. (00 to 15)
+5
1,000’s
digit
100’s digit
10’s digit
1’s digit
Rightmost 4 digits of
integral portion.
+6
Sign
1,000,000
’s digit
100,000’s
digit
10,000’s
digit
Leftmost 3 digits of
integral portion and
sign.
+7
0000
1st
decimal
2nd
decimal
3rd
decimal
Decimal portion
Sign:
Data type (00 to 13)
Positive: 0000, Negative: 1111
Data Types
The data types that can be read will vary according to the measurement method for the specified region.
Binary Center of Gravity and Area, Binary Center of Gravity
and Axis Angle
Parameter
208
Meaning
00
Judgement result (0: OK, –1: NG, –2: no measurement)
01
X coordinate of measured center of gravity
02
Y coordinate of measured center of gravity
03
X coordinate of reference center of gravity
04
Y coordinate of reference center of gravity
05
Displacement in X direction (measured X coordinate of
center of gravity – reference X coordinate of center of
gravity)
06
Displacement in Y direction (measured Y coordinate of
center of gravity – reference Y coordinate of center of
gravity)
07
Measured value for area
08
Reference value for area
09
Difference between reference and measured area
10
Inverted area (area of measurement region – measured
area)
11
Measured axis angle
12
Reference axis angle
13
Axis displacement (measured axis angle – reference
axis angle)
Section 7-2
Input Format
Note Parameters 11 to 13 are only used when measurement method
is binary center of gravity and axis angle.
Gray Edge Position
Parameter
Meaning
00
Judgement result (0: OK, –1: NG, –2: no measurement)
01
Measured edge coordinate
02
Reference edge coordinate
03
Displacement (measured coordinate – reference
coordinate)
Surface Defect
Parameter
Meaning
00
Judgement result (0: OK, –1: NG, –2: no measurement)
01
Measured defect
02
Maximum density value
03
Minimum density value
Gray Search, Precise Search
Parameter
Meaning
00
Judgement result (0: OK, –1: NG, –2: no measurement)
01
Measured X coordinate
02
Measured Y coordinate
03
Reference X coordinate
04
Reference Y coordinate
05
Displacement in X direction (measured X coordinate –
reference X coordinate)
06
Displacement in Y direction (measured Y coordinate –
reference Y coordinate)
07
Correlation value
209
Section 7-2
Input Format
Edge Pitch
Parameter
Meaning
00
Judgement result (0: OK, –1: NG, –2: no measurement)
01
Number of detected objects
02
Average pitch
03
Maximum pitch
04
Minimum pitch
05
Average width
06
Maximum width
07
Minimum width
1060: SET PARAMETER
Sets parameters for measurement regions.
Bits
Word
15 to 12
11 to 8
Setting
g
7 to 4
3 to 0
+0
*001
0000
0110
0000
Command code
+1
10’s digit
of region
number
1’s digit of
region
number
10’s digit
of data
type
1’s digit of
data type
Region No. (00 to 15)
+2
1,000’s
digit
100’s digit
10’s digit
1’s digit
Rightmost 4 digits of
setting data.
+3
Sign
1,000,000
’s digit
100,000’s
digit
10,000’s
digit
Leftmost 3 digits of
setting data and sign.
+4
0000
1st
decimal
2nd
decimal
3rd
decimal
Decimal portion of
setting data.
210
Data type (00 to 14)
Section 7-2
Input Format
Data Types
The data types that can be set will vary according to the measurement method for the specified region.
Binary Center of Gravity and Area, Binary Center of Gravity
and Axis Angle
Parameter
Meaning
00
Upper limit of X coordinate of center of gravity
(–9,999.999 to 9,999.999)
01
Lower limit of X coordinate of center of gravity
(–9,999.999 to 9,999.999)
02
Upper limit of Y coordinate of center of gravity
(–9,999.999 to 9,999.999)
03
Lower limit of Y coordinate of center of gravity
(–9,999.999 to 9,999.999)
04
Upper limit of area (0 to 9,999,999.999)
05
Lower limit of area (0 to 9,999,999.999)
06
Upper-left X coordinate of region (0 to 511)
07
Upper-left Y coordinate of region (0 to 483)
08
Lower-right X coordinate of region (0 to 511)
09
Lower-right Y coordinate of region (0 to 483)
10
Upper limit of binary level (0 to 255)
11
Lower limit of binary level (0 to 255)
12
Binary level inversion (0: not inverted, 1: inverted)
13
Upper limit of axis angle (–180.000 to 180.000)
14
Lower limit of axis angle (–180.000 to 180.000)
Note Parameters 13 and 14 are only used when the measurement
method is binary center of gravity and axis angle.
Gray Edge Position
Parameter
Meaning
00
Upper limit of position (–9,999.999 to 9,999.999)
01
Lower limit of position (–9,999.999 to 9,999.999)
02
Upper-left X coordinate of region (0 to 511)
03
Upper-left Y coordinate of region (0 to 483)
04
Lower-right X coordinate of region (0 to 511)
05
Lower-right Y coordinate of region (0 to 483)
06
Edge search direction (↑: 0, ↓: 1, →: 2, ←: 3)
07
Edge color (Light → Dark: 0, Dark → Light: 1)
08
Level (0 to 100)
211
Section 7-2
Input Format
Gray Search, Precise Search
Parameter
Meaning
00
Upper limit of X coordinate (–9,999.999 to 9,999.999)
01
Lower limit of X coordinate (–9,999.999 to 9,999.999)
02
Upper limit of Y coordinate (–9,999.999 to 9,999.999)
03
Lower limit of Y coordinate (–9,999.999 to 9,999.999)
04
Upper limit of correlation value (0 to 100)
05
Lower limit of correlation value (0 to 100)
06
Upper-left X coordinate of search region (0 to 511)
07
Upper-left Y coordinate of search region (0 to 483)
08
Lower-right X coordinate of search region (0 to 511)
09
Lower-right Y coordinate of search region (0 to 483)
10
X coordinate of reference position (0 to 511)
11
Y coordinate of reference position (0 to 483)
12
Search speed (0: LOW → 1 → 2 → 3 → 4: HIGH)
Edge Pitch
Parameter
212
Meaning
00
Upper limit of number of objects (0 to 255)
01
Lower limit of number of objects (0 to 255)
02
Upper limit of pitch (0 to 9,999.999)
03
Lower limit of pitch (0 to 9,999.999)
04
Upper limit of width (0 to 9,999.999)
05
Lower limit of width (0 to 9,999.999)
06
Upper-left X coordinate of region (0 to 511)
07
Upper-left Y coordinate of region (0 to 483)
08
Lower-right X coordinate of region (0 to 511)
09
Lower-right Y coordinate of region (0 to 483)
10
Counted object color (White: 0, Black: 1)
11
Edge level (0 to 100)
12
Minimum level (0 to 255)
Section 7-2
Input Format
Surface Defect
Parameter
Meaning
00
Defect (0 to 255)
01
Upper limit of density value (0 to 255)
02
Lower limit of density value (0 to 255)
03
Element size (4 to 80)
04
Compare pitch (1 to 6)
05 to 10
See note
Note The meanings of parameters 5 to 10 vary according to the shape
of the region.
Parameter
Box
Line
Circumference
Arc
05
Upper-left X
coordinate of
region (0 to 511)
X coordinate of
start point (0 to
511)
X coordinate of
center (0 to 511)
X coordinate of
center (0 to 511)
06
Upper-left Y
coordinate of
region (0 to 483)
Y coordinate of
start point (0 to
483)
Y coordinate of
center (0 to 483)
Y coordinate of
center (0 to 483)
07
Lower-right X
coordinate of
region (0 to 511)
X coordinate of
end point (0 to
511)
Radius (1 to 512)
Radius (1 to 512)
08
Lower-right Y
coordinate of
region (0 to 483)
Y coordinate of
end point (0 to
483)
Width (1 to 64)
Width (1 to 64)
09
---
Width (1 to 64)
---
Start angle
(–180.00 to
180.00)
10
---
---
---
End angle
(–180.00 to
180.00)
1070: READ PARAMETER
Reads parameters for measurement regions. The data types are
the same as for command 1060. Refer to the parameter listed
above.
Bits
Word
15 to 12
11 to 8
Setting
g
7 to 4
3 to 0
+0
*001
0000
0111
0000
Command code
+1
10’s digit
of region
number
1’s digit of
region
number
10’s digit
of data
type
1’s digit of
data type
Region No. (00 to 15)
Data type (00 to 14)
Set all bits in words +2 to +4 to 0.
213
Section 7-2
Input Format
Response
Bits
Word
15 to 12
11 to 8
Setting
g
7 to 4
3 to 0
+3
*001
0000
0111
0000
Command code
+4
10’s digit
of region
number
1’s digit of
region
number
10’s digit
of data
type
1’s digit of
data type
Region No. (00 to 15)
+5
1,000’s
digit
100’s digit
10’s digit
1’s digit
Rightmost 3 digits of
integral portion.
+6
Sign
1,000,000
’s digit
100,000’s
digit
10,000’s
digit
Leftmost 3 digits of
integral portion and
sign.
+7
0000
1st
decimal
2nd
decimal
3rd
decimal
Decimal portion
Sign:
Data type (00 to 14)
Positive: 0000, Negative: 1111
1100: SET JUDGEMENT OUTPUT EXPRESSION CRITERIA
Sets evaluation criteria for judgement output expressions.
Bits
Word
15 to 12
11 to 8
Setting
g
7 to 4
3 to 0
+0
*001
0001
0000
0000
Command code
+1
0000
Type
10’s digit
1’s digit
Judgement number (00
to 15) and type
+2
1,000’s
digit
100’s digit
10’s digit
1’s digit
Rightmost 4 digits of
integral portion
+3
Sign
1,000,000
’s digit
100,000’s
digit
10,000’s
digit
Leftmost 3 digits of
integral portion and
sign
+4
0000
1st
decimal
2nd
decimal
3rd
decimal
Decimal portion
Type:
Sign:
Upper limit: 0000, Lower limit: 0001
Positive: 0000, Negative: 1111
1110: READ JUDGEMENT OUTPUT EXPRESSION CRITERIA
Reads evaluation criteria for judgement output expressions.
Bits
Word
15 to 12
11 to 8
Setting
g
7 to 4
3 to 0
+0
*001
0001
0001
0000
Command code
+1
0000
Type
10’s digit
of judgement
number
1’s digit of
judgement
number
Judgement number (00
to 15) and type
Type: Upper limit: 0000, Lower limit: 0001
Set all bits in words +2 to +4 to 0.
214
Section 7-2
Input Format
Response
Bits
Word
15 to 12
11 to 8
Setting
g
7 to 4
3 to 0
+3
*001
0001
0001
0000
Command code
+4
0000
Type
10’s digit
of judgement
number
1’s digit of
judgement
number
Judgement number (00
to 15) and type
Write Verification Flag
+5
1,000’s
digit
100’s digit
10’s digit
1’s digit
Rightmost 4 digits of
integral portion
+6
Sign
1,000,000
’s digit
100,000’s
digit
10,000’s
digit
Leftmost 3 digits of
integral portion and
sign.
+7
0000
1st
decimal
2nd
decimal
3rd
decimal
Decimal portion
Sign:
Positive: 0000, Negative: 1111
1210: READ POSITION
Reads measurement values related to position displacement
compensation for most recent measurement.
Bits
Word
15 to 12
11 to 8
Setting
g
7 to 4
3 to 0
+0
*001
0010
0001
0000
Command code
+1
0000
Region
number
10’s digit
of data
type
1’s digit of
data type
Region No. (0 to 1; to
read displacement: 2)
Data type (00 to 13)
Set all bits in words +2 to +4 to 0.
Response
Bits
Word
15 to 12
11 to 8
Setting
g
7 to 4
3 to 0
+3
*001
0010
0001
0000
Command code
+4
0000
Region
number
10’s digit
of data
type
1’s digit of
data type
Region No. (0 to 1; to
read displacement: 2)
+5
1,000’s
digit
100’s digit
10’s digit
1’s digit
Rightmost 4 digits of
integral portion
+6
Sign
1,000,000
’s digit
100,000’s
digit
10,000’s
digit
Leftmost 3 digits of
integral portion and
sign
+7
0000
1st
decimal
2nd
decimal
3rd
decimal
Decimal portion
Sign:
Data type (00 to 13)
Positive: 0000, Negative: 1111
215
Section 7-2
Input Format
Data Types
The data types that can be read will vary according to the measurement method for the specified region.
Gray Edge Position
Parameter
Meaning
00
Judgement result (0: OK, –1: NG, –2: no measurement)
01
Measured edge coordinate
02
Reference edge coordinate
03
Displacement (measured coordinate – reference
coordinate)
Position Displacement
Parameter
216
Meaning
00
Displacement in X direction (reference X coordinate –
measured X coordinate)
01
Displacement in Y direction (reference Y coordinate –
measured Y coordinate)
02
Angle displacement (reference angle – measured
angle)
Section 7-2
Input Format
Binary Center of Gravity and Area, Binary Center of Gravity
and Axis Angle
Parameter
Meaning
00
Judgement result (0: OK, –1: NG, –2: no measurement)
01
X coordinate of measured center of gravity
02
Y coordinate of measured center of gravity
03
X coordinate of reference center of gravity
04
Y coordinate of reference center of gravity
05
Displacement in X direction (measured X coordinate of
center of gravity – reference X coordinate of center of
gravity)
06
Displacement in Y direction (measured Y coordinate of
center of gravity – reference Y coordinate of center of
gravity)
07
Measured value for area
08
Reference value for area
09
Difference between reference and measured area
10
Inverted area (area of measurement region – measured
area)
11
Measured axis angle
12
Reference axis angle
13
Axis displacement (measured axis angle – reference
axis angle)
Note Parameters 11 to 13 are only used when measurement method
is binary center of gravity and axis angle.
Gray Search
Parameter
Meaning
00
Judgement result (0: OK, –1: NG, –2: no measurement)
01
Measured X coordinate
02
Measured Y coordinate
03
Reference X coordinate
04
Reference Y coordinate
05
Displacement in X direction (measured X coordinate –
reference X coordinate)
06
Displacement in Y direction (measured Y coordinate –
reference Y coordinate)
07
Correlation value
217
Section 7-2
Input Format
1220: READ JUDGEMENT OUTPUT EXPRESSION RESULT
Reads calculation results of judgement output expressions for
the most recent measurement.
Bits
Word
15 to 12
11 to 8
Setting
g
7 to 4
3 to 0
+0
*001
0010
0010
0000
Command code
+1
0000
0000
10’s digit
1’s digit
Judgement number (00
to 15)
Set all bits in words +2 to +4 to 0.
Response
Bits
Word
15 to 12
11 to 8
Setting
g
7 to 4
3 to 0
+3
*001
0010
0010
0000
Command code
+4
0000
0000
10’s digit
1’s digit
Judgement number (00
to 15)
+5
1,000’s
digit
100’s digit
10’s digit
1’s digit
Rightmost 4 digits of
integral portion of
calculation result
+6
Sign
1,000,000
’s digit
100,000’s
digit
10,000’s
digit
Leftmost 3 digits of
integral portion of
calculation result and
sign
+7
0000
1st
decimal
2nd
decimal
3rd
decimal
Decimal portion
Sign:
Positive: 0000, Negative: 1111
1221: READ DATA OUTPUT EXPRESSION RESULT
Reads calculation results of data output expressions for the most
recent measurement.
Bits
Word
15 to 12
11 to 8
Setting
g
7 to 4
3 to 0
+0
*001
0010
0010
0001
Command code
+1
0000
0000
0000
1’s digit
Data number (0 to 7)
Set all bits in words +2 to +4 to 0.
218
Section 7-2
Input Format
Response
Bits
Word
15 to 12
11 to 8
Setting
g
7 to 4
3 to 0
+3
*001
0010
0010
0001
Command code
+4
0000
0000
0000
1’s digit
Data number (0 to 7)
+5
1,000’s
digit
100’s digit
10’s digit
1’s digit
Rightmost 4 digits of
integral portion of
calculation result
+6
Sign
1,000,000
’s digit
100,000’s
digit
10,000’s
digit
Leftmost 3 digits of
integral portion of
calculation result and
sign
+7
0000
1st
decimal
2nd
decimal
3rd
decimal
Decimal portion
Sign:
Positive: 0000, Negative: 1111
1300: GATE TERMINAL OUTPUT CONTROL
Changes the output of the user terminal (GATE terminal). This
setting is only valid if GATE terminal control has been set to user
output in the communications specifications setting menu.
Bits
Word
15 to 12
11 to 8
0000
3 to 0
+0
*001
+1
0000
0000
0000
ON/OFF
Set all bits in words +2 to +4 to 0.
ON/OFF: ON (0001), OFF (0000)
Output area
0011
Setting
g
7 to 4
0000
Command code
Terminal output control
Word +0 to +4
Command setting
GATE terminal
Input area
Area
Word +0, bit 11
Bits
Function
OUT
Word +0 to +1
Sets the command (ON/OFF).
IN
TERMSTAT
The status of the GATE terminal will be reflected by the
status of word +0, bit 11 of the input area (TERMSTAT).
Therefore, the status of the GATE terminal can be
monitored with this bit. There will be a time lag before
changes in bit 11 of the output area due to DeviceNet
communications delays and the status of the F150.
219
Section 7-3
Output Format
1301: READ GATE TERMINAL STATUS
Reads the status of the user terminal (GATE terminal). This setting is only valid if GATE terminal control has been set to user
output in the communications specifications setting menu.
Bits
Word
15 to 12
+0
*001
11 to 8
Setting
g
7 to 4
0011
0000
3 to 0
0001
Command code
Set all bits in words +1 to +4 to 0.
Response
Bits
Word
15 to 12
11 to 8
Setting
g
7 to 4
3 to 0
+3
*001
0011
0000
0001
Command code
+4
0000
0000
0000
0000
All 0
+5
0000
0000
0000
ON/OFF
ON/OFF status of
terminal
+6
0000
0000
0000
0000
All 0
+7
0000
0000
0000
0000
All 0
ON/OFF:
7-3
ON (0001), OFF (0000)
Output Format
The following explains the contents of output from the F150 to
the input area of the Programmable Controller. Data output and
response output settings can be made in the communications
specifications setting menu. The number of bytes will vary
according to these settings as shown below.
Data Output: OFF; Response Output: OFF
Bits
Word
15 to 12
11 to 8
+0
Control output
+1
Judgement output
+2
F150 status output
220
Bytes
y
7 to 4
3 to 0
6 bytes
y
Section 7-3
Output Format
Data Output: OFF; Response Output: ON
Bits
Word
15 to 12
11 to 8
Bytes
y
7 to 4
3 to 0
16 bytes
y
+0
Control output
+1
Judgement output
+2
F150 status output
+3
Expand
p
command response
p
output
p
+4
+5
+6
+7
Data Output: BCD/Binary; Response Output: OFF
Bits
Word
15 to 12
11 to 8
Bytes
y
7 to 4
3 to 0
54 bytes
y
+0
Control output
+1
Judgement output
+2
F150 status output
+3 to +26
Data output (BCD/binary)
Data Output: ON; Response Output: ON
Bits
Word
15 to 12
11 to 8
Bytes
y
7 to 4
+0
Control output
+1
Judgement output
+2
F150 status output
+3
Expand
p
command response
p
output
p
3 to 0
64 bytes
y
+4
+5
+6
+7
+8 to +31
Data output (BCD/binary)
221
Section 7-3
Output Format
7-3-1
Control Output (Word +0)
Bits
Flag
Function
0
ERROR
Turns ON if an error is generated during F150
processing. Turns ON/OFF in synchronization with
the ERR terminal on the terminal block.
1
RUN
ON while the F150 is in Run mode. Turns ON/OFF
in synchronization with the RUN terminal on the
terminal block.
2
BUSY
Indicates that the F150 is executing a command
from CompoBus/D. Do not input a command while
the BUSY Flag is ON. The currently executed
command or the input command will not be
executed properly.
When commands are from RS-232C, or when
using a STEP signal from a terminal board, this
output will not turn ON. When inputting in this way,
use the BUSY signal on the terminal board.
3
Empty
(Always 0)
4
OR
Outputs an overall judgement when a
measurement command has been executed. If
there is one NG in the specified measurement
region or the output expressions, the overall
judgement will be NG.
Select whether to turn ON this output for OK or NG
in the output polarity setting in
SYS/Communications/Terminal block. (The
default setting is ON for NG.) → p. 131
5 to 7
Empty
(Always 0)
8
JDGFLG
Alternates between 0 and 1 to indicate that
judgement output has been refreshed.
9
DATAFLG
Alternates between 0 and 1 to indicate that data
output has been refreshed.
10
CMDFLG (see
note)
Alternates between 0 and 1 to indicate that expand
command response output has been refreshed. Do
not change the contents of an expand command
until this flag has changed status. By comparing
the Expand Command Bit and the Response
Output Bit when the flag changes status, it is
possible to verify whether the input command and
the executed command correspond.
11
TERMSTAT
Indicates the current status of the GATE terminal.
Only output when the GATE terminal control is set
to any output.
12
CMDSTAT (see
note)
Indicates expand command errors (wrong format,
etc.). When an error occurs, this flag turns ON and
expand command response is not output. The
CMDFLG will change accordingly.
13 to 15
Empty
(Always 0)
222
Section 7-3
Output Format
Note CMDFLG and CMDSTAT are only valid when the input mode is
Expand mode.
7-3-2
Judgement Output (+1)
When measurement commands are executed, the judgements
and calculation results set in Expression/Judge are output.
Select whether a bit is turned ON by an OK or an NG judgement,
in the output polarity setting in SYS/Communications/Terminal
block. (The default setting is for the bit to turn ON for an NG
judgement.) → p. 131
Bits
Allocation
0
Judgement output 0
1
Judgement output 1
2
Judgement output 2
3
Judgement output 3
4
Judgement output 4
5
Judgement output 5
6
Judgement output 6
7
Judgement output 7
8
Judgement output 8
9
Judgement output 9
10
Judgement output 10
11
Judgement output 11
12
Judgement output 12
13
Judgement output 13
14
Judgement output 14
15
Judgement output 15
223
Section 7-3
Output Format
7-3-3
F150 Status Output (+2)
Bits
Allocation
0 to 3
Number of currently displayed scene (refreshed when
the Switch Scene command is executed)
4 to 7
Empty (always 0)
8 (see
note)
Continuous Measurement Start Flag
9 (see
note)
Continuous Measurement Stop Flag
10 (see
note)
Switch Scene Completed Flag
11 (see
note)
Model Register Completed Flag
12 (see
note)
One Measurement Completed Flag
13 to 15
Empty (always 0)
Note Bits 8 to 12 above are only valid when the input mode is Basic
mode.
When a command has been executed, the corresponding flag
will turn ON. Wait for the flag to turn ON, and turn OFF the command. When the command is turned OFF, the corresponding flag
will also turn OFF. For details refer to the relevant timing chart.
7-3-4
Expand Command Response Output (+3 to 7)
After an expand command has been executed, a response is
output. For details of responses to given commands refer to 7-2
Input Format.
Since these words are allocated for expand command output, if
the input mode is Basic mode, the output will always be 0.
Accordingly, if the input mode is set to Basic mode, turn the
response output OFF.
Example: 0023: Read Scene Number
Bits
Word
15 to 12
+0
*000
11 to 8
0000
Setting
g
7 to 4
0010
Set words +1 to +4 OFF.
224
3 to 0
0011
Command code
Section 7-3
Output Format
Response
Bits
Word
15 to 12
11 to 8
Setting
g
7 to 4
3 to 0
+3
*000
0000
0010
0011
Command code
+4
0000
0000
0000
0000
All 0
+5
0000
0000
10’s digit
1’s digit
Scene number (00 to
15)
+6
0000
0000
0000
0000
All 0
+7
0000
0000
0000
0000
All 0
Note For commands that are given here without responses, the content of the response that is output in words +3 to +7 will be the
same as for the commands in +0 to +4.
7-3-5
Data Output in BCD or Binary (+3 to 26 or +8 to
31)
When measurement commands are executed, the results of calculations set in Expression/Data are output. The range for output values is –9,999,999.999 to 9,999,999.999 (after calibration).
If expand command response output is OFF, the results are output to words +3 to +26, and if it is ON, the results are output to
words +8 to +31.
225
Section 7-3
Output Format
BCD Code
Word
Bits
Word
15 to 12
11 to 8
Setting
g
7 to 4
3 to 0
+3
+8
1,000’s
digit
100’s
digit
10’s digit
1’s digit
Rightmost 4 digits
of integral portion
of data 0
(decimal)
+4
+9
Sign
1,000,000
’s digit
100,000’s
digit
10,000’s
digit
Leftmost 3 digits
of of integral
portion of data 0
(decimal) and sign
+5
+10
0000
1st
decimal
2nd
decimal
3rd
decimal
Decimal portion of
data 0 (decimal)
+6
+11
1,000’s
digit
100’s
digit
10’s digit
1’s digit
Rightmost 4 digits
of integral portion
of data 1
(decimal)
+7
+12
Sign
1,000,000
’s digit
100,000’s
digit
10,000’s
digit
Leftmost 3 digits
of of integral
portion of data 1
(decimal) and sign
+8
+13
0000
1st
decimal
2nd
decimal
3rd
decimal
Decimal portion of
data 1 (decimal)
to
to
3 + (3 ×
n) + 0
8 + (3 ×
n) + 0
1,000’s
digit
100’s
digit
10’s digit
1’s digit
Rightmost 4 digits
of integral portion
of data n
(decimal)
3 + (3 ×
n) + 1
8 + (3 ×
n) + 1
Sign
1,000,000
’s digit
100,000’s
digit
10,000’s
digit
Leftmost 3 digits
of of integral
portion of data n
(decimal) and sign
3 + (3 ×
n) + 2
8 + (3 ×
n) + 2
0000
1st
decimal
2nd
decimal
3rd
decimal
Decimal portion of
data n (decimal)
to
to
+24
+29
1,000’s
digit
100’s
digit
10’s digit
1’s digit
Rightmost 4 digits
of integral portion
of data 7
(decimal)
+25
+30
Sign
1,000,000
’s digit
100,000’s
digit
10,000’s
digit
Leftmost 3 digits
of of integral
portion of data 7
(decimal) and sign
+26
+31
0000
1st
decimal
2nd
decimal
3rd
decimal
Decimal portion of
data 7 (decimal)
Sign: Positive: 0000, Negative: 1111
Values for output numbers which are not set will be 0.
226
Section 7-3
Output Format
Binary Code
The binary 2’s complement of the calculation results after multiplication by a factor of 1,000 are output. The output values are
restricted to the range of values whose 2’s complement can be
expressed in 6 bytes.
Word
Bits
Word
15 to 12
11 to 8
Setting
g
7 to 4
3 to 0
+3
+8
Binary data
First 2 bytes of
data 0.
+4
+9
Binary data
Middle 2 bytes of
data 0.
+5
+10
Binary data
Last 2 bytes of
data 0.
+6
+11
Binary data
First 2 bytes of
data 1.
+7
+12
Binary data
Middle 2 bytes of
data 1.
+8
+13
Binary data
Last 2 bytes of
data 1.
to
to
3 + (3 ×
n) + 0
8 + (3 ×
n) + 0
Binary data
First 2 bytes of
data n.
3 + (3 ×
n) + 1
8 + (3 ×
n) + 1
Binary data
Middle 2 bytes of
data n.
3 + (3 ×
n) + 2
8 + (3 ×
n) + 2
Binary data
Last 2 bytes of
data n.
to
to
+24
+29
Binary data
First 2 bytes of
data 10.
+25
+30
Binary data
Middle 2 bytes of
data 10.
+26
+31
Binary data
Last 2 bytes of
data 10.
Values for output numbers which are not set will be 0.
227
Section 7-4
Timing Charts
7-4
Timing Charts
The meanings of the arrows and dotted lines used in this section
are as follows:
The F150 is controlled automatically according to the
status of the bit at the base of the arrow.
Perform ON/OFF control according to the status of
the bit at the base of the arrow.
Dotted lines indicate optional output. By deselecting
outputs, the number of bytes can be reduced.
7-4-1
Basic Mode
One Measurement
Output area
Word +0, bit 8
One Measurement
Word +2, bit 12
Measurement
One Measurement
Completed Flag
Word +0, bit 2
Word +0, bit 4
Input area
Word +1, all bits
Judgement output
Word +0, bit 8
Word +3 to +26
Data output
Word +0, bit 9
Note There is no expand command response output and the words
allocated for this output will always be 0. The setting for response
output in the Communications Specifications Screen should be
turned OFF before inputting a command.
228
Section 7-4
Timing Charts
Continuous Measurement
Output area
Word +0, bit 4
Start Continuous
Measurement
Word +0, bit 7
Command
Enable Bit
Word +2, bit 8
Continuous
Measurement Start Flag
Word +2, bit 9
Measurement
Measurement
Measurement
Continuous Measurement Stop Flag
Word +0, bit 2
Input area
Word +0, bit 4
Word +1, all bits
Judgement output
Word +0, bit 8
Word +3 to +26
Data output
Word +0, bit 9
Note There is no expand command response output and the words
allocated for this output will always be 0. The setting for response
output in the Communications Specifications Screen should be
turned OFF before inputting a command.
229
Section 7-4
Timing Charts
Switching Scenes
Word +0, bit 0 to 3
Scene number
Output area
Word +0, bit 5
Switch Scene
Word +0, bit 7
Command
Enable Bit
Word +2, bit 10
Command
executed
Switch
Scene
Completed Flag
Input area
Word +0, bit 2
Word +2, bit 0 to 3
Currently displayed
scene number
Re-registering the Model
Word +0, bit 0 to 3
Region number
Output area
Word +0, bit 6
Model Register
Word +0, bit 7
Command
Enable Bit
Word +2, bit 10
Input area
Model Register
Completed Flag
Word +0, bit 2
230
Command
executed
Section 7-4
Timing Charts
7-4-2
Expand Mode
One Measurement (0010)
Word +0 to +4
Command setting
Output area
Word +0, bit 15
Execution trigger
Command
executed
Next command can be
received
Word +0, bit 10
Word +3 to +7
Expand command
response output
Word +0, bit 2
Word +0, bit 4
Input area
Word +1, all bits
Judgement output
Word +0, bit 8
Word +3 to +26
Data output
Word +0, bit 9
Note Word +2 of Input Area (F150 Status Output)
The first 4 bits of this word are used to output the number of the
currently displayed scene. All other bits are for responses in
Basic mode, and therefore will always be output as 0.
231
Section 7-4
Timing Charts
Continuous Measurement (Start: 0011; Stop: 0012)
Word +0 to +4
Command setting
(Start)
(Stop)
Output area
Word +0, bit 15
Execution trigger
Measurement
Measurement
Measurement
Word +0, bit 2
Word +0, bit 10
Word +3 to +7
Expand command
response output
Word +0, bit 4
Input area
Word +1, all bits
Judgement output
Word +0, bit 8
Word +3 to +26
Data output
Word +0, bit 9
Note Word +2 of Input Area (F150 Status Output)
The first 4 bits of this word are used to output the number of the
currently displayed scene. All other bits are for responses in
Basic mode, and therefore will always be output as 0.
232
Section 7-4
Timing Charts
Commands for Reading Values (e.g. 0023 READ SCENE NUMBER)
Set the response output setting in the communications specifications settings menu to ON.
Word +0 to +4
Command setting
Output area
Word +0, bit 15
Execution trigger
Command
executed
Next command can be
received
Word +0, bit 10
Input area
Word +3 to +7
Expand command
response output
Word +0, bit 2
Note Word +2 of Input Area (F150 Status Output)
The first 4 bits of this word are used to output the number of the
currently displayed scene. All other bits are for responses in
Basic mode, and therefore will always be output as 0.
233
Section 7-5
Allocation Charts
Commands that Control F150 Operation (e.g. 0020 SWITCH SCENE)
Word +0 to +4
Command setting
Output area
Word +0, bit 15
Execution trigger
Command
execution
Next command can be
received
Word +0, bit 10
Input area
Word +0, bit 2
Note Word +2 of Input Area (F150 Status Output)
The first 4 bits of this word are used to output the number of the
currently displayed scene. All other bits are for responses in
Basic mode, and therefore will always be output as 0.
7-5
Allocation Charts
This section gives lists of allocations for the input and output area
of the Programmable Controller. For details refer to Input Format
and Output Format.
234
Section 7-5
Allocation Charts
Output Area
For details refer to Input Format. → p. 201
Basic Mode
Bits
Word +0
Scene number/region
number
g
0
1
2
3
4
Continuous Measurement
5
Scene Switch
6
Model Register
7
Enable Bit
8
One Measurement
9
Reset
10
Empty
11
GATE Terminal
12
Empty
py
13
14
15
Expand Mode
BIts
0
1
Word +0
Word +1
Command
d
code
Parameter
Word +2
Word +3
Word +4
2
3
4
5
6
7
8
9
10
11
12
13
14
15
Execution
trigger
235
Section 7-5
Allocation Charts
Input Area
For details refer to Output Format. → p. 220
Bits
Word +0
0
ERROR
1
RUN
2
BUSY
3
Empty
4
OR
5
Empty
py
6
Word +1
Word +2
Word +3 to
Word +7
Word +8 to
Word +31
Judgement
g
f expresfor
sion set in
Expression/
Judge.
(Judgement
0: bit 0:
...Judgement
g
15 bit 15)
15:
Number of
currently
tl disdi
played scene
Expand
p
command
d
responses
(see note 1)
Calculation
results
lt for
f
expressions
set in
Expression/
Judge
Judge.
(If the expand
command
responses
are all set to
OFF, these
calculation
results will be
output to
words +3 to
+26 )
+26.)
Empty
py
7
8
JDGFLG
Continuous
Measurement
Start Flag
(see note 2)
9
DATAFLG
Continuous
Measurement
Stop Flag
(see note 2)
10
CMDFLG
(see note 1)
Switch Scene
Completed
Flag (see
note 2)
11
TERMSTAT
Model Register Completed Flag
(see note 2)
12
CMDSTAT
(see note 1)
One Measurement
Completed
Flag (see
note 2)
13
Empty
py
Empty
py
14
15
Note
1. These bits are only valid if the input mode is Expand mode.
(If the input mode is Basic mode these bits will always be 0.)
2. These flags are only valid if the input mode is Basic mode. (If
the input mode is Expand mode these bits will always be 0.)
236
Section 7-6
Sample Ladder Program
7-6
Sample Ladder Program
This section gives a sample ladder program for the OMRON
CVM1 Programmable Controller.
In this program, the scene is switched to scene 15 at power ON
and one measurement is performed. The judgement for this
measurement is then output back to the Programmable Controller.
7-6-1
Programmable Controller Settings
Node Address
Set the DIP switch to “2.”
Settings Communications Specifications
Item
Setting
Bytes
Input mode
Basic
2 input bytes
Data output
OFF
6 output
p bytes
y
Response output
OFF
Setting Expressions
Set the data 0 in Expression/Data to “R0.JG.”
Setting Output Destinations
Select CompoBus/D as the output destination for data in SYS/
Output.
7-6-2
Allocations for Programmable Controller
Word
Allocation
1902
Command input area. (Programmable Controller → F150)
2002
BUSY signal is allocated to bit 2 of this word.
2003
Judgement output area. (F150 → Programmable Controller)
2004
Response for the command input in word 1902 is allocated
to the bits in this word.
237
Section 7-6
Sample Ladder Program
7-6-3
Timing Charts
Scene Switching
Word 1902, bit 0 to 3
Scene number (15)
Word 1902, bit 5
Switch Scene
command
Word 1902, bit 7
Command Enable Bit
Command
executed
Word 2004, bit 10
Switch Scene
Completed Flag
Word 2002, bit 2
BUSY
238
Section 7-6
Sample Ladder Program
One Measurement
Word 1902, bit 8
One Measurement
Command
Command
executed
Word 2004, bit 12
One Measurement
Completed Flag
Word 2002, bit 2
BUSY
Word 2003
Judgement
239
Section 7-6
Sample Ladder Program
7-6-4
Ladder Program
Switch
000000
DIFU(13)
000001
000001
MOV(030)
#00AF
Switch Scene
Completed Flag
Command to switch
scene to scene 15
1902
200410
Command cleared
MOV(030)
#0000
Switch Scene
Completed Flag
200410
1902
001001
001000
001000
001000
BUSY
200202
MOV(030)
#0100
Command to make
one measurement
1902
One Measurement Completed Flag
001001
200412
Command cleared
MOV(030)
#0000
1902
MOV(030)
Judgement
2003
D01000
240
SECTION 8
RS-232C Menu Operation Settings
This section describes the communications settings for the RS-232C port when communications are in Menu operation mode. Menu operation mode allows F150 menus to be
manipulated from a computer or other external device via the RS-232C port.
241
Section
RS-232C Menu Operation Settings
8
Make the same communications settings for the F150 and the
external device. Set the F150 to Menu operation mode.
The measurement results will be output in Normal mode format
in Menu operation mode. However, Xon/off flow control cannot
be used (CTRL+S and CTRL+Q codes coincide).
Settings
Item
Settings
Use the same
settings
g on the
IBM
Programmable
Controller/AT or
compatible
computer
computer.
Baud rate
2,400, 4,800, 9,600, 19,200,
38,400* (bps)
Data length
7, 8* (bits)
Parity bits
None*, even, odd
Stop bits
1*, 2 (bits)
Delimiter
CR*, LF, CR+LF
Mode
Select Menu (possible settings: Normal*, Host
link, and Menu operation mode).
Note The default settings are marked with asterisks.*
RS-232C Inputs Corresponding to Console Keys
The key codes shown in the right column in the following table
can be input from an external device to perform the same functions as the Console keys shown on the left.
RS-232C input
Console key
y
Key
Code
ESC
CTRL + [
($1B)
TRIG
CTRL + A
($01)
ENT
CTRL + M
($0D)
SHIFT + ESC
CTRL + I, Tab
($09)
SHIFT +TRIG
CTRL + T
($14)
SHIFT +ENT
CTRL + R
($12)
Up Key
CTRL + E
($05)
Down Key
CTRL + X
($18)
Left Key
CTRL + S
($13)
Right Key
CTRL + D
($04)
SHIFT +Up Key
CTRL + W
($17)
SHIFT +Down Key
CTRL + Z
($1A)
--- (see note)
CTRL + Q
($11)
Note CTRL + Q changes the RS-232C input to Normal mode. (Can only be input in Monitor or Run mode.)
242
RS-232C Menu Operation Settings
Section
8
Procedure
1 Go to SYS/Communications/RS-232C.
2 Set the required items.
3 Select End to enter the settings and to exit this screen.
243
SECTION 9
Troubleshooting
This section lists the errors that may occur during F150 operation, along with their probable
causes and remedies.
245
Section
Troubleshooting
Message
9
Probable Cause and Remedy
Camera is not connected.*
• The Camera Cable is not connected properly.
Cannot measure the angle
from one region.
• Select a region for which binary center of gravity and
axis angle has been set as the measurement method.
Communications error.*
Turn OFF the power to the F150 and restart. If the same
error message appears, it may mean that the F150 is
faulty. Contact your OMRON representative.
Draw at least one OR
figure.
NOT mode is used to delete part of a drawn diagram.
Host link error. Change to
normal mode.
(see note)
After checking for the following items, either change the
RS-232C mode to Host Link mode, or restart the F150:
• Draw diagrams in OR mode.
• The Programmable Controller is ON.
• The RS-232C cable is connected properly.
• The communications specifications for the Programmable Controller and the F150 are the same.
Illegal syntax in expression.
Check the following for the expression:
• There are the same number of right and left parentheses.
• There is not more than one operator in a row without a
variable in between them.
• There is not more than one function in a row without a
variable in between them.
• There is not more than one region number in a row.
• There is not more than one constant in a row.
• There are not too many, or too few arguments for a
function.
Incorrect data format
received.*
There is a mistake in the data for which transfer between
the F150 and the external device was attempted. Turn
OFF the power to the F150, and check for the following
items before restarting the F150.
• The RS-232C cable is connected properly.
• The terminal block is wired correctly.
If the same error message appears after restart, it may
mean that the F150 is faulty. Contact your OMRON
representative.
Insufficient flash memory.
An error has occurred in flash memory. Data cannot be
saved because of insufficient available flash memory.
• Either make the region to be registered smaller, or clear
unneeded regions from memory.
If the same error message appears after the regions have
been reduced, it may mean that flash memory is faulty.
Contact your OMRON representative.
246
Section
Troubleshooting
Message
Insufficient work memory.
9
Probable Cause and Remedy
No more regions can be registered because of insufficient
available work memory.
• Either make the model or region to be registered
smaller, or clear unneeded models or regions.
Programmable Controller is
not in monitor mode.*
• Change the mode of the Programmable Controller to
Monitor mode.
Select midpoint between 2
regions for X and Y.
If the relative angle of the 2 regions is set for the position
compensation setting θ, the midpoint of the 2 regions
must be set for X and Y.
• Either set midpoint of 2 regions for X and Y, or change
the θ setting.
Select same region number
for θ, X and Y.
If position compensation region 0 or 1 is set for θ, then X
and Y must be set to the same region number.
• Either set the same region number for X and Y, or
change the θ setting.
Set parameters so that
Output Period y Gate ON
delay + Gate ON time.
The communications specifications for the terminal block
are set incorrectly.
Setting calibration
parameters is failed.
The Camera magnification is outside the permitted setting
range.
• Make the settings so that output period y GATE ON
delay + GATE ON time.
• Re-perform sampling so that the magnification is in the
range 0.01 to 9.999.
Sampling has only been performed once.
• Perform sampling in at least 2 places.
This region is not drawn.
A region that has not been drawn is selected as a
displacement direction setting.
• Either draw the region, or select a region that has been
drawn.
Timeout error.*
Data transfer has been interrupted due to a timeout error
in communications between the F150 and an external
device. Turn OFF the power to the F150, and check for
the following items before restarting the F150.
• The RS-232C cable is connected properly.
• The terminal block is wired correctly.
• The communications specifications for the external
device and the F150 are the same.
If the same error message appears after restart, it may
mean that the F150 is faulty. Contact your OMRON
representative.
Note When the error messages marked with an asterisk are displayed, the ERR terminal will come ON.
247
Index
A–B
ABS, 91
all data, 101
all judges, 100
all positions of regions, 99
all results of regions, 99
allocations, 234, 237
ANGL, 92
ATAN, 92
Auto Menu, 23
background suppression
object measurement, 29
position compensation, 41
baud rate
CompoBus/D, 200
menu operation, 242
RS-232C (host link), 166
RS-232C (normal), 136
binary center of gravity and area
object measurement, 57
output expressions, 88
overview, 3
parameter lists, 145, 148, 182, 208, 211,
217
position compensation, 41
binary center of gravity and axis angle
object measurement, 57
output expressions, 88
overview, 4
parameter lists, 145, 148, 182, 208, 211,
217
position compensation, 42
binary level
object measurement, 59
position compensation, 43
C
calibration, 3
commands
See also CompoBus/D commands;
RS-232C (host link) commands;
RS-232C (normal) commands; terminal blocks commands
measurement, 135
non-measurement, 128, 136
communications
errors, 198
flowcharts
RS-232C (host link), 162
RS-232C (normal), 134
mode
RS-232C (host link), 166
RS-232C (normal), 136
settings
CompoBus/D, 197
menu operation, 242
RS-232C (host link), 162, 166
RS-232C (normal), 136
terminal blocks, 131
specifications, 12
compare pitch, 83
CompoBus/D, 3
commands
Continuous Measurement, 201, 205
Decrement Scene, 206
Increment Scene, 206
Model Register, 202, 207
One Measurement, 201, 205
Read Data Output Expression Result,
218
Read Judgement Output Expression Criteria, 214
Read Judgement Output Expression Result, 218
Read Measurement, 207
Read Parameter, 213
Read Position, 215
Read Scene Number, 206
Reset, 203, 207
Save Data, 207
Set Judgement Output Expression Criteria, 214
249
Index
Set Parameter, 210
Stop Measurement, 201, 205
Switch Scene, 202, 206
measurement results, 203
operation, 203
settings, 193, 204
console keys, 17
combinations, 19
errors, 198
troubleshooting, 245
evaluation criteria, setting, 63, 77
expressions
output, 86
possible settings, 88
F
coordinates, obtaining, 153
cursor, 19
features, 2
D
data
compatibility. See Auto Menu
loading, 139
image data, 143
scenes, 108
system data, 108, 157
output destination, 87
output expressions, 92
saving, 139, 141, 172, 207
image data, 144
scenes, 108
system data, 108, 158
scene data, copying/clearing, 105
data areas. See memory areas
defect, calculation, 83
direction, position compensation, 53
DIST, 92
drawing mode, 23
E
edge pitch
object measurement, 69
output expressions, 89
overview, 7
parameter lists, 146, 150, 210, 212
edges
enhancement. See filtering
extraction. See filtering
element size, 83
250
filtering
object measurement, 28
position compensation, 40
flash memory, 120
flow control, RS-232C (normal), 137
functions
display, 19
output expressions, 91
G
GATE terminal, 202, 204, 219
gray edge position
object measurement, 66
output expressions, 89
overview, 6
parameter lists, 146, 149, 181, 209, 211,
216
position compensation, 46
gray search
object measurement, 72
output expressions, 89
overview, 5
parameter lists, 146, 149, 182, 209, 212,
217
position compensation, 48
H
handshaking
with, 129
without, 125
host link, commands. See RS-232C (host
link) commands
Index
I
I/O formats. See input format; output format
MAX, 91
measurement
continuous, 124, 127
command, 152, 170, 201, 205
timing, 229, 232
enhancement, 2
single
command, 151, 170, 201, 205
timing, 228, 231, 239
stop, command, 152, 170, 205
images
adjusting, 26
for position compensation, 40
changing, 114
overview, 2
storing, 111, 141
types displayed, 19
measurement images. See images
individual data, 101
measurement methods, 3, 56
individual judge, 101
measurement regions
drawing, 22
functions, 56
individual region, 100
input, 12
area, 197, 236
commands, 102
See also CompoBus/D commands;
RS-232C (host link) commands;
RS-232C (normal) commands; terminal blocks commands
devices, overview, 17
DI0 to DI7, 124
format
CompoBus/D, 201, 204
RS-232C (host link), 170
RS-232C (normal), 140
terminal blocks, 124
numeric values, 21
parameters, 35
input terminals
for continuous measurement, 128
non-measurement commands, 128, 129
using STEP signal, 126
installation, overview, 11
measurement results
commands
CompoBus/D, 203
RS-232C (host link), 169
RS-232C (normal), 139
displaying, 97
reading, 144, 169, 207
measurement screen, setting, 111
memory areas
allocations, 189
setting, 167
menus
hierarchy, 10
moving around, 20
switching, 117
midpoint, 54
MIN, 91
models, registering, 73, 124, 152, 202, 207,
230
modes, overview, 19
J–M
JG, 90
judgement
output, 223
output expressions, 86, 92, 142
keys. See console keys
ladder diagram, 190, 240
loading. See data loading
Monitor mode, 96
N–O
numeric values. See input
operation
basic, 13
commands
CompoBus/D, 203
RS-232C (host link), 168
251
Index
RS-232C (normal), 139
timing, 234
menu, 17, 152
overview, 11
procedures, 25
output, 12
area, 196, 235
calibration, 30
control output, 222
destinations, 107
expressions, 86
evaluation criteria, 179, 180, 214
functions, 91
reading results, 142, 183, 184, 218
format, 103
CompoBus/D, 220
RS-232C (host link), 185
RS-232C (normal), 159
terminal blocks, 125
response, 204, 224
status, 224
output terminals, 125
error terminal, 119
GATE terminal, 202, 204, 219
non-measurement commands, 128
with handshaking, 129, 130
without handshaking
for continuous measurement, 127
using STEP signal, 126
P
parameters
inputting, 35
position compensation, 154
reading/setting, 147, 213
reference, 38
setting, 210
pixel-skipping parameter, 51, 78
ports. See terminal blocks
position compensation, 2, 39
direction, 53
displaying results, 98, 153
midpoint, 54
parameter lists, 181, 216
parameters, 154
reading measurement values, 180, 215
relative angle, 54
252
position displacement compensation. See
position compensation
precautions, general, ix
precise search
object measurement, 72
output expressions, 89
overview, 5
parameter lists, 146, 149, 209, 212
programming, sample, 188, 237
Q–R
quitting, 15
relative angle, 54
resetting, 155, 172, 207
response output, 204
RS-232C
inputs, 242
menu operation, 18
settings, 241
RS-232C (host link)
commands
Continuous Measurement, 170
Decrement Scene, 171
Increment Scene, 171
One Measurement, 170
Read Data Output Expression Result,
184
Read Judgement Output Expression Criteria, 180
Read Judgement Output Expression Result, 183
Read Position, 180
Read Scene Number, 171
Reset, 172
Save Data, 172
Set Judgement Output Expression Criteria, 179
Stop Measurement, 170
Switch Scene, 170
I/O, 163
measurement results, 169
operation, 168
settings, 161, 169
RS-232C (normal)
commands
Data Save, 141
Display Image, 141
Index
Expression, 142
Expression Parameter, 142
Image Load, 143
Image Save, 144
Measure, 151
Measure Data, 144
Measure Parameter, 147
MENUKEY, 152
Model Set, 152
Position Data, 153
Position Parameter, 154
Reset, 155
Scene, 156
Scene Load, 156
Scene Save, 157
System Load, 157
System Save, 158
Version Get, 158
I/O, 135
measurement results, 139
operation, 139
save/load, 139
settings, 133, 140
Run mode, 102
S
sampling, 31
RS-232C (host link), 169
RS-232C (normal), 140
displaying, 200
Programmable Controller, 237
shutter speed, 2, 27
smoothing. See filtering
software version, 119, 158
SQRT, 91
starting, 14
startup scene and mode, 117
STEP signal
with handshaking, 129, 130
without handshaking, 125, 126
STEP terminal, 124
RS-232C (host link), 164
RS-232C (normal), 135
surface defect, 80
output expressions, 89
overview, 8
parameter lists, 146, 150, 209, 213
system
data. See data
menu, 106
saving. See data saving
scenes
changing, 2, 103, 124, 170, 202, 206, 230,
238
data, 156
See also data
loading, 156
number, 18
decrementing, 171, 206
incrementing, 171, 206
reading, 171, 206
saving, 157
screen, display, 18
measurement results, 97
search regions, setting, 75
T–W
terminal blocks, 3, 123
commands, 124
terminals
See also input terminals; output terminals
signal operation and timing, 125
timing, 228, 238
troubleshooting, 245
TXD instructions, 165
Set mode, 26
settings
changing/clearing, 52, 85
commands
CompoBus/D, 204
values. See input
version. See software version
wiring, overview, 11
253
Revision History
A manual revision code appears as a suffix to the catalog number on the front
cover of the manual.
Cat. No. Z134-E1-04
Revision code
The following table outlines the changes made to the manual during each revision. Page numbers refer to the previous version.
Revision code
Date
1
June 1999
1A
February
2000
Revised content
Original production
References to model numbers have been changed
throughout the manual. In addition the following changes have been made.
Pages 22, 49: Minor changes made to graphics in
table.
Page 81: Note added.
Page 112: Changes made to information on “Through”
setting.
Pages 124, 169, 200, 205: Changes made to information on model registration.
Page 125: Caution added.
Pages 134, 160: Notes added.
Page 152: Changes made to information on “MODELSET.”
Pages 161-3: “PC” changed to “Programmable Controller.”
02
November
2003
Page 165: Changes made to information on setting
the number of bytes of send data in the flowchart.
Pages 170, 171, 172, 178, 180, 183, 184: Note added
regarding input bit setting.
Pages 170, 171, 206, 207: Changes made to settings
for word +1.
255
Revision History
Revision code
Date
03
July 2004
Page 144: Information on the character string
“READY” added under the SYSSAVE command.
Page 157: Information on the character string
“READY” added under the IMGSAVE command.
Page 158: Information on the character string
“READY” added under the SCNSAVE command.
Revised content
04
May 2005
Information on liability and warranty was added to the
front of the manual, and revisions were made on the following page.
Page 11: Replaced “Video Monitor” with “Monitor.”
256
OMRON Corporation
Industrial Automation Company
Sensing Devices Division H.Q.
Application Sensors Division
Shiokoji Horikawa, Shimogyo–ku,
Kyoto, 600–8530 Japan
Tel: (81)75–344–7068/Fax: (81)75–344–7107
Regional Headquarters
OMRON EUROPE B.V.
Sensor Business Unit,
Carl–Benz–Str. 4, D–71154 Nufringen,
Germany
Tel: (49)7032–811–0/Fax: (49)7032–811–199
OMRON ELECTRONICS LLC
1 East Commerce Drive, Schaumburg, IL 60173
U.S.A.
Tel: (1)847–843–7900/Fax: (1)847–843–8568
OMRON ASIA PACIFIC PTE. LTD.
83 Clemenceau Avenue,
#11–01, UE Square,
239920 Singapore
Tel: (65)6835–3011/Fax: (65)6835–2711
OMRON (CHINA) CO., LTD.
Room 2211, Bank of China Tower,
200 Yin Cheng Road (M),
Shanghai, 200120 China
Tel: (86)21–5037–2222/Fax: (86)21–5037–2200
In the interest of product improvement, specifications are subject to
change without notice.
Authorized Distributor:
Cat. No. Z134-E1-04
Note: Specifications subject to change without notice.
Printed in Japan
0505-0.2M (0699) (A)
Was this manual useful for you? yes no
Thank you for your participation!

* Your assessment is very important for improving the work of artificial intelligence, which forms the content of this project

Download PDF

advertisement