beautypg.com

11ć2, 2 input access functions – Rockwell Automation 1775-S4B,D17756.5.3 User Manual SCANNER/MSG HND User Manual

Page 127

background image

Using Report Generation Functions

Chapter 11

11Ć2

Input access functions give you the capability of entering characters into a
procedure during procedure execution. Figure 11.1 shows you the
relationship of the three input access functions to the data terminal
keyboard.

Figure 11.1

Input Access Functions

DATA

TERMINAL

KEYBOARD

INPUT BUFFER

TESTLINE () Ć Specifies a

value of 0 if no carriage return

terminated line is in the input

buffer; specifies a value of 1 if a

line is in the input buffer.

GETCHAR () Ć Specifies

the binary value from the

first character in the input

buffer (no character = 0)

and clears that character

from the input buffer.

TESTCHAR () Ć Specifies a

value of 0 if no character is in

the input buffer; specifies a

value of 1 if a character is in the

input buffer.

These functions work with the inquire command to provide interaction
between the procedure and your input from the keyboard. When you use
these functions or the inquire command, the 1775-S4B scanner stores
characters that are input from the data terminal in the input buffer. The
inquire command waits until all data is entered and [ENTER] is pressed
before continuing procedure execution. The input access functions allow
you to timeout the keyboard while the rest of the procedure continues to
execute. The input access functions include:

Getchar
Testchar
Testline

We describe these functions in the following three sections.

11.2
Input Access Functions