S7-Data Blocks

Shadley

Member
Join Date
Sep 2009
Location
Cape Town
Posts
3
Hello

I bought a couple off books in the past on PLC's including your books 'Phill' but nothing really explains applications and real examples on how, where and when you will be using Data blocks.
How does it work when doing alarm messages or any data like motor speed and temperature. Is there a way that someone can explain to me the process from your normal function blocks to your data blocks and back on how i would use data blocks in a application, please?

šŸ™ƒ
Thank you
 
Last edited:
Simple example can be Machine temperature. An Analog Input needs to be connected to PLC (say 4-20mA) which corresponds to 0-50 Deg C Temperature. You may use Scale instruction and at the output field of the scale instruction you can use DB (e.g. DB30.DBD0 (This is real type Database) address you want to assign. This address you can use for future calculations or show it on HMI. Without DB you wont be able show temperature in Floating point format.
 
Thank you for the quick reply.Is there any examples of motor speed or temperature control that uses Db's and displays that i can have a look at, would help me a lot?

Thanks a lot
 
The way that I think of DB's is just like a scratchpad to hold variables (they can be so much more than this but this isn't a bad way of thinking of them initially). So, instead of using marker bits, marker bytes, marker words and marker double words (Mx.x, MBx, MWx, MDx) you can:
Create a datablock
Add lines to it to denote each address you want to store in there
Define what 'data type' each address is going to hold (eg. word, bool, byte etc)
Then address them from your program and use them to store information just the same way you'd use markers.

In DB's the addressing is:
Bits - DB*.DBX*.* (eg. DB1.DBX10.0)
Bytes - DB*.DBB* (eg. DB1.DBB10)
Words - DB*.DBW* (eg. DB1.DBW10)
Double Words - DB*.DBD* (eg. DB1.DBD10)

Hope that helps... ;-)
 

Similar Topics

Hi everyone, I am normally not in Siemens PLCs, so I have a relatively beginner question. In a data block (DB3), I added a few rows to it. When...
Replies
8
Views
1,941
Hi everyone i have uploaded some machine programs, what i noticed is that the programmer puts the inputs in a data block and work with this data...
Replies
14
Views
4,820
Hello everyone, As you can see in the screenshot below i have some values that are retentive. Now i want to create a specific value for specific...
Replies
5
Views
1,465
Hello all, I am trying to read DB values from an S7-300 with CPU 317-2 DP. I have done this before with a CPU 313C but it had a CP 343-1 Lean...
Replies
14
Views
4,753
I have a function block (FB1) which uses internal tags and has made a data block (DB1). I have a created a PLC data type with around 15 tags and...
Replies
2
Views
1,672
Back
Top Bottom