[Webinar] Streamline your web hosting managementRegister Today

x
?
Solved

Print and cut paper with POS Printer Posiflex PP-7000II

Posted on 2008-02-07
8
Medium Priority
?
3,822 Views
Last Modified: 2011-10-19
Dear Experts,

I have POS Printer Posiflex PP-7000II serial, using serial to serial cable connection.
I need to write application with VB 6.0 to print and cut paper.

I've tried this:

 Open "Com2:" For Output As #1
 Print #1, "test printing"
 Close #1

the result is unreadable character printed.

I've also tried with MSComm1 control below:

    com1.CommPort = 2
    com1.Settings = "9600,N,8,1"
 com1.PortOpen = True
       
    '-- init?
    com1.Output = Chr(27) & "@"    

    com1.Output = Chr(27) + "Printing Text..." + Chr(10)

   '-- cut?
    com1.Output = Chr(27) & "i"
    com1.PortOpen = False

the result also unreadable character printed and it didn't cut the paper.

My question is, how to make it readable (ASCII text as I send to printer) and how to cut the paper from vb code?
Very appreciate for your comment and solution.
0
Comment
Question by:wuyinzhi
  • 4
  • 4
8 Comments
 
LVL 55

Expert Comment

by:Jaime Olivares
ID: 20848294
at a first glance, appears to be a serial configuration problem (bauds, bits, etc)
0
 
LVL 3

Author Comment

by:wuyinzhi
ID: 20848381
I'm using standard configuration like this  com1.Settings = "9600,N,8,1"
I also tried baud rate to 19200, the result is the same.

0
 
LVL 55

Expert Comment

by:Jaime Olivares
ID: 20848400
what do you mean with "standard configuration", is it defined so in the printer's user manual? also, even if it is the standard, the printer could be configured with other parameter. Almost all printers have a test routine to show the current configuration.
0
Never miss a deadline with monday.com

The revolutionary project management tool is here!   Plan visually with a single glance and make sure your projects get done.

 
LVL 3

Author Comment

by:wuyinzhi
ID: 20848583
unfortunately i can't find user manual or any related programming guide that specific to Posiflex PP-7000II POS Printer, but from what I found in EE archive, mostly sample codes using baudrate 9600, parity = N, databit = 8, stop bit = 1, that what i mean with "standard configuration", because I also read most ESC command/configuration POS printers are compatible with Epson POS printer.

any more advices to solve my problem?




0
 
LVL 55

Expert Comment

by:Jaime Olivares
ID: 20848603
there is not a standard configuration, each printer has its own default value for baudrate. N,8,1 are usually standard.
you can try with 300,600,1200,2400 and 4800 bauds.
Just try to print a text, once you have a readable text, try with other command characters.
0
 
LVL 55

Accepted Solution

by:
Jaime Olivares earned 2000 total points
ID: 20848633
Here is the manual, to make a self-test to know the current serial config:
"Press and hold down the feed button while turning the on /
off switch on. The printer will then perform a self-test. A sample
slip of self-test result is printed as in below sample. Please note that
both serial and parallel interfaces are indicated. That means the
printer is working on an autosensing and auto-select algorithm.
The header is printed in text mode and the rest part of this slip
is printed in page mode. If FEED button is pressed at this moment, a
font table will be printed in text mode again. To exit the test printing,
please turn the printer off and on again."
UMPP7KIII-7KUIIIA0.pdf
0
 
LVL 3

Author Comment

by:wuyinzhi
ID: 20851568
thanks jaime, this is the result of self-test:

INTERFACE : SERIAL/PARALLEL
BAUD RATE: 38400 bps
NONE PARITY,  8 BIT, 1 STOP BIT
HANDSHAKING: HARDWARE
PRINT WIDTH : 512 dot/line

PAPER WIDTH = 80 mm
PRINTING SPEED = 180 mm/s
BOOT VERSION = V8.3

CHARACTER DUMP PROCESS
(ASCII codes displayed)

So now we've got baud rate is 38400, i also tried 300, 600, 1200, 2400, 4800, but the problem remains the same.

my code so far:

com1.CommPort = 2
com1.Settings = "38400N,8,1"
com1.PortOpen = True
com1.Output = "test printing..."
com1.PortOpen = False

the result still unreadable characters. any idea?



0
 
LVL 3

Author Comment

by:wuyinzhi
ID: 20852488
i've found the problem, there's a problem with the serial cable, i replace it with a new one and it works! thanks!
0

Featured Post

Never miss a deadline with monday.com

The revolutionary project management tool is here!   Plan visually with a single glance and make sure your projects get done.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

I was working on a PowerPoint add-in the other day and a client asked me "can you implement a feature which processes a chart when it's pasted into a slide from another deck?". It got me wondering how to hook into built-in ribbon events in Office.
This article shows how to get a list of available printers for display in a drop-down list, and then to use the selected printer to print an Access report or a Word document filled with Access data, using different syntax as needed for working with …
In an interesting question (https://www.experts-exchange.com/questions/29008360/) here at Experts Exchange, a member asked how to split a single image into multiple images. The primary usage for this is to place many photographs on a flatbed scanner…
This video Micro Tutorial shows how to password-protect PDF files with free software. Many software products can do this, such as Adobe Acrobat (but not Adobe Reader), Nuance PaperPort, and Nuance Power PDF, but they are not free products. This vide…
Suggested Courses

607 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question