168
••••
9 - PID Loops
Simatic 505 SoftShop
StartVariable
RST
StartVariable
AbortVariable
AckVariable
RST
AbortVariable
Figure 9-10Example of Activation/Deactivation of Auto Tuning Process
These variables could just as easily be manipulated with IF, IMATH or
MATH statements in an SFPGM or SFSUB. Allowed discrete variables
include bits in a V-memory word.
•
When Start Variable transitions from a false to a true, a
SmarTune session is activated.
•
When Abort Variable is true, a SmarTune session is deactivated.
•
If both are true, a session is deactivated, and Start Variable must
transition before a session will be activated.
•
If a SmarTune session is already queued or in progress, Start
Variable transitions are ignored.
Ack Variable acknowledges that SmarTune has detected that Start
Variable or Abort Variable is true. It is used to synchronize Start
Variable and Abort Variable program logic with SmarTune. If not used,
Start Variable and Abort Variable should remain true for a relatively
large amount of time. What constitutes a large amount of time depends on
program size and time slice assignments. See the discussion for
Activation Time Slice for further guidance.
SmarTune Restart
If this discrete variable is true, then SmarTune is restarted completely.
SmarTune will act as if a run-program-run transition occurred. If
SmarTune Restart is specified in more than one configuration, all are
tested for true and acted upon.
Status Variable
This word variable reports on the current state of a session. Three bits are
used in the word to allow easy use by an RLL program. Bit 2 is set when
a SmarTune session is completed, with or without errors or warnings. If
bit 3 is also set then an error was detected. Similarly, if bit 4 is set, then a
warning condition occurred. If only bit 2 is set, then a SmarTune session
completed with no errors or warnings. See Table 9-4 for a complete
listing. Note that entries with X's represent ranges of values.
PIN Variable
PIN Variable and PIN are provided to force a two-step procedure to be
followed before a loop is tuned. To use this feature, PIN Variable and
PIN must both be set. If PIN Variable is a null or PIN is zero, then
SmarTune activation is a one-step procedure dependent only on Start
Variable. If both are specified, then PIN Variable must equal PIN or a
SmarTune session will not be started or queued.
Previous Mode
If Previous Mode is used, SmarTune sets it to a value, which will switch a
loop to its pre-session mode when written to a loop’s LVF. This was