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 sizbut on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Print Star Printer TSP700 VFP9

Status
Not open for further replies.

D2C

Programmer
Aug 27, 2001
86
BE
Hello,

I am trying to print a barcode label to a Star Printer model TSP700 from VFP9. On the website of star are programmers manuals available, with all escape codes we need. But how do we use these escape codes?

I tried many syntaxes but none of them actually do the trick. After printing we keep getting an error on the printer (it doesn't cut the label), so we need to reset and turn off the power. We use a roll of labels with black marks, and used the configuration utility to detect these black marks.

The first thing we tried is:
Code:
PRIVATE xbarcode
xbarcode =""
xbarcode = "01234567"
SET CONSOLE OFF
SET PRINTER TO DEFAULT
SET PRINTER on
??? "{27}{29}"+"{97}"+"1" &&center text
??? "{27}{98}"+"{2,50}{1,49}{1,49}{50}"+xbarcode+"{30}" &&print barcode with xbarcode data
SET PRINTER TO
SET PRINTER OFF
SET CONSOLE ON

This works, but the job still remains in the spooler.. so we need to quit fox just to release the job.

After reading on tek tips, I tried:
Code:
PRIVATE xbarcode
xbarcode =""
xbarcode = "51515152"
SET CONSOLE OFF
SET PRINTER TO DEFAULT
SET PRINTER on
??? CHR(27)+'&1BH'+'&62H'+'02H'+'01H'+'01H'+'50H'+xbarcode+'&1EH' &&print barcode with xbarcode data
SET PRINTER TO DEFAULT
SET PRINTER TO
SET PRINTER OFF
SET CONSOLE ON

Still no luck...
Can somebody provide me some useful code or tips to send data to this printer? Thank you very much in advance!

Greetz
d2c
 
I used to put a report field at the top left of a report to send control charaters thru because fox changed with windows to usse the windows printer drivers or the fox printer driver when printing. I would put something like:
chr(27)+chr(38)+chr(108)+chr(51)+chr(65) as the value of the report field and it worked.

I havent tried this since version 3.0 or something like that
wjwjr
 
THis is just a WAG. VFP9 sends reports to a listener before printing them.

try adding these lines of code

SET REPORTBEHAVIOR to 80
before the escape codes

and
SET REPORTBEHAVIOR to 90
after the job is done


David W. Grewe Dave
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top