![EDT VisionLink F Series User Manual Download Page 21](http://html1.mh-extra.com/html/edt/visionlink-f-series/visionlink-f-series_user-manual_2362803021.webp)
EDT, Inc.
2019 April 29
21
VisionLink F-series
Programming
To use the channel 2 simulator with your own application...
1.
Use the initialization application
initcam,
specifying channel 2 and the camera configuration file for your cam-
era. From a command prompt, enter...
initcam -c 2 -f camera_config/
yourCamera
.cfg
...replacing
yourCamera
with the appropriate configuration file name for your camera and application.
NOTE
For general testing, use one of the
generic
XX
cl.cfg
files provided with your board.
2.
Open the device with a call to
pdv_open_channel
and pass it
NULL
for the device, your value for the unit
number (board), and 2 for the channel
–
as in this example (showing a unit number of 0)...
PdvDev *pdv_p = pdv_open_channel(NULL, 0, 2);
The pointer returned from this call points to the simulated data; any image acquisition calls, such as
pdv_wait_image,
that pass this pointer will access the simulated data.
Because data is generated as fast as possible, you can also use the channel 2 simulator to measure the maximum bus
bandwidth, using the utility application
cl_speed.
This utility takes the unit number as an argument and begins
channel 2 simulation on the specified board; it then reports the data speeds achieved.
Programming
EDT installation packages include libraries, examples and C / C++ source code that can be used by programmers to
modify and develop applications for EDT VisionLink frame grabbers and related devices.
EDT provides a common application programming interface (API) for all supported operating systems, so an application
written for one EDT product is designed to work with other EDT products with minimal modification; any exceptions
–
such as for various operating systems
–
are noted in this guide.
NOTE
To interface to the VisionLink board, use subroutines from the EDT digital imaging library (
libpdv
) and, if
necessary, from the EDT DMA library (
libedt
); routines in both libraries are documented in the EDT API.
—
The EDT digital imaging library
pdv_
subroutines provide a C language interface to your VisionLink board,
and it also handles error recovery, bookkeeping, and camera shutter triggering and timing. EDT recommends
using it for all programming specific to VisionLink products.
—
The lower-level EDT DMA library
edt_
subroutines should be accessed directly only when they provide need-
ed functionality that is not provided in the EDT digital imaging library.
All of these resources are provided in your EDT installation package (see
.
Building or Rebuilding an Application
EDT’s
installation package includes C source and executables for all of the provided examples, diagnostics, and utilities.
To build or rebuild a program, use a build method which is appropriate for your operating system, as shown in
Table 6
.
NOTE
Applications which access EDT boards must be compiled and linked to match the platform in use (32- or 64-bit).
Applications linked with 32-bit EDT libraries will not run correctly on 64-bit systems, or vice versa. The EDT driver
/ software installation script detects whether the system is running 32- or 64-bit, and installs the appropriate files.