beautypg.com

Rockwell Automation 1771-DB Basic Module User Manual - Series A User Manual

Page 100

background image

Operating Functions

Chapter 5

5–63

This routine gets the current character in the 255 character, peripheral port
input buffer. It returns the decimal representation of the characters received
as its output argument. The peripheral port receives data transmitted by
your device and stores it in this buffer. If there is no character, the output
argument is a 0 (null). If there is a character, the output argument is the
ASCII representation of that character. There is no input argument for this
routine.

Example:

u10 CALL 35

u20 POP X

u30 IF X =0 THEN GOTO 10

u40 PRINT CHR(X)

Important: A 0 (null) is a valid character in some communications
protocols. You should use CALL 36 to determine the actual number of
characters in the buffer.

Important: Purge the buffer before storing data to ensure data validity.

5.8.6
Get Numeric Input
Character from Peripheral
Port – CALL 35