CommandsMemory storage
~HM - Host Memory Status
Returns printer memory status information to host
~HM - Host Memory Status
Overview
The ~HM command immediately returns memory status information to the host computer, providing details about total RAM installed, maximum available RAM, and current available RAM. Allows applications to monitor printer memory usage and availability in real-time.
Syntax
~HMParameters
None
Description
- Returns printer memory status to host
- Three comma-separated values in kilobytes
- First value: Total RAM installed
- Second value: Maximum RAM for user
- Third value: Current RAM available
- Useful for memory monitoring and management
Return Format
Returns three comma-separated values:
TOTAL,MAX,CURRENTValues Explained
| Value | Meaning | Example |
|---|---|---|
| TOTAL | Total RAM installed in printer | 1024 KB |
| MAX | Maximum RAM available to users | 0780 KB |
| CURRENT | Current available RAM | 0780 KB |
Examples
Request Memory Status
~HMReturns: 1024,0780,0780
Interpretation:
- Total: 1024 KB (1 MB)
- Maximum available: 780 KB
- Currently available: 780 KB (no objects stored)
After Storing Graphics
~HMReturns: 1024,0780,0500
- Total: 1024 KB
- Maximum: 780 KB
- Currently available: 500 KB (280 KB used by objects)
Usage Notes
- Processed immediately upon receipt
- Returns values to host via serial port
- Memory used by bitmaps NOT excluded from available value (due to ^MCN)
- Downloading graphics/fonts only affects third value
- First and second values constant after power-on
- Useful for tracking memory usage over time
Memory Management
When to Check
- Before downloading large graphics
- To verify successful deletions
- To monitor font storage
- To manage multiple users
Example Workflow
1. ~HM (check available memory)
2. ~DG... (download graphic if space available)
3. ~HM (verify memory decreased)
4. ^ID... (delete old graphic if needed)
5. ~HM (verify memory freed)Related Commands
^TO- Transfer Object~DG- Download Graphic^ID- Image Delete~HJ- Initialize Flash Memory