Siemens Random Number Generator

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

Part 1

Click to expand

Part 2

Click to expand

Looking for more detail and information?

CONTACT US
CONTACT US

Brave Controls Solutions is a Certified Siemens Solution Partner specializing in Automation Drives.

Contact our team today and check out some of our past  Siemens solutions for a better idea of how we can help.

2019-01-24T09:08:19-05:00