Intn on/off/ cont, Int n on/off/ cont, Words – Rockwell Automation 1398-PDM-xxx IQ Master Version 3.2.4 for IA-2000 and IQ-5000 Positioning Drive Modules, IQ-55 User Manual

Page 246: Interrupt, on/off/cont interrupts

Advertising
background image

224

Language Reference • Reference

Publication 1398-PM601A-EN-P — October 2000

WORDS

INTn ON/OFF/
CONT

Interrupt, ON/OFF/CONT

Interrupts

Purpose

Enable, disable, or continuously enable interrupt n.

Syntax

INTn ON/OFF/CONT

n

Specifies the number of the input interrupt: n = 1 or 2. Interrupt
1 is on input 11 and interrupt 2 is on input 12.

ON

Enable the interrupt for a single interrupt.

OFF

Disable the interrupt.

CONT

Continuously enable the interrupt.

Remarks

If the interrupt is enabled, an interrupt will cause encoder 1 and encoder 2 position to
be saved into system variable InP1 and InP2 respectively. The system flag FIn is then
set, and the interrupt is disabled.

If the interrupt is set to continuous the interrupt will not be disabled after an interrupt
is detected. As a result every time an interrupt is detected InP1 and InP2 will be
updated.

The flag FIn remains set until it is cleared with an FIn OFF statement. If the state of an
interrupt flag is not known when enabling the interrupt, clear the flag with an FIn =
OFF statement before enabling the interrupt. When a program stops, the interrupt flags
are cleared.

See Also

FIn, InPm, POS1, POS2, SINT2

Example

INT1 ON

INT2 CONT

INT1 OFF

;find an accurate difference in position between encoder 1 and 2.

FI1 OFF

;Turn OFF the interrupt flag.

INT1 ON

;Enable the input interrupt.

WAIT FI1 = ON

;Wait for the input to occur.

V1 = I1P2 - I1P1

;Calculate the difference in position.

Advertising