kb:production:s7-communication:read
12 Read Variable
Request
Message Type = JOB (0x01
)
Params
Byte | Value | Description |
---|---|---|
Fixed Part | ||
[0] | 0x04 | Function Code (Read = 0x04 ) |
[1] | 0x01 | Item Count (only 1 item) |
[2] | 0x12 | Spec type (Variable Specification = 0x12 ) |
[3] | 0x0A | Parameter length |
[4] | 0x10 | Syntax ID (addressing mode “any-type” = 0x10 ) |
[5] | 0x…… | Variable Type |
[6-7] | 0x…… …… | Count (number of elements of type Variable Type to read or write) |
[8-9] | 0x…… …… | Address of the data block in memory to read |
[10] | 0x…… | Memory Area |
[11-13] | offset of the addressed variable in the selected memory area (start address) |
Data
none.
Response
Message Type = ACK_DATA (0x03
)
Params
Byte | Value | Description |
---|---|---|
Fixed Part | ||
[0-1] | 0x…… …… | Error Code |
[2] | 0x04 | Function Code (Read = 0x04 ) |
[3] | 0x01 | Item Count (only 1 item) |
Data
Byte | Value | Description |
---|---|---|
Fixed Part | ||
[0] | 0xFF | Response Item Return Code (0xFF = ok) |
[1] | 0x…… | Transport Data Type |
[2-3] | 0x…… …… | Count (number of elements of type Transport Data Type to read) |
Variable Part | ||
[4-n] | Read Data (size depending on Transport Data Type) |
kb/production/s7-communication/read.txt · Last modified: 2019/11/14 11:03 by joerg.hampel