Rockwell Automation AutoMax Enhanced Ladder Editor User Manual

Page 28

Advertising
background image

2Ć10

Tip
You can also access the Instruction Info tab from the popĆup menu.

Point to the instruction that you want to change, press the right

mouse button, and choose Properties from the popĆup menu.
Tip
You can also change the information about the variables used in the

instruction. Simply choose the Variables tab or press CTRL+TAB to

display the Variable Properties.
Tip
To select the instruction and access the popĆup menu, place the

mouse pointer over the instruction and click the right mouse button.

2.10

Assigning Variables and Constants to

Ladder Instruction Parameters

Each instruction includes at least one input or output parameter. The

more complex instructions contain parameters for multiple

nonĆBoolean inputs and outputs. Each parameter has a variable

name field in which you enter the variable name or constant that you

want to assign to the parameter.
To help make assigning variables to instruction parameters easier

and faster, variables are automatically assigned a default data type

and scope when they are first entered. The default type is that most

likely to be used by the instruction. For example, the default type for

a variable name entered for a relay instruction is Boolean. But for a

JMP, the default type is label. For most block instructions, the default

type for input and output parameters is integer.
When you enter an elementĆindexed variable, a default maximum

array index is automatically assigned, which you can later change in

the Variable Properties.
The scope of the variable is determined by the case of the first letter

of the variable name you type. If the letter is upper case, the variable

defaults to being a global variable. If the letter is lower case, the

variable defaults to being a local variable.
To assign variables or constants to ladder instruction

parameters
Step 1.

Select the instruction for which you want to assign

variables. The variable name field appears as a

dottedĆline box.

Step 2.

Click in this dottedĆline box. The outline becomes solid

and a vertical text cursor appears.

Step 3.

Type in the variable name or a constant you want to use

following the naming conventions of the Editor. See the

reference information for the instruction you are

programming for more information about the allowable

variable types. The scope of a variable can be either

global or local. When you first enter a variable, its scope

is defined based on the case of the first letter you type.

An upper case letter defines the variable to be global. A

lower case letter defines it to be local. See section 2.15

for more information about a variable's scope.

Advertising