News:

  • October 03, 2026, 07:57:48 PM

Login with username, password and session length

Author Topic: BRX Program Size  (Read 10521 times)

RBPLC

  • Hero Member
  • *****
  • Posts: 586
BRX Program Size
« on: July 22, 2019, 08:42:57 AM »
BRX documentation says that Ladder Memory (instruction words) for the BRX platform is 65,536. I am under that impression that this is the actual memory that is available to store the ladder code. I know that different instructions take up different amounts of memory but in general how many rungs of program code can be programmed into the BRX with the available 65,536 instruction words, say with a simple contact/coil on each rung? What is a general ratio of rungs ladder/instruction words? What I'm trying to understand is how large of a program can programmed into the BRX. I just don't have a feel for how large a ladder program can be generated with the available ladder memory.

ADC Product Engineer

  • Hero Member
  • *****
  • Posts: 270
Re: BRX Program Size
« Reply #1 on: July 22, 2019, 08:50:17 AM »
I haven't seen anyone use all of the available memory yet and I see a fair amount of customer programs.  It's all opcodes so it compacts very well into the storage space.  I sincerely doubt that you would write a program large enough using a single PLC to fill it up.

franji1

  • Bit Weenie
  • Host Moderator
  • Hero Member
  • *****
  • Posts: 3847
    • Host Engineering
Re: BRX Program Size
« Reply #2 on: July 22, 2019, 09:51:45 AM »
Basic contact/coil is 1 opcode word.  Good rule of thumb is about 1 opcode word per parameter.  Array references (X[V42]), floating point (3.14) and large integer values (12345678) take up 2 opcode words.  There are also "overhead" instructions with each code block.

The Status Bar of Designer shows the total Ladder memory used vs. the max size (see the attached screen shot).  That pane on the status bar will go yellow when you start getting close to the limit (very very very few programs get that close), and turns red when it is exceeded.

The actual amount may slightly vary (by a few words) when offline vs. online.  When the project gets written to the PLC when you are online, those "overhead" instructions are definitely set, and the total will be set to the actual size.

Final point, you can change the Ladder View to display code-block address offsets instead of rung #.  This setting can be tweaked in the Ladder View Options dialog.  You can then calculate the size of a specific rung based on its offset vs. the offset of the next rung.

See the attached screen shot that highlights the status bar info and the address offset display (note that string literal parameters take up 1 opcode word for every 4 characters of text).

RBPLC

  • Hero Member
  • *****
  • Posts: 586
Re: BRX Program Size
« Reply #3 on: July 22, 2019, 10:06:54 AM »
Thanks for the feedback guys. Didn't realize displaying the code-block address was an option for the Ladder editor.

ATU

  • Internal Dev
  • Hero Member
  • ****
  • Posts: 2126
  • YKPAIHA
    • ATU, Inc.
Re: BRX Program Size
« Reply #4 on: July 22, 2019, 10:23:13 AM »
That pane on the status bar will go yellow when you start getting close to the limit (very very very few programs get that close), and turns red when it is exceeded.

As capability increases, so do the applications.


ADC Product Engineer

  • Hero Member
  • *****
  • Posts: 270
Re: BRX Program Size
« Reply #5 on: July 22, 2019, 01:02:36 PM »
That pane on the status bar will go yellow when you start getting close to the limit (very very very few programs get that close), and turns red when it is exceeded.

As capability increases, so do the applications.

Pretty sure that you and couple of others on there are doing more with it than most.  :)