×
Siemens Industry Online Support
Siemens AG
Entry type: FAQ Entry ID: 59623719, Entry date: 09/10/2014
(13)
Rate

In STEP 7 (TIA Portal), how can you implement indirect addressing in an SCL program?

  • Entry
  • Associated product(s)
In the following we explain how to implement indirect addressing in SCL with the S7-300/S7-400.

Description
With the SIMATIC S7-300/S7-400 you have the option of indirect addressing:

  • Indirect addressing of tags
  • Indirect addressing of data blocks

Indirect addressing of tags is like absolute addressing. Instead of the address, you specify an offset in parentheses. For the indirect addressing of data blocks you can also use the "WORD_TO_BLOCK_DB" conversion function.

Fig. 1 shows an example of how to use indirect addressing to access a memory area of a data block in the S7-300/S7-400.
   


Fig. 1

If you want to access markers, inputs and outputs in S7-300/S7-400 using indirect addressing, you need the instructions "%MX()", "%MB()", "%MW()", "%EX()", "%EB()", "%EW()", "%AX()", "%AB()" and "%AW()". Here it is obligatory to enter the percent symbol prefix. The following figure shows you some examples.


Fig. 2

Further Information
More information is available in the manual under


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
https://www.siemens.com/cybersecurity#Ouraspiration.