User Messages to TP?

  • Hi,


    Thanks everyone for the help so far, this forum has been great.


    Do any of you Kuka experts know if there is a way to post a 'custom' style 'user generated' message to the pendant? I'd like to notify users if the communication link to my end effector goes out (for instance). I've found nothing in the system integrators manual, but that seems par for the course.


    Thanks!

  • AD
  • what is your KSS or controller type?


    parts and docs CD has expert documentation including message programming.
    that 'short-hand' message style is something only available on newer controllers, ones that have so called Message Library (KRC4, KSS 8.x).


    library is just two files:
    R1\System\MSGLIB.SRC
    R1\System\MSGLIB.DAT


    I tried placing it on KRC2 KSS5.6 and it worked just fine.
    Older library had a bug in the code for Dialog box (it worked, but the values for 7 keys were in reverse order: so if you press key 1, returned value is 7; if you press key 7, returned value was 1).

    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

  • I'm on KR C4-NA, KSS 8.3.


    I do have the files mentioned. Actually, it has some nice examples even:



  • I am on KSS8.3.6 and that bug still exists :)
    I never looked but it should be relatively easy to fix it.

  • yes, I think it is just few assignment lines:
    (pic)
    I think someone mentioned that it is finally fixed on 8.3.8, not sure (will try when I get time)

  • Hi All,


    I am trying to use MsgLib.src to generate a dialog message in KRC4 (KSS8.3.11 and WoV 3.1.4 Build 9). But when I am trying to call it my MainProg (Program Forlder) it is showing me read line which says "The declaration of this function was not found".


    Code
    MsgDialog("READY TO PROCEED","YES","NO")


    I checked and understood MsgLib.src and MsGDialog is defined as a global function. So my question is why VoW shows error if I call a function from MsGLib.src (System Folder) in MainProgram.src (Program Folder). Is it necessary to have both the src files (MsgLib and MainProgram) in same folder?


    Thanks

  • there is no function with such name and such parameters, first one should be return value, your strings are not all assigned to correct parameter etc.



    try


    Code
    DEF Test()
    DECL INT nAnswer
    MsgDialog(nAnswer,"Does this look simple enough?","R2D2",,"Maybe","No","Yes")
    MsgNotify("You pressed button number %1","C3PO",nAnswer)
    END

    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

  • Regarding the Star Wars code example you gave, panic mode, is there a way to link the soft keys to different functions?
    Ex:
    yes --> call MoveHome()
    no --> abort
    maybe --> retry


    ?

    Primary robot language: Fanuc.

    Secondary robot languages: Motoman, KUKA, ABB, Denso.

    Primary robot field: Automotive.

    Secondary robot fields: Material Handling, Palletizing.

    Expertise: Fanuc DCS software.

  • In Panic's example, the variable nAnswer is an INT that will contain the number of the button that was pressed, from 1-7.


    However, you need to watch that -- IIRC, KUKA goofed when they created the MsgLib, and the softkeys are numbered backwards. You'll have to check out how the exact numbering works for yourself.

  • Ah! Okay, I didn't know the "nAnswer" portion functioned like that. Thank you!

    Primary robot language: Fanuc.

    Secondary robot languages: Motoman, KUKA, ABB, Denso.

    Primary robot field: Automotive.

    Secondary robot fields: Material Handling, Palletizing.

    Expertise: Fanuc DCS software.

  • Is this code (from the KSS 8.2 Meldungen V1 en) how I would deal with the input?



    ???
    It seems rather different from the Star Wars setup. Am I comparing apples and oranges?

    Primary robot language: Fanuc.

    Secondary robot languages: Motoman, KUKA, ABB, Denso.

    Primary robot field: Automotive.

    Secondary robot fields: Material Handling, Palletizing.

    Expertise: Fanuc DCS software.

  • yes,


    what you have put together is the formal way of displaying dialog. while powerful, this takes some 15-20 lines of code to get the job done.


    MsgLib is a set of wrapper routines that allow nearly the same functionality but in usually just one line (lengthy messy code is hidden for user). in other words, MsgLib is just doing the same long code thing but allows you use neat one-line short forms.

    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

    Edited once, last by panic mode ().

  • there is no function with such name and such parameters, first one should be return value, your strings are not all assigned to correct parameter etc.



    try


    Code
    DEF Test()
    DECL INT nAnswer
    MsgDialog(nAnswer,"Does this look simple enough?","R2D2",,"Maybe","No","Yes")
    MsgNotify("You pressed button number %1","C3PO",nAnswer,)
    END

    Is it possible to give the Longtext name of an IO in the middle of the mesage? Like:


    ("Waiting for INPUT %1 failed. Press OK and then S1 button to try again.")

    %1 => I want that it be the name of an IO.


    I have done it with the below function. I am curious if it is possible with MsgDialog. (I couldn't find the help for MsgLib :|)

  • MsgLib contains help... just open the SRC file and read it

    MsgLib only does fraction of what messages and dialog can do, it is a trade-off to make use simple. one can of course embed as many values as you like and in any order you like... as long as the result is string not exceeding 80 character limit.

    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

  • MsgLib contains help... just open the SRC file and read it

    MsgLib only does fraction of what messages and dialog can do, it is a trade-off to make use simple. one can of course embed as many values as you like and in any order you like... as long as the result is string not exceeding 80 character limit.

    Thank you.

    Yet, I don't understand how can I put the name of my IO in the message. I have defined my IOs using the SIGNAL command and I want to put the Long Text name in the message. Like:

    "The Part_in input is False."

  • in the DAT file create two arrays that contain list of descriptions - one for input signals, one for output signals.

    Long tests are not accessible to KRL but you can get the descriptions from WoV, or from smartPad use menu StartUp>Service>Long texts.


    then in the message subprogram, pass either SIGINF or its elements TYP and IDX.

    this will allow you to pick correct array and description from array.

    then embed it into your message.


    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

  • After reading the user manual, I noticed that SIGINF is for finding the actual IO from a defined SIGNAL name.

    My problem is that, I want to give the defined SIGNAL name for IO as a string to the message command. I need a string finally.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account
Sign up for a new account in our community. It's easy!
Register a new account
Sign in
Already have an account? Sign in here.
Sign in Now