Você está na página 1de 11

Add On Instruction

RSLogix 5000 introduced the concept of reusable code objects called Add-On Instructions. Add-On Instructions allow you to encapsulate your most commonly used logic as sets of reusable instructions. This saves you time by allowing you to easily re-use sets of your commonly used instructions in your projects .

Helps promote consistency in your projects since commonly used algorithms will all work in the same manner.

Add-On Instructions may be created using the standard Ladder, Function Block Diagram, and Structured Text editors.

Add-On Instruction may be used in any of the RSLogix 5000 editors.

Online troubleshooting of your Add-On Instructions is simplified by the provision of context views which allow you to visualize the logic for your instruction for a specific instance of its use.

Custom help for your instructions also make it easier for users of the instructions to get the help they need for a successful implementation.

source protection capability limit a user of your instruction to read-only access or to allow no access to the internal logic or local parameters used by the instruction.

General Information
The General tab can be used to update the information. The description, revision, revision note, and vendor information is copied into the custom help for the instruction. The revision is not automatically managed by the software.

Parameters
The Parameters define the instruction interface; how the instruction appears when used. The Parameter order defines the order that the Parameters appear on the instruction call. InOut tag values are not displayed even when Required and Visible because they can be configured as arrays and displaying arrays can consume excessive amounts of space.

Local Tags
Local Tags are hidden members and are not visible outside the instruction and cannot be referenced by other programs or routines. They are private to the instruction

Data Type
Parameters and Local Tags are used to define the data type that is used when executing the instruction. The software builds the associated data type. The software orders the members of the data type that correspond to the Parameters in the order that the Parameters are defined. Local Tags are added as hidden members

Logic Routine
The Logic routine of the Add-On Instruction defines the primary functionality of the instruction. It is the code that executes whenever the instruction is called. Shown below is the interface of an Add-On Instruction and its primary Logic routine that defines what the instruction does.

Scan Mode
Optional Scan Mode Routines

Change History
The Change History tab displays the creation and latest edit information that is tracked by the software. The By fields show who made the change based on the Windows user name at the time of the change

Help
The Name, Revision, Description, and Parameter definitions are used to automatically build the Instruction help. Use the Extended Description Text to provide additional Help documentation for the Add-On Instruction. The Instruction Help Preview shows how your instruction will appear in the various languages, based on Parameters defined as Required or Visible.

Você também pode gostar