conveyor belt help

Discussion in 'Homework Help' started by Liliana93, May 11, 2015.

  1. Liliana93

    Thread Starter New Member

    May 11, 2015
    2
    0
    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 :) )
     
  2. panic mode

    Senior Member

    Oct 10, 2011
    1,321
    304
    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.
     
  3. Liliana93

    Thread Starter New Member

    May 11, 2015
    2
    0
    Sorry didn't know, it's ladder :)
    upload_2015-5-12_2-45-10.png
     
  4. panic mode

    Senior Member

    Oct 10, 2011
    1,321
    304
    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: May 12, 2015
  5. Kermit2

    AAC Fanatic!

    Feb 5, 2010
    3,792
    948
    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.
     
Loading...