How to use those printer control commands ?
Moderator: Rathinagiri
-
huangchenmin
- Posts: 157
- Joined: Mon Jun 07, 2010 2:24 am
How to use those printer control commands ?
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
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
- 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 ?
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.
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 ?
this printer is much similar to FAX machine, which enhance text with heat rather than dot martix.rathinagiri wrote:I don't understand your requirement. I think the command manual is for printing in dot matrix printer in dos mode?
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
- 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 ?
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.
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 ?
Yes.rathinagiri wrote:You want automatically cut the paper after printing is finished?
I wrote the situation in attachment!
Please Help!
Best Regards
chen min
- Attachments
-
- Lastest.zip
- (582 Bytes) Downloaded 213 times
- 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 ?
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.
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 ?
do you mean like this?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?
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.
- 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 ?
Prior to HMG, had you used with Harbour code to print?
IMHO, you please try without any GUI component to print using console mode.
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.
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 ?
How could I have those info to coding?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.
Please Help!
Best Regards
chen min
Re: How to use those printer control commands ?
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
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