beautypg.com

Rockwell Automation 1775-S4B,D17756.5.3 User Manual SCANNER/MSG HND User Manual

Page 72

background image

Using Symbols and Expressions

in Report Generation

Chapter 8

8Ć4

A user symbol is a name which represents data within a procedure. Such
data can be individual or groups of characters or numbers. The user symbol
must begin with a letter and can contain up to eight unique upper or lower
case letters, numbers, or the underscore character. For example:

USER_SYN

Report generation supports three types of user symbols:

Numeric—Variables that represent a number. The 1775- S4B scanner

stores numeric user symbols as 32-bit integers. You can use = or == to
assign numbers to numeric user symbols. Section 8.3.1 discusses these
assignment statements.

Example: A=10

String—Variables or characters that represent a group of numbers or

characters. The 1775-S4B scanner stores string user symbols as ASCII
characters. You can use =? or ==? to assign strings of data to a string
user symbol. Section 8.3.1 discusses these assignment statements.

Example: QFR =? ‘ABCDEF’

Label—Markers within procedures that tell the 1775-S4B scanner to

move to another section of the procedure. Labels must end with a
colon (:).

Example: BOTTOM:

You can classify a user symbol in one of two ways:

Procedural
Interprocedural

If you declare a procedural user symbol in a procedure, the 1775-S4B
scanner recognizes the symbol only in that procedure. For example, if you
declare A = 10 in a procedure, the 1775-S4B scanner recognizes A as
being 10 anywhere in that procedure.

If you declare an interprocedural user symbol in a procedure, the
1775-S4B scanner recognizes the symbol in that procedure and any other
procedure that the top procedure calls. For example, suppose you are
executing a procedure named @MASTER and you declare B == 10. Then,
@MASTER calls the procedure @SLAVE by executing the line:

@SLAVE

8.3
User Symbols