
Configuring the Camera
BASLER A102
k
4-9
DRAFT
4.2.3 Example Commands
4.2.3.1 Read Command
An example of the command message used to read the camera status is:
0x02, 0x43, 0x82, 0xC1, 0x03
0x02
- is the STX. The STX is always
0x02
.
0x43
- is the first byte of the descriptor. The first byte of the descriptor is the command ID.
Command IDs can be found in the tables on pages
through
. If you check the
table on page
, you will find that the ID for the camera status read command is
0x43.
0x82
- is the second byte of the descriptor. The MSB in this byte represents the read/write
flag and since this is a read command, the bit should be set to a 1. The other seven
bits of this byte represent the data size (in bytes) that will be transferred using this
command. If you check the table on page
, the data size for the camera status
command is 2 bytes. So the arrangement of the bits in the second byte of the
descriptor should be 1000 0010 which translates to 0x82.
Note that for read commands, the data size specified in the descriptor represents the
number of bytes of data that you expect to see in the response. No data bytes are
actually included in the read command.
0xC1
- is the block check character (BCC). See page
for instructions on calculating a
BCC.
0x03
- is the ETX. The ETX is always 0x03.
4.2.3.2 Write Command
An example of the command message used to copy the Work Set to User Set 2 is:
0x02, 0x46, 0x01, 0x02, 0x45, 0x03
0x02
- is the STX. The STX is always 0x02.
0x46
- is the first byte of the descriptor. If you check the table on page
, you will find that
the ID for the command to copy the Work Set to a User Set is 0x46.
0x01
- is the second byte of the descriptor. The MSB in this byte represents the read/write
flag and since this is a write command, the bit should be set to a 0. The other seven
bits of this byte represent the data size (in bytes) that will be transferred using this
command. If you check the table on page
, the data size for the Copy Work Set to
User Set command is 1 byte. So the arrangement of the bits in the second byte of the
descriptor should be 0000 0001 which translates to 0x01.
0x02
- is the data byte. If you check the table on page
, you will find that to copy the Work
Set to User Set 2, the data byte must be set to 0x02.
0x45
- is the block check character (BCC). See page
for instructions on calculating a
BCC.
0x03
- is the ETX. The ETX is always 0x03.
Summary of Contents for A102K
Page 4: ......
Page 16: ...Introduction 1 8 BASLER A102k DRAFT...
Page 36: ...Camera Interface 2 20 BASLER A102k DRAFT...
Page 38: ...Operation and Features 3 2 BASLER A102k DRAFT Figure 3 1 A102k Sensor Architecture...
Page 112: ...Configuring the Camera 4 34 BASLER A102k DRAFT...
Page 118: ...Mechanical Considerations 5 6 BASLER A102k DRAFT...
Page 130: ...Feedback iv BASLER A102k DRAFT...