Issue:
TGP program size limit and MP580/581 memory limitations
Resolution:
Absolute Memory = 256K
The capacity of MP580 memory (TGP program storage area) totals 256K. No more than 8 programs of 32K (8 x 32K) can be stored in the MP580 (The rcf file stores in the memory area are separate from TGP storage are in the MP580/581). If a TGP download fails because not enough memory remains, a diagnostic 'Program Download Fail (6)' is generated. Note that previously downloaded TGP programs executed in the MP580 execute at specified intervals. For example, several programs executing every 5 seconds require as much as 30% of memory resources limiting the amount of memory available when attempting a program download. A download will produce a CRC error and fail message.
File download errors occurring after the download process has started (check the comm LED on the MP580) will also pop up an error. These errors typically indicate a communication problem, either noise, wire type or termination resistance, OR it may indicate that the MP580 is too busy to handle communication with large files.
Performance Issues and Memory Low Limit (30%)
Some TGP blocks need to retain information in memory as saved values. There is an absolute limit of 32 saved values per program. This limit is reflected as 'resources available' in the program properties window. Pushing this value close to 0 for many programs can affect overall performance. However, how much performance is affected depends on how frequently the programs run and also on how much demand is placed on the processor by other programs and applications (PID, scheduling, calculations, etc).
It is impossible to give a definite answer as to where performance will start to suffer. A lower limit of 30% has been mentioned as a practical guideline. If you are concerned about performance don't run programs any more often than is really needed. To a certain extent, combining functions together in a single program rather than several smaller ones can reduce overhead and make performance more predictable (although not faster). There are limits to this approach.
The 580 is pretty robust. Where you might have problems is in running several programs often (like every 5 seconds) with timing blocks. The blocks may not be able to keep time. These timing blocks take up the most resources. As long as these programs are running properly, you should be fine.
This is from MP580 FAQ:
Program Size Limitations
There are 5 limits to program size:
1. A total of 5 pages. This will not typically stop a program as the programmer can change paper size.
2. The size of the TGP file may be large enough that it cannot be downloaded. This is file which contains the story or information on the editor screen. It is not the file used by the MP580 to control outputs and equipment. More explanation follows.
3. There are values that need are saved between program runs, these are called saved values. There are 32 saved values. More explanation follows.
4. Within each program there are local variables. Local variables are updated every time the program runs but are not saved between program runs. Each program is allowed a maximum of 256 local variables. This total includes explicit items like wireless connections and interim variables hidden inside of blocks. While there is no alarm or warning for this condition, it is very difficult to exceed this limitation.
5. Storage space available to store programs. There is no per program limit, but there is a total program space limit.
TGP File Size
32 kB is the maximum file size which can be downloaded via Lontalk. Before the TGP file is downloaded, it is compressed. If the compressed file size is greater than 32 kB, the editor will not even attempt the download. The communication LED on the MP580/581 will not come on (stand alone device only). The size limitation does not affect the size of the saved TGP file.
The compression algorithm has a compression ratio of 2.0 to 3.0. If there is a lot of text in the program, either comments or description, the compression ratio tends to be higher. However, youve used space on something not controlling the equipment.
The TGP program file may not be downloaded if the saved file size is greater than 55 kB. Check in the TGP directory of the root drive to see the file size.
Saved Values
As discussed previously, there are 32 saved values per program. They are used within blocks structures to maintain information between program runs, so cannot be adjusted directly by the user. Below is a table of relevant blocks and the amount of saved values used by each.
| Block Name | Saved Values | Uses | Notes |
| Delay on Start | 2 |
State Counter |
Used in timing situation as a substitute for PCL counter. These are used in special timing situations, alarm feedback special situations. |
| Delay on Stop | 2 |
State Counter |
Used in timing situation as a substitute for PCL counter. These are used in special timing situations, alarm feedback special situations. |
| Latch (manual) | 1 | State | Manual alarms, TOV |
| Latch (timed) | 3 |
State Trigger Counter |
Used with timed override applications, special timing situations, alarm feedback special situations. |
| Feedback Alarm | 4 |
delay on start input state latch state count |
This will appear in any program handling fan, pump status. Common to air handlers and cooling towers. |
| Deadband (hysteresis) | 1 | state | Often used in conjunction with staging, alarm conditions. |
| PID (feedback input) | 1 | count | Automated control of speed, position, value |
| PID (no feedback input) | 2 |
Count Feedback input |
Automated control of speed, position, value |
.
Notes:
Changes:
Other Question/Problem/Cause Statements:
- TGP program size limit and MP580/581 memory limitations
- Does a TGP program size limit exist?
- How many TGP programs can be stored in an MP580/581?
- MP580 memory for TGP - I'm down to 2%, will that be a problem?
- Program Download Fail (6)
- Program replacement failed
- How low can the MP580 available memory get? 10%
- Debug fails, program was not at a break
Facts:
- TRACER MP580/581 TGP program sizing is explained in the attached frequently asked questions (FAQ) document.
- Caller has written a TGP program with a file size of 56K prior to downloading. When the program downloads, it compresses to 32k.
- Tracer MP580/581
- Rover Service Software
Additional Technical Support Only Information
Original wave: wave2044
Document Identifier: DOC-80170
Document Identifier: 80170