RobotStudio event

Use ErrRaise to generate fatal error

Hi all,

I've been playing around with ErrRaise to raise custom errors. I managed to install custom .xml elog files and throw a custom error, but I was unable to generate a fatal error (execution of the robot program stops, similar to the behavior of ErrWrite without the optional arguments \W or \I). Currently, the custom error message behaves as ErrWrite \W.
My custom .xml files:

test_elogtext.xml:
<?xml version="1.0" encoding="utf-8"?> <!--*********************************************--> <!--The text description file for Elog Messages --> <!-- --> <Domain elogDomain="" domainNo="11" lang="en" elogTextVersion="1.0" xmlns="urn:abb-robotics-elog-text" min="7001" max="7001"> <Message number="7001" eDefine="ERR_TEST"> <Title> Test error </Title> <Description> This error was raised in task: <arg format="%s" ordinal="1" /> <p /> Please have a look at: <arg format="%s" ordinal="2" /> <p /> to solve this issue. </Description> </Message> </Domain>

test_elogtext.xml:
<?xml version="1.0" encoding="utf-8"?><ExtractTitles> <Title domain="11" number="7001">Test error</Title> </ExtractTitles>

And my RAPID code:
MODULE mainmodule VAR errnum ERR_TEST:=-1; PROC main() BookErrNo ERR_TEST; ErrRaise "ERR_TEST",7001,ERRSTR_TASK,ERRSTR_CONTEXT,ERRSTR_UNUSED,ERRSTR_UNUSED,ERRSTR_UNUSED; ERROR EXIT ; ENDPROC ENDMODULE

Which results in the following warning:
image

As you can see, the title is missing, which seems to be a problem in RW6.0 (in RW5.61, the title shows just fine). RobotStudio does show the title:
image
If I use ErrLog, I can get it to show as fatal error (which has to be acknowledged by the operator):
image

However, this time the error handler does not kick in. Any ideas how to raise a custom fatal error (so an error handler will take the appropriate actions)?

Comments

  • Hello,

    How did you install the custom XML files, I am having troubles understanding h and help isnt helping much.

    Best,
    B.