Mitsubishi Q02 Memory Problem

tgoulding

Member
Join Date
Jan 2005
Posts
84
I've got an application with a Mitsubishi Q02 PLC (standard RAM no additional memory cards) and we are using GX Developer Version 8 to program it with. The program at present has 11 program files totalling 9,246 steps approx.( 9 off Ladder 7,312 steps, 2 off Structured Text 1,934 steps) of the CPU 28K steps program capacity.
When I look at the PLC free space online it shows a little over 9k Bytes left (Not sure of memory capacity in Bytes, think its around 100K Bytes). About 37K Bytes of the used memory is taken up with 'Label Program (ST, FB, Structure)' which is available as a check box when wriing to the PLC. Is this an overhead for using Labelling, Function Blocks and Structured Text or can it be unchecked (i.e. not necessary to write to PLC) when writing to the PLC to free up memory.
We've recently added some more code to the project and got a disk capacity error when writing to the PLC. Does this mean we have to add a memory card to increase our capacity and if so do we treat it the same as if writing to standard memory.
Sorry for posing some basic questions as I spend 99% of my time on Allen-Bradley PLC's. Any help or pointers would be appreciated.
 
Last edited:
tgoulding said:
About 37K Bytes of the used memory is taken up with 'Label Program (ST, FB, Structure)' which is available as a check box when wriing to the PLC. Is this an overhead for using Labelling, Function Blocks and Structured Text or can it be unchecked (i.e. not necessary to write to PLC) when writing to the PLC to free up memory.

You can uncheck this but it will mean that you cannot make online changes to Function Blocks or Structured Text.

tgoulding said:
We've recently added some more code to the project and got a disk capacity error when writing to the PLC. Does this mean we have to add a memory card to increase our capacity and if so do we treat it the same as if writing to standard memory.

Adding a memory card will not give you more space for the user program (ladder, SFC, FB or ST). I assume that the disk capacity error occurred when an attempt was made to add more program steps.

Try reducing the amount of memory allocated to devices, Device settings page in the PC parameters window.

The Q series stores programs as separate files in the PLC memory (e.g. program "MAIN" is saved as main.qpg, program "INPUTS" is saved as inputs.qpg, etc.) each program saved to the PLC has additional space added for online changes. Therefore if you have many programs you will have a large amount of memory allocated to online changes compared to when only 5 or 6 programs are saved to the PLC. You currently have 11 programs, could you combine some of these programs into one single program? This would free up a substantial amount of memory.
 
Thanks for your reply, I will certainly look at combining some of the program files to reduce memory usage.
If the memory cards are not used for user programs then what are they used for. Also can the user program memory be expanded or added to or do you have to go to the next processor up to get more user program memory.
 
The memory cards come in various types. Some you can use to hold a "master program" that is copied to the CPU program memory area when booting up. Some cards can be used for storing data in CSV type format. You can also use memory cards for "R" register devices.

Within the CPU, you have three memory areas: program memory where the actual running program is kept and also the device memory (M's, D's, T's, etc.) and parameters; next comes standard RAM where you can keep R register devices; and finally comes standard ROM where you can keep a master program than can transfered to program memory on boot-up.

Get a copy of the Q series "Function Explanation, Program Fundamentals" manual (try www.meau.com) and try reading it. Be warned, this manual is horribly written! BUT it does contain very very important information. Keep a copy in your toilet, to read a little bit at a time (not to wipe your arse with!).

One tip, if you have registers that must be battery backed up, make use of the R registers in standard RAM instead of only using D registers. The standard RAM is big and rarely gets used by many programmers. This way you can reduce the amount of program memory assigned to D registers. Also, the standard amount of program memory assigned to all devices is guite generous and can easily be pruned to give more space for the user program.

Next tip, FB's in GX Developer are terrible and waste program memory. Only use them when you have to.

I haven't used label programming much in GX Developer. For my applications there isn't much benefit to use it. Also in GX Developer 8 you can make your own data types (Mitsubishi call them structures) but you can't pass them directly to subroutines or FB's (so they are pretty useless too!)

If only Mitsubishi would hurry up and integrate GX Developer and GX IEC Developer (obviously taking the best bits from both)...

(EDIT: I missed your last question. If you still can't free up enough program memory, there is no choice but to buy a Q06H instead, sorry)
 
ushidayo said:
The Q series stores programs as separate files in the PLC memory (e.g. program "MAIN" is saved as main.qpg, program "INPUTS" is saved as inputs.qpg, etc.) each program saved to the PLC has additional space added for online changes. Therefore if you have many programs you will have a large amount of memory allocated to online changes compared to when only 5 or 6 programs are saved to the PLC.

I think it is waste of time to combine programs.
Just adjust online change memory steps isntead to each prog. If you do not have to make online changes to some programs, you can set online steps to 0. You save memory. Those settings are in transfer menu. Select next sheet when you have selected programs to download.
 
Last edited:
Thanks for previous tips. With regard to label programming, in order to program using Structured Text you must enable label programming when initially setting up a new project, this also gives you function block capability, its an all or nothing scenario.
Also when carrying out on-line changes I get a 'Write-Run Maintenance Steps' notification, which seems to count down after each change towards zero. The manual is a little fuzzy on this. Is there a limit to the number of on-line changes and how is the starting value reset. I know when it gets to zero a dialog pops up to allow you to increase.
 

Similar Topics

We have a Q02 PLC which is meant to have 28K Steps of program memory, we have seven progams with the following step sizes; Program 1 3076 steps...
Replies
2
Views
7,041
Hey guys! I´ve been asked to install a SRAM-card in said CPU. But since i´ve not had any training in Mitsubishi CPU´s, i´m a bit confused on how...
Replies
0
Views
1,865
Hi All, I'm now working with PLC CPU Mitsubishi..CPU spec is Q02(H) CPU.. In this system there have networking Net-H (QJ71LP21-25) and master...
Replies
2
Views
9,169
hi all, i'm new here. thank god i found this forum. i've been stuck with my university project for days, it's this, i've been assigned to do a...
Replies
8
Views
5,415
I need to store some setpoint values in a Mitsubishi Q02 PLC that don't get lost after a power loss. I've been told I need to use the 'ZR'...
Replies
1
Views
7,633
Back
Top Bottom