DMC-1400 Series Command Reference II ● 105
II FUNCTION: Input Interrupt
DESCRIPTION:
The II command enables the interrupt function for the specified inputs. This function triggers
when the controller sees a logic change from high to low on a specified input.
If any of the specified inputs go low during program execution, the program will jump to the
subroutine with label #ININT. Any trippoints set by the program will be cleared but can
be re-enabled by the proper termination of the interrupt subroutine using RI. The RI
command is used to return from the #ININT routine
To avoid returning to the main program on an interrupt, use the command ZS to zero the
subroutine stack and use the II command to reset the interrupt..
ARGUMENTS: II m,n,o,p where
m is an integer between 0 and 7 decimal. 0 disables interrupt. The value of m specifies the
lowest input to be used for the input interrupt. When the 2nd argument, n, is omitted, only
the input specified by m will be enabled.
n is an integer between 2 and 7. This argument is optional and is used with m to specify a
range of values for input interrupts. For example, II 2,4 specifies interrupts occurring for
Input 2, Input 3 and Input 4.
o is an integer between 1 and 127. Using this argument is an alternative to specifying an input
range with m,n. If m and n are specified, o will be ignored. The argument o is an integer
value and represents a binary number. For example, if o = 15, the binary equivalent is
0001111 where the bottom 4 bits are 1 (bit 0 through bit 3) and the top 3 bits are 0 (bit 4
through bit 6). Each bit represents an interrupt to be enabled - bit0 for interrupt 1, bit 1
for interrupt 2, etc. If o=15, the inputs 1,2,3 and 4 would be enabled.
p is an integer between 1 and 127. The argument p is used to specify inputs that will be
activated with a logic “1”. This argument is an integer value and represents a binary
number. This binary number is used to logically “AND” with the inputs which have been
specified by the parameters m and n or the parameter o. For example, if m=1 and n=4,
the inputs 1,2,3 and 4 have been activated. If the value for p is 2 (the binary equivalent of
2 is 0000010), input 2 will be activated by a logic ‘1’ and inputs 1,3, and 4 will be
activated with a logic “0”.
Note: The ‘p’ data field is only supported by the DMC-1415/1416/1425.
USAGE:
While Moving Yes Default Value 0
In a Program Yes Default Format 3.0 (mask only)
Command Line No
Can be Interrogated Yes
Used as an Operand Yes
Controller Usage ALL (See Note for ‘p’ data field)
RELATED COMMANDS:
RI Return from Interrupt
#ININT Interrupt Subroutine
AI Trippoint for input