Access to the Data of the AS-i Slaves

Example

Figure 3-1 shows an example of the CP 243-2 addressing four AS-i slaves. In the example, m = 0 is the start address for the input data and n = 0 is the start address for the output data.

The bits relevant for the user program (existing AS-i slaves) are shown on a gray background. The bits on a white background are irrelevant for the user program.

CP 243-2

16 input bytes

0

 

 

 

 

 

 

 

 

 

 

Slave 1

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

Bit 3

 

Bit 2

Bit 1

 

Bit 0

Bit 3

 

Bit 2

 

Bit 1

 

Bit 0

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

1

 

 

Slave 2

 

 

 

 

 

 

Slave

3

 

 

Bit 3

 

Bit 2

Bit 1

 

 

Bit

0

Bit 3

 

 

Bit 2

 

Bit 1

 

Bit 0

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

2

 

Slave 4

 

 

 

 

 

 

Slave 5

 

 

 

 

 

Bit 1

 

Bit 0

 

 

 

 

 

 

 

 

.

Bit 3

 

Bit 2

 

Bit 3

 

Bit 2

 

Bit 1

 

Bit 0

.

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

.

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

15

Slave 30

 

 

 

 

 

 

Slave 31

 

 

Bit 3

 

Bit 2

Bit 1

 

Bit 0

Bit 3

 

Bit 2

 

Bit 1

 

Bit 0

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

7

6

5

4

 

3

 

2

1

0

16 output bytes

0

 

 

 

 

 

 

 

 

Slave 1

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

Bit 3

 

Bit 2

Bit 1

 

Bit 0

Bit 3

 

Bit 2

 

Bit 1

 

Bit 0

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

Slave 2

 

 

Slave

 

3

 

 

 

 

Bit 3

Bit 2

Bit 1 Bit 0

Bit 3

 

Bit 2

 

Bit 1

Bit 0

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

2

 

 

 

Slave 4

 

 

Slave 5

 

 

 

Bit 3

Bit 2

Bit 1

Bit 0

Bit 3

 

Bit 2

 

Bit 1

 

Bit 0

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

Slave 30

 

 

Slave 31

 

15

 

Bit 3

Bit 2

Bit 1

Bit 0

Bit 3

 

Bit 2

 

Bit 1

 

Bit 0

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

AS-i slaves

Slave no. 2

4 I module

Slave no. 3

2 I/2 O module

Slave no. 4

4 O module

Slave no. 31

4 I/4 O module

Figure 3-1

In the figure above, for example, the 2I/2O module (AS-i slave number 3 with two inputs and two outputs) occupies bits 0 and 1 in input byte 1 and bits 2 and 3 in output byte 1.

The assignment of the AS-i terminals of the bus modules to the data bits of the input/output bytes is shown below based on the example of slave number 3:

1

0 Bit no.

Input byte 1

Terminal 2 on the AS-i bus module

Terminal 1 on the AS-i bus module

3

2

Bit no.

Output byte 1

Terminal 4 on the AS-i bus module

Terminal 3 on the AS-i bus module

3-6

SIMATIC NET CP 243-2 AS-i Master

C79000-G8976-C142/02

Page 54
Image 54
Siemens CP 243-2 installation instructions AS-i slaves, Output byte