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

Write messages to KUKA.Sim Console / Output

  • Verschnupft
  • February 26, 2024 at 2:57 PM
  • Thread is Unresolved
  • Verschnupft
    Trophies
    1
    Posts
    3
    • February 26, 2024 at 2:57 PM
    • #1

    Hey,

    I'm currently working with KUKA.Sim 4.3.1 without KUKA.OfficeLite because it unfortunately isn't working on our computers.

    Subsequently I'm not able to access a SmartPad to see messages produced by the MsgLib module functions (if I'm not mistaken, this is my first KUKA project )

    MsgQuit() does log its messages to the output/console of the simulation but the whole simulation is being stopped aswell.

    Is there any way to log messages to the console/output without stopping the simulation?

    By 'console/output' I'm referring to the sub-window which is normally placed at the bottom center of your screen. The one displaying messages like "The simulation was paused because the interpreter has been stopped".

    I hope I've provided enough information. Thanks in advance for your support.

    Edited once, last by Verschnupft (February 26, 2024 at 3:03 PM).

  • Lemster68 February 26, 2024 at 3:03 PM

    Approved the thread.
  • panic mode
    Reactions Received
    1,262
    Trophies
    11
    Posts
    13,024
    • February 26, 2024 at 3:13 PM
    • #2
    Quote from Verschnupft

    MsgQuit() does log its messages to the output/console of the simulation but the whole simulation is being stopped aswell.

    Is there any way to log messages to the console/output without stopping the simulation?

    MsgQuit() is a part of MsgLib.src

    and there are other message types in there as well, making the change easy.

    you just need to replace calls to MsgQuit() with MsgNotify()

    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

  • SkyeFire
    Reactions Received
    1,037
    Trophies
    12
    Posts
    9,362
    • February 26, 2024 at 3:19 PM
    • #3

    In MsgLib:

    Code
    GLOBAL DEF MsgNotify(sText[]:IN, sModul[]:IN, nNumPar:IN, sTextPar[]:IN, nMsgNr:IN,MsgOpt:IN)
    DECL CHAR sText[], sModul[], sTextPar[]   
    DECL KrlMsg_T Msg
    DECL KrlMsgParType_T MsgParType
    DECL KrlMsgPar_T MsgPar[3]
    DECL KrlMsgOpt_T MsgOpt ;Bool-elements: VL_Stop,Clear_P_Reset,Log_To_DB

    The Log_To_DB setting in MsgOpt should allow any message type to be logged.. As Panic says, doing this to a Notify message should allow you to log messages without stopping program execution.

    Code
    ;----------Explainations for parameters: -----------
    
    ;CHAR sText[]  message text or message DB-key (80 chars)
    ;CHAR sModul[] (option) modulname or key (24 char)
    ;INT nNumPar   (option)numeric value inserted in sText[] at the position %1
    ;CHAR sTextPar[] (option)text or message DB-key inserted in sText[] at the position %1 (26 char)
    ;MsgOpt          (option) Structure KrlMsgOpt_T  BOOL VL_Stop,Clear_P_Reset,Log_To_DB
    ;                (option) VL_Stop=TRUE    => Creates an advance stop | FALSE avoids this behavior
    ;                (option) Clear_P_Reset=TRUE (Default) deletes Messages at program reset / cancelled
    ;                (option) Log_To_DB=TRUE => entry into logbook => enfluence to system performance
  • Verschnupft
    Trophies
    1
    Posts
    3
    • February 26, 2024 at 3:32 PM
    • #4

    I've tried the following which didn't work

    Code
    MsgOpt={VL_Stop FALSE, Clear_P_Reset TRUE, Log_To_DB TRUE}
    MsgNotify("text","module",,,1,MsgOpt)

    I'll try this again tomorrow. Maybe I'll need to enable something in the settings.

    As of now only error messages of the simulation in generell and the MsgQuit messages are displayed in the simulation's console : /.

  • SkyeFire
    Reactions Received
    1,037
    Trophies
    12
    Posts
    9,362
    • February 26, 2024 at 6:52 PM
    • #5
    Quote from Verschnupft

    I'll try this again tomorrow. Maybe I'll need to enable something in the settings.

    As of now only error messages of the simulation in generell and the MsgQuit messages are displayed in the simulation's console : /.

    Hm. I can't speak to KSim, but IIRC it works correctly on real robots. Can you generate a Logbook from KSim as you would on a real KRC?

  • Verschnupft
    Trophies
    1
    Posts
    3
    • February 27, 2024 at 8:34 AM
    • #6

    I found a solution, which isn't perfect but gets the job done. Because the function MsgQuit in MsgLib waits until the handle is destroyed, I'm using Set_KrlMsg(#Quit,...) directly.

    I guess this msg type normally expects an user input but this doesn't bother me while testing since I can't see the dialog/input anyways.

    For detecting a real controller I'm already using a variable isVirtualController. I'll just use that to either create a #QUIT or #NOTIFY message.

    Quote from SkyeFire

    Can you generate a Logbook from KSim as you would on a real KRC?

    I can't find an option for that. The only thing which might come close is an additional "RCS call output". I'll upload the output to Google Drive since I can't figure out how to upload the file here :grinning_face_with_smiling_eyes:

    RcsCallOutput

    Thise is the usual output

    Code: normal output
    KR 50 R2500 (Integriert): Set_KrlMsg QUIT msgsg
    KR 50 R2500 (Integriert): MsgQuit msg

    And this is a snippet of my code

    Code
    MsgOpt={VL_Stop FALSE, Clear_P_Reset TRUE, Log_To_DB TRUE}
       
    MsgPar[1].Par_Type = #EMPTY
    MsgPar[2].Par_Type = #EMPTY
    MsgPar[3].Par_Type = #EMPTY
       
    Msg={MODUL[] "module", NR 1, MSG_TXT[] "Set_KrlMsg NOTIFY msg"}
    nHandle=Set_KrlMsg(#NOTIFY, Msg, MsgPar[], MsgOpt)
    Msg={MODUL[] "module", NR 1, MSG_TXT[] "Set_KrlMsg QUIT msg"}
    nHandle=Set_KrlMsg(#QUIT, Msg, MsgPar[], MsgOpt)
    Msg={MODUL[] "module", NR 1, MSG_TXT[] "Set_KrlMsg STATE msg"}
    nHandle=Set_KrlMsg(#STATE, Msg, MsgPar[], MsgOpt)
       
    MsgNotify("MsgNotify msg","module",,,2,MsgOpt)
    MsgQuit("MsgQuit msg", "module",,,3,MsgOpt)
    MsgState(nHandle,"MsgState msg","module",,,4,MsgOpt)
    Display More

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

Tags

  • KUKA.Sim
  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