Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Changing to USB printer

Status
Not open for further replies.

audiopro

Programmer
Apr 1, 2004
3,165
GB
I have an EPOS system which has been in use for many years.
It uses a thermal printer and receipts are created programmatically and then copied to the printer port.
Code:
! COPY C:\TILL\RECEIPT2.TXT LPT1
This has served my client well but the printer is giving up the ghost and requires replacement. He has bought a new thermal printer but this only supports USB.

What would you suggest with regards changing to the new printer, is it possible to specify a USB port instead of LPT1 or do I now have to create a report and print that? My concern is that if I use the report method, the receipts would have to be a constant length.
If the site was local, I could experiment with it but as it is miles away from my location, this is an option.


Keith
 
We are going to carry on investigating this after Christmas so can't try the alternative.

Is there likely to be a difference between 'copy' and 'type'?

Keith
 
one may be 7 bit the other 8?

Regards

Griff
Keep [Smile]ing

There are 10 kinds of people in the world, those who understand binary and those who don't.

I'm trying to cut down on the use of shrieks (exclamation marks), I'm told they are not good for you.
 
The £ sign is printed out in the list but not the actual receipt, using the copy command.
If it was a byte length issue, I would have thought that no £ symbol could be printed.

Keith
 
All I can say about notepad is it handles txt files as ANSI, if there are no byte order mark (BOM) as the first two or three bytes of the file marking it as UTF-8 or unicode. Notepad never handles files as ASCII though.

If you chose Save as in notepad you'll see as what encoding notepad would save. You can assume thats also, what it would use for printing.

No matter what the real outcome is, I assume you would need more than just chr(163), eg chr(0)+chr(163) but more likely some escape sequence you would only know, if you get hands on a manual revealing this details.

To me it seems after all this time it would be cheaper ti invest money in any other printer model than in time finding out how to, even if you have success with notepad printing. The only reason to stay with that model would be it's already bought for many locations.

Bye, Olaf.
 
Olaf
When I did the print of all the chars, I used
Code:
O=FCREATE("codetest.txt",0)
FOR X=1 TO 255
	LET = ALLTRIM(STR(X))+CHR(X)+"|"
	W=FWRITE(O,LET)
NEXT
C=FCLOSE(O)
! COPY codetest.txt LPT1
DO TILLFEEDCUT IN TILLPROC
and chr(163) printed out as £.

Please can we avoid getting bogged down with there are better ways of printing out the whole charset.


Keith
 
>FOR X=1 TO 255

You should avoid some of the lower values, as this might result in unwanted behaviour, especially since you print CHR(27) = ESC at some point this way. Then you don't get the normal behavior before resetting the printer or printing new. You might get non reproducable results, etc.

Bye, Olaf.
 
Thanks Olaf - hadn't considered the chr(27) ESC function.
I am doing this remotely and it is not as easy as having the printer on the desk in front of me.
We will be doing some more experiments when retail gets a bit quieter.

Keith
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top