beautypg.com

Creating a module reference parameter – Rockwell Automation Logix5000 Controllers Add-on Instructions Programming Manual User Manual

Page 42

background image

Chapter 2

Defining Add-On Instructions

11. In the Constant list, select InOut parameters check box you want to

designate as constant values.

12. Repeat for additional parameters.

Tip:

You can also create parameters by using the Tag Editor, New Parameter or Local Tag dialog box, or by

right-clicking a tag name in the logic of your routine.

The order that you create the parameters is how they appear in the data type and

on the instruction face. To rearrange the order of the Parameter tab on the

Add-On Instruction Definition Editor, select the parameter row and click Move
Up
or Move Down.

A module reference parameter is an InOut parameter of the MODULE data type

that you use to access and modify attributes in a hardware module from within the

Add-On Instruction. For information on using a module reference parameter, see

Referencing a hardware module

on

page

79

. You can use the module reference

parameter in two ways:

• In a GSV or SSV instruction, or an Add-on Instruction, you can use the

module reference parameter as the Instance Name or Add-on Instruction

parameter.

• In an Add-on Instruction, or in a GSV or SSV instruction, you can pass the

module reference parameter into the InOut parameter of another nested

Add-on Instruction.

There are several limitations on module reference parameters:

• Module references parameters can only be InOut parameters with the

MODULE data type.

• You can use a module reference parameter only in standard programs and

Add-on Instructions, not in Safety programs or Safety Add-on Instructions.

Creating a module

reference parameter

42

Rockwell Automation Publication 1756-PM010F-EN-P - October 2014