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. other Languages
  4. Italiano (Italian)
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

Avviare un programma con CWRITE

  • Zenigata
  • March 17, 2020 at 11:55 AM
  • Thread is Unresolved
  • Zenigata
    Trophies
    3
    Posts
    6
    • March 17, 2020 at 11:55 AM
    • #1

    Ciao

    Sto provando a utilizzare la funzione CWRITE per richiamare programmi standard nei miei robot KSS8.3 / 8.5,

    Inizialmente volevo provare a richiamare direttamente il programma "master()" in seguito vorrei provare a inserire una String e eseguire il richiamo di alcuni programmi.

    se la funzione è richiamata sotto SPS riesco a richiamare il programma

    Es:

    ; PLC PIENO UTENTE


        ; Apporta le tue modifiche qui


    IF $ Flag [ 1 ] == true  THEN


    CWRITE ( $ CMD , Stat , modalità , "RUN / R1 / master ()" )


    ENDIF

    se provo a richiamare la funzione in un programma .src questo non funziona

    es:

    Test DEF ( )


     DECL STATE_T STAT


     DECL MODUS_T MODE


    MODE = #SYNC


      SE $ FLAG [ 1 ] == TRUE  THEN


    CWRITE ( $ FCT_CALL , STAT , MODE , "RUN / R1 / MASTER ()" )


      FINISCI SE


     ENDLOOP


    END

  • Online
    SkyeFire
    Reactions Received
    1,042
    Trophies
    12
    Posts
    9,388
    • March 17, 2020 at 2:05 PM
    • #2

    No mention of KSS version? You obviously didn't read the READ FIRST topic.

    Okay, several things wrong here.

    First, the Level 1 (Robot) Interpreter and the Level 0 (SPS) Interpreter cannot use CWRITE $CMD against themselves, only against each other.

    Second, you cannot simply issue a RUN command. At minimum, you must first STOP and CANCEL whatever program is currently loaded in the Interpreter.

    Third, you are failing to use any protection against "hammering" the CWRITE command -- it should only be issued once. You should be using the $PRO_STATE variables to check the current status of the Interpreter and condition your commands accordingly.

  • Zenigata
    Trophies
    3
    Posts
    6
    • March 17, 2020 at 2:41 PM
    • #3

    Ho letto l'argomento LEGGI PRIMO pero utilizzo molti robot con Differenti Versioni normalmente KSS8.3 ultimamente STIAMO iniziando ad utilizzare KSS8.5 quindi this Strutture vorrei utilizzarla Su più robot.

    Le sto provando con un simulatore versione KS 8.5.385

    utilizzando il CWRITE volevo modificare come normalmente richiamo i programmi:

    L'operatore quando crea un nuovo programma di pezzo deve andare nel "master pezzo" crea un nuovo CASO e aggiungi il nome del nuovo programma di pezzo che precedentemente ha creato

    VECCHIO:

    DEF Piece_manager ( nPrg : IN )

    DECL  INT nPrg ( DAL PLC )

    INTERRUTTORE nPrg

    ; Colonna 1

    CASO  1

    Program_1 ()

    CASO  2

    PROGRAMMA_2 ()

    CASO  3

    PROGRAM_3 ()

    CASO  4

    PROGRAM_4 ()

    ......

    Nuovo:

    Vorrei usare il CWRITE per non dover creare un CASE di tutti i programmi ma creare una String contenente tutti i nomi dei programmi e poi andarla a richiamare nella funzione

    DEF Piece_manager ( nPrg : IN )

    DECL  INT nPrg ( DAL PLC )

    DECL STATE_T STAT

    DECL MODUS_T MODE

    MODE=#SYNC

    CWRITE ($ CMD, Stat, Modalità, "RUN / R1 / "PrgList[nPrg]")


  • panic mode March 17, 2020 at 2:58 PM

    Moved the thread from forum KUKA Robot Forum to forum Italiano (Italian).
  • Online
    SkyeFire
    Reactions Received
    1,042
    Trophies
    12
    Posts
    9,388
    • March 18, 2020 at 2:15 PM
    • #4

    You still can't use CWRITE $CMD from inside the Level 1 Interpreter to control the Level 1 Interpreter.

    Using sting-building tricks in such a way is possible, but you would have to execute that code in the SPS.

    You cannot put an array into a string:

    CWRITE ($ CMD, Stat Mode, "RUN / R1 /" PrgList [NPRG] ")

    You would have to build the entire "RUN....." string using SWRITE, then use it as an argument in the CWRITE.

    And you still aren't using the $PRO_STATE variables.

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
  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