S7 Addressing

Mrslipmat

Member
Join Date
Mar 2009
Location
Inside a cabinet somewhere....
Posts
199
Hi guys

I,ve got a small problem which has got me scratching my head and pulling my hair out.

I have a S7-314 plc and am currently doing some mods,looking through the referance table i have several mb,s free, I can use for instance MB200.0 through to MB200.6 but when I come to assign the .7 bit it won,t allow me and jumps to another bit previously used within the range, the same is happening with the inputs and outputs, I can use 0.0 through to 0.6, but when trying to use 0.7 it won,t assign it and again jumps to say 0.3.

Anybody got any ideas as to why this is happening, I suspect it,s a software problem or setting as the current program already has various .7 inputs/outputs and bits assigned.

Many thanks

John
 
Use the xref facility to check your assignments and to make sure you are not using bits within bytes etc:

eg:

xref009008.JPG
 
Thanks for your replys so far, I,ve used the X ref utility, screen shot attached, I can assign everything apart from bit 7 in all of the mb,s !!

If I try assign M14.7 it jumps to M14.0, the same with M12.7 which goes to M12.0 and so on.

Another thing is, what do all of the blue lines represent, I know B,W and D but as per the screen shot some are doubled up and some don,t have any reference like those to the right of D !!

Many thanks for your help guys, it,s more than appreciated.

Regards

John

Screen Shot02 Nov. 16 18.23.jpg
 
Last edited:
Still not sure what you mean by "assigning". The "Assignment X-ref" is a passive display of what addresses are used in the program.

I know Binary, word and decimal but as per the screen shot some are doubled up and some don,t
The double (and sometime triple) vertical blue lines shows that you have overlapped usage of the Merkerbytes.
I think you are ignoring that a word covers 2 bytes and a doubleword covers 4 bytes. Also, it is bad style to start word and doublewords on uneven adresses.
For example M32.0 has been accessed in the program as MD30, MD31 and M32.0.
There are occasions where the possibility to access Merkers with overlapping adressing can be a used to the advantage. But in most cases you do NOT want adresses to overlap.
I have a feeling that your program is messed up because you havent taken these things into account.
 
Hi Jesper, many thanks for the reply, the program is from a spanish machine manufacturer and they are the same across most of our plant, theres not alot i can do with them other than rewrite the whole lot and start again. What I mean by assigning is to use the bit within the program thats free within the table, i.e M14.7

Regards

John
 
Last edited:
Does the program work ?

I see one possibility that you may be looking at something that does no represent the whole thruth.
If there is "orphaned" code in the program, i.e. code that is physically there, but never actually used because it is not called up, then it can account for the messed up adressing.
In order to find out that, you may have to investigate the program structure, i.e. what blocks are called, and what blocks are not. With that knowledge you can repeat generating the assignment X-ref, but this time with filtering so that only the active blocks are taken into account.

About the M14.0 to M14.7, I still dont understand. I am certain that you can address all these bits. What happens exactly ?
 
Hi jesper, there certainly is alot of code not used within the program, I think over the years the company has taken a generic program written for one machine and changed it to suit various others, not calling some FC,s and leaving the FC within the program. I,ve got a program which uses several FC,s called within OB1 and the ones not being used just left within the program blocks in S7 Manager. See screen shot 05

What i,m looking at is in screen shot 04, I,ve gone through from 14.0 to 14.7, as you will notice the end one has defaulted back to 14.0, this is the same across all of the MB,s

Regards

John

Screen Shot04 Nov. 16 19.08.jpg Screen Shot05 Nov. 16 19.14.jpg
 
I think that maybe the auto-suggest function plays with you.
When you type in the address, the editor looks up the symbol list, and suggest a match, which may be something else than you intend. You have to press ESC at a point to avoid accepting the suggested symbol. Auto suggestion can be turned off.
Also try to turn symbols off, and then try again to type in M14.7. This just to see what happens.
 
I'm thinking along the sames lines... make sure your options are set as follows, then you can enter anything you like instead of the red question marks.

berty009.jpg
 

Similar Topics

I am very new to Modbus and the industry, so forgive me if I am missing something obvious. I have known Modbus register addresses coming from a...
Replies
7
Views
284
I have a system using Rx3I CRU320 redundant CPU with Proficy Machine Edition Software. In the hardware configuration of each CPU module, under...
Replies
14
Views
439
See the screenshot of EIP tag list. We are trying to read in a digital input that is hard-wired. It is shown here as I31.1. I believe we cannot...
Replies
7
Views
312
Hello all. I have a Simatic SM374 (374-sxh01-0aa0) sim module. I am using TIA portal v.18. I can't find this module in my list of hardware devices...
Replies
12
Views
798
Hello, I have a device with 68 words input. But one block on the Devicenet Scanner is only 61 words. I am trying to map this device to 2...
Replies
3
Views
551
Back
Top Bottom