2 Axis machine - Controlling 2 solenoid valves seperatly at specific locations

  • rodw
  • rodw's Avatar
  • Away
  • Platinum Member
  • Platinum Member
More
06 Sep 2022 10:25 #251276 by rodw
Actually, another idea might be to use the  multi spindle features so the  nozzles are controlled by the spindle.N.on signal. You'd just have to readup on what can be done. 
The following user(s) said Thank You: denhen89

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

  • tommylight
  • tommylight's Avatar
  • Away
  • Moderator
  • Moderator
More
06 Sep 2022 11:04 #251283 by tommylight
Spindle will stop motion leaving a clump of paint.
The following user(s) said Thank You: denhen89

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

  • denhen89
  • denhen89's Avatar Topic Author
  • Offline
  • Elite Member
  • Elite Member
More
06 Sep 2022 11:43 #251286 by denhen89
Thanks guys.
I decided to do it all through linuxcnc.
I want to order on today everything i need to do some tests here next to my work pc, like Steppers & drivers, 12v & 24v dc power supply, Two 12v solenoids and i hope to find a used PC set with monitor etc.
Then i will try to get those commands to work.
Atm i am completly clueless when it comes to the M62-65 or M67 commands, so i hope you will help me out with that as soon as it setup everything.
Of course i will first try to get it done by my self.
In meantime i will think how to build the construction and what parts/material i need.

I will let you know how it goes in 2-3 days i think :)
The following user(s) said Thank You: tommylight

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

  • denhen89
  • denhen89's Avatar Topic Author
  • Offline
  • Elite Member
  • Elite Member
More
09 Sep 2022 19:00 - 09 Sep 2022 19:01 #251562 by denhen89
Hello Guys,

i got everything i need to do the Linuxcnc settings, but i am not able to get the nema 23 motor (Minebea Mitsumi) to turn. Its powered and difficult to turn by hand, but its not moving when jogging in stepconf. I have tried everything what came to my mind.

Here a short description of what i did since yesterday. 
Yesterday i picked up a PC with Monitor, etc.. (Fujitsu mainboard, Quad Core Q8300 cpu,...), but it had crazy latency spike, so on today i picked up a Gigabyte board with a Phenom X4 850 (all Phenoms CPUs i had worked well with low latency) and installed it to the case from the previous PC case.
I was also facing latency spikes as soon as i started GLXGEARS (from 5000 to 180000), so i installed a GPU, changed bios settings and now after running for 2h with 3 x GLXGEARS, the latency were at 16000. It was at 6000 for a long time, but the screensaver was on when i came back and then it was at 16000. Not sure if screensaver could create that spike from 5000 to 16000, but its still good.
I have tried a lot of different wiring setups, but the current setup (which can be seen on the pictures), powers the motor when testing the axis in STEPCONF. Its difficult to move, but the motor just wont turn.
It seems that i am not getting it done by my self. This is my 4. machine i build, but its the first time i am not getting the stepper to turn..)

Hardware:
BOB: SSK-MB2 (its a polish breakout board, that i am also using on my cnc router, but this one was lying in the corner for 5 years or so - should be O.K.)
Driver: TB6600 (was cheap, 13 € or so, so i am not sure if they are original)
Powersupply for drivers: 24V / 5A
Powersupply for BOB: 12V
Powersupply for Solenoids: 12V

Pictures: (please let me know if i should add more pictures)
             
 
Attachments:
Last edit: 09 Sep 2022 19:01 by denhen89.

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

  • denhen89
  • denhen89's Avatar Topic Author
  • Offline
  • Elite Member
  • Elite Member
More
09 Sep 2022 20:44 #251572 by denhen89
Motor is turning!
I hade switched the wires between ENA- and PUL+ on the driver. Previously i just copied the wire arrangement from my cnc routers driver (Leadshine). I thought it will be the same arrangement.. Its strange, but I think you guys will better know why.

I will continue and try to get a g code to work with the solenoids, but currently i am not sure which codes are the correct. M62 - 65 , or M67/68?
For 2 solenoids M62 - M65 should be right, because I need 2 "On commands" and 2 "Off commands" or am i wrong?

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

More
09 Sep 2022 21:55 #251574 by Bari
YOU have to decide if you want the ON/OFF of the valves to be synchronized to motion or not.

Read over the differences linuxcnc.org/docs/2.8/html/gcode/m-code.html#mcode:m62-m65

M62 - 65 also use: The P- word specifies the digital output number

M64 & M65 happen immediately as they are received by the motion controller. They are not synchronized with movement, and they will break blending.

The actual change of the specified outputs will happen at the beginning of the next motion command. If there is no subsequent motion command, the queued output changes won’t happen. It’s best to always program a motion G code (G0, G1, etc) right after the M62/63.
The following user(s) said Thank You: denhen89

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

  • denhen89
  • denhen89's Avatar Topic Author
  • Offline
  • Elite Member
  • Elite Member
More
10 Sep 2022 17:28 #251625 by denhen89
Thanks Bari.
Usually i would try everything to get it done, but atm i dont want to loose time with M62/63 or M64/65 codes, because it am able to do it also with M7 M8 code.
I have a solution that will work just fine, because i will not anymore try to start painting at a exact location when entering the groove, but already before entering. I will just use that kind of covers for both end of the panel, so that the paint gets only into the groove but not anywhere else. With this solution the paiting can begin already outside, and its fine if one nozzle starts 0.3sec or so earlier than the second nozzle by using M7 and in the next line M8, and then the g-code e.g.:

G0 X20 Y50
M7
M8
G0 Y2800 *(i know, this can be also on the same line as M8)
M9
G0 X60
M7
M8
G0 Y50
M9

As i wrote earlier, the "M8" code starts just shortly after M7, but the axis movement starts outside of the groove, so as soon as it enters the groove, both nozzles are already on.
For me thats a solution that i can accept, especially because i save time setting up the M codes, as well as setting up the ON/OFF-Timings of the nozzles, because first my idea was to not start outside of the groove, but exactly at the beginning, but i would need to do it for both nozzles seperatly because the nozzles are not exactly opposite to each other, but slightly shifted.

Maybe i will have someday more time to get into the M62-65 codes and configuring it. I believe its pretty simple and if i would see one example in a hal file, i would understand it pretty quickly, but for me the Linuxcnc documentation is not pretty clear. Without any complete examples, i have difficulties to understand it.
This does not mean that i expect that someone will do it for me.

Thanks for help guys.
Maybe, when the machine is ready and working i will show some short clip :)

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

More
17 Sep 2022 18:56 #252195 by andypugh
Just to throw in another idea, you could use the "wconp" hal function to turn on the nozzle when the axis was between two positions. The wcomp limits would be conected in HAL to G-code analog outputs, so that the G-code controls the start and stop points, but otherwise can ignore the nozzles.
The following user(s) said Thank You: denhen89

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

More
17 Sep 2022 19:04 #252196 by Bari
M62/63 are fine, if the machine runs fast enough you get into problems with delay between the air in the lines from control valve to nozzle, paint/ink in the nozzles, time of flight from nozzle to substrate, etc etc.
The following user(s) said Thank You: denhen89

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

  • denhen89
  • denhen89's Avatar Topic Author
  • Offline
  • Elite Member
  • Elite Member
More
18 Sep 2022 17:21 #252275 by denhen89
Hi guys :)
Thanks Andy and Bari for still trying to help me out with that, but i forgot to inform you guys that just 1 or 2 days after my last post i got the M64/M65 codes working. It was very easy to be honest, but before i tried i thought it was too much work - i could not leave it like that :D.

So, now both nozzles open at same time, but they start outside of the groove, so i dont need anymore exact positions.
I am still working on the drawing of the construction, but i will start to build it in the next days.

Will post a video when its done in 1-2 weeks.

Have a nice sunday guys.
The following user(s) said Thank You: tommylight

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

Time to create page: 0.172 seconds
Powered by Kunena Forum