Operating System - OpenVMS
cancel
Showing results for 
Search instead for 
Did you mean: 

TTA2 always busy

Sunil_uk
Frequent Advisor

TTA2 always busy

I have connected a radio clock to the TTA2 port of the VAX machine via a line driver.

I am using a detached process to enable and get the reading from the clock. But the process is unable to get the clock data. The observation is one process is getting created (process name _TTA2) and it chenges the process ID every minute. If you see the details of that process, the program which is holding the device is LOGINOUT.EXE.
Could some one advice what could be the possible reason for this?
5 REPLIES
Steven Schweda
Honored Contributor

Re: TTA2 always busy

The VAX thinks that the clock is trying to
log in.

SET TERMINAL /NOTYPE_AHEAD TTA2

HELP SET TERMINAL /TYPE_AHEAD

There's probably some clever code you can use
inside the program to do this, too, but it's
probably a lot easier from DCL.
Volker Halle
Honored Contributor

Re: TTA2 always busy

Sunil,

if unsolicited data is received on an un-owned OpenVMS terminal, LOGINOUT is started to handle the username/password prompt.

If a non-interactive device is connected to such a serial line, you need to SET TERM/NOTYPE_AHEAD/PERM TTA2: to prevent this from happening.

Volker.
Ian Miller.
Honored Contributor

Re: TTA2 always busy

I use
$ SET TERMINAL /NOTYPE_AHEAD/ALTYPAHEAD/PERM TTA2:

during SYSTARTUP_VMS

So the loginout process does not get started.

Then enable the typeahead buffer in the program using a SETCHAR QIOW.

The /ALTYP is to get the bigger typeahead buffer when enabled (if you need this depends on message size from clock).
____________________
Purely Personal Opinion
John Gillings
Honored Contributor

Re: TTA2 always busy

Ian's advice about setting the terminal to /NOTYPEAHEAD during system startup is good, but you may still find that a noisy serial line can get into a login loop.

To yank the device out of the loop, use the ALLOCATE command in the DCL procedure which starts up your clock reading application like this:

$ Retry: ON WARNING THEN GOTO Retry
$ ALLOCATE TTA2: CLOCK
$
$ SET NOON
$ SET TERMINAL CLOCK/TYPEAHEAD/ALTYPEAHEAD/etc...
$
$ RUN your-clock-reading-program

The warning retry loop will eventually squeeze the ALLOCATE in between login attempts.

Note that because the terminal is allocated with logical name CLOCK, the SET TERMINAL command does not need /PERMANENT, which may reduce the need for privileges. It also means the attribute will be automatically dropped if the program or process terminates abnormally.

You can also write your program to access the device "CLOCK" rather than hardcoding the name TTA2.
A crucible of informative mistakes
Sunil_uk
Frequent Advisor

Re: TTA2 always busy

Thanks to all for the useful repliies. Problem rectified after setting the proper baud rate for the clock