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

  • 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 224
Chapter
Call Routines 0–68
12
12 -35
Use this routine to retrieve the number of characters in the buffer you
choose.
Input and Output Arguments
This routine has one input and one output argument. The input argument
is the buffer you want to examine:
0 = transmit buffer
1 = receive buffer
The output argument is the number of characters in the specified buffer.
Syntax
PUSH buffer to examine
CALL
36
POP number of characters
Example
>10
PUSH 0: REM EXAMINES THE TRANSMIT BUFFER
>
20 CALL 36
>
30 POP X: REM GET THE NUMBER OF CHARACTERS
>
40 PRINT “NUMBER OF CHARACTERS IN OUTPUT BUFFER IS”, X
>
50 END
Use this routine to clear the PRT2 port receive and/or transmit buffer.
Input and Output Arguments
This routine has one input argument and no output argument. The input
argument is the buffer you want to clear:
0 = transmit buffer
1 = receive buffer
2 = both buffers
Syntax
PUSH buffer to clear
CALL
37
Example
>
10 PUSH 0: REM CLEARS THE TRANSMIT BUFFER
>
20 CALL 37
CALL 36: Get the Number of
Characters in the PRT2 Port
Buffer
CALL 37: Clear the PRT2
Port Buffers
Vue de la page 224
1 2 ... 220 221 222 223 224 225 226 227 228 229 230 ... 393 394

Commentaires sur ces manuels

Pas de commentaire