Manncorp ECM93 Pick and Place

More
24 Jul 2020 20:53 #175673 by my1987toyota
The solenoid valves have a common 20 to 24 volt + power. When a specific solenoid is grounded air is allowed to flow to their specific air actuators. The valves have a spring return so when it isn't grounded the valve closes again thus allowing the air cylinder
( 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 or Create an account to join the conversation.

More
24 Jul 2020 21:42 #175680 by tommylight
Already watched that, but i thought there is more to it, seems i was wrong.
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 or Create an account to join the conversation.

More
24 Jul 2020 22:46 - 24 Jul 2020 23:17 #175689 by my1987toyota
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.
Last edit: 24 Jul 2020 23:17 by my1987toyota.

Please Log in or Create an account to join the conversation.

More
25 Jul 2020 03:24 #175708 by my1987toyota
first off I will say I don't know enough about the ladder function to say if this will work yet or not .
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 or Create an account to join the conversation.

More
25 Jul 2020 10:53 - 25 Jul 2020 10:55 #175726 by phillc54

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
Last edit: 25 Jul 2020 10:55 by phillc54.
The following user(s) said Thank You: my1987toyota

Please Log in or Create an account to join the conversation.

More
25 Jul 2020 18:49 #175774 by tommylight
The feeders are static, so their coordinates/position/number are also static,
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 ! :)
The following user(s) said Thank You: my1987toyota

Please Log in or Create an account to join the conversation.

More
25 Jul 2020 21:19 #175788 by rodw
Replied by rodw on topic Manncorp ECM93 Pick and Place
If you are running Linuxcnc, there is nothing you can do on an Arduino that can't be done in a component. If you can program an Arduino, you know enough about C to write a component!

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.
The following user(s) said Thank You: thefabricator03, my1987toyota

Please Log in or Create an account to join the conversation.

More
25 Jul 2020 21:44 #175795 by tommylight

This is Linuxcnc's best kept secret where magic happens!

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. :)
The following user(s) said Thank You: my1987toyota

Please Log in or Create an account to join the conversation.

More
25 Jul 2020 21:58 - 25 Jul 2020 21:58 #175798 by rodw
Replied by rodw on topic Manncorp ECM93 Pick and Place
Any gremlins you encounter are ones you created! So just write them out of the script!
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!
Last edit: 25 Jul 2020 21:58 by rodw.
The following user(s) said Thank You: tommylight, thefabricator03, my1987toyota

Please Log in or Create an account to join the conversation.

More
25 Jul 2020 22:38 #175801 by tommylight

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!

I agree.
The following user(s) said Thank You: rodw

Please Log in or Create an account to join the conversation.

Time to create page: 0.122 seconds
Powered by Kunena Forum