×
INTELLIGENT WORK FORUMS
FOR COMPUTER PROFESSIONALS

Contact US

Log In

Come Join Us!

Are you a
Computer / IT professional?
Join Tek-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!

*Tek-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Students Click Here

Slow sending PCL data to USB printer - Low Level Programming

Slow sending PCL data to USB printer - Low Level Programming

Slow sending PCL data to USB printer - Low Level Programming

(OP)
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

RE: Slow sending PCL data to USB printer - Low Level Programming

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.  

RE: Slow sending PCL data to USB printer - Low Level Programming

(OP)
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.

RE: Slow sending PCL data to USB printer - Low Level Programming

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.

RE: Slow sending PCL data to USB printer - Low Level Programming

(OP)
... "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.

Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Tek-Tips Forums free from inappropriate posts.
The Tek-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Tek-Tips forums is a member-only feature.

Click Here to join Tek-Tips and talk with other members! Already a Member? Login


Close Box

Join Tek-Tips® Today!

Join your peers on the Internet's largest technical computer professional community.
It's easy to join and it's free.

Here's Why Members Love Tek-Tips Forums:

Register now while it's still free!

Already a member? Close this window and log in.

Join Us             Close