Access to the Data of the AS-i Slaves
3-15
SIMATIC NET CP 243-2 AS-i Master
C79000-G8976-C142/02
3.2.2
Access to the AS-i Analog Data
Data Access with STEP 7 Micro
You access the analog data of the AS-i slaves using the analog commands of the
“STEP 7 Micro/WIN32” programming language.
Example
The following example shown in STL is valid for a CPU 222 with a CP 243-2
plugged in directly beside it. The program reads the analog input value of slave 3
(channel 2) cyclically and sends it to the analog output slave 16 (channel 1).
OB1 (STL)
NETWORK 1
LD SM0.1
//If: bit “First Scan”:
SI Q1.7, 1
//PLC_RUN = 1
LD I1.1
//If: CP 243-2_READY
CALL 4
//Then : process AS-i analog values
SBR 4 (STL)
NETWORK 1
LD SM0.0
//Always 1
RI Q1.0,6
//Select bank 33
SI Q1.5,1
//Select bank 33
SI Q1.0,1
//Select bank 33
MOVW AIW10, VW50
//Read slave 4, channel 2
RI Q1.0,1
//Select bank 40
SI Q1.3,1
//Select bank 40
MOVW VW50, AOW0
//Write slave 17, channel 1
RI Q1.0,6
//Important: deselect the analog bank
Содержание SIMATIC NET CP 243-2
Страница 4: ...Preface ii SIMATIC NET CP 243 2 AS i Master C79000 G8976 C142 02 ...
Страница 8: ...Contents vi SIMATIC NET CP 243 2 AS i Master C79000 G8976 C142 02 ...
Страница 26: ...Technical Description and Installation Instructions 1 18 SIMATIC NET CP 243 2 AS i Master C79000 G8976 C142 02 ...
Страница 64: ...Access to the Data of the AS i Slaves 3 16 SIMATIC NET CP 243 2 AS i Master C79000 G8976 C142 02 ...
Страница 68: ...Signaling Errors and Diagnostics in the User Program 4 4 SIMATIC NET CP 243 2 AS i Master C79000 G8976 C142 02 ...
Страница 128: ...Command Interface 5 60 SIMATIC NET CP 243 2 AS i Master C79000 G8976 C142 02 ...
Страница 134: ...Dealing with Problems Error Displays 6 6 SIMATIC NET CP 243 2 AS i Master C79000 G8976 C142 02 ...
Страница 142: ...Notes on the CE Mark C 2 SIMATIC NET CP 243 2 AS i Master C79000 G8976 C142 02 ...
Страница 148: ...Glossary Glossary 4 SIMATIC NET CP 243 2 AS i Master C79000 G8976 C142 02 ...