Block types and data formats

The address area of the PLC is made up of different block types, such as data blocks and inputs. The driver supports addressing of all block types. The individual block types are:

  • Data block

  • Extended data block

  • Inputs

  • Outputs

  • Flags

  • Peripheral

  • Extended peripheral

  • Counter

  • Timer

  • Absolute addresses

  • System addresses

It should be noted that it is only possible to write to data blocks, extended data blocks and absolute addresses. All other blocks only have read access.

The RK512 protocol does not transfer any information on the data type. In order to be able to convert between the data format used on the PLC and the WinCC OA format, a conversion method must be specified by the user.

Table: Data formats supports by the driver.

Data format Meaning
Bit strings individual bytes or words are interpreted as arrays of 8 or 16 bits respectively.
Byte 1 byte integer with sign
Word 2 byte integer with sign
Double word 4 byte integer with sign
Unsigned byte 1 byte integer without sign
Unsigned word 2 byte integer without sign
Unsigned double word 4 byte integer without sign
Float 4 byte floating point number
BCD 16

2 byte binary coded decimal number

The value range is -999 to 999.

BCD 32

4 byte binary coded decimal number

The value range is -9999999 to 9999999.

Siemens-KC A counter format used by Siemens that corresponds roughly to BCD 16. The value range is 0 to 999.
Siemens-KT A timer format used by Siemens that corresponds roughly to BCD 16, but contains an extra exponent.

Data blocks, extended data blocks, counters, timers, system addresses and absolute addresses can only be addressed on a word basis, although byte and unsigned byte conversions are supported for data blocks and extended data blocks, where a word is considered to be an array of two bytes. The least significant byte has subindex 0 and the most significant byte subindex 1. For counters, timers, system addresses and absolute addresses, the byte and unsigned byte conversions are not supported.

PLC addressing only allows words or bytes, not individual bits, to be read or written. Here the driver interprets a byte or a word as an array of 8 or 16 bits respectively, where the least significant bit has subindex 0, the next bit subindex 1 and so on. It is not possible to read or write individual bits; instead all data points belonging to a peripheral address must always be read or written. The organization into bytes is only used for block types that can also be addressed as bytes.