beautypg.com

Rockwell Automation 1398-PDM-xxx IQ Master Version 3.2.4 for IA-2000 and IQ-5000 Positioning Drive Modules, IQ-55 User Manual

Page 274

background image

252

Language Reference • Reference

Publication 1398-PM601A-EN-P — October 2000

WORDS

Remarks

Numbers are always displayed justified to the right side of the field. However, the field
will be overrun if the number of characters in the variable exceeds the specified field
width.

Control codes can be sent to a serial port using the standard PRINT statement. The
control codes may be used to position the cursor, print other text, or perform special
functions. These control codes are normally used with a generic terminal rather than
an Allen-Bradley Operator Terminal. The syntax of the PRINT statement to send the
code is:

PRINT "^code"

where

code

is a two digit hexadecimal representation of the character to be printed.

An example that prints a message to a generic display device is shown below. The
example prints a blank line using the control codes ‘0D’(carriage return) and ‘0A’(line
feed) then prints the message on the next line:

PRINT “^0D^0ASpeed=“ ,G23

Control codes may be embedded anywhere in a message text string but must always be
preceded by the caret character (^).

Other control codes have specific functions when sent to the Allen-Bradley Operator
Terminal. The codes available are:

Code

Function

D0

Begin character blink field

D1

End character blink field

D2

Turn Fkey Mode display ON

D3

Turn Fkey Mode display OFF

D4

Lock Fkey Mode ON

D5

Lock Fkey Mode OFF

C0

Display Fkey Mode 1

C1

Display Fkey Mode 2

C2

Display Fkey Mode 3

C3

Display Fkey Mode 4

C4

Display Fkey Mode 5

C5

Display Fkey Mode 6

C8

Write to main program display

C9

Write to Xkey display

CA

Write to Fkey display

CB

Write to Error routine display

0D

Carriage Return

0A

Line Feed

1B

Escape

The codes C8, C9, CA, and CB are used to print to different Operator Terminal screens
without affecting what your program is displaying. For example, use the code C9 in a
PRINT statement in an Xkey routine to display information while in the Xkey routine.
When the Xkey routine ends, the Operator Terminal will display what was shown
before the Xkey routine began.

Note: If Lock Fkey menu is used in a program, the lock will be turned OFF when the
program ends.

Print statements are not allowed in Scanned Event routines.

See Also

READ