Kaiyi — 13.9.7 Program Example

Chapter 13 PROFIBUS Slave Module AH10PFBS 13.9.6 Data Mapping Data mapping relations in the above parameter configuration are listed as below. 13.9.7 Program Example  Master program 1. Write the master program inside OB1. 2. When M0.0 is ON, write 1000 to PQW256 and 2000 to PQW258. The master will transmit the data in PQW256 and PQW258 to D6000 and D6001 in the slave respectively via the PROFIBUS-DP bus. 3. When M0.0 is ON, write the data in PIW256 to MW10 and PIW258 to MW12. The data in PIW256 and PIW258 are those in D6250 and D6251 of the slave transmitted to the master via the PROFIBUS-DP bus.

13-35 Register in S7-300 master PROFIBUS-DP network Corresponding register in the data transmission direction AH500 series CPU module PQW256 D6000 PQW258 D6001 PIW256 D6250 PIW258 D6251