Generating a random number(variable) in a User Program

I need to be able to add a random number to an Expression (113) in a RMC75E User Program… is there a way to do that?

Thanks much. Regards, Michael

There are several algorithms for generating pseudo-random numbers floating around on the internet that could be implemented in RMCTools.

If you need something “quick and dirty” you could use this which I found in the Numerical Recipes in C book:

NewRandom := (OldRandom *106 + 1283) mod 6075;

This gives you a pseudo random number in the range of 0-6074

You can scale the result as you like to fit the range you need.

See this post: [url]Random Number Generator]