Kepware Knowledge Base: Solution
Received Unable to read bytes '<bytes>' starting at offset '<offset>' for Data Block '<address>' on device '<device>'. Device returned data access error [Code=0x05] Error Message
Last Update: 11/7/2018
Problem:
Reading data from a data block results in an error that causes all registers in the block to be invalidated and the quality to be set to Bad.
Possible Cause: An incorrect request may have been sent to the device after Item Syntax was used to access a Boolean in a data block. The error will occur when requesting a bit in a byte that is positioned at the end of the data block. This affects the following item syntax:
- DB[num],B[address][.bit]
- DB[num],BYTE[address][.bit]
- DB[num].DBB[address][.bit]
- DB[num].DB[address][.bit]
Solution:
Access Booleans using alternate syntax. For more information, refer to the examples below.
- Instead of "DB[num],B[address][.bit]" use "DB[num],C[address][.bit]".
- Instead of "DB[num],BYTE[address][.bit]" use "DB[num],C[address][.bit]".
- Instead of "DB[num].DBB[address][.bit]" use "DB[num].C[address][.bit".
- Instead of "DB[num].DB[address][.bit]" use "DB[num].C[address][.bit]".
©
2021
PTC Inc. All Rights Reserved.