ON MENU GOSUB (OPS1200 Display and Keyboard Only)

Sets up the keypad for subroutines

Format:

ON MENU GOSUB {list of 9 line numbers separated by commas}

Group:

Character I/O

Units:

none

See also:

ON MENU GOTO

This command will automatically wait for the operator to press the function (F1 thru F9) or ABORT keys on the OPS1200 front panel. Then, depending on the key depressed, a GOSUB will be done to the corresponding line number specified in the list of line numbers. If the ABORT key or any other key except F1 thru F9 is depressed, the control will transfer to the NEXT line in the program. Even if the user is only trying to sense 2 or 3 keys, he or she must specify the entire list of 9 line numbers.

This command will only work if the OPS: device has been opened using the OPEN command.

The following example shows a program using the ON MENU GOSUB command and setup.

Usage example:

10 ON MENU GOSUB (100,200,300,400,500,600,700,800,900)

20 ? ”FINISHED”

30 END

100 ? “100 OK”

110 RETURN

200 ? “200 OK”

210 RETURN

300 ? “300 OK”

310 RETURN

400 ? “400 OK”

410 RETURN

500 ? “500 OK”

510 RETURN

600 ? “600 OK”

610 RETURN

700 ? “700 OK”

710 RETURN

800 ? “800 OK”

810 RETURN

900 ? “900 OK”

910 RETURN

18

OPS1200 User’s Manual

Page 24
Image 24
Parker  Products OPS1200 user manual Sets up the keypad for subroutines, On Menu Goto