beautypg.com

Rockwell Automation Logix5000 Controllers Add-on Instructions Programming Manual User Manual

Page 32

background image

Chapter 1

Designing Add-On Instructions

Tip:

When you monitor an array InOut parameter inside of the logic routine, the parameter definition is used to
determine the size of the array. For example, assume you have defined an InOut parameter to be a

10-element array of DINTs and the end user passes in an array of 100 DINTs. Then if you open the Add-On

Instruction logic, select the appropriate context for that call, and monitor the array parameter, only 10

elements will be displayed.

Determining which parameters to make visible or required

To help be sure that specific data is passed into the Add-On Instruction, you can

use required parameters. A required parameter must be passed each argument for a

call to the instruction to verify. In Ladder Diagram and Structured Text, this is
done by specifying an argument tag for these parameters. In a Function Block

Diagram, required Input and Output parameters must be wired, and InOut

parameters must have an argument tag. If a required parameter does not have an

argument associated, as described above, then the routine containing the call to the

Add-On Instruction will not verify.

For Output parameters, making a parameter visible is useful if you do not usually

need to pass the parameter value out to an argument, but you do want to display

its value prominently for troubleshooting.

Required parameters are always visible, and InOut parameters are always required
and visible. All Input and Output parameters, regardless of being marked as

required or visible, can be programmatically accessed as a member of the

instruction's tag. The following picture shows the Simulation instruction in a

function block.

The following picture shows Simulation instruction in function block.

If you want a pin that is displayed in Function Block, but wiring to it is optional,

set it as Visible.

32

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