beautypg.com

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

Page 78

background image

Using Symbols and Expressions

in Report Generation

Chapter 8

8Ć10

You can access the system symbols area by using the following extended
addressing format:

E6..1..

The character E6 denotes the system symbol area. You can enter values
from 0 thru 15 for the context with 0 being the context for global system
symbols. The next level is always 1. The symbol number and the word
number can be values from 0 thru 32,767.

When you want the 1775-S4B scanner to perform mathematical,
comparison, or bitwise operations within a procedure, you can use an
expression. An expression is a mathematical statement which enables the
1775-S4B scanner to manipulate data in PLC-3 memory. You can use
operators in expressions to combine:

Direct integer values
Direct string values
String or integer user symbols
Values at logical addresses
Values at symbolic addresses
Values of functions

To format an expression, simply enclose the statement in parentheses. For
example:

(6 + 3)

Table 8.A lists the operators that you can use in an expression. Along with
each operator, table 8.A gives an order of execution number for each
operator. This number tells you which operator executes first if you have
more than one operator in a statement. Order of execution moves from 1
thru 10 with 1 executing first. For example:

(6 + 3 * 2)

The *, or multiply operator, has a higher precedence than the + or addition
operator. In evaluating this expression, the 1775-S4B scanner multiplies 3
by 2 and adds 6. The result is 12.

If you want the addition operation to occur before the multiplication, you
would enter the expression as follows:

((6 + 3) * 2)

8.5
Expressions