Memory Allocation for PLC Programs

(note: PLC below refers to the AcroBasic PLC, not IEC PLC in 96xx series controllers)

PLC programs are created in the same manner as programs but are then compiled into machine code for high speed execution.

The memory allocation for the PLC must be of sufficient size to hold the text file and the compiled code. If there is not sufficient space for the code when it is complied, it will not run.

Each text instruction takes an average of 32 bytes of compiled code. So for each byte of text code, 3 times that is required for the complied code.

Example: If the PLC text file uses 300 bytes (check this with the MEM command), the memory allocation for the PLC should add 300 X 3 = 900 bytes for the compiled program code. Set the memory allocation for 300 + 900 = 1200 bytes, PLC 0 should have the following memory allocation:

DIM PLC0 1200

edit jw 3/2014