Siemens Industry Online Support
Siemens AG
Entry type: FAQ Entry ID: 1442674, Entry date: 12/28/2006

How should you configure the parameter R_ID on the SFB12 (B-SEND) with connection to S5 or other system via RK512?

  • Entry
  • Associated product(s)

In the parameter R_ID you enter the target data area of the communication partner. The value is transferred once into the CPU at start-up and can no longer be changed. The structure of the parameter R_ID (DWORD) is as follows:

Address in the word


Byte 1, bit 0,1,2,3

Data type identifier
DX: 0 (hexadecimal)
DB: 1 (hexadecimal)

Byte 1, bit 4,5,6,7

Inter-processor communication flag bits 0-7 (hexadecimal);
if you are working without inter-processor communication flags, the protocol enters FH in the message header.

Byte 2

Inter-processor communication flag bytes 1-233 (decimal); 255 (decimal) if you are working without inter-processor communication flags,

Byte 3

Offset: 0-255 (decimal, specification in words)

Byte 4

DB no.: 3-255 (decimal)

The parameters of the target data area are transferred to the communication partner in the RK 512 message header. Note that the length of the transferable data is limited to 4 Kbytes.

Sample call of the SFB12 (BSEND):

STL Code


L 10
L B#16#31
T DB20.DBB20
L 30
T DB20.DBB21
L 20
T DB20.DBB22
L 71
T DB20.DBB23

REQ :=DB20.DBX0.0
R :=DB20.DBX0.1
ID :=W#16#1000
R_ID :=DB20.DBD20
DONE :=DB20.DBX0.2
SD_1 :=p#DB10.DBX5.0 WORD 6

Length = 10 bytes

Interprocessor communication flag bit 3 / Data type DB

Interprocessor communication flag byte 30

As of data word 20 (Offset)

DB no. 71

After a rising edge at the REQ parameter the data in DB 10 are sent to the communication partner as of data byte 5 with a length of 10 bytes. At the partner the data are stored in DB 71 as of data word 20. Interprocessor communication flag byte and bit are transferred too. The target information stored in the R_ID is transferred once when the CPU starts up and can then no longer be changed.

When parameterizing the send mailbox SD_1 the box length must be greater than the longest message occurring, because otherwise it is not possible to send (ERROR = 02).

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