RobotStudio event

Intercept UIMessageBox messages

I'm trying to test the functionality of safety modules in RAPID. Certain actions cause errors in the program, but are custom UIMessageBox errors, so they can't be handled with an error handler. Can I intercept these messages for testing purposes? Or, can I read them from the Pendant to ensure they displayed correctly?

Example: If the robot is not in its home position when the start button is pressed, this code executes:

answer := UIMessageBox (Header:="The Robot is not at the Home Position"MsgArray:=HomePos_MessageButtons:=btnOKIcon:=iconWarning);

If possible, I'd like to catch that message instead of displaying it on the Pendant.

Comments



  • Just an idea that popped up:

    Make you own custom implementation of UIMessageBox that takes an additional 'test' parameter. If it is false, you just call the regular UIMessageBox, but if it is true, then you do something different (whatever that is), e.g

    [CODE]answer := UIMessageBox2(Header:="The Robot is not at the Home
    Position"MsgArray:=HomePos_MessageButtons:=btnOKIcon:=iconWarning, bTest);[/CODE]

    The parameter bTest can be a global parameter that you define in some system module.

    (Moved to RobotWare).




    Henrik Berlin2013-02-22 09:41:56
    Henrik Berlin
    ABB