Add a parameter to the definition of an Add-On Instruction

Use the Tag Editor to add a parameter to an Add-On Instruction. A parameter determines how the instruction appears when the instruction is used. The parameter order defines the order that the parameters appear on the instruction call.
  1. On the explorer bar, select Library icon
    Library
    .
  2. In
    Library
    , select the Add-On Instruction and then select Tags Icon
    View tags and parameters: (name)
    .
  3. In the last row of the Tag Editor, select
    Add Tag
    . A row for the tag appears.
  4. In
    Name
    , type the name of the tag or program parameter.
  5. In
    Data Type
    , type the name of the data type until the data type appears or browse to open
    Select Data Type
    , select the data type from the list, and then select
    Apply
    .
    TIP:
    • An Input parameter is a passed by value into the Add-On Instruction and must be a SINT, INT, DINT, REAL, or BOOL data type.
    • An instruction with only Input parameters, except EnableOut, is treated as an input instruction in a ladder diagram and appears left justified. Use the EnableOut parameter for the rung-out condition.
    • An Add-On Instruction can have up to 64 InOut parameters.
    • An InOut parameter is a passed by reference into the Add-On Instruction and can be any data type, including a structure or an array.
  6. In
    Usage
    , select a usage type -- INPUT, OUTPUT, or INOUT.
  7. In
    Visible
    , position the switch to the right Toggle On Icon to make the parameter visible or position the switch to the left Toggle Off icon to make the parameter not visible.
  8. In
    Required
    , position the switch to the right Toggle On Icon to make the parameter required or position the switch to the left Toggle Off icon to make the parameter not required. All required parameters must be visible.
  9. In
    Default Value
    , enter the value of the parameter. The default value entered for the Add-On Instruction appears for any new Input or Output parameter of the Add-On Instruction.
  10. (optional) In
    Style
    , select a display style to define how the parameter value appears.
    TIP:
    • SINT, USINT, INT, UINT, DINT, UDINT, BYTE, WORD, DWORD and BOOL data types have DECIMAL, BINARY, OCTAL, HEX, ASCII styles.
    • REAL and LREAL data types have FLOAT and EXPONENTIAL styles.
    • LINT, ULINT, and LWORD data types have DATE_TIME, LONG_DATE_TIME styles.
    • InOut parameters of non-atomic data types do not have a style to apply.
  11. (optional)
    Description
    . Enter a description of the tag to indicate the purpose of the parameter or the latest change to the parameter.
  12. Repeat steps 3-11 to add an additional parameter.
Provide Feedback
Have questions or feedback about this documentation? Please submit your feedback here.