1. Home
    1. Dashboard
    2. Search
  2. Forum
    1. Unresolved Threads
    2. Members
      1. Recent Activities
      2. Users Online
      3. Team Members
      4. Search Members
      5. Trophys
  3. Articles
  4. Blog
  5. Videos
  6. Jobs
  7. Shop
    1. Orders
  • Login or register
  • Search
This Thread
  • Everywhere
  • This Thread
  • This Forum
  • Articles
  • Pages
  • Forum
  • Blog Articles
  • Products
  • More Options
  1. Robotforum - Support and discussion community for industrial robots and cobots
  2. Forum
  3. Industrial Robot Support and Discussion Center
  4. KUKA Robot Forum
Your browser does not support videos RoboDK Software for simulation and programming
Visit our Mainsponsor
IRBCAM
Robotics Channel
Robotics Training
Advertise in robotics
Sponsored Ads

dialog message.

  • capital9
  • June 8, 2022 at 12:03 PM
  • Thread is Unresolved
  • capital9
    Reactions Received
    3
    Trophies
    2
    Posts
    71
    • June 8, 2022 at 12:03 PM
    • #1

    hey guys,

    i am working with KRC4, KSS 8.6.8

    yesterday i went through robot forum looking for generating a dialog message and found this code would do the work.

    MsgDialog(,"Do you want to quit program?",,,"No","Yes")

    so when i run the program i get this message 'do you want to quit program' and option are YES /// NO .

    if i press yes the program continues and ends the program as i have programmed. so i have no problem with yes option

    but pressing no would also lead me to same result, how can i make a condition so that when NO is pressed it does something else.

    for example:

    if end_pallet_signal==true then ; end button pressed then it continues

    MsgDialog(,"Do you want to quit program? ",,,"No","Yes") ; dialog box appears option yes or no

    $out[900]=false ; if yes it continues

    goto start_of_program

    endif

    for above program i want to make it so that when No is pressed then $out[900]= false and goto some where else.

    i went through the manual but coulnot follow the example.

    help would be appreciated. thanks in advance.

    Edited once, last by capital9 (June 8, 2022 at 2:22 PM).

  • capital9
    Reactions Received
    3
    Trophies
    2
    Posts
    71
    • June 8, 2022 at 2:18 PM
    • #2

    if end_pallet_signal==true then


    msg = {modul[] "MyTech", Nr 7, msg_txt[] "Do you want to quit? "}


    SK[1] = {sk_Type #value, sk_txt[] "yes"}


    SK[2] = {sk_Type #value, sk_txt[] "no"}


    nHandle = Set_KrlDlg(msg, par[], SK[], opt)


        IF (nHandle > 0) THEN


          while (Exists_KrlDlg(nHandle, keynumber))


              wait Sec 0.1


          endwhile


          switch keynumber


              case 1


                   goto start_of_program


              case 2


    end_pallet_signal=false


                   goto continue_prog


          endswitch


        ENDIF


    endif


    Above code works for me fine. tried several time to make it work.

    i just follwed the kuka manual and thats it, but i still dont understand is how is that keynumber related to options (yes or no)

  • panic mode
    Reactions Received
    1,263
    Trophies
    11
    Posts
    13,030
    • June 8, 2022 at 4:03 PM
    • #3
    Code
    DECL INT n, button
    
    FOR n=1 to 10
      MsgDialog(button, "Select option"," PANIC MODE","Lift","Kick","Push","Punch","Cut","Drop","Toss","Twist")
      MsgNotify("You pressed button %1","RESULT",button)
      WAIT SEC 1
    ENDFOR

    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

  • panic mode
    Reactions Received
    1,263
    Trophies
    11
    Posts
    13,030
    • June 8, 2022 at 4:10 PM
    • #4
    Code
    DECL INT button
    
    MsgDialog(button, "Select option"," PANIC MODE","Lift","Kick","Push","Punch","Cut","Drop","Toss","Twist")
    
    SWITCH button
    
      Case 1 ; Twist
        $OUT[900]=TRUE
    
      Case 2 ; Toss
        $OUT[900]=FALSE
    
      Case 3 ; Drop
        $OUT[901]=TRUE
    
      Case 4 ; Cut
        $OUT[900]=FALSE
     
      Default ; whatever...
        MsgNotify("Something else...")
     
    ENDSWITCH
    Display More

    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

IRBCAM
Robotics Channel
Robotics Training
Advertise in robotics
Advertise in Robotics
Advertise in Robotics

Job Postings

  • Anyware Robotics is hiring!

    yzhou377 February 23, 2025 at 4:54 AM
  • How to see your Job Posting (search or recruit) here in Robot-Forum.com

    Werner Hampel November 18, 2021 at 3:44 PM
Your browser does not support videos RoboDK Software for simulation and programming

Tag Cloud

  • abb
  • Backup
  • calibration
  • Communication
  • CRX
  • DCS
  • dx100
  • dx200
  • error
  • Ethernet
  • Ethernet IP
  • external axis
  • Fanuc
  • help
  • hmi
  • I/O
  • irc5
  • IRVIsion
  • karel
  • kawasaki
  • KRC2
  • KRC4
  • KRC 4
  • KRL
  • KUKA
  • motoman
  • Offset
  • PLC
  • PROFINET
  • Program
  • Programming
  • RAPID
  • robodk
  • roboguide
  • robot
  • robotstudio
  • RSI
  • safety
  • Siemens
  • simulation
  • SPEED
  • staubli
  • tcp
  • TCP/IP
  • teach pendant
  • vision
  • Welding
  • workvisual
  • yaskawa
  • YRC1000

Thread Tag Cloud

  • abb
  • Backup
  • calibration
  • Communication
  • CRX
  • DCS
  • dx100
  • dx200
  • error
  • Ethernet
  • Ethernet IP
  • external axis
  • Fanuc
  • help
  • hmi
  • I/O
  • irc5
  • IRVIsion
  • karel
  • kawasaki
  • KRC2
  • KRC4
  • KRC 4
  • KRL
  • KUKA
  • motoman
  • Offset
  • PLC
  • PROFINET
  • Program
  • Programming
  • RAPID
  • robodk
  • roboguide
  • robot
  • robotstudio
  • RSI
  • safety
  • Siemens
  • simulation
  • SPEED
  • staubli
  • tcp
  • TCP/IP
  • teach pendant
  • vision
  • Welding
  • workvisual
  • yaskawa
  • YRC1000

Similar Threads

  • KUKA Message handling

    • xSubyx
    • May 23, 2022 at 12:50 PM
    • KUKA Robot Forum
  • KRC2 read number from KCP

    • Milan
    • March 23, 2022 at 9:50 PM
    • KUKA Robot Forum
  • How to create an information box with options to select in KRC2

    • sanoopgr8
    • November 9, 2014 at 4:05 PM
    • KUKA Robot Forum
  • Algorithm for Recording Unspecified Number of Points KRC2

    • EngineerTex
    • April 7, 2021 at 12:36 AM
    • KUKA Robot Forum
  • Variable input in dialog message KRC4.

    • luckey
    • December 4, 2020 at 9:46 AM
    • KUKA Robot Forum
  • Weekday variable?

    • Casper Vinding Olesen
    • May 26, 2020 at 10:44 AM
    • KUKA Robot Forum
  • Best practice : Dialog msg vs #Waiting msg

    • lionpeloux
    • November 14, 2018 at 10:53 AM
    • KUKA Robot Forum
  • SPS and DIALOG windows

    • Tiziano!
    • September 12, 2018 at 7:45 PM
    • KUKA Robot Forum

Tags

  • KUKA
  • KRC4
  • message
  • kuka programming
  • pop up
  • dialog
  1. Privacy Policy
  2. Legal Notice
Powered by WoltLab Suite™
As a registered Member:
* You will see no Google advertising
* You can translate posts into your local language
* You can ask questions or help the community with your knowledge
* You can thank the authors for their help
* You can receive notifications of replies or new topics on request
* We do not sell your data - we promise

JOIN OUR GREAT ROBOTICS COMMUNITY.
Don’t have an account yet? Register yourself now and be a part of our community!
Register Yourself Lost Password
Robotforum - Support and discussion community for industrial robots and cobots in the WSC-Connect App on Google Play
Robotforum - Support and discussion community for industrial robots and cobots in the WSC-Connect App on the App Store
Download