Transitional instructions, Instruction size – Rockwell Automation Logix5000 Controllers Add-on Instructions Programming Manual User Manual
Page 25

Designing Add-On Instructions
Chapter 1
Each of the programming languages supported in Logix Designer application is
targeted for different types of applications and programming styles. In general,
Ladder Diagram executes simple Boolean logic, timers, and counters the fastest.
Function Block Diagrams and Structured Text may be more efficient if you take
advantage of the more advanced process and drives instructions available in those
languages.
You cannot compare execution times for the same Add-On Instruction written in
different programming languages. There are fundamental differences on how the
different languages execute and are compiled.
Tip:
You can change the programming language after you create the Add-On Instruction by clicking Change
Type on the General tab on the Add-On Instruction Definition Editor. However, any existing logic will be
lost.
Transitional instructions
Some instructions execute (or retrigger) only when rung-condition-in toggles from
false to true. These are transitional-ladder diagram instructions. When used in an
Add-On Instruction, these instructions will not detect the rung-in transition to
the false state. When the EnableIn bit is false, the Add-On Instruction logic
routine no longer executes, thus the transitional instruction does not detect the
transition to the false state. Extra conditional logic is required to handle triggering
of transitional instructions contained in an Add-On Instruction.
Some examples of transitional instructions include: ONS, MSG, PXRQ, SRT,
some of the ASCII instructions, and some of the Motion instructions.
Tip:
The EnableInFalse routine can be used to provide the conditioning required to retrigger transitional
instructions contained in an Add-On Instruction. However, this method will not work for calls to this
Add-On Instruction contained in a Structured Text routine, since EnableIn is always true for calls in
Structured Text.
Instruction size
Add-On Instructions have one primary logic routine that defines the behavior of
the instruction when executed. This logic routine is like any other routine in the
project and has no additional restrictions in length. The total number of Input
parameters plus Output parameters plus local tags can be up to 512. There are no
limits on the number of InOut parameters.
There are no limits on the number of InOut parameters. However, limit extended
properties (.@Min and .@Max syntax) should not be defined on an InOut
parameter of an Add-On Instruction and should not be used in Add-On
Instruction definition logic or the logic does not verify.
Rock well Automati on Publication 1756- PM010F-EN-P - Oct ober 2014
25