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

How to transmit the name of signal?

  • koen99
  • March 19, 2016 at 2:56 PM
  • Thread is Resolved
  • koen99
    Trophies
    3
    Posts
    10
    • March 19, 2016 at 2:56 PM
    • #1

    I have already declared a singal in "config.dat"(SIGNAL O_TEST $OUT[50])
    I want make a functions like "XXX(O_TEST)",then system would output signal
    "OUT_C[50]".I also used the system function "GET_SIG_INF" to get the signal
    number,but how to transmit the name of signal by XXX(O_TEST)?
    The variable of "O_TEST" is a character string or something else?
    Thank you very much!

  • SkyeFire
    Reactions Received
    1,051
    Trophies
    12
    Posts
    9,426
    • March 19, 2016 at 4:46 PM
    • #2

    You mean, you wish to pass a Signal to a function/subroutine by name? Hm... I don't recall ever attempting that myself, but system functions like PULSE will work on signal names, as well as $OUTs. So it might be possible to pass a Signal by name and allow the function to manipulate it, as long as it was passed with :OUT rather than :IN.

  • Online
    panic mode
    Reactions Received
    1,280
    Trophies
    11
    Posts
    13,082
    • March 19, 2016 at 5:41 PM
    • #3

    $OUT_C[] requires an integer which is the index value of your output
    i think there are only two options to this, pass index or pass name of the signal

    Code
    DEF sig( )
      signal test_o $out[22]
      decl siginf s 
    
    
      ; example1 - pass name 
      test_o=false
      sig_on("test_o")
    
    
    
    
      ; example2 - pass index
      test_o=false
      s=get_sig_inf("test_o")
      sig_on2(s.idx)
    
    
    END
    
    
    def sig_on(sig_name[]:in)
      decl char sig_name[]
      decl siginf sig
      sig=get_sig_inf(sig_name[])
      $OUT_C[sig.idx]=TRUE
    end
    
    
    def sig_on2(sig_index:in)
      decl int sig_index
      $OUT_C[sig_index]=TRUE
    end
    Display More

    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

  • koen99
    Trophies
    3
    Posts
    10
    • March 20, 2016 at 11:57 AM
    • #4

    Thank you ! :top:

  • RoboticsMan
    Reactions Received
    7
    Trophies
    4
    Posts
    272
    • April 4, 2016 at 10:41 PM
    • #5

    You can pass a signal to a function, by treating it as a bool reference in your function:

    Def my_function(my_signal:out)
    bool my_signal
    ...
    ...
    End

    I have done this, and it works.
    Was this what you were looking for?

    /RoboticsMan

  • Online
    panic mode
    Reactions Received
    1,280
    Trophies
    11
    Posts
    13,082
    • April 6, 2016 at 2:11 PM
    • #6

    That will transmit value, not the name of the signal...

    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

  • RoboticsMan
    Reactions Received
    7
    Trophies
    4
    Posts
    272
    • April 25, 2016 at 10:29 PM
    • #7

    I guess you're right. Would it be possible to solve the problem by making two signals?

    SIGNAL O_TEST $OUT[50]
    SIGNAL O_TEST_C $OUT_C[50]

    That would then require that one signal is used in one case, and the other signal in another case. Maybe not the most elegant solution. But would it work? I guess my question is: Is it possible to make a signal which is linked to $OUT_C?

    /RoboticsMan

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