Rockwell Automation RSView32 Runtime Users Guide User Manual

Page 33

Advertising
background image

A–2

RSView32 Runtime User’s Guide

You can attach security to the = (Equal) command just as you can
for any RSView32 command. For more information about security,
see Chapter 10, Adding security, in the RSView32 User’s Guide.

For more information about expressions, see Chapter 14,
Creating expressions, in the RSView32 User’s Guide.

Examples: The = (Equal) command

&Tag1 = Tag1 + 1

Evaluates the command asynchronously. Increases the value of Tag1
by 1.

Tag1 = Tag2

Sets the value of Tag1 to be the same as Tag2.

Tag1 = Tag2 + Tag3

Adds the values of Tag2 and Tag3 and stores the result in Tag1.

1Pump = {Industry–2} + {2Pump}

Adds the values of Industry–2 and 2Pump and stores the result in
1Pump. Braces surround Industry–2 because of the dash in the
name. Braces surround 2Pump because the name starts with a
number. No braces are used for 1Pump because this name is on the
left side of the equal sign.

Tag1 = if (Tag1 < Tag2) then 3 else 4

If Tag1 is less than Tag2, Tag1 is set to 3, but if Tag1 is equal to or
greater than Tag2, Tag1 is set to 4.

Tank1\Message = “Tank1 Overflow”

Writes the string Tank1 Overflow to the Tank1\Message tag.

Advertising