User defined type size in Logix 5000

AlfredoQuintero

Lifetime Supporting Member
Join Date
Feb 2015
Location
Yokohama
Posts
1,533
Hello. This is a really basic question. I am puzzled by the data type size reported for a user defined type with eight one-bit elements. Why is this user data type 4 bites as opposed to one byte?
Will be grateful for some clarifications.

UserDataTye20200705.png
 
The minimum size for a User Defined Type (or really any data type) is 32 bits. If you keep adding more BOOL tags you will see that size stay constant until you reach 33 BOOLS, and then it would jump to 8 bytes.

Keep in mind that how you organize them makes a difference too. For example if I had:

BOOL (bit 0 in byte 1)
BOOL (bit 1 in byte 1)
BOOL (bit 2 in byte 1)
DINT (bits 0 - 31 in byte 2
BOOL (bit 0 in byte 3)
BOOL (bit 1 in byte 3)
DINT (bits 0 - 31 in byte 4)

That would require 16 bytes. But if we rearranged it to:

BOOL (bit 0 in byte 1)
BOOL (bit 1 in byte 1)
BOOL (bit 2 in byte 1)
BOOL (bit 3 in byte 1)
BOOL (bit 4 in byte 1)
DINT (bits 0 - 31 in byte 2
DINT (bits 0 - 31 in byte 3

That would require 12 bytes,

OG
 
Last edited:

Similar Topics

Guys, I need some advice. I'm trying to use for the first time "UDT" on a CLX processor. I have this pneumatic valve with an E/P transducer that...
Replies
18
Views
5,106
hello every one as i am new to this forum i want to know detial of udt in rslogix 5000 does all tags in udt get in my program? if i have to write...
Replies
6
Views
15,941
A while ago I heard that v.15 of CLX will allow Online Edits of user-defined data types. Can anyone confirm or deny that?
Replies
8
Views
4,725
Hi in rslogix 5k Why cant i add 2 Dim array inside a user defined data type(data structure) ? Thanx
Replies
2
Views
3,924
1) I am poor 2) I have written some useful plc code in the past 3) Anyone here ever try and sell a user defined FB?
Replies
29
Views
6,560
Back
Top Bottom