Random part selection

CurlyMcnasty

Guest
C
I need a way to input a days expected production total and then have a plc randomly select a percentage of the product for inspection.

What would I be up against to pull this off.

Thanks
 
More info required, PLC type, Regular shift start stop time-Break times, What type of sampling are you looking for and frequency????

A little more iformation required to give you a proper response.
 
In RSLogix, one way to accomplish this would be to set up a cycling, self-reseting timer with one time base, and another cycling, self-reseting timer with a time base five or seven times the first timer's time base. Move the first timer's .ACC value into a counter's preset when the second timer goes done. Then, using the counters done bit to trigger the reject, divert the desired part from the main line.
 
I have not bought a PLC for this yet, kinda waiting to see how much PLC I will need... I would like it to be a el cheapo from automation direct.

To expound on what I need from it I'll say that the PLC needs to understand that it needs to choose parts at random. Lets say I make 100 parts and my customer says I need to inspect 15% in a random parts. I would need the PLC to kick out 15 parts during the day for inspection. Also I have to be able to prove this is a random sample.

I hope that helps.
 
I will refer you to this thread
Soft PLC thread

I am going to place a random number generator program there in the next day or two. You could probably modify it to suit.
 
Under these conditions, it is impossible to guarantee that the entire complement of any percentage will be sampled.

Here is an extreme example:
If, in a run of 100 parts, the sample requirement is 100%, the test fails if the PLC "randomly" decides to let the first part pass.

If, in a run of 100 parts, the sample requirement is 15%, the test fails if the PLC "randomly" decides not to grab a sample until well after the 85th part. If it grabs the 86th then it will also have to grab all of the remaining parts so as to meet the inspection quota.

15% means 15 per hundred.

15% means 1.5 per ten.

I don't know what your production rate is so I'm gonna assume 100 parts per day... just to give my head a break... it's hot over here today (where's that MGD?).

You would do better by grabbing x-samples-per-10.
You could have an absolute minimum of 1-per-10 and a maximum of 2? or 3?

So, you have a "random-picker" that picks a set of numbers out of the set of 1-to-10. Duplicate numbers are not allowed.

Let's assume that the samples-per-10 value is 2. If the samples-per-10 value is 2 then your "random-picker" will choose two numbers. First it "randomly" chooses one number from the set of 1-to-10. Then it chooses a second number from a set which is 1-10 WITHOUT the previously picked number (no duplicates allowed!).

Since "10" is actually a two-digit number, and since at least one sample must be taken, "0" can represent "10" without harm or confusion. So the actual range of numbers would be 0-to-9.

For any given sample-period, you will need to maintain a list of selected, randomly-chosen, numbers.

For example,
When it is time to select the random numbers, clear your list of selected, randomly-chosen, numbers. Then...

Random-Pick First Number:
"Randomly" choose one a number from the following: 0-1-2-3-4-5-6-7-8-9.
Let's say that the first pick was "8".
Add "8" to the list of randomly-chosen numbers.

Random-Pick Second Number:
"Randomly" choose a number from the following: 0-1-2-3-4-5-6-7-X-9.
Let's say that the second pick was "3".
Check to see if "3" is in the list of randomly-chosen numbers.
If it is, then do another "pick".
If it is not, then add "3" to the list.
If the number of items in the randomly-chosen list is equal to the required sample number then the picking routine is done. Otherwise, continue picking, checking and adding.

If your sample number was 3-of-10 then you would "randomly" choose a number from the following: 0-1-2-X-4-5-6-7-X-9.

Once the list of randomly-chosen numbers is completed it is time to do the samples. Every time a part is produced and a part-counter increments, check the list to see if that count is to be inspected. If so, then do so. Otherwise, wait for the next part.

Note: You could sort your list so that your process is waiting for the first part-count in the list to show up. When it shows up, the process would grab for inspection and then watch for the next part-count in the list to show up.

There could be a problem if the inspection process is at least somewhat automated. That is, if a part is occupying a controlled space while under inspection then the next part can not be inspected while the first inspection is occurring.

In that case, you lose the second random inspection or you stop the line.

Now... here comes the booger...
How does one generate a random number between 0 and 9?

Uuurrppp...! Damn it Casey... where the hell did you put the rest of my MGD! I can't think under these conditions...

(88)
 
Terry Woods said:
Now... here comes the booger...
How does one generate a random number between 0 and 9?

Simple... You'll need a hat, and 10 slips of paper with the numbers 0 thru 9 written on them.

Oh wait, you'll also need:

A SCARA robot (or equivalent) with an end-of-arm gripper capable of retrieving a SINGLE slip of paper (might be difficult)

A vibrator (industrial-type, not the 'other' kind) to shake the hat between readings

A vision system with OCR to read the number

A PLC. Nevermind... Seems we already have one of those... :cool:

I've probably forgotten a few items... :confused:

beerchug

-Eric
 

Similar Topics

Looking for some advice for backing up the programs on a bunch of old random PLCs. All I'm really concerned about is getting the program out of...
Replies
43
Views
4,665
We have several Powerflex 4M (22F-D013N114) VFD’s controlled by compactlogix PLC’s. Control is simple, a run and direction signal with the speed...
Replies
6
Views
1,505
Hi all, I know this is a PLC forum, but I know there is a gread deal of knowlege on drives as well. This drive has been running on stone...
Replies
2
Views
876
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,499
Hello Friends I need to activate random outputs (0-9) and ask for random inputs (0-9). I have created in s71200 a program to generate a random...
Replies
13
Views
4,656
Back
Top Bottom