create a random number


  • 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

  • Place your Ad here!
  • 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.

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

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account
Sign up for a new account in our community. It's easy!
Register a new account
Sign in
Already have an account? Sign in here.
Sign in Now

Advertising from our partners