beautypg.com

11ć3 – Rockwell Automation 1775-S4B,D17756.5.3 User Manual SCANNER/MSG HND User Manual

Page 128

background image

Using Report Generation Functions

Chapter 11

11Ć3

Definition: To search the data terminal input buffer for a character.

Abbreviation: G

Format: G()

Description: The getchar function returns the binary bit pattern of the first
character in the input buffer. The 1775-S4B scanner reads the decimal
value of the character and clears the character from the input buffer.
Commands and operators can use this value specified by the getchar
function. Refer to table 9.D for the binary conversion information. If no
character is in the input buffer or if you enter a NUL character, the getchar
value is zero.

Example using the getchar function:

If you enter:

IF (G().EQ. 65) @MP_A

The 1775-S4B scanner executes procedure @MP_A if the first character
entered is decimal 65 or the ASCII character A.

Definition: To test the data terminal input buffer for a character.

Abbreviation: TESTC

Format: TESTC()

Description: The testchar function tests the input buffer for a character
and returns one of the following values:

If the value is:

Then the input buffer:

1
0

Contains a character
Is empty

The testchar function does not clear a character from the input buffer.
Commands and operators can use this value specified by the testchar
function.

11.2.1
Getchar

11.2.2
Testchar