beautypg.com

Defining a user variable/constant – Rockwell Automation GMLC Reference Manual User Manual

Page 478

background image

Publication GMLC-5.2 - November 1999

Defining a User Variable/Constant

441

2.

Defining a User Variable/Constant

A variable or constant is a memory location allocated to store a number.
GML Commander allows you to use user variables and constants in your
program. You can set or modify these values during run-time or test and/
or set variables in your program. You can test variables for a variety of
conditions, for example, greater than (>), less than (<), or equal (=)
conditions.

You must define user variables or constants before they appear as
selections in the Tag Explorer. You define them for you application as you
need them.

Creating, Editing, and Deleting a User Variable or Constant

With the following example, we will show you how to create a user
variable, edit or delete the value, and add it to the General Watch Window.
You can use the same methods for a user constant.

Note: You can define user variables to appear in the tag window even if

the diagram has not been downloaded.

To:

Do the following:

View other
variables

Scroll down the Tag Window to view another
system variable.

Select a variable
to add to the
General Watch
window

1. Select a system variable.
2. In the Tag Window, select a variable with

the right mouse button. The variable short-
cut menu appears.

3. Select Watch to add the selected variable

to the General Watch Window.