Ò»¡¢ESC/POS ÃüÁÃ÷ϸ±í:
1.
STX B n ²¨ÌØÂÊÉèÖÃÃüÁî
ACSII Âë ¸ñʽ:STX B n
Ê®½øÖÆ ¸ñʽ:[002][066]n
Ê®Áù½øÖÆ ¸ñʽ:[02H][42H]n ˵Ã÷:¸Ä±äϵͳµÄ²¨ÌØÂÊ(Éϵ翪»úʱȱʡ²¨ÌØÂÊΪ:9600bit/s)£¬Õâ¸öÃüÁîÒ»°ã²»ÐèÓõ½£¬Ê¹ÓÃȱʡÉ趨¼´¿É¡£
0<=n<=3 48<=n<=51
30H<=n<=33H
ASCII n
Ê®½øÖÆ n
Ê®Áù½øÖÆ n
²¨ÌØÂÊ
0
48
30H
9600
1
49
31H
4800
2
50
32H
2400
3
51
33H
19200
2.
ESC @³õʼ»¯ÃüÁî
˵Ã÷:»Ö¸´µ½Éϵ翪»úʱµÄ״̬¡£ ĬÈÏ:ÓïÒô¿ªÆô£¬¸Äдģʽ£¬²¨ÌØÂÊΪ:9600bit/s¡£
ESC s n ÉèÖÃÓïÒô¿ªÆô
ASCII Âë ¸ñʽ:ESC s n Ê®½øÖÆ ¸ñʽ:[027][115] n
3.
ASCII Âë ¸ñʽ:ESC @ Ê®½øÖÆ
¸ñʽ:[027][064] Ê®Áù½øÖÆ ¸ñʽ:[1BH][40H]
Ê®Áù½øÖÆ ¸ñʽ:[1BH][73H] n ˵Ã÷:
(1) µ± n=30H ºÍ 31H :ÓïÒô¹Ø±Õ
0<=n<=4 48<=n<=52
30H<=n<=34H
4.
CLR ÇåÆÁÃüÁî
ASCII Âë ¸ñʽ:CLR
Ê®½øÖÆ ¸ñʽ:[012] Ê®Áù½øÖÆ ¸ñʽ:[0CH] ˵Ã÷:Çå³ýÆÁÄ»ÉϵÄËùÓÐ×Ö·û¡£
BS ×óÒƹâ±êÃüÁî
ASCII Âë ¸ñʽ: BS
Ê®½øÖÆ ¸ñʽ:[008] Ê®Áù½øÖÆ ¸ñʽ:[08H] ˵Ã÷:×óÒƹâ±ê¡£
HT ÓÒÒƹâ±êÃüÁî
ASCII Âë ¸ñʽ:HT
Ê®½øÖÆ ¸ñʽ:[009] Ê®Áù½øÖÆ ¸ñʽ:[09H] ˵Ã÷:ÓÒÒƹâ±ê¡£
5.
6.
(2) µ± n=32H£¬33H,34H :ÓïÒô¿ªÆô
7. LFÏÂÒƹâ±êÃüÁî
ASCII Âë ¸ñʽ:LF
8. HOM ÃüÁî
Ê®½øÖÆ ¸ñʽ:[010] Ê®Áù½øÖÆ ¸ñʽ:[0AH] ˵Ã÷:ÏÂÒƹâ±ê¡£
9. CAN ÃüÁî
ASCII Âë ¸ñʽ:HOME Ê®½øÖÆ ¸ñʽ:[011] Ê®Áù½øÖÆ ¸ñʽ:[0BH] ˵Ã÷:Òƶ¯¹â±êµ½ÆðʼλÖá£
ASCII Âë ¸ñʽ:CAN Ê®½øÖÆ ¸ñʽ:[024] Ê®Áù½øÖÆ ¸ñʽ:[18H] ˵Ã÷:Çå¹â±êËùÔÚÐС£
10. ESC C ÉèÖùâ±ê״̬ÃüÁî
ASCII Âë ¸ñʽ:ESC C n
Ê®½øÖÆ ¸ñʽ:[024] [067] [n] Ê®Áù½øÖÆ ¸ñʽ:[1bH] [43H] [n] ˵Ã÷:ÉèÖùâ±ê״̬¡£
11.US MD1 ÉèÖøÄдģʽÃüÁî
ASCII Âë ¸ñʽ:US MD1
Ê®½øÖÆ ¸ñʽ:[031] [001] Ê®Áù½øÖÆ ¸ñʽ:[1FH] [02H] ˵Ã÷:ÉèÖøÄдģʽ
12.US MD2 ÉèÖô¹Ö±¹ö¶¯Ä£Ê½ÃüÁî
ASCII Âë ¸ñʽ:US MD2
Ê®½øÖÆ ¸ñʽ:[031] [002] Ê®Áù½øÖÆ ¸ñʽ:[1FH] [02H] ˵Ã÷:ÉèÖô¹Ö±¹ö¶¯Ä£Ê½
0¡Ün¡Ü1 00H¡Ün¡Ü01H
n=0:¹â±ê¹Ø±Õ n=00H:¹â±ê¹Ø±Õ
n=1:¹â±ê´ò¿ª n=01H:¹â±ê´ò¿ª
13.US MD3 ÉèÖÃˮƽ¹ö¶¯Ä£Ê½ÃüÁî
ASCII Âë ¸ñʽ:US MD3
Ê®½øÖÆ ¸ñʽ:[031] [003] Ê®Áù½øÖÆ ¸ñʽ:[1FH] [03H] ˵Ã÷:ÉèÖÃˮƽ¹ö¶¯Ä£Ê½
12.US LF ÉÏÒƹâ±êÃüÁî
ASCII Âë ¸ñʽ:US LF
Ê®½øÖÆ ¸ñʽ:[031] [010] Ê®Áù½øÖÆ ¸ñʽ:[1FH] [0AH] ˵Ã÷:ÉÏÒƹâ±ê
14.US CR Òƶ¯¹â±êµ½×îÓÒλÖÃÃüÁî ASCII Âë ¸ñʽ:US CR
Ê®½øÖÆ ¸ñʽ:[031] [013] Ê®Áù½øÖÆ ¸ñʽ:[1FH] [0DH] ˵Ã÷:Òƶ¯¹â±êµ½×îÓÒλÖÃ
15.US CR Òƶ¯¹â±êµ½×îÓÒλÖÃÃüÁî ASCII Âë ¸ñʽ:US CR
Ê®½øÖÆ ¸ñʽ:[031] [013] Ê®Áù½øÖÆ ¸ñʽ:[1FH] [0DH] ˵Ã÷:Òƶ¯¹â±êµ½×îÓÒλÖÃ
16.US $ Òƶ¯¹â±êÖ¸¶¨Î»ÖÃÃüÁî
ASCII Âë ¸ñʽ:US $ n m
Ê®½øÖÆ ¸ñʽ:[031] [036]
[n] [m] 1¡Ün¡Ü20
m=1,2
Ê®Áù½øÖÆ ¸ñʽ:[1FH] [24H] [n] [m]
01H¡Ün¡Ü14H
m=01H, 02H
˵Ã÷:Òƶ¯¹â±êµ½µÚ m ÐУ¬µÚ n ¸ö×Ö·ûλÖà 17.US B Òƶ¯¹â±êµ½×îĩλÖÃ
ASCII Âë ¸ñʽ:USB B
Ê®½øÖÆ ¸ñʽ:[031] [066] Ê®Áù½øÖÆ ¸ñʽ:[1FH] [42H] ˵Ã÷:Òƶ¯¹â±êµ½×îĩλÖÃ
18. US s ²¥·ÅÖ¸¶¨¶ÎÓïÒôÄÚÈÝÃüÁî
ASCII Âë ¸ñʽ:US s n Ê®½øÖÆ ¸ñʽ:[027][118] n Ê®Áù½øÖÆ ¸ñʽ:[1bH][76H] n
˵Ã÷:²¥·ÅµÚ n ¶ÎÓïÒôÄÚÈÝ
ÓïÒôÄÚÈÝ:
1) ÉùÔ´:Å®Éù
2) ÄÚÈÝ:
µÚ 1 ¶Î:¡°Ò»¡±;
µÚ2¶Î:¡°¶þ¡±; µÚ3¶Î:¡°Èý¡±;
µÚ 4 ¶Î:¡°¼¶¡±; µÚ5¶Î:¡°¹¦ÄÜÂ롱; µÚ6¶Î:¡°´íÎó¡±; µÚ7¶Î:¡°Öظ´¡±; µÚ8¶Î:¡°³É¹¦¡±; µÚ9¶Î:¡°¹ØÁª¡±; µÚ10¶Î:¡°Ê§°Ü¡±; µÚ11¶Î:¡°²»´æÔÚ¡±; µÚ12¶Î:¡°ÇëɨÃ衱; µÚ13¶Î:¡°×·ËÝÂ롱; µÚ14¶Î:¡°´óÂ롱; µÚ15¶Î:¡°Ð¡Â롱; µÚ16¶Î:¡°ÖÐÂ롱; µÚ17¶Î:¡°Ò»¼¶¡±; µÚ18¶Î:¡°¶þ¼¶¡±; µÚ19¶Î:¡°Èý¼¶¡±;
1=n<=43 01H<=n<=2BH
µÚ20¶Î:¡°Æ´Ï䡱; µÚ21¶Î:¡°³é¼ì¡±; µÚ22¶Î:¡°ÁãÏ䡱; µÚ23¶Î:¡°Í˳ö¡±; µÚ24¶Î:¡°ÈÎÎñÍê³É¡±; µÚ25¶Î:¡°´ó°ü¡±; µÚ26¶Î:¡°Öаü¡±; µÚ27¶Î:¡°Ð¡°ü¡±; µÚ28¶Î:¡°1¡±; µÚ29¶Î:¡°2¡±; µÚ30¶Î:¡°3¡±; µÚ31¶Î:¡°4¡±; µÚ32¶Î:¡°5¡±; µÚ33¶Î:¡°6¡±; µÚ34¶Î:¡°7¡±; µÚ35¶Î:¡°8¡±; µÚ36¶Î:¡°9¡±; µÚ37¶Î:¡°0¡±; µÚ38¶Î:¡°¸ö¡±; µÚ39¶Î:¡°Ê°¡±; µÚ40¶Î:¡°°Û¡±; µÚ41¶Î:¡°Çª¡±; µÚ42¶Î:¡°Íò¡±;
µÚ43¶Î:¡°ÈÎÎñÍê³É¡±;
¶þ¡¢¾ÙÀý˵Ã÷:
1. ÇåÆÁ£¬ÔÚµÚÒ»ÐеÚÒ»¸öλÖÃÏÔʾ¡°¹¦ÄÜÂ롱£¬²¢·¢Éù¡£
ÏÔʾÆÁ½ÓÊÕµ½µÄÊý¾ÝΪ:0c 1b 73 32 1f 24 01 01 B9 A6 C4 DC C2 EB 1B 76 05
1.ÔÚµÚ¶þÐеÚÒ»¸öλÖÃÏÔʾ¡°ÇëɨÃ衱£¬²¢·¢Éù¡£
ÏÔʾÆÁ½ÓÊÕµ½µÄÊý¾ÝΪ:1b 73 32 1f 24 01 02 C7 EB C9 A8 C3 E8 1B 76 0C