Siemens S7/TIA v16: Don't quite understand the M-bit naming convention...

Yes DB's are datablocks, unlike Mitsubishi which are fixed i.e. D0 - D1000 or whatever DB's are configured & downloaded these can be different lengths depending on how many registers you need, unlike Mitsubishi which are 16 bit (32 if it's a real but for example D20 + D21 would be a 32 bit register).
In Siemens these can be configured as bits/bytes words double words ,string, floats etc.
It sort of works the same way but the addresses within the DB depend on the type.
I don't have S7 on this PC but it will take a little time to understand how it all works.
 
Yes DB's are datablocks, unlike Mitsubishi which are fixed i.e. D0 - D1000 or whatever DB's are configured & downloaded these can be different lengths depending on how many registers you need, unlike Mitsubishi which are 16 bit (32 if it's a real but for example D20 + D21 would be a 32 bit register).
In Siemens these can be configured as bits/bytes words double words ,string, floats etc.
It sort of works the same way but the addresses within the DB depend on the type.
I don't have S7 on this PC but it will take a little time to understand how it all works.

Nice one - thanks for the info.
 
Also be aware that with S7-1200/1500 Siemens has introduced the concepts of 'optimized' and 'non-optimized' data. When 'optimized, the actual address location is hidden from the programmer. Everything is then symbolically addressed. To transfer data between variables or structures of different types, you have to jump through some hoops.
The default is that data is 'optimized'.
 
Found out this the hard way. Be aware of activating clock bits.


I'll toss in a second vote for something JesperMP said above.


The general "best practice" is to only use M-bits for system byte, clock byte, and quick test changes. It makes it really easy to know if you have things you still need to clean up, if there are any M tags left.


Tags local to the FB/FC whenever possible, and DBs for everything else is the way. Except IO obviously, still use your Is and Qs.
 
Not sure about S7 TIA as I generally use nearly all DB words/bits, on the Older S5 M bits were none retentive, perhaps you can now define a range to make them retentive, Years ago I would copy them to a DB at the end of scan then on a re-start copy them back.


Merkers can be retentive on 300/400 and on 1200/1500.

On 300 it is selected on PLC hardware properties and on TIA portal selection is on PLC tags editor.


As Merkers share MB byte area (and also MW, MD, MF areas) they are saved when retentive byte area is selected bigger.

TIA_1200_retain_memory.jpg
 

Similar Topics

In OB1, I'm monitoring some values (first pic). The values are what I expect. At the same time, I'm monitoring the same values in the DB where...
Replies
1
Views
650
Siemens S7/TIA v16: "Overwrite if object exists online?" HMI loading message... Thus far, I've just been ticking this box, just to get the HMI...
Replies
4
Views
769
I'm having a bad day. Daft question coming up...Anyone know why I can't add anything into this DB? Add button is greyed-out. Thanks
Replies
14
Views
1,597
I imported a customised shape into the project, but I don't know how to actually add into on to a specific HMI screen. Do I use the Graphics menu...
Replies
2
Views
661
Hi I'm trying to display a value on the HMI. In monitor mode on the code, I can see that value, but on the HMI , after downloading, it is...
Replies
10
Views
947
Back
Top Bottom