![Siemens SIMATIC NET CP 343-2 Manual Download Page 43](http://html.mh-extra.com/html/siemens/simatic-net-cp-343-2/simatic-net-cp-343-2_manual_1265368043.webp)
4
Data Exchange between User Program and AS−i Slaves
43
CP 343−2 / CP 343−2 P AS−Interface Master
Release 08/2008
C79000−G8976−C149−04
If you require bit access to slave data, you can, for example, use the strategy
shown in the following program example of a CP with base address 256:
Table 4-1
STL
Explanation
//Read in binary input data of standard/A slaves
L
PID 256
T
DB20.DBD 0
L
PID 260
T
DB20.DBD 4
L
PID 264
T
DB20.DBD 8
L
PID 268
T
DB20.DBD 12
Examples: binary access to standard / A slaves
A
DB20.DBX 0.1
A
DB20.DBX 3.0
=
DB20.DBX 47.3
//Output binary output data of standard/A slaves
L
DB20.DBD 32
T
PQD 256
L
DB20.DBD 36
T
PQD 260
L
DB20.DBD 40
T
PQD 264
L
DB20.DBD 44
T
PQD 268
//Slave 1, terminal 2
//Slave 7, terminal 1
//Slave 31, terminal 4
Note
If you use a PLC CPU with configurable I/O addresses (for example, 315-2DP),
you can also access the 16 bytes of I/O data directly via the process image using
single commands.