
Define an Add-On Instruction component Chapter 5
Rockwell Automation Publication 1756-RM084S-EN-P - March 2015 87
Routine Name Description
Prescan Defines logic to execute during prescan.
Postscan Defines logic to execute during postscan.
EnableInFalse Defines logic to execute when EnableIn is false.
For example, this structure for an Add-On Instruction uses all four routines.
ADD_ON_INSTRUCTION_DEFINITION Example (attributes)
PARAMETERS
add_on_instruction_parameters
END_PARAMETERS
LOCAL_TAGS
add_on_instruction_local_tags
END_LOCAL_TAGS
FBD_ROUTINE Logic (attributes)
function_block_routine_logic
END_FBD_ROUTINE
ST_ROUTINE Prescan (attributes)
structured_text_routine_logic
END_ST_ROUTINE
ROUTINE Postscan (attributes)
ladder_logic_routine_logic
END_ROUTINE
FBD_ROUTINE EnableInFalse (attributes)
function_block_routine_logic
END_FBD_ROUTINE
END_ADD_ON_INSTRUCTION_DEFINITION
If a tag in an Add-On Instruction references a second Add-On Instruction whose
definition is also present in the file, the referenced Add-On Instruction definition
must appear before the first one in the import/export file.
Add-On Instruction attributes
L5X Item L5K Item Identifies
Name name L5X only. Specify the name of the Add-On Instruction.
In L5K, the name is an element of the statement.
ID ID The element identifier; uniqueness is important for wiring.
Type an unsigned, 32-bit integer value.