UDT Data Type Size Mismatch - Studio5000

dcap11

Member
Join Date
Mar 2023
Location
CT
Posts
2
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 transferring data correctly. However, my UDT "Data Type Size" does not make sense.

I have a total of 210 bytes of data assigned in my UDT. These are full bytes so every space is occupied. The Data Type Size is showing 212 bytes however. I understand that UDTs use a base of (4) bytes so that is why it is rounding its size up to 212 bytes. The weird part is if I add any additional element to my UDT (whether it be a bool, sint, int, or dint) the Data Type Size is increasing to 216 bytes. Even though I technically still have 2 bytes of unused data in my UDT.

Any insight? Hopefully the description makes sense.

Thanks!
 
Probably because of the order of your UDT members. You may have '2 bytes of unused data' but that data is not necessarily available at the end (or wherever you are currently trying to add new data).

See the section 'UDT Member Order Impact' in the Logix 5000 Controllers Design Considerations manual

Thank you! That is exactly it. I had (6) bytes worth of data registered as sints before I started using dints. So it finished out those last two bytes for the total size. Makes sense.
 

Similar Topics

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,324
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,160
Hello! I am completely new to PLCs, so I apologize in advance if this is a dumb question. I have a device that sends out its data as a number of...
Replies
5
Views
2,146
I created a UDT with recipe parameters and have created several Recipe tags using that UDT as a data type, as well as an "Active_Recipe" tag. if...
Replies
1
Views
1,763
Ok, I am having a tough time with an application and figuring out how the best way would be for me. So here is what I would like to accomplish: I...
Replies
28
Views
9,303
Back
Top Bottom