RobotStudio event

UIMsgBox without acknowledge

Hi guys,
i am trying to implement a UIMsgBox in a Backgroundtask which should pop up while a signal condition is given.

If the condition is given the robot is waiting for acknowledge the UIMsgBox. is there a way to erase this?



  PROC main()
    VAR String DreiCon_Logo:="/hd0a/3con.png";

    WHILE do_0058_3CS_Rob_in_Main=1 DO

      UIMsgBox
          \Header:="3CON",
                       "  ! - - - - - - - - - - - - - - - - - - - - - - - - - - - - !"
            \MsgLine2:="  !                                                                                !"
            \MsgLine3:="  !                          ROBOT IS IN MAIN                          !"
            \MsgLine4:="  !                                                                                !"
            \MsgLine5:="  ! - - - - - - - - - - - - - - - - - - - - - - - - - - - - !"
            \Buttons:=btnNone
            \Icon:=iconInfo
            \image:=DreiCon_Logo

    ENDWHILE
    TPErase;

    WaitTime 0.2;
  ENDPROC


Robotic Software Engineer

Answers

  • lemster68
    lemster68 ✭✭✭
    Add the optional argument DiBreak.  If the message does not go away you might try TPShow TPLatest.
    Lee Justice
  • Hi Lemster, Thx for your feedback! 

    I already got it fixed with an "UIMsgWrite"

    https://imgur.com/a/Z1YxECn

    Code is working fine. 
    Just got the problem that i was not able to get a String into a String. 
    So i swap the MsgArray instead.

    Maybe Someone also wanna make this :smile:


      PROC MSG_Display()

        ! > Setting boolean variable TRUE
        VAR bool b_Display:=FALSE;

        ! > Variables for MSG Box
        VAR string Message_Array{5}:=["","","","",""];

        ! - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - !

        ! > Variables depending on current execution

        !   > JOB 01-10
        VAR string Job_00_MAIN{5}:=[
          " ! - - - - - - - - - - - - - - - - - - - - - - - - - - !",
          " !                                                     !",
          " !                   ROBOT IS IN MAIN                  !",
          " !                                                     !",
          " ! - - - - - - - - - - - - - - - - - - - - - - - - - - !"];

        ! > Setting boolean variable TRUE
        b_Display:=TRUE;

        ! > Displaying a Infobox if robot is in main
        WHILE (do_0058_3CS_Rob_in_Main=1 XOR gi_0257_Job_Nbr_Start>0) DO

          ! > Array to write other message on executing job
          TEST GInput(gi_0257_Job_Nbr_Start)
          CASE 0:
            Message_Array:=Job_00_MAIN;
          CASE 1:
            Message_Array:=Job_01_Home;

          ENDTEST

          IF b_Display=TRUE THEN
            UIMsgWrite "Company Name",Message_Array\Icon:=iconInfo;
          ENDIF
          b_Display:=FALSE;
          WaitTime 0.2;
        ENDWHILE

        ! > Setting boolean variable FALSE
        b_Display:=FALSE;

        UIMsgWriteAbort;
        WaitTime 0.2;
      ENDPROC


    Robotic Software Engineer