Machsupport Forum

Mach Discussion => Mach Screens => Screen designer tips and tutorials => Topic started by: django013 on April 22, 2017, 12:35:30 AM

Title: wired toolpath and no idea why
Post by: django013 on April 22, 2017, 12:35:30 AM
Hello,

I'm trying to create a screen with screen-designer. My screen is not ready yet, but as I'm quite curious, I loaded a gcode-file and hit start.
(http://Toolpath-wrong.png)
The (desired) workpiece consits of blue lines and purple circles.
What mach3 did is shown by the green circles.

Doing the same with the originial screen 1024 looks like expected:
(http://Toolpath-right.png)
Green dots match the path of blue lines and purple circles.

Both screens use the same settings, so what am I missing?
Any hint is welcome.
Title: Re: wired toolpath and no idea why
Post by: Tweakie.CNC on April 22, 2017, 02:11:04 AM
It all stems from your CAD/CAM software and if the arcs were drawn in Incremental or Absolute mode.

If you get the green 'crop circles' go into Config. / General Config. and change the IJ Mode then Regen. the Toolpath.

Ideally all your Gcode files which contains arcs should include the G90.1 / G91.1 (as appropriate) as part of their initialization string.

Tweakie.
Title: Re: wired toolpath and no idea why
Post by: django013 on April 22, 2017, 02:23:50 AM
Hi and thank you for your attention!

What I don't understand - no matter what settings I have active - shouldn't the preview after loading a file be created respecting the same settings as when I hit start?
How can it be, that the preview is perfect and the tool path after run is completely wired?

In the config settings I have absoulute dimensions and incremental IJK.

My gcode sample starts with this line: "G21 G90 G91.1 G64 G40"

But obviously there's a difference between the standard screen (1024) and my created screen. I also searched for an initial macro, but did not find one.
I use the same button function, as in the screen 1024 and the behaviour of the app is completely different :(
When I run the sample with my screen, it seems as if no G0 will be executed.
Title: Re: wired toolpath and no idea why
Post by: Tweakie.CNC on April 22, 2017, 02:43:19 AM
Check the last few lines of your Gcode file for anything that should not be there.

Tweakie.
Title: Re: wired toolpath and no idea why
Post by: django013 on April 22, 2017, 02:49:40 AM
??? - how can a difference in the file produce different results depending on the active screen?

Anyway - here's the file
Title: Re: wired toolpath and no idea why
Post by: Tweakie.CNC on April 22, 2017, 03:49:04 AM
Well, your Gcode file displays and runs just fine here so it now looks like you have done something bad in your designed screen. Unfortunately I have absolutely no idea of  what it could be other than one screen in Absolute and one screen in Incremental modes (assuming that could be done).

Tweakie.
Title: Re: wired toolpath and no idea why
Post by: django013 on April 22, 2017, 04:04:09 AM
If you compare both images, it shows up, that both start at different offset (red line to inner circle).

I think, it's not just a matter of absolut/incremental modes. In my screen, the Z-axis does not move and the initial G0 (red line) is not performed.
I did not work out all screens yet. Does the original screen have macros, that run initially under the hood?
I think, it must be something, I did not have done/found yet.
Title: Re: wired toolpath and no idea why
Post by: RICH on April 22, 2017, 06:40:18 AM
Create individual profiles / xml 's for each screen.  Make sure configured  settings are the exact same. Don't just
change / load a different screen to test. See how it goes.

Seems like there is an offset in play when you loaded your screen. Check diagnostics immediately after loading the file in both screens and compare axis positions.

FWIW,

RICH

Title: Re: wired toolpath and no idea why
Post by: django013 on April 22, 2017, 07:39:13 AM
Thanks for the hint with the xml-files. They are pretty different :(
So I have to dive into xml now ...
Title: Re: wired toolpath and no idea why
Post by: RICH on April 22, 2017, 05:16:06 PM
You could of just copied the xml you use for the 1024 screen set and renamed the copy to say, MSCREEN.
Then open Mach3 using MSCREEN, load your modified screen and save settings, exit Mach. Open Mach using MSCREEN and your new screen will be used but the settings should be the same as the 1024 screen profile. All that was done was to define what screen set to use.

RICH
Title: Re: wired toolpath and no idea why
Post by: django013 on April 22, 2017, 10:50:29 PM
Hi Rich,

the hint with the xml-files was the key :)

I used an xml-beautifier and diff and then the rest was pretty easy. I don't know enuf to talk about reasons, but it looks like the default screen has an initialized parallel port and enabled axis, whereas my new scren had none of all.
I wonder, how mach3 did the green circles without any axis enabled ???

Anyway - I configured the parallel port and now my screen does the right moves too :)

But this leads to another "problem": I enabled the relais output for cooling and mist, but the buttons that should toggle cooling and mist did not work. I use LEDs with double-width grafics and those LEDs switch, when I issue an M7, M8 or M9 (in MDI-input) - but not, when I hit the button, that should toggle cooling or mist.
Is there another "hidden" feature I happen to miss?

Title: Re: wired toolpath and no idea why
Post by: RICH on April 23, 2017, 06:13:37 AM
Quote
M7, M8 or M9 (in MDI-input) - but not, when I hit the button, that should toggle cooling or mist

Compare the OEM button code used in  your modified screen  to the 1024 screen set buttons.

RICH
Title: Re: wired toolpath and no idea why
Post by: ger21 on April 23, 2017, 06:39:16 AM

My gcode sample starts with this line: "G21 G90 G91.1 G64 G40"


G90 and G91.1 MUST be on separate lines if you want them to work reliably all of the time.

I'd have to check, but I believe that only the last one of the two is actually used when they are on the same line.
Title: Re: wired toolpath and no idea why
Post by: django013 on April 23, 2017, 07:10:33 AM
@Rich
I already did - and they are the same!

@ger21
cambam is quite heavily used by mach3 users - I can't imagine, that I'm the first, that run into trouble.
I'll keep it in mind and check for differences
Title: Re: wired toolpath and no idea why
Post by: ger21 on April 23, 2017, 07:35:34 AM
Quote
cambam is quite heavily used by mach3 users - I can't imagine, that I'm the first, that run into trouble.

That's not specifically your issue. But it doesn't change the fact that the post is wrong for doing it that way.

And, if you only used CamBam, you'd never see an issue.
But if you were to run some G91 code before your CamBam code, you then run into an issue.


Quote
I wonder, how mach3 did the green circles without any axis enabled

You don't need any axis enabled to display the toolpath.
Title: Re: wired toolpath and no idea why
Post by: django013 on April 23, 2017, 07:46:50 AM
Oups - that's a bit to complicate for the moment.

I can not imagine a situation, where I want IJK be absolute, but I can imagine a situation, where I want G91 (instead of my default G90): when I raise Z to safety level. Not very common use-case, but ...
... so what is the right way to switch G90/G91 without changing G91.1?

Is it worth to raise a cambam-issue to change the mach3-postprocessor?
Title: Re: wired toolpath and no idea why
Post by: ger21 on April 23, 2017, 07:49:20 AM
Quote
... so what is the right way to switch G90/G91 without changing G91.1?

As I said, they need to be on separate lines.