Rockwell-automation 2708-NBD VBASIC Language Development Kit Manual de usuario Pagina 36

  • Descarga
  • Añadir a mis manuales
  • Imprimir
  • Pagina
    / 84
  • Tabla de contenidos
  • MARCADORES
  • Valorado. / 5. Basado en revisión del cliente
Vista de pagina 35
Chapter 4
Special Devices in A-B VBASIC
415
The LED in the lower left corner of alphanumeric keyboards is used as a
shift lock indicator by the operating system. A-B VBASIC programs should
not change it.
The BASIC Language Development Kit contains a subroutine SetLED which
can be called to turn LEDs on and off. Or use this code example:
CONST LiteDev = 1
On$ = 1: off$ = 0”‘ Cannot be a CONSTant
OPEN LITE FOR RANDOM AS #LiteDev
FOR X = 1 TO 10 Do 10 LEDs
PUT #LiteDev, X, On$ Turn LED on.
SLEEP .25
PUT #LiteDev, X, Off$ Turn LED off
SLEEP .25
NEXT X
CLOSE LiteDev
Reserved device name: STAT
Description:
The front panel status displays shows information about the condition of a
workstation. The number 9 status display is dedicated to showing status
information from the application.
Two lines are available with 40 characters each. A summary status character
which appears over the 9 on the zero summary status display, is also
available.
The PUT statement is used to place information in the buffer which is shown
when the #9 display is selected.
PUT to record number 1 places the string on the top line of the display. Put to
record number 2 places the string on the second line of the display. PUT to
record 3 places the first character of the string over the 9 on the summary
display.
OPEN STAT FOR RANDOM AS #3
LTOP$ = Data Corp Inventory
LBOTTOMS$ = Duncan Street Warehouse
SC$ .
PUT #3, 1, LTOP$
PUT #3, 2, LBOTTOM$
PUT #3, 3, SC$
If your application must shut down or cannot start up, for example due to a
missing file that the host was supposed to download, put an error on the
status display before program termination.
Remember that these statements do not cause the status display to appear,
they only define the displays contents when invoked by the operator.
Device: Front Panel LEDs
(contd)
Device: The #9
User Status Display
Vista de pagina 35
1 2 ... 31 32 33 34 35 36 37 38 39 40 41 ... 83 84

Comentarios a estos manuales

Sin comentarios