Example of State Memory Addressing in Concept and Modsoft
 
Overview
PROFIBUS DP slaves require the following different memory areas:
Example of User Data
The required bytes and words are provided by the selection of the I/O modules (see I/O Data Format and Size).
The following memory assignment was selected for the Example of a PROFIBUS DP Configuration:
Slave Address
Momentum Module
Input Length
Output Length
Input Type
Address Inputs
Address Outputs
3
170 ADI 350 00
4 bytes
0 bytes
BOOL
300 001 - 300 002
-
4
170 ADM 350 10
2 bytes
2 bytes
BOOL
300 003
400 001
5
170 ADO 340 00
0 bytes
2 bytes
BOOL
-
400 002
6
170 AAI 140 00
16 words
4 words
UINT16
300 004 - 300 019
400 003 - 400 006
7
170 AMM 090 00
5 words
5 words
UINT16
300 020 - 300 024
400 007 - 400 011
8
170 AAO 120 00
0 words
5 words
UINT16
-
400 012 - 400 016
In the example, memory was allocated when the master was parameterized. The word format (because the I/O base is analog) was also selected when the master was parameterized.
In this example, data transfer via the bus for discrete I/Os occurs in bytes and in accordance with the following rules:
NOTE: For discrete I/O bases, 0x and 1x references can also be selected.
In the example, the bus master converts bytes into words, before they are stored in the PLC memory. For the slave 3 (170 ADI 350 00), the input bits are stored in the words 300 001 and 300 002.
Within the words, the I/O base’s inputs are as follows:
This leads to the following data mapping (input type BOOL):
Byte No.
Byte 0
Byte 1
Bits in word 300.001
8
7
6
5
4
3
2
1
16
15
14
13
12
11
10
9
Terminal No.: Row 1
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
Byte No.
Byte 2
Byte 3
Bits in word 300 002
8
7
6
5
4
3
2
1
16
15
14
13
12
11
10
9
Terminal No.: Row 2
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
Example of Diagnostic Data
A diagnostic message includes 19 bytes per I/O module. The bytes are mapped onto words.
The meaning of the bytes is described in the Structure of the Diagnostic Message section. Bytes 1 and 8 are required for error evaluation. For complex modules (analog), byte 9 is also required (it displays, among other things, whether a parameter default is valid or invalid).
In the example therefore, only the first 8 or 9 bytes of each module are saved in the controller.
The following memory is reserved:
If the ident code (bytes 18 and 19) is to be likewise evaluated, 19 words must be reserved for 19 bytes. These options must be considered during the parameterization of the master.
The memory partitions for the example can be constructed as follows:
Slave Address
Momentum Module
Input Length
Input Diagnostic Address
3
170 ADI 350 00
8 words
300 301 - 300 308
4
170 ADM 350 10
8 words
300 309 - 300 316
5
170 ADO 340 00
8 words
300 317 - 300 324
6
170 AAI 140 00
9 words
300 325 - 300 333
7
170 AMM 090 00
9 words
300 334 - 300 342
8
170 AAO 120 00
9 words
300 343 - 300 351
For example, the following table displays the data mapping for the slave’s diagnostic byte 1 with address 7 (170 ADI 350 00) in word 300 301 (input type UINT8).
Diagnostic Byte No.
Byte 1
Bit no. in diagnostic byte
8
7
6
5
4
3
2
1
Bit no. in word 300 301
16
15
14
13
12
11
10
9
8
7
6
5
4
3
2
1