You are on page 1of 11

International Currency Technologies Inc.

ICT-Ticket Printer Protocol


Communication Specification

Version: SWD-05
Ticket Printer

Change History
Title Ticket Printer Protocol Communication Specification
Published ICT, Department of Software Development
Item Version Date History Modify Comments
1 01 2010.10.19 First Edition Niki
2 02 2010.11.16 Change Cmd 44, 45 Niki
3 03 2011.03.25 Add Load Logo Cmd Niki
4 04 2011.05.18 2 Bytes of Data Length Niki
5 05 2011.05.31 Add Cmd 47,48 Niki

Page 2 of 11
Ticket Printer

Table of Contents
1. General Information .................................................................................................................... 4
2. Communication Format............................................................................................................... 4
2.1 Transmission Format......................................................................................................... 4
2.2 Command Format (Sending Command: Controller  Peripheral).................................. 4
2.3 Response Format (Response Status: Peripheral  Controller)........................................ 4
2.4 Timing Diagram ................................................................................................................ 5
3. Command .................................................................................................................................... 6
3.1 Command Table ................................................................................................................ 6
3.2 Command Detail ............................................................................................................... 7

Page 3 of 11
Ticket Printer

1. General Information
This specification describes the operation of Ticket Printer Interface Protocol.
It is regarding to the data for the interface between Controller and ICT product.

2. Communication Format
2.1 Transmission Format

Method Full Duplex


Baud Rate 9600 bps
Data Bit Format Start Bit 1 Data Bit 8
Parity Even Stop Bit 1
Total Bits 11

2.2 Command Format (Sending Command: Controller  Peripheral)

DA SA FID CMD LNG DATA FCC


DA 1Byte : Destination Address
SA 1Byte : Source Address
FID 1Byte : Function ID (Interface)
CMD 1Byte : Command
LNG 2Byte : Number of Data bytes
Data 0-65535Byte : Required for command
FCC 1Byte : Frame Check Code
FCC=DA ^ SA ^ FID ^ CMD ^ LNG1 ^ LNG2^ DATA

2.3 Response Format (Response Status: Peripheral  Controller)

DA SA FID ST LNG DATA FCC


DA 1Byte : Destination Address
SA 1Byte : Source Address
FID 1Byte : Function ID (Interface)
ST 1Byte : Status Code
(10H: Response Data, 11H: ACK, 55H: NAK,
FFH: Checksum Error)
LNG 2Byte : Number of Data bytes
Data 0-65535Byte : Required for command
FCC 1Byte : Frame Check Code
FCC=DA ^ SA ^ FID ^ ST ^ LNG1 ^ LNG2 ^ DATA

Page 4 of 11
Ticket Printer

2.4 Timing Diagram

Power On

Start Communication

Tc

Tc : Min 1s

Controller
CMD CMD

Response
Peripheral

Tr Ts

Tr : Max 10ms
Ts : Min 30ms

Page 5 of 11
Ticket Printer

3. Command
3.1 Command Table
Command List
Function Baud rate Command Sub-Command
Self Test 40H(64) ------
Setup 41H (65) ------
Save Logo 42H (66) ------
Delete Logo 43H (67) ------
Define Font 44H (68) ------
Print 45H (69) ------
Poll Status 46H (70) ------
9600bps
Request Print Validation Number 47H (71) ------
Clear Print Validation Number 48H (72) ------

Page 6 of 11
Ticket Printer

3.2 Command Detail

(1) Command : [40H] Self Test


Data : 0 Bytes
Ex. [52][01][44][40][00][00][57]
Response : ACK [11H]
Ex. [01][52][44][11][00][00][FCC]
Controller uses this command to self Test.

(2) Command : [41H] Setup


Data : 0 Bytes
Ex. [52] [01][44][41] [00] [00][56]

Response : Response Setup Data [10H]

Data : D1~D23

Ex. [01][52][44][10][00][1F][D1][D…][D23][FCC]
D1-D3 = Manufacturer Code 3 bytes ASCII
D4-D23 = Software Version 20 bytes ASCII
Controller uses this command to get information.

(3) Command : [42H] SAVE LOGO


Data : 72 Bytes [48H]/EACH LINE
TOTAL LINES: 1024

Ex. [52][01][44][42][00][Logo Number]


[48] [D1][D…][D72] //Line#1
[48][D1][D…][D72] //Line#2
[48][D1][D…][D72] //Line#3
[48][D1][D…][D72]
……………………
……………………
[48][D1][D…][D72] [FCC] //Line#1024

Response : ACK [11H]


Ex. [01][52][44][11][00][00][FCC]
Controller uses this command to save logo picture to TP.
One logo picture needs space 0x9000 = 36864 Words = 73728 Bytes
TP can save 5 logos.

Page 7 of 11
Ticket Printer

(4) Command : [43H] Delete Logo


Data : 0 Bytes
Ex. [52][01][44][43][00][01][Logo Number][FCC]
Response : ACK [11H]
Ex. [01][52][44][11][00][00][FCC]

Controller uses this command to Delete Logo.

Line#

(5) Command : [44H] Define Font


Data : 53 Bytes [35H]
[Line0][ High and Width][Font Size][Position][ Location]
[Line1][ High and Width][Font Size][Position][ Location]
…………………………………………………………………………….
[Line9][ High and Width][Font Size][Position][ Location]
[Line11][Print with/without background logo][logo#][ FCC]
High and Width:
00: Normal
01: High * 2
02: Width * 2
Font Size:
00: 8 * 8
01: 16 * 16
02: 24 * 24
03: Print Barcode
Position:
00: Align in Centers
01: Align in Right Side
02: Align in Left Side
Location:
0-31
Page 8 of 11
Ticket Printer

Print with/without logo picture:


0: without logo picture
1: with logo picture.
Logo#: 1-5
Ex. [52][01][44][44][00][35]
[0][1][2][0][1]
[1][0][1][0][4]
[2][1][2] [0][7]
[3][0][1][0] [0A]
[4][0][3][0][0C]
[5][0][1][0] [17]
[6][0][1][0] [19]
[7][0][2][0] [1B]
[8][1][2][0] [1D]
[9][0][1][0][1F]
[0B][1][1-5] [FCC]

Response : ACK [11H]


Ex. [01][52][44][11][00][00][FCC]

(6) Command : [45H] Print


Data : Define Data Length [AA]
[Line0][DataLength] [Data0] /.../[Data131]
……………………………….…..
……………………………………
[Line9] [DataLength] [Data0] /.../[Data131]
[Line11][Data1][Data2] [FCC]

Ex. [52][01][44][45][00][AA]
[0][16][0][0][-][2][8][5][4][-][3][2][1][3][-][7][1][4][2][-][6][0][6][3]
[1][0C][I][G][T][ ][T][r][a][i][n][i][n][g]
[2][25][S][l][o][t][ ][I][d][:][2][0][3][3][8][2][ ][ ][F][l][o][o][r][ ]
[L][o][c][a][t][i][o][n][:][0][5][5][2][0][8]
[3][0E][C][A][S][H][O][U][T][R][E][C][E][I][P][T]
[4][03][$][3][0]
[5][1A][T][H][I][R][T][Y][ ][D][O][L][L][A][R][S][ ][A][N][D][ ][N][O]
[C][E][N][T][S]
[6][20][1][0][:][0][4][ ][2][0][0][1][ ][ ][1][3][:][2][3][:][1][3][ ]
[T][I][C][K][E][T][#][0][2][9][1]
[7][16][0][0][-][2][8][5][4][-][3][2][1][3][-][7][1][4][2][-][6][0][6][3]
[8][16][0][0][-][2][8][5][4][-][3][2][1][3][-][7][1][4][2][-][6][0][6][3]
[9][25][V][o][u][c][h][e][r][ ][V][o][i][d][ ][a][f][t][e][r][ ][3][0][ ][d][a][y][s][ ]

Page 9 of 11
Ticket Printer

[M][A][C][H][I][N][E][#][1][0] [FCC]

Response : ACK [11H]


Ex. [01][52][44][11][00][00][FCC]

Limit of words

8*8 16*16 24*24 Chinese

Normal 96 96 96 127

High*2 96 96 96 127

Width*2 96 96 96 127

(7) Command : [46H] Poll Status


Data : 0 Bytes
Ex. [52][01][44][46][00][00] [51]

Response : Report Status [10H]


Status:
IDLE/ENABLE [10H]
PRINTING [12H]
PRINT OK [20H]
PRINT ERROR [30H]
CHASSIS OPEN [41H]
COVER OPEN [42H]
TICKET OUT [43H]
TICKET BRUST [44H]
TICKET LOW [45H]
PAPER JAM [46H]
THERMAL HEAD OUT [47H]

Ex. COVER OPEN


[01][52][44][10][00][01][42][FCC]

Page 10 of 11
Ticket Printer

(8) Command : [47H] Request Print Validation Number


Data : 0 Bytes
Ex. [52][01][44][47][00][00][50]
Response : ACK [11H]
Ex. [01][52][44][11][00][01][0/1][FCC]
Controller uses this command to request Print Validation Number.
If response data is 1 which mean last printing job is success.
If response data is 0 which mean last printing job is not success.

(9) Command : [48H] Clear Print Validation Number


Data : 0 Bytes
Ex. [52][01][44][48][00][00][5F]
Response : ACK [11H]
Ex. [01][52][44][11][00][00][FCC]
Controller uses this command to clear print validation number to 0.

No.24,Alley 38,Lane 91,Sec. 1,Nei Hu Road,Taipei,Taiwan,R.O.C.


TEL : +886-2-2797-1236
FAX: +886-2-2797-1634
Web: www.ictgroup.com.tw

ICT-HQ, Department of Software Development


Author: Niki Lee Version: 05

Page 11 of 11

You might also like