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

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.
LVL 3
wuyinzhiAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Jaime OlivaresSoftware ArchitectCommented:
at a first glance, appears to be a serial configuration problem (bauds, bits, etc)
0
wuyinzhiAuthor Commented:
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
Jaime OlivaresSoftware ArchitectCommented:
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
The Ultimate Tool Kit for Technolgy Solution Provi

Broken down into practical pointers and step-by-step instructions, the IT Service Excellence Tool Kit delivers expert advice for technology solution providers. Get your free copy for valuable how-to assets including sample agreements, checklists, flowcharts, and more!

wuyinzhiAuthor Commented:
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
Jaime OlivaresSoftware ArchitectCommented:
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
Jaime OlivaresSoftware ArchitectCommented:
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

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
wuyinzhiAuthor Commented:
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
wuyinzhiAuthor Commented:
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
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Visual Basic Classic

From novice to tech pro — start learning today.