You are on page 1of 11

BMC TH34 fiscal printer – PC driver programmer's manual

BMC

LINKER
TH34 fiscal printer
PC driver programmer's manual

TH34 driver version 1.7 Ethiopia


Jun 2009.

page 1 of 11
BMC TH34 fiscal printer – PC driver programmer's manual

Table of Contents

1. Introduction..........................................................................................................................................................3
2. Installation...........................................................................................................................................................3
3. Linking process....................................................................................................................................................3
4.Control center........................................................................................................................................................4
Appendix 1 – command file format.........................................................................................................................5
Appendix 2 – response file format (error codes).....................................................................................................9

page 2 of 11
BMC TH34 fiscal printer – PC driver programmer's manual

1. Introduction

TH34 linker is PC software that provides an easy connection between any POS application and TH34 fiscal
printer. It acts like any other windows printer driver but it requires a special communication to be used.

2. Installation

Installation of driver does not require usual installation procedure. Only thing that is necessary is that
Linker application (linker.exe)and Options.ini file have to be placed in same directory.
Linker application requires Microsoft .NET Framework 2.0 to be installed on host machine.

3. Linking process

When it is started, this driver monitors defined command folder on machine's file system and reacts only
when new command file with extension .dat is created. Driver checks if format of command file is according
to appendix 1 of this manual. If format of command file is correct, driver executes commands on fiscal
printer using machine's serial port and raw communication protocol for fiscal device.

If command file format is correct and execution of fiscal printer commands pass without any error, driver
creates new file with same name as command file and extension .OK in predefined response folder.
Additionally, for upload commands this response file contains data that was uploaded to PC.

If any error is raised during format checking or command's execution, driver creates new file with same
name as command file and extension .ERR in predefined response folder. In this case, response file will
contain error codes, saved in separate lines.

Linker will not delete response file so it is programmer's duty to delete response file after processing it.

In simple words, programmer should do following:


- create command file according to this manual with extension .dat in any temporary folder
- copy command file from temporary folder to predefined command folder
- wait until driver creates response file in predefined response folder
- process response file (extension .OK for successful execution and extension .ERR for error situation)

Driver will optionally raise visual indication on PC screen in form of tray notification pop up window with
with detail description of command's execution result (success or error).

page 3 of 11
BMC TH34 fiscal printer – PC driver programmer's manual

4.Control center

Driver is working in background of other applications running on Windows operating system. Only
indication that it actually works is its tray icon. Additional driver's options can be accessed using context
menu which shows after clicking with right mouse button on driver's tray icon.
This context menu has following items:
- Control center... (displays driver's control center for some additional actions)
- Stop (stops driver execution and releases host machine's serial port)
- Start (starts driver execution and occupies host machine's serial port)
- Check printer connection
- Show last notification
- Exit (stops all drivers activities and exists application)

Driver's control center is displayed on screen using context menu's item Control center and it supports
following:
- diagnostic actions - Check printer connection and Read Printer information
- actions necessary to resolve error situations,
- the most usual fiscal and non fiscal reports printing
- Options screen where driver's working parameters can be modified

Options screen contains following parameters:


- Command folder (folder monitored by driver where command files should be copied)
- Response folder (folder where driver creates response files according to command's execution result)
- EJ folder (folder where driver saves electronic journals uploaded from printer)
- Linker type
a) value 0 – driver immediately reacts on command file appearance (available only for Windows XP
operating system)
b) value 1 – driver periodically checks command folder (available for all Windows operations systems)
- Checking period (period in milliseconds in which driver checks command folder; has meaning only for
Linker type=1)
- Start linker on system startup (if this options is checked, Linker aplication will be started automatically
when Windows OS starts)
- Automatically start linking (when Linker application is started, it automatically occupies serial port and
start linking process)
- Communication parameters (parameters of serial port communication; for TH34 default values are
BaudRate=19200,Parity=Even,Handshake=None,DTR enable = checked, RTS enable = unchecked)
- Security parameters (change default manager and service password for accessing Programming screen;
default manager password is Manager1 and default service password is BMCservice; Be aware that
passwords are case sensitive)

Programming screen can be accessed if correct password is known and allows user to:
- if it is logged as manager, program cashiers, commercial footer message, printer number and display
greeting message

page 4 of 11
BMC TH34 fiscal printer – PC driver programmer's manual

- if it is logged as service man, to do service programmings (setting fiscal mode parameters, set/change shop
name, set/change tax rates, set date and time,..)

page 5 of 11
BMC TH34 fiscal printer – PC driver programmer's manual

Appendix 1 – command file format


Command description File Format Example Hint
Fiscal printer open FPO FPO 1<Printer Number < 99
Printer Number 35
Clerk Password 11111
Fiscal printer close FPC FPC Allowed only after printing Z
report
Clerk log on LOGON LOGON 1<Clerk password < 99999
Clerk Password 11111
Clerk log off LOGOFF LOGOFF
Sale fiscal transaction open SFTO SFTO
(variant 1)
Sale fiscal transaction open SFTO SFTO 0<=logo1,logo2<=4
(variant 2 with logo printing) PGL;logo1;logo2 PGL;1;1
Refund fiscal transaction RFTO RFTO
open
Refund fiscal transaction RFTO RFTO 0<=logo1,logo2<=4
open (variant 2 with logo PGL;logo1;logo2 PGL;1;1
printing)
Item sale tax A ISA ISA 0.01<=price<=999999.99
price;quantity;name 5.34;0.123;bread 0.001<=quantity<=99999.999
or
0.01<=price<999999.99
0.001<=quantity<=9999.999
name has max 48 chars
Item sale tax B ISB ISB
price;quantity;name 5.34;3;bread
Item sale non taxable IS IS
price;quantity;name 10.12;1.12;bread
Item void tax A IVA IVA
price;quantity;name 5.34;0.123;bread
Item void tax B IVB IVB
price;quantity;name 5.34;3;bread
Item void non taxable IV IV
price;quantity;name 10.12;1.12;bread
Item refund tax A IRA IRA
price;quantity;name 5.34;0.123;bread
Item refund tax B IRB IRB
price;quantity;name 5.34;3;bread
Item refund non taxable IR IR
price;quantity;name 10.12;1.12;bread
Discount or add-on amount ADA ADA 1) -999999.99<amount<999999.99
(variant 1) amount;descriptor -5.12;Weekend discount
2)Descriptor has max 32
characters; if it is left blank the
defaults will be written
(DISCOUNT and ADD-ON)
Discount or add-on amount ADA ADA 1) -999999.99<amount<999999.99
(variant 2) amount;descriptor;VAT for discount or add -5.12;Weekend discount;N
on 2)Descriptor has max 32
characters; if it is left blank the
defaults will be written
(DISCOUNT and ADD-ON)
3) VAT for discount or add on:
- N (non taxable)
- A (VAT A)
- B (VAT B)

page 6 of 11
BMC TH34 fiscal printer – PC driver programmer's manual

Void discount or add-on ADAV ADAV 1) -999999.99<amount<999999.99


amount (variant 1) amount;descriptor -5.12;Weekend discount
2)Descriptor has max 32
characters; if it is left blank the
defaults will be written
(DISCOUNT and ADD-ON)
Void discount or add-on ADAV ADAV 1) -999999.99<amount<999999.99
amount (variant 2) amount;descriptor;VAT for discount or add -5.12;Weekend discount;N
on 2)Descriptor has max 32
characters; if it is left blank the
defaults will be written
(DISCOUNT and ADD-ON)
3) VAT for discount or add on:
- N (non taxable)
- A (VAT A)
- B (VAT B)
Transaction tender TT TT
Tendering text input TTI TTI Text input length<=48 chars
text input (credit card number/ check 18297213978123
reference number)
Direct media closing MD MD 1<=payment type<=16
payment type 3
Media tendering close MT
payment type;amount
Transaction cancel TC TC
Transaction close TCL TCL
Print buyers tax TIN TIN TIN = 10 digits
identification number inside Buyers TIN 1234567890
fiscal receipt (invoice
receipt)
Fiscal receipt example 1 SFTO SFTO
(without the amount from IS;price;quantity;name IS;10.12;1.12;bread
the customer) ISA;price;quantity;name ISA;5.34;0.123;bread3
ISB;price;quantity;name ISB;5.34;3;bread2
SP SP
TT TT
MD;payment type MD;3
Fiscal receipt example 2 SFTO SFTO
(with the amount from the IS;price;quantity;name IS;10.12;1.12;bread
customer) ISA;price;quantity;name ISA;5.34;0.123;bread2
ISB;price;quantity;name ISB;5.34;3;bread3
SP SP
TT TT
MD;payment type;amount MT;3;100
Fiscal receipt example 3 SFTO SFTO
(with Buyers TIN entry) TIN;buyers TIN TIN;1234567890
IS;price;quantity;name IS;10.12;1.12;bread
ISA;price;quantity;name ISA;5.34;0.123;bread2
ISB;price;quantity;name ISB;5.34;3;bread3
SP SP
TT TT
MD;payment type MD;3
Fiscal receipt example 4 SFTO SFTO
(with free text printing and L;some text L;--------------------------
void items) L;some text L;CASHIER: JAMES
L;some text L;--------------------------
IS;price;quantity;name IS;10.12;1.12;bread
ISA;price;quantity;name ISA;5.34;0.123;bread2
ISB;price;quantity;name ISB;5.34;3;bread3
IVA;price;quantity;name IVA;5.34;0.123;bread2
SP SP
TT TT
MD;payment type MD;3

page 7 of 11
BMC TH34 fiscal printer – PC driver programmer's manual

Fiscal receipt example 5 SFTO SFTO


(discount or add on amount) IS;price;quantity;name IS;10.12;1.12;bread
ISA;price;quantity;name ISA;5.34;0.123;bread2
ISB;price;quantity;name ISB;5.34;3;bread3
IVA;price;quantity;name IVA;5.34;0.123;bread2
ADA;discount or add-on amount;descriptor ADA;-2.12;Regular customer
SP discount 20%
TT SP
MT;payment type;amount TT
MT;3;100
Fiscal refund receipt RFTO RFTO
example IR;price;quantity;name IR;10;1;bread2
IRA;price;quantity;name IRA;5.34;0.123;bread3
IRB;price;quantity;name IRB;5.34;3;bread4
TT TT
MD;payment type MD;3
Printer restart after paper end R R
Non fiscal receipt NFTO NFTO File can contain 1 or several
(free text report) LFR;text line LFR;HELLO text lines
LFR;text line LFR;MY NAME IS JOHN
... LFR;I AM ELEVEN
Non fiscal line (inside fiscal L L File can contain 1 or several
receipt) text line THANK YOU!!! text lines
text line
...
Drawer open (No Sale) DO DO
Print paid out amount(PO) PO PO This receipt is not
receipt payment type;amount 3;12.50 automatically closed
Print received on RA RA This receipt is not
amount(RA) receipt payment type;amount 3;150.12 automatically closed
Close the receipt after PORA PORA
PO/RA
Program display greeting PDGM PDGM
message greeting message Welcome to BMC
Show date and time on DTIME DTIME
display
Show message on display DMES DMES L1 – first line
L1;message L1;THANKS L2 – second line
L2;message L2;GOOD BYE
Print X accumulated report XASR XASR
Print X daily report XDSR XDSR
Print Z accumulated report ZASR ZASR
Print Z daily report ZDSR ZDSR After printing Z daily sales
report, upload EJ and clear EJ
have to be executed
Upload electronic journal UEJ UEJ Direction:
direction;mode;type;start number;end E;L;X;1;10 – E (electronic
number journal)
– S (signitures)
Mode:
– L (record range)
(for last EJ record see 14th
line of Read info 4
response file)
– Z (Z report range)
Type:
– X (print)
– Z (print and clear
EJ)
Start number (start number of
range)
End number (end number of
range)

page 8 of 11
BMC TH34 fiscal printer – PC driver programmer's manual

Print electronic journal PEJ PEJ Mode:


mode;type;start number;end number L;X;1;10 – L (record range)
(for last EJ record see 14th
line of Read info 4
response file)
– Z (Z report range)
Type:
– X (print)
– Z (print and clear
EJ)
Start number (start number of
range)
End number (end number of
range)
Information read 1 IR1 IR1 See TH34 Ethiopia Manual
Information read 2 IR2 IR2 See TH34 Ethiopia Manual
Information read 3 IR3 IR3 See TH34 Ethiopia Manual
Information read 4 IR4 IR4 See TH34 Ethiopia Manual
Information read 5 IR5 IR5 See TH34 Ethiopia Manual
Program clerk information PCCN PCCN
clerk number;password;name 1;11111;CLERK1
Program printer number PPN PPN 1<Printer Number < 99
printer number 5
Program tax rate PTR PTR 0<=tax rate1<= 99.99
tax rate1;tax rate2 15;10.50
Program footer commercial PCM PCM There is max 10 lines available
message 1;text for the 1st line 1;BMC for commercial message
2; text for the 2nd line 2;OSAKA CASTLE 33
3; text for the 3rd line 3;OSAKA
4; text for the 4th line
Print programming dump PPD PPD Prints printer setting report
Self test and report STR STR
Test pattern print out TPPO TPPO
Print full fiscal report by Z PFFRZ PFFRZ
counter start Z number;end Z number 2;6
Print full fiscal report by PFFRD PFFRD Date format: DDMMYY
date start date;end date 120207;130307
Print summary fiscal report PSFRZ PSFRZ
by Z counter start Z number;end Z number 5;5
Print summary fiscal report PSFRD PSFRD Date format: DDMMYY
by date start date;end date 120207;130307
Upload fiscal report by Z UFFRZ UFFRZ
counter start Z number;end Z number 1;4
Upload fiscal report by date UFFRD UFFRD Date format: DDMMYY
start date;end date 010107;010308
Service commands
Program fiscal machine PMFID PMFID MRC must have 3 leading
registration code machine registration code ABC1234567 letters and 7 digits
Program shop name PH PH
1;COMPANY NAME 1;BMC
2;SHOP NAME 2;Fiscal inc.
3;SHOP ADDRESS 3;Japan
Program tax payer code PTPC PTPC TIN has exactly 10 characters
(TIN) Tax payer identification code 1234565767
Print out data PHT PHT Prints programmed data
Save fiscal registration code SMFID SMFID
into fiscal memory
Save TIN and shop name STPC STPC
into fiscal memory
Program tax rates PTR PTR 0<=tax rate1<= 99.99
tax rate1;tax rate2 15;10.50
Save tax rate change into ST ST
fiscal memory

page 9 of 11
BMC TH34 fiscal printer – PC driver programmer's manual

Fiscal mode initiation FI FI


(activation)
Program fiscal printer time PT PT
HHMMSS 113942
Program fiscal printer date PD PD
DDMMYY 010308

page 10 of 11
BMC TH34 fiscal printer – PC driver programmer's manual

Appendix 2 – response file format (error codes)

Error description Error code


Command file format error 1
Command time out (no response from printer) 2
In fiscal sale transaction 3
In fiscal refund transaction 31
In non fiscal transaction 4
Busy buffer full 5
Fiscal memory full 6
Fiscal memory near full 7
Fiscal mode not activated 8
Printer busy operating/printing 32
Fiscal error 9
Fiscal memory error 10
Invalid command error (wrong sequence of commands) 11
Not asigned clerk 12
Invalid tax 13
Invalid value or value over limitation 14
Printer head or display or EJ error 15
Paper end 16
Receipt buffer full 33
Printer busy printing 34
Fiscal printer “opened” 17
Paper near end 18
Printer disconnection 19
Drawer opened 20
Display disconnection 21
EJ memory card disconnection 22
Internal Dip switch 1 ON 51
Internal Dip switch 2 ON 52

page 11 of 11

You might also like