Constant,

There is a clue here.

By indicating that you were able to print something
normally after the switch was removed, you have a
good probability that it's your cable or connectors.

Check your connectors *carefully* for bent pins,
dirt, loose pins, or any damage to the cable itself.

Data sent to the printer, unlike serial data, is
sent one-bit-per-wire on a parallel cable.

The message: CR LF "Hello world." CR lF (also written
as "\r\nHello world.\r\n") looks like this in binary:
 76543210 (bit column numbering 0-7)
 --------
 00001101 = CR (\r)
 00001010 = LF (\n)
 01001000 = H
 01100101 = e
 01101100 = l
 01101100 = l
 01101111 = o
 00100000 =    (space)
 01110111 = w
 01101111 = o
 01110010 = r
 01101100 = l
 01100100 = d
 00101110 = .
 00001101 = CR (\r)
 00001010 = LF (\r)

Notice that if you suppress the second or fourth
bits (that is, bit 1 or 3), then your printer will
*never* see a linefeed (LF) character.

You can get some idea of what's happening to your
data if you send a single line to the printer.

Go to the tmonroe.com public ftp site and download
LPRINT.COM and XT.EXE to help with this.

ftp://tmonroe.com
username: public
password: public

XT.EXE (xtype) is just a filter I wrote that does
some simple things to text, but it has an extra
feature:  if you run "XT a" it will output an ASCII
chart.  Try these commands:
XT ?     (Command help)
XT a     (ASCII chart from 0 to 127 in decimal)
XT a$    (ASCII chart from 0 to 127, ASM-style hex)
XT ax    (ASCII chart from 0 to 127, C-style hex)
XT a128  (ASCII chard from 128 to 255 in decimal)
XT ax128 (ASCII chart from 128 to 255, C-style hex)
and so on.  By the way, the command "XT" by itself
with no arguments will sit and wait for keyboard
input until you hit Ctrl+Z or Ctrl+C.  It's a
filter, so unless you give it other input, it will
expect something from "standard in" (stdin).

LPRINT sends whatever you give it directly to LPT1.
The command   LPRINT 13 10   sends character 13 and
character 10 (the carriage return, linefeed values)
to the printer.

The binary strings above were produced by LPRINT,
using the command
    LPRINT ! % \ "\r\nHello world.\r\n"
(!) send output to screen instead of printer
(%) convert output to binary strings for debugging
(\) enable "escaping" of control characters in string
"..." quotes enclose words so that the individual
      character values don't need to be given.

LPRINT with no argument displays the help screen.

Here are some sample LPRINT commands:
LPRINT        (display help for LPRINT)
LPRINT 12     (send a formfeed to LPT1)
LPRINT ^L     (same thing, using Ctrl+L notation)
LPRINT $0C    (same thing, but in hex)
LPRINT &00001100    (once again, but in binary)
If I want to print a test string with a CR/LF
before and after it, I do this:
LPRINT 13 10 "This is just a test string" 13 10
or this:
LPRINT \ "\r\nThis is just a test\r\n"
and to send it to the screen as a string of hex
values, I'd do this:
LPRINT ! ? 13 10 "This is just a test string" 13 10

Send a single line of text to the printer, eject the
page, and examine the output.  Use LPRINT to convert
any mangled characters to binary and compare them
with the binary of the intended character.  If one
bit is consistently missing, that's your culprit.

For example, the intended character is "G" (01000111)
but the output is "E" (01000101), you can see that
bit 1 (the second bit) is missing.

Let me know what you find.

Regards,
Garry Hamilton
* [EMAIL PROTECTED]


----- Original Message -----
From: "C. Brouerius van Nidek" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Thursday, May 16, 2002 5:58 AM
Subject: [SURVPC] Subject: Re: PRINTER PROBLEM


> Bob George wrote
>
> >"C. Brouerius van Nidek" <[EMAIL PROTECTED]> wrote:
>
> >> Did the selftest and the outprint is flawless.
> >> Are now trying to go after my printer cabling.
>
> >It's only that one file, right? Could you forward a
> >copy of that file to me? It sure sounds like the
> >classical CRLF-CR mapping problem. If so, it's easy
> >to clean up.
>
> No. Now it is with every file that I want to print
> out ;-(   Have already looked into the files which
> I wanted to print and no weird characters were sighted.
>
> I have removed the auto data switch as a possible cause
> but after some print
>
> outs, the whole thing started anew.
>
> Must be my io card or the printer ;-(
> --
>
> NTReader v0.36w(P)/Beta (Registered) in conjunction with Net-Tamer.
>

To unsubscribe from SURVPC send a message to [EMAIL PROTECTED] with 
unsubscribe SURVPC in the body of the message.
Also, trim this footer from any quoted replies.
More info can be found at;
http://www.softcon.com/archives/SURVPC.html

Reply via email to