beautypg.com

Runtime editing, Nesting add-on instructions, Routines versus add-on instructions – Rockwell Automation Logix5000 Controllers Add-on Instructions Programming Manual User Manual

Page 26

background image

Chapter 1

Designing Add-On Instructions

Limits cannot be accessed inside Add-On Instruction logic.

The maximum data instance supported (which includes Inputs, Outputs, and

local tags) is two megabytes. The data type size is displayed on the bottom of the
Parameters and Local Tags tab in the Add-On Instruction Definition.

Runtime editing

Add-On Instructions can only be edited offline. If the intended functionality
needs to be changed in a running controller, consider carefully if an Add-On

Instruction is suitable.

Nesting Add-On Instructions

Add-On Instructions can call other Add-On Instructions in their routines. This

provides the ability to design more modular code by creating simpler instructions
that can be used to build more complex functionality by nesting instructions. The

instructions can be nested to seven levels deep.

Add-On Instructions cannot call other routines through a JSR instruction. You

must use nested instructions if you need complex functionality consisting of
multiple routines.

Tip:

To nest Add-On Instructions, both the nested instruction and the instruction that calls it must be of the
same class type or the calling instruction will not verify. That is, standard Add-On Instructions may call only

standard Add-On Instructions and safety Add-On Instructions may call only safety Add-On Instructions.

Routines versus Add-On Instructions

You can write your code in three basic ways: to run in-line as a main routine, to use

subroutine calls, or as Add-On Instructions. The following table summarizes the

advantages and disadvantages of each.

26

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