Gosub Return; Goto - Omron R88A-MCW151-DRT-E Operation Manual

Mcw151 series motion control option board
Table of Contents

Advertisement

Command, function and parameter description
Arguments:
Precautions:
See also:
Example:

6-3-87 GOSUB RETURN

Type:
Syntax:
Description:
Precautions:
Arguments:
See also:
Example:

6-3-88 GOTO

Type:
Syntax:
Description:
superimposed on the RS-232C programming port 0 when using Motion Per-
fect.
n
The specified input device. When this argument is omitted, the port as speci-
fied by INDEVICE will be used.
0
RS-232C programming port 0
1
RS-232C serial port 1
2
RS-422A/485 serial port 2
5
Motion Perfect port 0 user channel 5
6
Motion Perfect port 0 user channel 6
7
Motion Perfect port 0 user channel 7
variable
The name of the variable to receive the ASCII code.
Channel 0 is reserved for the connection to Motion Perfect and/or the com-
mand line interface. Please be aware that this channel may give problems for
this function.
INDEVICE, INPUT, KEY, LINPUT
The following line can be used to store the ASCII character received on the
Motion Perfect port channel 5 in k.
GET#5, k
Structural Command
GOSUB label
... RETURN
The GOSUB structure enables a subroutine jump. GOSUB stores the position
of the line after the GOSUB command and then jumps to the specified label.
Upon reaching the RETURN statement, program execution is returned to the
stored position. Labels can be character strings of any length, but only the first
15 characters are significant.
Subroutines on each task can be nested up to 8 levels deep.
label
A valid label that occurs in the program. An invalid label will give a compilation
error before execution.
GOTO
main:
GOSUB routine
GOTO main
routine:
PRINT "Measured position=";MPOS;CHR(13);
RETURN
Structural Command
GOTO label
The GOTO structure enables a jump of program execution. GOTO jumps pro-
gram execution to the line of the program containing the label. Labels can be
character strings of any length, but only the first 15 characters are significant.
Section 6-3
143

Hide quick links:

Advertisement

Table of Contents
loading

This manual is also suitable for:

R88a-mcw151-e

Table of Contents