Skip to Content
Former Member
May 21, 2009 at 11:59 PM

Global random integer generation in a range



I need a way to achieve a global random integer generation in a range.

I tried FMs QF05_RANDOM_INTEGER and RANDOM_I4 without success because every time I call them from an object, always get the same number

For example, FM RANDOM_I4 with RND_MIN = 1 and RND_MAX = 5 gets RND_VALUE = 1 and FM QF05_RANDOM_INTEGER with RAN_INT_MAX = 5 and AN_INT_MIN = 1 gets RAN_INT = 3.

How can I get a global (with memory) random number generator?

Regards and thanks in advance.