Dalsa Spyder3 Color SG-34, SG-34-04K80-00-R, SG-34-02K80-00-R User Manual

Spyder3 Color SG-34

Camera User’s Manual

SG-34-04k80-00-R and SG-34-02k80-00-R
P/N: 03-032-20124-03
www.teledynedalsa.com
Notice
© 2017 Teledyne DALSA All information provided in this manual is believed to be accurate and reliable. No responsibility is assumed by Teledyne DALSA for its use. Teledyne DALSA reserves the right to make changes to this information without notice. Reproduction of this manual in whole or in part, by any means, is prohibited without prior permission having been obtained from Teledyne DALSA.
Microsoft and Windows are registered trademarks of Microsoft Corporation in the United States and other countries. Windows, Windows 7, Windows 8 are trademarks of Microsoft Corporation.
All other trademarks or intellectual property mentioned herein belong to their respective owners.
Document Date: August 25, 2017 Document Number: 03-032-20124-03
Contact Teledyne DALSA
Teledyne DALSA is headquartered in Waterloo, Ontario, Canada. We have sales offices in the USA, Europe and Asia, plus a worldwide network of representatives and agents to serve you efficiently. Contact information for sales and support inquiries, plus links to maps and directions to our offices, can be found here:
Sales Offices: http://www.teledynedalsa.com/corp/contact/offices/ Technical Support: http://www.teledynedalsa.com/imaging/support/
About Teledyne DALSA
Teledyne DALSA is an international high performance semiconductor and electronics company that designs, develops, manufactures, and markets digital imaging products and solutions, in addition to providing wafer foundry services.
Teledyne DALSA Digital Imaging offers the widest range of machine vision components in the world. From industry-leading image sensors through powerful and sophisticated cameras, frame grabbers, vision processors and software to easy-to-use vision appliances and custom vision modules.
Industry Standards
Spyder GEV cameras are 100% compliant with the GigE Vision 1.0 specification. This specification defines the communication interface protocol used by GigE Vision devices. For more information on these requirements refer to the following site:
www.machinevisiononline.org
.
Spyder GEV cameras implement a superset of the GenICam™ specification which defines device capabilities. This description takes the form of an XML device description file respecting the syntax defined by the GenApi module of the GenICam specification. For more information on these requirements refer to the following site: www.genicam.org.
2 The Spyder3 SG-34 Cameras
Contents
The Spyder3 SG-34 Cameras ______________________________________________________________________________ 6
Camera Highlights ............................................................................................................................... 6
Features and Programmability ............................................................................................. 6
Description and Applications ............................................................................................... 6
Part Numbers and Model Requirements ............................................................................................. 7
Camera Performance Specifications ................................................................................................... 7
Certifications ........................................................................................................................................ 9
Image Sensor ...................................................................................................................................... 9
Responsivity ........................................................................................................................................ 11
Mechanicals ......................................................................................................................................... 12
Mounting .............................................................................................................................................. 14
Software and Hardware Setup ............................................................................................................ 15
Host System Requirements ................................................................................................. 15
Network Adapter Requirements ........................................................................................... 15
Ethernet Switch Requirements ............................................................................................ 15
Setup Steps: Overview ........................................................................................................................ 15
1. Install and Configure Ethernet Network Card .................................................................. 15
2. Connect Power, Ethernet and I/O Cables ........................................................................ 16
3. Establish communicating with the camera ....................................................................... 16
4. Check camera LED, settings and test pattern ................................................................. 16
5. Operate the Camera ........................................................................................................ 16
Step 1. Ethernet Network Card: Install and Configure ......................................................................... 17
Install Network Card ............................................................................................................ 17
Configure Network Card ...................................................................................................... 17
Step 2. Connect Power, Ethernet, and Trigger Cables ....................................................................... 20
Power Connector ................................................................................................................. 20
Ethernet Connector and Ethernet LED ................................................................................ 21
Status LED ........................................................................................................................... 21
GPIO Connector: ................................................................................................................. 22
GPIO Isolation ..................................................................................................................... 23
GPIO Configuration ............................................................................................................. 23
TTL Inputs and Outputs ....................................................................................................... 23
Step 3. Establish Communication with the Camera ............................................................................ 24
Power on the camera ........................................................................................................... 24
Connect to the camera ........................................................................................................ 24
Check LED Status ............................................................................................................... 24
Software Interface ................................................................................................................ 24
Using Sapera CamExpert with Spyder3 Cameras .............................................................................. 25
CamExpert Panes ................................................................................................................ 25
Step 4. Camera Test Patterns ............................................................................................................. 27
Review a Test Pattern Image .............................................................................................. 27
Camera Operation _______________________________________________________________________________________ 28
Factory Settings ................................................................................................................................... 28
Check Camera and Sensor Information .............................................................................................. 28
The Spyder3 SG-34 Cameras 3
Verify Temperature and Voltage .......................................................................................................... 29
Saving and Restoring Camera Settings .............................................................................................. 29
Timing: Exposure and Synchronization ............................................................................................... 31
Timing .................................................................................................................................. 32
Exposure Controls ............................................................................................................................... 33
Set the Exposure Mode ....................................................................................................... 33
Exposure Modes in Detail .................................................................................................... 34
Line Rate ............................................................................................................................................. 36
Exposure Time .................................................................................................................................... 37
Triggers ............................................................................................................................................... 37
Input / Output Control .......................................................................................................................... 38
Gain, Black Level, and Background .................................................................................................... 39
Image Size ........................................................................................................................................... 41
Color .................................................................................................................................................... 41
Pixel Format ........................................................................................................................................ 42
Sensor Direction Control ..................................................................................................................... 42
Sensor Shift Direction .......................................................................................................... 43
Resetting the Camera .......................................................................................................................... 43
Camera Calibration ______________________________________________________________________________________ 44
Processing Chain Overview and Description ....................................................................... 44
Calibrating the Camera to Remove Non-Uniformity (Flat Field Correction) ........................................ 45
Digital Signal Processing ..................................................................................................... 47
Color Correction Matrix ........................................................................................................................ 51
Appendix A: Clear Dark Current ____________________________________________________________________________ 53
Gate Dark Current Clear ...................................................................................................... 53
Auto Mode (srm 0) ............................................................................................................... 53
Immediate read out mode (default, srm 2) ........................................................................... 54
Gate dark current clear mode (always on, srm 1) ................................................................ 54
Setting the Readout Mode ................................................................................................... 54
Appendix B: GPIO Control _________________________________________________________________________________ 56
GPIO Getting Started: Beginner Mode ................................................................................................ 56
The GPIO Connector ........................................................................................................... 56
Configure GPIO Signal Levels ............................................................................................. 57
Examples: Setting the Camera Modes ................................................................................................ 58
Free Run Mode: Internal Line Trigger, Internal Direction Control, Internal frame trigger .... 58
Internal Line Trigger, External Direction Control, Internal frame trigger .............................. 61
External Line Trigger, Internal Direction Control, Internal frame trigger .............................. 61
External Line Trigger, External Direction Control from Rotary Encoder .............................. 62
External Frame Trigger: Frame Start Trigger mode ........................................................... 65
Outputs ................................................................................................................................................ 68
Trigger Settings: GURU Mode ............................................................................................................. 70
Pulse Generator ................................................................................................................... 73
Rescaler ............................................................................................................................... 75
Counter ................................................................................................................................ 77
Input Debouncing ................................................................................................................. 78
Timestamp Counter ............................................................................................................. 79
Delayer ................................................................................................................................ 81
4 The Spyder3 SG-34 Cameras
PLC Control ......................................................................................................................................... 81
The PLC Control Block ........................................................................................................ 82
GPIO Output Labels ............................................................................................................ 86
Signal Routing Block ........................................................................................................................... 87
How the Signal Routing Block Works .................................................................................. 88
How the Lookup Table Works .............................................................................................. 90
Appendix C: EMC Declaration ______________________________________________________________________________ 91
Appendix D: Setting up the FVAL ___________________________________________________________________________ 92
Examples: Setting the FVAL ................................................................................................................ 95
Appendix E: Using the RGB12 Mode in CamExpert _____________________________________________________________ 98
Data Format ......................................................................................................................... 98
Revision History _________________________________________________________________________________________ 101
Index _________________________________________________________________________________________________ 102
The Spyder3 SG-34 Cameras 5

The Spyder3 SG-34 Cameras

Camera Highlights

The Spyder3 SG-34 GigE Vision (GEV) are high sensitivity, bilinear scan color cameras. When operating in high sensitivity (bilinear) mode, the Spyder3 GEV camera has 3x the responsivity of Teledyne DALSA’s Spyder2 line scan camera. Plus, the GigE Vision interface eliminates the need for a frame grabber, resulting in significant system cost savings.
The Spyder3 cameras are supported by Teledyne DALSA Sapera™ software libraries featuring CamExpert for simplified camera set-up and configuration.

Features and Programmability

Single color broadband responsivity up to 79 DN (nJ/cm2) @ 20dB gain
2048 or 4096 pixels, 14 µm x 14 µm (2k) and 10µm x 10µm (4k) pixel pitch
Fill factor 90% (2k) and 86% (4k)
Up to 18 KHz (2k) and 9 KHz (4k) line rates
Dynamic range up to 677 : 1
Data transmission up to 100 m
±50 µm x, y sensor alignment
RoHS and CE compliant
GeniCam compliant
Easy-to-use GUI
Optional serial interface (ASCII, 57600 baud, adjustable to 19200, 57600, 115200),
through virtual serial port through Ethernet (not GeniCam compliant)
Programmable gain, offset, exposure time and line rate, trigger mode, test pattern output, and camera diagnostics
Flat-field correction—minimizes lens vignetting, non-uniform lighting, and sensor FPN and PRNU

Description and Applications

The Spyder3 GigE Vision (GEV) Color camera is Teledyne DALSA’s latest GigE Vision camera. The GigE Vision interface eliminates the need for a frame grabber, resulting in significant system cost savings. The Spyder3 GEV Color is also Teledyne DALSA’s first dual line scan color camera. The Spyder3 GEV Color camera is ideal for:
Cotton and textile inspection
Food, drug, and tobacco inspection
Wood, tile, and steel inspection
Postal sorting
Recycling sorting
100% print inspection (lottery tickets, stamps, bank notes, paychecks)
General web inspection
6 • The Spyder3 SG-34 Cameras

Part Numbers and Model Requirements

The Spyder3 GEV color camera is available in the following configurations:
Table 1: Spyder3 GigE Vision Color Camera Models Overview
Model Number Description
SG-34-02K80-00-R 2k resolution, 80 MHz data rate, 18 KHz line rate.
SG-34-04K80-00-R 4k resolution, 80 MHz data rate, 9 KHz line rate.
Table 2: Software
Software Product Number / Version Number
Sapera LT, including CamExpert GUI application
QuickCam Version 2.0. Compliant.
Pleora Technologies Inc.’s Coyote Compliant.
Third party software. E.g. CVB and NI. Compatible. Drivers need to be provided by the third party.
Version 7.1 or later. Tested and recommended.

Camera Performance Specifications

Table 3: Spyder3 GigE Vision Color Camera Performance Specifications
Feature / Specification 2k 4k
Imager Format Bilinear CCD
Resolution1 2048 pixels 4096 pixels
Pixel Fill Factor 90 % 86 %
Pixel Size 14 µm x 14 µm 10 µm x 10 µm
Output Format (# of taps) 2
Antiblooming 100x
Gain Range 0 to 20 dB
Color Output/Arrangement R/G/B and Mono
Exposure Times 3 to 3,000 µs
Speed 2k 4k
Maximum Line Rate 18 KHz 9 KHz
Minimum Internal Line Rate 300 Hz
Data Rate 80 MHZ
Mechanical Interface 2k 4k
Camera Size 72 mm x 60 mm x 65 mm
Mass < 300 g
Connectors power connector GigE connector GPI/O connector
6 pin male Hirose RJ45 with screw locks High density 15-pin dsub
The Spyder3 SG-34 Cameras 7
Optical Interface
Back Focal Distance 6.56 ± 0.25 mm
Lens Mounts M42 x 1, C and F (2k)
M58 x 0.75, F (4k)
Sensor Alignment x y z Υz
±50 µm ±50 µm ±0.25 mm ±0.2°
Electrical Interface
Input Voltage +12 V to +15 V
Power Dissipation < 10.5 W
Operating Temperature 0 to 65 °C
Bit Width 8 bit
Output Data Configuration GigE Vision

Notes

1. The interpolation procedure does not work on the first and last pixels; as a result, the number of effective full color (RGB) pixels for the 2k and 4k cameras is reduced by 2 to 2046 or 4094 respectively.
Table 4: Camera Operating Specifications (Single Color)
Specifications Unit 0 dB 10 dB 20 dB
Min Typ Max Min Typ Max Min Typ Max
Broadband responsivity
2k 7.9 25 79
4k 4 12.6 40
Random noise rms
2k 0.788 1.56 2.5 5
4k 0.75 1.19 2.38 3.75 7.5
Dynamic range DN:DN 335 677 106 214:1 33:1 67.7:1
FPN global DN p-p
Uncorrected 4 12.5 40
Corrected 2 2 4
PRNU ECD
Uncorrected local
Uncorrected global
Corrected local DN p-p 5
Corrected global DN p-p 5
PRNU ECE
DN/(nJ/cm²)
DN
% 8.5
% 10
8 The Spyder3 SG-34 Cameras
Uncorrected local
Uncorrected global
Corrected local DN p-p 5
Corrected global DN p-p 5
SEE (calculated) nJ/cm²
2k 32.2 10.1 3.21
4k 64.3 20.2 6.43
NEE (calculated) pJ/cm²
2k 31.7 31.7 31.7
4k 95 95 95
Saturation output amplitude
DC offset DN 2 5 5 5
% 8.5
% 10
DN 255

Test conditions unless otherwise noted:

8-bit values, Flat Field Correction (FFC) enabled.
CCD Pixel Rate: 40 MHz per sensor tap
Line Rate: 5000 Hz
Nominal Gain setting unless otherwise specified
Light Source: Broadband Quartz Halogen, 3250k, with 750 nm highpass filter installed
Ambient test temperature 25 °C
Exposure mode disabled.
Unless specified, dual line mode.
Notes: PRNU measured at 50% SAT.

Certifications

Table 5: EMC Compliance Standards
Compliance
The CE Mark, FCC Part 15, and Industry Canada ICES-003 Evaluation of the Teledyne DALSA Spyder GigE SG-34 cameras meet the following requirements:
EN 55022 Class A, and EN 61326 Emissions Requirements, EN 55024, and EN 61326 Immunity to Disturbances

Image Sensor

This color bilinear camera is based on Teledyne DALSA’s bilinear CCD sensor. The first line of this two line sensor has red (R) and blue (B) alternating pixels, while the second line has all green (G) pixels. There is no gap in between the two lines and this minimizes any artifact due to spatial correction. The G channel can be used as a monochrome output. The sensor has a 2 tap output.
The Spyder3 SG-34 Cameras 9
CCD Readout Shift Register
N Pixels (14 µm x 14 µm or 10 µm x 10 µm)
Pixel 1, 1
R R G G G G G G G
N Pixels (14 µm x 14 µm or 10 µm x 10 µm)
R
CCD Readout Shift Register
R R RB B B B B B
G G G G
G
N= 2048, 4096
Figure 1: Bilinear sensor used in Spyder3 Color (block diagram)
Please note that interpolation procedure does not work on the first and last pixels; as a result, the number of effective full color (RGB) pixels for the 2k and 4k cameras is reduced by 2 to 2046 or 4094 respectively.
10 The Spyder3 SG-34 Cameras

Responsivity

Figure 2: Spyder3 GigE Vision Responsivity
The Spyder3 SG-34 Cameras 11

Mechanicals

5
7
B
0
.
2
46 B0.2
38 B0.2
6
B
0
.
2
6.56 B0.25 IMAGE AREA [OPTICAL DISTANCE]
M4x0.7 Z 6 MAX TORQUE 25 IN-LB
M42x1 Z 4.5
(12)
(30)
(37)
(
1
2
)
(
1
6
)
(
6
1
)
60 B0.2
7
2
B
0
.
2
30 B0.05 CENTER OF IMAGE AREA
36 B0.05 CENTER OF IMAGE AREA
M4x0.7 Z 6 (BOTH SIDES) MAX TORQUE 25 IN-LB
M4x0.7 Z 6 (BOTH SIDES) MAX TORQUE 25 IN-LB
6 B0.2
(56)
(65)
3
8
B
0
.
2
Figure 3: Spyder3 2k GigE Vision Color Camera Mechanical Dimensions
12 The Spyder3 SG-34 Cameras
36B0.05 CENTER OF IMAGE AREA
30B0.05 CENTER OF IMAGE AREA
57B0.2
4
6
B
0
.
2
6
0
B
0
.
2
72B0.2
38B0.2
6.56B0.25 IMAGE AREA [OPTICAL DISTAN CE]
3
8
B
0
.
2
6B0.2
6
B
0
.
2
(
5
6
)
(
6
5
)
M58x0.75 Z 4.5
M4x0.7 Z 6 MAX TORQUE 25 IN-LB
M4x0.7 Z 6 (BOTH SIDES) MAX TORQUE 25 IN-LB
M4x0.7 Z 6 (BOTH SIDES) MAX TORQUE 25 IN-LB
(12)
(16)
(
2
3
)
(
4
8
)
(
3
0
)
(61)
Figure 4: Spyder3 4k GigE Vision Color Camera Mechanical Dimensions
The Spyder3 SG-34 Cameras 13

Mounting

Heat generated by the camera must be allowed to move away from the camera. Mount the camera on the frontplate (using the provided mounting holes) with maximum contact to the area for best heat dissipation.
Figure 5: Spyder3 Mounting Example
14 The Spyder3 SG-34 Cameras

Software and Hardware Setup

Host System Requirements

To achieve best system performance, the following minimum resquirements are recommended:
Operating system: Windows XP Professional, Windows Vista, Windows 7 (either 32-bit or 64-bit for all) are supported.

Network Adapter Requirements

GigE network adapter (either PCI card or LOM): For high performance you must use a Intel PRO/1000 MT adapter.
The Spyder3 GEV camera works only with network adapters based on the Intel 82546, 82541, and 82540 network chips. The driver will also function with adapters based on the Intel 82544 chip, but these are not recommended due to bugs in the chip that can cause control packets to be lost if sent while data is streaming.

Ethernet Switch Requirements

When you require more than one device on the same network or a camera-to-PC separation of more than 100 metres, you can use an Ethernet switch. Since the Spyder3 GEV camera complies with the Internet Protocol, the camera should work with all standard Ethernet switches. However, switches offer a range of functions and performance grades, so care must be taken to choose the right switch for a particular application.

Setup Steps: Overview

Take the following steps in order to setup and run your camera system. They are described briefly below and in more detail in the following sections.

1. Install and Configure Ethernet Network Card

If your host computer does not have a Gigabit network adapter or equivalent (PCI bus Gigabit NIC) already installed, then you need to install one.
For Gigabit performance we recommend the Intel PRO/1000 MT adapter, or equivalent. Follow the manufacturer’s installation instructions.
A GigE Vision compliant XML device description file is embedded within the camera’s firmware allowing GigE Vision compliant applications (e.g. QuickCam, Pleora`s Coyote, and SaperaLT) to know the camera’s capabilities immediately after connection. The Spyder3 camera was tested with and supports SaperaLT which gives you access to the CamExpert GUI, a GigE Vision compliant application.
Software Installation
Install Sapera LT with CamExpert to control the Spyder3. You can access Sapera drivers, SDKs, and demos from the following link:
http://www.teledynedalsa.com/mv/support/driverSDKlist.aspx
The Spyder3 SG-34 Cameras 15

2. Connect Power, Ethernet and I/O Cables

Connect a power cable from the camera to a +12 VDC to +15 VDC power supply.
Connect the Ethernet cable from the camera to the computer Ethernet jack.
If using the external signals connect the external control cable to the camera.

3. Establish communicating with the camera

Start the GUI and establish communication with the camera.

4. Check camera LED, settings and test pattern

Ensure that the camera is operating properly by checking the LED, the current settings, and by acquiring a test pattern.

5. Operate the Camera

At this point you wil be ready to operate the camera in order to acquire and retrieve images, set camera functions, and save settings.
16 The Spyder3 SG-34 Cameras

Step 1. Ethernet Network Card: Install and Configure

Install Network Card

The following network card has been tested and is recommended for use with this camera: Intel Pro/1000 MT Desktop Adapter (33-MHz, 32-bit PCI). Order Code: PWLA8391GT (single packs). Follow the manufacturer’s recommendations to install this card in the host PC.

Configure Network Card

The configuration shown here uses the Windows XP operating system as the host platform.
The camera communicates using the Ethernet connection and employs the static IP address: 192.168.5.100 (default). A static address ensures the fastest operation. Alternatively, you can use a dynamic IP address.
To configure the network card from the host PC:
1. In the Start menu under “Control Panel” select “Network Connections,” and
configure the network card as follows:
2. Select the installed network card and click on “Change settings of this connection.”
3. Enable the “Internet Protocol (TCP/IP)” option only.
Figure 6. Internet Protocol
4. With “Internet Protocol (TCP/IP)” selected, click on the “Properties” button.
The Spyder3 SG-34 Cameras 17
5. Select “Use the following IP address” and set the IP address to any address in this
subnet other than 192.168.5.100, which is used by the camera. In the example below, the address 192.168.5.50 is used. Alternatively, select “Obtain an IP address automatically” to use a dynamic address.
6. Set subnet to: 255.255.255.0 and click on “OK.”
Figure 7. IP Address
7. Click “OK” to save settings
8. Click on “Configure” button and select “Advanced” tab
9. Enable “Jumbo Frames” to greater than 9000 bytes. If your NIC does not support
jumbo packets the image transfer speed will be slower.
18 The Spyder3 SG-34 Cameras
10. Click “OK” to save settings
Figure 8. Jumbo Frames
The Spyder3 SG-34 Cameras 19
Step 2. Connect Power, Ethernet, and Trigger
1 6
5
4
3
2
!
!
Cables
WARNING! Grounding Instructions
Static electricity can damage electronic components. Please discharge any static electrical charge by touching a grounded surface, such as the metal computer chassis, before performing any hardware installation.
The use of cables types and lengths other than those specified may result in increased emission or decreased immunity and performance of the camera.
Figure 9: Input and Output, trigger, and Power Connectors

Power Connector

WARNING: It is extremely important that you apply the appropriate voltages to your camera. Incorrect voltages may damage the camera. Input voltage requirement: +12 V to +15 V DC.
Table 6. Hirose 6-Pin Power Pinout
Pin Description
1, 2, 3 4, 5, 6
The camera requires a single 6-pin Hirosie connector with a single voltage input +12 VDC to +15 VDC for power. The camera meets all performance specifications using standard switching power supplies, although well-regulated linear supplies provide optimum performance.
Supply voltage—Min +12 VDC to Max +15 VDC
Ground
20 The Spyder3 SG-34 Cameras
!
WARNING: When setting up the camera’s power supplies follow these guidelines
and camera thermal shutdown has occurred.
Apply the appropriate voltages.
Protect the camera with a 2 amp slow-blow fuse between the power supply and
the camera.
Do not use the shield on a multi-conductor cable for ground.
Keep leads as short as possible in order to reduce voltage drop.
Use high-quality linear supplies in order to minimize noise.
If your power supply does not meet these requirements, then the camera performance specifications are not
Note:
guaranteed.

Ethernet Connector and Ethernet LED

The camera uses an RJ45 connector and a standard Cat 5 cable for Gigabit Ethernet signals and serial communications. The device supports 10/100/1000 Mbit/s speeds.
Note: Router connection not supported. Connection to a network switch for a single camera is supported.
Ethernet Connection LED
Steady ON indicates that an Ethernet connection is successfully established at 1Gbps.
Data Transmission LED
Steady ON indicates that the camera is ready for data transmission. Flashing indicates that the camera is transmitting or receiving data.
EMC Compliance
In order to achieve EMC compliance, the Spyder3 camera requires the use of shielded CAT5e or CAT6 Ethernet cables.

Status LED

The camera is equipped with a red/green LED used to display the status of the camera's operation. The table below summarizes the operating states of the camera and the corresponding LED states. When more than one condition is active, the LED indicates the condition with the highest priority. Error and warning states are accompanied by corresponding messages that further describe the current camera status.
Priority Color of Status LED Meaning
1 Flashing Red Fatal Error. For example, camera temperature is too high
The Spyder3 SG-34 Cameras 21
Priority Color of Status LED Meaning
2
Flashing Green
Camera initialization or executing a long command.
3
Solid Green
Camera is operational and functioning correctly.
(positive)
4
5
(positive)
7
8
9
OUTPUT_3
TTL auxiliary output
output
output 12
OUTPUT_0-
LVDS (negative)
output
14
OUTPUT_1-
LVDS (negative)
1
5
11
15

GPIO Connector:

A single 15-pin general purpose input / output (GPIO) connector is used to receive or control external signals. For example, the GPIO connector can be used to receive EXSYNC, PRIN (pixel reset), and direction signals.
The GPIO connector is programmed through the GUI application. In CamExpert the relevant parameters are located in the category Inputs Group.
Figure 10: GPIO Connector and Pin Numbers
Table 7: GPIO Connector Pinout
Pin Signal Description GenICam Default
1
INPUT_ 0+
External Input
LVDS/TTL format
EXSYNC +
2 3
6
10
11
13
15
INPUT_0- LVDS (negative) EXSYNC -
INPUT_1+ LVDS/TTL format
(positive) INPUT_1- LVDS (negative) FrameTrig -
GND INPUT_2+ LVDS/TTL format
INPUT_2- LVDS (negative) Direction -
INPUT_3 TTL auxiliary input
OUTPUT_2+ LVDS/TTL auxiliary
OUTPUT_0+ LVDS/TTL auxiliary
OUTPUT_1+ LVDS/TTL auxiliary
OUTPUT_2- LVDS (negative)
FrameTrig +
Direction +
A schematic of the TTL input circuitry is shown below. The input signals are fed into the engine from external sources via the GPIO connector.
22 The Spyder3 SG-34 Cameras

GPIO Isolation

1000
3.3V
3.3V
TTL
100
ESD Protection
5V
All of the GPIOs are isolated from the rest of the camera and the camera case. They are not isolated with respect to each other and share a common return (ground) through pin 5 of the GPIO connector. Note: The shell connection of the GPIO connector is not isolated and it should not be used as a return (ground) for the GPIO signals. The shell connection is attached to the camera case.

GPIO Configuration

Refer to Appendix B: GPIO Control for a detailed description of the GPIO use-cases and configuration options.

TTL Inputs and Outputs

Figure 11: TTL Input Schematic
Termination: 1000 series
Input current: minimum 0 nA; maximum 2 mA
Input voltage: maximum of low 0.66 V; minimum of high 2.6 V
TTL inputs are maximum 5 V and 3.3 V logic tolerant
Figure 12: TTL Output Schematic
Termination: 100 series
Output current: sink 50 mA; source 50 mA
Output voltage: maximum of low 0.55 V @ 32mA; minimum of high 3.8 V @ 32mA.
The Spyder3 SG-34 Cameras 23
LVDS Inputs and Outputs (LVDS compliant)
100
Figure 13: LVDS Input
Figure 14Figure 15: LVDS Output

Step 3. Establish Communication with the Camera

Power on the camera

Turn on the camera’s power supply. You may have to wait up to 60 seconds while the camera warms up and prepares itself for operation.

Connect to the camera

1. Start a new Sapera CamExpert application (or equivalent GigE Vision compliant interface) by double-clicking the desktop icon created during the software installation.
2. CamExpert will search for installed Sapera devices. In the Devices list area on the left side, the connected Spyder camera will be shown.
3. Select the Spyder camera device by clicking on the camera user-defined name. By default the camera is identified by its serial number.

Check LED Status

If the camera is operating correctly at this point, the diagnostic LED will flash for 10 seconds and then turn solid green.

Software Interface

All the camera features can be controlled through the CamExpert interface. For example, under the Sensor Control menu in the camera window you can control the frame rate and exposure times.
24 The Spyder3 SG-34 Cameras

Using Sapera CamExpert with Spyder3 Cameras

CamExpert is the camera interfacing tool supported by the Sapera library. When used with a Spyder3 camera, CamExpert allows a user to test all Spyder3 operating modes. Additionally CamExpert saves the Spyder3 user settings configuration to the camera or saves multiple configurations as individual camera parameter files on the host system (*.ccf).
An important component of CamExpert is its live acquisition display window which allows immediate verification of timing or control parameters without the need to run a separate acquisition program.
For context sensitive help, click on the button then click on a camera configuration parameter. A short description of the configuration parameter will be shown in a popup.
Click on the button to open the help file for more descriptive information on CamExpert.
The central section of CamExpert provides access to the Spyder3 parameters. Note: The availability of the parameters is dependent on the CamExpert user setting.

CamExpert Panes

Figure 16: CamExpert Example
The Spyder3 SG-34 Cameras 25
The CamExpert application uses 5 windows to simplify choosing and configuring camera files or acquisition parameters for the installed device.
Device Selector pane: View and select from any installed Sapera acquisition device. Once a device is selected CamExpert will only present acquisition parameters applicable to that device. Optionally select a camera file included with the Sapera installation or saved by the user.
Parameters pane: Allows viewing or changing all acquisition parameters supported by the acquisition device. CamExpert displays parameters only if those parameters are supported by the installed device. This avoids confusion by eliminating parameter choices when they do not apply to the hardware in use.
Display pane: Provides a live or single frame acquisition display. Frame buffer parameters are shown in an information bar above the image window.
Control Buttons: The Display pane includes CamExpert control buttons. These are:
Acquisition control button: Click once to start live grab, click again to stop.
Single frame grab: Click to acquire one frame from device.
Software trigger button: With the I/O control parameters set to Trigger Enabled / Software Trigger type, click to send a single software trigger command.
CamExpert display controls: (these do not modify the frame buffer data) Stretch image to fit, set image display to original size, or zoom the image to any size and ratio.
Histogram / Profile tool: Select to view a histogram or line/column profile during live acquisition.
Output Message pane: Displays messages from CamExpert or the device driver.
26 • The Spyder3 SG-34 Cameras

Step 4. Camera Test Patterns

Review a Test Pattern Image

The camera is now ready to retrieve a test pattern. The Spyder3 cameras include a built-in test pattern generator that can be used to confirm camera Ethernet connections without the need for a camera lens or proper lighting. The test patterns are useful for verifying camera timing and connections, and to aid in system trouble shooting.
Using CamExpert, select Image Format Control > Test Image Selector and choose one of the available test images. Select live grab to see the pattern output. The following test patterns are available:
Figure 17. Grey horizontal step
Figure 18. Grey horizontal ramp
The Spyder3 SG-34 Cameras 27
At this point you are ready to start operating the camera in order to acquire images, set
temperature should not exceed 80 °C.
Read Only Parameters
camera functions, and save settings.

Camera Operation

Factory Settings

The camera ships and powers up for the first time with the following factory settings:
Forward CCD shift direction
8 bit, 2 tap
No binning
Exposure mode: internal sync & maximum exposure time
5, 000 Hz line rate
Factory calibrated analog gain and offset
Factory calibrated FPN and PRNU coefficients

Check Camera and Sensor Information

Camera and sensor information can be retrieved via a controlling application—in the examples shown here, CamExpert. Parameters such as camera model, firmware version, sensor characteristics, etc. are read to uniquely identify the connected device.
The camera information parameters are grouped together as members of the Camera Information set.
GigE Vision Input Controls
Camera Information
Parameter Options
Manufacturer Name
Model Name
Manufacturer Info
Device Version
Device ID
Device User ID Define a camera name up to 64 characters
Serial number
Read Voltage and Temperature
Input Voltage
28 Camera Operation
Click to read the voltage from the camera. In general, the temperature read is 15 C greater than the temperature at the front plate. The

Verify Temperature and Voltage

settings previously saved by the user.
and make it the active / current set.
To determine the voltage and temperature at the camera, use the Read Voltage and Temperature feature found in the Camera Information set.
The temperature returned is the internal chip case temperature in degrees Celsius. For proper operation, this value should not exceed 80 °C. If the camera exceeds the designated temperature it will shut down and will not turn on until the camera’s temperature is 73 ºC or less. Use the reset camera function.
The voltage displayed is the camera’s input voltage. Note that the voltage measurement feature of the camera provides only approximate results (typically within 10%). The measurement should not be used to set the applied voltage to the camera, but only used as a test to isolate gross problems with the supply voltage.

Saving and Restoring Camera Settings

The parameters used to select, load and save user sets are grouped together under the Camera Information set of features.
GigE Vision Input Controls
Camera Information
Parameter Description
User Set Selector / Device Configuration Selector
User Set Load / Load Configuration Load the set specified by User Set Selector to the camera
User Set Save / Save Configuration Save the current set as selected user set.
Selects the camera configuration set to load feature settings from or save current feature settings to: factory (default) or user sets.
The Factory / Default set contains default camera feature settings. User camera configuration sets contain feature

Description of the Camera Settings

The camera operates in one of three settings:
1. Current session
2. User setting
3. Factory setting (Default, read-only)
The current settings can be saved (thereby becoming the user setting) using the User Set Save parameter. A previously saved user setting (User Set 1) or the factory settings can be restored using the User Set Selector and User Set Load parameters.
The relationship between these three settings is illustrated here and described below:
Camera Operation 29
Figure 19. Relationship between the Camera Settings

Current Session Active Setting

The active setting for the current session is the set of configurations that are operating while the camera is currently running, including all unsaved changes you have made to the settings before saving them.
These active settings are stored in the camera’s volatile memory and will be lost and cannot be restored if the camera resets, is powered down, or loses power.
To save these settings for reuse the next time you power up or reset the camera, or to protect against losing them in the case of power loss, you must save the current settings using the User Set Save parameter. Once saved, the current settings become your User Set 1.

User Setting

The user setting is the saved set of camera configurations that you can customize, resave, and restore. By default the user settings are shipped with the same settings as the factory set.
The command User Set Save saves the current settings to non-volatile memory as a User Set. The camera automatically restores the last saved user settings when it resets and / or powers up.
To restore the last saved user settings, select the User Set parameter you want to restore and then select the User Set Load parameter.

Factory (Default) Settings

The default setting is the camera settings that were shipped with the camera and which loaded during the camera’s first power-up. To load or restore the original factory settings, at any time, select the Default / Factory Setting parameter and then select the User Set Load parameter.
Please note that the following parameters are not reset when you load / restore the factory settings:
Debounce selector
30 • Camera Operation
Calibrate White Balance Target
external signal.
only when Line Trigger Mode is set to ON.
Sensor Direction Control is set to External.
PRNU Calibration Target
Color Correction Input Channel
Color Correction Output Channel
Tap
Color
Also note: By default, the user settings are set to the factory settings.

Timing: Exposure and Synchronization

Image exposures are initiated by an event. The trigger event is either the camera's programmable internal clock used in free running mode, an external input used for synchronizing exposures to external triggers, or a programmed function call message by the controlling computer.
Trigger commands are available as members of the Line Trigger set.
GigE Vision Input Controls
Line Trigger
Line Trigger Mode The state of the line trigger. If OFF, then the line trigger
is internally generated. If ON, then triggered by an
Line Trigger Source The external source that causes a line trigger. The line
trigger is from the GPIO_PIN0. This feature is available
Line Trigger Activation Determines the type of signal (high or low) that will cause
a line trigger. Line Trigger Mode must be ON. External Line Trigger Frequency
The three trigger modes are described here:
Free running (trigger disabled): The camera free-running mode has a programmable internal timer for line rate and a programmable exposure period. Line rate is 0.1 fps to the maximum supported by the sensor. Exposures range from the sensor minimum to a maximum also dependent on the current line rate. This always uses Synchronous mode where exposure is aligned to the sensor horizontal line timing.
External trigger: Exposures are controlled by an external trigger signal. External signals are isolated by an opto-coupler input with a time programmable debounce circuit. The following section provides information on external trigger timing.
Software trigger: An exposure trigger is sent as a control command via the network connection. Software triggers can not be considered time accurate due to network latency and sequential command jitter. But a software trigger is more responsive than calling a single-line acquisition (Snap command) since the latter must validate the acquisition
Reads the external line trigger frequency. NOTE: The
camera cannot detect frequency less than 5 Hz and will
display 1 if it cannot detect a signal. This feature is
available when the Line Trigger Mode is set o ON and
Camera Operation 31
parameters and modify on-board buffer allocation if the buffer size has changed since the
tLine Period
twSYNC_INT
twSYNC
tPR_INT
twPR_HIGH
twPR_LOWtPR
EXSYNC
PRIN
Internal Line Valid
tTRANSFER
tREADOUT
tOVERHEAD
Ethernet Latency to PC
Memory
Valid Data From
Diagramed
ExSync
tEthernet Latency
tLine_Period
μs
27.78
1000
1K 1 Tap
14.71
1000
1K 2 Tap
54.1
1000
2K 1 Tap
27.78
1000
2K 2 Tap
54.1
1000
4k 2 Tap
twSync
ns
100
>100ns
tPR
ns 0
twPR_LOW
ns
3000
twPR_HIGH
ns
3000
tPR_INT
ns
3000
1024
1
25600ns
2048
1
51200ns
2048
2
25600ns
4096
2
last acquisition.

Timing

Table 8: Timing Parameter Table
Units Min. Typ. Max. Notes
twSYNC_INT ns 100
(3000*)
For exposure mode 4 this value
needs to be >3000ns other wise
Table 9: tReadout Values
tREADOUT
Sensor Size # Taps Readout Time
1024 2 12800ns
32 Camera Operation
Table 10: tOverhead Values
Sensor Size
# Taps
Readout Time
1024
1
725ns
1024
2
450ns
2048
1
1400ns
2048
2
725ns
1. First set the camera mode using Exposure Mode and Line Trigger Mode commands.
Exposure Mode
This feature is used to set the operation mode of
maximum time according to its line rate.
Line Trigger Mode
The state of the line trigger. If the trigger is off,
external signal. Modes: Off or On.
tOVERHEAD
Overhead Delay
Overhead_Delay can range from 5 to 6μs and depends on the internal operations of your computer.

Exposure Controls

The camera can grab images in one of seven ways. The camera’s line rate (synchronization) can be generated internally through the Acquisition Line Rate feature (a member of the Sensor Control set of features) or set externally with an EXSYNC signal, depending on your mode of operation.
To select how you want the camera’s line rate to be generated:
2. Next, if using mode 2, 6, or 7 (see below) use the commands Acquisition Line Rate Abs
and/or Exposure Time Abs to set the line rate and exposure time.
GigE Vision Input Controls
Sensor Control
the Exposure (or shutter): Off, Timed, Trigger Width. If Off is selected then the camera uses the
Line Trigger Group
then the line trigger is internally generated. Otherwise, the line trigger is caused by an

Set the Exposure Mode

Sets the camera’s exposure mode and allows you to control your sync, exposure time, and line rate generation.
Camera Operation 33
Programmable Line Rate Programmable Exposure Time
A
(Internal)
time. Exposure mode enabled.
B
mode disabled.
C
(Internal)
enabled.
D
(Internal)
mode enabled.
E
disabled.
Mode LineTriggerMode ExposureMode Description
Off (Internal) Timed
On (External) Off (Internal) No No Maximum exposure time. Exposure
On (External) TriggerWidth
On (External) Timed
Off (Internal) Off (Internal) Yes No Internal line rate, maximum
Yes Yes Internal line rate and exposure
No No Smart EXSYNC. Exposure mode
No Yes Fixed integration time. Exposure
exposure time. Exposure mode
Note: When setting the camera to external signal modes EXSYNC must be supplied.

Exposure Modes in Detail

Mode A. Internally Programmable Line Rate and Exposure Time (Factory Setting): ExposureMode Timed and LineTriggerMode Off (Internal)
When setting the line rate (using the AcquisitionLineRateAbs command), exposure time will be reduced, if necessary, to accommodate the new line rate. The exposure time will always be set to the maximum time (line period – line transfer time – pixel reset time) for that line rate when a new line rate requiring reduced exposure time is entered.
When setting the exposure time (using the ExposureTimeAbs command), line time will be increased, if necessary, to accommodate the exposure time. Under this condition, the line time will equal the exposure time + line transfer time.
34 Camera Operation
Programmable Period ( command)ExposureTimeAbs
Line Period
Readout
CR Exposure Time
CR=Charge Reset
Line Period
Programmable Period
CR Exposure Time
Programmable Period ( command)AquisitionLineRateAbs
Readout
Programmable Period
Waiting Waiting
Line Period
Exposure Time
Line Period
Readout
Exposure Time
Falling Edge Ignored During Readout
Readout
Falling Edge Ignored During Readout
EXSYNC
Readout
EXSYNC
EXSYNC falling edge ignored during readout
Line Period
CR=Charge Reset
Readout
Line Period
EXSYNC falling edge ignored during readout
WaitingExposure Time
CR
Waiting
CR
Exposure Time
Example 1: Exposure Time less than Line Period
Mode B. External Trigger with Maximum Exposure: ExposureMode Off and LineTriggerMode On (External)
Line rate is set by the period of the external trigger pulses. The falling edge of the external trigger marks the beginning of the exposure.
Example 2: Line Rate is set by External Trigger Pulses
Mode C. Smart EXSYNC, External Line Rate and Exposure Time: ExposureMode TriggerWidth and LineTriggerMode On (External)
In this mode, EXSYNC sets both the line period and the exposure time. The rising edge of EXSYNC marks the beginning of the exposure and the falling edge initiates readout.
Example 3: Trigger Period is Repetitive and Greater than Read Out Time
Mode D. External Line Rate and Internally Programmable Exposure Time: ExposureMode Timed and LineTriggerMode On (External
Camera Operation 35
)
Line Rate (Hz)
Camera line rate, in Hz. 300 Hz min., 68000 Hz max.
Readout
EXSYNC
Line Period
CR=Charge Reset
Readout
Line Period
Programmable period using commandExposureTimeAbs
Programmable period using commandExposureTimeAbs
CR CR
Exposure Time Exposure Time
Waiting
Waiting
Exposure Time
AquisitionLineRateAbs command
Line Period
Line Period
during readout
edge ignored
during readout
Figure 20: EXSYNC controls Line Period with Internally controlled Exposure Time
Mode E. Internally Programmable Line Rate, Maximum Exposure Time: ExposureMode Off and LineTriggerMode Off (Internal)
In this mode, the line rate is set internally with a maximum exposure time.
Exposure Time
Readout
Internal Sync set with
EXSYNC falling edge ignored
Figure 21: Mode 7 Camera Timing

Line Rate

To set the camera’s line rate, use the Line Rate feature found in the Sensor Control set. This feature is only available while the camera is operating in Internal Imaging Mode (Trigger Mode off).
GigE Vision Input Controls
Parameter Description
Only available when the camera is in Internal Mode—trigger is disabled (Trigger Mode off). Exposure Mode is Timed and Line Trigger Mode is ON.
Line rates are in the following configurations:
36 Camera Operation
2k 1 tap: 300-18500 Hz 2k 2 tap: 300-36000 Hz 4k 2 tap: 300-18500 Hz
Sensor Control
Readout
EXSYNC falling

Exposure Time

Exposure Mode
This feature is used to set the operation mode of the Exposure (or
rate).
Exposure Time
This feature is used to set the Exposure time (in microseconds) when Exposure Mode is set to Timed. min 3, max 3300 us.
Frame. It can also be used to control the exposure duration at the beginning of a frame.
Trigger Overlap
Specify the type of trigger overlap permitted with the
accepted (or latched) for a new frame
Frame Trigger Delayer
Specifies the delay in microseconds (μs) to apply after the
The delay of the selected trigger in 1 µs increments.
Frame Trigger Source
The line that triggers a frame trigger when Frame Start Trigger Mode is On.
Frame Trigger Software
Trigger Software is a command that can be used by an
false first then choose true.
Active Mode
Activation
variable length frame trigger.
Frame Active Trigger Mode
Specifies whether the external variable length frame
FrameStartTrigger.
Frame Active Delay
Enable the delayer.
Start Mode
To set the camera’s exposure time, use the Exposure Time feature found in the Sensor Control set. This feature is used to set the exposure time in µs. This feature is only available when the Timed Exposure Mode. The allowable range is from 3 µs to 3300 µs.
GigE Vision Input Controls
Sensor Control
Parameter Description
shutter): Timed, Trigger Width, Off (maximum, according to line

Triggers

GigE Vision Input Controls
Frame Trigger Function Group
The Frame Trigger Control section describes all features related to frame acquisition using trigger(s). One or many Trigger(s) can be used to control the start of an Acquisition, of a
Parameter Description
Toggle
Frame Active Trigger
previous frame. This defines when a valid trigger will be
trigger reception before activating it
application to generate an internal trigger when Trigger Source is set to Software. To generate a trigger, choose
Specifies what type of signal(i.e. high, or low) causes a
trigger is on or off. This trigger takes precedence over the
Camera Operation 37
Frame Start Trigger Mode Specifies whether the external fixed length frame trigger
Linescan (Start Mode).
is On.
Line. It can also be used to control the exposure duration at the beginning of a line.
by an external signal
when Line Trigger Mode in set to On.
line trigger if Line Trigger Mode is On.
Sensor Direction Control is set to External
available when the Line Trigger Mode is set to On.
lines (pins)
Line1-- Frame Trigger, Line2 -- Direction. If rotary
is on or off. If the FrameTriggerActiveMode is on then it takes precedence.To turn On, please DeviceScanType to
Frame Start Trigger Activation Specifies what type of signal(i.e. high, or low) causes a
fixed length frame trigger when Frame Start Trigger Mode
Frame Start Delay Enable the delayer.
GigE Vision Input Controls
Line Trigger Function Group
The Line Trigger Control section describes all features related to line acquisition using trigger(s). One or many Trigger(s) can be used to control the start of an Acquisition, of a
Parameter Description
Line Trigger Mode The state of the line trigger. If the trigger is off, then the
line trigger is internally generated otherwise it is caused
Line Trigger Source The external line that causes a line trigger.The line
trigger is from GPIO_PIN0. This feature is available only
Line Trigger Activation Specifies what type of signal(i.e. high, or low) causes a
External Line Trigger Frequency
Read External Line Frequency Read the external line trigger frequency and updates the
Reads the external line trigger frequency. NOTE: The camera cannot detect frequency less than 5 Hz and will display 1 if it cannot detect a signal. This featuer is available when the Line Trigger Mode is se to ON and
ExternalLineTriggerFrequency register. This feature is

Input / Output Control

CamExpert groups the camera I / O Controls Parameters in either the Inputs group or the Outputs. These parameters allow configuring the Spyder3 inputs and outputs for type of signal and signal polarity.
GigE Vision Input Controls
Inputs Group
This group contains the features that allow the configuration of the camera physical input
Parameter Description
Line Selector This feature selects which physical line (or pin) of the
external device connector to configure. When a Line is selected, all the other Line features will be applied to its associated I/O control block and will condition the resulting input or output signal. Line0-- Line Trigger,
38 Camera Operation
encoder is used, Line0 -- Phase A , Line2 -- Phase B
connect, TTL, LVDS
line smaller than Line2
Line Debounce Factor
This feature control the minimum period of a input line transition before detecting a signal transition.
Parameter
Description
Output Selector
This feature selects which physical line (or pin) of the
signals at PLC_Q3.
Output Format
This feature returns or sets (if possible) the current
Connect, TTL, or LVDS
Uncorrected
Line Format This feature returns or sets (if possible) the current
electrical format of the selected physical input Line: No
Line Connector Pin Enumeration of the physical line (or pin) on the device
connector. This feature is not available when Line Format is set to Not Connected and when Line Selector in set to a
Line Function Displays the line function
Outputs Group
external device connector to configure. When a Line is selected, all the other Line features will be applied to its associated I / O control block and will condition the resulting input or output signal.
Line0 outputs signals at PLC_Q0; Line1 outputs signals at PLC_Q1; Line2 outputs signals at PLC_Q2; Line3 outputs
electrical format of the selected physical output Line: No

Gain, Black Level, and Background

The cameras provide gain and black level adjustments in the digital domain for the sensor. The gain and black level controls can make small compensations to the acquisition in situations where lighting varies and the lens iris cannot be easily adjusted. The user can evaluate gain and black level using CamExpert.
The parameters that control gain, black level, and background are grouped together in the Analog Controls set.
Note that calibrating the gain can take up to 10 seconds. Adjust the GUI’s timeout values (in the Advanced Processing set) accordingly.
A section describing camera calibration in detail is available later in this manual.
GigE Vision Input Controls
Analog Controls
Parameter Description
Light Source Specifies the adjustment to the color gain values for a
given light source.
Camera Operation 39
White LED
Tungsten
Tap 2
Blue
Color Gain Reference Update
Provides a new baseline for the colour gain. Sets the current colour gain value to 0.0 dB
Calibrate White Balance
Adjust the color gain so that each color's average is equal
command can take up to 15 seconds.
Target
Total Color Gain (DB)
Displays the combination of the ColorGain,
ranges from -0.92 to 24.0
Color Gain Reference (DB)
The color gain reference value Result
Read Calibrate White Balance Color Gain) must be between -0.92 and 24 dB.
digitized image data (in DN).
8191.
Channel
Channel
matrix.
Halogen Fluorescent
Tap Selects the tap to control.
All Tap 1
Color Selects which color to control.
All Red Green
Color Gain (DB) The gain, in dB, for a selected color and tap.
to the CalibrateWhiteBalanceTarget. Always set proper target before click this button. The sensorScanDirection must not be set to External. *** WARNING: This
Calibrate White Balance
The goal of the CalibrateWhiteBlance command(in DN)
ColorGainReference and DigitalGainAbs in dB.This value
Calibrate White Balance
The result of the last calibrate white balance
GigE Vision Input Controls
Analog Controls
Parameter Description
Digital Gain (DN) Sets the digital system gain control. The gain is limited by
the highest Color Gain. Total Color Gain (Digital Gain *
Digital Gain (dB) Digital gain amplification in dB.
Background Subtract (DN) Used to increase image contrast after FPN and PRNU
calibration. Subtract a background value from the
Color Correction Value The color correction value for the given indicies. Max
Color Correction Input
Color Correction Output
Specifies the color to correct using the color correction
40 Camera Operation
Table 11: Gain Range by Camera Model
Default width: size of the sensor.
Default size width: size of the sensor.
Image Height
Actual image height in active image pixels.
pixels.
Image Offset
Image start position (in pixels). The horizontal offset
0.
Image Flip Horizontal
This feature is used to flip horizontally the image sent by the device. Default value: not flipped.
Bayer GR
Gain
1K /2K Cameras 4K Cameras
Color Gain NA -20.0 dB to +20.0 dB (0 dB
default)

Image Size

To set the height of the image, and therefore the number of lines to scan and transmit, use the parameters grouped under the Image Format Control set.
GigE Vision Input Controls
Image Format Control
Parameter Description
Maximum Image Width This feature represents the maximum width (in
pixels) of the image after horizontal binning, decimation or any other function changing the horizontal dimensions of the image.
Image Width Current width of the image / area of interest (in
pixels). This value is dependent on the horizontal binning and maximum width values.
Default height: 480 pixels. Maximum height: 16, 383
from the origin to the AOI (in pixels). Default offset:

Color

GigE Vision Input Controls
Sensor Control
Parameter Description
Pixel Color Filter This feature indicates the type of color filter that is
applied to the image. Bayer RG Bayer GB
Camera Operation 41
Bayer BG
CYYM, RGBW, RGBE, RBGG

Pixel Format

Mono 8 RGB
the camera "upside down"
Sensor Shift External Direction
The current sensor shift direction when the direction
wne sensorScanDirection is set to External.
Read Sensor Shift Direction
Read current direction of the external signal that
External.
Sensor Color Type Monochrome or color. Color types are: Bayer, CYGM,
Pixel Format
Use the Pixel Format feature found in the Image Format Control set to select the format of the pixel to use during image acquisition as either Mono 8 or Mono 12 bit depth.
GigE Vision Input Controls
Image Format Control
Parameter Description

Sensor Direction Control

Found in the I / O Control > Direction Control set of features.
GigE Vision Input Controls
Direction Control
Parameter Description
Sensor Scan Direction Selects the forward or reverse CCD shift direction or
external direction control. This accommodates object direction change on a web and allows you to mount
is externally controlled. This feature is only available
controls the sensor shift direction. This feature is available only when sensorScanDirection is set to
42 Camera Operation

Sensor Shift Direction

default factory settings or with saved user settings)
You can select either forward or reverse CCD shift direction. Selectable direction accommodates object direction change on a web and allows you to mount the camera “upside down”.
Figure 22: Object Movement and Camera Direction Example using an Inverting Lens

Resetting the Camera

The feature Camera Reset, part of the Camera Information set, resets the camera.
The camera resets with the last saved settings and the baud rate used before the reset. Previously saved pixel coefficients are also restored.
GigE Vision Input Controls
Camera Information
Parameter Description
Camera Reset Reset the camera and put it in its power-up state (either with the
Camera Operation 43

Camera Calibration

Processing Chain Overview and Description

The following diagram shows a simplified block diagram of the camera’s digital processing chain.
The digital processing chain contains the FPN correction, the PRNU correction, the background subtract, and the digital gain and offset adjustments. These elements are user programmable and most are members of the Analog Controls and Advance Processing sets.
Figure 23: Signal Processing Chain

Digital Processing

1. Fixed pattern noise (FPN) calibration (calculated using the FPN Calibrate parameter) is used to subtract away individual pixel dark current.
2. Photo-Response Non-Uniformity (PRNU) coefficients (calculated using the PRNU Target and Calibrate PRNU parameters in the Advance Processing family) are used to correct the difference in responsivity of individual pixels (i.e. given the same amount of light different pixels will charge up at different rates) and the change in light intensity across the image either because of the light source or due to optical aberrations (e.g. there may be more light in the center of the image). PRNU coefficients are multipliers and are defined to be of a value greater than or equal to 1. This ensures that all pixels will saturate together.
3. Calibrate White Balance calibrates individual colour gain settings so that the outputs are equal between the colors.
4. The Color Gain (DB) specifies the gain in dB for a given color and tap.
5. Background subtract (Background Subtract (DN) parameter) and system (digital) gain (Digital Gain (DN) parameter) are used to increase image contrast after FPN and PRNU calibration. It is useful for systems that process 8-bit data but want to take advantage of the camera’s 12 bit digital processing chain. For example, if you find that your image is consistently between 128 and 255DN (8 bit), you can subtract off 128
44 Camera Calibration
(Background Subtract (DN) 2048) and then multiply by 2 (Digital Gain (DN)
output
V
=
digital input pixel value from the CCD
PRNU( pixel)
=
PRNU correction coefficient for this pixel
pixel
8192) to get an output range from 0 to 255.
6. The Color Correction Value (as part of the Color Matrix feature, see page 51.) adds color space conversion functionality to the camera, allowing you to improve the color response.
Calibrating the Camera to Remove Non­Uniformity (Flat Field Correction)

Calibration Overview

When a camera images a uniformly lit field, ideally, all of the pixels will have the same gray value. However, in practice, this is rarely the case (see example below) as a number of factors can contribute to gray scale non-uniformity in an image: Lighting non-uniformities and lens distortion, PRNU (pixel response non-uniformity) in the imager, FPN (fixed pattern noise) in the imager, etc.
Figure 24. Image with non-uniformities
By calibrating the camera you can eliminate the small gain difference between pixels and compensate for light distortion. This calibration employs a two-point correction that is applied to the raw value of each pixel so that non-uniformities are flattened out. The response of each pixel will appear to be virtually identical to that of all the other pixels of the sensor for an equal amount of exposure.
Correction Overview
This camera has the ability to calculate correction coefficients in order to remove non­uniformity in the image. This video correction operates on a pixel-by-pixel basis and implements a two point correction for each pixel. This correction can reduce or eliminate image distortion caused by the following factors:
Fixed Pattern Noise (FPN)
Photo Response Non Uniformity (PRNU)
Lens and light source non-uniformity
Correction is implemented such that for each pixel:
V
= [(V
output
Gain
where V
– FPN (pixel) - digital offset) * PRNU (pixel) – Background Subtract] x System
input
= digital output pixel value
input
FPN( pixel ) = FPN correction coefficient for this
Camera Calibration 45
Background Subtract
=
background subtract value System Gain
=
digital gain value
3>
Brightest Pixel (per tap)
The algorithm is performed in two steps. The fixed offset (FPN) is determined first by performing a calibration without any light. This calibration determines exactly how much offset to subtract per pixel in order to obtain flat output when the CCD is not exposed. The white light calibration is performed next to determine the multiplication factors required to bring each pixel to the required value (target) for flat, white output. Video output is set slightly above the brightest pixel (depending on offset subtracted).
Flat Field Correction Restrictions
It is important to do the FPN correction first. Results of the FPN correction are used in the PRNU procedure. We recommend that you repeat the correction when a temperature change greater than 10°C occurs or if you change the analog gain, integration time, or line rate.
PRNU correction requires a clean, white reference. The quality of this reference is important for proper calibration. White paper is often not sufficient because the grain in the white paper will distort the correction. White plastic or white ceramic will lead to better balancing.
For best results, ensure that:
50 or 60 Hz ambient light flicker is sufficiently low not to affect camera
Note: If your illumination or white reference does not extend the full field of view of the camera, the camera will send a warning.
performance and calibration results. For best results, the analog gain should be adjusted for the expected
operating conditions and the ratio of the brightest to darkest pixel in a tap should be less than 3 to 1 where:
Darkest Pixel (per tap)
46 • Camera Calibration
The camera is capable of operating under a range of 8 to 1, but will
clip values larger than this ratio.
The brightest pixel should be slightly below the target output.
When 6.25% of pixels from a single row within the region of interest
are clipped, flat field correction results may be inaccurate.
Correction results are valid only for the current analog gain and offset values. If you change these values, it is recommended that you recalculate your coefficients.

Digital Signal Processing

The FPN and PRNU calibration parameters are available as members of the Advanced Processing set and are only available to Guru users.
Figure 25. Advanced Processing / Calibration Parameters
Camera Calibration 47
GigE Vision Input Controls
sets available.
Load FFC Coefficient
Loads the Flat Field Correction Coefficients (specified by the Pixel Set Selector) from the cameras non-volatile memory.
Save PRNU
Saves the PRNU Correction Coefficients (specified by the Pixel Set
Selector is not Default.
Save FPN
Saves the FPN Correction Coefficients (specified by the Pixel Set
Selector is not Default.
FPN Calibrate
Calculate the fixed pattern noise correction coeffients. This should
timeout values.
Target to Calibrate PRNU
The target value for the PRNU calibration algorithm
PRNU Calibrate
Performs a PRNU Calibration. To calibration PRNU, the direction
Ideally FPN calibration should be done before the PRNU calibration.
Enables and disables the fixed pattern noise correction
Enables and disables the photo response non-uniformity correction
factor of 1. This command does not reset saved coefficients.
Result
Advanced Processing
Parameter Description
FFC Coefficient Set No. Selects the pixel set to load, save, or configure. There are 8 user
Selector) to the camera's non-volatile memory when Pixel Set
Selector) to the camera's non-volatile memory when Pixel Set
be performed with a dark sensor. This feature is not available when Sensor Scan Direction is set to External. *** WARNING: This command can take up to 3 seconds. Please adjust the GUI's
must not be External. Always set proper target before clicking this button. *** WARNING: This command can take up to 15 seconds.
FPN Enable The state of the fixed pattern noise correction
PRNU Enable The state of the PRNU correction
Reset Coefficients Resets the Pixel Coefficients to effectively turn off flat field
correction.
Restores the cameras pixel coefficients to 0 for FPN and a PRNU
Calibration Result Displays the result from the flat field calibration.
Read FFC Calibration
Read FFC Calibrate Result
48 Camera Calibration
Prepare for Calibration
For best results, the camera should be setup for calibration with similar conditions as to those in which it will be used. For example, data mode, exposure times and line rates, scan direction, etc.
For example, set the color gain for the current color using the Color Gain command.
Step 1: White Balance Calibration
1. Remove the lens cap and prepare a white, uniform target.
2. Adjust the line rate so that the average output is about 80% of the full output by: adjusting the lighting, if you are using an internal exposure mode. Or, adjust the line rate, if you are using the Smart Exsync mode.
3. White balance calibrates individual colour gain settings so that the outputs are equal between the colors. Calibrate the white balance using the commands Calibrate White Balance Target and Calibrate White Balance, where the target value (always counted as 12-bit) is 1024 to 4055 DN. For example, if you want to set the target to 255 x 80% = 204 DN in 8-bit mode, then the target value is (204/255) x 4096 = 3277 DN in 8-bit mode. Therefore, you can set the target to 3300 DN.
Calibration results from the Calibrate White Balance command:
Success
Clipped to min > Color gain set minium, failure to reach target
Clipped to max > Color gain set maximum, failure to reach target
Timeout > FPGA did not return new end of line statistics or video line
Step 3: FPN Calibration
Note that you do not need to turn off the FPN and PRNU coefficients before calibrating, the camera will do this automatically.
1. Stop all light from entering the camera. The best way to do this is to put on lens cap.
2. Calibrate FPN using the FPN Calibrate command.
3. Use the Read FFC Calibration Result parameter to determine if your calibration was a success or not.
4. To save the calibrated FPN coefficients to the FFC coefficient set shown, use the Set FPN Save parameter.
Step 4: PRNU Calibration: White Calibration
Performs PRNU calibration to user entered value and eliminates the difference in responsivity between the most and least sensitive pixel creating a uniform response to light. Using this command, you must provide a calibration target.
Executing these algorithms causes the Background Subtract (DN) value to be set to 0 (no background subtraction) and the Digital Gain (DN) value to 4096 (unity digital gain). The pixel coefficients are disabled (Pixel Set Load 0) during the algorithm execution but returned to the state they were prior to command execution.
1. Remove the lens cap and prepare a white, uniform target.
2. Adjust the line rate so that the average output is about 80% of the full output by: adjusting the lighting, if you are using an internal exposure mode. Or, adjust the line rate, if you are using the Smart Exsync mode.
Camera Calibration 49
3. Set the PRNU target value using the Target to Calibrate PRNU command. The target
Digital Gain (DN) =
max output value
max output value - Backgr ound Sub tract val ue
Digital Gain (DN) =
i
4096
value (always counted as 12-bit) and is 1024 to 4055 DN. For example, if you want to set the target to 255 x 80% = 204 DN in 8-bit mode, then the target value is (204/255) x 4096 = 3277 DN in 8-bit mode. Therefore, you can set the target to 3300 DN: Target to Calibrate PRNU is 3300.
4. Calibrate the PRNU using the PRNU Calibrate command.
5. Use the Read FFC Calibration Result parameter to determine if your calibration was a success or not.
6. To save the calibrated PRNU coefficients to the FCC coefficient set shown, use the Set PRNU Save parameter.
7. After the above command is completed, both the FPN and PRNU coefficients are automatically turned on.
Calibration results from the PRNU Calibrate command:
Success
Clipped to min > Color gain set minium, failure to reach target
Clipped to max > Color gain set maximum, failure to reach target
Timeout > FPGA did not return new end of line statistics or video line
W08: Greater than 1% of coefficients have been clipped > Greater than 1 % of PRNU
coefficients have been calculated to be greater than the maximum allowable 8.
Subtracting Background
Use the Background Subtract features after performing flat field correction if you want to improve your image in a low contrast scene. It is useful for systems that process 8 bit data but want to take advantage of the camera’s 12 bit digital processing chain. You should try to make your darkest pixel in the scene equal to zero.
Background Subtract Selector to select taps and Background Subtract (DN) to subtract a value in a range from 0 to 4095 DN.
Setting Digital System Gain
Improve the signal output swing after a background subtract. When subtracting a digital value from the digital video signal, using the Background Subtract (DN) feature, the output can no longer reach its maximum.
Use this command to correct for this where:
Gain Selector: Tap selection. Digital Gain DN: Gain setting. The gain ranges are 0 to
65535. The digital video values are multiplied by this value where:
Use this command in conjunction with the Background Subtract command.
4k model limited to 12953 (0 dB effective at factory set analog gain of -10 dB).
50 Camera Calibration

Color Correction Matrix

The color matrix adds color space conversion functionality to the camera, allowing you to improve the color response. A color space is a way to manage the display of image color using a three-dimensional coordinate system. Different color spaces are best for different devices, such as RGB (red-green-blue) for CRT monitors or YCbCr (luminance-chrominance) for digital television.
The color correction matrix provides a flexible and efficient means to convert image data from one color space to another, using user-entered multipliers. This process is suitable for use in a wide variety of image processing and display applications. The primary purpose of the color correction is to make color display better on the output device (i.e CRT, LCD, Plasma, etc.).
In order to get the decimal equivalent multiplication, every number in the table has to be divided by 4096.
The table should be read as follows:
RED = 4096(/4096)*RED + 0*GREEN + 0*BLUE + Offset GREEN = 0*RED + 4096(/4096)*GREEN + 0*BLUE + Offset BLUE = 0*RED + 0*GREEN + 4096(/4096)*BLUE + Offset
The default values in the color correction matrix are:
Color Correction: O r g b r 0 4096 0 0 g 0 0 4096 0 b 0 0 0 4096
Camera Calibration 51

An example on how to use the color matrix

Color Correction:
r
g b
r 4096 0 0
g 0 4096 0
b 0 0 4096
OK>ColorCorrectionInputChannel Red
OK>ColorCorrectionOutputChannel Red
OK>ColorCorrectionValueRaw 8191
Color Correction:
r g b
r 8191 0 0
g 0 4096 0
b 0 0 4096
OK>ColorCorrectionInputChannel Green
OK>ColorCorrectionValueRaw 2048
Color Correction:
r g b
r 8191 2048 0
g 0 4096 0
b 0 0 4096
Default values 4096
Increase Red input and output to 8191
Increase Green Input to 2048 (maintaining Red output)
Input Channel
Output Channel
After calibrating the camera and reviewing the output, you determine that you need to increase and add more green to your red output. The color matrix commands are found in the Analog Controls set of parameters.
The registers Color Correction Input Channel (Red, Green, Blue) and Color Correction Output Channel (Red, Green, Blue) are used to choose locations in the table: Color CorrectionInput Channel specifies the input channel and Color Correction Output Channel specifies the output channel. The Color Correction Value (in a range ­32000 to 32000) parameter specifies the correction coefficient.
Starting with the default values:
Ending with an increase of red and green in the red output.
52 Camera Calibration
Appendix A: Clear Dark
Stop Max line rateDC Clear th
HFLF
Watchdog th
100Hz
DC Clear ON
DC Clear OFF
Freq decreasing
Freq increasing
00-R
7433
8993
00-R
4000
4400
Current

Gate Dark Current Clear

Image sensors accumulate dark current while they wait for a trigger signal. If the readout is not triggered in a reasonable amount of time, then this dark current accumulation may increase to an excessive amount. The result of this happening will be that the first row, and possibly additional rows (frames), of the image will be corrupt. The sensor used in this camera contains two sources of dark current that will accumulate with time: 1) in the photo sensitive area, and 2) in the gates used to clock-out the charge. The gate dark current can account for approximately 20% of the total dark current present. While the exposure control has direct control over the amount of dark current in the photo sensitive area, it has no control over the charge accumulated in the gates. Even with exposure control on, at low line rates, this gate charge can cause the camera to saturate. Using the behavior in order to minimize the dark current artifact. The modes of operation selected by the

Auto Mode (srm 0)

Note: Teledyne DALSA recommends Auto mode for most users. In this mode camera will automatically start and stop dark current clear based on the line rate.
Set Readout Mode (srm) command, the camera user can control the camera's
srm command are: Auto, On, or Off.
Figure 26: Gate Dark Current Clear in the Auto Mode.
To avoid corrupted lines due to jitter in External Trigger mode, the dark current clear switchover is controlled by hysteresis thresholds. Thresholds (LF and HF) are set to higher frequencies, below ½ of the maximum line rate, so that switchover will be transparent in an image. However, if the external trigger frequency jumps back and forth over both thresholds in three consecutive lines, a corrupted line will occur.
Threshold frequencies for each model are outlined in the tables below:
Auto Mode Transition Frequencies (kHz)
Model LF HF Maximum Line Rate
SG-34-02K80-
SG-34-04K80-

Appendix A: Clear Dark Current 53

18000
9000

Immediate read out mode (default, srm 2)

SG-34-02K80
18000 Hz
9000 Hz
SG-34-02K80
55.5 µs
SG-34-04K80
111 µs
0
ssf
In this mode the image is read out, including accumulated dark current, immediately following the trigger or the EXSYNC falling edge. There are no line rate limitations other than the amount of gate dark current that can be tolerated at low line rates. For information on artifacts that may be experienced while using this mode, see the Artifacts section below. There are no timing or exposure anomalies other than situations where EXSYNC is removed from camera. In this case, the camera can be set to operate in a "watchdog" state. The watchdog will start DC clear at frequencies = or < 10 Hz, where dark current is significant. A small DN step will be visible in the image where the watchdog turns on and off. The watchdog operates on the single threshold. If sync frequency is not in the sharp transition watchdog may cause corrupted lines crossing the threshold.

Gate dark current clear mode (always on, srm 1)

In this mode the gate dark current will be cleared continuously. After the trigger (EXSYNC) is received, the dark current is cleared from the image sensor before the image is acquired. The line rate is limited to ½ the maximum line rate available for that model of camera. For information on artifacts that may be experienced while using this mode, see the Artifacts section below.
Table 12. Maximum Line Rates
Model Max. Line Rate
Immediate Readout Mode Dark Current Clear Mode
SG-34-04K80 9000 Hz 4500 Hz
When operating in the dark current clear mode, there will be a slight delay, equivalent to one readout time, before the actual exposure is implemented. The actual exposure time will not be altered.
Table 13. Exposure Delay and Maximum Exposure Times
Model Exposure Delay and Max Exposure Time in Auto Mode

Setting the Readout Mode

Use this command to control dark current in the vertical transfer gates.
Camera Link Command
Parameter Description Notes
srm
: Auto. Clears dark current
below ~ 30-45% of the maximum line rate 1: Dark current clear. Always
clears dark. Reduces the maximum line rate.
The vertical transfer gates collect dark current during the line period. This collected current is added to the pixel charge.
If the user is in sem 2 or 7 and srm 2, with
at 45% of the maximum, and
54 Appendix A: Clear Dark Current
2: Immediate readout. Does
command.
srm 0
not clear dark current. (Default mode all models)
Example
then srm 1 is selected, the following warning will be displayed, but the ssf value will not be changed: Warning 09: Internal line rate inconsistent with readout time> The effect in both internal and external line rate modes is that an EXSYNC is skipped and, therefore, the output will be at least twice as bright.
This value is saved with the camera settings.
This value may be viewed using either
gcp command or the get srm
the
Appendix A: Clear Dark Current 55

Appendix B: GPIO Control

1
INPUT_ 0+
LVDS/TTL format (positive)
The camera’s General Purpose Input / Output (GPIO) connector allows the camera to receive (and in some cases output) direct, real-time control signals that are independent from the Ethernet communications. For example, the GPIO connector can be used to control EXSYNC, PRIN (pixel reset), and direction signals.
You may want to use non-Ethernet control signals because Ethernet network protocols introduce a small but measurable and unpredictable lag that may not allow for extremely precise and reliable control of camera behavior, such as line rate, integration time, and readout direction.
In general, to configure the GPIO you need to accomplish three main tasks:
1. Assign a physical camera pin and signal to a GPIO Input number.
2. Map the GPIO Input or Output using the parameter commands located in the Line Trigger Function, Inputs, Outputs, Direction Control, and Sensor Control groups in the GUI. (Please note that this step has already been performed for the Beginner level scenarios described below.)
3. If you want to use applications other than those provided in the Beginner level examples, you can use the LUT programming language to map the GPIO Input Configuration to the GPIO Output Configuration in the Guru level.
Note: the screenshots presented in this section are from the CamExpert GUI. If you are using a different GUI the arrangement of the commands and parameters may be different.

GPIO Getting Started: Beginner Mode

NOTE: The following instructions are based on the default settings of the camera. Cameras are shipped from the factory in a default setting. Default settings are restored by loading the factory default (see Trigger Settings (GURU) for details).

The GPIO Connector

The GPIO connector is used to interface external signals in and out of the camera. The connector contains 15 pins that can configure 4 inputs and 4 outputs (See Figure 1 and Table 1). Three of the four inputs/outputs (i.e. 0 to 2) can be configured as Off, LVDS (Low Voltage Differential Signal), or TTL (Transistor/Transistor Logic). The remaining input and output (i.e. 3), can be configured as either Off or TTL.
Figure 27: GPIO Pinout
Table 14: GPIO Signals
Pin Signal Description
56 Appendix B: GPIO Control
Pin Signal Description
2
INPUT_0-
LVDS (negative)
3
INPUT_1+
LVDS/TTL format (positive)
4
INPUT_1-
LVDS (negative)
5
GND
6 INPUT_2+
LVDS/TTL format (positive)
7
INPUT_2-
LVDS (negative)
8
INPUT_3
TTL auxiliary input
9
OUTPUT_3
TTL auxiliary output
10
OUTPUT_2+
LVDS/TTL auxiliary output
11
OUTPUT_0+
LVDS/TTL auxiliary output
12
OUTPUT_0-
LVDS (negative)
13
OUTPUT_1+
LVDS/TTL auxiliary output
14
OUTPUT_1-
LVDS (negative)
15
OUTPUT_2-
LVDS (negative)

Configure GPIO Signal Levels

Before using any external triggers, the input lines must be set to a proper signal level: either TTL (transistor-transistor logic) or LVDS (low-voltage differential signaling). The Spyder 3 GigE cameras hardwire 3 input lines that require signal level selection:
Line0 – line trigger or rotary encoder phase A input Line1 - Frame trigger Line2 – Direction control or rotary encoder phase B input
Steps 1
Select the line: 0, 1, 2.
Steps 2
Select the corresponding signal format: TTL or LVDS.
This following section describes the steps required to run the camera in the available trigger modes. We start with free running mode.
Appendix B: GPIO Control 57
Figure 28: Inputs

Examples: Setting the Camera Modes

Free Run Mode: Internal Line Trigger, Internal Direction Control, Internal frame trigger

In the Line Trigger Function Group > set the parameter Line Trigger Mode value to Off.
Figure 29: Line Trigger
In the Direction Control Group > set the parameter Sensor Scan Direction > to Forward or Reverse, depending on your application.
Figure 30: Scan Direction
In the Rotary Encoder Group > set the value to False.
58 Appendix B: GPIO Control
Figure 31: Rotary Encoder Group
In the Start Mode > set the Frame Start Trigger value Off.
Figure 32: Start Mode
Appendix B: GPIO Control 59
In the Active Mode > set the Frame Active Trigger value Off.
Figure 33: Active Mode
In the Sensor Control Group > set the desired exposure mode, exposure time and line rate.
Figure 34: Exposure Mode, Time, and Line Rate Settings
60 Appendix B: GPIO Control

Internal Line Trigger, External Direction Control, Internal frame trigger

Set the Frame Start Trigger and Frame Active Trigger values to off, as described above. Set the Line Trigger Mode value to Off and the Exposure Mode, Exposure Time and Line Rate as above.
In the Direction Control Group > set the Sensor Scan Direction to External.
Set the Input Direction Signal to Line 2 (as described at the start to this section).
Figure 35: Scan Direction

External Line Trigger, Internal Direction Control, Internal frame trigger

In the Direction Control Group > set the parameter Sensor Scan Direction > to Forward or Reverse, depending on your application. Set the Frame Start Trigger and Frame Active Trigger values to off, as described above. In the Line Trigger Function Group > Set the Line Trigger Mode value to On.
Figure 36: Line Trigger Mode
Set the Input Direction Signal to Line 0 (as described at the start to this section).
Verify the line frequency value by clicking the Read External Line Frequency parameter in the Line Trigger Function Group, as shown in the figure above.
If the rescaler is needed, set the rescaler as shown in the following figure:
Appendix B: GPIO Control 61
Figure 37: Rescaler
If the rescaler is enabled, the external line frequency will be modified using the Trigger Multiplier and Trigger Divider commands, as shown above. For details, please refer to the Rescaler section in the GURU section.
Note: the Trigger Multiplier takes the following three values only: 0 = frequency x 256 1 = frequency x 16 2 = frequency x 4096 For more information about the Rescaler, please refer to Rescaler in the GURU section.

External Line Trigger, External Direction Control from Rotary Encoder

Physically connect rotary Encoder phase A to pin1-5 if using TTL, or pin 1-2 if using LVDS, and phase B to pin 6-5 if using TTL, or pin6-7 if using LVDS. In the Line Trigger Function Group > Set the Line Trigger Mode value to On.
Set Rotary Encoder Module to True.
Figure 38: Rotary Encoder Module
62 Appendix B: GPIO Control
Rescale the line trigger signal
The rotary encoder has its own built-in rescaler. Setting Rotary Encoder Multiply Factor to 0 produces an output frequency that is 4 times the rotary encoder output. To set the output to be the same as rotary encoder output, set the Rotary Encoder Multiply Factor to 1 and Rotary Encoder Drop Factor to 4.
Figure 39: Rotary Encoder Multiply Factor
The forward and reverse direction is set by changing “Rotary Encoder Direction Phase”.
Check the direction shown in the Direction Control Group to confirm the direction:
Figure 40: Rotary Encoder Direction Phase
In some situations, it is desirable to only respond to one direction, either forward or reverse. Enable the Encoder Backlash Control function and the Scan Direction to desired direction.
Appendix B: GPIO Control 63
Figure 41: Encoder Backash Control
If the Backlash Control is disabled, the camera will respond to both directions. This may cause image artefacts when the direction changes. To avoid this, increase the Rotary Encoder Debounce Factor, as shown in the following figure.
Figure 42: Rotary Encoder Debounce Factor
Figure 43: Shaft Encoder Module
64 Appendix B: GPIO Control

External Frame Trigger: Frame Start Trigger mode

In the Frame Trigger Function Group > set the Device Scan Type to Linescan.
Figure 44: Device Scan Type
In the Active Mode group > ensure that the Frame Active Trigger Mode value is Off.
Figure 45: Frame Trigger Mode
In the Start Mode group > set the Frame Start Trigger Mode value to ON.
Figure 46: Frame Start Trigger Mode
Appendix B: GPIO Control 65
Note on the Frame Start Trigger
When the frame trigger goes high the software grabs a predefined number of lines, as defined in width and height in Image Format Control.
For a software trigger toggle Frame software trigger from a False value to a True value, or from True to False depending on the Frame Active Trigger Mode.
Enable the delayer in the Start Mode group > set the Frame Start Delay value to True.
Figure 47: Frame Start Delay
In the Frame Trigger Function Group > set the Frame Trigger Delayer value.
Figure 48: Frame Trigger Delayer
External Frame Trigger – Frame Active Trigger mode.
In the Start Mode group > Make sure Frame Start Trigger Mode is Off.
Figure 49: Frame Start Trigger Mode: Off
In the Frame Trigger Function Group > Set the Device Scan type to Areascan.
66 Appendix B: GPIO Control
Figure 50: Frame Trigger Source
In the Active Mode group > set the Frame Active Trigger Mode value to ON.
Figure 51: Frame Trigger Mode: On
Note on the Frame Active Trigger
When the frame trigger goes high, the PC will collect data until either, the signal goes low, or the frame buffer is filled. The frame height length will be determined by the length of the frame trigger.
At this point you can enable frame delayer as well.
Figure 52: Frame Active Delay
Appendix B: GPIO Control 67

Outputs

Outputs are used to control external devices and monitor internal signals.

Step 1

Select the output line.

Step 2

Set the Signal Routing Block parameter. Refer to section “PLC Input Signal Routing Block” for more detail about PLC settings.
Important Note: Signals PLC_10 to PLC_15 should not be changed unless you are very experienced with triggers and PLC settings.

Step 3

Set the signal output: Q0 to Q3.
Use the lookup table to output signals to one of 4 GPIO outputs.
Figure 53: Output Selector
The signal to output can be selected from the Signal Routing Block parameters. For example, the following figures will output line 0. Please note that the frame valid (PLC_A4) is always high since Spyder3 is a line scan camera.
68 Appendix B: GPIO Control
Figure 55: Signal Q0 linked to the value of parameter PLC_10
Figure 54: Signal Routing Block
Appendix B: GPIO Control 69

Trigger Settings: GURU Mode

In most use-cases the camera mode settings described in the Beginner section will suffice. The commands and parameters available in the Guru level allow you to perform finer adjustments to the triggers or create different use-cases from the ones predefined in the Beginner level.
The following instructions are based on the default settings of the camera. Cameras are shipped from the factory in a default setting. Default settings are restored by loading the factory default (see the figure below).
NOTE: loading the factory default will take 10 seconds or more to complete. If you are not using CamExpert, it is recommended that you set your GUI timeout values to maximum setting. If you do not adjust the GUI timeout, your GUI will disconnect during factory load.
After Factory default settings are loaded, parameters will be configured as follows:
PLC_Q7_Variable0 is set to line0, which is line trigger input:
70 Appendix B: GPIO Control
PLC_Q7 is fed to a rescaler input. So the rescaler will rescale line trigger signals:
PLC_Q16 is set to Line1, which is frame trigger:
PLC_Q16 is fed into delayer, so the frame trigger signal can be delayed:
PLC_Q6 is direction and is fed by line2:
Appendix B: GPIO Control 71
PLC_Q4_Variable0 can be PLC_I0 or PLC_I3, depending on whether or not the rescaler is enabled:
PLC_Q12_Variable0 can be PLC_I1 or PLC_I4 depending on whether or not the delayer is enabled:
PLC_Q14_Variable0 can be PLC_I1 or PLC_I4 depending on whether or not the delayer is enabled:
72 Appendix B: GPIO Control

Pulse Generator

The behavior of the Pulse Generator is defined by their delay and width. The delay is the amount of time the pulse is inactive prior to the pulse, and the width is the amount of time the pulse is active.
The Pulse Generator signals can be set in either triggered or periodic mode. In triggered mode, the pulse generator is triggered by either the rising edge or high level of the input signal. When triggered, the pulse generator is inactive for the duration of the delay, then active for the duration of the width. After that, it will become inactive until the next trigger occurs. If a trigger occurs while pulse generator is already handling a previous trigger, the new trigger is ignored.
In periodic mode, the trigger continuously generates a signal that is based on the configured delay and width. The period of the pulse is therefore the delay time plus the width time.
Figure 56: Pulse Generator
Pulse Generator 0 to 3
Selects the pulse generator to configure. To view the pulse generator properties, open the directory.
Width
Indicates the number of cycles (also determined by the granularity) that the pulse remains at a high level before falling to a low level.
Appendix B: GPIO Control 73
Delay
Trigger
Pulse_Out
pulse_delay pulse_width
Trigger
Pulse_Out
pulse_delay pulse_width
Indicates the number of cycles (also determined by the granularity) that the pulse remains at a low level before rising to a high level.
Trigger Mode
Indicates how a triggered pulse generator will handle its triggers. The possible settings are:
Triggered on rising edge: Indicates if a triggered pulse generator is triggered on the rising edge of an input
Triggered on high level: Indicates is a triggered pulse generator is triggered on the high level of an input
Triggered on falling edge: Indicates if a triggered pulse generator is triggered on the falling edge of an input
Triggered on rising AND falling edges: Indicates if a triggered pulse generator is triggered on the rising edge of an input and on the falling edge of an input
Triggered on low level: Indicates if a triggered pulse generator is triggered on the low level of an input
Pulse Period (ns)
Displays the value of the parameter, in nanoseconds, of a complete delay-width cycle of the pulse generator. This value is computed every time the delay, width or granularity is modified and is available regardless of the periodic mode.
Pulse Frequency (Hz)
Displays the frequency of the pulse generator. This value is computed every time the delay, width or granularity is modified and is available regardless of the periodic mode.
Pulse Generator Timing
Positive Pulse Generated from a Rising Edge Trigger
Negative Pulse Generated from a Level High Trigger
The software can generate two internal signals using the internal pulse generators. The behavior of each of these two pulse generators is defined by a delay and a width. As shown
74 Appendix B: GPIO Control
in the accompanying diagrams, the delay is the time between the trigger and the pulse
Acceptable Line rate relative to Granularity
0
1
0.00000006
0.00197
509
333,333
transitions. The width is the time the pulse stays at the active level before transitioning. The periodic mode, the delay determines the low time of the pulse. Each pulse generator generates a signal that can be used as an input to the GPIO Control Block. A triggered pulse generator needs an input signal that comes from an output of the GPIO Control Block.
Note: There is one clock cycle between the output signal of a pulse generator and the outputs
of the GPIO Control Block. The labels for the inputs from the pulse generators in the GPIO Control Block programming languages are:
I7, for pulse generator 0
I6, for pulse generator 1

Rescaler

The Rescaler lets you change the frequency of a periodic input signal. You can use the Rescaler to multiply the period by up to 4096 or divide it by up to 4095.
The Rescaler is defined by the following settings:
Granularity
The granularity is the number of clock cycles during which the rescaler checks for activity on its input. The value to use depends on the period/frequency of the input signal. If a frequency lies between two different granularity settings, the lowest setting will yield a better precision. The possible values are:
Gran Precision
(30 ns) (s) (s) (Hz) (Hz)
Appendix B: GPIO Control 75
Minimum
Period
Figure 57: Granularity
Maximum Period
Min.
Frequency
Max. Freq.
(ER<1%)
1
4
0.00000024
0.00786
127
83,333
2
16
0.00000096
0.03146
32
20,833
3
256
0.00001536
0.50332
2.0
1,302
The “Min. Frequency” is a fixed minimum, otherwise the incoming signal period
divider
tormultiplicafrequencyxinput
frequencyoutput__ =
counter gets saturated (reach the maximum count).
The “Max. Freq.” is a recommended maximum to get Error less than 1%.
Multiplicator
The multiplier applied to the input frequency. The possible values are:
Frequency is multiplied by 256 (PLC_rsI0_Multiplier = FrequencyX256)
Frequency is multiplied by 16 (PLC_rsI0_Multiplier = FrequencyX16)
Frequency is multiplied by 4096 (PLC_rsI0_Multiplier = FrequencyX4096)
Divider
The divider applied to the input frequency. The resulting frequency is computed as follows:
Input Selection
Indicates which label in the GPIO LUT will be associated with the rescaler. Make sure you select an input label that is not being used for its default behavior. For example, Q9 is used to send a trigger to pulse generator 0. If pulse generator 0 is used in triggered mode, then it will be triggered by Q9 and cannot be used as the input for the rescaler. The possible values are: Q3, Q7, Q8, Q9, Q10, Q11, Q16, and Q17.
Backup Enabled
Indicates that the rescaler will use a back-up input source if its main source stops its activity.
Backup Window
Specifies the window of time during which there can be no activity from the main input source before the rescaler switches to the back-up source. As soon as activity is detected, the rescaler returns to its main input source.
Backup Input
Same as the main input source
Granularity
Indicates the number of PCI clock cycles that are used for each increment of the delay and width. The amount specified in the granularity is multiplied by 30 nanoseconds.
Other Rescaler equations are:
Granularity_setting = [1, 4, 16, 256]
Multiplier_setting = [16, 256, 4096]
Divider_setting [15:0] = [0..65535]
Granularity = 30ns x Granularity_setting
76 • Appendix B: GPIO Control
sig_in_period_counter [15:0] = MIN( INT( Signal_In_Period / Granularity ), 65535)
multiplier_out [31:0] = sig_in_period_counter[15:0] x Multiplier_setting[15:0]
divider_ou t[27:0] = INT ( multiplier_out[31:0] / Divider_setting )
Signal_Out_Period = MAX( divider_out[27:0], 2 ) x Granularity

Counter

The counter maintains a count value that can be increased, decreased, or cleared based on input signals. The counter outputs two signals (which are inputs to the GPIO LUT).
Counter Incremental Source
Specifies how the input for incrementing the count is handled. The counter’s up event uses the Q17 label in the LUT. It can be one of the following settings:
Disabled
On the rising edge
On the falling edge
On both edges
On the high level
On the low level
Counter Decrement Event Source
Same as above but for the down event, but uses the Q16 label in the GPIO LUT.
Appendix B: GPIO Control 77
Counter Reset Activation
Same as above, but for the clear event. The clear event input of the counter does not have a predefined label on the GPIO LUT.
Counter Reset Source
Indicates which label from the GPIO LUT that will be associated with the clear event input of the counter. Make sure you select an input label that is not being used for its default behavior. The possible values are: Q3, Q7, Q8, Q9, Q10, Q11, Q16, and Q17.
Current Counter Value
Displays the current counter value

Input Debouncing

The Debouncers tab is used to configure the debouncers of the camera. The debouncers are associated with the first and second PHYSICAL inputs of the software, usually Input 1 and Input 2.
The debouncers make sure that their corresponding inputs filter out bouncing effects. Bouncing is when there are a few very short pulses when the input signal transitions from low to high. Without debouncing, the controller may see these small pulses as real signals. The debouncers make sure that the signal is truly high for the specified amount of time before it is declared as high. The same applies to the falling edge.
Input 0 Value
Indicates the debouncing value for input 0. Each unit is equal to 16 clock cycles (30ns each), or 480ns.
Input 1 Value
Indicates the debouncing value for input 1. Each unit is equal to 16 clock cycles (30ns each), or 480ns.
Input 2 Value
Indicates the debouncing value for input 2. Each unit is equal to 16 clock cycles (30ns each), or 480ns.
Input 3 Value
Indicates the debouncing value for input 3. Each unit is equal to 16 clock cycles (30ns each), or 480ns.
78 Appendix B: GPIO Control

Timestamp Counter

Counter Select
Timestamp Counter (default), General Purpose Counter.
Granularity
Indicates the value of each timestamp unit of the timestamp counter. Available values are: 480 nanoseconds, 1 microsecond, 100 microseconds, 10 milliseconds.
Set Mode
Indicates how the timestamp module handles the “set event”. Possible values are: Disabled On Apply-The specified value is set when the user clicks the Apply button. Rising edge input signal-When the signal on the “set event” input rises, the timestamp module applies the specified value.
Set Input
Indicates which label from the GPIO LUT that is associated with the “set event” input of the timestamp module. Make sure you select an input label that is not being used for its default behavior. The possible values are: 0: Q3 1: Q7 2: Q8
Appendix B: GPIO Control 79
3: Q9 4: Q10 5: Q11 6: Q16 7: Q17
Clear Mode
Indicates how the timestamp module handles the “clear event”. The possible values are: Disabled On Apply: The timestamp count is cleared when the user clicks the Apply button Rising edge input signal: Then the signal on the clear event input rises, the timestamp module clears the timestamp counter value
Clear Input
Indicates which label from the GPIO LUT that is associated with the “clear event” input of the timestamp module. Make sure you select an input that is not being used for its default behavior. The possible values are: 0: Q3 1: Q7 2: Q8 3: Q9 4: Q10 5: Q11 6: Q16 7: Q17
Broadcast
When set to true, the operation is broadcasted to all other devices on the same network as the current device.
Set Value
The value assigned is used when the “set event” of the counter occurs.
Current Value
Displays the timestamp counter’s current value.
80 Appendix B: GPIO Control

Delayer

The delayer is used to delay an input signal. The output of the delayer is the delayed version of the input signal. A delayer is defined by:
Delay: The delay is a value expressed in the number of rising edges from the reference signal.
Reference Signal: A periodic input signal that is used to generate the delay from the input source. It is important that this reference signal be periodic. Also note that the pulse width of the signal you want to delay must be greater than the period of the reference signal.
Input Source Selection: The delayer does not have a pre-assigned label in the GPIO Look-Up Table (Qn). This parameter is used to select a label that is not used by another GPIO module.
The output of the delayer is considered an input for the GPIO Look-Up Table. The labels for the output from the delayer in the GPIO Control Block programming languages depend on the LUT input configuration.
Figure 58: Delayer
The following sections provide details on the LUT control block, the LUT programming language and the advanced features of the GPIO.

PLC Control

PLC control allows very precise control of the camera. Most users do not need to access the PLC functions as the Beginner level and Guru level functions are adequate for the majority of use-cases. However, Spyder provides a PLC and LUT programming for users who require highly specialized control of the camera functions.
In general, to configure the PLC, you need to accomplish three main tasks:
Assign a physical camera pin and signal to a GPIO Input number.
Map the GPIO Input or Output using the parameters located in the Line Trigger
Function, Inputs, Outputs, Direction Control, and Sensor Control groups. (NOTE: This will override the factory default in beginner level. )
Use the LUT programming language to map the GPIO Input Configuration to the
GPIO Output in Guru level.
Appendix B: GPIO Control 81
The following sections provide details on the LUT control block, the LUT programming language and the advanced features of the PLC.
Note: the screenshots in this section are from the CamExpert GUI. Other GUI’s should contain a similar arrangement to what is shown.

The PLC Control Block

All signals pass through the PLC Control Block. Depending on its programming, the PLC Control Block generates output signals that can be redirected to various camera outputs. The PLC control block uses a look up table (LUT) to generate the outputs. This LUT contains eight different inputs, each of which can generate 18 different outputs, resulting in 256 entries of 18 bits.
82 Appendix B: GPIO Control
Note that all external inputs (from the camera, TTL inputs, and PLC controls) are resynchronized. The outputs from the look-up table are synchronous. The LUT is programmed using a simple language. This language allows you to create logical equations that specify the conditions that set particular outputs
Note: There is a delay of two clock cycles between the inputs of the LUT and its outputs. A clock cycle has a period of 30 nanoseconds, so the delay is 60 nanoseconds. The signals in the PLC Control Block are defined in the tables below. Inputs to CamExpert are labeled In (where n is an integer from 0 to 7) and outputs are labeled Qn (where n is an integer from 0 to 15).
Appendix B: GPIO Control 83
PLC Input Signal Routing Block
The following code sets the first entry in the PLC’s signal routing block: Setting the Signal Routing Block is complicated by the fact that each entry in the table has a different set of enumerated inputs. So for example, a value of 0 for i0(i.e. GPIO Input 0) means something different for i6 (i.e. Pulse Generator 1 Output). Below is a table of enumerated values with respect to each entry.
For more information on the Signal Routing Block, refer to the section below, Signal Routing Block on page 87.
84 Appendix B: GPIO Control
Valu
Bit 1
Bit 0
1 Output
0 Output
Bit 3
Bit 2
2 Output
Input 1
Input 0
Input 0
Input 0
Input 0
Input 0
Input 0
Input 0
Input 2
Input 3
Input 1
Input 1
Input 1
Input 1
Input 1
Input 1
Valid
Valid
Input 2
Input 3
Input 3
Valid
Valid
Valid
Valid
Bit 0
Bit 0
Bit 1
Bit 1
Bit 0
Bit 0
3
2
Bit 2
Bit 3
Bit 1
Bit 1
Bit 2
Bit 3
1
Bit 0
k)
k)
k)
k)
)
)
Bit 1
Bit 1
k)
k)
k)
k)
)
)
Bit 2
0
Output
Output
Output
Output
Output
Output
Output
Output
3 Output
Output
Output
Output
Output
Output
0 Equal
0 Greater
Equal
Greater
Equal
Greater
e
0
1
2
3
4
5
6
7
8
i0 i1 i2 i3 i4 i5 i6 i7
GPIO Input 0
Frame Valid
GPIO
GPIO
Line Valid Frame
Data
GPIO Control
GPIO Control
GPIO Control
GPIO Input 1
Line Valid GPIO
GPIO
GPIO
Spare Reserved Line Valid Reserved Frame
GPIO Control
GPIO Control
GPIO Control
GPIO Input 2
Control
GPIO
GPIO
Frame
Reserved Reserved Line Valid Reserved Reserved Line Valid
GPIO Control
GPIO Control
GPIO Input 3
GPIO Control
GPIO
GPIO
Reserved GPIO
GPIO Control
GPIO Control
GPIO Control
Data Valid
GPIO
GPIO
Timestam p Trigger
GPIO Control
GPIO Control
Spare Rescaler
GPIO
GPIO
GPIO
Timestam p Trigger
GPIO Control
Pulse Generator
0 Output
GPIO
GPIO
Reserved GPIO
Frame
Data Valid
Timestam p Trigger
Pulse Generator
Pulse Generator
GPIO
GPIO
Frame
Spare
GPIO Control
9
Q2 (feedbac
10
CC3 (feedbac
11
Pulse Generato r 0
12
Pulse Generato r 1
13
Rescaler 0 Output
14
Reserved Reserved Delayer 0
15
Reserved Reserved Counter
Q3 (feedbac
CC4 (feedbac
Pulse Generato r 2
Pulse Generato r 3
Rescaler 0 Output
Q2 (feedbac
CC3 (feedbac
Pulse Generato r 0
Pulse Generato r 1
Rescaler 0 Output
Q3 (feedbac
CC4 (feedbac
Pulse Generato r 2
Pulse Generato r 3
Rescaler 0 Output
Delayer 0
Counter
Q2 (feedback
CC3 (feedback
Pulse Generator 0 Output
Reserved Reserved CC3
Rescaler 0 Output
Delayer 0
Counter 0
Q3 (feedback
CC4 (feedback
Pulse Generator 2 Output
Rescaler 0 Output
Delayer 0
Counter 0
GPIO Control
GPIO Control
Q2 (feedback )
(feedback )
Pulse Generator
Delayer 0
Counter 0
GPIO Control
Timestam p Trigger
Q3 (feedback )
CC4 (feedback )
Reserved
Reserved
Counter 0
Appendix B: GPIO Control 85

GPIO Output Labels

GPIO OUTPUT 0
Q0
GPIO output 0
GPIO OUTPUT 1
Q1
GPIO output 1
GPIO OUTPUT 2
Q2
GPIO output 2
GPIO OUTPUT 3
Q3
GPIO output 3
EXSYNC
Q4
EXSYNC
PRIN
Q5
PRIN
DIRECTION
Q6
Camera forward and reverse control.
USED_
Timestamp counter clear event input
Timestamp counter clear event input
Signal Label Description
CAM_CTRL (NOT
PULSE_TRIG1 Q8
PULSE_TRIG0 Q9
PULSE_TRIG3 Q10
Q7
CC4 signal. Not used.
Trigger for pulse generator 1. Used only when the pulse generator is in triggered mode.
If available, can be used by one of the following modules:
Rescaler 0 input
Delayer 0 reference signal
Counter 0 clear event input
Timestamp counter set event input
Timestamp counter clear event input
Trigger for pulse generator 0. Used only when the pulse generator is in triggered mode.
If available, can be used by one of the following modules:
Rescaler 0 input
Delayer 0 reference signal
Counter 0 clear event input
Timestamp counter set event input
Trigger for pulse generator 3. Used only when the pulse generator is in triggered mode.
If available, can be used by one of the following modules:
Rescaler 0 input
Delayer 0 reference signal
Counter 0 clear event input
Timestamp counter set event input
PULSE_TRIG2 Q11
86 Appendix B: GPIO Control
Trigger for pulse generator 2. Used only when the pulse generator is in triggered mode.
If available, can be used by one of the following modules:
Rescaler 0 input
Delayer 0 reference signal
Signal Label Description
Timestamp counter clear event input
signal of this output.
signal of this output.
hardware trigger.
GPIO_FVAL Q12
GPIO_LVAL Q13
Counter 0 clear event input
Timestamp counter set event input
Output to the internal grabber to replace or mix with the camera’s FVAL signal. Depending on the camera, the FVAL signal can be replaced or combined with the
Output to the internal grabber to replace or mix with the camera’s LVAL signal. Depending on the cameral, the LVAL signal can be replaced or combined with the
GPIO_TRIG Q14
GPIO_IRQ Q15
CNT_DOWN Q16
CNT_UP Q17
Trigger of image grabber when configured to use
Trigger for an application callback. When the callback is invoked, it provides the following information:
A bit mask of the 8 LUT inputs at the time the interrupt was generated.
The timestamp value at the time of the interrupt.
Trigger for the down event of counter 0. If available, can be used by one of the following
modules:
Rescaler 0 input
Delayer 0 references signal
Counter 0 clear event input
Timestamp counter set event input
Timestamp counter clear event input
Trigger for the up event of counter 0. If available, can be used by one of the following
modules:
Rescaler 0 input
Delayer 0 references signal
Counter 0 clear event input
Timestamp counter set event input
Timestamp counter clear event input

Signal Routing Block

In its simplest terms, the Signal Routing Block is a group of switches that let you route signals to the Lookup Table. You can direct PLC inputs and feedback inputs to signals I0 through I7.
Appendix B: GPIO Control 87
The Signal Routing Block lets you redirect signals from the IO Block, the Video IO Block, Lookup Table, and the Enhanced Function Block back into the Lookup Table for further processing. Because most of the other blocks in the PLC use preconfigured inputs and outputs, the Signal Routing Block is the primary method of routing a signal from one block to another.

How the Signal Routing Block Works

The Signal Routing Block has 8 outputs (I0 - I7). Each output uses a 16:1 multiplexer that connects to 16 inputs.
The Signal Routing Block has more than 16 input signals, so not every input can be connected to every one of signals I0 - I7. However, signals I0 - I7 are functionally identical, so connecting to a specific one isn’t important. If you can’t route the input with your first choice, simply choose another.
The Lookup Table lets you connect any input signal I0-I7 to any Lookup Table output signal Q0-Q17
88 Appendix B: GPIO Control
(end of line)
Output
Q0, Q1, Q2, ..., Q16, Q17
Input
I0, I1, I2, ..., I6, I7
Boolean constant
Q1=FALSE
Q16 = I8 | I6
^ (xor)
Q9 = I1 ^ I8
Q10= !(I8 & I5)
Q6 = (I3 | I5) ^ (I1 & I2)
0, false, FALSE
Q3 = TRUE Q6 = I3 ^ true
EOL
\r
(used only for SDK, not
You can manipulate your inputs using simple or complex Boolean expressions. The following expressions are both valid:
Q0 = I6 Q6 = !(I4 & I6) & ((I2 ^ I5) | I1)
Correct Lookup Table Syntax
Syntax Valid Construction Sample Line
Line Output = Expression EOL
Expression Input
Not Input
Combined Expression Expression Boolean operator
Q1=I5 Q1=!I5
Q1=I5 & I3
Expression
Boolean Operators & (and)
| (or)
Q14 = I4 & I6 Q15 = I3 | I5
Not ! Q0=!I0
Delimiter () Q0 = !(I0)
Q3 = !(I1 | (I7 ^ I5))
Boolean Constants 1, true, TRUE
Appendix B: GPIO Control 89
Q0 = 1
\n\r
Rule Incorrect Syntax Correct Syntax
to Q4, not I5).
equation.
EOL symbol.
The output must be on the left hand side of the equation
(the value is being assigned
\n \r\n
Incorrect Lookup Table Usage
I5 = Q4 Q4 = I5
Coyote)
Outputs may not be on the right hand side of the
Equations must be separated by a carriage return or an
Q1 = I7 & I8 Q2 = Q1 | I5
Q3 = I7,Q15=I8 Q3 = I7
Q1 = I7 & I8 Q2 = (I7 & I8) | I5
Q15 = I8

How the Lookup Table Works

The Lookup Table has 8 inputs (I0 - I7) capable of two states each (true, false). Thus, the outputs have a total number of 256 input combinations. The result of each combination can be 1 or 0.
When you modify the equations in the Lookup Table, the controller calculates the results of all 256 input combinations and stores the result of each output as a 256-bit lookup table (hence the name). There are 18 outputs (Q0 - Q17), so the controller calculates 18 different lookup tables.
The controller then passes the resulting 18 lookup tables to the IP Engine. Knowing the value of the 8 inputs, the PLC needs only look up the value of the resulting output (for each output), rather than calculate it. Thus, the Lookup Table can achieve a propagation delay of only one system clock cycle (30 ns), regardless of the complexity or number of Boolean expressions.
90 Appendix B: GPIO Control

Appendix C: EMC Declaration

We, TELEDYNE DALSA 605 McMurray Road Waterloo, Ontario CANADA N2V 2E9
Declare under sole responsibility that the cameras:
Brand Name: Spyder3 GigE
Models: SG-34-04K80, SG-34-02k40, and SG-34-02k80
The CE Mark, FCC Part 15, and Industry Canada ICES-003 evaluation of the Teledyne DALSA Spyder3 GigE cameras, which are manufactured by Teledyne DALSA Inc., satisfied the following requirements:
EN 55022 Class A (1998) and EN 61326 (1997) Emissions Requirements EN 55024 (1998) and EN 61326 (1997) Immunity to Disturbances
Place of issue: Waterloo, Ontario, Canada
Date of Issue: August 28, 2006
Hank Helmond Director of Quality, TELEDYNE DALSA Corp.
Appendix C: EMC Declaration 91

Appendix D: Setting up the FVAL

This setup only works with fixed frame trigger mode.
Setup Signal Routing Block
Figure 58: Signal Routing Block

Step 1

Match counter duration with image height
Figure 59: Setting counter duration, under Counters and Timers Controls
92 Appendix D: Setting up the FVAL
Figure 60: Setting image height, under Image Format Controls

Step 2

Setup counter incremental source to line valid (PLC_A5)
Figure 61: Setting PLC_I7 to PLC_A5 under Signal Routing Block
Figure 62: Setting PLC_Q17_Variable0 to PLC_I7 under Q17
Appendix D: Setting up the FVAL 93
Figure 63: Setting Counter Incremental Source to PLC_Q17_RisingEdge under Counters Timers Control

Step 3

Setup Counter Reset Source to external fixed frame trigger
Figure 64: Setting PLC_I1 to Line1
Figure 65: Setting PLC_Q3_Variable0 to PLC_I1
94 Appendix D: Setting up the FVAL
Figure 66: Setting Counter Reset Source to PLC_Q3

Examples: Setting the FVAL

Line rate 5000, image height 100, input frequency is 40 hz.
In the Frame Trigger Function Group > set the parameter Device Scan Type value to Linescan
In the Inputs Group > set the parameter Line Selector value to Line1
Appendix D: Setting up the FVAL 95
In the StartMode > set the parameter Frame Start Trigger value to On
In the Sensor Control > set the parameter Accqusition Line value to 5000.000
In the Q0 > set the parameter PLC_Q0_Variable0 value to PLC_I5_Not
In the Outputs > set the parameter Output Selector value to Line0
96 Appendix D: Setting up the FVAL
The output from GPIO output line0 is shown below:
Figure 68: FVAL signal waveform
Appendix D: Setting up the FVAL 97

Appendix E: Using the RGB12 Mode in CamExpert

Data Format

The RGB12 mode (color 12-bit) is now available for the 2k and 4k GigE cameras.
The following example uses the 2k camera to explain how to configure the RGB12 mode using CamExpert. The configuration of the 4K camera is similar to the 2K camera and will be discussed later.
The following table is the 2K sensor geometry format:
Table 15. 2K sensor geometry format.
R0 B0 R1 B1 R2 B1021 R1022 B1022 R1023 B1023
G0 G1 G2 G3 G4 G2043 G2044 G2045 G2046 G2047
In RGB12 mode the output data are serialized, as shown in the table below:
Table 16. 2K camera RGB12 mode output format.
CamExpert Configuration
Image format is determined by a few parameters in the ‘Image Format Control’ menu. Refer to the figure below:
Figure 59. Settings for 8-bit color display.
As shown in the above settings, the camera will output 8-bit color data and the CamExpert will display it on the screen as a color image. Refer to the following screen capture:
98 Appendix E: Using the RGB12 Mode in CamExpert
Figure 60. 8-bit color image and its line profile of a dull object.
This image above is, purposefully, a dull object image. Each color level was differentiated to make for easy distinguishing.
Currently CamExpert does not provide a feature that reconstructs the 12-bit color image. However, it is able to display the color as mono. In other words, it displays the raw data as it is. To do so, three parameters in the ‘Image Format Control’ menu need to be changed, as follows:
1) Pixel format – select the ‘Raw Mono12’.
2) Image width – set to 2x the sensor size. The sensor size is 2048 in this example, so the image width should be set to 4096. This is because CamExpert displays the two­row data in one row.
3) Sensor taps – select ‘Two’. As in the following figure:
Figure 61. Settings for 12-bit color-as-mono displaying
Appendix E: Using the RGB12 Mode in CamExpert 99
Figure 62. 12-bit color-as-mono image of the same dull object in Figure 60. (The imaging condition is exactly the same as Figure
60.)
If the striped image shown above is converted to a color image, it will be identical to the image in the screen capture with the exception that the bit depth is 12 rather than 8.
Let’s zoom-in it and take a closer look:
Figure 63. Zoom-in image of Figure 62.
As the three colors’ brightnesses were set differently, it is not too difficult to figure out that the colors are put in RGBGRGBG…order. This perfectly matches to the RGB12 mode output format diagram, above, and it also proves that the configuration has been done properly.
Similarly, you also can easily configure the 4K camera. The only difference being the sensor size. Therefore, the pixel format and the sensor taps’ options remain the same: ‘Raw Mono12’ and ‘Two’ respectively. The image width, however, should be changed to 4096 x 2 = 8192.
Note that CamExpert displays the dual-line data in single line format. Therefore, the bottom half of the image (e.g. if the image height is set to 480, then the bottom 240 lines’ data will be invalid) will be set to zero automatically by CamExpert.

Tip for using the CamExpert

When a user clicks or selects any parameter in CamExpert an according assistant message will usually show up at the left-bottom corner of the GUI. For example, if a user selects the ‘Raw Mono12’ from the ‘Pixel Format’ dropdown menu, CamExpert will display the following help message:
This feature is very helpful when users operate a camera with the CamExpert GUI.
100 Appendix E: Using the RGB12 Mode in CamExpert
Loading...