Publication 1762-RM001C-EN-P
18-8 Using Interrupts
STS - Selectable Timed
Start
Instruction Type: output
The STS instruction can be used to start and stop the STI function or to
change the time interval between STI user interrupts. The STI instruction
has one operand:
•
Time - This is the amount of time (in milliseconds) which must expire
prior to executing the selectable timed user interrupt. A value of zero
disables the STI function. The time range is from 0 to 65,535
milliseconds.
The STS instruction applies the specified set point to the STI function as
follows:
•
If a zero set point is specified, the STI is disabled and STI:0/TIE is
cleared (0).
•
If the STI is disabled (not timing) and a value greater than 0 is entered
into the set point, the STI starts timing to the new set point and STI:0/
TIE is set (1).
•
If the STI is currently timing and the set point is changed, the new
setting takes effect immediately and the STI continues to time until it
reaches the new set point.
Note that if the new setting is less than the current accumulated time,
the STI times-out immediately. For example, if the STI has been timing
for 15 microseconds, and the STI set point is changed from 20
microseconds to 10 microseconds, an STI user interrupt occurs at the
next start-of-rung.
Addressing Modes and File Types can be used as shown below:
STS
Selectable Timed Start
Time 1
STS
Table 18.2 Execution Time for the STS Instruction
Controller When Rung Is:
True False
MicroLogix 1200 57.5
µ
s0.0
µ
s
MicroLogix 1500 50.7
µ
s0.0
µ
s
Table 18.3 STS Instruction Valid Addressing Modes and File Types
For definitions of the terms used in this table see Using the Instruction Descriptions on page4-2.
Parameter
Data Files Function Files
CS - Comms
IOS - I/O
Address
(1)
Mode
(1) See Important note about indirect addressing.
Address
Level
O
I
S
B
T, C, R
N
ST
L
MG, PD
RTC
HSC
PTO, PWM
STI
EII
BHI
MMI
DAT
TPI
Immediate
Direct
Indirect
Element
Bit
Word
Long Word
Time •• ••• • • ••
IMPORTANT
You cannot use indirect addressing with: S, ST, MG, PD,
RTC, HSC, PTO, PWM, STI, EII, BHI, MMI, DAT, TPI, CS,
IOS, and DLS files.