Interrupt Routines

Interrupt routines cause:

Interrupt routines are generally used with Immediate elements, for example to turn an output ON in case of an alarm or emergency. To call an interrupt routine:

  1. Include an Interrupt subroutine of the correct name in your program; the subroutine is executed automatically when the condition for calling it is filled.

Note

If the name of the subroutine is incorrect, the subroutine will not function as an Interrupt routine.

Interrupt features are not supported by the V120-12 series.

Sample applications showing how to use Interrupt routines in conjunction with Immediate elements may be located in :::\ ProgramFiles\Unitronics\VisiLogic\Examples.

2.5 mS Interrupt Routine

This function is timed-based. Call it by naming a subroutine _Interrupt 2.5 mS

Including an _Interrupt 2.5 mS subroutine in the Ladder application causes:

When the interrupt routine is finished, the program returns to where it was interrupted, and continues from that point until the next Interrupt arrives.

Note

The Subroutine _Interrupt 2.5 mS will run for the first time after the first Ladder scan is run.

1.25 mS Interrupt Routine

This function is supported by Enhanced Vision models only. Call it by naming a subroutine _Interrupt 1.25 mS
It functions exactly like the 2.5mS Interrupt routine described above.

Interrupt HSC

This function is called according to the current value of a high-speed counter. The program stops immediately and executes the subroutine when the Counter Value reaches the Counter Target Value.

The interrupt function is included in the program by naming a subroutine _Interrupt x,x  where the first x is the high-speed counter, and the second x is the reload. These subroutines must be named in accordance with your Hardware Configuration as:

When the interrupt routine is finished, the program returns to where it was interrupted, and continues from that point until the next Interrupt arrives.