It was brought up to us a while ago that it might be useful to have a block for Siemens that generates a random number in order to simulate noise or other various random conditions. We searched online to try and find an example but found that most of them were in actuality not very random at all. Other blocks use the system time and a sin/cos or exponential function to generate the random number, but the results end up being sinusoidal.
So we decided to make a quick version of our own. We took the same general idea and premise of the examples we found and made a couple tweaks to make it more random in nature. The block source and a graph of the results are shown below.
When you call the block, you tell it a maximum value and it will spit out a random number between 0 and that value (including 0 but excluding that number).
Siemens Random Number Generator Block
Check out more of our Siemens knowledge base articles here:
As part of our commitment to continually expanding our technical knowledge base, we are pleased to announce our ability to provide simulation services utilizing Siemens Digital Industries Software (formerly Siemens PLM software). Using Siemens [...]