RobotStudio event

Loop a msg until bool ture

Hey, 

I have a msg line that i want to show until a bool is true.. How can i do this the easy way? I dont want to press any buttons for the robot to move on. Its on robotware 5.16

        WHILE OkToSorter()=TRUE AND OkToPick_1()=FALSE DO
                !
                st1:="Empty";
                st2:="Empty";
                st3:="Empty.";
                UIMsgBox
            \Header:="Empty",
            st1
            \MsgLine2:=st2
            \MsgLine3:=st3
            \Buttons:=btnOk
            \Icon:=iconWarning
            \Result:=ButtonAnswer
            \MaxTime:=2
            \BreakFlag:=err_var;
                !
            ENDWHILE
            !
        ENDIF
Tagged:

Best Answer

  • Tompanhuhu
    Tompanhuhu ✭✭
    Answer ✓
    If it's possible to use a signal (DI or DO) instead you could use dibreak / dobreak. Or maybe use a maxtime to close the messagebox and then show it again in your while-loop.

    Or you could do as Lemster suggested and use a tpwrite instruction.
    tpwrite "Waiting for condition.."; !Shows message on tpu
    waituntil OkToSorter()=FALSE OR OkToPick_1()=TRUE;
    tperase; !Clears tpu log
    Systemintegrator - Web / C# / Rapid / Robotstudio

    If I helped, please press Vote Up  :smile:

Answers