Agilent Technologies ESG Especificaciones Pagina 16

  • Descarga
  • Añadir a mis manuales
  • Imprimir
  • Pagina
    / 259
  • Tabla de contenidos
  • MARCADORES
  • Valorado. / 5. Basado en revisión del cliente
Vista de pagina 15
1-12 Programming Guide
Preparing for Use ESG Family Signal Generators
Overview of Serial Interface (RS-232) Programming
Configuring a Serial Interface for BASIC/UX
To configure your serial interface with the values mentioned in the previous section, you
can execute the following HP-UX command before entering BASIC/UX:
/bin/stty 9600 cs8 -cstopb < /dev/rmb/serialnn
where:
9600 is the baud rate. The following are baud rates you can use with the stty command:
cs8 is the number of bits per character. For this signal generator, the number of bits per
character is 8.
-cstopb causes one stop bit per character to be used.
< /dev/rmb/serialnn assigns the stty options to the serial interface located at select code
number nn.
For more information on stty options, see the HP-UX Language Reference.
Using Program Control to Override Defaults
You can override some of the interface default configuration options by use of CONTROL
statements. This not only enables you to guarantee certain parameters, but also provides a
means for changing selected parameters in the course of a running program.
Interface Reset
Whenever an interface is connected to a modem that may still be connected to a
telecommunications link from a previous session, it is good programming practice to reset
the interface to force the modem to disconnect, unless the status of the link and remote
connection are known. When the interface is connected to a line printer or similar
peripheral, resetting the interface is usually unnecessary unless an error condition
requires it.
When the interface is reset by use of a CONTROL statement to CONTROL Register 0 with
a non-zero value, the interface is restored to the BASIC/UX power-up condition whether or
not it is the same as the current default switch configuration. If you are not sure of the
present settings, or if your application requires changing the configuration during program
operation, you can use CONTROL statements to configure the interface. An example of
where this may be necessary is when several peripherals share a single interface through a
manually operated RS-232 switch such as those used to connect multiple terminals to a
single computer port, or a single terminal to multiple computers.
300 1200 2400 4800 9600 19 200
100 CONTROL Sc,0;1 ! Resets Interface.
Vista de pagina 15
1 2 ... 11 12 13 14 15 16 17 18 19 20 21 ... 258 259

Comentarios a estos manuales

Sin comentarios