How to Integrate AS-Interface I/O Data into the S7-200
Cấu hình của ví dụ về kết nối IO mạng AS-i trong S7-200:
Yêu cầu:
- Red key turns the red light on the signal column on/off.
- Green key turns the green light on the signal column on/off.
- Active AS-interface sensor 1 turns the flashing light on the signal column on/off.
- Active AS-interface sensor 2 turns the sensing element on the signal column on/off.
- Conventional sensor on the IP 65 user module turns the light on the control device on/off.
- Photoelectric barrier on the IP 20 414Q slave switches all four outputs of the IP 65 4A slave on/off.
* The AS-interface master CP 242-2 is the only module connected to the CPU 212.
* The input data of the AS-interface slaves is copied from the analog input words AIW0 to AIW14 into the variable memory locations VW800 to VW815. Starting with VW800, an input data image of the AS-interface slaves is then located in the variable memory.
* The output data for the AS-interface master is filed in the variable memory locations VW900 to VW915. Starting with VW900, an output data image of the AS-interface slaves is then located in the variable memory.
* After all slave output bits have been set in the variable memory, starting with VW900, 16 bytes beginning at VW900 are copied to the analog output words AQW0 to AQW14 of the CP 242-2.
For the slaves used in this example, the following assignment results:
-------------------------------------------------------------------
Inputs Outputs
-------------------------------------------------------------------
Slave Slave Analog Variable Analog Variable
Address input memory output memory
area area area area
with 900
-------------------------------------------------------------------
1 4I/4Q AIW0 800 bits 0-3 AQW0 900 bits 0-3
-------------------------------------------------------------------
2 4I AIW0 801 bits 4-7 - -
-------------------------------------------------------------------
3 4Q - - AQW0 901 bits 0-3
-------------------------------------------------------------------
4 2I AIW2 802 bits 4-5 - -
-------------------------------------------------------------------
5 2I AIW2 802 bits 0-1 - -
-------------------------------------------------------------------
6 4I/4Q AIW2 803 bits 4-7 AQW2 903 bits 4-7
-------------------------------------------------------------------
7 4Q - - AQW2 903 bits 0-3
-------------------------------------------------------------------
Đây là ví dụ về toàn bộ nội dung đã mô tả ở trên:
0 nhận xét