
Technical Updates SNBC CONFIDENCIAL
Shandong New Beiyang Information Technology Co.,Ltd.
Page 49
3.3.4 Status inquiry
User may check the printer status (normal or error) through real-time status inquiry when error (paper
end, printhead open, cutter error, paper jam etc.) occurs.
1. Real-time status transmission
(
10 04 n
)
command: This command is automatically enabled when
the printer is turned on or when error occurs after printer is powered on. Note: during printing with
printer driver, the real-time command cannot be transmitted for status inquiry.
2. Automatic status back
(
1D 61 n
)
If the ASB command is enabled, the printer will automatically transmit its status under specific
condition.
The details refer
to
1D 61 n
command.
3.3.5 Download bit images
One or more bit images can be downloaded into RAM and nonvolatile memory (NV). Bit images in NV
are retained when the printer is powered off, but those in RAM are cleared when the printer is turned off
or initialized by using command
1B 40
. Therefore, Therefore, the users need to download the bit images
into RAM again whenever the printer is restarted.
Refer to command
1D 2A
(
download bit images into RAM
)
and
1C 71
(
download bit images into NV
)
for detailed information on how to perform the download. In both RAM bit image download and NV bit
image download, a number must be specified for the image to be downloaded. Please read carefully the
commands
1D 2A
and
1C 71
for
the difference between
RAM bit image download and NV bit image
download.
Bit image data processing by taking an example of BMP format bit images:
1. The data is arranged in column data type in the bit image download command. Refer to command
1D 2A
and
1C 71
for details.
2. BMP format bit image data is arranged in line data type. Normally, a monochromic BMP image is
made of sixty-two (62) bytes of BMP image attributes description (including bit image width and
height etc.) and normal image data. The BMP image data is arranged in integral multiple of 4 bytes.
For example, if the width is 34 dots, 8 bytes instead of 5 bytes are needed to store the data.
Therefore, the total amount of bytes that a bit image occupies in the memory is “(Line width in
bits+31)/32*4 * line height in bits”
Below is an example written under VC++ environment (for reference only):
Note: A non-monochromic BMP image must be transformed into a monochromic image, otherwise the
data processed shall not be correct. Because the printer needs vertical data in downloading bit
image, both the height (in pixels) and width (in pixels) of BMP image shall be multiple of eight (8),
otherwise the printer may not be able to handle the data correctly.
//************************************************//
//Function: AntiRotateBmp90D //
// Utility: Transform bmp format bit image into printer processable data //
// Parameter: pBmpData--- Pointer to source data //
// nPixelsOfWidth----bit image width
(
dots
)
//
// nPixelsOfHeight---bit image height
(
dots
)
//
// pBmpDataRotated---Pointer to target data //
//Back value: 1:data transformation success 0: data error //
//************************************************//
int AntiRotateBmp90D(
char *pBmpData
,
const int nPixelsOfWidth
,