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. Stäubli & Bosch 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

create a random number

  • ycrideas
  • April 19, 2023 at 9:36 PM
  • Thread is Unresolved
  • ycrideas
    Trophies
    1
    Posts
    12
    • April 19, 2023 at 9:36 PM
    • #1


    hello everyone, I'm looking for some kind of function in the SRC that creates a random number. if this type and function does not exist, do you suggest any specific type of development for this task?
    tks

  • Johnsenfr
    Reactions Received
    1
    Trophies
    3
    Posts
    11
    • April 21, 2023 at 7:44 AM
    • #2

    There are extra packages called "addons" and they are available for free at the technical data. There is the "expansion addon" with the VAL3 command "rand()":

    Here the explanation:

    Quote

    num $rand(), num $rand(num seed)

    This instruction returns a pseudorandom number n with 0<=n<1. The seed argument reset the

    pseudorandom sequence. This allows computations to be repeated.

  • Galet
    Reactions Received
    19
    Trophies
    2
    Posts
    141
    • April 21, 2023 at 6:18 PM
    • #3

    +1 for Johnsenfr.

    num $rand() : SRC 7.3.1+

    num $randn() : SRC 7.6+

    in Expansion addon...

  • mil3k
    Reactions Received
    15
    Trophies
    3
    Posts
    71
    • October 31, 2023 at 12:31 PM
    • #4

    Just for future record, quick "How to do":

    1. Open a cell with a controller.

    2. On the Cell Explorer/Data/Geometry tab right click on a controller.

    3. From dropped down menu choose Controller Configuration

    4. In the new window choose Add Ons tab and tick a box expansion.

    From now, a bunch of new commands starting with $ should be available for this controller.

    Originally, I din't have an Add Ons tab in my Controller Configuration at SRS2019.10.1. In that case contact your local Staubli technical support and ask for zip file with extension installer for your emulator. I didn't try yet, if I won't need to repeat the same installation in cells with different emulator version ( in my case different than s8.13.4-Cs9_BS2855)

  • Galet
    Reactions Received
    19
    Trophies
    2
    Posts
    141
    • November 1, 2023 at 10:22 AM
    • #5

    Hello everybody...

    AddOn packages are different for all SRC versions.

    You need to install the package on SRS and on the controller.

    Have a nice day,

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

Similar Threads

  • Subprogram skips out of Main and shows Errors INTP-105 and MCTL-105

    • TP77
    • August 20, 2022 at 3:08 PM
    • Fanuc Robot Forum
  • Should $MOVE_ENABLE be assigned to an input other than $IN[1025]?

    • robotninja
    • February 9, 2023 at 9:57 PM
    • KUKA Robot Forum
  • Verify all code paths

    • Hes
    • September 9, 2022 at 10:11 PM
    • KUKA Robot Forum
  • iRVision

    • VHS
    • June 8, 2021 at 10:03 AM
    • Fanuc Robot Forum
  • Socket messaging between roboguide and PC via c++ code

    • piego
    • June 3, 2021 at 8:29 PM
    • Fanuc Robot Forum
  • KRL code to save robot Positions timestamped in a text file. (KRC4)

    • kiiwa
    • May 11, 2017 at 6:16 PM
    • KUKA Robot Forum
  • Internal I/O signal in AS language - Beginner question

    • Jaksi
    • July 15, 2020 at 3:01 PM
    • Kawasaki Robot Forum

Tags

  • staubli
  • random
  • src
  • function
  • number random
  • staubli src
  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