T.R | Title | User | Personal Name | Date | Lines |
---|
329.1 | It worked (partially) | TAV02::NITSAN | Nitsan Duvdevani, Digital Israel | Tue Oct 07 1986 04:32 | 7 |
| A few years ago I had the same problem (with VT100 + printer port).
I sent the appropriate escape sequence, and did get the correct response,
but when the printer was turned off, the indication of its existance
lasted for about 1 more minute. When I switched it to "off-line" however,
I got an immediate change of the indication.
Nitsan
|
329.2 | Write Only Port | FROST::HARRIMAN | DEC 41-BLANK-03, Harriman,Paul J., qty 1 | Tue Oct 07 1986 10:27 | 28 |
| re: .-2, .-1
That's very interesting, since the VT100 printer port is a one-way
port (you can send but you can't really receive over it)...
Most VT10x conversion kits (and the VT102) have this inability.
I tried at length before I got some concrete explanations about
this. Unfortunately, they never appeared in a notes file so I can't
point you to them.
The reason that .-1 worked (partially) is that the printer port
is not the standard DEC 3-wire connection. It's actually a real
RS-232 port, meaning that the printer doesn't have to be a DEC printer,
just any old RS-232 printer will do (it uses either DTR or CTS to
control (pins 6/20)). Anyway, with the printer off-line and the
port enabled, the terminal knows the printer isn't ready (closed
loop).... However, if you send the escape sequence "who are you"
to the printer, (i.e. and LA50) it will respond, but the VT10x will
NOT listen for it back.
I know of no way for this to work - perhaps someone else in this
conference has a workaround? You can, of course, send the "turn
on the port" and "turn off the port" escape sequences to the
terminal... however, your program will never really know whether
or not the printer is there....
/pjh
|
329.3 | A little more info | PMRV70::AVDEV | Ed Tribuna ... Aviation Svcs | Tue Oct 07 1986 12:19 | 19 |
|
re: .2
I don't expect to be able to get back the printer device info.
But according to the VT102 user guide (pg 100) the system can
request a printer status report from the terminal using '[?15n'.
It goes on to list 3 responses to the printer status report
request:
Printer not connected
Printer not ready
Printer ready
These are the responses that I'm looking for.
Ed...
|
329.4 | No terminator? | SKYLAB::FISHER | Burns Fisher 381-1466, ZKO1-1/D42 | Tue Oct 07 1986 13:32 | 27 |
| So, Ed, you are saying that you send the correct escape sequence
to the terminal, but you get nothing back? Try connecting a VT220
as the terminal and setting "display controls" mode to make sure
that you are actually getting the correct sequence at the terminal.
If not, you may have some characteristic set which is not passing
control characters.
If the terminal is getting the escape sequence ok, then you need
to look at the other end. One problem might be that the receiving
QIO is not seeing a terminator, and so it is sitting there waiting
for more characters. You can fix this problem by either doing
something disgusting like setting a timeout or reading one character
at a time, or you can make sure that the Escape characteristic is
enabled. This will cause escape sequences to be parsed, and the
entire escape sequence will be considered to be a terminator.
One more hint: You should clear the typeahead buffer before you
do the inquire since you don't want to try to read typeahead
data as part of the escape sequence. It is also desireable to reduce
the window between when you clear the buffer and when you read the
data back. This can be done using a read QIO with the clear modifier,
and with a prompt. The prompt should contain the inquiry escape
sequence. Thus all three operations (clear typeahead, write, read)
are all done in a single QIO.
Burns
|
329.5 | oh, right... | FROST::HARRIMAN | DEC 41-BLANK-03, Harriman,Paul J., qty 1 | Tue Oct 07 1986 13:43 | 10 |
| re: .-1 : couldn't have said it better...
I was going to say "you probably aren't getting the escape sequence
to the terminal" but Burns beat me to it.
Check the I/O Users Guide Vol. I for all of the characteristics
you have to enable/disable.
/pjh
|
329.6 | Not so tough after all | PMRV70::AVDEV | Ed Tribuna ... Aviation Svcs | Tue Oct 07 1986 16:25 | 7 |
| Thanks Burns. The single QIO works like a champ.
Sure is easy when you know what you're doing.
Thanks again,
Ed...
|
329.7 | It works and also used | TAV02::NITSAN | Nitsan Duvdevani, Digital Israel | Thu Oct 16 1986 05:36 | 6 |
| We have a customer with a large application using this trick. This is what
I meant in .1 (and it works in spite of the "one way" behavior). The terminal
operator gets a message from the application if the printer attacehd to his/her
VT100 is off-line or not present or turned off (more than a minute ago...)
Nitsan
|