conveyor belt help

Thread Starter

Liliana93

Joined May 11, 2015
2
hey, I'm stuck with a problem in multi selection, I already have the program made to select one piece at time by length and height which is depending on 4 timers. Now I have to try to allow my program to select multiple pieces but I have no idea how to do it because I have to use 4 timers for piece for it to be rightly selected, so if i put one more piece without the first one being expelled my timers will be at use for the first piece and the second one won't be selected :/ The only way I know to solve this would be use a shift register but my professor doens't want shift registers. Any ideas on more solutions ?

(Sorry for the confusion on the explanation but english is not my first language, any doubts just ask :) )
 

panic mode

Joined Oct 10, 2011
1,891
and you did that in VHDL or C or Java or ....?
the rules are that you must post sample of your work when asking for help in homework section.
 

panic mode

Joined Oct 10, 2011
1,891
hmmmm...
writing code like that is possible but not robust, if someone makes mistake and toggles one of bits by accident you can have two (or more) transitions taking place and rippling through sequence.
also this is harder to read (two output instructions per rung take more screen real estate than necessary). if you need to make specific sequence there are many ways to accomplish that (counter based or whatever), specially if using more complex sequence.

but your initial concern seem to be recognizing some part using sensors and logic that involves four timers. I don't see any of that...

now when working with timers, you don't have to evaluate only timer done bit (this would require different timer for each interval). you can also evaluate currently accumulated timer value and compare it with one or more limits.
 
Last edited:

Kermit2

Joined Feb 5, 2010
4,162
depending on the programming lang.
you could nest timing interval checks
longest interval checked first and succeddingly shorter intervals checked as you nest them with exit/return at end of shortest interval checked for. each interval checked branches to routine to handle 'that' object.
 
Top