Home / Software / Computer programming / How to program Star dot matrix printer?
0 Members and 1 Guest are viewing this topic. « previous next »
Pages: [1] - (Bottom) Print
Author Topic: How to program Star dot matrix printer?  (Read 559 times)
blackheart
Topic Starter
Newbie



Posts: 2


« on: November 05, 2009, 09:23:50 PM »

I have a PC running windows xp and have been trying to format (change line and character spacing) on files printed on a star micronics dot matrix printer. The codes aren't changing the spacing, instead they are printed. The codes I'm using are from star's web page. ???
IP logged
Salmon Trout
Prodigy



Thanked: 501
Posts: 7,368

Computer: Specs
Experience: Guru
OS: Linux variant

1
« Reply #1 on: November 06, 2009, 04:56:45 PM »

Please show how you are using the codes
IP logged

Geek-9pm
Sage



Thanked: 327
Posts: 8,050

Computer: Specs
Experience: Familiar
OS: Windows XP


Geek After Dark

« Reply #2 on: November 06, 2009, 05:02:08 PM »

Also, he should provide the model  number and state if it has an an emulation for the old Epson printers.
Just looked in and old archive and fun this:

Code: [Select]
CHRS Ver 1.0 by J B Palmer
CHRS 07 0A     = BELL, LINE
CHRS 0C        = TOP OF FORM
CHRS 0F        = CONDENSED
CHRS 1B 30     = 8 LINES/INCH
CHRS 1B 43 21  = 33 LINE FORM
CHRS 1B 45     = EMPHASIZED
CHRS 1B4408100 = TABS 8 & 16

IP logged
Salmon Trout
Prodigy



Thanked: 501
Posts: 7,368

Computer: Specs
Experience: Guru
OS: Linux variant

1
« Reply #3 on: November 07, 2009, 12:49:30 AM »

You don't just print them verbatim, for example "CHRS 07 0A". Those are hexadecimal representations of the bytes you send to the printer. via the serial or parallel port. I used to use QBasic for this. Using 1B 30 for an example:

LPRINT CHR$(27);CHR$(48);"This is 8 lines per inch"

You could insert them into eg WordStar and WordPerfect documents using various means.


IP logged

blackheart
Topic Starter
Newbie



Posts: 2


« Reply #4 on: November 07, 2009, 09:10:36 PM »

The printer is a star-micronics SP300. When I pull up the printer properties there is a place to enter Star's control codes and text for the receipt . I got the codes from Star's website. The code to change the line spacing to 7/72" is  <ESC> "1" . When I enter these codes they print and don't change the line spacing. When I asked Star's support for help all they said was to use brackets.
IP logged
Salmon Trout
Prodigy



Thanked: 501
Posts: 7,368

Computer: Specs
Experience: Guru
OS: Linux variant

1
« Reply #5 on: November 08, 2009, 02:08:55 AM »

Here is the Programmer's manual

http://www.ben.cz/_download/manual/sp300-programming-manual-en.pdf



IP logged

Geek-9pm
Sage



Thanked: 327
Posts: 8,050

Computer: Specs
Experience: Familiar
OS: Windows XP


Geek After Dark

« Reply #6 on: November 08, 2009, 10:13:58 AM »

Here is a link to the directory that has CHRS.COM dos program. It is virus free.
http://geek9pm.com/dos/
CHRS.COM sends a string of binary characters to the system printer. It expects hexadecimal to be used on the command tail.
So <ESC> "1" should be 1B 31
Like this:
CHRS 1B 31

I hope this is helpful. We used this years ago when using Epsom printers to print forms that would not fit on the  paper with the default settings.  :)
IP logged
Pages: [1] - (Top) Print 
Home / Software / Computer programming / How to program Star dot matrix printer? « previous next »
 


Login with username, password and session length

Old Forum Search | Forum Rules
Copyright © 2010 Computer Hope ® All rights reserved.
Powered by SMF 2.0 RC3 | SMF © 2006–2010, Simple Machines LLC
Page created in 0.085 seconds with 21 queries.