RMA
Member
I know this is a silly question, but it's irritating me nonetheless.
We all automatically start WORD and DWORD addresses on an even address boundary, however, nowhere in the Help files, or other sources, can I find an explicit statement to this effect. Indeed, on the contrary, in a colleagues "Programming 1" course notes, which I've borrowed, I find the statement: "The memory of the S7 PLC is universally Byte-oriented" (loosely translated from the German!). They then go on to demonstrate the consequences of this with examples in which all the WORD and DWORD addresses are even!
Taken at face value, I would think that the statement at least implies, that you could define a WORD or DWORD on an odd address. The funny thing is, the Symbol Editor will allow you to create a WORD or DWORD on an odd address, without complaining. On the other hand in a DB, you are always forced to an even address.
Anybody know where we can find this Black on White?
Edit: I've been digging through "The Bible" (Berger!) to see if he could throw any light on the subject, but all I've been able to find so far, is an example where he takes a DWORD - MD24 and splits it into it's component part including MW25, comprising MB25 and MB26. Does this mean that apart from convention, there is no reason why a WORD or DWORD on an odd address boundary should not work. Or could it be that there could be problems passing parameters between FBs, FCs, SFBs, SFCs etc.?
We all automatically start WORD and DWORD addresses on an even address boundary, however, nowhere in the Help files, or other sources, can I find an explicit statement to this effect. Indeed, on the contrary, in a colleagues "Programming 1" course notes, which I've borrowed, I find the statement: "The memory of the S7 PLC is universally Byte-oriented" (loosely translated from the German!). They then go on to demonstrate the consequences of this with examples in which all the WORD and DWORD addresses are even!
Taken at face value, I would think that the statement at least implies, that you could define a WORD or DWORD on an odd address. The funny thing is, the Symbol Editor will allow you to create a WORD or DWORD on an odd address, without complaining. On the other hand in a DB, you are always forced to an even address.
Anybody know where we can find this Black on White?
Edit: I've been digging through "The Bible" (Berger!) to see if he could throw any light on the subject, but all I've been able to find so far, is an example where he takes a DWORD - MD24 and splits it into it's component part including MW25, comprising MB25 and MB26. Does this mean that apart from convention, there is no reason why a WORD or DWORD on an odd address boundary should not work. Or could it be that there could be problems passing parameters between FBs, FCs, SFBs, SFCs etc.?
Last edited: