Download IQ® Programmer Reference Manual

Transcript
IQ® Programmer Reference Manual
OI - On Input
Compatibility:
Affects:
See also:
Q drives only
Interrupt function and stored program flow
MT, OF command
When the given input condition is met the OI command causes program segment 10 to immediately load from non-volatile
memory into the queue. The OI command operates as a kind of software switch. Executing the command turns the interrupt
function on. Responding to the interrupt input (by loading segment 10) turns the interrupt function off. Therefore after an interrupt
condition is cleared in the system the OI command must be executed again to reset the interrupt function. One way to do this
is place a copy of the OI command near the end of segment 10, before loading and executing another segment (QX command).
Only one interrupt input can be defined at a time within a program. Executing the OI command with no parameter disables the
interrupt function.
If Multi-Tasking is disabled (MT0, default) when the input condition is met, any move in progress will be aborted and Segment 10
will be loaded immediately. If Multi-Tasking is enabled (MT1) when the input condition is met, the program will branch to Segment
10 without interrupting a move in progress. In this scenario a Stop Move (SM) command may be used to abort the move.
Command Details:
Structure
OI{Parameter #1}
Type
BUFFERED
Usage
WRITE ONLY
Non-Volatile
No
Register Access
None
Parameter Details:
(See Appendix F: Working With Inputs and Outputs)
Examples:
Command
Drive sends
MT0
-
OIX5F
-
Notes
Turn Multi-Tasking off
Load and execute program segment 10 when input X5 goes from
high to low. If a move is in progress, abort it.
MT1
-
OIX5F
-
Turn Multi-Tasking on
Load and execute program segment 10 when input X5 goes from high to low. Has no effect on a move already in progress.
OI
Disable interrupt function
-
135