DB as UDT type

martin3885

Member
Join Date
Aug 2005
Location
Saarland
Posts
144
How can I update an DB created as UDT type. I mean I have UDT1 and then I created a DB1 as UDT1 type. Then I changes UDT1, so the data in DB1 are not valid any more. What should I do to update them, and not to create once again the same DB1?
 
Open the DB in declaration view, then use "File>Check and Update Accesses" which will resolve the out of date interface for the UDT. Now save the DB.
 
As with most Siemens software, there is another way. With the DB open in declaration view, right click on the line defining the structure which is also the line just above the one with the * on it. Select "Update Declarations" from the pop up menu. When it is done, save the DB.
 
Hi, the problem is that when I declare DB as UDT type there is no option "File>Check and Update Accesses", that is why I posted my post.
 
Re-create the DB or ....

You can delete the DB re-create it call UDT as reference and download to PLC,

If you dont want to lose the data and be able to restore values go online copy the DB to a Folder in your project.

THe update acceses is where there is a call to that DB, and after the change it is highlited in your code as red. You would have to update acceses in all of the functions where there is a link to the DB.

Regards

Rheinhardt
 
Last edited:
I see what you mean if you create a DB and create it as "DB of type" and then "UDT1" in your example. I do not know how to update this DB.

However, when I create a DB to reference a UDT, I create the DB as type "Shared DB". At this point, there is no relationship to the UDT. I then open the shared DB. I give it a symbolic name in the name column, then in the type column I type in the UDT name ("UDT1" in your case), and finally, clear/delete the value in the initial value column.

If you change from Declaration View to Data View (View -> Data View), you can see all the components of the UDT.

Now, if you change your UDT, you can update the DB using either the method Simon or I suggested in the previous posts. You will not need to delete the DB and recreate it.

Now I could not find anything on DB of type UDT. What is this used for that is different than the shared or instance DBs? Am I missing out on something?
 
A DB created of type UDT is similar to an instance DB. If you change the interface of an FB, the instance DB becomes useless and it must be re-created if you want to view it with parameter names. If you change the UDT interface, the DB has to be re-created.
 

Similar Topics

Hi all, Working on a project in Studio 5000 setting up a UDT to read an Input Instance from an EIP device. I have everything set up and it's...
Replies
2
Views
884
The PLC program I'm monitoring has a UDT of alarm booleans. 36 in total. What I'm trying to do is monitor a few rungs, and also monitor a possible...
Replies
3
Views
1,599
I have a project that requires messaging between two PLCs a few STRING, DINT, and INT values. We usually create something like a DINT[20] and...
Replies
9
Views
3,316
Hello, I made a UDT with DINT[50] and REAL[50] data types. I cannot seem to get the whole data type array to transmit. I can do all the dints...
Replies
4
Views
2,155
Hello, I am using WinCC Advanced V15 TIA (Runtime) and I want to create HMI user data type for PLC tags for third vendor PLC. WinCC RT...
Replies
0
Views
2,300
Back
Top Bottom