EDT PCIe Gen1 Framegrabbers User manual

User’s Guide
Camera Link PCI Express
(PCIe) Gen1 Framegrabbers
High-speed image capture for
Camera Link on PCIe platforms
Doc. 008-04053-00
Rev. 2012 March 16

EDT, Inc. ii
Engineering Design Team (EDT), Inc.
1400 NW Compton Drive, Suite 315
Beaverton, OR 97006
p 503-690-1234 / 800-435-4320
f 503-690-1243
www.edt.com
EDTTM and Engineering Design TeamTM are trademarks of Engineering Design Team, Inc. All other trademarks, service marks,
and copyrights are the property of their respective owners†.
© 1997-2012 Engineering Design Team, Inc. All rights reserved.
FCC Compliance: EDT devices described herein are in compliance with part 15 of the FCC Rules. Operation is subject to two
conditions: (1) The device may not cause harmful interference, and (2) the device must accept any interference received,
including interference that may cause undesired operation.
This equipment has been tested and found to comply with the limits for a Class A digital device, pursuant to part 15 of FCC Rules.
These limits are designed to provide reasonable protection against harmful interference in a commercial environment. This
equipment generates, uses, and can radiate radio frequency energy and, if not installed and used as described in the user’s
guide, may cause harmful interference to radio communications. Operating this equipment in a residential area is likely to cause
harmful interference, in which case the user will be required to correct the interference at his or her own expense.
Caution: Changes or modifications not expressly approved by Engineering Design Team, Inc. could void your warranty to
operate this equipment.

EDT, Inc. iii
Terms of Use Agreement
Definitions. This agreement, between Engineering Design Team, Inc. (“Seller”) and the user or distributor (“Buyer”), covers the
use and distribution of the following items provided by Seller: a) the binary and all provided source code for any and all device
drivers, software libraries, utilities, and example applications (collectively, “Software”); b) the binary and all provided source code
foranyand all configurable or programmable devices(collectively, “Firmware”); and c) the computer boardsandallotherphysical
components (collectively, “Hardware”). Software, Firmware, and Hardware are collectively referred to as “Products.” This
agreementalso covers Seller’s published Limited Warranty(“Warranty”) and all other published manuals and product information
in physical, electronic, or any other form (“Documentation”).
License. Seller grants Buyer the right to use or distribute Seller’s Software and Firmware Products solely to enable Seller’s
Hardware Products. Seller’s Softwareand Firmware mustbeused on the same computer as Seller’s Hardware. Seller’s Products
and Documentation are furnished under, and may be used only in accordance with, the terms of this agreement. By using or
distributing Seller’s Products and Documentation, Buyer agrees to the terms of this agreement, as well as any additional
agreements (such as a nondisclosure agreement) between Buyer and Seller.
Export Restrictions. Buyer will not permit Seller’s Software, Firmware, or Hardware to be sent to, or used in, any other country
except in compliance with applicable U.S. laws and regulations. For clarification or advice on such laws and regulations, Buyer
should contact: U.S. Department of Commerce, Export Division, Washington, D.C., 20230, U.S.A.
Limitation of Rights. Seller grants Buyer a royalty-free right to modify, reproduce, and distribute executable files using the
Seller’s Software and Firmware, provided that: a) the source code and executable files will be used only with Seller’s Hardware;
b)Buyeragrees to indemnify, hold harmless, and defendSeller fromand against any claims or lawsuits, including attorneys’ fees,
that arise or result from the use or distribution of Buyer’s products containing Seller’s Products. Seller’s Hardware may not be
copied or recreated in any form or by any means without Seller’s express written consent.
No Liability for Consequential Damages. In no event will Seller, its directors, officers, employees, or agents be liable to Buyer
for any consequential, incidental, or indirect damages (including damages for business interruptions, loss of business profits or
information, and the like) arising out of the use or inability to use the Products, even if Seller has been advised of the possibility
of such damages. Because some jurisdictions do not allow the exclusion or limitation of liability for consequential or incidental
damages, the above limitations may not apply to Buyer. Seller’s liability to Buyer for actual damages for any cause whatsoever,
and regardless of the form of the action (whether in contract, product liability, tort including negligence, or otherwise) will be
limited to fifty U.S. dollars ($50.00).
Limited Hardware Warranty. Seller warrants that the Hardware it manufactures and sells shall be free of defects in materials
and workmanship for a period of 12 months from date of shipment to initial Buyer. This warranty does not apply to any product
that is misused, abused, repaired, or otherwise modified by Buyer or others. Seller’s sole obligation for breach of this warranty
shall be to repair or replace (F.O.B. Seller’s plant, Beaverton, Oregon, USA) any goods that are found to be non-conforming or
defective as specified by Buyer within 30 days of discovery of any defect. Buyer shall bear all installation and transportation
expenses, and all other incidental expenses and damages.
Limitation of Liability. In no event shall Seller be liable for any type of special consequential, incidental, or penal damages,
whether such damages arise from, or are a result of, breach of contract, warranty, tort (including negligence), strict liability, or
otherwise. All references to damages herein shall include, but not be limited to: loss of profit or revenue; loss of use of the goods
or associated equipment; costs of substitute goods, equipment, or facilities; downtime costs; or claims for damages. Seller shall
not be liable for any loss, claim, expense, or damage caused by, contributed to, or arising out of the acts or omissions of Buyer,
whether negligent or otherwise.
No Other Warranties. Seller makes no other warranties, express or implied, including without limitation the implied warranties
of merchantability and fitness for a particular purpose, regarding Seller’s Products or Documentation. Seller does not warrant,
guarantee, or make any representations regarding the use or the results of the use of the Products or Documentation or their
correctness, accuracy, reliability, currentness, or otherwise. All risk related to the results and performance of the Products and
Documentation is assumed by Buyer. The exclusion of implied warranties is not permitted by some jurisdictions. The above
exclusion may not apply to Buyer.
Disclaimer. Seller’s Products and Documentation,including this document, are subject to change without notice. Documentation
does not represent a commitment from Seller.

EDT, Inc. iv
Contents
Camera Link PCI Express (PCIe) Gen1 Framegrabbers
Overview...................................................................................................................................................... 1
Included Files ........................................................................................................................................ 1
Power Over Camera Link (PoCL).......................................................................................................... 2
Related Resources................................................................................................................................ 2
Requirements............................................................................................................................................... 3
Installation.................................................................................................................................................... 3
Programming Interface................................................................................................................................. 4
Building or Rebuilding an Application.................................................................................................... 4
Setting the Camera Model ........................................................................................................................... 5
Image Capture and Display.......................................................................................................................... 6
Running PdvShow................................................................................................................................. 6
Compiling PdvShow .............................................................................................................................. 7
Units, Connectors, and Channels ................................................................................................................ 8
Serial Communication.................................................................................................................................. 9
At Initialization ....................................................................................................................................... 9
From Command Line............................................................................................................................. 9
From PdvShow...................................................................................................................................... 9
From a Camera Manufacturer’s Application.......................................................................................... 9
From Your Application......................................................................................................................... 10
Example and Utility Applications................................................................................................................ 10
pciload ................................................................................................................................................. 10
initcam ................................................................................................................................................. 10
take...................................................................................................................................................... 11
simple_take ......................................................................................................................................... 11
simplest_take....................................................................................................................................... 12
simple_sequence................................................................................................................................. 12
simple_irig2 ......................................................................................................................................... 12
serial_cmd ........................................................................................................................................... 12
dvinfo................................................................................................................................................... 13
Triggering................................................................................................................................................... 13
Freerun (Continuous) .......................................................................................................................... 14
Triggered by EDT Board...................................................................................................................... 14
Pulse-width Triggered (Controlled or Level)........................................................................................ 14
External Trigger Direct to Camera....................................................................................................... 14
External Trigger Pass-through............................................................................................................. 15
External Triggering Pins ...................................................................................................................... 15
Simulation and Testing............................................................................................................................... 15
Firmware.................................................................................................................................................... 17
Checking and Loading the Firmware................................................................................................... 17
Corrupted Firmware............................................................................................................................. 18
Troubleshooting ......................................................................................................................................... 20
Board Not Seen................................................................................................................................... 20
Problems With Software Installation.................................................................................................... 21
Corrupted Images, Slow Acquisition, Timeouts, Data Loss................................................................. 22
Problems With Bandwidth ................................................................................................................... 22
Problems Acquiring Images With EDT Applications............................................................................ 23
Problems With Your Applications ........................................................................................................ 24
Problems With Threads....................................................................................................................... 24
Problems With Firmware ..................................................................................................................... 24

EDT, Inc. v
Appendix A: Pin Assignments................................................................................................................................. 25
Appendix B: Board Diagrams.................................................................................................................................. 26
Standard and Fiberoptic (FOX) Framegrabbers – PCIe “DVa”-series....................................................... 26
PCIe8 DVa C-Link ............................................................................................................................... 26
PCIe4 DVa C-Link ............................................................................................................................... 26
PCIe4 DVa FOX .................................................................................................................................. 27
Legacy Framegrabbers – PCIe “DV”-series............................................................................................... 28
PCIe8 DV C-Link ................................................................................................................................. 28
PCIe4 DV C-Link ................................................................................................................................. 28
Additional External Inputs .......................................................................................................................... 29
Via Berg Connector or Optional Lemo Connector............................................................................... 29
Via Optional Cable Assembly.............................................................................................................. 30
Via Ribbon Cabling and D9 Connectors.............................................................................................. 31
Appendix C: Timestamping..................................................................................................................................... 32
Camera Configuration Directives............................................................................................................... 32
Footer Format ............................................................................................................................................ 32
IRIG API..................................................................................................................................................... 34
simple_irig2.c....................................................................................................................................... 34
libpdv.c ................................................................................................................................................ 34
pdv_irig.c, pdv_irig.h............................................................................................................................ 34
irigdump.c............................................................................................................................................ 35
Appendix D: VxWorks............................................................................................................................................. 36
Initialization ................................................................................................................................................ 36
Applications With and Without File Systems.............................................................................................. 36
Display Applications................................................................................................................................... 36
Portability ................................................................................................................................................... 36
Revision Log ........................................................................................................................................................... 38

Camera Link PCI Express (PCIe) Gen1 Framegrabbers Overview
EDT, Inc. 2012 March 16 1
Camera Link PCI Express (PCIe) Gen1
Framegrabbers
Overview
This guide covers current and legacy EDT Camera Link PCI Express (PCIe) Gen1 framegrabbers, which
provide fast image capture and DMA between an external Camera Link camera and a host computer.
Current products in this group are called the “DVa” series. This series includes:
PCIe8 DVa C-Link Current standard framegrabber for PCIe Gen1 (x8)
PCIe4 DVa C-Link Current standard framegrabber for PCIe Gen1 (x4)
PCIe4 DVa FOX Current fiberoptic framegrabber for PCIe Gen1 (x4)
Legacy products in this group are called the “DV” (with no “a”) series. This series includes:
PCIe8 DV C-Link Legacy standard framegrabber for PCIe Gen1 (x8)
PCIe4 DV C-Link Legacy standard framegrabber for PCIe Gen1 (x4)
Companion products to the above (not covered in this guide – see Related Resources on page 2) include:
EDT simulators Example: PCIe8 DVa CLS – for simulation of Camera Link image data
EDT fiber extenders Example: RCX C-Link – to extend Camera Link 100+ kilometers over fiber
EDT coax extenders Example: RCX C-Link Coax2 – to extend Camera Link 600 feet over coax
Included Files
For the products covered in this guide, your EDT installation package includes device drivers for supported
operating systems, as well as source code and binaries for:
• GUI capture and display application (pdvshow)
• Standalone initialization applications (initcam, camconfig)
• Command-line capture and display applications (take, simple_take, simplest_take, simple_*)
• Command-line serial communication tool (serial_cmd)
• Diagnostic tools (pciload, dvinfo, pdb)
• API libraries (libpdv, libedt, and associated source files)
• Makefiles for Windows (makefile.nt) and Linux / Mac OS (makefile)
• Camera configuration files (camera_config/*.cfg)
• Board firmware files (flash/* directories)
For detailed descriptions of selected programs, see Example and Utility Applications on page 10. For a
more comprehensive list of programs, see the README file in your EDT installation package. For additional
source code and header files, see the EDT library and API (Related Resources on page 2).

Camera Link PCI Express (PCIe) Gen1 Framegrabbers Overview
EDT, Inc. 2012 March 16 2
Power Over Camera Link (PoCL)
EDT PCIe “DVa”-series framegrabbers support Power Over Camera Link (PoCL) via polyfuse technology
using dedicated power.
When your board is shipped, PoCL is disabled. To enable PoCL, use the jumpers provided on the board,
as shown in Appendix B: Board Diagrams on page 26.
For details on PoCL pin assignments, see Appendix A: Pin Assignments on page 25.
Related Resources
To find product-specific information that is related to a particular EDT product, go to www.edt.com and open
the relevant product page to find links to that product’s datasheet (specifications) and user’s guide.
To find general technical information that is not related to a particular EDT product (for example, cable
pinouts for multiple products), go to www.edt.com and look in Product Documentation.
The resources below may be helpful or necessary for your applications.
EDT Resources
Description Detail Web link
• Documentation for each particular product Datasheets and user’s guides www.edt.com (find product page)
• User’s guide – legacy digital imaging products PCI products
AIA products
“ (Product Documentation)
• User’s guide – camera configuration (setup) Camera configuration guide “ (Product Documentation)
• User’s guide – firmware (setup) Firmware guide “ (Product Documentation)
• User’s guides for cabling and pinouts Cabling and pinouts for
PCI and PMC “ (Product Documentation)
• Application programming interface (API) HTML and PDF versions “ (Product Documentation)
• Installation packages (Windows, Linux, and
MacOS included; others by request Software / firmware
downloads “ (Product Documentation)
Standards / Specifications
Description Pertains to Documentation Web link
• PCI / PCIe PCI / PCIe bus PCI Special Interest Group
(PCI SIG) www.pcisig.com
• Camera Link Camera Link Machine Vision Online (MVO) www.machinevisiononline.org
• IRIG-B IRIG-B time code Inter-Range Instrumentation
Group, mod B irigb.com
CAUTION! Never plug a non-PoCL device (camera, cable, extender, etc.) into an EDT board that
has the PoCL jumpers in the “enabled” position. Doing so will cause a short – indicated by a red
LED (which may be obscured by your backpanel) on the back of the board, near the associated
connector – and may damage your equipment.

Camera Link PCI Express (PCIe) Gen1 Framegrabbers Requirements
EDT, Inc. 2012 March 16 3
Requirements
EDT framegrabbers are high-speed DMA devices that require adequate bandwidth for reliable operation.
The requirements will vary by camera(since different camerasrun at different speeds),so you should select
and configure your camera and system with the proper requirements in mind, as shown in Table 1.
Installation
For all supported operating systems (see Requirements on page 3), EDT provides installation packages,
available from two sources:
• The common installation disk that ships with all EDT products (with instructions on the disk sleeve); or
• Our archived and (frequently updated) current installation package downloads at www.edt.com (see
Related Resources on page 2).
NOTE To be sure that you are using the latest possible version of the appropriate installation package while
at the same time avoiding needless problems with version compatibility, EDT recommends:
— For a new application, download the latest package (see Related Resources on page 2).
— Forapplications thatutilize third-party software,use theversion ofthe EDTinstallation package that
the software was built with, or recompile / relink the application with the latest package (seeRelated
Resources on page 2).
Table 1. Requirements for I/O, bus type, throughput, cabling
Product name Input / output Bus type* Throughput Cabling** OS
Current series PCIe4 DVa FOX Camera Link in (over fiber) PCIe x4 Up to 680 MB/s Fiberoptic Windows,
(“DVa”) PCIe4 DVa C-Link Camera Link in Up to 510 MB/s Camera Link Linux, MacOS
PCIe8 DVa C-Link PCIe x8 Up to 1.2 GB/s (others
Legacy series PCIe4 DV C-Link Camera Link in PCIe x4 Up to 200 MB/s Camera Link by
(“DV” – no “a”) PCIe8 DV C-Link PCIe x8 Up to 1.2 GB/s request)
IMPORTANT NOTATIONS
* For bus type, follow these recommendations for optimal performance:
• Typically, these products will not work in a a bus slot dedicated to graphics cards.
• Typically, these products will work in a bus slot with more lanes than the number specified here, but not in a bus slot with fewer.
• Typically, although these products will work in a bus slot newer than PCIe Gen1 (such as PCIe Gen2 or Gen3), the resulting per-
formance still will not exceed Gen1 specifications.
For details on requirements and bandwidth issues, see Problems With Bandwidth on page 22.
**Cabling (standard or PoCL, as required) can be from EDT or a third party. For further documentation on cabling and pins, see
Related Resources on page 2 and Appendix A: Pin Assignments on page 25.

Camera Link PCI Express (PCIe) Gen1 Framegrabbers Programming Interface
EDT, Inc. 2012 March 16 4
To install your Camera Link PCIe framegrabber:
1. Uninstall any previously installed EDT installation packages.
2. Do one of the following:
— For Windows, Linux, or MacOS, followthe instructions on yourEDT installation disk sleeveor down-
load the latest package and instructions from www.edt.com (see Related Resources on page 2).
— For VxWorks, see Appendix D: VxWorks or www.edt.com/support.html, or contact EDT.
— For Solaris, contact EDT.
3. To install the board into your computer, follow the instructions from the board manufacturer.
4. Cable the board to the camera, using the cabling specified in Requirements on page 3.
5. To verify that the driver installed successfully and that the board is recognized, run pciload from the
command line (for details on pciload, see Example and Utility Applications on page 10).
Programming Interface
EDT provides a common application programming interface (API) for all supported operating systems, so
anapplication written forone EDT digitalimagingproduct willworkwith the otherswith minimalmodification;
any exceptions – such as differences between Windows, Linux, and MacOS – will be noted in this guide.
To interface to the Camera Link PCIe board, use subroutines from the EDT digital imaging library and, if
necessary, from the EDT DMA library; routines in both libraries are documented in the EDT API.
• The EDT digital imaging library provides a C language interface to your Camera Link PCIe board, and
it also handles error recovery, bookkeeping, and camera shutter triggering and timing. EDT recom-
mends using it for all programming specific to Camera Link PCIe products.
• The lower-level EDT DMA library edt_ subroutines should be accessed directly only when they provide
needed functionality that is not provided in the EDT digital imaging library.
All of these resources are provided in your EDT installation package (see Related Resources on page 2).
Building or Rebuilding an Application
Bydefault,EDT’sinstallation packageis copied intothe directory C:\EDT\pdv (Windows)or /opt/EDTpdv
(Linux / Mac OS). The package includes executables and C source code for all examples, diagnostics, and
utilities. If you want to rebuild a program, you’ll need to use a compiler and either the nmake application (for
Visual Studio 6.0 or later) or the Unix make utility, as described below.
1. Do one of the following:
— For Windows, run Pdv Utilities.
— For Linux or Mac OS, navigate to the installation directory in a terminal window.
2. Enter...
make file
...where file is the name of the example program you wish to build.
3. To rebuild the examples, utilities, and diagnostics, navigate to the installation directory and run...
make
...or, on Windows, as an alternative you can use the included Visual Studio 2008 project.

Camera Link PCI Express (PCIe) Gen1 Framegrabbers Setting the Camera Model
EDT, Inc. 2012 March 16 5
Setting the Camera Model
After installing the board and its driver, configure it for the camera you will use.
Your EDT installation package provides example configuration files for various camera models; if no file is
provided for your camera, or if you wish to modify the directives of an existing configuration file, consult the
EDT Camera Configuration Guide (see Related Resources on page 2).
NOTE For a medium- or full-mode camera, you may need to first reprogram the flash memory for medium- or
full-mode operation. For details, see Table 4 on page 18.
Next, initialize (configure) the driver for your camera model, using one of the methods in Table 2.
Table 2. Initialization Methods by Operating System
OS PdvShow Command line
Windows To configure the driver for your camera:
1. Double-click the PdvShow desktop icon.
2. In dialog box, select your camera model.
3. Click OK.
To reconfigure for a different camera or operating mode:
1. Double-click the PdvShow desktop icon.
2. Execute Camera > Setup.
3. In dialog box, select your camera model.
4. Click OK.
Use the initcam utility. At a command prompt, enter...
initcam -f camera_config/file.cfg
...where file is the name of the camera configuration file that matches
your camera model and operating mode.
This utility optionally lets you specify a unit (-u flag) and DMA channel
(-c flag). Thus, if you wish to configure the camera on DMA channel 1,
but not the camera on DMA channel 0, enter...
initcam -u camera_config/file.cfg
initcam -u 0 -c 1 -f camera_config/file.cfg
See the application initcam (in this guide) and the Camera Configu-
ration Guide (Related Resources).
Linux or
Mac OS To configure the driver for your camera:
1. Navigate to the installation directory...
/opt/EDTpdv.
2. At the prompt, enter...
camconfig
3. In dialog box, select your camera model.
4. Click OK.
To reconfigure for a different camera model or operating
mode, rerun camconfig.
Follow the above procedure for Windows.
NOTE:Ifyou do nothave “.”inyour path,you’llneed toprecedecommands
with “./” as in the example below.
Example:
./initcam -f camera_config/file.cfg
VxWorks See Appendix D: VxWorks or www.edt.com/support.html, or contact EDT.
Other Contact EDT.

Camera Link PCI Express (PCIe) Gen1 Framegrabbers Image Capture and Display
EDT, Inc. 2012 March 16 6
Image Capture and Display
For capturing and displaying images, your EDT software contains a GUI in an application called PdvShow.
The Windows version of this GUI is shown in Figure 1.
Figure 1. Windows GUI for PdvShow
Running PdvShow
To run PdvShow...
• For Windows, double-click the PdvShow desktop icon, or enter pdvshow at a command-line prompt.
• For Linux, run make pdvshow to build the FLTK application, and then enter pdvshow at the prompt.
• For Mac OS, there is no PdvShow, but you can experiment by exploring this user’s guide and the
pdv_flshow subdirectory of the main distribution directory (by default, /opt/EDTpdv).
The command-line invocation allows you to specify options – for example...
pdvshow -pdvU_C
...where U is the unit number (useful if you have more than one Camera Link PCIe device) and C is the
DMA channel number for multichannel devices. For example...
pdvshow -pdv0_1
...runs PdvShow using board 0, DMA channel 1. This is useful if, for example, you are using one board with
two base-mode cameras, and you want PdvShow to access the camera on DMA channel 1.
NOTE In Windows, the command line is a property of the icon.To use an icon to access a unit or DMA channel
other than 0 (the default): copy and rename the PdvShow icon; then change its shortcut properties to
use the command line with the option -pdvU_C where U is the unit and C is the DMA channel.

Camera Link PCI Express (PCIe) Gen1 Framegrabbers Image Capture and Display
EDT, Inc. 2012 March 16 7
For demonstration or debugging purposes, you can run this application when no board is installed in the
system; the image window then shows a test pattern. To do so, at the command line, enter...
initcam -u dmy0 -f configuration_file
pdvshow -dmy0
If you have not yet initialized the driver, select your camera or simulator from the list and click OK.
If the image window shows incorrect data (usually because the camera model has been changed since the
last driver initialization), select Camera > Setup to select the correct camera model.
To access camera controls, use the PdvShow toolbar and menus. For details, see PdvShow Help.
Compiling PdvShow
To experiment with example code in this application, use the source code indicated below.
• For Windows, look in pdvshow in the appropriate Visual Studio project subfolder. For details, see the
README file in the pdvshow subfolder of the main distribution folder (by default, C:\EDT\Pdv).
NOTE The pdvshow executable comes already built on Windows distributions, so you need not compile it
unless you wish to experiment with the source code.
• For Linux, see the source code and the README file in the pdv_flshow subdirectory of the main dis-
tribution directory (by default, /opt/EDTpdv).
• For Mac OS, there is no PdvShow, but you can experiment by exploring the information in this guide.
For more about the cross-platform FLTK-based version of PdvShow, see README in the pdv_flshow
subdirectory of the main distribution directory (by default, /opt/EDTpdv).
If the open-source FTLK library (required by pdv_flshow) is not installed, make pdvshow will try to install
it. If the installation fails, you will need to install FLTK 1.1.9 by hand.
To install FLTK 1.1.9:
1. In pdv_flshow, open fltk-1.1.9-source.tar.gz and run...
gunzip fltk-1.1.9-source.tar.gz
tar –xf fltk-1.1.9-source.tar
...to install fltk-1.1.9.
2. In fltk-1.1.9, run...
make
make install
3. In pdv_flshow, run...
make pdvshow

Camera Link PCI Express (PCIe) Gen1 Framegrabbers Units, Connectors, and Channels
EDT, Inc. 2012 March 16 8
Units, Connectors, and Channels
This section covers how to work with multiple units, connectors, and channels, which are defined as follows:
unit EDT product (board)
connector physical connector (for example, a fiberoptic or MDR26 connector)
channel DMA channel or, sometimes, simulation channel
Typically, an EDT Camera Link (C-Link) board has two MDR26 connectors and one simulation channel,
while an EDT fiberoptic (FOX) board has one to four fiberoptic connectors with no simulation channel.
In base mode, each camera requires one connector on the EDT board, and each connector provides one
DMA channel. Thus, in base mode, an EDT framegrabber with two connectors has two DMA channels.
In medium or full mode, each camera requires two connectors on the EDT board. In this case, the two
connectors work together to support one DMA channel.
NOTE In EDT hardware, the connectors are labeled 0 and 1 on some boards, but 1 and 2 on others.
Regardless of the labels on the hardware, the software always counts the connectors in order as 0
(primary), 1 (secondary), and so on, with 0 being the connector closest to the PCIe bus.
If you install one board in your host system, the system will assign the default unit number (0) to that board.
If you install multiple boards, the system will assign a unique unit number to each board, starting with 0 (the
sequence is system-dependent). Typically, the unit number is an argument when invoking an application
(such as take or pdvshow) or a parameter passed into one of the EDT subroutines.
Figure 2 shows an example of how the software numbers the units (boards) and connectors. The default for
the first unit number, connector number, and DMA channel number is always 0, with additional units,
connectors, and DMA channels numbered as 1, 2, and so on.
Figure 2. Example of Unit Numbering and Connector Numbering
If your EDT board is connected to multiple cameras, the software provides a unique handle to represent
each camera. Unless you specify a different unit number, DMA channel number, or both, any application
(either your own or EDT’s) seeking access to the cameras will default to unit 0, connector 0.
Unit 0,
Connector 0
(primary)
Unit 0,
Connector 1
(secondary)
Unit 1,
Connector 0
(primary)
Unit 1,
Connector 1
(secondary)
Unit ordering is system-dependent, starting with unit 0.
Connector ordering always starts with the connector nearest
the PCIe bus, which EDT software always calls connector 0.

Camera Link PCI Express (PCIe) Gen1 Framegrabbers Serial Communication
EDT, Inc. 2012 March 16 9
The way that you address the appropriate unit and DMA channel will depend on what you are doing.
• For pdvshow, use the argument -pdvU_C. For details, see Image Capture and Display on page 6.
• For EDT example and utility applications, use the arguments -u unit and -c channel (see Exam-
ple and Utility Applications).
• For EDT API, use pdv_open_channel(..., unit,channel). For each device, the open routine will
return a pointer to the structure that represents the opened device (unit and DMA channel); this pointer
appears in EDT examples and documentation as pdv_p. Each unit / channel combination can be
opened and manipulated independently by passing the appropriate pointer to the library subroutines.
For details, see the EDT API (Related Resources on page 2).
Serial Communication
Most cameras have a manufacturer-defined serial command set for camera control and status. To utilize
this capability, EDT boards implement serial transmit and receive using standard serial lines as defined by
the Camera Link specification. You can use serial communication in a number of ways, as discussed below.
At Initialization
As mentioned in Setting the Camera Model on page 5, the initialization process uses directives in a
configuration file to set the board registers and the driver variables to match your camera model and your
operating mode. Additional directives (especially serial_baud, serial_init, serial_binit, and
other serial_* directives) can be used to send serial commands when the system is initialized. These are
described in the EDT Camera Configuration Guide (see Related Resources on page 2).
EDT provides several example configuration files that contain the serial commands needed to put a camera
into the desired mode. You can edit these commands or copy them to a new configuration file.
For suggestions, see comments in the example configuration files camera_config/genericXcl.cfg
(where Xis replaced by a specific bits-per-pixel value – for example, generic8cl.cfg) in the EDT
installation package.
From Command Line
The command-line utility serial_cmd, described in serial_cmd on page 12, allows you to send serial
commands to a camera and receive its response, in either ASCII or hexadecimal format. Command-line
help also can be accessed by entering serial_cmd --help.
If you wish to incorporate this functionality in your own application, see the source code provided in
serial_cmd.c in the EDT installation package.
From PdvShow
In the PdvShow application, in the Camera menu, select Programming. The resulting dialog allows you to
send and receive serial commands from the camera. For details, see Image Capture and Display on page 6.
From a Camera Manufacturer’s Application
Most Camera Link camera makers supply a Windows-based graphical camera control application that lets
yousend andreceiveserial commandsusing aframegrabber-specificserialdynamiclink library(DLL). Your

Camera Link PCI Express (PCIe) Gen1 Framegrabbers Example and Utility Applications
EDT, Inc. 2012 March 16 10
EDT installation package provides a DLL named clseredt.dll which, per the Camera Link 2.0
specification, is installed at:
•%PROGRAMFILES%\Cameralink\Serial (64-bit version); or
•%PROGRAMFILES(X86)%\CameraLink\Serial (32-bit version)
Camera GUIs typically provide some method for specifying the DLL pathname; for details, see your camera
documentation.
If it becomes necessary to rename the file or copy it to a different location, be sure to recopy any newer
versions of the file to the appropriate location when you reinstall the EDT installation package.
From Your Application
To see all of the routines needed for user applications to send and receive serial commands: In the EDT
API (see Related Resources on page 2), follow the link to the EDT Digital Imaging Library, and then —
under Modules at the bottom of the page — to Communications / Control.
Example and Utility Applications
EDT provides a variety of example, utility, and diagnostic applications. All can be run from the command
line, using Unix-style options and arguments.
To help those developing Camera Link PCIe applications, C source code is provided for all the examples.
The source code file is the name of the application with a .c extension (e.g., “take.c”).
For those just beginning, we recommend starting with the source for simple_take or simplest_take,
as those applications are the easiest to understand.
The most commonly useful options for these programs are described below. Placeholders shown in italics
should be replaced with your own values.
For a complete list of usage options, at the command line, enter the application name with the --help
option to display the help message.
pciloadUsed to query the boards or, optionally, to update and verify the board’s flash PROM. After installation, you
may want to run pciload with no arguments and review the output to help verify that the board and driver
did install correctly. To use pciload to update and verify the flash PROM, see Firmware on page 17.
initcamCommand-line utility that initializes the board and device driver for a specific camera. It initializes board
registers; sets various parameters (width, height, depth, etc.) to specific values; and optionally sends serial
initializationcommandsto thecamera fromthe referencedconfigurationfile. TheEDT configurationfiles are
in your installation directory under camera_config. The EDT camera selector GUI applications (e.g.
pdvshow, camconfig) are simply wrappers to provide a way to select the correct file, then shell out to call
initcam. To initialize from your own application code, you can use initcam.c as example code. For a
detailed description of configuration files and directives, consult the Camera Configuration Guide (see
Related Resources on page 2).
Several of the most useful options are...
-f pathname The (required) name of the configuration file to use for initialization.
-u unit The unit number, if multiple boards are installed; default is 0 (first board).

Camera Link PCI Express (PCIe) Gen1 Framegrabbers Example and Utility Applications
EDT, Inc. 2012 March 16 11
-c channel The DMA channel, on multichannel boards; default is 0 (first channel).
Example:
initcam -f camera_config/generic8cl.cfg
take Used to acquire images and (optionally) save them to files. Though it does not display the images, it does
provide many other options, making it a useful diagnostic tool. The source also shows how to change
camera settings such as integration time; tune image acquisition in certain ways; and detect errors.
Several of the most useful options are:
-b file The base name of the file in which to save the image, in Sun raster format
on Linux or Mac OS systems, or in Windows bitmap format on Windows
systems (note – in EDT software packages later than 5.3.3.3, this option
always will create files in Windows bitmap format, regardless of which
operating system you are using). If only one image is taken, this is the
filename; otherwise a two-digit number is appended to each file, starting
with 00. The appropriate suffix is automatically added.
-c channel The DMA channel, on multichannel boards; default is 0 (first channel).
-f file The name of the file in which to save the image, in raw format. The file
includes only raw image data, with no formatting information.
-l loopcount The number of consecutive pictures you wish to take. The default is one.
-N numbufs The number of ring buffers (default is 1). A ring buffer is a portion of host
memory preallocated for DMA and used in round-robin fashion. A setting
of four optimizes pipelining — one ring buffer currently acquiring data, one
ready for data, one getting ready, and one backup.
-u unit The unit number, if multiple boards are installed; default is 0 (first board).
-v Turns on verbose mode. The default is off.
Example: To acquire 100 images as quickly as possible using four ring buffers without saving to files, enter:
take -N 4 -l 100
Example: If you have one PCIe8 DVa C-Link board connected to two base-mode cameras, and you wish
take to use the camera on DMA channel 1, enter:
take -u 0 -c 1 -N 4 -l 100
simple_take
Shows how to use the API to acquire images from a camera connected to the Camera Link PCIe board and
(optionally) save the images to files.
To add image acquisition to an application, EDT recommends starting with this example, which shows how
to use the ring buffer routines to improve performance by pipelining image acquisition and processing.
Several of the most useful options are:
-b file The base name of the file in which to save the image, in Sun raster format
on Linux or Mac OS systems, or in Windows bitmap format on Windows
systems (note – in EDT software packages later than 5.3.3.3, this option
always will create files in Windows bitmap format, regardless of which
operating system you are using). If only one image is taken, this is the
filename; otherwise a two-digit number is appended to each file, starting
with 00. The appropriate suffix is automatically added.

Camera Link PCI Express (PCIe) Gen1 Framegrabbers Example and Utility Applications
EDT, Inc. 2012 March 16 12
-c channel The DMA channel, on multichannel boards; default is 0 (first channel).
-l loopcount The number of consecutive pictures you wish to take. The default is one.
-N numbufs The number of ring buffers — by default, one. (A ring buffer is a portion of
host memory preallocated for DMA and used in round-robin fashion.) A
setting of four optimizes pipelining — one ring buffer currently acquiring
data, one ready for data, one getting ready, and one backup.
-u unit The unit number, if multiple boards are installed; default is 0 (first board).
Example: To acquire four images as fast as possible using four ring buffers, saving each to files named
picture00.bmp through picture03.bmp on Windows (or .ras on Linux / Mac OS), enter...
simple_take -N 4 -l 4 -b picture
simplest_take
Thesimplest exampleapplication.It setsup fourring buffersandacquires asingleimage, withno pipelining.
simplest_take accepts an optional argument of a file name to which to save the image. If no name is
supplied, it reports a successful image acquisition, or any errors that occurred — useful for testing.
Example: To acquire an image and save it to a file named pic.bmp, enter...
simplest_take -b pic.bmp
simple_sequence
Like simple_take but, instead of capturing and saving one file at a time, it captures a finite number of
images (limited to available memory) into memory and then writes them all out at once. See simple_take
for the most commonly used options.
simple_irig2
Example of capturing images using the IRIG2 timestamp header. Can be useful even if an IRIG time signal
is not present, since it can be used to "tag" the beginning of an image with an image count and magic
number – to verify that image data has not been lost (loss of sync detection). See simple_take for the
most commonly used options.
serial_cmd
Sends serial commands to a camera through the board, using calls to routines in the API. By default, the
application starts in command mode: the final argument to serial_cmd is the command to send to the
camera. Delimit this command with either single or double quotation marks, but be consistent. For example:
serial_cmd "MDE?"
If you omit the command argument, the application enters interactive mode, in which you can type one
command per line. To quit the application, enter Control-C.
Several of the most useful options are:
-c channel The DMA channel, on multichannel boards; default is 0 (first channel).
-u unit The unit number, if multiple boards are installed; default is 0 (first board).
-x Treats the command argument as a hexadecimal number, which is sent to
the camera without terminating nulls or carriage returns. The default is
ASCII with a terminating carriage return added.

Camera Link PCI Express (PCIe) Gen1 Framegrabbers Triggering
EDT, Inc. 2012 March 16 13
Example (command mode usage):
% serial_cmd "MDE?" (Redlake "Query Mode" command)
MDE TR (camera response)
%
Example (interactive mode usage):
% serial_cmd
>MDE? (Redlake "Query Mode" command)
MDE TR (camera response)
>
% serial_cmd -x (for hexadecimal arguments)
> 03 06 02 (camera-dependent command)
> Control-C (end the program)
To access a camera on DMA channel 1, enter:
% serial_cmd -u 0 -c 1 "MDE?"
(Redlake "Query Mode" command)
MDE TR (camera response)
%
dvinfo Gathers board-specific and system-specific technical data, runs several diagnostics, and writes the results
to dvinfo.out in the current directory. Use the resulting ASCII text file to diagnose problems yourself, or
send the file to EDT for technical support.
To run dvinfo:
1. Connect and power on the camera.
2. If possible, initialize the board with initcam or pdvshow.
3. Make sure no other PDV applications (such as pdvshow) are running.
4. Run dvinfo.
One useful option is:
-u unit The unit number, if multiple boards are installed; default is 0 (first board).
Triggering
This section describes the most common triggering methods for your Camera Link PCIe board, as well as
each mode’s configuration file directives, serial control commands, and software considerations. You can
change trigger modes either directly in your application, or by using configuration file directives.
• For details on camera configuration directives, see the EDT Camera Configuration Guide (Related Re-
sources on page 2).
• For details on specific serial control commands, see your camera manual.
By default, most cameras power up in continuous (also calledfreerun) mode, sending images continuously.
For most cameras, EDT provides configuration files for freerun mode. For some cameras, EDT also
providesconfigurationfilesfor internaltriggered,externaltriggered,or pulse-widthmode.Allof thesemodes
and configuration details are described below.

Camera Link PCI Express (PCIe) Gen1 Framegrabbers Triggering
EDT, Inc. 2012 March 16 14
Freerun (Continuous)
In this mode, the camera acquires images continuously without waiting for a trigger signal.
Triggered by EDT Board
In this mode, the camera waits for a trigger signal from your EDT board before acquiring an image.
Pulse-width Triggered (Controlled or Level)
In this mode, exposure duration is determined by how long the EXPOSE line is held TRUE (high).
For cameras with very fast shutters that accept exposure times in microseconds, another configuration file
directive tells pdv_set_exposure to use microseconds instead of milliseconds.
External Trigger Direct to Camera
With this method, the trigger is sent from an external source directly to the camera, bypassing the board.
The camera and board can be configured as in freerun mode; however, depending on timing, your
application may time out and fail to receive images. You can avoid timeouts in either of two ways:
• If the maximum period of time betweentriggering signals isknown, configure the user_timeout period
in the software for a large enough value to avoid timeouts.
• If application blocking is acceptable, configure the user_timeout period in the software for an infinite
period (user_timeout=0) to ensure that the application waits until an image arrives.
Be sure to comply with Requirements on page 3. If you have trouble, consult Troubleshooting on page 20.
Configuration file directives: MODE_CNTL_NORM: 00 (default)
serial_init: as needed to set freerun mode (usually not necessary because
most cameras power up in freerun by default)
Configuration file directives: MODE_CNTL_NORM: 10
serial_init: as needed to put the camera in triggered mode
Configuration file directives: MODE_CNTL_NORM: 10
method_camera_shutter_timing: AIA_MCL
serial_init: as needed to put the camera in pulse-width mode
API subroutine: pdv_set_exposure, millisecond units, range 0–25500
Configuration file directive: MODE_CNTL_NORM: 10
method_camera_shutter_timing: AIA_MCL_100US
serial_init: as needed to put the camera in pulse-width mode
API subroutine: pdv_set_exposure, microsecond units, range 0–25500
Configuration file directive: MODE_CNTL_NORM: 00
user_timeout asneededto ensurethatyourapplication does not time out while
waiting for an image
API subroutine: pdv_set_timeout, millisecond units

Camera Link PCI Express (PCIe) Gen1 Framegrabbers Simulation and Testing
EDT, Inc. 2012 March 16 15
External Trigger Pass-through
With this method, a trigger is sent from an external device to the board, and from the board to the camera.
A TTL signal is input to the board, which in turn sends out an LVDS or RS422 signal (depending on the
board and its configuration) to the camera trigger line, typically CC1.
The software timeout considerations are the same as those under External Trigger Direct to Camera.
Be sure to comply with Requirements on page 3. If you have trouble, consult Troubleshooting on page 20.
External Triggering Pins
The pins to which you connect the trigger source are shown in Appendix B: Board Diagrams.
With two cameras, trigger input 0 can trigger both cameras, or triggers 0 and 1 can trigger cameras 0 and
1 independently; for details, see configuration file directives (above).
Fire the trigger by applying a TTL signal lasting at least 10 microseconds to these pins, which in turn send
a signal of the appropriate level to the camera trigger line, typically CC1. The trigger cable can drive either
pin high with respect to the other; no particular polarity is required.
The two pins of each trigger drive a Vishay SFH6206 optocoupler through a 130-series resistor. This
optocoupler is provided to allow coupling to electromechanical systems in which major ground spikes can
occur when electrical devices such as motors, for example, turn on or off.
Simulation and Testing
EDT Camera Link PCIe boards (excluding the FOX boards) include a channel 2 simulator for generating
sample data with no camera attached to the board (useful for testing the board hardware). This channel
uses a simple counter to generate 16-bit pixel data; pixels start black and fade to white, as in Figure 3.
Configuration file directives: MODE_CNTL_NORM: A0
CL_CFG2_NORM as needed to set separate or combined triggers from trigger 0
pins
user_timeout asneededto ensurethatyourapplication does not time out while
waiting for an image
API subroutine: pdv_set_timeout, millisecond units
Table of contents
Popular Computer Hardware manuals by other brands

Texas Instruments
Texas Instruments C2000 Piccolo LaunchPad user guide

Panasonic
Panasonic TY-SB01QS operating instructions

HighPoint
HighPoint RocketAIC 7505HW Series Quick installation guide

JETWAY
JETWAY MI02 Series user manual

Panasonic
Panasonic UB-5335 operating instructions

Brainboxes
Brainboxes BL-500 installation guide

Adata
Adata XPG LEVANTE 360 quick start guide

Espressif Systems
Espressif Systems ESP32-S2-WROOM user manual

Airelectronics
Airelectronics U-Ground user manual

Renesas
Renesas User System Interface Board HS1664ECH61H user manual

AQUANTIA
AQUANTIA AQtion AQC111U quick start guide

ASROCK
ASROCK MARVELL SATA3 RAID quick guide