Leuze electronic Smartcamera redCAM Configuration guide

Leuze electronic
Smartcamera redCAM
General Manual
Version 1e-2001

Leuze electronic
Leuze electronic redCAM General Manual 2
Note
We have tried to offer this redCAM manual to our customers free of errors and easy to
understand. However, any information for improving this manual or for the elimination
of errors are welcome.
We can not assume responsibility for any error in this manual, or for any operating er-
ror which may result from such errors.
Thank you for your understanding.
ÓCopyright
All rights reserved, especially the right for duplication and translation. For duplication or
reproduction in any form (print, copy, microfilm or data acquisition), a written approval
from Leuze electronic GmbH + Co. is needed.
Changes, based on technical progress, are reserved.
Leuze electronic GmbH + Co.
PO Box 1111, In der Braike 1
D-73277 Owen/Teck, Germany
Phone +49 (0) 7021-573-0
Fax +49 (0) 7021-573-199
E-mail inf[email protected]
Internet http://www.leuze.de

Leuze electronic
Leuze electronic redCAM General Manual 3
Table of contents
1 INTRODUCTION .......................................................... 5
2 INSTALLATION ............................................................ 7
3 RUNNING THE PROGRAM ......................................... 9
3.1 USER INTERFACE ..................................................................... 9
3.2 HOW TO SET UP THE INTERFACE .......................................... 12
3.3 HOW TO LOAD AND SAVE PARAMETER FILES ...................... 15
3.4 DISPLAY OF VIDEO IMAGE ....................................................... 26
4 MEASUREMENT ......................................................... 28
4.1 FUNDAMENTALS ....................................................................... 28
4.1.1 Terms .................................................................................................. 28
4.1.2 Evaluation of measured values ............................................................ 32
4.1.3 Measurement ...................................................................................... 36
4.2 STRUCTURE OF A MEASUREMENT TASK .............................. 38
4.2.1 How to create a process ...................................................................... 39
4.2.2 How to set pattern parameters ............................................................ 42
4.2.3 How to treat measurements ................................................................ 51
4.2.4 Calibrating the measurements ............................................................. 60
4.2.5 Serial and parallel communication ....................................................... 63
5 COMPLETENESS ......................................................... 73
5.1 FUNDAMENTALS ....................................................................... 73
5.1.1 Terms .................................................................................................. 74
5.1.2 Evaluation process ............................................................................... 75
5.2 STRUCTURE OF A CONTROL TASK ........................................ 80

Leuze electronic
Leuze electronic redCAM General Manual 4
5.2.1 How to create a process ...................................................................... 81
5.2.2 Control window .................................................................................... 84
5.3 THE DIFFERENT WINDOWS OF THE PROGRAM ................... 86
5.3.1 Windows for glue inspection ................................................................ 86
5.3.2 Completeness window (Completeness control) ................................... 93
5.3.3 Fiducial Finder window ........................................................................ 104
5.4 REFERENCE .............................................................................. 115
5.5 HOW TO CALIBRATE COMPLETENESS .................................. 122
5.6 HOW TO PREPARE AUTOMATIC MODE .................................. 131
5.7 SERIAL AND PARALLEL COMMUNICATION ............................ 138

Leuze electronic
Leuze electronic redCAM General Manual 5
1 INTRODUCTION
What is redCAM?
A small but complete vision system. The vision sensor redCAM closes the gap bet-
ween photo electric sensors and image processing. By integrating camera and image
processing hardware redCAM can be used as a sensor, offering the efficiency of indu-
strial image processing. The redCAM is appropriate where a simple photo electric
sensor is not sufficient and a high performance system is oversized.
With a size hardly exceeding the dimension of a standard CCD camera redCAM can
easily be integrated everywhere into production. Standarized industrial interfaces and a
protocol meeting industrial requirements makes integration of redCAM into a produc-
tion plant easy.
The redCAM is being adapted by an external PC or notebook used as a programming
device to the needs of production. For this purpose you have in hand a comfortable
and easy-to-use Windows program. Using this program and the operating manual the
system can be parameterized without having knowledge of programming and image
processing. After disconnection the camera operates self-contained.
During the development of the high-performance image processing software for
redCAM Leuze electronic could go back to a yearlong experience in industrial image
processing with high-performance systems. The functions of pattern recognition, gray
scale value analysis, and edge detection can solve a wide range of operating and con-
trolling tasks where photo electric and simple sensors are not exact and flexible
enough.
Short description of the system
The package consists of one redCAM vision sensor and the specific Windows para-
meterizing program. The redCAM is pre-configured for the operation of one of the fol-
lowing tools:
Measurement: A tool for automatic optical measuring of components in pro-
duction.
Completeness: A tool for automatic optical test of existance, features and posi-
tion of components in production.
Reader: A tool for automatic optical identification of components by me-
ans of fonts and optional further features.
Barcode: A tool to read barcodes under harder conditions.
DataMatrix Reader: A tool to read DataMatrix Codes.
In addition you need a PC with the operating system Windows95, Windows98 or
WindowsNT for the operation of the program and a monochrome screen (camera-type
ViS 5, ViS 7) or a VGA-screen (camera-type ViS 7V; ViS 6P, ViS 8P or higher) to
display the image recorded by the sensor and the faded-in measuring devices.

Leuze electronic
Leuze electronic redCAM General Manual 6
By help of the serial interface and four separately opto-decoupled parallel in- and out-
puts the vision sensor can be directly connected to the control system. Running in au-
tomatic mode redCAM is a self-contained sensor executing and loading data and pro-
grams stored in EEPROM. This guarantees instant readiness after the switch-on of the
operating voltage and 100%-control of produced components at high clock frequen-
cies.
How to use this Operating Manual
This Operating Manual first describes basic concepts and processes. Then you will be
guided throught the functions step by step. The use of the functions by means of me-
nus or through the buttons of the control bar are described in detail. With the help of
sketches and numberings the proceeding is comprehensibly explained.

Leuze electronic
Leuze electronic redCAM General Manual 7
2 INSTALLATION
The installation program guides you through the installation. The program copies the
files to an existing folder on your hard disk, alternatively the folder might be newly
created. In addition to that an entry for the Windows95 start menu is created. We re-
commend to create a link to the program on your desktop in order to accelerate the
start of the parameterizing software. For Barcode and DataMatrix Reader there is no
parameterizing program available currently.
System requirements
- Hardware and software requirements:
·Windows95, Windows98 or WindowsNT
·486 or Pentium based system
·Mouse or track ball
·VGA graphics adapter
·Minimum 16MB RAM for Windows 95 (more for higher Windows versions)
·Approx. 5MB available hard disk space for installation of the files
·A free serial interface on the PC
An additional monochrome screen (or RGB screen) for the video display of the vision
sensor. A VGA screen is not suitable for video display.
- Back-up copies
The software is provided on CD-ROM. You should make a back-up copy of the original
CD-ROM, in order to be able to continue your work in case the original CD-ROM gets
damaged. Use the back-up copy for installation and keep the original CD-ROM in a
safe place.
- Installation
The files are compressed. Thus, you cannot copy the files manually to your hard disk.
An installation program facilitates the installation procedure.
This program is started from the CD-ROM drive of your PC. For most systems the
drive name is D:. The following installation instructions refer to D: as the drive name of
your CD-ROM drive.
How to install on your PC:
·Insert the CD-ROM containing the programs Completeness, Measurement, Reader
or Barcode into the CD-ROM drive of your PC
·Select the start button on the windows task bar and then Run. Insert source drive,
path and then SETUP into the dialog box.
·D:\SETUP.EXE
·Follow the instructions given in the various dialog boxes of the installation program
and store the program in a folder of your own choice. After completion of the in-
stallation you can start the program like every other program under Windows.

Leuze electronic
Leuze electronic redCAM General Manual 8
Removal of the program
You can remove the parameterizing program and the required additional files from
your PC. To remove the parameterizing program from your PC:
·Select the Start button in the Windows task bar and then Settings. From the pop-
up menu select Control Panel.
·In the Control Panel window double-click on Add/Remove Programs. You will find
the parameterizing program in the list of installed programs.
·Select it and klick on the button Remove. Follow the instructions given in the va-
rious dialog boxes of the deinstallation program.

Leuze electronic
Leuze electronic redCAM General Manual 9
3 RUNNING THE PROGRAM
After having installed the program you can start it now. How to start the program:
·Select the Start button in the Windows task bar and then Programs.
·In the pop-up folder menu select the entry for the parameterizing program and klick
on the program icon.
After starting, the parameterizing program appears in a window which you can zoom to
screen-size using the usual Windows buttons.
3.1 USER INTERFACE
The program user interface appears in the usual layout of a Windows operating sy-
stem. You will find a primary window which you can zoom to screen-size using the title
bar buttons. Using further buttons you can reduce the window to a symbol or you can
close it completely. In the right and the bottom margin there are scroll-bars. To change
the window's size, klick and drag on the lower right corner of the window.
Example: User interface of the Detection-parameterizing program
The window consists of:
·Title bar
·Menue bar
·Tool bar
·Communication area
Title bar
Menue bar
Tool bar
Communication
area

Leuze electronic
Leuze electronic redCAM General Manual 10
The communication area consists of:
·Buffer status indicator
·Command text fields
·Counter with buttons
·Title bar
The title bar is at the top of the window:
- Title bar
On the left side of the title bar there is the program icon. Next to it you will find the na-
me of the current document being processed. To the right there is the title text of the
program; in the right sight you will find the window buttons.
- Menue bar
Below the title bar there is the menue bar with the menue entries:
- Menue bar with short-cuts
You can select the menue titles either with the pointer element (mouse) or the key-
board short-cuts. These short-cuts are underlined.
- Tool bar
You can start actions of the program with the tool bar below the menue bar, here the
tool bar of the Completeness program is shown:
Example: Completeness program tool bar with quick info
The meaning of the icons can easily be understood from their graphics. When you
point with the mouse to an icon without clicking, a quick-info box will appear after a
short time showing a short description of the icon.
At start-up, the buttons of the tool bar appear grey to indicate they are not available.
Only the buttons to connect and configure the interface are available and therefore
coloured. Since the connection to the vision sensor has not been completed yet,
Connect COM
Disconnect COM
Configuration of COM
Live Image
New File
Snap
Open File
Save File Calibration
Create Process
Define Window
Test Process 1 to 4
Transmitt & Receive
Transmitt
Test Commands
Info

Leuze electronic
Leuze electronic redCAM General Manual 11
you cannot execute actions that require an established communication link. The but-
tons are not active. They will be available after connection of the interface.
- Communication area
A large part of the user interface consists of the communication area. This area shows
the status and the texts of the serial communication with the vision sensor. The com-
munication area consists of:
·Buffer status indicator
·Command text field
·Counter with buttons
Example: Communication area
The command text field as well as counter and buttons are not visible after start-up of
the program. By actuating the button Commands and Responses in the menue View
the following display appears.
You will not need this area when normally operating the program. It may be useful for
advanced applications, for example debugging.
- Buffer status indicator
The serial communication with the vision sensor uses a buffer each for transmitting
and receiving commands. The majority of actions carried out in the program generate
a command to redCAM. New commands are being entered in the buffer and lead to a
deflection of the status indicator. A filled bar indicates there are still commands in the
corresponding buffer and communication with redCAM has not been completed yet.
The upper bar indicates commands still to be transmitted to the sensor (bar filled) or if
all commands have already been transmitted (bar empty).
Buffer status indicator
Command text field
Counter with buttons

Leuze electronic
Leuze electronic redCAM General Manual 12
For almost every command a response of the sensor is expected. The status bar be-
low shows if a current response has already been read (bar empty) or if it still exists
completely or partly in the buffer (bar filled).
Watch the status indicators of the buffers and delay - if necessary - any changes of
adjustments until the current communication has been completed.
- Command text fields
There are two command text fields. The upper field shows the current command being
transmitted from the program to the vision sensor. The field below shows responses to
commands generated by the sensor. During communication always the final command
and the corresponding response are visible.
- Counter with buttons
Communication between program and sensor is stored in a list. The counter helps you
memorizing a command during communication and finding it again later. Step by step
you can run throught the list with the buttons until you reach the desired command and
a corresponding response.
3.2 HOW TO SET UP INTERFACE
To communicate with the vision sensor you have to choose the interface the sensor is
connected to, and - if necessary - adjust its parameters. The transmission parameters
of the serial interface of redCAM are:
Baud rate 9600 Baud
Data bits 8
Parity None
Stop bits 1
Protocol None
How to adjust the parameters of the connected interface
·Select the Start button from the Windows task bar and then Settings.
·Click on Control Panel in the folder menue.
·The Control Panel window opens. Double-click on the System icon.
·In the now open field System Properties choose the Device Manager tab and click
on Interfaces (COM and LPT).
·Choose the interface in use.
The properties window for the corresponding interface opens. Adjust the transmission
parameters mentioned above.
·Select OK in both property fields and close the Control Panel folder window.

Leuze electronic
Leuze electronic redCAM General Manual 13
How to select the interface in the program
·Use the button below to configure the interface
or select the item Configure in the Interfaces menu
·Set the COM-number of the connected interface in the Interfaces dialog box.
·Select OK.
Example: Interface dialog box
After having correctly set up the interface, open it to be able to communicate with the
vision sensor. In the previous condition of the program you see the tool bar buttons as
gray icons. This indicates that the buttons are not activated. Only the button to open
the interface is activated and therefore colored. With interface closed no actions requi-
ring an established communication link communication are possible. The other buttons
will be available after the opening of the interface.

Leuze electronic
Leuze electronic redCAM General Manual 14
How to open the interface
·Use the button to open the interface
or select the item Open COM in the Interfaces menu.
Initially there is a command in the transmission buffer of the program as shown by the
buffer status indicator. Once the connection is made, the buffer contents are transmit-
ted and the indicator finally is empty. The commands and responses are shown in the
command text field and the counter rises. In case the connection could not be opened,
the buffer status indicator remains filled, and the counter holds its original level.
How to unlock the vision sensor
IMPORTANT: The vision sensor has got an unlocking function being checked by a
password. Every sensor comes along with a unique password issued
by Leuze electronic. After having opened the interface a dialog box
enables you to enter a seven-digit password in case the sensor is still
locked. Enter this password and repeat it correctly in the password
confirmation field. After this select the OK button now available. The
correct password unlocks redCAM. Having entered a wrong pass-
word, the dialog box is shown to you again.
·You can enter a wrong password up to ten times. Then the sensor
remains locked.
·The unlocking of redCAM has to be executed only once. This can
be done by you or by Leuze electronic.
Example: Password dialog box without and with entered password

Leuze electronic
Leuze electronic redCAM General Manual 15
·Look up the password of the current vision sensor (type plate on bottom-side of
sensor or delivery note).
·Enter the password.
·Repeat the password in the Confirmation field.
·Select OK.
After the opening of the interface and a possible unlocking of the sensor, the buttons in
the tool bar will be available and you have access to the actions (as indicated by the
now colored symbols).
3.3 HOW TO LOAD AND SAVE PARAMETER FILES
Data consistency between program and sensor
By means of the parameterizing program you can set up a succession of control tasks
which you can store in a file with a file name you can choose freely. Since the camera
can work autonomously, these control tasks have to be stored in the camera as well.
When a connection between camera and parameterizing program is being set up, a
comparison between information stored in the camera and the PC-file has to be made.
After the connection to redCAM has been set up, this procedure is being carried out in
several steps:
·Read file name from vision sensor
·Open file
·Compare file contents with sensor data
·Enter data into program
While updating the program, this procedure works automatically. In every cycle there is
the option of stopping the entire process.
After setting-up the connection between program and redCAM, the program does not
have any data yet. The sensor however, has stored the data in the internal EEPROM.
Now you need to transmit the data from redCAM into the program.
For this, the name of the file saved last is stored in the vision sensor. This name is
read by the sensor. Data extensions for the different parameterizing programs are:
Completeness *.qtc
Measurement *.qtm
Reader *.qti
The program shows to you the file name and expects confirmation for opening the file
stored in the PC.

Leuze electronic
Leuze electronic redCAM General Manual 16
Example: Dialog box of the program Completeness for automatic opening of the
PC file belonging to the sensor
When clicking on the Yes button the program continues opening the file. If you select
No, the process will be aborted and the program gets no data. You can load the pro-
gram and the sensor as well with data of a different file using the item Open/Load Visi-
on Sensor in the File menu.
- Selection
·Yes continues opening the file,
·No stops the process.
In case of stopping you can load an existing file.
- Automatic opening of the file
After confirming, the program opens the given file which has to be in the program's
working directory. After this a comparison of the versions proceeds as an additional
check of data consistency between file and sensor. If there is no corresponding file on
your PC or in the working directory of the program, you will get the following informati-
on and the procedure stops.
Example: Error message - File not found
Comparison of versions
To make sure, not only file names are identical, an additional comparison between the
data of the PC file and of the sensor redCAM is performed. Only when these two
checks have been correctly executed, the program will be actualized by using data of
the file.

Leuze electronic
Leuze electronic redCAM General Manual 17
Example: Dialog box to perform the comparison of versions
Prior to the check, the program expects a confirmation to start the version comparison.
Select Yes to perform the check or No to avoid the check.
- Selection
·Yes continues the comparison,
·No bypasses the procedure. The PC file is opened.
Select Yes to perform the check. Then a dialog box appears in which you start the
comparison by clicking on Start. The result window shows you the single results of
data comparison. After having finished the comparison, you can either repeat the
check or click on the button Continue to get information of the overall result of the
check.
- Selection
·Start starts the version comparison,
·Continue continues after comparison.
Example: Version comparison dialogue box before and after data comparison
After the check you will get a report of the overall result where data of file and sensor
are completely identical or show differences. After the result report a corresponding
message appears. If the data are identical, the program will be updated with the file
data after clicking OK.
Example: Version comparison with identical data

Leuze electronic
Leuze electronic redCAM General Manual 18
If data are not identical, the program expects a user input to load the different data to
redCAM. The existing data will be overwritten.
- Selection
·Yes data will be loaded to redCAM,
·No aborts the process. The program will not be updated.
Example: Version comparison with different data
Having aborted the automatic opening of a file, you see the parameterizing program in
its initialized status. Neither a calibration nor any parameters exist in the program.
How to create new parameter files
·Click on the button to create a new file
or select New in the File menu.
If you have worked on a file and wish to create a new one with features and windows,
you can do so by using the New button in the tool bar or the File menu. If you are wor-
king on a file and you have not stored the last changes of your current file, you will re-
ceive a corresponding message.
- Selection
·Yes data are stored in the named file, and the program is being initialized
·No The program is being initialized without storing the last changes
·Cancel No action is performed

Leuze electronic
Leuze electronic redCAM General Manual 19
Example: Dialog box to save the last changes when creating a new file
IMPORTANT: When creating a new file, the program is being initialized. Data on the
sensor are not being erased though. Only data structures are relea-
sed, so they may be used again when parameterizing. If you want to
start parameterizing from zero, you will have to initialize the system
explicitly (see chapter). To do so, select Initialize vision sensor in the
File menu.
How to open an existing file
If you have already created files and wish to load an existing one, you can either use
the Open button in the tool bar or the respective item of the File menu. Use the button
to load a file
or select Open / load Vision Sensor in the File menu.
This loads the file into the program and passes it on to the vision sensor via serial in-
terface. If the last changes of your current file were not saved, you receive a corre-
sponding message.
- Selection
·Yes data are saved in the named file,
·No continues without saving the last changes,
·Cancel no action is performed.

Leuze electronic
Leuze electronic redCAM General Manual 20
Example: Dialog box to save the last changes when creating a new file
A dialog box opens where you can select folder and file. The selected file appears in
the File name text field. Using the Open button you start loading the file.
Example: Dialog box of the Completeness program to select a file
Before data can be transmitted to sensor and overwrite the current data, the program
expects confirmation to make sure that no unintended loss of data occurs.
- Selection
·Yes data are loaded and transmitted to sensor,
·No stops the procedure.
Example: Dialog box to load existing data to the vision sensor
After using the Yes button, the dialog box appears again to ask if data on the vision
sensor and in the PC file should be compared.
Table of contents
Other Leuze electronic Digital Camera manuals