Problem

STI, Select Time Interrupt is a very useful function if you need to run some logic at preset time interval precisely. STI can run as fast as 1,000 times per second. It is easy to setup Micrologix STI function if you know what to do.

Solution

You can access the STI function from Controller -> Functions Files. Then click on the STI tab as shown below.

Micrologix STI Basic
Micrologix STI Basic

For the STI to work, you need to setup the following parameters:

  1. Program File Number (STI:0.PFN). Sample above points to subroutine 20. Every time the STI hit, it execute logic at subroutine 20.
  2. Put “1” at User Interrupt Enable (STI:0.UIE). PLC fault out if it is 0.
  3. Turn on Time Interrupt Enabled (STI:0.TIE). If it is 0, STI stops. This way, you can control STI via your program.
  4. Set time interval to run STI (STI:0.SPM). That’s how often you want to run your logic in your STI subroutine. Sample above runs the subroutine every 20 milliseconds.