How to use those printer control commands ?

General Help regarding HMG, Compilation, Linking, Samples

Moderator: Rathinagiri

huangchenmin
Posts: 157
Joined: Mon Jun 07, 2010 2:24 am

How to use those printer control commands ?

Post by huangchenmin »

Hello everyone:
I need to work with a printer, which will printer number for people waiting in line.
Attachment is the commands maunal. I can't figure out how to use those control command in HMG code block.
Could anyone help!
Best Regards
Attachments
Myprg.rar
(1.21 KiB) Downloaded 210 times
TM200 ESC command manual V1_1s.zip
(1.77 MiB) Downloaded 263 times
User avatar
Rathinagiri
Posts: 5482
Joined: Tue Jul 29, 2008 6:30 pm
DBs Used: MariaDB, SQLite, SQLCipher and MySQL
Location: Sivakasi, India
Contact:

Re: How to use those printer control commands ?

Post by Rathinagiri »

I don't understand your requirement. I think the command manual is for printing in dot matrix printer in dos mode?
East or West HMG is the Best.
South or North HMG is worth.
...the possibilities are endless.
huangchenmin
Posts: 157
Joined: Mon Jun 07, 2010 2:24 am

Re: How to use those printer control commands ?

Post by huangchenmin »

rathinagiri wrote:I don't understand your requirement. I think the command manual is for printing in dot matrix printer in dos mode?
this printer is much similar to FAX machine, which enhance text with heat rather than dot martix.
I take it as normal laser jet or ink printer and print data normal and well.
Now i need to do is "cut paper" when printing finished.
What knid of form my prg code block should be ?
Please help!
best regards
chen min
User avatar
Rathinagiri
Posts: 5482
Joined: Tue Jul 29, 2008 6:30 pm
DBs Used: MariaDB, SQLite, SQLCipher and MySQL
Location: Sivakasi, India
Contact:

Re: How to use those printer control commands ?

Post by Rathinagiri »

You want automatically cut the paper after printing is finished?
East or West HMG is the Best.
South or North HMG is worth.
...the possibilities are endless.
huangchenmin
Posts: 157
Joined: Mon Jun 07, 2010 2:24 am

Re: How to use those printer control commands ?

Post by huangchenmin »

rathinagiri wrote:You want automatically cut the paper after printing is finished?
Yes.
I wrote the situation in attachment!
Please Help!
Best Regards
chen min
Attachments
Lastest.zip
(582 Bytes) Downloaded 213 times
User avatar
Rathinagiri
Posts: 5482
Joined: Tue Jul 29, 2008 6:30 pm
DBs Used: MariaDB, SQLite, SQLCipher and MySQL
Location: Sivakasi, India
Contact:

Re: How to use those printer control commands ?

Post by Rathinagiri »

Since the printer is connected in LPT1 port, you can use the same command used in DOS mode here too. Had you tried?
East or West HMG is the Best.
South or North HMG is worth.
...the possibilities are endless.
huangchenmin
Posts: 157
Joined: Mon Jun 07, 2010 2:24 am

Re: How to use those printer control commands ?

Post by huangchenmin »

rathinagiri wrote:Since the printer is connected in LPT1 port, you can use the same command used in DOS mode here too. Had you tried?
do you mean like this?
SELECT PRINTER "TM200PLUS" to lSuccess;
ORIENTATION PRINTER_ORIENT_PORTRAIT;
PREVIEW;

@ m_row+m_interval*1,m_col PRINT "ABCDEFG" FONT "標楷體" SIZE 10
fwrite(lSuccess,Chr(29)+chr(86)+Chr(66)+Chr(48)) //Partial cut
fclose(lSuccess)

I had tried and fail too. I think it is because of error handle of printer.
User avatar
Rathinagiri
Posts: 5482
Joined: Tue Jul 29, 2008 6:30 pm
DBs Used: MariaDB, SQLite, SQLCipher and MySQL
Location: Sivakasi, India
Contact:

Re: How to use those printer control commands ?

Post by Rathinagiri »

Prior to HMG, had you used with Harbour code to print?

IMHO, you please try without any GUI component to print using console mode.
East or West HMG is the Best.
South or North HMG is worth.
...the possibilities are endless.
huangchenmin
Posts: 157
Joined: Mon Jun 07, 2010 2:24 am

Re: How to use those printer control commands ?

Post by huangchenmin »

rathinagiri wrote:Prior to HMG, had you used with Harbour code to print?

IMHO, you please try without any GUI component to print using console mode.
How could I have those info to coding?
Please Help!
Best Regards
chen min
miras
Posts: 11
Joined: Thu Jul 31, 2008 7:57 am

Re: How to use those printer control commands ?

Post by miras »

Hi!
Try this after your printing code.

SET CONS OFF
SET ALTE TO CUT.TXT
SET ALTE ON
?chr(27)+"i"+CHR(18) ///Cut if you can
SET ALTE OFF
SET ALTE TO
SET CONS ON
WinPrintRaw(cPrinter, "CUT.TXT", "CUT")

Hope that helps.

Best regards
Miras
Post Reply