Status Functions; Call 36 - Get Number Of Characters In Prt2 Buffers - Rockwell Automation Allen-Bradley SLC 500 BASIC Reference Manual

Hide thumbs Also See for Allen-Bradley SLC 500 BASIC:
Table of Contents

Advertisement

11-2

Status Functions

CALL 36 – Get Number of
Characters in PRT2
Buffers
Publication 1746-RM001A-US-P
Purpose
Use CALL 36 to retrieve the number of characters in the chosen buffer of port
PRT2.
You must PUSH the buffer that you want examined:
PUSH 1 for the input buffer
PUSH 0 for the output buffer
One POP is required to get the number of characters.
Syntax
PUSH [buffer selection]
CALL 36
POP [number of characters]
Example
>1
REM EXAMPLE PROGRAM
>10 PUSH 0 : REM EXAMINES THE OUTPUT 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
READY
>RUN
NUMBER OF CHARACTERS IN OUTPUT BUFFER IS 0
READY
>

Advertisement

Table of Contents
loading

This manual is also suitable for:

Allen-bradley slc 500 basic-t1746-bas1746-bas-t

Table of Contents