12.07.2015 Views

RAPID reference manual - Technology

RAPID reference manual - Technology

RAPID reference manual - Technology

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

InstructionErrRaiseAdvanced <strong>RAPID</strong>ErrRaise - Writes a warning and calls an error handlerErrRaise is used to create an error in the program and then call the error handler of theroutine. A warning is written in the robot message log. ErrRaise can also be used inthe error handler to propagate the current error to the error handler of the calling routine.Error name, error number and five error arguments must be stated.ExampleAn ErrorId must be declared in a .xml file. The number must be between 5000 -9999. The error message is written in the .xml file and the arguments to the messageis sent in by the ErrRaise instruction. The ErrorId in the .xml file is thesame stated in the ErrRaise instruction.Example of message in .xml file:Parameter errorTask:Symbol is read-onlyContext:Example of instruction:MODULE MyModulePROC main{VAR errnum ERR_BATT:= -1;VAR num errorid := 7055;BookErrNo ERR_BATT;ErrRaise "ERR_BATT", errorid, ERRSTR_TASK,ERRSTR_CONTEXT,ERRSTR_UNUSED,ERRSTR_UNUSED, ERRSTR_UNUSED;ERRORIF ERRNO = ERR_BATT......TRYNEXT;}ENDPROCENDMODULE<strong>RAPID</strong> <strong>reference</strong> <strong>manual</strong> - part 1a, Instructions A-R 105

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!