About Teledyne Technologies and Teledyne DALSA, Inc.
Teledyne Technologies is a leading provider of sophisticated electronic subsystems,
instrumentation and communication products, engineered systems, aerospace engines,
and energy and pow er generation systems. Teled yn e Technolog ies’ operations ar e
primarily located in the United States, the United Kingdom and Mexico. For more
information , visit Teled y ne Tech n ologies’ website at w w w .teled y ne.com.
Teledyne DALSA, a Teledyne Technologies company, is an international leader in high
performance digital imaging and semiconductors with approximately 1,000 employees
worldwide, headquartered in Waterloo, Ontario, Canada. Established in 1980, the
company designs, develops, manufactures and m arkets digital imaging products and
solutions, in addition to providing MEMS products and services. For more information,
visit Teled yne DA LSA’s website at w w w .teledyned alsa.com .
Support
For further information not included in this manual, or for information on Teledyne
DALSA’s extensive lin e of im age sensin g pr od u cts, please con tact:
Camera Link is a trademark registered by the Automated Imaging Association, as chair of
a committee of industry members including Teledyne DALSA.
03-032-10216-06 Teledyne DALSA
Piranha 3 User Manual
3
Contents
Introduction to the Piranha 3 Camera _________________________________________ 7
1.1 Camera Highlights ....................................................................................................................................................... 7
Features .......................................................................................................................................................... 7
2.2 Input/Output Connectors and LED ............................................................................................................................... 15
Camera Link Configuration ............................................................................................................................. 18
Input Signals, Camera Link............................................................................................................................. 19
Output Signals, Camera Link .......................................................................................................................... 19
2.3 Camera Link Video Timing .......................................................................................................................................... 20
Software Interface: How to Control the Camera __________________________________ 23
Camera Help Screen ........................................................................................................................................ 24
Setting the Exposure Mode.............................................................................................................................. 27
Setting the Line Rate....................................................................................................................................... 30
Setting the Exposure Time .............................................................................................................................. 31
3.3 Camera Output Format ................................................................................................................................................ 31
3.4 Data Processing ........................................................................................................................................................... 33
Processing Chain Overview and Description ................................................................................................... 33
Calibrating the Camera to Remove Non-Uniformity (Flat Field Correction) .................................................. 35
Analog Signal Processing: Setting Analog Gain and Offset ........................................................................... 38
Teledyne DALSA 03-032-10216-06
Piranha 3 User Manual
4
Digital Signal Processing ................................................................................................................................ 44
Returning Calibration Results and Errors........................................................................................................ 49
Returning a Single Line of Video .................................................................................................................... 54
Returning Averaged Lines of Video ................................................................................................................ 55
Returning All Camera Settings with the Camera Parameter Screen ............................................................... 57
Returning Camera Settings with Get Commands ............................................................................................ 60
Optical and Mechanical Considerations ________________________________________ 63
Magnification and Resolution ......................................................................................................................... 66
5.1 Common Solutions ....................................................................................................................................................... 67
5.2 Troubleshooting Using the Serial Interface ................................................................................................................. 68
Verify Timing and Digital Video Path ............................................................................................................. 68
Verify Voltage .................................................................................................................................................. 68
5.3 Specific Solutions ......................................................................................................................................................... 68
No Output or Erratic Behavior ......................................................................................................................... 68
Line Dropout, Bright Lines, or Incorrect Line rate .......................................................................................... 68
Dark Patches ................................................................................................................................................... 69
Camera Link™ Reference, Timing, and Configuration Table _________________________ 71
Camera Signal Requirements ......................................................................................................................... 71
Video Data ...................................................................................................................................................... 72
Camera Control Signals .................................................................................................................................. 72
Communication ............................................................................................................................................... 72
Power .............................................................................................................................................................. 73
03-032-10216-06 Teledyne DALSA
Piranha 3 User Manual
5
Error Handling and Command List ___________________________________________ 75
B2 All Available Commands .............................................................................................................................................. 76
EMC Declaration of Conformity _____________________________________________ 85
Revision History ________________________________________________________ 87
Index _______________________________________________________________ 89
Teledyne DALSA 03-032-10216-06
Piranha 3 User Manual
6
03-032-10216-06 Teledyne DALSA
Piranha 3 User Manual
7
Value
Units
8k
12k
Typ (0dB Gain)
Typ (0dB Gain)
Pixel Pitch
µm
7 x 7
5 x 5
Camera Size
mm
150 H x 42 L x 80 W (P3-80)
mm
85 H x 54.2 L x 80 W (P3-87)
Maximum Line Rate
kHz
33.7
23.5
Broadband Responsivity
DN/ nJ/ cm2
224
138
Random Noise rms
DN
12.5
10.5
Dynamic Range (8 bit)
ratio
328:1
391:1
FPN Corrected
DN 4 4
PRNU Corrected
DN
18
18
Introduction to the
Piranha 3 Camera
1.1 Camera Highlights
1
Features
• 8k or 12k resolution
• Up to 33.7 kHz line rates
• Selectable 8 or 12 bit output
• 320MHz throughput (8x40 MHz)
• 100x antiblooming
• Selectable Medium or Full Camera Lin k™ configu r at ion in terface
• Automatic tap balancing algorithms
• RoHS, CE and FCC compliant
Key Specifications
Note: All numbers referenced to 12 bits unless otherwise specified .
Teledyne DALSA 03-032-10216-06
Piranha 3 User Manual
8
Model
Number
Description
P3-80-12k40-00-R
12k resolution, 8 taps, 40MHz data rate, Medium or Full Camera Link
configuration.
P3-80-08k40-00-R
8k resolution, 8 taps, 40MHz data rate, Medium or Full Camera Link
configuration.
P3-87-12k40-00-R
Smaller, square body, 12k resolution, 8 taps, 40MHz data rate,
Medium or Full Camera Link configuration.
P3-87-08k40-00-R
Smaller, square body, 8k resolution, 8 taps, 40MHz data rate,
Medium or Full Camera Link configuration.
Programmability
• Simple ASCII protocol controls gain, offset, line rates, trigger mode, pixel correction,
test pattern output, and camera diagnostics
Description
The next generation of Piranha line scan cameras has arrived with more power, more
speed and more resolution than ever before. The Piranha 3 camera family takes imaging
to a new level with eight outputs running at 40MHz and either 8k or 12k resolutions. The
large number of pixels and fast line rates specifically meet the throughput demands of flat
panel inspection (Gen7 and Gen8), printed circuit board inspection, and multi-camera
web inspection. With this large resolution and high speed, these cameras can inspect
more panels in the same amount of time than ever before
Applications
The Piranha 3 family is ideal for applications requiring high speed, superior image
quality, and high responsivity. Applications include:
Flat panel display inspection
Printed circuit board inspection
Parcel sorting
Multi-camera web inspection
High performance document scanning
High throughput applications
Models
The Piranha 3 cameras are available in the following models.
Table 1: Piranha 3 Camera Models Overview
03-032-10216-06 Teledyne DALSA
Piranha 3 User Manual
9
Feature / Specification
Units
8k
12k
Notes
Sensor Features
Imager Format
line scan CCD
line scan CCD
Resolution
pixels
8192
12288
Pixel Fill Factor
%
100
100 Pixel Size
µm
7x7
5x5 Output Format (# of taps)
8 8 Antiblooming
100x
100x
Optical Interface
Units
8k
12k
Notes
Back Focal Distance
M72 Mount
mm 6.56±0.25
6.56±0.25
Sensor Alignment
x
y
z
z
mm
mm
mm
°
±0.05
±0.05
±0.25
±0.4
±0.05
±0.05
±0.25
±0.4 Lens Mount
M72x0.75
M72x0.75
Mechanical Interface
Units
Notes
Camera Size
mm (h x l x w)
150 x 42 x 80 (P3-80)
85 x 54.2 x 80 (P3-87)
Mass
g
<630 (P3-80)
<125 (P3-87)
Connectors
power connector
data connector
6 pin male Hirose
MDR26 female
Electrical Interface
Units
Notes
Input Voltage
Volts
+12 to +15
Maximum
power supply of
±5%
Power Dissipation
W
<15
Operating Temperature
(measured at front plate)
°C
0 to +50
Data Output Format
Bits
8 or 12 bit user selectable
12 bits available
in 4 tap
operation only.
Output Data Configuration
Medium or Full Camera Link
user selectable
Specification
Units
8k
12k
Notes
Minimum Line Rate
kHz
2.5
2.5
1.2 Camera Performance Specifications
Table 2: Piranha 3 Camera Performance Specifications
Teledyne DALSA 03-032-10216-06
Piranha 3 User Manual
10
Specification
Units
8k
12k
Notes
Maximum Line Rate
kHz
33.7
23.5 Data Throughput
MHz
320
320 Gain
dB
-10 to +10
-10 to +10
Operating Specifications
(No Flat Field Correction)
P3-8k
Specification
Unit
-10 dB
0 dB
+10 dB
Min
Typ
Max
Min
Typ
Max
Min
Typ
Max
Notes
Broadband
Responsivity
DN/ nJ/ cm2
71 189
224
236 708 1
Random Noise
rms
DN 4.0
5.0 12.5
15.0 40.0
50.0 Dynamic Range
(12 bit)
ratio
820
1036
274
328 82
103
DC Offset
DN 160
160
160 3
FPN ECD
DN 4
13 10
40 32
128 2 FPN ECE
DN 12
25 58
80 180
260 2 FPN Corrected
3 8 4 8 10
16 4 PRNU ECD
DN 120
330 120
330 140
330 2 PRNU ECE
DN 125
330 140
330 220
330
2
PRNU Pixel to
Pixel
DN 80
255 80
255 80
255
PRNU Corrected
ECD
ECE
DN
DN
16
16
48
48
18
18
64
64
48
80
80
232
2, 5, 6
NEE
pJ/ cm2
56
56
56
SEE
nJ/ cm2
58
18 6
Operating Specifications
(No Flat Field Correction)
P3-12k
Specification
Unit
-10 dB
0 dB
+10 dB
Min
Typ
Max
Min
Typ
Max
Min
Typ
Max
Broadband
Responsivity
DN/ nJ/ cm2
43.6 121
138
145 436 1
Random Noise
rms
DN 3.3
4.1 10.5
13 33
42
Dynamic Range
(12 bit)
ratio
1000
1242
316
391 100
125
DC Offset
DN 160
160
160 3
FPN ECD
DN 9
13 16
40 58
128 2 FPN ECE
DN 12
25 40
80 120
255 2 FPN Corrected
3 8 4 8 10
16
4
PRNU ECD
DN 120
330 120
330 140
330
2
PRNU ECE
DN 125
330 130
330 180
330
2
03-032-10216-06 Teledyne DALSA
Piranha 3 User Manual
11
PRNU Pixel to
Pixel
DN 80
255 80
255 80
255
PRNU Corrected
ECD
ECE
DN
DN
16
16
64
64
18
18
64
64
48
80
80
232
2, 5, 6
NEE
pJ/ cm2
76
76
76
SEE
nJ/ cm2
95
30
9.5
Test conditions unless otherwise noted:
Data Rate: 40MHz
Line Rate: 2.5kHz
Light Source: Broadband Quartz Halogen, 3250k, with 750nm cutoff filter installed
Ambient test temperature 25°C
All numbers referenced to 12 bits unless otherwise specified
Specifications are only valid when line rates greater than 2.5kHz and input voltage is
between +12V and +15V.
Notes:
1. Halogen 3200K color temperature with 750nm cutoff filter light source, 59 µW/ cm
(12k camera) and 71.3 µW/ cm2 (8k camera) light intensity, line rate 2500 Hz (12k
camera) and 5000 Hz (8k camera), ECD, 25 °C ambient temperature.
2. ECE = Exposure control enabled— exposure modes 2, 4, 5 and 6. ECD = Exposure
control disabled —exposure modes 3 and 7.
3. Offset is factory-calibrated to 160DN.
4. FPN measurement is performed in dark at 2500 Hz line rate.
5. PRNU corrected is measured at 35% saturation using FPN coefficients calculated at 0%
saturation and PRNU coefficients calculated at 70% saturation.
6. The FPN/ PRNU calibration conditions (gain, ECE, ECD, line rated, light) are set
before calibration. The residual error is confirmed to be less than the maximum
specified.
2
Teledyne DALSA 03-032-10216-06
Piranha 3 User Manual
12
Up to12288 Photoelements (12k: 5µm x 5µm or 6k, 8k: 7µm x 7µm)
Isolation
pixels
Storage Well with Exposure Control, Reset, and Shift Register
Structures
Storage Well with Exposure Control, Reset, and Shift Register Structures
Tap #
First Pixel
1
1-3071 (odd pixels)
2
2-3072 (even pixels)
3
3073-6143 (odd pixels)
4
3074-6144 (even pixels)
5
9215-6145 (odd pixels)
6
9216-6146 (even pixels)
7
12287-9217 (odd pixels)
8
12288-9217 (even pixels)
Tap #
First Pixel
1
1-2047 (odd pixels)
2
2-2048 (even pixels)
3
2049-4095 (odd pixels)
4
2050-4096 (even pixels)
5
6143-4097 (odd pixels)
6
6144-4098 (even pixels)
1.3 Image Sensor
Sensitivity is maximized through our newest IT-P9 and IT-PB sensors that were designed
using our state-of-the-art CCD design process.
Figure 1: 12k40 and 08k40 Sensor Block Diagram
Table 3: 12k40 Pixel Readout
Table 4: 08k40 Pixel Readout
03-032-10216-06 Teledyne DALSA
Piranha 3 User Manual
13
7
8191-6141 (odd pixels)
8
8192-6142 (even pixels)
1.4 Responsivity
Figure 2: Responsivity Graphs
Teledyne DALSA 03-032-10216-06
Piranha 3 User Manual
14
03-032-10216-06 Teledyne DALSA
Piranha 3 User Manual
15
This installation
overview assumes you
have not installed any
system components yet.
Camera Hardware
Interface
2.1 Installation Overview
2
When setting up your camera, you should take these steps:
1. Power down all equipment.
2. Follow ing the m anu factu rer’s instructions, install the frame grabber (if ap p licable). Be
sure to observe all static precautions.
3. Install any necessary imaging software.
4. Before connecting power to the camera, test all power supplies. Ensure that all the
correct voltages are present at the camera end of the power. Power supplies must
meet the requirements defined in section 2.2.2 Power Connector.
5. Inspect all cables and connectors prior to installation. Do not use damaged cables or
connectors or the camera may be damaged.
6. Connect Camera Link and power cables.
7. After connecting cables, apply power to the camera.
8. Check the diagnostic LED. See 2.2.1 LED Status Indicator for an LED description.
You must also set up the other components of your system, including light sources,
camera mounts, host computers, optics, encoders, an d so on.
2.2 Input/Output Connectors and LED
The camera uses a:
• Diagnostic LED for monitoring the camera. See LED Status Indicator in section 2.2.1
LED Status Indicator for details.
• 6-pin Hirose connector for power. Refer to section 2.2.2 Power Connector for details.
• High-density 26-pin MDR26 connector for Camera Link control signals, data signals,
and serial communications. Refer to section
Teledyne DALSA 03-032-10216-06
Piranha 3 User Manual
16
!
Color of Status LED
Meaning
Flashing Green
Camera initialization or executing a long command (e.g., flat field
correction commands ccp or ccf)
Solid Green
Camera is operational and functioning correctly
Flashing Red
Fatal Error. Camera temperature is too high and camera thermal
shutdown has occurred.
Solid Red
Warning. Loss of functionality (e.g. external SRAM failure)
2.2.3 Camera Link Data Connector for details.
Figure 3: Piranha 3 Input and Output Connectors
WARNING: It is extremely important that you apply the appropriate voltages to your camera.
Incorrect voltages will damage the camera. See section 2.4 for more details.
2.2.1 LED Status Indicator
The camera is equipped with a red/ green LED used to display the operational status of
the camera. 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 further
describing the current camera status.
The camera requires a single voltage input with a +12V to +15V operating range (+11V to
+16V absolute maximum range). The camera meets all performance specifications using
standard switching power supplies, although well-regulated linear supplies provide
optimum performance.
WARNING: When setting up the camera’s power supplies follow these guidelines:
• Protect the camera with a fast-blow fuse between power supply and camera.
• Do not use the shield on a multi-conductor cable for ground.
• Keep leads as short as possible to reduce voltage drop.
• Use high-quality linear supplies to minimize noise.
• Use an isolated type power supply to prevent LVDS common mode range violation.
Note: Performance specifications are not guaranteed if your power supply does not meet
the +12V to +15V requirements.
WARNING: It is extremely important that you apply the appropriate voltages to your
camera. Incorrect voltages will damage the camera. Protect the camera with a fast-blow
fuse between power supply and camera.
We offer a power supply w ith attach ed 6’ pow er cable that m eets the Piranha 3 camera’s
requirements, but it should not be considered the only choice. Many high quality supplies
are available from other vendors. Teledyne DALSA assumes no responsibility for the use
of these supplies.
Visit the www.teledynedalsa.com Web site for a list of companies that make power
su p p lies th at m eet the cam era’s req u irem en ts. The companies listed shou ld n ot be
considered the only choices.
Teledyne DALSA 03-032-10216-06
Piranha 3 User Manual
18
Configuration
8 Bit Ports
Supported
Serializer
Bit Width
Number
of Chips
Number of MDR26
Connectors
Medium
A, B, C, D, E, F
28 2 2
Full
A, B, C, D, E, F, G, H
28 3 2
Medium and Full Configuration
Camera Connector
Right Angle
Frame Grabber
Channel Link Signal
Cable Name
1 1 inner shield
Inner Shield
14
14
inner shield
Inner Shield
2 25
Y0-
PAIR1-
15
12
Y0+
PAIR1+
3 24
Y1-
PAIR2-
16
11
Y1+
PAIR2+
4 23
Y2-
PAIR3-
17
10
Y2+
PAIR3+
5 22
Yclk-
PAIR4-
18 9 Yclk+
PAIR4+
6 21
Y3-
PAIR5-
19 8 Y3+
PAIR5+
7 20
100 ohm
PAIR6+
20 7 terminated
PAIR6-
8 19
Z0-
PAIR7-
21 6 Z0+
PAIR7+
**3M part 14X26-SZLB-XXX-0LC is a complete
cable assembly, including connectors.
Unused pairs should be terminated in 100 ohms
at both ends of the cable.
2.2.3 Camera Link Data Connector
Figure 5: Camera Link MDR26 Connector
A note concerning the length of the Camera Link cables
The length of the cables over which data can be transmitted without loss depends on the
data rate and on the quality of the cables.
The camera is tested using a recognized brand of cable with a length of 5 meters. Data
transmission is not guaranteed if you are using a cable greater than 5 meters in length.
Camera Link Configuration
The Camera Link interface is implemented as a Medium or Full Configuration in the
Piranha 3 cameras. Refer to section 3.3.1 Setting the Camera Link Mode for details on
setting the Camera Link configuration.
Table 7: Camera Link Hardware Configuration Summary
Table 8: Camera Link Connector Pinout
03-032-10216-06 Teledyne DALSA
Piranha 3 User Manual
19
Medium and Full Configuration
Camera Connector
Right Angle
Frame Grabber
Channel Link Signal
Cable Name
9
18
Z1-
PAIR8-
22 5 Z1+
PAIR8+
10
17
Z2-
PAIR9+
23 4 Z2+
PAIR9-
11
16
Zclk-
PAIR10-
24 3 Zclk+
PAIR10+
12
15
Z3-
PAIR11+
25 2 Z3+
PAIR11-
13
13
inner shield
Inner Shield
26
26
inner shield
Inner Shield
Signal
Configuration
CC1
EXSYNC
CC2
PRIN
CC3
Spare
CC4
Spare
Clocking Signal
Indicates
LVAL (high)
Outputting valid line
DVAL (high)
Valid data
STROBE (rising edge)
Valid data
FVAL (high)
Outputting valid frame
IMPORTANT:
This camera’s data
should be sampled on
the rising edge of
STROBE.
i
Table 9: Camera Control Configuration
Input Signals, Camera Link
The camera accepts control inputs through the Camera Link MDR26F connector.
The camera ships in internal sync, internal programmed integration (exposure mode 2).
EXSYNC (Triggers Line Readout)
Line rate can be set internally using the serial interface. The external control signal
EXSYNC is optional and enabled through the serial interface. This camera uses the falling edge of EXSYNC to trigger line readout. Section 3.2.1 Exposure Mode, Line Rate and
Exposure Time details how to set frame times, exposure times, and camera modes.
Output Signals, Camera Link
These signals indicate w hen data is valid, allowing you to clock the data from the camera
to your acquisition system. These signals are part of the Camera Link configuration and
you should refer to the Camera Link Implementation Road Map, available here, for the
standard location of these signals.
• The camera internally digitizes 12 bits and outputs 8 MSB or all 12 bits depending on
th e cam era’s Ca m era Lin k op er ating m od e. Refer to section 3.3.1 Setting the Camera
Link Mode for details on setting the Camera Link configuration.
• For a Camera Link reference refer to Appendix A on page 71.
Teledyne DALSA 03-032-10216-06
Piranha 3 User Manual
20
Symbol
Definition
Min (ns)
twSYNC
The minimum low w idth of the EXSYNC pulse when
not in SMART EXSYNC mode.
100
twSYNC
(SMART)
*
The minimum low width of the EXSYNC pulse w hen
in SMART EXSYNC modes to guarantee the
photosites are reset.
3,000
twSYNC_INT
The minimum width of the high pulse when the
―SMA RT EXSYNC‖ feature is tu rned off
100
twSYNC_INT
(SMART)
*
Is the integra tion tim e w hen th e ―SMART EXSYNC‖
feature is available and turned on. Note that the
minimum time is necessary to guarantee proper
operation.
The minimum and maximum line times made up of
tTransfer, tREADOUT plus tOVERHEAD to meet
specifications.
53,190 (12k)
106,382 (8k)
tTransfer
The time from the reception of the falling ed ge of
EXSYNC to the rising edge of LVAL when pretrigger
is set to zero. Pretrigger reduces the number of clocks
to the risin g ed ge of LVAL bu t doesn’t ch ang e the tim e
to the first valid pixel. If the fixed integration time
mode of operation is available and selected then the
integration time is add ed to the specified value.
3,725 ±25
twFixed Int.
Fixed Integration Time mode of operation for variable
exsync frequency.
800
tREADOUT
Is the number of pixels per tap times the readout clock
period. Pretrigger = 0.
38,400 (12k)
25,600 (8k)
tOVERHEAD
Is the number of pixels that must elapse after the
falling edge of LVAL before the EXSYNC signal can be
asserted. This time is used to clamp the internal
analog electronics
425±25
thPR
Applies when the PRIN exposure control feature is
enabled . The PRIN signal must be held a minimum
time after the EXSYNC falling edge to avoid losing the
integrated charge
Don’t care
twPR_LOW
Minimum Low time to assure complete photosite reset
3,000
tPR_SET
The nominal time that the photo sites are integrating.
Clock synchronization will lead to integration time
jitter, which is shown in the specification as +/ values. The user should command times greater than
these to ensure proper charge transfer from the
photosites. Failure to meet this requirement may
result in blooming in the Horizontal Shift Register.
3,000
Teledyne DALSA 03-032-10216-06
Piranha 3 User Manual
22
03-032-10216-06 Teledyne DALSA
Piranha 3 User Manual
23
i
This chapter outlines the
more commonly used
commands. See section B2
All Available Commands
for a list of all available
commands.
Software Interface: How
to Control the Camera
All Piranha 3 camera features can be controlled through the serial interface. The camera
can also be used without the serial interface after it has been set up correctly. Functions
available include:
3
Controlling basic camera functions such as gain and sync signal source
Flat field correction
Generating a test pattern for debugging
The serial interface uses a simple ASCII-based protocol and the camera does not require
any custom software.
Serial Protocol Defaults
8 data bits
1 stop bit
No parity
No flow control
9.6kbps
Camera does not echo characters
Command Format
When entering commands, remember that:
A carriage return <CR> ends each command.
A space or multiple space characters separate parameters. Tabs or commas are invalid
parameter separators.
Upper and lowercase characters are accepted
The backspace key is supported
Teledyne DALSA 03-032-10216-06
Piranha 3 User Manual
24
Purpose:
Sets the speed in bps of the serial communication port.
Syntax:
sbr m
Syntax Elements:
m
Baud rate. Available baud rates are: 9600 (Default), 19200,
57600, and 115200.
Notes:
Power-on rate is always 9600 baud.
The rc(reset camera) command will not reset the camera to
the power-on baud rate and will reboot using the last used
baud rate.
Example:
sbr 57600
Syntax:
h
Syntax:
gh
Notes:
For more in form ation on the cam era’s ―get‖ com m an d s, refer to
section 3.6.6 Returning Camera Settings.
The camera will answ er each com m an d w ith either <CR><LF> ―OK >" or
<CR><LF>"Error xx: Error Message >" or ―Warning xx: Warning Message‖. Th e ">" is
always the last character sent by the camera.
The following parameter conventions are used in the manual:
i = integer value
f = real number m = member of a set s = string t = tap id x = pixel column number y = pixel row number
Setting Baud Rate
Camera Help Screen
For quick help, the camera can return all available commands and parameters through the
serial interface.
There are two different help screens available. One lists all of the available commands to
configure camera operation. The other help screen lists all of the commands available for
retrieving camera p arameters (th ese ar e called ―get‖ com m and s).
To view the help screen listing all of the camera configuration commands, use the command:
To view a help screen listing all of the ―get‖ commands, use the command:
The camera configuration command help screen lists all available commands. Parameter
ranges displayed are the absolute maximum ranges available. Depending on the current
camera operating conditions, you may not be able to obtain these values. If this occurs,
values are clipped and the camera returns a warning message.
Some commands may not be available in your current operating mode. The help screen
displays NA in this case.
03-032-10216-06 Teledyne DALSA
Piranha 3 User Manual
25
P3 12k Example Help Screen
cao calibrate analog offset ti 0-8:0-255
ccf correction calibrate fpn
ccg calibrate camera gain iti 1-4:0-8:1024-4055
ccp correction calibrate prnu
clm camera link mode m 15/16/21/
cpa calibrate PRNU algorithm ii 1-4:1024-4055
css correction set sample m 256/512/1024/
dpc display pixel coeffs xx 1-12288:1-12288
els end of line sequence i 0-1
epc enable pixel coefficients ii 0-1:0-1
gcm get camera model
gcp get camera parameters
gcs get camera serial
gcv get camera version
get get values s
gfc get fpn coeff x 1-12288
gh get help
gl get line xx 1-12288:1-12288
gla get line average xx 1-12288:1-12288
gpc get prnu coeff x 1-12288
gsf get signal frequency i 1-4
gss get sensor serial
h help
lpc load pixel coefficients i 0-4
rc reset camera
rfs restore factory settings
roi region of interest xyxy 1-12288:1-1:1-12288:1-1
rpc reset pixel coeffs
rus restore user settings
sag set analog gain tf 0-8:-10.0-+10.0
sao set analog offset ti 0-8:0-255
sbr set baud rate m 9600/19200/57600/115200/
sdo set digital offset ti 0-8:0-2048
sem set exposure mode m 2/3/4/5/6/7/8/
set set exposure time f 3-3330 [uSec]
sfc set fpn coeff xi 1-12288:0-2048
sfr set fpn range xxi 1-8192:1-8192:0-2048
slt set lower threshold i 0-4095
sot set output throughput m 320/
spc set prnu coeff xi 1-12288:0-28671
spr set prnu range xxi 1-8192:1-8192:0-28671
spt set pretrigger i 0-16
ssb set subtract background ti 0-8:0-4095
ssf set sync frequency f 300-23619
ssg set system gain ti 0-8:0-65535
sut set upper threshold i 0-4095
svm set video mode i 0-2
ugr update gain reference
vt verify temperature
vv verify voltage
wfc write FPN coefficients i 1-4
wpc write PRNU coefficients i 1-4
wus write user settings
Teledyne DALSA 03-032-10216-06
Piranha 3 User Manual
26
Sensor Output Format
Data Processing
Camera Output Format
Set Frame/Line Rate ()
Set Exposure Time ()
ssf
set
Set Exposure Mode ()sem
Region of Interest ()
Correction Set Sample ()
Enable Pixel Coefficients ()
Set PRNU Coefficient ()
Set FPN Coefficient ()
roi
css
epc
spc
sfc
Set Analog Gain (or)
Update Gain Reference ()
Set Analog Offset ()
Calibrate Analog Offset ()
Calculate FPN ()
Set Digital Offset ()
Calculate PRNU ()
Set Background Subtract ()
Set Digital System Gain ()
sagccg
ugr
sao
cao
ccf
sdo
ccp
ssb
ssg
Camera Link Mode ()
Camera Throughput ()
Set Upper Threshold ()
Set Lower Threshold ()
clm
sot
sut
slt
Generate a Test Pattern ()
End of Line Sequence ()
Set Pretrigger ()
svm
els
spt
Save Current User Settings ()
Restore Previously Saved User Settings ()
Save Current PRNU Coefficients ()
Save Current FPN Coefficients ()
Load Pixel Coefficients ()
Reset Pixel Coefficients ()
Restore Factory Settings ()
Reboot Camera ()
wus
rus
wpc
wfc
lpc
rpc
rfs
rc
Saving and Restoring Settings
Diagnostics
Get Line of Data ()
Get an Average of Multiple Lines ()
Display Pixel Coefficients ()
Measure Internal Temperature ()
Measure Input Voltage ()
gl
gla
dpc
vt
vv
Get Commands
Other
Help ( )
Set Baud Rate ()
h
sbr
Section 3.2
Section 3.3
Section 3.4
Section 3.5
Section 3.6
Introduction
Set PRNU Range ()spr
Set FPN Range ()sfr
3.1 Command Categories
The follow in g d iag ram cat egorizes and lists all of th e camera’s com m a nds. This ch ap ter is
organized by command category.
Figure 8: Command Categories
03-032-10216-06 Teledyne DALSA
Piranha 3 User Manual
27
1. You must first set the camera mode using the sem command.
2. Next, if using mode 2, 7 or 8 use the commands ssf and/ or set to set the line rate and
exposure time.
Purpose:
Sets the cam era’s exp osure mod e allow ing you to control you r
sync, exposure time, and line rate generation.
Syntax:
sem i
Syntax Elements:
i
Exposure mode to use. Factory setting is 7.
Notes:
Refer to Table 11: Piranha 3 Exposure Modes for a quick list
of available modes or to the following sections for a more
detailed explanation.
To obtain the current value of the exposure mode, use the
command gcp or get sem.
Related Commands:
ssf, set
Example:
sem 3
Mode
SYNC
PRIN
Description
2
Internal
Internal
Yes
Yes
Internal frame rate and exposure time.
Exposure mode enabled (ECE)
3
External
Internal
No
No
Maximum exposure time. Exposure
control disabled (ECD)
4
External
Internal
No
No
Smart EXSYNC. ECE.
5
External
External
No
No
External sync, external pixel reset.
ECE.
6
External
Internal
No
Yes
Fixed integration time. ECE.
7
Internal
Internal
Yes
No
Internal line rate, maximum exposure
time. ECD.
3.2 Sensor Output Format
3.2.1 Exposure Mode, Line Rate and Exposure Time
Overview
You have a choice of op erating in one of seven mod es. The cam era’s line rate
(synchronization) can be generated internally through the software command ssf or set
externally with an EXSYNC signal, depending on your mode of operation. To select how
you wan t th e camera’s lin e rate to be generated:
Setting the Exposure Mode
Table 11: Piranha 3 Exposure Modes
Programmable Line Rate Programmable Exposure Time
Teledyne DALSA 03-032-10216-06
Piranha 3 User Manual
28
Mode
SYNC
PRIN
Description
8
Internal
Internal
No
Yes
Maximum line rate for exposure time.
ECE.
Programmable Period (set command)
Line Period
Readout
CR
Exposure Time
CR=Charge Reset
Line Period
Programmable Period
CR
Exposure Time
Programmable Period (ssf command)
Readout
Programmable Period
Line Period
Exposure Time
Line Period
Readout
Exposure Time
Falling Edge
Ignored During
Readout
Readout
Falling Edge
Ignored During
Readout
EXSYNC
Note: When setting the camera to external signal modes, EXSYNC and/or PRIN must be supplied.
Exposure Modes in Detail
Mode 2: Internally Programmable Line Rate and Exposure Time
Mode 2 operates at a user specified line rate and exposure time.
When setting the line rate (using the ssf 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 set 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.
Example 1: Exposure Time less than Line Period
Mode 3: External Trigger with Maximum Exposure
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.
03-032-10216-06 Teledyne DALSA
Piranha 3 User Manual
29
Exposure Time
CR
Exposure Time
Readout
Line PeriodLine Period
EXSYNC
CR
Readout
Readout
EXSYNC
Line Period
cr=Charge Reset
Readout
PRIN
Line Period
Line Period
Readout
EXSYNC
Line Period
CR=Charge Reset
Readout
Line Period
Programmable Period
Using Command
set
Programmable Period
Using command
set
Mode 4: Smart EXSYNC, External Line Rate and Exposure Time
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 5: External Line Rate (EXSYNC) and External Pixel Reset (PRIN)
In this mode, the falling edge of EXSYNC sets the line period and the rising edge of PRIN
sets the start of exposure time.
Figure 9: EXSYNC controls Line Period and PRIN controls Exposure Time
Mode 6: External Line Rate and Internally Programmable Exposure Time
Figure 10: EXSYNC controls Line Period with Internally controlled Exposure Time
Teledyne DALSA 03-032-10216-06
Piranha 3 User Manual
30
Programmable Period
Frame Period
Readout
CR
Exposure Time
CR=Charge Reset
Frame Period
Programmable Period
CR Exposure Time
Readout
Purpose:
Sets the cam era’s line rate in Hz. Ca mera m u st be op erating in
exposure mode 2 or 7.
Syntax:
ssf f
Syntax Elements:
i
Desired line rate in Hz. Allowable values are:
12k: 2500-23619 Hz
8k: 2500-33855 Hz
Notes:
To read the current line frequency, use the command gcp or
getssf.
If you enter an invalid line rate frequency, an error message is
returned.
Related Commands:
sem, set
Example:
ssf 10000
Exposure Time
Readout
Internal Sync set
with Command
ssf
Line Period
Exposure Time
Readout
Line Period
EXSYNC Falling
Edge ignored
EXSYNC Falling
Edge ignored
during readout
i
Applies to Modes 2 and
7
during readout
(Only Possible on
sot change)
Mode 7: Internally Programmable Line Rate, Maximum Exposure Time
In this mode, the line rate is set internally with a maximum exposure time.
Figure 11: Mode 7 Camera Timing
Mode 8: Maximum Line Rate, Programmable Exposure Time
In this mode, the exposure time is set internally with a maximum line rate.
Figure 12: Mode 8 Timing
Setting the Line Rate
03-032-10216-06 Teledyne DALSA
Piranha 3 User Manual
31
Purpose:
Sets the cam era’s exp osure tim e is µs. Cam er a mu st be op eratin g in
mode 2 or 8.
Syntax:
set f
Syntax Elements:
i
Desired exposure time in µs. Allowable values are 3 to 3330µs.
Notes:
To read the current line frequency, use the command gcp or
get set.
If you enter an invalid line rate frequency, an error message is
returned.
Related Commands:
sem, ssf
Example:
set 400.5
Purpose:
Sets the cam era’s Cam era Link configuration, number of Camera
Link taps and data bit depth. Refer to Table 12 for a description of
each Camera Link mode.
Syntax:
clm m
Syntax Elements:
m
Output mode to use:
15: Medium configuration, 4 taps, 8 bit output
16: Medium configuration, 4 taps, 12 bit output
21: Full configuration, 8 taps, 8 bit output
Notes:
To obtain the current data mode, use the command gcp or get
clm.
The bit patterns are defined by the Camera Link Roadmap and
the Camera Link Standard.
Example:
clm 15
i
Applies to Modes 2 and
8
Setting the Exposure Time
3.3 Camera Output Format
3.3.1 Setting the Camera Link Mode
Teledyne DALSA 03-032-10216-06
Piranha 3 User Manual
32
Camera Link Mode Configuration (Controlled by clm command)
Command
Camera Link
Configuration
Camera Link Taps
Camera Link
Data Rate
Bit
Depth
clm 15
Medium
4 Camera Link taps
where:
1 = CCD tap 1+2
2 = CCD tap 3+4
3 = CCD tap 5+6
4 = CCD tap 7+8
Note: Concatenated
taps are interleaved.
Refer to section 1.3 for a
sensor readout
description.
80MHz
8
clm 16
Medium
4 Camera Link taps
where:
1 = CCD tap 1+2
2 = CCD tap 3+4
3 = CCD tap 5+6
4 = CCD tap 7+8
Note: Concatenated
taps are interleaved.
Refer to section 1.3 for a
sensor readout
description.
80MHz
12
clm 21
Full
8 Camera Link taps
where:
1 = CCD tap 1
2 = CCD tap 2
3 = CCD tap 3
4 = CCD tap 4
5 = CCD tap 5
6 = CCD tap 6
7 = CCD tap 7
8 = CCD tap 8
40MHz
8
Purpose:
In these cameras, the sot command works in conjunction with the
clm command (see above) and determines the throughput of the
camera. The Piranha 3 currently only supports a throughput of 320.
This may change in future cameras.
Syntax:
sot m
Syntax Elements:
m
Output throughput. Allowable value is:
320 = 4 taps at 80MHz or 8 taps at 40MHz
Table 12: Piranha 3 Data Readout Configurations
3.3.2 Setting the Camera Throughput
03-032-10216-06 Teledyne DALSA
Piranha 3 User Manual
33
Purpose:
Some framegrabbers require a small amount of time (several
pixels) to acquire data from a camera. Pretrigger allows the
framegrabber set up time by sending the LVAL signal high several
pixels earlier than valid data.
Syntax:
spt i
Syntax Elements:
i
Pretrigger in a range from 0 to 16.
Purpose:
Sets the pixel range used to collect the end-of-line statistics and sets
the region of pixels used in theccg, cao, gl, gla,ccf, ccp, and
cpa commands.
In most applications, the field of view exceeds the required object
size and these extraneous areas should be ignored. It is
recommended that you set the region of interest a few pixels inside
the actual useable image.
Syntax:
roi x1 y1 x2 y2
Syntax Elements:
x1
Pixel start number. Must be less than the pixel end number in a
range from 1 to sensor resolution.
y1
Column start number. Since the Piranha 3 is a line scan camera,
this value must be 1.
x2
Pixel end number. Must be greater than or equal to the pixel
start number in a range from 2 to sensor resolution.
y2
Column end number. Since the Piranha 3 is a line scan camera,
this value must be 1.
Notes:
To return the current region of interest, use the commands gcp
or get roi.
Related Commands
ccg, cao, gl, gla, ccf, ccp,els
Example:
roi 10 1 50 1
3.3.3 Setting a Pretrigger
3.4 Data Processing
3.4.1 Setting a Region of Interest (ROI:setting)
3.4.2 Analog and Digital Signal Processing Chain
Processing Chain Overview and Description
The follow in g d iag ram sh ows a simplified b lock d iagram of the camera’s an alog an d
digital processing chain. The analog processing chain begins with an analog gain
Teledyne DALSA 03-032-10216-06
Piranha 3 User Manual
34
adjustment, followed by an analog offset adjustment. These adjustments are applied to
the video analog signal prior to its digitization by an A/ D converter.
The digital processing chain contains the FPN correction, the PRNU correction, the
background subtract, and the digital gain and offset. All of these elements are user
programmable.
Figure 13: Signal Processing Chain
Analog Processing
Optimizing offset performance and gain in the analog domain allows you to achieve a
better signal-to-noise ratio and dynamic range than you would achieve by trying to
optimize the offset in the digital domain. As a result, perform all analog adjustments prior
to any digital adjustments.
1. Analog gain (sag or ccg command ) is multiplied by the analog signal to increase the
signal strength before the A/ D conversion. It is used to take advantage of the full
dynamic range of the A/ D converter. For example, in a low light situation the
brightest part of the image may be consistently coming in at only 50% of the DN. An
analog gain of 6 dB (2x) will ensure full use of the dynamic range of the A/ D
converter. Of course the noise is also increased.
2. The analog offset (sao or cao command) or black lev el is an ―artificia l‖ offset
introduced into the video path to ensure that the A/ D is functioning properly. The
analog offset should be set so that it is at least 3 times the rms noise value at the
current gain.
Digital Processing
To optimize camera performance, digital signal processing should be completed after any
analog adjustments.
1. Fixed pattern noise (FPN) calibration (calculated using the ccf command) is used to
subtract away individual pixel dark current.
2. The digital offset (sdo command) ena bles the su btraction of the ―artificial‖ A/ D offset
(th e analog offset) so that ap plication of th e PRN U coefficient d oesn’t resu lt in
artifacts at low light levels due to the offset value. You may want to set the sdo value
if you are not using FPN correction but want to perform PRNU correction.
03-032-10216-06 Teledyne DALSA
Piranha 3 User Manual
35
where
V
outpu t
=
digital output pixel value
V
input
=
digital input pixel value from the CCD
PRNU( pixel)
=
PRNU correction coefficient for this pixel
FPN( pixel )
=
FPN correction coefficient for this pixel
Background Subtract
=
background subtract value
System Gain
=
digital gain value
3. Photo-Response Non-Uniformity (PRNU) coefficients (calculated using the ccp or
cpa commands) 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.
4. Background subtract (ssb command) and system (digital) gain (ssg command) are
used to increase image contrast after FPN and PRNU calibration. It is useful for
systems that process 8-bit d ata bu t w an t to take ad van tage of the cam era’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 (ssb 2048) and then
multiply by 2 (ssg 0 8192) to get an output range from 0 to 255.
Calibrating the Camera to Remove Non-Uniformity
(Flat Field Correction)
Flat Field 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:
V
output
Fixed Pattern Noise (FPN)
Photo Response Non Uniformity (PRNU)
Lens and light source non-uniformity
Correction is implemented such that for each pixel:
=[(V
- FPN( pixel ) - digital offset) * PRNU(pixel) – Background Subtract] x System Gain
input
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).
Teledyne DALSA 03-032-10216-06
Piranha 3 User Manual
36
Brightest Pixel (per tap)
Darkest Pixel (per tap)
Note: If your
illumination or white
reference does not
extend the full field of
view of the camera,
the camera will send a
warning.
3 >
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 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:
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.
03-032-10216-06 Teledyne DALSA
Piranha 3 User Manual
37
Set up the camera operating environment
(i.e. line rate, exposure, offset, gain, etc.)
Set the calibration sample size using
the command css. It is recommended that
you use the default setting.
Perform FPN calculation
Perform PRNU calculation
1. Stop all light from entering the camera. (Tip: Cover lens with a lens cap.)
2. Verify that the output signal level is within range by issuing the command
or . If there are too many zeros in the output data (more than 6.25%
of output data within the roi) , increase the analog offset () or use the
automated algorithm . If the average of the pixels is too high for your
application, reduce the analog offset or gain level ().
3. Issue the command . The camera will respond with OK> (if no error occurs).
FPN calculation automatically calibrates FPN coefficients and digital offset.
4. After the calibration is complete, you should save these settings to non-volatile
memory so they will be reusable on reboot. To do so, issue the commands
and .
5. To verify output, enable the FPN coefficients using the command .
You should see close to zero output.
glgla
sao
cao 0
sag
ccf
wfc
wus
epc 1 0
i
1. Place a white reference in front of the camera.
2. Verify that the output signal level is within range by issuing the command
or . If the signal level is too low, increase your light level, adjust the analog
gain () or use the automated algorithm .
DALSA recommends a target value of about 80% of saturation. If you change
the gain, FPN coefficients should be recalculated.
3. Issue the command . The camera will respond with OK>( if no error occurs).
4. After the calculation is complete, you can save these settings to non-volatile
memory so they will be remembered after power-down and direction change.
To do so, issue the commands and
5
gl
gla
sagccg i 0 i
ccp
wpcwus.
. Enable the coefficients using the command, . epc 1 1
Perform PRNU calculation next to determine the multiplication
factors required to bring each pixel to the required value (balance target) for
flat, white output.
Set the region of interest to include all
of the image’s pixels of importance using
the command roi x1 y1 x2 y2. You can use
the default if you want to calibrate all pixels.
Note: All commands listed above are described in detail in the following sections in the order
Teledyne DALSA 03-032-10216-06
that they should be performed.
Piranha 3 User Manual
38
Purpose:
Sets the cam era’s analog g ain valu e. An alo g g ain is multip lied by
the analog signal to increase the signal strength before the A/ D
conversion. It is used to take advantage of the full dynamic range
of the A/ D converter.
Syntax:
sag t f
Syntax Elements:
t
Tap selection. Use 0 for all taps or 1 to 8 for individual tap
selection.
f
Gain value in a range from –10 to +10dB in steps of .035
(typical).
Notes:
To return the current analog gain setting, use the command
gcp or getsag.
Example:
sag 0 5.2
Related Commands:
ccg
Analog Signal Processing: Setting Analog Gain and
Offset
All analog signal processing chain commands should be performed prior to FPN and
PRNU calibration and prior to digital signal processing commands. All digital processing
(digital offset, pixel coefficients, background subtract and digital gain) should be disabled
prior to performing analog processing. To disable digital processing, send the following
commands: sdo 0 0, epc 0 0, ssb 0 0, ssg 0 4096.
Setting Analog Gain
03-032-10216-06 Teledyne DALSA
Piranha 3 User Manual
39
Purpose:
Instead of manually setting the analog gain to a specific value, the
camera can determine appropriate gain values for optimal tap
matching. This command calculates and sets the analog gain
according to the algorithm determined by the first parameter.
Syntax:
ccg i t i
Syntax Elements:
i
Calibration algorithm to use.
1 = This algorithm adjusts analog gain so that 8% to 13% of
tap region of interest (ROI) pixels are above the specified
target value.
2 = This algorithm adjusts analog gain so that the average
pixel v alue in tap’s ROI is equal to the specified target value.
3 = This algorithm adjusts digital gain (ssg) so that the
average p ixel value in tap’s ROI is equal to the specified
target.
4 = This algorithm adjusts the analog gain so that the
maximum pixel per tap within the ROI of the multi-line
average (css command) is equal to the specified target.
t
Tap value. Use 0 for all taps or 1 to 8 for individual tap
selection.
i
Calculation target value in a range from 1024 to 4055DN
(12 bit LSB).
Notes:
This function requires constant light input while executing.
If very few tap pixels are within the ROI, gain calculation
may not be optimal.
When all taps are selected, taps outside of the ROI are set to
the average gain of the taps that are within the ROI.
Perform analog gain algorithms before performing FPN and
PRNU calibration.
All digital settings affect the analog gain calibration. If you
do not want the digital processing to have any effect on the
camera gain calibration, then turn off all digital settings by
sending the commands: sdo 0 0, epc 0 0, ssb 0 0, and
ssg 0 4096
Example:
ccg 2 0 3040
Related Commands:
sag, ssg
Calibrating Camera Gain (Automatic Tap Matching)
Teledyne DALSA 03-032-10216-06
Piranha 3 User Manual
40
Purpose:
Sets the analog offset. The analog offset should be set so that it is
at least 3 times the rms noise value at the current gain. The analog
offset for the noise is configured at the maximum specified gain
and as a result you should not need to adjust the analog offset.
Syntax:
sao t i
Syntax Elements:
t
Tap selection. Use 0 for all taps or 1 to 8 for individual tap
selection.
i
Offset value in a range from 0 to 255DN (12 bit LSB).
Notes:
To return the current analog offset value, use the command
gcp or getsao.
Example:
sao 3 35
Related Commands:
cao
Purpose:
Instead of manually setting the analog offset to a specific value,
the camera can determine appropriate offset values. This
com m an d calculates and averages ea ch tap’s p ixels w ithin the
region of interest and sets the offset to achieve the specified
average target value.
Syntax:
cao t i
Syntax Elements:
t
Tap selection. Use 0 for all taps or 1 to 8 for individual tap
selection.
i
Average target value in a range from 0 to 255DN (12 bit
LSB).
Notes:
Perform analog offset calibration before performing FPN and
PRNU coefficients.
To return the current analog offset values, use the command
gcp or getcao.
Example:
cao 1 50
Related Commands:
sao
Setting Analog Offset
Calibrating Analog Offset
03-032-10216-06 Teledyne DALSA
Piranha 3 User Manual
41
Tap 1(odd)
Tap 2(even)
Video
Region of Interest
ccg 1 4 2800
Since tap 4 is within the region of interest,
tap 4 gain is adjusted so that the peak value
is set to 2800. Gain values for all other taps are
left unchanged.
Tap 5(odd)
Tap 6(even)
Tap 7(odd)
Tap 8(even)
V
i
d
e
o
0
122884000
9700
2800
0
4095
Pixel
Numb
e
r
After analog gain calibration
Before analog gain calibration
Tap 4(even)
Tap 3(odd)
The following diagrams summarize and provide an example of how analog gain is
calibrated when using a region of interest.
In the following example, analog gain is being set for a single tap inside the region of
interest. The peak value of the tap is calibrated to the specified target value and all other
taps remain unchanged.
Figure 14: Calibrating Analog Gain for a Tap outside of the Region of Interest
Teledyne DALSA 03-032-10216-06
Piranha 3 User Manual
42
ccg 1 2 2800
Since tap 2 is completely outside the region
of interest, an error message is returned and analog
gain calibation does not occur.
Video
Region of Interest
V
i
d
e
o
0
122884000
9700
2800
After analog gain calibration
Before analog gain calibration
0
4095
P
i
xel N
u
mbe
r
Tap 1(odd)
Tap 2(even)
Tap 5(odd)
Tap 6(even)
Tap 7(odd)
Tap 8(even)
Tap 3(odd)
Tap 4(even)
In the following example, analog gain is being set for a tap outside the region of interest.
Since analog gain cannot be set for taps outside the region of interest, an error message is
returned and calibration does not occur.
Figure 15: Calibrating Analog Gain for a Tap inside the Region of Interest
03-032-10216-06 Teledyne DALSA
Piranha 3 User Manual
43
Video
Region of Interest
V
i
d
e
o
0
122884000
9700
2800
After analog gain calibration
Before analog gain calibration
0
4095
ccg 1 0 2800
When calibrating all taps, taps completely outside the region
of interest (in this example, interleaved taps 1and 2) are calibrated to the
average analog gain of taps within the region of interest. Taps
within the region of interest calibrate to the target value. Note: Seams
between taps will be visible until you perform white light calibration using
the command.ccp
Pixel Number
Tap 1(odd)
Tap 2(even)
Tap 5(odd)
Tap 6(even)
Tap 7(odd)
Tap 8(even)
Tap 3(odd)
Tap 4(even)
Purpose:
Sets the current analog gain setting to be the 0dB point. This is
useful after tap gain matching allowing you to change the gain on
all taps by the same amount.
Syntax:
ugr
In the following example, analog gain is being set for all taps. The peak value of each tap
within the region of interest is calibrated to the specified target value. All taps completely
outside the region of interest are calibrated to the average analog gain value of the taps
inside the region of interest.
Figure 16: Calibrating Analog Gain for all Taps
Updating the Gain Reference
To update the analog gain reference:
Teledyne DALSA 03-032-10216-06
Piranha 3 User Manual
44
Syntax:
Performs FPN correction and eliminates FPN noise by subtracting
away individual pixel dark current.
Syntax:
ccf
Notes:
Perform all analog and digital adjustments before
performing FPN correction.
Perform FPN correction before PRNU correction.
Refer to Calibrating the Camera to Remove Non-Uniformity
(Flat Field Correction)on page 35 for a procedural overview
on performing flat field correction.
Related Commands:
ccp
Example:
ccf
Purpose:
Sets an individua l p ixel’s FPN coefficient.
Syntax
sfc x i
Syntax Elements:
x
The pixel number from 1 to sensor pixel count.
i
Coefficient value in a range from 0 to 2048 (12 bit LSB).
Example:
sfc 10 50
Digital Signal Processing
To optimize camera performance, digital signal processing should be completed after any
analog adjustments.
FPN Correction
Performing FPN Correction
Setting a Pixel’s FPN Coefficient
03-032-10216-06 Teledyne DALSA
Piranha 3 User Manual
45
Purpose:
Sets the digital offset. Digital offset is set to zero when you
perform FPN correction (ccf command). If you are unable to
perform FPN correction, you can partially remove FPN by
adjusting the digital offset.
Syntax:
sdo t i
Syntax Elements:
t
Tap selection. Allowable range is 1 to 8, or 0 for all taps.
i
Subtracted offset value in a range from 0 to 2048 where
FPN Coefficient= (12 bit LSB Justified)i
Notes:
When subtracting a digital value from the digital video
signal, the output can no longer reach its maximum unless
you apply digital gain using the ssg command. See the
previous section for details on the ssg command.
Related Commands:
ssg
Example:
sdo 0 100
Purpose:
Performs PRNU correction and eliminates the difference in
responsivity between the most and least sensitive pixel cr eating a
uniform response to light.
Syntax
ccp
Notes:
Perform all analog adjustments before calculating PRNU.
Perform FPN correction before PRNU correction.
If FPN cannot be calibrated, use the rpc command to reset
all coefficients to zero, and save them to memory with the
wfc command. You can then adjust the digital offset (sdo
command) to remove some of the FPN.
Ensure camera is operating at its expected analog gain,
integration time, and temperature.
Refer to Calibrating the Camera to Remove Non-
Uniformity (Flat Field Correction)on page 35 for a
procedural overview on performing flat field correction.
Related Commands:
ccf
Setting Digital Offset
PRNU Correction
Performing PRNU Correction to a Camera Calculated Value
Teledyne DALSA 03-032-10216-06
Piranha 3 User Manual
46
Purpose:
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.
Syntax:
cpa i i
Syntax Elements:
i
PRNU calibration algorithm to use:
1= Th is algorith m first adjusts each tap’s analog g ain so th at 8-
13% of pixels within a tap are above the value specified in the
target value parameter. PRNU calibration then occurs using the
peak pixel in the region of interest (ROI).
2 = Calculates the PRNU coefficients using the entered target
value as shown below:
PRNU Coefficient =
Target
(AVG Pixel Value ) - (FPN + value)sdo
i
i
i
The calculation is performed for all sensor pixels but warnings
are only applied to pixels in the region of interest. This
algorithm is useful for achieving uniform output across multiple
cameras. Recommended peak video output before PRNU
calibration is 5-20% lower than target. The target value must be
greater than the current peak output value.
This command performs the same function as the cpp
command but requires that you enter a target value.
3 = This algorithm includes an analog gain adjustment prior to
PRNU calibration. Analog gain is first adjusted so that the peak
pixel v alue in tap’s ROI is within 97 to 99% of the specified
target value. It then calculates the PRNU coefficients using the
target value as shown below:
PRNU Coefficient =
Target
(AVG Pixel Value ) - (FPN + value)sdo
i
i
i
The calculation is performed for all sensor pixels but warnings
are only applied to pixels in the region of interest. This
algorithm is useful for achieving uniform output across multiple
cameras.
4 = Calculates the PRNU coefficient in the same way as cpa 2
with the exception that this command only calculates PRNU for
pixels within the current Region of Interest (ROI).
i
Peak target value in a range from 1024 to 40554DN.
Notes:
Perform all analog adjustments before calibrating PRNU.
Calibrate FPN before calibrating PRNU. If FPN cannot be
calibrated, use the rpc command to reset all coefficients to
zero, and save them to memory with the wfc command. You
can then adjust the digital offset (sdo command) to remove
some of the FPN.
Note: Refer to Calibrating the Camera to Remove Non-
Uniformity (Flat Field Correction)on page 35 for a procedural
Performing PRNU to a User Entered Value
03-032-10216-06 Teledyne DALSA
Piranha 3 User Manual
47
overview on performing flat field correction.
Example:
cpa 1 600
Purpose:
Sets an individua l p ixel’s PRN U coefficient.
Syntax:
spc i i
Syntax Elements:
i
The pixel number from 1 to sensor pixel count.
i
Coefficient value in a range from 0 to 28671 where:
Example:
spc 1024 10000
Purpose:
Sets a range of pixel PRNU coefficients.
Syntax:
spr i i x
Syntax Elements:
i
The first pixel number of the range.
i
The last pixel number of the range.
x
Coefficient value in a range from 0 to 28671 where:
Notes:
The first pixel of the range must be less than the last.
Example:
spr 4001 4096 0
Purpose:
Use the background subtract command after performing flat field
correction if you w ant to improve your image in a low contrast
scene. It is useful for systems that process 8-bit data but want to
take ad vantage of th e camera’s 12 bit digital pr ocessing chain .
You should try to make your darkest pixel in the scene equal to
zero.
Syntax:
ssb t i
Syntax Elements:
t
Tap selection. Allowable range is 1 to 8, or 0 for all taps.
i
Subtracted value in a range in DN from 0 to 4095.
prnu coefficient =
4096
1 +
prnu coefficient =
4096
1 +i i
Setting a Pixel’s PRNU Coefficient
Setting a range of Pixel PRNU Coefficients
Subtracting Background
Teledyne DALSA 03-032-10216-06
Piranha 3 User Manual
48
Notes:
When subtracting a digital value from the digital video signal
the output can no longer reach its maximum. Use the ssg
command to correct for this where:
ssg value =
max output value
max output value - ssb value
Related Commands:
ssg
Example
ssb 0 25
Purpose:
Improves signal output swing after a background subtract. When
subtracting a digital value from the digital video signal, using the
ssb command, the output can no longer reach its maximum. Use
this command to correct for this where:
ssg value =
max output value
max output value - ssb value
Syntax:
ssg t i
Syntax Elements:
t
Tap selection. Allowable range is 1 to 8, or 0 for all taps.
i
Gain setting. The gain ranges are 0 to 65535. The digital video
values are multiplied by this value where:
Digital Gain=
i
4096
Use this command in conjunction with the ssb command.
Related Commands:
ssb
Example:
ssg 1 15
Setting Digital System Gain
03-032-10216-06 Teledyne DALSA
Piranha 3 User Manual
49
Purpose:
Returns all the current pixel coefficients in the order FPN, PRNU,
FPN , PRNU… for the range specified by x1 and x2. The camera
also returns the pixel number with every fifth coefficient.
Syntax:
dpc x1 x2
Syntax Elements:
x1
Start pixel to display in a range from 1 to sensor pixel
count.
x2
End pixel to display in a range from 1 to sensor pixel
count.
Notes:
This function returns all the current pixel coefficients in the
ord er FPN , PRNU, FPN , PRNU… Th e camera also r eturn s the
pixel number with each coefficient.
Example:
dpc 10 20
Purpose:
Retur ns a pixel’s FPN coefficient valu e in DN (12 bit LSB)
Syntax:
gfc i
Syntax Elements:
i
The pixel number to read in a range from 1 to sensor
pixel count.
Example:
gfc 10
Purpose:
Sets a range of pixel FPN coefficients.
Syntax
sfr x x i
Syntax Elements:
x
The first pixel number of the range.
x
The last pixel number of the range.
i
Coefficient value in a range from 0-2048.
Notes:
The first pixel of the range must be less than the last.
Example:
sfr 1 100 80
Returning Calibration Results and Errors
Returning All Pixel Coefficients
Returning FPN Coefficients
Setting a Range of FPN Coefficients
Teledyne DALSA 03-032-10216-06
Piranha 3 User Manual
50
Purpose:
Retur ns a pixel’s PRNU coefficien t v alue in DN (12 bit LSB)
Syntax:
gpc i
Syntax Elements:
i
The pixel number to read in a range from 1 to sensor
pixel count.
Produces an end-of-line sequence that provides basic calculations
including "line counter", "line sum", "pixels above threshold",
"pixels below threshold", and "derivative line sum" within the
region of interest. These basic calculations are used to calibrate
analog offset (cao) and calibrate analog gain (ccg).
To further aid in debugging and cable/ data path integrity, the
first three pixels after Line Valid are "aa", "55", "aa". Refer to the
following table. These statistics refer only to pixels within the
region of interest.
Syntax:
els i
Syntax Elements:
i 0
Disable end-of-line sequence
1 Enable end-of-line sequence
Notes:
LVAL is not high during the end-of-line statistics.
Example:
els 1
Location
Value
Description
1
A’s
By ensuring these values consistently
toggle between "aa" and "55", you can
verify cabling (i.e. no stuck bits)
2
5’s
Returning PRNU Coefficients
Enabling and Disabling Pixel Coefficients
3.4.3 End-of-line Sequence
Table 13: End-of-Line Sequence Description
03-032-10216-06 Teledyne DALSA
Piranha 3 User Manual
51
Location
Value
Description
3
A’s
4
4 bit counter LSB justified
Counter increments by 1. Use this value to
verify that every line is output
5
Line su m (7…0)
Use these values to help calculate line
average and gain
6
Line su m (15…8)
7
Line su m (23…16)
8
Line su m (31…24)
9
Pixels above threshold (7…0)
Monitor these values (either above or
below threshold) and adjust camera
digital gain and background subtract to
maximize scene contrast. This provides a
basis for automatic gain control (AGC)
10
Pixels above threshold
(15…8)
11
Pixels below th resh old (7…0)
12
Pixels below th resh old (15…8)
13
Differential line sum (7..0)
Use these values to focus the camera.
Generally, the greater the sum the greater
the image contrast and better the focus.
14
Differential line su m (15…8)
15
Differential line su m (23…16)
16
Differential line su m (31…24)
Purpose:
Sets the upper threshold limit to report in the end-of-line
sequence.
Syntax:
sut i
Syntax Elements:
i
Upper threshold limit in range from 0 to 4095.
Notes:
LVAL is not high during the end -of-line statistics.
Related Commands:
els, slt
Example:
sut 1024
Purpose:
Sets the lower threshold limit to report in the end-of-line
sequence.
Syntax:
slt i
Syntax Elements:
i
Upper threshold limit in range from 0 to 4095.
Notes:
LVAL is not high during the end -of-line statistics.
Related Commands:
els, sut
Example:
slt 1024
Setting Thresholds
Setting an Upper Threshold
Setting a Lower Threshold
Teledyne DALSA 03-032-10216-06
Piranha 3 User Manual
52
Factory
Settings
User
Settings
Current
Session
wus wpc,wfc,
rus lpc,
rfs,
lpc 0
3.5 Saving and Restoring Settings
Figure 17: Saving and Restoring Overview
Factory Settings
On first initialization, the camera operates using the factory settings. You can restore the
original factory settings at any time using the command rfs.
User Settings
You can save or restore your user settings to non-volatile memory using the following
commands. Pixel coefficients are stored separately from other data.
• To save all current user settings to EEPROM, use the command wus. The camera will
automatically restore the saved user settings when powered up. Note: While settings
are being written to nonvolatile memory, do not power down camera or camera
memory may be corrupted.
• To restore the last saved user settings, use the command rus.
• To save the current pixel coefficients, use the command wpci and wfci.
• To restore saved pixel coefficients, use the command lpc i.
Current Session Settings
These are the current operating settings of your camera. To save these settings to nonvolatile memory, use the command wus.
03-032-10216-06 Teledyne DALSA
Piranha 3 User Manual
53
Purpose:
Saves the current FPN coefficients. You can save up to four sets of
pixel coefficients
Syntax:
wfc i
Syntax Elements:
i
FPN coefficients set to save.
1 = Coefficient set one
2 = Coefficient set two
3 = Coefficient set three
4 = Coefficient set four
Example:
wfc 2
Purpose:
Loads a saved set of pixel coefficients. A factory calibrated set of
coefficients is available.
Syntax:
lpc i
Syntax Elements:
i
FPN coefficients set to save.
0 = Factory calibrated pixel coefficients.
1 = Coefficient set one
2 = Coefficient set two
3 = Coefficient set three
4 = Coefficient set four
Example:
lpc 0
Purpose:
Resets the current pixel coefficients to zero. This command does
not reset saved coefficients.
Syntax:
rpc
Purpose:
Saves the current PRNU coefficients. You can save up to four sets
of pixel coefficients
Syntax:
wpc i
Syntax Elements:
i
PRNU coefficients set to save.
1 = Coefficient set one
2 = Coefficient set two
3 = Coefficient set three
4 = Coefficient set four
Example:
wpc 2
3.5.1 Saving and Restoring PRNU and FPN Coefficients
Saving the Current PRNU Coefficients
Saving the Current FPN Coefficients
Loading a Saved Set of Coefficients
Resetting the Current Pixel Coefficients
Teledyne DALSA 03-032-10216-06
Piranha 3 User Manual
54
Notes:
The digital offset is not reset.
Purpose:
Generates a test pattern to aid in system debugging. The test
patterns are useful for verifying proper timing and connections
between the camera and the frame grabber. The following tables
show each available test pattern.
Syntax:
svm i
Syntax Elements:
i 0
Video.
1 12 bit ramp test pattern.
2 8 bit step test pattern.
Example:
svm 1
Purpose:
Returns a complete line of video (without pixel coefficients or test
pattern) displaying one pixel value after another. After pixel values
have been displayed it also displays the minimum, maximum, and
mean value of the line sampled within the region of interest (the
region of interest command is explained in section 3.4.1 Setting a
Region of Interest (ROI:setting)).
Use the gl command, or the following gla command, to ensure
the proper video input range into the processing chain before
executing any pixel calibration commands.
Syntax:
gl x1 x2
Syntax Elements:
x1
Pixel start number. Must be less than or equal to the pixel end
3.5.2 Rebooting the Camera
The command rc reboots the camera. The camera starts up with the last saved settings
and the baud rate used before reboot. Previously saved pixel coefficients are also restored.
3.6 Diagnostics
3.6.1 Generating a Test Pattern
3.6.2 Returning Video Information
The cam era’s microcontroller h as the ability to read v id eo d ata. Th is function ality can be
used to verify camera operation and to perform basic testing without having to connect
the camera to a frame grabber. This information is also used for collecting line statistics
for calibrating the camera.
Returning a Single Line of Video
03-032-10216-06 Teledyne DALSA
Piranha 3 User Manual
55
number in a range from 1 to sensor resolution.
x2
Pixel end number. Must be greater than or equal to the pixel
start number in a range from 1 to sensor resolution.
Notes:
Values returned are in 12 bit DN.
Related Commands
roi
Example:
gl 10 20
Purpose:
Sets the number of lines to sample when using the gla command
or when performing FPN and PRNU calibration .
Syntax:
css i
Syntax Elements:
i
Number of lines to sample. Allowable values are 256, 512,
or 1024 (factory setting).
Notes:
To return the current setting, use the gcp command or get
css.
Related Commands:
gla, ccf, ccp, cpa
Example:
css 1024
Purpose:
Returns the average for multiple lines of video data (without pixel
coefficients or test pattern). The number of lines to sample is set
and adjusted by the css command. The camera displays the Min.,
Max., and Mean statistics for the pixels in the region of interest (the
region of interest command is explained in section 3.4.1 Setting a
Region of Interest (ROI:setting)).
Syntax:
gla x1 x2
Syntax Elements:
x1
Column start number. Must be less than or equal to the
column end number in a range from 1 to column resolution.
x2
Column end number. Must be greater than or equal to the
column start number in a range from 1 to column resolution.
Notes:
Analog gain, analog offset, digital offset, background subtract,
and digital system gain are applied to the data. FPN and
PRNU coefficients are not included in the data.
Values returned are in 12 bit DN.
Related Commands:
css, roi
Example:
gla 10 20
Returning Averaged Lines of Video
Setting the Number of Lines to Sample
Returning the Average of Multiple Lines of Video
Teledyne DALSA 03-032-10216-06
Piranha 3 User Manual
56
Purpose:
Returns the frequency for the requested Camera Link control
signal
The temperature of the camera can be determined by using the vt command. This
command will return the internal chip case temperature in degrees Celsius. For proper
operation, this value should not exceed 75°C.
Note: If the camera reaches 75°C, the camera will shutdown and the LED will flash red. If
this occurs, the camera must be rebooted using the command, rc or can be powered
down manually. You will not be able to restart the camera until the temperature is less
than 65°C. You will have to correct the temperature problem or the camera will shutdown
again. The camera allows you to send the vt (verify temperature) command while it is in
this state.
3.6.4 Voltage Measurement
The command vvdisp lays the camera’s input voltage. N ote that th e 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.
3.6.5 Camera Frequency Measurement
03-032-10216-06 Teledyne DALSA
Piranha 3 User Manual
57
Syntax:
gcp
GCP Screen
Desctiption
GENERAL CAMERA SETTINGS
Camera Model No.:
P3-xx-xxxxx
Camera model number.
Camera Serial No.:
xxxxxxxxx
Camera serial number.
Firmware Design Rev.:
xx-xx-xxxxx-xx
Firmware design revision
number.
CGI Version:
03-81-xxxxx-xx
CGI version. Part of FPGA
firmw are.
FPGA Design Rev.:
xxx.xx
DSP design revision
number.
UART Baud Rate:
9600
Serial communication
connection speed set with
the sbr command. See
Setting Baud Rate on page
24 for details.
Exposure Mode:
2
Current exposure mode
value set with the sem
command. See section
3.2.1 Exposure Mode, Line
Rate and Exposure Time
for details.
SYNC Frequency:
5000 Hz
Current line rate. Value is
set with the ssf
command. See section
3.2.1 Exposure Mode, Line
Rate and Exposure Time
for details.
Internal Exposure Time:
50 uSec
Current exposure time
setting. Value is set with
the set command. See
section 3.2.1 Exposure
Mode, Line Rate and
Exposure Time for details.
Video Mode:
video
Current vid eo mode value
set with the svm
command. See section
3.6.1 Generating a Test
Pattern for details.
3.6.6 Returning Camera Settings
Returning All Camera Settings with the Camera
Parameter Screen
The camera parameter (gcp) screen retu r ns all of the cam era’s current settings. The table
below lists all of the gcp screen settings.
To read all current camera settings, use the command:
Teledyne DALSA 03-032-10216-06
Piranha 3 User Manual
58
Region of Interest:
(1,1) to (12288, 1)
Region of interest size set
with the roi command.
See section 3.4.1 Setting a
Region of Interest
(ROI:setting) for details.
End-Of-Line Sequence:
on
States whether an end of
line sequence is turned on
or off. Set using the els
command. See section
3.4.3 End-of-line Sequence
for details.
FFC Coefficient Set:
0
Current pixel coefficient
set loaded. Refer to
section 3.5.1 Saving and
Restoring PRNU and FPN
Coefficients for details.
FPN Coefficients:
off
States whether FPN
coefficients are on or off.
Set with the epc
command. Refer to section
3.4.2 Analog and Digital
Signal Processing Chain
for details.
PRNU Coefficients:
off
States whether PRNU
coefficients are on or off.
Set with the epc
command. Refer to section
3.4.2 Analog and Digital
Signal Processing Chain
for details.
Number of Line Samples:
256
Number of lines samples
set with the css
command. See section
3.6.2 Returning Video
Information for details.
Upper Threshold
0
Upper threshold value set
with the sut command.
See section 3.4.3 End -ofline Sequence for details.
Lower Threshold
4095
Lower threshold value set
with the slt command.
See section 3.4.3 End -ofline Sequence for details.
Camera Link Mode:
21, Full, 8 taps, 8
bits, no time MUX
Camera Link mode set
with the clm command.
See section 3.3.1 Setting
the Camera Link Mode for
details.
03-032-10216-06 Teledyne DALSA
Piranha 3 User Manual
59
Output Throughput:
320
Camera throughput value
set with the sot
command. Throughput is
set to 320 and is not
configurable in the
Piranha 3 camera. See
section 3.3.2 Setting the
Camera Throughput for
details.
Pretrigger
0
Pretrigger set with the spt
command. See section
3.3.3 Setting a Pretrigger.
Analog Gain (dB):
3.0 3.0 3.0
3.0 3.0 3.0
3.0 3.0
Analog gain settings set
with the sag command.
See section 3.4.2 Analog
and Digital Signal
Processing Chain for
details.
Analog Reference Gain
(dB):
3.0 3.0 3.0
3.0
Analog reference gain set
with the ugr command.
See section Analog Signal
Processing for details.
Total Analog Gain (dB):
6.0 6.0 6.0
6.0
This is the sum of the
analog gain and analog
gain reference values and
is the total analog gain
being used by the camera.
Analog Offset:
100 100 100
100 100 100
100 100
Analog offset settings set
with the sao command.
See section 3.4.2 Analog
and Digital Signal
Processing Chain for
details.
Digital Offset:
50 50 50 50
50 50 50 50
Digital offset settings set
with the sdo command.
See section 3.4.2 Analog
and Digital Signal
Processing Chain for
details.
Background Subtract:
150 150 150
150 150 150
150 150
Background subtract
settings set with the ssb
command. See section
3.4.2 Analog and Digital
Signal Processing Chain
for details.
System Gain:
125 125 125
125 125 125
125 125
Digital gain settings set
with the ssg command.
See section 3.4.2 Analog
and Digital Signal
Processing Chain for
details.
Teledyne DALSA 03-032-10216-06
Piranha 3 User Manual
60
Syntax
Parameters
Description
get cao
t
Returns the analog offset for the tap indicated
t = tap selection, either 1 to 8, or 0 for all taps
get ccf
x1 x2
Returns the FPN pixel coefficients for the pixel range
indicated.
x1 = Pixel start number
x2= Pixel end number
get ccp
x1 x2
Returns the PRNU pixel coefficients for the pixel range
indicated.
x1 = Pixel start number
x2= Pixel end number
get clm
Returns the current Camera Link mode.
get css
Returns the number of line samples averaged for pixel
coefficient calculations or for output of gla command.
get els
Returns whether the end-of-line statistics are turned off or
on.
0: Off
1: On
get epc
Returns whether pixel coefficients are enabled or
disabled.
The first parameter returns the FPN coefficients setting
where:
Returns the FPN pixel coefficient for the pixel indicated.
get gl
x1 x2
Returns pixel values for the pixel range specified.
get gla
x1 x2
Returns the average of the pixel range indicated.
get gsf
i
Returns the frequency of the Camera Link control signal
indicated, either 1, 2, 3, or 4.
get lpc
Returns the current coefficient set number.
Returning Camera Settings with Get Commands
You can also return in d iv id u al cam era settin gs by in serting a ―get” in front of the
command that you want to query. If the command has a tap or pixel number parameter,
you must also insert the tap number or pixel number that you want to query. Refer to
Table 14 below for a list of available commands. To view a help screen listing the
following get commands, use the command gh.
Table 14: Get Commands
03-032-10216-06 Teledyne DALSA
Piranha 3 User Manual
61
Syntax
Parameters
Description
get rfs
Returns whether factory settings have been saved. The
camera always returns 1 (factory settings have been
saved).
get roi
Returns the current region of interest.
get rus
Returns whether user settings have been saved .
0 = No user settings saved
1 = User settings have been saved
get sag
t
Returns the analog gain in dB for the tap indicated
t = Tap value. 0 for all taps or 1 to 8 for individual tap
selection.
get sao
t
Returns the analog offset for the tap indicated.
t = 0 for all taps or 1 to 8 for individual tap selection.
get sbr
Returns the speed of camera serial communication port.
get sdo
t
Returns the digital offset value in DN for the tap
indicated.
t = Tap value. 0 for all taps or 1 to 8 for individual tap
selection.
get sem
Returns the current exposure mode:
3 = External SYNC, maximum exposure time
7 = Internal programmable SYNC, maximum exposure
time. Factory setting.
get sfc
x
Returns the FPN coefficient for the pixel number idicated.
x =pixel number within the range 1 to sensor pixel
count.
get sgr
Returns the current analog gain reference value in d B.
get slt
Returns the current lower threshold value.
get sot
Returns the Camera Link strobe rate.
get spc
x
Returns the PRNU coefficient for the specified pixel
number.
x=pixel number within the range 1 to sensor pixel
count.
get spt
Returns the current pretrigger value.
get ssb
t
Returns the current background subtract value.
t = Tap value. 0 for all taps or 1 to 8 for individual tap
selection.
get ssf
Returns the current line/ frame rate in Hz.
get ssg
t
Returns the current digital gain setting.
t = tap selection, either 1 to 8, or 0 for all taps
get sut
Returns the current uppder threshold value.
get svm
Returns the current video mode.
0: Normal video mode
1: Test pattern
2: Test pattern
3: Test pattern
get ugr
Returns the gain reference value
Teledyne DALSA 03-032-10216-06
Piranha 3 User Manual
62
Syntax
Parameters
Description
get vt
Retur ns the cam er a’s in tern al chip tem p er ature in degrees
Celsius.
get vv
Retur ns the cam er a’s sup p ly volta ge.
get wfc
Returns whether FPN coefficients have been saved.
0 = No FPN coefficients saved
1 = Pixel coefficients have been saved
get wpc
Returns whether PRNU coefficients have been saved.
0 = No PRNU coefficients saved
1 = Pixel coefficients have been saved
get wus
Returns whether user settings have been saved .
0 = No user settings saved
1 = User settings have been saved
03-032-10216-06 Teledyne DALSA
Piranha 3 User Manual
63
Optical and Mechanical
Considerations
4.1 Mechanical Interface
4
Figure 18: P3-80 Mechanical Drawing
Teledyne DALSA 03-032-10216-06
Piranha 3 User Manual
64
73.0 (2x)
73.0
(2x)
80.0
85.0
42.50 ±0.05
CCD imaging
center
40.00±0.05
CCD imaging
center
M72 x 0.75
x 4.0 deep
36.5 (2x)
36.5
(2x)
49.5
15.0 (2x)
55.0 (2x)
6.0 (4x)
55.0
12.5
6.0 (2x)
72.5
49.9
69.4
14.1
6.56 ±0.25
CCD imaging
distance (from
top of CCD to
datum A)
`
54.2
29.8 (2x)
38.7
60.1
M3x0.5
x 6.0 deep
(4x)
M3x0.5
x 6.0 deep
(2x)
M3x0.5
x 6.0
deep (4x)
Pixel 1
Units: mm
P3-87
Model Number
Lens Mount Options
All models
M72x0.75
Mount
Back Focal Distance (sensor die to adapter)
M72
6.56±0.25mm
Figure 19: P3-87 Mechanical Drawing
Lens Mounts
03-032-10216-06 Teledyne DALSA
Piranha 3 User Manual
65
4.2 Optical Interface
Illumination
The amount and wavelengths of light required to capture useful images depend on the
particular application. Factors include the nature, speed, and spectral characteristics of
objects being imaged, exposure times, light source characteristics, environmental and
acquisition system specifics, and more. Teledyne DALSA’s Web site, here, provides an
introduction to this potentially complicated issu e. See ―Radiom et ry and Photo
Resp onsivity‖ and "Sen sitivities in Ph otometr ic Unit s" in th e CCD Technolog y Primer
found under the Application Support link.
It is often more important to consider exposure than illumination. The total amount of
energy (which is related to the total number of photons reaching the sensor) is more
important than the rate at which it arrives. For example, 5J/ cm2 can be achieved by
exposing 5mW/ cm2 for 1ms just the same as exposing an intensity of 5W/ cm2 for 1s.
Light Sources
Keep these guidelines in mind when setting up your light source:
• LED light sources are relatively inexpensive, provide a uniform field, and longer life
span compared to other light sources. However, they also require a camera with
excellent sensitivity, such as the Piranha 3 cameras.
• Halogen light sources generally provide very little blue relative to IR.
• Fiber-optic light distribution systems generally transmit very little blue relative to IR.
• Some light sources age; over their life span they produce less light. This aging may
not be uniform—a light source may produce progressively less light in some areas of
the spectrum but not others.
Filters
CCD cameras are extremely responsive to infrared (IR) wavelengths of light. To prevent
infrared from distorting t he im ages you scan, u se a ―hot mirr or ‖ or IR cu toff filter that
transmits visible wavelengths but does not transmit wavelengths over 750nm. Examples
are the Schn eider O p tics™ B+W 489, w h ich includes a m ou ntin g rin g, the CORION ™ LS750, which d oes not in clu d e a m ounting ring, and th e CORIO N ™ H R-750 series hot
mirror.
Lens Modeling
Any lens surrounded by air can be modeled for camera purposes using three primary
points: the first and second principal points and the second focal point. The primary
points for a lens should be available from the lens data sheet or from the lens
manufacturer. Primed quantities denote characteristics of the image side of the lens. That
is, h is the object height and h is the image height.
The focal point is the point at which the image of an infinitely distant object is brought to
focus. The effective focal length (f) is the distance from the second principal point to the
second focal point. The back focal length (BFL) is the distance from the image side of the
Teledyne DALSA 03-032-10216-06
Piranha 3 User Manual
66
m
h
h
where m is the m agnification, h ’ is the image h eig ht
(pixel size) and h is the object height (desired object
resolution size).
m
f
OD
h
hfOD
This is the governing equation for many object and
image plane parameters.
10
100
45
4500 450
m
mmmOD
ODmmm( .)
lens surface to the second focal point. The object distance (OD) is the distance from the first
principal point to the object.
Figure 20: Primary Points in a Lens System
Magnification and Resolution
The magnification of a lens is the ratio of the image size to the object size:
By similar triangles, the magnification is alternatively given by:
These equations can be combined to give their most useful form:
Example: An acquisition system has a 512 x 512 element, 10m pixel pitch area scan camera,
a lens with an effective focal length of 45mm, and requires that 100m in the object space
correspond to each pixel in the image sensor. Using the preceding equation, the object
distance must be 450mm (0.450m).
03-032-10216-06 Teledyne DALSA
Piranha 3 User Manual
67
power supplies
cabling
frame grabber hardware & software
host computer
light sources
optics
operating environment
encoder
Troubleshooting
The information in this chapter can help you solve problems that may occur during the
setup of your camera. Remember that the camera is part of the entire acquisition system.
You may have to troubleshoot any or all of the following:
5
Your steps in dealing with a technical problem should be:
1. Try the general and specific solutions listed in sections 5.1, 5.2 and 5.3.
2. If these solutions do not resolve your problem, see section 5.4 on getting product
support.
5.1 Common Solutions
Connections
The first step in troubleshooting is to verify that your camera has all the correct
connections.
Power Supply Voltages
Check for the presence of all voltages at the camera power connector. Verify that all
grounds are connected.
Data Clocking/Output Signals
To validate cable integrity, have the camera send out a test pattern and verify it is being
properly received. Refer to section 3.6.1 Generating a Test Pattern for further information
on running test patterns.
Teledyne DALSA 03-032-10216-06
Piranha 3 User Manual
68
5.2 Troubleshooting Using the Serial Interface
Communications
To quickly verify serial communications send the h (help) command. By sending the h
and receiving the help menu, the serial communications are verified. If further problems
persist, review Appendix B for more information on communications.
Verify Parameters
To verify the camera setup, send the gcp(get camera parameters) command.
Verify Factory Calibrated Settings
To restore the cam era’s factory setting s send th e rfs command.
After executing this command send the gcp command to verify the factory settings.
Verify Timing and Digital Video Path
Use the test pattern feature to verify the proper timing and connections between the
camera and the frame grabber and verify the proper output along the digital processing
chain.
Verify Voltage
To ch eck th e cam er a’s in p u t v oltages, use the vvcommand. Make sure the voltage is
within the proper range (+12V to +15V). If a problem still persists, contact Technical
Support. See section Error! Reference source not found. for contact information.
5.3 Specific Solutions
No Output or Erratic Behavior
If your camera provides no output or behaves erratically, it may be picking up random
noise from long cables acting as antennae. Do not attach wires to unused pins. Verify that
the camera is not receiving spurious inputs (e.g. EXSYNC, if camera is using an internal
signal for synchronization).
Line Dropout, Bright Lines, or Incorrect Line rate
Verify that the frequency of the internal sync is set correctly.
03-032-10216-06 Teledyne DALSA
Piranha 3 User Manual
69
Noisy Output
Check your power supply voltage outputs for noise. Noise present on these lines can
result in poor video quality. Low quality or non-twisted pair cable can also add noise to
the video output.
Dark Patches
If dark patches appear in your output the optics path may have become contaminated.
Clean your lenses and sensor windows with extreme care.
1. Take standard ESD precautions.
2. Wear latex gloves or finger cots
3. Blow off dust using a filtered blow bottle or dry, filtered compressed air.
4. Fold a piece of optical lens cleaning tissue (approx. 3" x 5") to make a square pad that
is approximately one finger-width
5. Moisten the pad on one edge with 2-3 drops of clean solvent—either alcohol or
acetone. Do not saturate the entire pad with solvent.
6. Wipe across the length of the window in one direction with the moistened end first,
followed by the rest of the pad. The dry part of the pad should follow the moistened
end. The goal is to prevent solvent from evaporating from the window surface, as this
will end up leaving residue and streaking behind.
7. Repeat steps 2-4 using a clean tissue until the entire window has been cleaned.
Blow off any adhering fibers or particles using dry, filtered compressed air.
Horizontal Lines or Patterns in Image
A faulty or irregular encoder signal that is applied as the EXSYNC signal may result in
horizontal lines due to exposure time fluctuations; ensure that your exposure time is
regular. If you have verified that your exposure time is consistent and patterns of low
frequency intensity variations still occur, ensure that you are using a DC or high
frequency light source and that no ambient light is affecting your system.
Teledyne DALSA 03-032-10216-06
Piranha 3 User Manual
70
03-032-10216-06 Teledyne DALSA
Piranha 3 User Manual
71
Appendix A
Camera Link™ Reference,
Timing, and
Configuration Table
Camera Link is a communication interface for vision applications. It provides a
connectivity standard between cameras and frame grabbers. A standard cable connection
will red u ce manufacturers’ su p p ort tim e an d greatly red u ce t he level of complexity and
time needed for customers to successfully integrate high speed cameras with frame
grabbers. This is particularly relevant as signal and data transmissions increase both in
complexity and throughput. A standard cable/ connector assembly will also enable
customers to take advantage of volume pricing, thus reducing costs.
The camera link standard is intended to be extremely flexible in order to meet the needs
of different camera and frame grabber manufacturers.
The Camera Link Implementation Road Map (available from the link) details how we
standardize the use of the Camera Link interface.
LVDS Technical Description
Low Voltage Differential Signaling (LVDS) is a high-speed, low-power general purpose
interface standard. The standard, known as ANSI/ TIA/ EIA-644, was approved in March
1996. LVDS uses differential signaling, with a nominal signal swing of 350mV differential.
The low signal swing decreases rise and fall times to achieve a theoretical maximum
transmission rate of 1.923 Gbps into a loss-less medium. The low signal swing also means
that the standard is not dependent on a particular supply voltage. LVDS uses currentmode drivers, which limit power consumption. The differential signals are immune to ±1
V common volt noise.
Camera Signal Requirements
This section provides definitions for the signals used in the Camera Link interface. The
standard Camera Link cable provides camera control signals, serial communication, and
video data.
Teledyne DALSA 03-032-10216-06
Piranha 3 User Manual
72
C1
EXSYNC, negative edge active
CC2
PRIN
CC3
Not Used
CC4
Not Used
Video Data
The Channel Link technology is integral to the transmission of video data. Image data and
image enable signals are transmitted on the Channel Link bus. Four enable signals are
defined as:
• FVAL—Frame Valid (FVAL) is defined HIGH for valid lines.
• LVAL—Line Valid (LVAL) is defined HIGH for valid pixels.
• DVAL—Data Valid (DVAL) is defined HIGH when data is valid.
• Spa re — A spare has been defined for future use.
All four enable signals must be provided by the camera on each Channel Link chip. All
unused data bits must be tied to a known value by the camera. For more information on
image data bit allocations, refer to the official Camera Link specification on the Web site,
available here.
Camera Control Signals
Four LVDS pairs are reserved for general-purpose camera control. They are defined as
camera inputs and frame grabber outputs. Camera manufacturers can define these signals
to meet their needs for a particular product. The signals are:
• Camera Control 1 (CC1)
• Camera Control 2 (CC2)
• Camera Control 3 (CC3)
• Camera Control 4 (CC4)
The Piranha 3 uses the following camera control signals:
Table 15: Camera Control Configuration
Communication
Two LVDS pairs have been allocated for asynchronous serial communication to and from
the camera and frame grabber. Cameras and frame grabbers should support at least 9600
baud. These signals are
• SerTFG—Differential pair with serial communications to the frame grabber.
• SerTC—Differential pair with serial communications to the camera.
The serial interface will have the following characteristics: one start bit, one stop bit, no
parity, and no handshaking. It is recommended that frame grabber manufacturers supply
both a user interface and a software application programmming interface (API) for using
the asynchronous serial communication port. The user in terface will consist of a terminal
program with minimal capabilities of sending and receiving a character string and
sending a file of bytes. The software API will provide functions to enumerate boards and
03-032-10216-06 Teledyne DALSA
Piranha 3 User Manual
73
send or receive a character string. See Appendix B in the Official Camera Link
specification available from the Web site here.
Power
Power will not be provided on the Camera Link connector. The camera will receive power
through a separate cable. Camera manufacturers will define their own power connector,
current, and voltage requirements.
Teledyne DALSA 03-032-10216-06
Piranha 3 User Manual
74
03-032-10216-06 Teledyne DALSA
Piranha 3 User Manual
75
Message
Description
OK>
SUCCESS
Warning 01: Outside
of specification>
Parameter accepted was outside of specified operating range (e.g.
gain greater than ±10 dB of factory setting).
Warning 02: Clipped
to min>
Parameter was clipped to the current operating range. Use GCP to
see value used.
Warning 03: Clipped
to max>
Parameter was clipped to the current operating range. Use GCP to
see value used.
Warning 04: Related
parameters
adjusted>
Parameter was clipped to the current operating range. Use GCP to
see value used.
Warning 05: Missing
codes – insufficient
digital gain>
Output when the digital gain is such that missing codes are to be
expected due to not enough digital gain.
Warning 06: Missing
codes – too much
digital gain>
Output when the digital gain is such that missing codes are to be
expected due to too much digital gain.
Warning 07:
Coefficient may be
inaccurate A/ D
clipping has
occurred>
In the region of interest (ROI) greater than 6.251% single or 1% of
averaged pixel values w ere zero or saturated.
Warning 08: Greater
than 1% of
coefficients have
been clipped
A FPN/ PRNU has been calculated to be greater than the maximum
allowable 511 (8).
Message
Description
Error 01: Internal
error xx>
Ou tput on ly in ―d iagn ostic m ode‖ o r self ch eck at pow er or reset
camera. Where xx is a code.
Appendix B
Error Handling and
Command List
B1 Error Handling
The following table lists warning and error messages and provides a description and
possible cause.
Table 16: Warning and Error Messages
Teledyne DALSA 03-032-10216-06
Piranha 3 User Manual
76
Message
Description
Error 02:
Unrecognized
command>
Command is not available in the current access level or it is not a
valid command.
Error 03: Incorrect
number of
parameters>
Error 04: Incorrect
parameter value>
This response returned for
· Alpha received for numeric or vice versa
· Not an element of the set of possible values. E.g., Baud Rate
· Outside the range limit
Error 05: Command
unavailable in this
mode>
Command is valid at this level of access, but not effective. Eg line rate
when in smart Exsync mode
Error 06: Timeout>
Command not completed in time. Eg FPN/ PRNU calculation w hen
no external exsync is present.
Error 07: Camera
settings not saved>
Tried saving camera settings (rfs/ rus) but they cannot be saved.
Error 08: Unable to
calibrate - tap
outside ROI>
Cannot calibrate a tap that is not part of the end of line statistics.
Error 09: The
camera's
temperature exceeds
the specified
operating range>
Indicates that the camera has shut itself down to prevent damage
from further overheating.
Command
Syntax
Parameters
Description
calibrate analog offset
cao
t i
Calibrates the analog gain and averages
each tap ’s pixels w ithin the ROI to the
specified average target value.
t = tap selection, either 1 to number of
CCD taps, or 0 for all taps
i = target value in a range from 0 to
255DN (12-bit LSB)
Refer to Analog Signal Processing:
Setting Analog Gain and Offset for
details.
correction calibrate fpn
ccf
Start FPN coefficient calibration. Refer to
section 3.4.2 Analog and Digital Signal
Processing Chain for details.
Parameters:
i = integer
t = tap id
i = integer value
f = real number
s = string
x1 = horizontal pixel start number
x2 = horizontal pixel end
number
y1 = vertical pixel start
number
y2 = vertical pixel end
number
B2 All Available Commands
As a quick reference, the following table lists all of the commands available to the camera
user. For detailed information on using these commands, refer to Chapter 3.
03-032-10216-06 Teledyne DALSA
Piranha 3 User Manual
77
Command
Syntax
Parameters
Description
calculate camera gain
ccg
i t i
Calculates the camera gain and optimizes
tap matching according to the selected
algorithm.
i = Calibration algorithm to use.
1 = This algorithm adjusts analog
gain so that 8% to 13% of tap ROI
pixels are above the specified target
value.
2 = This algorithm adjusts analog
gain so that the average pixel value
in tap’s ROI is equal to the specified
target value.
3 = This algorithm adjusts digital
gain so that the average pixel value
in tap’s ROI is equal to the specified
target.
4= This algorithm adjusts the analog
gain so that all tap ROI pixels are
within 98% of the specified target
value and then performs a PRNU
correction.
t = Tap value. Use 0 for all taps or 1 to
8 for individual tap selection.
i = Calibration target value in a range
from 1024 to 4055DN (12 bit LSB).
correction calibrate prnu
ccp
Start PRNU coefficient calibration. Refer
to section 3.4.2 Analog and Digital Signal
Processing Chain for details.
camera link mod e
clm
i
Sets the Camera Link configuration,
number of Camera Link taps, and data
bit depth.
15: Medium configuration, 4 taps, 8 bit
output
16: Medium configuration, 4 taps, 12 bit
output
21: Full configuration, 8 taps, 8 bit
output
Refer to section 3.3.1 Setting the Camera
Link Mode for details.
Teledyne DALSA 03-032-10216-06
Piranha 3 User Manual
78
Command
Syntax
Parameters
Description
calculate PRNU
algorithm
cpa
i i
Performs PRNU calibration according to
the selected algorithm.
The first parameter is the algorithm
where i is:
1= Th is a lgorith m first adjusts each tap’s
analog gain so that 8-13% of pixels
within a tap are above the value specified
in the target value parameter. PRNU
calibration then occurs using the peak
pixel in the region of interest. (Id entical
to ccp i)
2 = Calculates the PRNU coefficients
using the entered target value as shown
below:
PRNU Coefficient =
Target
(AVG Pixel Value) - (FPN+ value)sdo
The
calculation is performed for all sensor
pixels but warnings are only applied to
pixels in the region of interest. This
algorithm is useful for achieving uniform
output across multiple cameras.
3 = This algorithm includes an analog
gain adjustment prior to PRNU
calibration. Analog gain is first adjusted
so that the peak p ixel valu e in tap ’s ROI
is within 97 to 99% of the specified target
value. It then calculates the PRNU
coefficients using the target value as
shown below:
PRNU Coefficient =
Target
(AVG Pixel Value ) - (FPN + value)sdo
i
i
i
The calculation is performed for all
sensor pixels but warnings are only
applied to pixels in the region of interest.
This algorithm is useful for achieving
uniform output across multiple cameras.
The second parameter is the target value
to use in a range from 1024 to 4055DN.
section 3.4.2 Analog and Digital Signal
Processing Chain
4 = This algorithm is the same as 2 with
the exception that it only calculates
PRNU for the pixels within the current
Region of Interest (ROI).
The second parameter is the target value
to use in a range from 1024 to 4055DN.
correction set sample
css
m
Set number of line samples averaged for
pixel coefficient calculations or for
output of gla command. Values: 256,
512, 1024.
Refer to Returning Averaged Lines of
Video on page 55 for details.
03-032-10216-06 Teledyne DALSA
Piranha 3 User Manual
79
Command
Syntax
Parameters
Description
display pixel coeffs
dpc
x1 x2
Displays the pixel coefficients in the
ord er FPN , PRNU, FPN , PRNU, …
x1 = Pixel start number
x2 = Pixel end number in a range from 1 to sensor pixel
count.
Refer to Returning Calibration Results
and Errors on page 49 for details.
end of line sequence
els
i
Sets the end-of-line sequence:
0: Off
1: On
Refer to section 3.4.3 End-of-line
Sequence for details.
enable pixel coefficients
epc
i i
Sets whether pixel coefficients are
enabled or disabled.
The first parameter sets the FPN
coefficients where i is:
Refer to section Enabling and Disabling
Pixel Coefficients on page 49 for details.
get camera model
gcm
Reads the camera model number.
get camera parameters
gcp
Reads all of the camera parameters.
get camera serial
gcs
Read the camera serial number.
get camera version
gcv
Read the firmware version and FPGA
version.
get commands
get
Retrieves camera settings for the
command name specified.
Refer to Returning Camera Settings with
Get Commands on page 60 for details.
get fpn coeff
gfc
x
Read the FPN coefficient
i = pixel number to read in a range from
1 – sensor pixel count.
Refer to Returning Calibration Results
and Errors on page 49 for details.
get help
gh
Lists all of the available get commands.
get line
gl
x1 x2
Get a line of video (not including FPN
and PRNU coefficients) displaying one
pixel value after another and the
minimum, maximum, and mean value of
the sampled line.
x1 = Pixel start number
x2 = Pixel end number
in a range from 1 to sensor pixel count.
Refer to Returning a Single Line of Video
on page 54 for details.
Teledyne DALSA 03-032-10216-06
Piranha 3 User Manual
80
Command
Syntax
Parameters
Description
get line average
gla
x1 x2
Read the average of line samples.
x1 = Pixel start number
x2 = Pixel end number in a range from 1 to sensor pixel
count.
Refer to Returning Averaged Lines of
Video on page 45 for details.
get prnu coeff
gpc
i
Read the PRNU coefficient.
i = pixel number to read in a range from
1 to sensor pixel count.
Refer to Returning Calibration Results
Refer to section 3.6.5 Camera Frequency
Measurement for details.
get sensor serial
gss
Read the sensor serial number
help h
Display the online help. Refer to on page
24 for details.
load pixel coefficients
lpc
i
Loads the previously saved pixel
coefficients from non-volatile memory
where i is:
0 = Factory calibrated coefficients
1 = Coefficient set one
2 = Coefficient set tw o
3 = Coefficient set three
4 = Coefficient set four
Refer to 3.5.1 Saving and Restoring
PRNU and FPN Coefficients for details.
reset camera
rc
Reset the entire camera (reboot).
restore factory settings
rfs
Restor e the cam er a’s factor y settin gs.
FPN and PRNU coefficients reset to 0.
Refer to section 3.5 Saving and Restoring
Settings for d etails.
region of interest
roi
x1 y1 x2
y2
Sets the pixel range affected by the cag,
cao, gl, gla, ccf, and ccp commands. The
parameters are the pixel start and end
values (x) and the column start and end
values (y) in a range from 1 to sensor
pixel count. Refer to section 3.4.1 Setting
a Region of Interest (ROI:setting) for
details.
reset pixel coeffs
rpc
Reset the pixel coefficients to 0. Refer to
Resetting the Current Pixel Coefficients
on page 53 for details.
03-032-10216-06 Teledyne DALSA
Piranha 3 User Manual
81
Command
Syntax
Parameters
Description
restore user settings
rus
Restore the camera's last saved user
settings and FPN and PRNU coefficients.
Refer to section 3.5 Saving and Restoring
Settings for d etails.
set analog gain
sag
t f
Sets the analog offset.
t = Tap value. 0 for all taps or 1-8 for
ind ividual tap selection.
f= gain value specified from –10 to +10
Refer to Analog Signal Processing:
Setting Analog Gain and Offset on page
38 for details.
set analog offset
sao
t i
Sets the analog offset.
t = Tap value. 0 for all taps or 1-8 for
individual tap selection.
i= Offset value in a range from 0 to 255.
Offset increases with higher values.
Refer to Analog Signal Processing:
Setting Analog Gain and Offset on page
38 for details.
set baud rate
sbr
i
Set the speed of camera serial
communication port. Baud rates: 9600,
19200, 57600, and 115200. Default:
9600. Refer to section Setting Baud Rate
on page 24 for details.
set digital offset
sdo
t i
Subtracts the input value from the video
signal prior to FPN correction.
t = Tap value. 0 for all taps or 1 to 8 for
individual tap selection.
i = Offset in a range from 0 to 2048DN.
Refer to
Setting Digital Offset on page45 for
details.
set exposure mode
sem
m
Set the exposure mode:
2 = Internal SYNC, internal PRIN,
programmable line rate and exposure
time using commands ssf and set
3 = External SYNC, internal PRIN,
maximum exposure time
4 = Smart EXSYNC
5 = External SYNC and PRIN
6 = External SYNC, internal PRIN,
programmable exposure time
7 = Internal programmable SYNC,
maximum exposure time. Factory
setting.
8 = Internal SYNC, internal PRIN,
programmable exposure time. Maximum
line rate for exposure time.
set exposure time
set
f
Sets the exposure time. Refer to the
camera help screen (h command) for
allowable range.
Teledyne DALSA 03-032-10216-06
Piranha 3 User Manual
82
Command
Syntax
Parameters
Description
set fpn coeff
sfc
x i
Set the FPN coefficient.
x =pixel number within the range 1 to
sensor pixel count.
i= FPN value within the range 0 to
2048.
Refer to Setting a Pixel’s FPN Coefficient
on page 44 for details.
set fpn range
sfr
x x i
Set a range of pixel FPN coefficients
x=first pixel number of the range.
x =last pixel number of the range
i =coefficient value in a range from O to
2048.
Refer to Setting a Range of FPN
Coefficients on page 49 for details.
set low er threshold
slt
i
Sets the lower threshold that is checked
for and reported in the end -of-line
sequence in a value from 0-4095. Refer
to section 3.4.3 End-of-line Sequence for
details.
set output throughput
sot
m
This command works in conjunction
with the clm command and determines
the pixel rate of the camera.
320= 4 taps at 80MHz or 8 taps at
40MHz
This command is currently not
configurable in the Piranha 3 camera.
set prnu coeff
spc
x i
Set the PRNU coefficient.
x =pixel number within the range 1 to
sensor pixel count.
i= PRNU value within the range 0 to
28671.
Refer to on page 46 for details.
set prnu range
spr
i i x
Set a range of pixel PRNU coefficients
i=first pixel number of the range
i=last pixel number of the range
x=coefficient value in a range from 0 to
28671.
Refer to Setting a Range of PRNU
Coefficients on page 47 for details.
set pretrigger
spt
i
Set the pretrigger to a value from 0 to 16.
set subtract background
ssb
t i
Subtract the input value from the output
signal.
t = Tap value. 0 for all taps or 1 to 8 for
individual tap selection.
i = Subtracted value in a range from 0 to
4095.
Refer to on page 44 for details.
03-032-10216-06 Teledyne DALSA
Piranha 3 User Manual
83
Command
Syntax
Parameters
Description
set sync frequency
ssf
i
Set the frame rate to a value from:
12k: 300-23619Hz
8k: 300-33855Hz
Value rounded up/ dow n as required.
Refer to section 3.2.1 Exposure Mode,
Line Rate and Exposure Time for details.
set system gain
ssg
t i
Set the digital gain.
t = Tap value. 0 for all taps or 1 to 8 for
individual tap selection.
i = Gain value is specified from 0 to
65535. The digital video values are
multiplied by this number.
Refer to Setting Digital System Gain on
page 48 for details.
set upper threshold
sut
i
Set upper threshold that is check for and
reported in the end-of-line sequence to a
value from 0-4095. Refer to section 3.4.3
End-of-line Sequence for details.
set video mode
svm
i
Switch between normal video mode and
test patterns:
0: Normal video mode
1: 12 bit ramp test pattern
2: 8 bit step test pattern
Refer to section 3.6.1 Generating a Test
Pattern for details.
update gain reference
ugr
Changes the 0dB gain to equal the
current analog gain value set w ith the
sag command.
verify temperature
vt
Get the internal temperature of the
camera
verify voltage
vv
Get the camera input voltage
write FPN coefficients
wfc
i
Write all current FPN coefficients to
EEROM where i is:
1 = FPN coefficient set one
2 = FPN coefficient set two
3 = FPN coefficient set three
4 = FPN coefficient set four
Refer to section 3.5.1 Saving and
Restoring PRNU and FPN Coefficients
for details.
write pixel coeffs
wpc
i
Write all current PRNU coefficients to
EEROM where i is:
1 = PRNU coefficient set one
2 = PRNU coefficient set two
3 = PRNU coefficient set three
4 = PRNU coefficient set four
Refer to section 3.5.1 Saving and
Restoring PRNU and FPN Coefficients
for details.
Teledyne DALSA 03-032-10216-06
Piranha 3 User Manual
84
Command
Syntax
Parameters
Description
write user settings
wus
Write all of the user settings to EEROM.
Refer to section 3.5 Saving and Restoring
Settings for d etails.
03-032-10216-06 Teledyne DALSA
Piranha 3 User Manual
85
We,
Teledyne DALSA
605 McMurray Rd.,
Waterloo, ON
CANADA N2V 2E9
declare under sole responsibility, that the product(s):
FCC PART 15, SUBPART B, CLASS A
EUROPEAN CISPR 11:2004/EN 55011:2003
This product complies with the requirements of the Low Voltage Directive
73/ 23/ EEC and the EMC Directive 89/ 336/ EEC and carries the CE mark
accordingly.
CE and no-Pb stamps ad ded to front cover.
New parameter (4) added to command Correction Calibrate PRNU (cpa), pages
25, 46, and 79.
Two new commands added : Set FPN Range (sfr), and Set PRNU Range (spr),
pages 47, 49, and 83.
02
Tooling hole dimensions added to mechanical drawing, section 4.1 page 63.
Piranha 3 square option added to mechanicals section, section 4.1 page 63. Also
added to the Models table, page 8, and to the EMC declaration, page 85.
03
-Labels for power and control/ data connectors updated on the mechanicals.
New labels read: "Power 12 - 15V DC" and "Control & Data 1."
-Revised allowable line rate values, page 30. 12k: 2500-23619Hz and 8k: 250033855Hz.
- Reference to the camera with square body and heat sink (P3-87-12k40-01-00-R)
removed.
04
-Camera model names on cover revised to include all models.
-Input and output connectors figure, page 16, revised to include both camera
body models, slim and square.
-Revised model numbers added to mechanical interface diagrams, page 63.
-Measurement units (mm) added to mechanical diagrams.
05
Note ad ded to section 2.2.3 recommend ing a Camera Link cable no longer than
5 meters for lossless data transmission.
06
Camera mechanicals revised so that the sensor alignment is d one based on the
tooling holes in the camera's front plate. Mechanical illustration in the manuals
and datasheets revised to show the new alignment. Teledyne DALSA logo and
information also added.
Appendix D
Revision History
Teledyne DALSA 03-032-10216-06
Piranha 3 User Manual
88
03-032-10216-06 Teledyne DALSA
Piranha 3 User Manual
89
Index
Camera Link, 18
A
analog
gain, 38, 39, 40
offset, 40
processing, 34
applications, 8
B
background subtract, 47
baud rate
setting, 24
bright lines, 68
C
Hirose, 17
power, 17
D
dark calibration. See flat field
correction
dark patches, 69
data rate, 10
diagnostics, 54
digital
gain, 48
offset, 45
processing, 34
signal processing, 44
DVAL, 72
calibrating the camera, 35, 44,
45, 46
calibration. See flat field
correction
camera
control configuration, 72
control signals, 19, 72
messages, 75