[[Template core/front/global/updateWarning is throwing an error. This theme may be out of date. Run the support tool in the AdminCP to restore the default theme.]]
The Logix operating system supports array tags of up to 2 megabytes, which would be an INT[1048576] array. The software will warn you if you try to create a tag bigger than 1.5 MB, but it will be valid up to 2 MB.
Remember that arrays start with element zero. If you have an INT[32] type array and the element index number is [32] or bigger the controller will throw a minor recoverable fault.
I'm in the habit of testing the index value before I execute an instruction with a variable array index, like LEQ(IndexValue,31) in the ladder rung.
Some programmers are more thorough and use the SIZE instruction to determine the array size before putting in such a limit, so their limiting logic will still work even if the array size is changed later.
Thanks for detailed response and explanation.
Looks like I resolved that issue. Now I have last couple rungs of my routine where i want to add all values of my Array[52]. Any idea how to write the short formula for the CMP (Compute) instruction which will give me the SUMM (total decimal value) of all DINs in my Array[52]? I tried these options {Array[value]}; Array{value} and others but all returned with error. I dont want to write formula with summary of 52 values : Array(0)+Array(1)+........Array(52). I checked all manuals and instruction descripton so far found nothing. Do I missing something there? Thanks.
How long could be integer or DINT
in Allen Bradley / Rockwell Automation
Posted
Thanks for detailed response and explanation.
Looks like I resolved that issue. Now I have last couple rungs of my routine where i want to add all values of my Array[52]. Any idea how to write the short formula for the CMP (Compute) instruction which will give me the SUMM (total decimal value) of all DINs in my Array[52]? I tried these options {Array[value]}; Array{value} and others but all returned with error. I dont want to write formula with summary of 52 values : Array(0)+Array(1)+........Array(52). I checked all manuals and instruction descripton so far found nothing. Do I missing something there? Thanks.