
adccommunitymod (AutomationDirect) asked a question.
Generate Random Integers?
Created Date: February 06,2002
Created By: sjstein
**** This post has been imported from our legacy forum. Information in this post may be outdated and links contained in the post may no longer work.****
Does anyone have an elegant method to generate a random number on a DL250? I suppose I could do something with the scan number and/or the RTC, but I was hoping for something a little better...
Created Date: May 12,2011
Created by: DamnDogDesigns
Random Numbers
The link listed for Quantum Automation is not good anymore, and I couldn't find it on their site. Does anyone have this or know of a simple way to generate random numbers in a DL06 or similar?
Created Date: May 12,2011
Created by: franji1
I know that generating random numbers is good for testing, but are there PLC applications that need random number generation?
Created Date: May 12,2011
Created by: bcarlton
What type numbers? BCD or binary, single or double word, real? What range?
Created Date: May 12,2011
Created by: Do-more PE
I know that generating random numbers is good for testing, but are there PLC applications that need random number generation?
A lot of folks want random numbers to switch between pumps or other devices to even out wear. There are actually quite a few applications for randomness in PLC's.
Created Date: May 12,2011
Created by: bcarlton
Atatched is a DL05 program for 16 bit random in V2000. (You may have to modify the First Scan code to place a non-zero number into V2000).
Created Date: April 24,2012
Created by: rvaughn
Random Numbers
bcarlton, thanks for taking the time to post your random number code. It was very helpful for my application. I am using a DL05 to run simulations that require random timing between events (and this is very difficult without something to generate random numbers!)
Created Date: February 06,2002
Created by: sjstein
Does anyone have an elegant method to generate a random number on a DL250? I suppose I could do something with the scan number and/or the RTC, but I was hoping for something a little better...
Created Date: February 06,2002
Created by: timyoung
I'm not sure about elegance but here's an example.
http://www.quantumautomation.com/appfiles/random.zip
Quantum Automation has posted other example programs in their Application section.