
B8976111/02
AS-i Master Module CP 142-2
3-5
3.2.3 Access to the AS-i User Data (BM147)
The bits of the AS-i slaves are accessed using the following S7 load and transfer commands:
L PIW X
L PID X
T PQW X
T PQD X
X stands for the byte address in the CP 142-2.
The system restricts access to word or double-word access to even byte addresses. The
byte transfer commands L PIB X or T PQB X are not permitted with the CP 142-2.
Example:
Correct:
L PIW 260
Incorrect:
T PQB 260
Incorrect:
L PIW 257
If you want to access individual bits of the slave data, you can use the method shown in the following
sample program for a CP with start address 256:
OPEN DB 20
//open a data block
//
//
1.) at program start:
- read in “pseudo PII” of inputs
//
(copy the input data
//
of the CP 142-2 in
//
to a data block)
L PID 256
T DBD 0
L PID 260
T DBD 4
L PID 264
T DBD 8
L PID 268
T DBD 12
.
//
//
2.) In program:
- Evaluate individual “input bits””
//
- set/reset individual
//
“output bits”
A DBX 5.4
S DBX 22.3
R DBX 28.0
.
.
//
3.) At end of program: - output pseudo PIQ of the outputs
//
(copy data words to the
//
output data of the CP 142-2)
L DBD 16
T PQD 256
L DBD 20
T PQD 260
L DBD 24
T PQD 264
L DBD 28
T PQ 268
Содержание SIMATIC NET CP 142-2
Страница 3: ...SIMATIC NET CP 142 2 Manual C79000 B8976 C111 02 ...
Страница 70: ...B8976111 02 AS i Master Module CP 142 2 7 2 ...
Страница 76: ...AS i Master Module CP 142 2 B8976111 02 A 6 ...
Страница 78: ...AS i Master Module CP 142 2 B8976111 02 B 2 ...
Страница 80: ...AS i Master Module CP 142 2 B8976111 02 C 2 ...
Страница 82: ......