
If you add a BOOL to a UDT, always add at least eight BOOLs together.
All other data types, including atomic types DINT (32-bit double integer), REAL (32-bit floating point) & LINT (64-bit long integer for date/time stamps), as well as all complex types, consume memory in multiples of 32 bits.
BOOLs consume 1 bit, SINTs (small integers) consume 8 bits or one byte, and INTs consume 16 bits or two bytes. CLx processors are 32-bit, so memory is handled in 32-bit chunks (the red lines in these screen shots indicate transitions between 32-bit words). Poorly ordering members wastes memory – it consumes bits in memory and network traffic that transfer no useful information.įollow these rules to optimize UDT memory usage: The order in which members of UDTs are listed determines their order in memory. UDTs may not be modified on-line. Changing them requires a download, so plan ahead! UDT Member Order Combine data to be transferred as one tag for processors-to-processor communication. Combine data to be transferred as one tag between AOIs (Add-On-Instructions). Reduce development time for multiple similar devices. User Defined Types (UDTs) allow data of different types to be combined into a single controller tag.
Note that Rockwell controllers in other families lack some of the features discussed below. These will collectively be referred to here as “CLx”.
#Rslogix copy int to two bytes series
This two part series focuses on using Rockwell ControlLogix, CompactLogix, and similar controllers programmed by RSLogix5000 / Studio5000.