Configuring the Camera
4-52
Basler A400k
DRAFT
4.3.2.3 Calculating the Block Check Character (BCC)
The use of a block check character (BCC) in A400k commands is optional (see pages
and
). If you choose to use a BCC, the BCC will be the exclusive-or sum (XOR sum) of the bytes
in the FTF field, the DataLen field, the Address field and the Data field of the command frame. For
the write command example shown in Section
, the block check character is 0x18. Let’s
consider how this block check character was calculated.
Calculating XOR sums is most easily understood when numbers are shown in their binary form,
so in the example calculations shown below, the hexadecimal digits in our command have been
converted to binary.
To find the XOR sum of two binary numbers, you add the two digits in each column using the
following rules:
If both digits are 0, the result is 0.
If both digits are 1, the result is 0.
If one of the digits is a 1 and the other is a 0, the result is 1.
With all of this in mind, here is how the check digit for the write command shown in Section
would be calculated:
0 0 0 0 0 1 0 0 = the binary representation of 0x04 (FTF)
0 0 0 0 0 1 0 0 = the binary representation of 0x04 (DataLen)
0 0 0 0 0 0 0 0 = XOR sum
0 0 0 0 0 0 0 0 = Previous XOR Sum
0 0 0 0 0 0 0 1 = the binary representation of 0x00 (Address Byte 1)
0 0 0 0 0 0 0 1 = New XOR sum
0 0 0 0 0 0 0 1 = Previous XOR sum
0 0 0 1 1 0 0 0 = the binary representation of 0x18 (Address Byte 2)
0 0 0 1 1 0 0 1 = New XOR sum
0 0 0 1 1 0 0 1 = Previous XOR Sum
0 0 0 0 0 0 0 1 = the binary representation of 0x01 (Data)
0 0 0 1 1 0 0 0 = Final XOR sum
0 0 0 1 1 0 0 0 = 0x18 = the block check character
Содержание 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 ...