001 SD14
Set bit 14 high
002 SB15
Set bit 15 high
003 MG”DONE”
Print message
004 EN
End
:XQ #A
Execute #A
?001 SD14
Error on Line 1
:TC1
Tell Error Code
130 Unrecognized Command
This command doesn’t
:MG_ED
Print line number where problem occurred
1.00
The error occurred on line 1 of the program
Program Flow Commands
The RIO provides instructions to control program flow. The RIO program sequencer normally executes
program instructions sequentially. The program flow can be altered with the use of interrupts and conditional
jump statements.
Interrupts
To function independently from the host computer, the RIO can be programmed to make decisions based on
the occurrence of an input interrupt, causing the RIO board to wait for multiple inputs to change their logic
levels before jumping into a corresponding subroutine. Normally, in the case of a Galil controller, when an
interrupt occurs, the main thread will be halted. However, in the RIO, the user can indicate in which thread
(the thread must be already running when the interrupt occurs) the interrupt subroutine is to be run. When
the interrupt occurs, the specified thread’s main program will be paused to allow the interrupt subroutine to
be executed. Therefore, the user has the choice of interrupting a particular thread execution upon an input
interrupt (see II command). The input interrupt routines are specified using #ININTn where n can be 0-3. In
this way, the RIO can make decisions based on its own I/O status without intervention from a host computer.
The Return from Interrupt (RI) command is used to return from this subroutine to the place in the program
where the interrupt had occurred. If it is desired to return to somewhere else in the program after the
execution of the #ININTn subroutine, the Zero Stack (ZS) command is used, followed by unconditional jump
statements.
Note: When using multiple II commands in a program, each II command must point to a unique label and
must activate on an unused thread. Two or more II commands cannot be set to execute on the same thread,
nor can multiple II commands be pointed to the same #ININTn label. Please see the II command in the RIO-
47xxx command reference for more details.
54 Chapter 5 Programming
RIO-47xxx