1. Dashboard
    1. Dashboard
    2. Suche
  2. Forum
    1. Unresolved Threads
  3. Members
    1. Recent Activities
    2. Users Online
    3. Team
    4. Search Members
  4. Jobs
  5. Articles
  6. Calendar
    1. Upcoming Events
    2. Map
  7. Shop
    1. Orders
    2. Shipping Costs
  • Login or register
  • Search
Roboterprogrammierer finden
This Thread
  • Everywhere
  • This Thread
  • This Forum
  • Articles
  • Pages
  • Forum
  • Blog Articles
  • Events
  • Files
  • Products
  • More Options
  1. Roboterforum.de - die Industrieroboter und Cobot Community
  2. Forum
  3. Industrieroboter Support
  4. KUKA Roboter
Your browser does not support videos autonome mobile Roboter von KUKA
besuche unseren Hauptsponsor
Roboterschulung Online
Online Roboterschulung
Advertise in Robotics
Der Roboterkanal
Deutscher Robotikverband
Werben in Robotik
Werben für Robotik

CWRITE/CREAD in KukaSim

  • prokox1616
  • June 9, 2025 at 3:17 PM
  • Thread is Unresolved
  • prokox1616
    Points
    10
    Posts
    1
    • June 9, 2025 at 3:17 PM
    • New
    • #1

    Hello,

    I try to learn using the CWRITE/CREAD commands for KUKA robots. I have a KUKASim 4.3 and I wonder if the information which i get in output window is strictly connected with the fact that I'm working on a simulator (controller is KR C4):

    KR 16 R1610 (integrated): Cwrite($FCT_CALL, STAT, MODE, "krl_fopen", "test.TXT", "w", HANDLE) is not supported.


    Below you can see my program (I took it from the manual about those instructions). So i think that the program tries to serach for a "test.txt" file in C:\KRC\ROBOTER\UserFiles

    and this must be a directory path from robot controller, so this can not work on simulator and i guess i need a real robot controller to test it. Am I Right?

    Code
    DEF  MAIN ( )
    DECL INT HANDLE
    DECL STATE_T STAT
    DECL MODUS_T MODE
    CHAR MYCHAR
    ;FOLD INI;%{PE}
      ;FOLD BASISTECH INI
        GLOBAL INTERRUPT DECL 3 WHEN $STOPMESS==TRUE DO IR_STOPM ( )
        INTERRUPT ON 3 
        BAS (#INITMOV,0 )
      ;ENDFOLD (BASISTECH INI)
      ;FOLD USER INI
        ;Make your modifications here
    
      ;ENDFOLD (USER INI)
    ;ENDFOLD (INI)
    MODE = #SYNC
    HANDLE = 0
    MYCHAR = "a"
    CWRITE($FCT_CALL, STAT, MODE, "krl_fopen", "test.TXT", "w", HANDLE)
    
    IF (STAT.RET1 == #CMD_ABORT) THEN
       IF (STAT.MSG_NO == -5) THEN
          ; error treatment if to many files are already open
       ELSE
       ENDIF
    ELSE
    ; no error occured
    ; write a character to the file
    CWRITE($FCT_CALL, STAT, MODE, "krl_fputc", HANDLE, MYCHAR)
       IF (STAT.RET1 == #CMD_ABORT) THEN
          ; error treatment
       ENDIF
       ; close the file
       CWRITE($FCT_CALL, STAT, MODE, "krl_fclose", HANDLE)
     
       IF (STAT.RET1 == #CMD_ABORT) THEN
          ; error treatment
       ENDIF
    ENDIF
    END
    Display More
  • Schritt für Schritt zum Roboterprofi!
  • SCMI
    Reactions Received
    23
    Points
    698
    Posts
    106
    Occupation
    Roboterprogrammierer
    • June 10, 2025 at 1:11 PM
    • New
    • #2

    Hello,

    Where did you put this code? Is it in a submit?
    Is Kuka.Sim even able to run submits?

    My experience is that Kuka.Sim doesn't really work like a real controller, it's only to simulate movements of the robot. I think you would need OfficeLite to get it work properly.

Tags

  • 1
  • 33
  • 2
  • ABB
  • ABB Roboter
  • ABS
  • base
  • constant
  • CP_PARAMS
  • Dialog
  • EX
  • EXT
  • fanuc
  • Fehler
  • FRAMES
  • INIT
  • INITIALIZED
  • INITMOV
  • IRC5
  • joint
  • KRC2
  • KRC4
  • kuka
  • new
  • NONE
  • notify
  • PATH
  • PGNO_GET
  • profinet
  • PTP_DAT
  • PTP_PARAMS
  • P_ACTIVE
  • P_FREE
  • P_RESET
  • P_STOP
  • Quit
  • Roboter
  • RobotStudio
  • Schweißen
  • Sps
  • Sync
  • T1
  • t2
  • tcp
  • Tool
  • VALUE
  • VAR
  • vel_cp
  • vel_ptp
  • Yaskawa
AD
Your browser does not support videos Automatisierung im Handwerk - ich schaffs mit KUKA
Einloggen für weniger Werbung

gesponserte Artikel

  • Gebrauchtroboter kaufen - Was ist zu beachten. Die Checkliste zum kauf von gebrauchten Robotern

    August 11, 2019 at 7:02 PM
  • Was macht ein Roboterprogrammierer genau und was verdient er?

    August 21, 2019 at 8:17 AM
  • Vernetzen, referenzieren, kollaborieren: Das B2B Portal für die Produktionsautomatisierung

    June 2, 2021 at 11:29 AM

Job Offer

  • Sie wollen Ihr Stellenangebot im Roboterforum schalten? Ab 149€

    Werner Hampel June 17, 2021 at 9:52 AM
  • Werde Roboterprogrammierer bei ROBTEC GmbH in Mainburg / Bayern

    Werner Hampel April 5, 2023 at 7:13 PM
Werbung auf Roboterseite
Roboter programmieren lernen
Banner Robotik

Similar Threads

  • KUKA Sim 4.3 Achse 6 endlos

    • deselby
    • March 5, 2024 at 8:41 PM
    • KUKA Roboter
  • Praxisnaher Einsatz von KukaSim

    • M_a-r_k-u_s
    • June 5, 2023 at 2:50 PM
    • KUKA Simulationssoftware
  • Alternativen zu KUKA.Sim / Visual Components

    • Matu
    • July 4, 2023 at 2:18 PM
    • andere Simulationswerkzeuge

Tags

  • kuka
  • KUKASim
  • cwrite
  • Cread

Wieviele Mitglieder waren heute eingeloggt?

Logge Dich ein, um hier zu lesen wer in den letzten 24h Online war und um weniger Werbung zu sehen.

  1. Privacy Policy
  2. Legal Notice
Powered by WoltLab Suite™ 6.0.22
Roboterforum.de - die Industrieroboter und Cobot Community in the WSC-Connect App on Google Play
Roboterforum.de - die Industrieroboter und Cobot Community in the WSC-Connect App on the App Store
Download