Sign in to follow this  
Followers 0
Tom749

the purpose and concept of Data Block in Siemens

4 posts in this topic

Hi, I have one question of the DB in siemens plc. What is the exact purpose and concept of DB in siemens plc? Thanks for your help or information of that in advance.

Share this post


Link to post
Share on other sites
The best use of a Data Block is data organization and transfer. For instance, with a data block you can store all data for a given system in one location. Below: DB1 Pump 1 Data Block Status | BoolRun Command | BoolRun Minutes/Hours | DIntDischarge Pressusre | IntSuction Pressure | IntTemp | IntOnce you have created the Data Block you can easily view all data in one location while online in the PLC. Not to mention if you had to send this data to a SCADA system you could just send DB1 instead of all the individual points. I know Siemens WinCC v7 SCADA package allows you to build faceplates that provide functionality with data blocks for ease of use. For instance you would build one faceplate and insert the data above like I have shown in the data block. Then tell the faceplate to poll DB1. The faceplate will automatically apply offsets as you specify for the data. I.e. Status would be DB1 offset 0.0.Run Command would be DB1 offser 0.1, Run Miuntes would be DB1 offset 1, and so forth. This way you can duplicate faceplates in a minute or two rather than 30 minutes.

Share this post


Link to post
Share on other sites
But isn't this the same thing as a structure? or user-defined data-type. Most other PLCs I've worked with refer to this as an instance of the data-type.

Share this post


Link to post
Share on other sites
I am now clear on this.. I come from using other PLCs where the distinction between variables and functions is handled better .. for example in Schneider's Unity-pro. The concept of data-blocks in the Siemens is the equivalent of either Function-block instances or merely data-structure instances. It is a little confusing for the newcomer to accept that the term data-block can be used to represent both. The generic words "variable" or "function" would have been better, instead of throwing them into a single descriptor called data-block. The distinction between them is made subsequently when the data-block is qualified either as a "Global-Data block" for mere UDT structures and "instance-Block" for instances of functions. At first reading, one is led to believe as if UDT's don't have instances! Unfortunate that the 'generic' description is not used. it only serves to confound the user. As far as variables go, PLC-tags in TIA portal need addresses. Now this isn't needed with data-blocks. I believe this is because, in addition to the function or variable's own name it also has an "address" %DBxy. To sum-up..Think in object oriented style.. 1. Global-Data Blocks..These are the "nouns". If you create a user data-types such as "Reactor" or Valve or "ingredient" you have to create the corresponding structure under "PLC data-type". This is needed for structured variables to be represented in dot-notation.. such as Reactor1.HeaderValve[7].OpenCmd = TRUE. Or LubeOilRecipe.Ingredient[11].CorrectionQty = 67.54. These could also represent arrays of user-defined data types. 2. For Instance-Data Blocks.. These are to be use for the "Verbs" Each function block that does something, has a behaviour. This is prototyped as a function-block. Suppose you've made a function block for temperature control that encapsulates the control behaviour.. This is defined as a function-block of type "Temp_Cont". Every instance of this for different temperature control, will be done by an Instance data-block of type "Temp_Cont"

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0