Switching 4 Tools Along a Conveyor Belt
finewood
Posts: 4
I am a cabinet shop owner. I am modifying an edgebander, adding tool stations. Normally I would use timer-relays (a total of 9) to actuate the tools. Recently I discovered the BS2 and believe it will provide a more elegant solution. I believe I need a BS2 and 2 each RC-4s. I am a novice on microcontrollers and cannot figure out the program. Can any of you guys help me?
Description of the Cycle
A conveyor belt grips one side of a cabinet panel and carries it down a track at a fixed speed; the minimum interval between the end of one panel and the front of the panel following is 3 seconds. Four individual power tools are located at different stations along the track; they perform machining operations on the panel as it passes their locations. I want to use the Basic Stamp to individually actuate 110 volt electro-pneumatic solenoids which will extend each of these tools against the panel as the front edge passes their station, then individually retract them as the rear edge of the panel passes their station.
Ahead of these four tool stations, there is a NO limit switch which closes when the front edge of the panel trips it down, then opens when the rear edge passes.
If I was using hardware, rather than a microcontroller, I would use 4 “on-delay” timer-relays, one for each of the tool stations, each started by the limit switch closing and individually adjusted. Then there need to be 4 “off-delay” timer-relays, started by the limit switch returning to its open position. Finally, there is another relay which actuates a pneumatic valve whenever tool #1 and/or tool #2 are actuated.
Definitions
SW1 is NO switch; it closes when a panel passes by it.
R1 is relay 1 which powers electrical coil of a pneumatic solenoid
R2 is relay 2 “ “ “ “ “ “
R3 is relay 3 “ “ “ “ “ “
R4 is relay 4 “ “ “ “ “ “
R5 is relay 5 “ “ “ “ “ “
Variables
TC1, TC2, TC3, TC4 is time delay after SW1 closes until R1,2,3,4 is closed
TO1, TO2, TO3, TO4 is time delay after SW1 opens until R1,2,3,4 is opened
Description of a complete cycle
SW1 closes, then
R1 closes TC1 msec later; R2 closes TC2 msec later; etc, etc
SW1 opens, then
R1 opens TO1 msec later, R2 opens TO2 msec later; etc, etc
Any time that R1 and/or R2 is closed, R5 is also closed; otherwise R5 is open
SW1 may close again before TO3 and/or TO4 have elapsed
Thanks, Chuck
Description of the Cycle
A conveyor belt grips one side of a cabinet panel and carries it down a track at a fixed speed; the minimum interval between the end of one panel and the front of the panel following is 3 seconds. Four individual power tools are located at different stations along the track; they perform machining operations on the panel as it passes their locations. I want to use the Basic Stamp to individually actuate 110 volt electro-pneumatic solenoids which will extend each of these tools against the panel as the front edge passes their station, then individually retract them as the rear edge of the panel passes their station.
Ahead of these four tool stations, there is a NO limit switch which closes when the front edge of the panel trips it down, then opens when the rear edge passes.
If I was using hardware, rather than a microcontroller, I would use 4 “on-delay” timer-relays, one for each of the tool stations, each started by the limit switch closing and individually adjusted. Then there need to be 4 “off-delay” timer-relays, started by the limit switch returning to its open position. Finally, there is another relay which actuates a pneumatic valve whenever tool #1 and/or tool #2 are actuated.
Definitions
SW1 is NO switch; it closes when a panel passes by it.
R1 is relay 1 which powers electrical coil of a pneumatic solenoid
R2 is relay 2 “ “ “ “ “ “
R3 is relay 3 “ “ “ “ “ “
R4 is relay 4 “ “ “ “ “ “
R5 is relay 5 “ “ “ “ “ “
Variables
TC1, TC2, TC3, TC4 is time delay after SW1 closes until R1,2,3,4 is closed
TO1, TO2, TO3, TO4 is time delay after SW1 opens until R1,2,3,4 is opened
Description of a complete cycle
SW1 closes, then
R1 closes TC1 msec later; R2 closes TC2 msec later; etc, etc
SW1 opens, then
R1 opens TO1 msec later, R2 opens TO2 msec later; etc, etc
Any time that R1 and/or R2 is closed, R5 is also closed; otherwise R5 is open
SW1 may close again before TO3 and/or TO4 have elapsed
Thanks, Chuck
Comments
I have one limit switch to control four stations positioned down the conveyor belt. I need the time delays in msec which BS2 offers. I want to precisely control the time delays rather than precisely locate limit switches. Chuck
You have a mighty big project there..and certainly sounds fun.
I'd suggest you download the "What's A Microcontroller" text (free to download from Parallax site) and start going through some of the exercises. This is a great INTRO to using the stamp.
Then, build your project in baby steps. Start with the conveyor and the "IN POSITION" sensor (optical or mechanical sensor) and have the stamp stop the conveyor when your piece is in place.
Then work on turning your tools on/off when you want and then positioning them.
If you look at the project as a whole...it is overwhelming...but approach it in babysteps and it's one success after another.
The folks here are great for support...so you won't have a problem looking for advice/options/help.
Just be sure you provide enough information and do share some video when you can! (Its nice to see things in action)
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
·
Steve
"Inside each and every one of us is our one, true authentic swing. Something we was born with. Something that's ours and ours alone. Something that can't be learned... something that's got to be remembered."
When I said I was a novice, I meant it! I do have the "What's a Microcontroller" course and have gone partway thru it; I also have the "StampWorks" course. But I have not yet found info that helps me solve this problem.
Just to clarify, the conveyor belt never stops.
Chuck
Stephen
you may not find your exact solution in the text....but you certainly can transfer one sensor setup to another.
A switch is a switch...whether it be a microswitch, a reed switch or an opto-switch....although, physically, you connect them up differently, you still program them the same.
So what you learn in those manuals is how to program. Then you can go and set up for some of the items you're wishing to use.
I believe Parallax also has an industrial text somewhere on their site. I haven't gone through that, but that might add some more info to your "to-read" pile!
You probably won't find someone that will do the work for you....but there's enough of us to hold your hand a bit when you're ready!
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
·
Steve
"Inside each and every one of us is our one, true authentic swing. Something we was born with. Something that's ours and ours alone. Something that can't be learned... something that's got to be remembered."
From your post that SW1 may be tripped before TO3 and TO4 have elapsed that would mean that you would need to be able to track 2 complete sequences at a time, basicaly 2 timer threads. You could probably do this by doubling the number of timer variables and running 2 seperate threads. Testing the for an active thread to determine which one would run next. Assuming that you could never have more than 2 panels in sequence at the same time.
I would also probably add some type of indicator that the conveyor is turning, that way you could safety the whole setup out that if it stops for some reason the timing sequence aborts and retracts all your tooling.
More detail on what the sequence is, how many can be in process at the same time etc would be very helpful.
·
A bit of background: This is a type of machine which is common to cabinet shops. Mine is 20 years old, with all sequencing of existing tools stations done by timer-relays (newer machines use microprocessors and more).·
You cite the fact that "SW1 may be tripped again before TO3 and TO4 have elapsed" as requiring "2 timer threads".··I can/will eliminate this requirement by·relocating the position of SW1 closer to the 4 tool stations, so that the·trailing end of any panel will clear the 4th station in less than 3 seconds (the minimum interval between panels), thus the first cycle will always be completed before the next cycle begins.
Finally this clarification to your suggestions of·safety concerns.· If the tooling which I am adding does not actuate, the panel(s) will safely travel thru the machine with the only defect being that the panel(s)·will not have·these machining steps·performed on it/them.· Secondly, I will power these tools·off the main buss, so that if the machine stops due to either the overload breaker tripping or the operator·actuating a safety "kill switch", these tools will also stop.
Chuck
kelvin
Ok, here goes. I havent coded this, but I quickly drew a flow chart. I think your program is going to go something like this:
1. Initialize (set your output, input pins, name variables,ect)
2.start(serout to rc-4 to turn off all outputs)
3. check for your switch being pressed yes -··goto 4········ no -goto 2
4.start timers1,2,3,4 (if you use a BS2 you could have 4 seperate pots control this time)
5. check for switch being pressed yes- goto 6 no - goto 8
6. advance your timers
7. any timers done? Yes - goto·12·· no - goto 5
8 goto 5
9. start timers 5,6,7,8 (same as 4, I think. These are your shut off timers)
10·advance timers 5,6,7,8
11. any timers done yes goto 15·· no - goto 9 (reset all timers goto start when last timer is done)
12. Active_outputs
13. serout to rc 4 which output (timer) to active
14. return to 8
15. Deactivate ouputs
16. serout to rc 4 which output (timer) to deactivate
17 return
I know this is very rough and Im sure I haven't covered everything, but I *think* your program will go something like this.
The Prop-1 will handle this application, minus the settable timers with pots. Also, check out the state machine thread in the prop-1 forum. I am sure anything I missed will be discussed there.
Hope this helps-
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Shawn Lowe
Remember - No matter where you go
There you are.
·and be the most flexible if changes are needed.
·
http://search.parallax.com/search?client=parallax&site=parallax&output=xml_no_dtd&proxystylesheet=parallax&ie=&oe=&as_q=state+machine&num=10&btnG=Google+Search&as_epq=&as_oq=&as_eq=&lr=&as_occt=any&as_dt=i&as_sitesearch=forums.parallax.com&sort=&as_lq=
Orion is right. Here are a couple links:
http://forums.parallax.com/showthread.php?p=539348
http://forums.parallax.com/showthread.php?p=538395
I think you're going to find this extremely powerful, and possible addicting as it pertains to you in a non hobby way!
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Shawn Lowe
Remember - No matter where you go
There you are.