need help so that i can place more than one part on conveyor to sort. there are 6 part small tall, small short,medium tall.,medium short , large tall and large short. there are three sorter i am doing small , large ,and middle need help with shift data to run more than one part
need to no how to program a loop in so that i can place more than one item on conveyor. once the sensor read one part and starts reading another the first part does not work. does one part at a time i have six different parts to sort. would like then to to be able to put part on on behind the other. cannot use shift register. the parts are sorted in to 3 different containers small, medium large
You aren't giving us much to go on here, but I guess you have some code that moves one part past three sensors and decides what to do with it at the end based on all the sensor readings. If you want to be able to pass different parts simultaneously past each sensor then you need to design your sketch to keep track of which part is at which sensor and accumulate all the sensor readings associated with each part. For example you could define a struct holding all the sensor readings for a given part, and then create a circular buffer of those structs which advances as the physical parts are moved through the sensors. It's far from a trivial design problem, and if you're being set problems this difficult I'd expect you to know how to go about designing algorithms and writing software.
here is a video of what i want the conveyor to do. i am using one sensor to sort. each container will sort to part in each. their are two part that have the same diameter in each container.one part is taller the the other. total of six parts. my program i can do one part at a time. once the sensor reads another part in will not sort the first part just the second. need help to hold data to keep it sorting all part .
Again, you have given us only a few words of description. The video is interesting and helpful. I now know how I would plan your project. The problem is that I have no idea how you are planning to do it.
You need to write a script (like for a play or a movie - not a computer) describing every single thing that happens as one piece moves along the conveyor. Once you have done that it should be reasonably simple to write code that does the same thing.
Robin2:
Again, you have given us only a few words of description. The video is interesting and helpful. I now know how I would plan your project. The problem is that I have no idea how you are planning to do it.
You need to write a script (like for a play or a movie - not a computer) describing every single thing that happens as one piece moves along the conveyor. Once you have done that it should be reasonably simple to write code that does the same thing.
…R
Agreed. 10 minutes spent with a pen and paper, accurately defining what is needed, can save hours of programming time. If it’s an accurate and complete, stepwise definition, the program will be almost written.
i have 6 part. place part a on belt si reads width and sort in to desire spot . if part b is placed on belt and si reads before part a is sort. part a will not sort just ride the belt to the end. i need to no have to declare value to hold the part as si reads the . so if "i’ is >what read data how can i get it to other value. i have tried using if i is greater than my value it a the same for b and c still will not work . can some please help thanks