PLC Ladder Programming

chadjikkou

Member
Join Date
Nov 2017
Location
Larnaca
Posts
3
Hello,

I am trying to make a PLC Ladder Program to active an output randomly at 10 % of the input (i.e if you get 10 inputs you will get one output active within these 10 inputs) .

Do you have any suggestions ?

Thanks in Advance
 
You will need to re-phrase your question as it doesn't make much sense.


What if you only get 5 inputs? You need 0.5 of an output?
 
Hello,

I want to scan with photoeye boxes as an plc input.

from the 100 boxes i scan i want the 10 % to be check randomly.

if this make more sense
 
Hello,

I am trying to make a PLC Ladder Program to active an output randomly at 10 % of the input (i.e if you get 10 inputs you will get one output active within these 10 inputs) .

Do you have any suggestions ?

Thanks in Advance

What PLC are you using ??
 
Use a timer, Time base 0.01, Preset .60
allow the output to be true if the timer Accum is between 0.1 and 0.16 and the push button is pressed
 
have 2 counters.
#1 is where you start at the beginning of the shift.
set it from 1 to x boxes.
when counter 1 is done, then counter 2 can be set to every 10 boxes.

counter 1 you have someone set to a different number every day or shift.

james
 
Check out Linear Feedback Shift Registers for the generation of a pseudo random number. Each time ten products have passed shift the LFSR. Use a modulo 10 function on the value of the LFSR to determine which one of the next ten to choose for sampling.

The random sampling is used to catch a problem which just happens to be messing up every x products. In this case choosing exactly every tenth product would miss a fault which is also producing defective product every tenth one but you are sampling in between the defective ones.
 
Last edited:
counter 1 you have someone set to a different number every day or shift.

Or take the modulo of ten of the current day to avoid operators leaving that at the same number continuously.

Is randomly an actual requirement, or something that someone said without considering the consequences?

If it is truly random, it may check 10 boxes in a row and not see any for 90 more.

Checking the 10th box sounds like a good idea to me... if you want to "beat" that pattern, use two counters.

One counter counts up to ten boxes, when it is done, you increment the second counter.
You then use whatever number is on the second counter to tell you which box to look.

So you would check box 0, 11, 22, 33, 44, 55, 66...

The overflow is a bit of an issue though, so perhaps you can start decrementing instead of rolling back to 0.
 
If the PLC has a fairly fast free-running timer then every tenth one use the modulo 10 of that timer value to decide which product out of the next 10 to sample.
 

Similar Topics

Hi all, I currently learning to write ladder programming, I had some programming knowledge but I found that ladder programming was a different...
Replies
4
Views
2,453
Hi, I have no idea of programming PLCs, what is the best way to start, first design the program using a flow chart ?? then break down the flow...
Replies
3
Views
2,725
What does the ladder programming in PLC convert to? Does the graphic command (e.g. open contact, instruction etc.) a BASIC or C instruction, or...
Replies
1
Views
2,995
hi,kindly send a good material to me on how to program a PLC using ladder logic as a beginner.thanks
Replies
11
Views
4,268
I'm looking for a board with 1-2 analogue inputs, 10 inputs, 6 relay outputs, power supply 6-12V, no enclosure, so I can mount it inside my own...
Replies
6
Views
7,057
Back
Top Bottom