AllenBradley DINT preferred datatype

Sancho

Member
Join Date
May 2016
Location
Germany
Posts
6
Hi!
It is always said, that DINT is the most performant datatype in AB plcs.
I while ago i made a performance test. Several instructions like ADD, SUB, EQU and so on in a loop repeated 50000 times.
The difference between the different datatypes was neglectable. (excepting operations with REAL types)

I made a second test, the same operations but without a loop. This time in Structured Text, each instruction copied a few thousand times. Also no noteworthy difference in cycle time.
But what i found out, the used program memory increased clearly.

The thing is, our main PLC platform is Siemens. In Siemens they use nearly all available datatypes depending on what fits best. Up to now, i always replaced everything with DINT when converting Siemens programs to AB. I was afraid of performance issues.

Has anybody ever thought about this or is everybody just using DINT`s?
 
The usage of DINT is preferred for individual tags because, since it is a 32-bit processor, memory is accessed in 32-bit chunks -- if you assign eg an INT, SINT, etc the remaining bits of the 32-bit word is wasted since you cannot actually access it.

If you are using arrays or UDTs then the individual members will be packed together in memory, potentially resulting in savings when using the smaller data types (though with UDTs you have to optimize it yourself).

tl;dr You can save memory by using smaller data types in arrays/UDTs, but in general there's little reason to use them otherwise.
 
This is a thread from many years ago that discussed this topic:

http://www.plctalk.net/qanda/showthread.php?t=6826

The conclusion was...it was very situation dependent even back then. Keep in mind this was all done on processors that are now four generations old. I would imagine any differences that exist now are pretty minor. So I would say used the data type that you want in any given situation. Just don't expect it to save you any memory unless you are working with arrays or (properly laid out) UDTs as plvlce already stated.

Keith
 
I use what suits the application best, but when it comes to integers it's DINT because there's no penalty in doing so.



if you assign eg an INT, SINT, etc the remaining bits of the 32-bit word is wasted since you cannot actually access it.


Obvious caveat to this being where you're trying to communicate with other platforms (like SLC, for example).
 

Similar Topics

Hi guys, I have no experience when working with AllenBradley PLC, but I hope someone could clarify the result of multiplication shown in the...
Replies
14
Views
2,198
Hello everyone! Posting from Argentina as I don't know what else to do. For a bit of context, I am using an Allen-Bradley Micro850 PLC and five...
Replies
16
Views
10,451
Hi, I want to communicate slc5/03 cpu with Delta tp04 hmi through rs232 port. I tried through 1747cp3 cable directly but can not communicate...
Replies
0
Views
932
I don't do much in the Allen Bradley world. I have a customer that has some old Allen Bradley hardware. The encoder cable got ruined and it seems...
Replies
8
Views
3,074
Hi there, I have an application where I’m required to connect Siemens S7-300 PLC (Profinet) to Allen Bradley Control Logix Remote I/O Rack &...
Replies
11
Views
3,656
Back
Top Bottom