News:
Home
Help
Search
Login
Register
August 15, 2026, 04:26:25 AM
1 Hour
1 Day
1 Week
1 Month
Forever
Login with username, password and session length
Host Engineering Forum
»
General Category
»
Do-more CPUs and Do-more Designer Software
»
Finding Memory Block Size
« previous
next »
Print
Pages: [
1
]
Author
Topic: Finding Memory Block Size (Read 7696 times)
Bolt
Hero Member
Posts: 598
Finding Memory Block Size
«
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.
Logged
franji1
Bit Weenie
Host Moderator
Hero Member
Posts: 3843
Re: Finding Memory Block Size
«
Reply #1 on:
September 18, 2019, 03:24:12 PM »
DATAINFO instruction. You can query the number of elements, the size in bytes of the block, the data type, et. al.
Logged
There are only 10 kinds of people in this world: those who know binary, and those who don't
Bolt
Hero Member
Posts: 598
Re: Finding Memory Block Size
«
Reply #2 on:
September 18, 2019, 03:30:49 PM »
Thanks! You guys thought of everything!
Logged
franji1
Bit Weenie
Host Moderator
Hero Member
Posts: 3843
Re: Finding Memory Block Size
«
Reply #3 on:
September 18, 2019, 03:36:41 PM »
Quote from: Bolt on September 18, 2019, 03:30:49 PM
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.
«
Last Edit: September 18, 2019, 04:32:08 PM by franji1
»
Logged
There are only 10 kinds of people in this world: those who know binary, and those who don't
Bolt
Hero Member
Posts: 598
Re: Finding Memory Block Size
«
Reply #4 on:
September 18, 2019, 03:39:58 PM »
Exactly what I'm trying to do, anticipating a future memory block size adjustment, and building a queue system that will "never" get full.
Logged
Print
Pages: [
1
]
« previous
next »
Host Engineering Forum
»
General Category
»
Do-more CPUs and Do-more Designer Software
»
Finding Memory Block Size