Siemens Simatic S7-200 System Manual page 395

Hide thumbs Also See for Simatic S7-200:
Table of Contents

Advertisement

Sample Program for DP Communications to a CPU
A sample program in Statement List for the PROFIBUS–DP module in slot 0 for a CPU that uses the DP
port information in SM memory is shown below. The program determines the location of the DP buffers
from SMW226 and the sizes of the buffers from SMB228 and SMB229. This information is used to copy
the data in the DP output buffer to the process-image output register of the CPU. Similarly, the data in the
process-image input register of the CPU are copied into the V memory input buffer.
Notice
The manner of assigning SM locations for Intelligent modules changed for Version 2.2 and later.
If you are using a CPU prior to version 2.2, you should place all intelligent modules in slots adjacent to
the CPU and before all non-intelligent modules to ensure compatibility.
In the following sample program for a DP module in position 0, the DP configuration data in the SM
memory area provides the configuration of the DP slave. The program uses the following data:
SMW220
DP Module Error Status
SMB224
DP Status
SMB225
Master Address
SMW226
V memory offset of outputs
SMB228
Number of bytes of output data
SMB229
Number of bytes of input data
VD1000
Output Data Pointer
VD1004
Input Data Pointer
Technical Specifications Appendix A
A
383

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents