Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Click or Touch to move the spindle/Laser #255

Open
mathojojo opened this issue Aug 7, 2022 · 5 comments
Open

Click or Touch to move the spindle/Laser #255

mathojojo opened this issue Aug 7, 2022 · 5 comments

Comments

@mathojojo
Copy link

mathojojo commented Aug 7, 2022

Is your feature request related to a problem? Please describe.
Moving the spindle or the laser at a position can require many jog operations, or to calculate the new desired position and enter it as a G0 or G1 command.
My feature request is about a graphical way to roughly move the spindle at a X and Y position (Not sure if Z is needed), and then only, adjusting it with jog commands.

Describe the solution you'd like
For that, it could be nice to have a 2D representation of the bed, with :

  • the working area as a square or rectangle,
  • the Home Position as a dot,
  • the actual spindle position as a dot or an icon,
  • the actual space origin (G54, G55, ...G59),
  • Rulers for X and Y in mm or inch (should be switchable).

You just have to click with the mouse pointer somewhere on the bed to move the spindle at this position (or touch it if touchscreen/smartphone/tablet).
Working area must fit the real CNC specifications, that can be found in GRBL parameters ($130 / $131) and after the homing cycle.

It might not be so usefull for little machines like 3D printers, but for big milling CNC, it would be very appreciated.
I personnaly have a 1500mm * 1500mm milling CNC, and moving the spindle at the right position is a big part of the job...

It's integration can be done with a plugin, or added as a new tool in the V3 WebUI. Or maybe a button in the Jog space could be added, when clicked a popup appears with the 2D representation ??

Describe alternatives you've considered
The alternative is to do as I do actually, Jog, and jog, and jog and jog :)

Additional context
I hope this is not too much work, and that i'm not the only one to considere this feature as Needed :)
Thank you.

@github-actions
Copy link

github-actions bot commented Aug 7, 2022

Thank your for submiting, please be sure you followed template or your issue may be dismissed.

@luc-github
Copy link
Owner

luc-github commented Aug 8, 2022

Interresting, so you do not want to type a command in terminal like $J=G0 X500 Y500 F1000 but would prefer a graphical way ?
Am I correct ?

So I have questions as I am still a newbie in CNC, sorry if they look obvious for you, but many GCODE cnc technics are still fuzzy for me:

  • the working area as a square or rectangle,
    [Question] How you get that ?

  • the Home Position as a dot,
    [Question] The 0.0 of the total machine area? - or the 0,0 of the current working area ?

  • the actual spindle position as a dot or an icon,
    Ok

  • the actual space origin (G54, G55, ...G59),
    Ok that is already displayed

  • Rulers for X and Y in mm or inch (should be switchable).
    [Question]This is done at start right, you do not switch when jogging ?

  • in case of displaying the full machine area, in your case 1500 X1500 according $130/$131
    May you explain to me the commands to use to switch to global space do the moving to X, Y then swich back to previous space origin (G54, G55, ...G59), I still have hard time to understand how to use and switch between these G54, G55, ...G59

@mathojojo
Copy link
Author

mathojojo commented Aug 8, 2022

Thank you for your answer,

It's not that I don't want to type commands, but it would be an interesting option that can help to win time. It can also reduce errors when typing numbers (Keyboards keys become unstable in dust environment , G0 X500 Y500 F1000 can fast become G0 X5000 Y500).
And the 2D representation is probably a way to better apprehend the CNC global state, especially for beginners.
Of course, for precise positionnement, jogs will always be the only solution.

  • The working area (rectangle) is determined with :
    * WPos X and WPos Y after Homing Cycle (maybe should integrate the $27 parameter, Homing pull-off),
    * X and Y Max travel ($130 and $131)

X Y Max travel.
Xw Yw Zw

  • Forget about Home Position as a dot, my mistake. I was in fact talking about Actual Space Origins (G54 to G59). If the CNC is working in G54 space (default), then the G54 Space Origin should be drawn as a dot. If you switch your machine to G56, then, draw the G56 Space Origin as a dot..

  • Actual Spindle position : OK

  • Rulers for X an Y in mm or inch. You are right. If mm is used in the global interface, rulers should be in mm too, for coherence.

in case of displaying the full machine area, in your case 1500 X1500 according $130/$131 May you explain to me the commands to use to switch to global space do the moving to X, Y then swich back to previous space origin (G54, G55, ...G59), I still have hard time to understand how to use and switch between these G54, G55, ...G59

I'm not very advanced in CNC for now. I never used a global Space , I'm not even sure if such space exists.I'm mostly working on the default G54.

But, you can probably do it with a calculation.

In my case with 1500 x 1500mm machine :
If the Homing Pull-Off ($27) is 3mm, then $130 an $131 values are 1497mm. After Homing Cycle :
=> The global space drawn should be 1497 long, and 1497 width
=> The Top Right corner of the rectangle has position WPos X - 3 = 0 - 3 = -3mm / WPos Y - 3 = 0 - 3 = -3mm
=> The bottom Left corner of the rectangle has position X = -1500 Y = -1500

WPos X and WPosY are determinated with the Home cycle, it won't change whatever the space used (G54 to G59). So moves should be calculated with WPos, not with MPos.

So, if your spindle has its actual position at WPosX-300 and WPosY-200 on global space (MPosX100 MPosY100 in G54 area), and you click at the X-800 Y-700 position of the 2D representation, then the move should be :
Xmove : WPosX Click - WPosX Spindle = (-800) - (-300) = -500
Ymove : WPosY Click - WPosY Spindle = (-700) - (-200) = -500

The easiest way would be then to do a relative move :
G91
G0 X-500 Y-500
(of course, return to absolut mode if it was the initial state before the move by adding G90 at the end)

representation grbl

I hope I'm clear, it's not easy to talk absout things like positions, relative and absolut... And of course, as non advanced user, there might be some errors in my logic.

So, please, don't hesistate to correct me if there is any error.

Thank you

@luc-github
Copy link
Owner

luc-github commented Aug 8, 2022

Ok thank you for the clarification, the precision would be very limited on small screen, and on phone/tablet you won't have mouse cursor to limit the click area, that said it is possible to be done, but I cannot say when it could be done, it would be limited to X,Y plan anyway, because I do not see an easy way to do handle this in 3D

@mathojojo
Copy link
Author

mathojojo commented Aug 8, 2022

Yes you are true, the precision would be very limited on small screen. But even on big screen it would be limited. It can't avoid a accurate adjustement in a final step.

But with command method (G0 X-800 Y-700), you must also finalize your placement with some accurates jogs.
And when you make multiple 100mm jogs, you must finalize the process with some accurates jogs as well.

The goal is really to make a fast and good enough first placement of the spindle... then adjust it precisely. On big machines, and when you have many operations to do, you can save many time.
And you will also alway have a clear view of you CNC state, even if you re not in front of your machine (graphics are always better an clearer than numbers)

I saw that you have some bed-leveling features request, This feature may also need a graphique. Maybe they can be merged into one 2D or 3D representation to save place...

Thank you

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: Todo
Development

No branches or pull requests

2 participants