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

Visualizer not functioning in relative mode #2501

Open
ehouais opened this issue Apr 3, 2024 · 4 comments
Open

Visualizer not functioning in relative mode #2501

ehouais opened this issue Apr 3, 2024 · 4 comments
Labels

Comments

@ehouais
Copy link

ehouais commented Apr 3, 2024

Version

2.1.6

Hardware / Firmware

GRBL 1.1

What happened

When plotting a GCode program in relative mode (G91), nothing is shown in the visualizer, though the program is valid and successfully plotted on my iDraw A3. When I switch to absolute coordinates using the code G90, the visualizer shows the path as it should.

How to reproduce

Simple example program in relative mode that is not visualized properly:

G92 X0 Y0
G90
G1 F10000 Z0.5
G91 
G1 X50 Y-50
G1 F5000 Z4.5
G1 F2000
G1 X-10 Y0
G1 X0 Y10
G1 X10 Y0
G1 X0 Y-10
G1 F10000 Z-4.5
G1 F8000
G1 X-50 Y50

Equivalent program in absolute mode that is visualized properly

G92 X0 Y0
G90
G1 F10000 Z0.5
G1 X50 Y-50
G1 F5000 Z4.5
G1 F2000
G1 X40 Y-50
G1 X40 Y-40
G1 X50 Y-40
G1 X50 Y-50
G1 F10000 Z-4.5
G1 F8000
G1 X0 Y0

Operating System

Mac mini M2 with macOS Sonoma

Anything else

No response

@breiler
Copy link
Collaborator

breiler commented Apr 3, 2024

How did you generate this program?

@ehouais
Copy link
Author

ehouais commented Apr 3, 2024

Home-made generation pipeline. I find relative moves more suitable to my algorithmic experiments.

@breiler
Copy link
Collaborator

breiler commented Apr 3, 2024

I found a problem that the visualizer needs to know the first point in order for it to work with relative coordinates. This should normally be the current work position but is not used when loading the model.

The quickest workaround is to add one absolute movement in the beginning of the program:

G21
G92 X0 Y0 
G90 G0 X0 Y0 ; workaround to set the initial point
G1 F10000 Z0.5
G91 
G1 X50 Y-50
G1 F5000 Z4.5
G1 F2000
G1 X-10 Y0
G1 X0 Y10
G1 X10 Y0
G1 X0 Y-10
G1 F10000 Z-4.5
G1 F8000
G1 X-50 Y50

@ehouais
Copy link
Author

ehouais commented Apr 3, 2024

OK, tested it and it works now. Thanks for your quick response !

@breiler breiler added the bug label Apr 4, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants