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

Slow sending PCL data to USB printer - Low Level Programming

Status
Not open for further replies.

785412369

Programmer
Aug 21, 2010
7
CZ
Hi all,
I just working on USB PCL printing for processor Renesas SH7727 (just for completeness). All works fine, but some printers rejected data and print takes for example over ten minutes!

How it looks:

time index: 0.000
Initializing USB printer (I think that all is well - startup is the same as Windows)
time index for exmaple 12.50
Send 64B data block -->
<-- ACK (from printer)
time index for exmaple 12.51
Send 64B data block -->
<-- ACK (from printer)
time index for exmaple 12.52
Send 64B data block -->
<-- ACK (from printer)
time index for exmaple 12.51
Send 64B data block -->
<-- NAK (printer rejected data) WHY ???
time index for exmaple 12.52
Send 64B data block -->
<-- NAK (printer rejected data) WHY ???
time index for exmaple 12.53
Send 64B data block -->
<-- NAK (printer rejected data) WHY ???

...

time index for exmaple 13.10 !! reject data for long time !!
Send 64B data block -->
<-- ACK (from printer)

I connect USB watcher for looking where is error, but all is same as windows transfer (printing). So I thing, error is in PCL data (respectively in the header I thing).

Therefore I ask you smarter:), which could be wrong? Is there any PCL command, for example, off caching?

Thanks Stanlay
 
without seeing the pcl data it's impossible to determine if that is the culprit. Sounds like, as a guess, that the handshake is not right. That could make the data overflow and reject data.
 
Start:

.%-12345X@PJL
ENTER LANGUAGE
= PCL ...&r1F
.E.*r3F.&l26A.
&l1E.*t300R.&l
1X.&u300D.&k0H
.&l0E.*p0x60Y.
*b0M.*.0A

HEX:

1B 25 2D 31 32 33 34 35 58 40 50 4A 4C 20
45 4E 54 45 52 20 4C 41 4E 47 55 41 47 45
20 3D 20 50 43 4C 20 0D 0A 1B 26 72 31 46
1B 45 1B 2A 72 33 46 1B 26 6C 32 36 41 1B
26 6C 31 45 1B 2A 74 33 30 30 52 1B 26 6C
31 58 1B 26 75 33 30 30 44 1B 26 6B 30 48
1B 26 6C 30 45 1B 2A 70 30 78 36 30 59 1B
2A 62 30 4D 1B 2A 00 30 41

Data example:

*b324W??????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????

HEX:

1B 2A 62 33 32 34 57 FF FF FF FF FF FF FF
FF FF FF FF FF FF FF FF FF FF FF FF FF FF
FF FF FF FF FF FF FF FF FF FF FF FF FF FF
FF FF FF FF FF FF FF FF FF FF FF FF FF FF
FF FF FF FF FF FF FF FF FF FF FF FF FF FF
FF FF FF FF FF FF FF FF FF FF FF FF FF FF
FF FF FF FF FF FF FF FF FF FF FF FF FF FF
FF FF FF FF FF FF FF FF FF FF FF FF FF FF
FF FF FF FF FF FF FF FF FF FF FF FF FF FF
FF FF FF FF FF FF FF FF FF FF FF FF FF FF
FF FF FF FF FF FF FF FF FF FF FF FF FF FF
FF FF FF FF FF FF FF FF FF FF FF FF FF FF
FF FF FF FF FF FF FF FF FF FF FF FF FF FF
FF FF FF FF FF FF FF FF FF FF FF FF FF FF
FF FF FF FF FF FF FF FF FF FF FF FF FF FF
FF FF FF FF FF FF FF FF FF FF FF FF FF FF
FF FF FF FF FF FF FF FF FF FF FF FF FF FF
FF FF FF FF FF FF FF FF FF FF FF FF FF FF
FF FF FF FF FF FF FF FF FF FF FF FF FF FF
FF FF FF FF FF FF FF FF FF FF FF FF FF FF
FF FF FF FF FF FF FF FF FF FF FF FF FF FF
FF FF FF FF FF FF F8 00 00 00 00 00 00 00
00 00 00 00 00 00 00 00 00 00 00 00 00 00
00 00 00 00 00 00 00 00 00

Thanks for reply.
 
Interpretation of first set of sequences shows that last sequence is invalid:

Code:
<Esc>%-12345X     Universal Exit Language (UEL)
@PJL ENTER LANGUAGE = PCL [0d][0a]
<Esc>&r1F         Flush: All Pages
<Esc>E            Printer Reset
<Esc>*r3F         Raster Graphics Presentation: Physical
<Esc>&l26A        Page Size: A4
<Esc>&l1E         Top Margin (lines)
<Esc>*t300R       Raster Graphics Resolution (dots per inch)
<Esc>&l1X         Number of Copies
<Esc>&u300D       Unit-of-Measure (PCL units per inch)
<Esc>&k0H         Horizontal Motion Index (1/120 inches)
<Esc>&l0E         Top Margin (lines)
<Esc>*p0x         Cursor Position (PCL units): Horizontal
       60Y        Cursor Position (PCL units): Vertical
<Esc>*b0M         Set Compression Mode: Unencoded
*** Warning ***   Invalid value in next sequence
<Esc>*0A         ***** Unknown sequence *****

... and where does the 'data example' (raster transfer) fit in - is the remainder of the print stream a series of these?


I think that Buff1's suggestion of a different culprit is more likely to be correct - it may just be that your target device is not powerful enough to process a series of large 300 dpi raster images - especially if it has to scale them to 600 dpi.
 
... "data example" is only 1 of about 2500 print transfers with same header (change only data) ...

I thing same, so I try print only a few rectangles (not raster transfer) with same error - printer reject data for +- 200ms.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top