hi random number generation

hopper

Member
Join Date
Jun 2009
Location
glos
Posts
9
i need to set a unit up with random number generation to enable the timing on a switch to be 'erratic', does anybody know if its possible? i need 8 or 10 inputs but only 4 outputs.
many thanks
 
Use the search button on top of this page to search the forum for random. This issue has been brought up several times and generic solution have been presented a number of times.

Kind regards,
 
at present i have no particular plc in mind, the app is very simple i need 7 inputs for a bcd input 1 on/off 1 reset/bypass and 3 relay outputs. the app is to randomally switch 2 relays. the logic is something like:

on-delay time = time (min from bcd input) - random number (minutes) - constant
on-time = constant
reset cycle @ time from bcd input and check for new bcd input for next cycle

its to feed chickens!!
 
if you feed chickens at irregular time intervals they convert food better, put more weight on quicker and therefore have a shorter life - well their at supermarket wts a few days earlier - sad i know
 
Why not set up a table of random time intervals and step through the table? The table could repeat every few days, that would probably be random enough.
 
the chickens are fed at the start (1 day old)at about 30 hour interval and by day 40 its down to 3 hour intervals. i'm now trying to use an analogue input to change the main base time interval so that the operator on site (chicken shed) can increase the nmber of feeds per day and using the random bit to randomise the feed times
 
Going on from Alarics post...

Why not set up a table of the 40 days and set the random (to the chicken) pattern/feed intervals yourself if you see what i mean !

ie
day 1 3 x 10 sec feeds at xx times
day 2 3 x 12 sec feeds at different xx times
....
....
....
day 39 5 x 30 min feeds at so and so times
day 40 6 x 29 min feeds at different times to above

after this you have new chickens so they wont know the 40 day schedule !

I say 40 as i dont know when the chicken departs :rolleyes:
 

Similar Topics

My father found a old traffic light that he wants to have in the basement. (We're car people... don't ask) What I want to do is write a program...
Replies
9
Views
5,548
Hey folks, I was just wondering what thoughts were about a completely 100% random number generator. I looked on The Google but didn't really open...
Replies
54
Views
16,537
Hello, Could somebody please help me out with coding a 'Random number generator' in vijeo citect. For example if i create an analog Local...
Replies
3
Views
3,763
http://www.codeproject.com/KB/recipes/SimpleRNG.aspx I came across this simple version a couple of years ago. It is simple enough to implement...
Replies
5
Views
3,564
Hi,Does anybody know if there are any routines in unity pro that produce random numbers like the routine rand() in C ?
Replies
1
Views
4,033
Back
Top Bottom