Configuring the Camera
Basler A400k
4-45
DRAFT
4.3
Using Binary Read/Write Commands
on the A400k
As explained in Section
, each A400k camera has control and status registers with one or more
fields that are used to set the values for parameters associated with a camera feature. For
example, the stamp control register has several fields used to set the parameters associated with
the stamp feature. By writing values to fields in the control registers, you configure the camera and
control how it operates. By reading values from fields in the control registers, you can determine
how the camera is currently configured.
Each camera also has inquiry registers with fields that contain basic information such as the
camera’s serial number and software version numbers. By reading values in the inquiry register
fields, you can determine some basic information about the camera.
A “binary read/write command” protocol has been developed for use with A400k cameras.
You can read the data in a register field by sending a binary read command to the camera. For
example, you can use a read command to determine the current value of the Enable field of the
Test Image control and status register (see page
). When you issue a read command to the
camera, the camera responds by sending the requested data back to the host computer.
You can write data to a register field by sending a write command to the camera. For example,
you can use a write command to change the value of the Enable field of the Test Image control
register. When you issue a write command to the camera, the value in the register field will be
replaced and the camera will send a write
response back to the host computer.
Each field within a control register or an inquiry register has a specific memory address. When you
issue a binary read or a binary write command, the address for field you want to work with is
included as part of the command. Section
describes the binary read/write command format
in detail. Section
provides code samples for a binary read and a binary write command.
Binary read/write commands are issued to the A400k via the RS-644 serial connection in the
Camera Link interface between the frame grabber and the camera. A standard application
programmer’s interface (API) for asynchronous serial reading and writing via the RS-644 port on
the frame grabber has been defined in the Camera Link standard (Appendix B, API Functions). All
Camera Link compatible frame grabbers provide a software library (.dll file) named clser***.dll
where *** is specific to the frame grabber vendor. There are four functions exported by that DLL:
• cISerialInit - Initialize the serial communication for a specific board.
• clSerialRead - Read bytes from the camera.
• clSerialWrite - Write bytes to the camera.
• clSerialClose - Close the serial communication.
To execute the binary programming commands, you can call up the functions exported by the DLL.
L
When the camera is powered on or when a camera reset is performed, your PC may
receive some random characters on the serial interface. We recommend clearing the
serial input buffers in your PC after a camera power on or reset.
If you are using your camera with an optional Basler Interface Converter (k-BIC), you
can use binary commands to configure the camera via the RS-232 serial connection
between your PC and the k-BIC.
Содержание A400K
Страница 1: ...Basler A400k USER S MANUAL Document Number DA00062410 Release Date 27 September 2007 ...
Страница 4: ......
Страница 25: ...Camera Interface Basler A400k 2 9 DRAFT Figure 2 5 A402k Camera Frame Grabber Interface ...
Страница 26: ...Camera Interface 2 10 Basler A400k DRAFT Figure 2 6 A403k Camera Frame Grabber Interface ...
Страница 27: ...Camera Interface Basler A400k 2 11 DRAFT Figure 2 7 A404k Camera Frame Grabber Interface ...
Страница 52: ...Camera Interface 2 36 Basler A400k DRAFT ...
Страница 154: ...Configuring the Camera 4 54 Basler A400k DRAFT ...
Страница 168: ...Troubleshooting 6 10 Basler A400k DRAFT ...
Страница 172: ...Feedback iv Basler A400k DRAFT ...
Страница 176: ...Index viii Basler A400k DRAFT ...