Rockwell-automation 1771-DB BASIC MODULE Manuel d'utilisateur Page 164

  • Télécharger
  • Ajouter à mon manuel
  • Imprimer
  • Page
    / 394
  • Table des matières
  • DEPANNAGE
  • MARQUE LIVRES
  • Noté. / 5. Basé sur avis des utilisateurs
Vue de la page 163
Chapter
Statements
1
1
11 -12
Use the GET statement in the Run mode. GET returns a result of zero in
the Command mode. The GET operator reads the console input device.
If a character is available from the console device, the value of the
character is assigned to GET. After GET is read in the program, it is
assigned the value of zero until another character is sent from the console
device.
The GET statement is read only once before it is assigned a value of zero.
This guarantees that the first character entered is always read, independent
of where you place the GET statement in the program. The program port
is buffered with a 256 byte circular transmit queue and 256 byte circular
receive queue.
Use the GET# operator to read port PRT2 and the GET@ operator to read
port PRT1.
Syntax
GET
GET#
GET@
Example
>10
A = GET
>
20 IF (A<>0) THEN PRINT A : REM ZERO MEANS NO ENTRY
>
30 GOTO 10
>RUN
65 [A]
49 [1]
24 [^X]
50 [2]
STOP – IN LINE 30
READY
>
GET
Vue de la page 163
1 2 ... 159 160 161 162 163 164 165 166 167 168 169 ... 393 394

Commentaires sur ces manuels

Pas de commentaire