[Topic] A little help in programing or same ideas whould be useful
[Topic] A little help in programing or same ideas whould be useful
(OP)
Hy , so here is my problem.
I what to make a program for a S5 100U PLC, the application consist in rejecting, lets say a blue cube, from a conveyor belt.
I was thinking as follow : the sensor sees the blue cube, a input is made in PLC, which activate a timer (i use a timer because the speed of the conveyor belt is constant and the distance between the conveyor belt and the sensor is 'x' (dose not mater)), and after same time which is equal to the distance travel the blue cube is rejected.
My problem is: if more blue cubes passes the sensor before the firs one is rejected, i think the program will not keep count of first ones, except the last one.
Has anyone any idea to how i should solve this problem.
My experience whit Step 5 is a entry-level .
Thanks in advance for any idea u give me.
I what to make a program for a S5 100U PLC, the application consist in rejecting, lets say a blue cube, from a conveyor belt.
I was thinking as follow : the sensor sees the blue cube, a input is made in PLC, which activate a timer (i use a timer because the speed of the conveyor belt is constant and the distance between the conveyor belt and the sensor is 'x' (dose not mater)), and after same time which is equal to the distance travel the blue cube is rejected.
My problem is: if more blue cubes passes the sensor before the firs one is rejected, i think the program will not keep count of first ones, except the last one.
Has anyone any idea to how i should solve this problem.
My experience whit Step 5 is a entry-level .
Thanks in advance for any idea u give me.





RE: [Topic] A little help in programing or same ideas whould be useful
Pick an area of registers that are available to you, for our example we'll pick ten of them. And for our example we'll say that they are registers 1 - 10.
This arbitrary limit of ten registers assumes that you would never be able to stuff ten cubes (of any color) between the photoeye and the kicker. If that isn't the case, you would have to increase this number from ten to something bigger.
'Assuming that you use ten registers:
If cube = blue, Reg10 = 1 'That loads the blue cube into the bottom of the array. Any non-zero number will do.
If cube <> blue, Reg10 = 2 'That loads the non-blue cube into the bottom of the array. You can't use a "0" or a "1", so we will use a "2".
'BTW,("<>" is shorthand for saying "not equal". But you probably knew that. :) )
'This next bit of code will have to be done for each register from Reg10 to Reg 1.
If Reg10 <> 0 and Reg9 = 0, then copy Reg10 into Reg9, and 0 out Reg10
If Reg9 <> 0 and Reg8 = 0 then copy Reg9 into Reg8, and zero out Reg9
If Reg8 <> 0 and Reg7 = 0 .... And so on until you get to Reg1.
'Notice that by doing your "bubble up" from the highest register to the lowest, your program will move your newest entry up the stack in one scan.
'Now add some code to have your kicker look at the value in Reg1, if it is a "1" then kick the blue one out of there, if it is a "2", then let it pass.
'Once you decide to kick or not to kick, zero out Reg1 to make room in your stack (array) to bubble up for the next cube.
RE: [Topic] A little help in programing or same ideas whould be useful
I would luck into it, maybe i cant find something similar in S5.
Thanks one again
RE: [Topic] A little help in programing or same ideas whould be useful
Has anyone same suggestion, where i could find documentation to working whit FIFO. I tried looking but whit no luck :( .
RE: [Topic] A little help in programing or same ideas whould be useful
But not one in Step 5...
Try www.plcs.net, there might be someone there who could help out.
RE: [Topic] A little help in programing or same ideas whould be useful
Use a data block for your 'registers' and you can do almost anything using Statement List in Function blocks, including indexed addressing so you can point to a element (register) in the data block.
But as JohnWaa says www.plcs.net is probably where you will get a more complete answer.
Francis
www.controldraw.co.uk
www.s88control.blogspot.com
RE: [Topic] A little help in programing or same ideas whould be useful
So what you want to do is set the flapper in one direction and hold it there until you need to set it the other way.
No need for all the FIFO jargon.
RE: [Topic] A little help in programing or same ideas whould be useful
Hi
So i have partially solve my problem, the solution i have cam up whit are :
1. The first one was to move the pusher beside the sensor, so i had to use only a timer ( a easy solution :D )
2. For the next one, i kept the distance 'x' between the sensor and the pusher, and the speed of the conveyor line constant ( v = ct ), I use counter's, comparators, and timer's, below is an example of the program, i use step 7 because it's easy to use especially the simulator.
3. The 3 one is the hardest for me, because i want to kept count of the line speed, so i have anther input that keep count of the conveyor. After hours of thinking, i come up whit a solution, see attachment line speed, (as previous i use step7 ,after i check if everything is OK ,i will rewrite it for step5).
P.S. and " darai " i will look into your idea
RE: [Topic] A little help in programing or same ideas whould be useful
and here is the attachment for the 3 solution