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

KRL code to save variables timestamped in a text file Kss 8.3.34

  • herja
  • September 13, 2021 at 12:05 AM
  • Thread is Unresolved
  • herja
    Trophies
    3
    Posts
    6
    • September 13, 2021 at 12:05 AM
    • #1

    Hi,

    I'm trying to figure out how to write variables in to text file and I'm really struggling to figure out right way to do it. I have read the CREAD/CWRITE manual and searched related topics from here, but many of the examples are gone and i'm useless with kuka syntax manuals.

    I would appreciate if someone could give me example how do I write 2 INT and one REAL variable with timestamps in to one text file.

    Kss 8.3.34

    INT V=1000

    INT V2=2000

    REAL V3=10500.80000

    Thanks!

  • MOM
    Reactions Received
    175
    Trophies
    7
    Posts
    1,418
    • September 13, 2021 at 12:11 AM
    • #2

    look for swrite - there are a lot of examples in this forum

  • Online
    SkyeFire
    Reactions Received
    1,039
    Trophies
    12
    Posts
    9,380
    • September 13, 2021 at 3:08 PM
    • #3

    The functions LogFileOpen and LogFileAppend in this module may be helpful. I wrote them for just such operations. It's built to create a CSV file, with the Open function putting labels at the top of each column. It's optimized for going into Excel and creating neat columns with labels, for easy chart creation.

    Files

    krlfunctions.zip 21.69 kB – 117 Downloads
  • panic mode
    Reactions Received
    1,267
    Trophies
    11
    Posts
    13,033
    • September 13, 2021 at 3:48 PM
    • #4

    this may work too

    Files

    krl_log.zip 1.09 kB – 111 Downloads

    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,267
    Trophies
    11
    Posts
    13,033
    • September 13, 2021 at 3:56 PM
    • #5

    as MOM suggested, SWRITE seem to be a bit better than CWRITE and there are more examples, but - this functionality requires overhaul (by KUKA...).

    formatting does not work correctly or as described in the manuals (and i think it never did). an example is %f etc. in fact the very examples for %f do not work. SWRITE is more likely to be convinced to use specified format but this fails too. in general string manipulation is always a challenge and there are special considerations.

    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

  • herja
    Trophies
    3
    Posts
    6
    • September 14, 2021 at 3:34 AM
    • #6

    Thank you for all the help!

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

  • CREAD/CWRITE
  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