Host Engineering Forum
General Category => Do-more CPUs and Do-more Designer Software => Topic started by: Bolt on September 18, 2019, 03:15:51 PM
-
Is there a way in ladder logic to determine the size of a memory block? Say I want to know what the block size is on a string memory. SS.Max or something like that.
-
DATAINFO instruction. You can query the number of elements, the size in bytes of the block, the data type, et. al.
-
Thanks! You guys thought of everything!
-
Thanks! You guys thought of everything!
I try to utilize that in some of my FOR/NEXT code-blocks, whenever I know there's a good chance I will be tweaking the block size. I don't want to have to remember to change CODE if I change the size of a data block from 100 elements to 200 elements.
-
Exactly what I'm trying to do, anticipating a future memory block size adjustment, and building a queue system that will "never" get full.