Using an Add-On Instruction

Perform this procedure when you want to use an Add-On Instruction in one of your routines.
Before You Begin:
Does your
Logix Designer
application project have the definition for the Add-On Instruction? That is, is the definition in the Add-On Instructions folder in the Controller Organizer pane?
If
Then
Yes
Go to the Action steps below.
No
Copy and paste (or drag and drop) an Add-On Instruction from another project.
OR
To use an Add-On Instruction in one of your routines:
  1. Open the routine that will use the instruction.
  2. Click the Add-On tab of the Language Element toolbar.
  3. Drag the instruction from the toolbar to the routine.
    The Language Element toolbar displays the contents of the Add-On Instructions tab.
    TIP:
    To display the Instruction Browser, select
    Alt-Insert.
  4. Fill in the arguments for the instruction’s parameters.
    Define arguments for all fields on the Add-On Instruction. Supply a tag argument for the Add-On Instruction instance data in the first field. Subsequent fields may be Input Parameters,
    input parameter
    For an Add-On Instruction, an input parameter defines data that is passed into the instruction. The value is passed to the instruction before execution. The parameter's value is also accessible through a member of a tag, which is of the Add-On Instruction's data type. An input parameter also holds a value designed to specify how a sequence or procedure is to execute. Input Parameters can accept a literal value or a tag as an argument. The data type of an input parameter can be any valid atomic data type.
    Output Parameters, or
    output parameter
    Data that is produced as a direct result of executing an instruction or function.
    InOut Parameters. The arguments for InOut Parameters must match the InOut Parameter data type exactly.
    InOut Parameter
    For an Add-On Instruction, an InOut Parameter defines data that is used as both input and output during the execution of the instruction. An InOut Parameter is passed by reference, meaning the logic deals directly with the tag passed to the instruction. InOut parameters can be any valid data type because they are passed by reference. This includes message, motion group, all axis, and module data types. Any data structures or arrays that need to be passed to an Add-On Instruction must be done using InOut parameters.
    TIP:
    • For help with an instruction, select the instruction and then press [F1].
    In structured text, make sure the cursor is in the blue instruction name.
    • You can navigate to the instruction’s Logic routine by right-clicking on the instruction and selecting Open Instruction Logic.
Provide Feedback
Have questions or feedback about this documentation? Please submit your feedback here.
Normal