"Busy popup window" via KRL

  • not exactly, but you could get similar thing using dialog. note that dialog must have at least one button or it will not show up, and if button is clicked, dialog will go away. so you need to display it again as long as "busy" is in progress and remove it when not busy.

    1) read pinned topic: READ FIRST...

    2) if you have an issue with robot, post question in the correct forum section... do NOT contact me directly

    3) read 1 and 2

  • In KRL, the SET_KRLDLG function is passed the message text, an array of text values for each button, some parameters, and passes back an integer "handle" attached to the dialog box that SET_KRLDLG pops up.


    Normally, the pop-up only clears when one of the buttons is pressed, but it's also possible to clear the pop-up from inside your program using CLR_KRLMSG (Handle Variable).


    In "raw" KRL, something like:

    Code
    nDialogMsgHandle=SET_KRLDLG(_Msg, _MsgPar[], _MsgSoftKey[], FI_MsgOpt)
    
    WAIT FOR Clear_KrlMsg(nDialogMsgHandle)

    I've never tried creating a Dialog pop-up with no buttons, but you could give it a shot. If it doesn't work for some reason, you could simply create one button and put your program into a loop that keeps popping the pop-up back up until the program is satisfied.


    The MsgDialog subroutine in the MsgLib library (located in the SYSTEM directory of your robot) is a good example of Dialog, although it doesn't support clearing the pop-up programmatically.


    I once made a modified version of MsgDialog that would allow my program to clear pop-ups based on either a SmartPad button being pressed, or on a value being sent from the PLC -- the PLC HMI "echoed" the SmartPad application messages, so the robot had to accept responses from either source.


  • Panic mode, SkyeFire, thank a lot for quick answer. I've understood that have no easy way to generate the popup window.


    In KRL, the SET_KRLDLG function is passed the message text, an array of text values for each button, some parameters, and passes back an integer "handle" attached to the dialog box that SET_KRLDLG pops up.


    Normally, the pop-up only clears when one of the buttons is pressed, but it's also possible to clear the pop-up from inside your program using CLR_KRLMSG (Handle Variable).

    Yes, i know how the SET_KRLDG function works. And my first think was about it. Thank you for good example i will investigate that!


    does it need to be a popup? status message would be perfect for this

    Yes it need to be a popup. I want to block any activity from User-s during my function is executed.

  • Yes it need to be a popup. I want to block any activity from User-s during my function is executed.


    attempting to block "any activity" is going to be difficult. you may have to define what the "any activity" really is. popup does not prevent user from using (or letting go) of enabling switch, turning mode switch or pressing anything that is not on screen. creating and removing custom popup is not really a big deal, it is just that it would need a bit more than just KRL if it need to look certain way (without button). the bigger question what is it that you are trying to prevent.

    1) read pinned topic: READ FIRST...

    2) if you have an issue with robot, post question in the correct forum section... do NOT contact me directly

    3) read 1 and 2

Advertising from our partners