System program 5 - run, Program listing, Appendixes – Rockwell Automation 1398-PDM-xxx IQ Master Version 3.2.4 for IA-2000 and IQ-5000 Positioning Drive Modules, IQ-55 User Manual
Page 354

332
System Programs • System Program 5 - Run
Publication 1398-PM601A-EN-P — October 2000
APPENDIXES
System Program 5 - Run
This program runs a motion program by asking an operator to enter a program number to run. The Oper-
ator Terminal screen and keypad is used to prompt the operator.
Program Listing
;Source File Name: RUN.QPS
;Version: 3.00
;Tested with IQMaster Version: 3.00
;Tested with IQ firmware Version: 3.00
;------------------------------ Description ------------------------------
;This is the default operator terminal function key program to run a
;specific program number.
;This program is saved as System Program #5 in standard personality modules.
;It may also be saved as any Function Key System Program (range is 1-24).
;The source is NOT saved in standard personality modules.
;
;This program prompts an operator to enter a program number from the
;operator terminal keypad. After the operator verifies this action with
;a Yes or No, the selected program is run.
;
;---------------------------- Variables used -----------------------------
;F63 used for yes/no input from operator
;FNVAR1 special variable reserved for Function Key programs
;-------------------------------- Inputs ---------------------------------
;none
;-------------------------------- Outputs --------------------------------
;none
;---------------- Optional Accessories Required/Supported ----------------
;Operator Terminal - REQUIRED
;An operator selects the program to run using the operator
;terminal keypad.
;----------------------------- Begin Program -----------------------------
TITLE "Run"
PGMTYPE = FKEYPGM ;Set compiler options
DEBUG = OFF
CLR
PRINT 1,4 "Run Program" ;Ask operator for program number.
FNVAR1 = PGMNUM ;Use current program as default selection.
IF (PGMNUM = 255) ;The current program # is changed to 0 if
PGMNUM = 0 ; it is at 255. A 255 indicates that the
; default run sequence has been used for
; last program execution.
READ 3,1 "Program # ", SHOW FNVAR1 ,2,0 (0,31)
;The program range is limited here to #31.
;If a Memory and I/O option card is present,
; this number should be increased to 63.
PRINT 3,1 "Run Pgm ",FNVAR1 ,2,0
READ " Y/N?",F63 ;Ask for verification before starting program.
; (operator must press ’Y’
IF (F63 = ON) ;If operator says ’Y’,
{
PGMNUM = FNVAR1 ; set program number,
STARTP = ON ; and start program.
}
CLR ;Clear F-Key screen on exit.
END