Configuring the CameraBASLER A102k 4-7DRAFT4.2.2 Error Checking4.2.2.1 ACK/NAKWhen the camera receives a frame, it checks the order of the bytes in the frame and checks tosee if the XOR sum of the bytes in the descriptor and the data fields matches the block checkcharacter. The camera also checks to see if the number of bytes in the data field is equal to thenumber specified in the descriptor.If all checks are correct, an ACK is send to the host. If any check is incorrect, a NAK is sent.4.2.2.2 Time-outsByte Time-outThe camera checks the time between the receipt of each byte in the frame. If the time betweenany two bytes exceeds 1 second, the camera enters a “garbage state” and discards any moreincoming bytes. The camera remains in this state until it sees 1.5 seconds of silence. Once thecamera sees 1.5 seconds of silence, it goes into an idle state (looking for an STX).4.2.2.3 Read CommandIn the normal case, when a read command is sent to the camera, the camera responds with anACK and a frame. The frame will contain the data requested in the read command.If the camera receives a read command with an unknown command ID in the descriptor, it willrespond with an ACK but will not send a frame.If the host sends a read command and gets no ACK/NAK, the host can assume that no camera ispresent.If the host sends a read command and gets an ACK/NAK but does not receive a frame within 500ms, the host can assume that there was a problem with the read command.4.2.2.4 Write CommandIn the normal case, when a write command is sent to the camera, the camera responds with anACK.If the camera receives a write command with an unknown command ID in the descriptor, it willrespond with an ACK but will not perform the write.After a write command has been issued by the host, the host can verify the write by issuing acorresponding read command and checking that the returned data is as expected. The host canalso issue a camera status read command (see Section 4.2.7) and check the returned data to seeif an error condition has been detected. For many of the write commands listed in the tables on pages 4-10 through 4-28,only data within a specified range or a specified group of values is valid. The cameradoes not perform a check to see if the data in the write command is within the al-lowed range or specified group of allowed values.