System program 27 - error routine, 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 376

Advertising
background image

354

System Programs • System Program 27 - Error Routine

Publication 1398-PM601A-EN-P — October 2000

APPENDIXES

System Program 27 - Error Routine

This program runs each time a system error or warning occurs. If a fault has occurred, motion and pro-
grams are stopped, the ULTRA Plus or IQ is disabled, and the Error output is set (if defined) before this
program runs. If a warning has occurred, motion and programs are allowed to continue, but the Error
output is set (if defined) before this program runs.

When a program is compiled to save to the ULTRA Plus or IQ as the EROUTINE program, the Com-
piler Options must be set for Program type - “Error Program” and Add Debug Information - cleared
(off). See Part 2 • IQ Master Environment, for a complete description of compiler options.

The default EROUTINE program below uses the PRINTERR function to print the error message to the
Operator Terminal screen.

This program location is useful for applications which may need to automatically reset faults and restart
the application program. Other functions such as using a group of outputs to display the error number,
or use PRINT statements to prompt an operator on the cause of the fault, may be implemented in this
program.

Program Listing

;Source File Name: EROUTINE.QPS

;Version: 3.00

;Tested with IQMaster Version: 3.00

;Tested with IQ firmware Version: 3.00

;------------------------------ Description ------------------------------

;This is the default Error Handler Program.

;This program is saved as System Program #27 in standard personality modules.

;The source is NOT saved in standard personality modules.

;

;This program runs upon occurrence of a system error or warning. The only

;action is to print an error message to the operator terminal screen.

;NOTE: No message is printed for warnings.

;

;---------------------------- Variables used -----------------------------

;none

;-------------------------------- Inputs ---------------------------------

;none

;-------------------------------- Outputs --------------------------------

;none * The Error Output(8), if enabled, will turn on

; automatically upon occurrence of an error.

;---------------- Optional Accessories Required/Supported ----------------

;Operator Terminal - SUPPORTED

;The error message will be printed to the operator terminal screen.

;----------------------------- Begin Program -----------------------------

TITLE "Eroutine"

PGMTYPE = ERRPGM ;Set compiler options

DEBUG = OFF

DO

{

IF (EFLAG = ON) ;Print messages for errors

{ ; but not for warnings

CLR ;Clear Operator Terminal Screen

PRINT 1,8 "ERROR" ;Print ’ERROR’ on first line

PRINT 2,1 ;Position cursor on 2nd line

PRINTERR ;Prints error message

WAIT EFLAG = OFF ;Wait for error to be reset

}

} WHILE (WFLAG = ON) ;Wait for warning to be reset

;The program does not end until the error is cleared to keep the error

Advertising