Siemens Industry Online Support
Siemens AG
Entry type: FAQ Entry ID: 42603286, Entry date: 03/06/2013

How in STEP 7 (TIA Portal) V11 do you program the data type "VARIANT" for indirect addressing for the S7-1200/S7-1500?

  • Entry
  • Associated product(s)
A parameter of the data type VARIANT is a pointer or reference that can point to variables of various data types.

The data type "VARIANT" is a pointer that points to the variables of different data and parameter types. The table below gives instructions for the communication that includes a parameter of the "VARIANT" data type.

Blocks with a parameter of the "VARIANT" data type

BlockFunctionParameter of the "VARIANT" data type
TSEND_CSend data via EthernetDATA 1)
TRCV_CReceive data via EthernetDATA 1)
TSENDSend data via an existing communication connectionDATA 1)
TRCVReceive data via an existing communication connectionDATA 1)
TUSENDSend data via Ethernet (UDP)DATA 1)
TURCVReceive data via Ethernet (UDP)DATA 1)
T_CONFIGFor program-controlled configuration of the integrated PROFINET interfaceDATA 1)
SEND_PTPSend point-to-point messageBUFFER 2)
RCV_PTPReceive point-to-point messageBUFFER 2)
TC_SENDSend data via GSM networkDATA 1)
TC_RECVReceive data via GSM networkDATA 1)
TC_CONFIGTransfer configuration data to GPRS communication moduleCONFIG
USS_RPMRead parameters out of the driveUSS_DB
USS_WPMChange parameters in the driveUSS_DB
MB_COMM_LOADConfigure port on PtP module for Modbus RTUMB_DB
MB_MasterConfigure PtP module for Modbus MasterDATA_PTR
MB_SLAVEConfigure PtP module for Modbus SlaveMB_HOLD_REG
MB_CLIENTCommunicate TCP client via PROFINET connection of the S7-1200MB_DATA_PTR
MB_SERVERCommunicate TCP server via PROFINET connection of the S7-1200MB_HOLD_REG
TM_MAILTransmit e-mail (TeleService)Attachment

1) Indicates the send or receive area that contains the address and length of the data to be sent or received.
2) Indicates the initial address of the send or receive buffer.

The following example shows how to assign a block parameter of the "VARIANT" data type with the ANY pointer. The "DATA" parameter of the communication instruction "TSEND_C" is parameterized with the input area from I1.0 to I8.7 (8 bytes).

Fig. 1

The "DATA" parameter of the instruction "TSEND_C" can also be parameterized with a data area of 8 bytes of data block. The following figure shows an example for the configuration in the data block "DB".

Fig. 2

Now you can parameterize the "DATA" parameter of the "VARIANT" data type with the ANY pointer and the DB variables for the required data area.

Fig. 3

Further Information
More information about the "VARIANT" data type is available as follows:

Creation Environment
The screens in this FAQ response were created with STEP 7 (TIA Portal) V15.

Security information
In order to protect technical infrastructures, systems, machines and networks against cyber threats, it is necessary to implement – and continuously maintain – a holistic, state-of-the-art IT security concept. Siemens’ products and solutions constitute one element of such a concept. For more information about cyber security, please visit
Rate entry
no rating
Requests and feedback
What do you want to do?
Note: The feedback always relates to the current entry / product. Your message will be forwarded to our technical editors working in the Online Support. In a few days, you will receive a response if your feedback requires one. If we have no further questions, you will not hear from us.