Arturas Posted May 13, 2019 Report Share Posted May 13, 2019 Hi, I need to generate a random number (integer) values between 1 and 10 (or 100) in UniLogic. Is there a special FB? If not, could you pls. share UDFB? Link to comment Share on other sites More sharing options...
Saragani Posted May 13, 2019 Report Share Posted May 13, 2019 There isn't one, but when I had to randomize a number, I used the Milliseconds Counter combined with other system tags that change (like scan time, Tick High / Low. etc), and them modulo 100 and add one (in order to get a number between 1 and 100). Link to comment Share on other sites More sharing options...
MVP 2023 Flex727 Posted May 13, 2019 MVP 2023 Report Share Posted May 13, 2019 This simple program was posted on this forum some time ago. It's for VisiLogic, but you may be able to adapt it. Here is a screenshot of the relevant logic in case you don't have VisiLogic installed: V570_Random_number_generator.vlp 1 Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now