Configuring the Camera
196
Basler sprint Mono Cameras
7.3
Using Binary Read/Write Commands
As explained in Section 7.2 on
, each 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 gain control and status register has two fields that can be used to set the camera’s
gain (see Section 6.1 on
). 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 the camera.
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 Mode field of the Test
Image Mode control and status register (see
). 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 Mode 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 the field you want to work with is
included as part of the command. Section 7.3.1 on
describes the binary read/write
command format in detail. Sample code that illustrates how to use binary read and write commands
is available from Basler (see Section 7.4 on
Binary read/write commands are issued to the camera 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.
Note
When the camera is powered on or when a camera reset is performed, your
PC may receive one random character on the serial interface. We recommend
clearing the serial input buffers in your PC after a camera power on or reset.
Содержание Sprint Series
Страница 4: ......
Страница 10: ...Table of Contents vi Basler sprint Mono Cameras...
Страница 42: ...Physical Interface 32 Basler sprint Mono Cameras Fig 14 Camera Frame Grabber Interface...
Страница 48: ...Physical Interface 38 Basler sprint Mono Cameras...
Страница 76: ...Line Acquisition Modes 66 Basler sprint Mono Cameras...
Страница 94: ...Exposure Start and Exposure Time Control 84 Basler sprint Mono Cameras...
Страница 230: ...Revision History 220 Basler sprint Mono Cameras...
Страница 232: ...Feedback 222 Basler sprint Mono Cameras...