- Posts: 1003
- Thank you received: 0
Manncorp ECM93 Pick and Place
- my1987toyota
- Topic Author
- Offline
- Platinum Member
-
( also spring loaded ) to retract to it's normal position.
However they can just as easily be wired to have a common ground and then they could be actuated when you send a + 20 to 24 volt signal to the individual solenoid.
I may end up building an optoisolater system because I do have concerns about inductive kick back from the solenoid valves
messing with the 7i76 board. I have had this problem before when I was setting up my cnc mill with SmoothStepper and Mach3.
At the very least I will need to use a freewheel diode I am thinking an IN4007 should suffice.
this video should help visualize their operation. all I did was supply power and would ground an individual solenoid to get it to actuate
feeders in operation
Please Log in to join the conversation.
- tommylight
-
- Away
- Administrator
-
- Posts: 22012
- Thank you received: 3
1N4000 up to 1N4007 will do just fine, they can handle 1A.
That is easy to control but not easy to implement the automated logic logic in hal, it should be doable.
Since it will be used with gcode, again should be easy enough.
Still a bit fuzzy inside my brain, so stay tuned, thinking of how that would work automagicaly !
Do we have shift register comp in LinuxCNC ? :whistle:
Please Log in to join the conversation.
- my1987toyota
- Topic Author
- Offline
- Platinum Member
-
- Posts: 1003
- Thank you received: 0
computer programming isn't my strong suite. Thanks to covid-19 that's changing.
I do have a backup plan. it is kind of crude by programing standards but I know I can make it work.
I would need a button on each feeder so that when the nozzle came into position to pick up a part
it would press the button, once the button was released (aka the nozzle was placing the part on the pcb) the feeder
would advance the new part into place . I would only have to use an Arduino Mega and write a simple
IF statement or Case statement program. Linuxcnc would then only have worry about the nozzle vacuum at that point.
that said I would still love to be able to do this exclusively with linuxcnc.
Please Log in to join the conversation.
- my1987toyota
- Topic Author
- Offline
- Platinum Member
-
- Posts: 1003
- Thank you received: 0
I will look into operating opto isolater chips through the 6i25 P2 I/O connector to operate the solenoid valves
for the feeder advancers.
Please Log in to join the conversation.
my1987toyota wrote: As usual my problem is I don't know nearly enough about the system yet. I do have time though.
computer programming isn't my strong suite. Thanks to covid-19 that's changing.
I do have a backup plan. it is kind of crude by programing standards but I know I can make it work.
I would need a button on each feeder so that when the nozzle came into position to pick up a part
it would press the button, once the button was released (aka the nozzle was placing the part on the pcb) the feeder
would advance the new part into place . I would only have to use an Arduino Mega and write a simple
IF statement or Case statement program. Linuxcnc would then only have worry about the nozzle vacuum at that point.
that said I would still love to be able to do this exclusively with linuxcnc.
Instead of using an Arduino you could possibly write a Hal component to do what you want.
linuxcnc.org/docs/2.8/html/hal/comp.html
The following example shows usage of the switch statement.
github.com/LinuxCNC/linuxcnc/blob/master...ponents/plasmac.comp
Please Log in to join the conversation.
- tommylight
-
- Away
- Administrator
-
- Posts: 22012
- Thank you received: 3
The suction only happens when the part is picked,
Combine those two together with a small delay, add the feeder number or position, and voila!
Not that easy, but it is a workable direction to look at.
Phill's advice on writing a component to do everything automatically is much better than my idea of doing it in hal as hal can get very complicated very fast. And it uses to much paper !
Please Log in to join the conversation.
This is Linuxcnc's best kept secret where magic happens!
A component is much like the Arduino loop() procedure except its time critical. Its called once every pass through the servo thread so in that way its more like an Arduino Interrupt service routine.
Generally things like you described is done in a state machine. create an enum for all the states and then a static variable that uses those equates in a big switch statement. each case needs to advance the static variable when that state is complete. The best way to get going is to read some code for the components. github.com/LinuxCNC/linuxcnc/tree/master/src/hal/components
Then when you want to write on, pick a simple one like or2.comp and use that as a base for your new component.
Please Log in to join the conversation.
- tommylight
-
- Away
- Administrator
-
- Posts: 22012
- Thank you received: 3
That has to be the most accurate case for using the word "rabbit hole", once you get down through it and land in one piece, the wonderland presents itself, where everything is possible, and when it is not there will be a work around for it, but beware that there are still some gremlins lurking down there.rodw wrote: This is Linuxcnc's best kept secret where magic happens!
Please Log in to join the conversation.
The hardest thing to so is to debug something. You can add some debug pins for this purpose that are removed later.
More often than not though, you need to trust your own code.
It might help to remember that Hal is made up of a many small discrete components. So keep your development the same way.
This may add some overhead in hal adding additional components but it will make for a more maintainable system.
Plasmac is an example of one massive component that does many unrelated things at once. With the number of issues I am seeing reported recently, perhaps it is now so complex its hard to maintain. There is a lesson in that. But it is a very magical system!
Please Log in to join the conversation.
- tommylight
-
- Away
- Administrator
-
- Posts: 22012
- Thank you received: 3
I agree.rodw wrote: Plasmac is an example of one massive component that does many unrelated things at once. With the number of issues I am seeing reported recently, perhaps it is now so complex its hard to maintain. There is a lesson in that. But it is a very magical system!
Please Log in to join the conversation.
