
APDCAM User’s Guide
Page 28/32
Declaration of DLL functions can be found in CamControl.h. Detailed use of the DLL
calls is the following.
open
Declaration:
CAMCONTROL_API
int
open(
unsigned
int
ipAddress);
Description:
This call opens the sockets for communication. The ipAddress argument is the IP addres
of the camera, each 8 bits correspond to one subnet address, eg. the default camera ad-
dress is translated to:
10.123.13.101 -> 10<<24 + 123<<16 + 13<<8 + 10 = 175836517
close
Declaration:
CAMCONTROL_API
int
close();
Description:
This call closes the communication to the camera and closes the sockets.
writePDI
Declaration:
CAMCONTROL_API
int
writePDI(
unsigned
char
address,
unsigned
int
subaddress,
unsigned
int
noofbytes,
unsigned
char
*pData);
Description:
This call performs a register write operation. Parameter
address
is the module address;
1 is for the DAQ module, 2 is for the Control module.
subaddrss
is the start address of
the register which should be written, while noofbytes is the number of bytes to be written
and *PData is the pointer to the data to be written. If the return value is less than 0 then
an error occurred.
readPDI
Declaration:
CAMCONTROL_API
int
readPDI(
unsigned
char
address,
unsigned
int
subaddress,
unsigned
int
noofbytes,
unsigned
char
*pData);
Description:
The parameters have identical meaning than for writePDI, but the registers are not written
but their contents are read from APDCAM. If the return value is less than 0 then an error
occurred.
GetPdiIrqCount
Declaration:
CAMCONTROL_API
int
GetPdiIrqCount();
Description:
This call reads the interrupt counter register in the DLL. Interrupts happen in the DAQ
and ADC modules on certain conditions, but the interrupt does not contain any informa-
tion on what happened. As the camera operates autonomously interrupts are of limited
use, they make detection of unexpected conditions easier.