Access to the Data of the AS-i Slaves
3.2.2Access to the AS-i Analog Data
Data Access with STEP 7 Micro
You access the analog data of the
Example
The following example shown in STL is valid for a CPU 222 with a CP
OB1 (STL)
NETWORK 1 |
| |
LD | SM0.1 | //If: bit ªFirst Scanº: |
SI | Q1.7, 1 | //PLC_RUN = 1 |
LD | I1.1 | //If: CP |
CALL 4 | //Then : process |
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 | |