beautypg.com

1 assignment statements – Rockwell Automation 1775-S4B,D17756.5.3 User Manual SCANNER/MSG HND User Manual

Page 73

background image

Using Symbols and Expressions

in Report Generation

Chapter 8

8Ć5

The procedure @SLAVE can use and alter B and any other interprocedural
user symbol declared in @MASTER, but @SLAVE does not recognize
procedural user symbols declared in @MASTER.

Refer to the next section for a discussion on the assignment statements.

CAUTION: In using user symbols, note the following:

Do not use the same variable(s) to declare a procedural and an

interprocedural user symbol within the same procedure, unpredictable
results could occur.

Do not use the same variable(s) to delare numeric or string user symbols

and labels within the same procedure, unpredictable results could occur.

Do not cycle power on the PLC-3 processor chassis or enter [CTRL] X

on your keyboard while a procedure is executing, you will erase all user
symbols from PLC-3 memory.

An assignment statement assigns a value to an address or a variable.
Report generation uses the following symbols in assignment statements:

Symbol

Function

=

Assigns the numeric value on the right to the variable or address

on the left. If a user symbol is on the left, it is defined to be a

procedural symbol.
Example: A = 10

==

Assigns the numeric value on the right to the variable or address

on the left. If a user symbol is on the left, it is defined as a

interprocedural symbol.
Example: B == l00

=?

Assigns the string value on the right to the variable or address on

the left. Only a user symbol can appear on the left side of a string

assignment.
Example: CHAR =? `ENTER A CHARACTER'

==?

Assigns the string value on the right to the variable on the left. If

a user symbol is on the left, it is defined as a interprocedural

symbol.
Example: CHAR ==? `ENTER TEMPERATURE READING'

8.3.1
Assignment Statements