Rpbasic-52 programming guide, Onitr – Remote Processing BASIC 52 User Manual
Page 91

RPBASIC-52 PROGRAMMING GUIDE
2-72
ONITR
Syntax:
O N I T R number,line number
ONITR number
O N I T R line number
ONITR
Where: number = interrupt line. This is ca rd dependen t. Refer to your hardw are manu al.
line number = Subroutine line number to go.
Function:
Branche s to a service subrou tine on an extern al or counter interrupt.
Mode:
Run
Use:
ONITR 0,5000
Executes a subroutine at line 5000 on hardware interrupt 0.
Cards:
Basi c com man d avai lable fo r all car ds. number may or m ay not be used . Refer to your hardw are
manual for more information.
D E S C R IP T I ON
ONITR provides a way to respond to hardware interrupts. It replaces ONEX1 in BASIC-52. Interrupts can
be external through the opto isolator, external TTL, or any number of card dependent sources. The number of
interrupts available depend upon the card type. Refer to your hardware manual for specific information.
The first two syntaxes are for the RPC-330. The second two are for the RPC-320 and RPC-52.
Hardw are interrupts are edg e sensitive and la tched. Wh en the current R PBA SIC program statement is
completed, execution branches to the subroutine specified by line number. Interrupt latency is determined by
the cu rrent pro gram statem ent. Th e IDL E com man d provi des the fastest respon se to an interrup t.
Y o u m u st e xi t an O N I T R us i ng t he R E T I s t at e m e nt . F a il u re t o d o so p re v e nt s ot h er O N IT R a n d O N T I C K
interrupts.
To turn off ON ITR, refer to the ca rd's hardware m anual.
ONITR can be interrupted only by an ONTICK interrupt. Also, ONITR can interrupt any other multi-tasking
statement (ON L INE, ON C OM$, O N KEY PAD, etc.) but cannot be interrupted by them . An interrupt pulse
to the card m ust be at least 1 m icro-second long , low level.
RELATED
RETI
ERRORS
none