
APDCAM User’s Guide
Page 27/32
3.6. Software
interface
Control of APDCAM is performed using the CamControl.dll Dynamic Link Library
for C++. To use the functions the CamControl.lib static library should be linked to the
program. The DLL was compiled with Microsoft Visual Studio 2005 Professional Edition
ENU Service Pack 1 (KB926601). Version 8.0.50727.762 (SP.050727-7600), Microsoft
.NET Framework Version 2.0.50727. To use the binaries MS XP Service pack 1 should
be installed. The software has been tested on MS XP, Vista and Windows 7.
From the software point of view APDCAM can be considered as two register tables
corresponding to the DAQ and the Control unit and additionally the Gbit communication
unit. The Gbit unit translates register read/write requests to/from UDP datagrams and
communicates with the two internal units. Additionally it receives 4 data streams from
the 4 8-channels ADCs in the DAQ card and packs them into UDP datagrams sent to 4
different sockets in the PC network interface. Sending of data can be enabled/disabled in
the Gbit interface. However, data transfer will actually happen when the DAQ unit starts
sending data that is, it encounters a trigger condition.
The table below lists the available functions in the DLL:
Function name
Description
open
Opens communication with the camera.
close
Closes communication with the camera.
writePDI
Write one or more registers in one of the camera modules.
readPDI
Read the contents of one or more registers in one of the cam-
era modules.
GetPdiIrqCount Return
the
number
of interrupt UDP datagrams received.
SendTS
Start data sending from the camera to the PC.
DontSendTS
Stop sending data from the camera to the PC.
Table 10. Functions of the camera control DLL.
To perform a measurement the user program should do the following. First the camera
should be opened, which opens sockets in the network interface. The identification codes
should be read from the ID registers of both the DAQ and the Control units and compared
to the values listed in the register tables. This step ensures that the communication is set
up with all elements of the camera. As the next step the desired operation mode of the
camera should be set by setting registers. PC memory should be allocated and locked in
memory to ensure that data can be received at maximum speed. Stream data transfer
should be enabled (SendTS) and data transfer should be enabled in the DAQ stream en-
able registers. The number of acquired data samples can be read from the sample count
registers of the DAQ module. Once the desired amount of data has been received it can
be read from the PC memory. The number of interrupts can be checked using the
GetPdiIrqCount call. If an interrupt happened conditions should be checked in the regis-
ters.