Extended instructions
9.3 Distributed I/O (PROFINET, PROFIBUS, or AS-i)
S7-1200 Programmable controller
388 System Manual, V4.2, 09/2016, A5E02486680-AK
GETIO (Read process image)
You use the instruction "GETIO" to consistently read inputs of modules or submodules of
DP slaves and PROFINET IO devices. The instruction "GETIO" calls the instruction
"DPRD_DAT (Page 408)". If there is no error during the data transmission, the data that has
been read is entered in the destination area indicated by INPUTS.
Table 9- 77 GETIO (Read process image) instruction
id:=_uint_in_,
status=>_dword_out_,
len=>_int_out_,
inputs:=_variant_inout_);
Use the instruction "GETIO" to con-
sistently read out all inputs of a
DP standard slave /
PROFINET IO device.
STEP 7 automatically creates the DB when you insert the instruction.
2
In the SCL example, "GETIO_DB" is the name of the instance DB.
The destination area must have a length that is greater than or equal to the length of the
selected component.
If you read from a DP standard slave with a modular configuration or with several DP
identifiers, you only access the data of one component / DP identifier at the configured start
address with a "GETIO" call.
The following table shows the parameters of the "GETIO" instruction:
ID IN HW_SUBMOD
Hardware ID of the DP standard slave / PROFINET IO device
STATUS
1
OUT DWord Contains the error information of "DPRD_DAT (Page 408)" in the form
Amount of data read in bytes
INPUTS IN_OUT Variant Destination area for the read data: The destination area must have a
length that is greater than or equal to the length of the selected
DP standard slave / PROFINET IO device.
You can use the following data types:
• System data types and array of system data types: BYTE, CHAR,
SINT, USINT, WORD, INT, UINT, DWORD, DINT, UDINT, REAL,
LREAL, LWORD, LINT, ULINT
• User Defined Types (UDT)
• Structures (STRUCT), but only in non-optimized data blocks (DB)
1
When displaying the "GETIO" error codes, use the DWord data type.