Announcement

Collapse
No announcement yet.

Time out error printing

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Time out error printing

    Hello All

    On some HP Deskjets 930, 990cxi we are getting time out errors
    when printing documents with more than 1 page, Hp cannot seem to
    help as works ok on windows software, we have inserted a delay
    before the next page is printed, this works but does anybody now
    of a better solution.

    We are using PRINT #dev%, and not LPRINT so we can print to
    LPT1/2/3

    Regards


    Bob

  • #2
    It is possible to disable timeouts (default setting is 20).
    Code:
    RetryAddr% = &H477 + Port?    ' Port? = 1 for LPT1, 2 for LPT2, etc
    def seg = 0                   ' For the peeks and pokes that follow
    SaveTries% = peek(RetryAddr%) ' Save the current setting
    poke RetryAddr%, 255          ' Set to 1-255 retries, 0 = infinite
    def seg
    ------------------
    Lance
    PowerBASIC Support
    mailto:[email protected][email protected]</A>
    Lance
    mailto:[email protected]

    Comment


    • #3
      Many Thanks Lance

      We will try it out

      Bob



      ------------------

      Comment


      • #4
        ON ERROR GOTO RETRY
        .
        .
        RETRY:



        ------------------

        Comment


        • #5
          I use something like this:

          errs% = 0
          ON ERROR GOTO RETRY

          (PRINT STUFF)

          EXIT SUB

          RETRY:
          IF err% = %TIMEOUT THEN rem whatever %TIMEOUT is
          errs% = errs% + 1
          IF errs% > (some suitable number) THEN
          Waitabit
          RESUME
          ELSE
          Take appropriate action
          END IF
          ELSE
          PRINT "Some other Error"
          Do something else
          END IF
          Removes the possibility of waiting forever!
          About the only time I let code out with ON ERROR is printer stuff!

          (Later....)
          Upon reflection, I prefer Lance's! Thanks Lance!
          (I dont know where the first post came from!)


          ------------------


          [This message has been edited by David J Walker (edited November 16, 2001).]

          Comment

          Working...
          X