General Discussion > Tips & tricks

How to generate a random number in GUIDE

(1/1)

Nilla:
Hi all!

Thought I'd share this Random_Num_gen function block takes an input and creates a number based on the seed. It's an example on how to generate random numbers in GUIDE. See the block for more details!

Best regards
Nilla
PLUS+1 Helpdesk team

anjaahir:
Hello Nilla

Can you please elaborate what exactly this block is? and how it actually works?
I am working for Vehicles programming and how this block will help me


Anjali

Nilla:
Hi Anjaahir!

The Random_Num_Gen function block takes an input and creates a number based on the seed. This block will create a unique seed on startup if an initial seed is not set. The unique number is based upon the µSecond Timer in the block. This block will help you if you for your functionality need to create random numbers e.g. a temporary password. For more details please open the block itself. In the .ZIP-file there is a .SCS that you can double click on and it will open in the Module viewer and from there copy the block into your application if you want to use it.

I hope this helps!

Best regards
Nilla
PLUS+1 Helpdesk team

Navigation

[0] Message Index

Go to full version