Mi - mask interrupt – ElmoMC SimplIQ Command Reference User Manual

Page 104

Advertising
background image

MI - Mask Interrupt

Purpose:
Selects which interrupts (automatic routines) are active.

A user program may include a main code and some automatic routines. When the
program runs, the conditions for calling these routines are checked continuously. If the
conditions for running a automatic routine

4

are met, it is called. At certain times, you

may want to block some of the automatic routines. For example:
ƒ

An #@AUTO_RLS automatic routine may be deactivated in a homing process.

ƒ

You may want a certain code sequence to be un-interruptible.

ƒ

Certain auto-routines may be needed only when starting the program from certain
labels.

MI is a bit field. Each bit in MI masks its corresponding automatic routine, preventing its
execution. The MI bits are detailed in the following table:

MI Value

Masked Interrupt

Relevant Routine

1 (0x1)

Not used

0

2 (0x2)

Abort

AUTO_ER

4 (0x4)

Soft stop

AUTO_STOP

8 (0x8)

Soft begin

AUTO_BG

16 (0x10)

RLS

AUTO_RLS

32 (0x20)

FLS

AUTO_FLS

64 (0x40)

Switch enable

AUTO_ENA

128 (0x80)

Digital input 1

AUTO_I1

256 (0x100)

Digital input 2

AUTO_I2

512 (0x200)

Digital input 3

AUTO_I3

1024 (0x400)

Digital input 4

AUTO_I4

2048 (0x800)

Digital input 5

AUTO_I5

4096 (0x1000)

Digital input 6

AUTO_I6

8192 (0x2000)

Main Home event

AUTO_HM

16,384 (0x4000)

Auxiliary Home event

AUTO_HY

32,768 (0x8000)

User program error

AUTO_PERR

Table 3-32: MI Bits

4

These conditions include the requirements that: no interrupt request of high priority is

pending (in which case the corresponding automatic routine enters the pending list) and that
the interrupt is not masked (in which case the interrupt is ignored).

SimplIQ

Command Reference Manual

Alphabetical Listing

MAN-SIMCR (Ver. 4.5)

3-91

Advertising