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
create a random number
-
ycrideas -
April 19, 2023 at 9:36 PM -
Thread is Unresolved
-
-
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:
Quotenum $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.
-
+1 for Johnsenfr.
num $rand() : SRC 7.3.1+
num $randn() : SRC 7.6+
in Expansion addon...
-
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)
-
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,