Appendix B: Profibus™ DP Slave Communication
Useful Formulas
The following formula can be used to find the byte num- ber from a word address:
ByteAddress = PLCOffset + (WordAddress x 2), where:
•ByteAddress is the address we are looking for in the
PLC
•PLCOffset is the first byte number in the complete block mapping in the PLC, here 256
•WordAddress is the address mapped in the Gate- way. So, for example, word 77 in the Gateway, would start at byte 410 in the PLC, and so would be composed of byte 410 and 411.
The following formula can be used to find the byte num- ber from a Dword address:
ByteAddress = PLCOffset + (DWordAddress x 4), where:
•ByteAddress is the address we are looking for in the
PLC
•PLCOffset is the first byte number in the complete block mapping in the PLC, here 256
•DwordAddress is the address mapped in the Gate- way. So, for example, Dword 14 in the Gateway, would start at byte 312 in the PLC, and so would be composed of byte 312, 313, 314 and 315.
NOTE: For the formula to work, all the blocks in the PLC Profibus configuration for the Gateway have to be con- secutive. FIG. 57.
312785C | 71 |