Hello Guest it is March 29, 2024, 04:31:48 AM

Author Topic: Mach memory cache annoyance  (Read 15438 times)

0 Members and 1 Guest are viewing this topic.

Offline Sage

*
  •  365 365
    • View Profile
Mach memory cache annoyance
« on: October 07, 2009, 02:13:57 PM »
I've noticed a very annoying issue with Mach.
I've recently been using Mach as just a G-code viewer. I create G-code with a program (PCB-Gcode) then open Mach and load the file to observe the results. I then close the G-code file in Mach and modify the g-code. PCB-Gcode generates a new file but with the same name as the old one that overwrites the old file (confirmed).
 When I return to Mach and load the G-code file it displays the old information not the G-code from the new file.
I've tried erasing the file from the disk before regenerating it but Mach still displays the old information.
The only way I can stop this is to exit Mach and return and open the file. An obvious pain. It then picks up the new file information.

I believe this is someting that needs to be corrected by the Mach programmer. I think there is probably a flush memory buffer function that should be issued to force Mach to clear it's cach and actually load the file contents instead of from memory.

In the old DOS days you sometimes had this problem and you could do a CTRL-C to clear the disk cach and re-log the disk drive. I'm not sure of any such think exists in Windows.

Anyone have a work around for this?

Sage

Offline Hood

*
  •  25,835 25,835
  • Carnoustie, Scotland
    • View Profile
Re: Mach memory cache annoyance
« Reply #1 on: October 07, 2009, 02:39:47 PM »
Never seen or heard of anyone with that problem so its very unlikely its a Mach problem.

Hood

Offline Hood

*
  •  25,835 25,835
  • Carnoustie, Scotland
    • View Profile
Re: Mach memory cache annoyance
« Reply #2 on: October 07, 2009, 02:48:03 PM »
Just tried it on three different computers with 5 different revisions of Mach and all work exactly as expected. Might be an idea to reinstall Mach over the top of itself to see if it clears up your problems.

Hood

Offline Sage

*
  •  365 365
    • View Profile
Re: Mach memory cache annoyance
« Reply #3 on: October 07, 2009, 02:54:00 PM »
Ok.
Short of doing exactly what I'm doing I can't suggest any way of duplicating the issue.
I'll see if I can come up with something others can try.

Sage

Offline Hood

*
  •  25,835 25,835
  • Carnoustie, Scotland
    • View Profile
Re: Mach memory cache annoyance
« Reply #4 on: October 07, 2009, 02:57:26 PM »
Just thinking, does the code load fully when you reload it?  What I mean is do you see the path generation window pop up then dissapear and the code window goes  back to the start of the file. If it is not reading it fully then it is quite likely that it will display the previous toolpath.
Hood

Offline Sage

*
  •  365 365
    • View Profile
Re: Mach memory cache annoyance
« Reply #5 on: October 07, 2009, 03:21:42 PM »
Yes it seems to load the file fine and the tool path updates fully. I even tried regen again. Same thing.

I've never seen this before either. I tried to simulate by making two files, one a copy of the other except for one G-code difference.
I saved them in separate directories so they could have the same name.
I loaded one in Mach and looked at it. Then unloaded it. In explorer I copied the other one over the original.
I loaded the file again in Mach but it was fine and showed the changes.
Not sure if this is exactly what goes on with what I was doing. Could be the operations are handled differently by Windows.

I guess I'll forget it for now.

I'm getting good at shutting down and starting up Mach. anyway. Once I get the PCB-Gcode parameters figured out as to what they affect in the G-code hopefully I won't have to do it much.

Thanks for your help and quick response Hood.

Sage

Offline Hood

*
  •  25,835 25,835
  • Carnoustie, Scotland
    • View Profile
Re: Mach memory cache annoyance
« Reply #6 on: October 07, 2009, 03:39:45 PM »
That is weird, how about making the changes then opening the file in Notepad before reloading it in Mach, does that make it correct or is it still wrong?

Hood

Offline Sage

*
  •  365 365
    • View Profile
Re: Mach memory cache annoyance
« Reply #7 on: October 07, 2009, 09:28:45 PM »
Doesn't help.
Here's the steps I followed.
Generated the G-code file in Eagle with PCB-Gcode then loaded it in Mach. Noted toolpath display.
Closed the file in Mach keeping mach open.
Generated the new file with different parameters.
Loaded it in Mach noted it had not changed.
Closed it in Mach. Kept mach open.
Opened it in notepad (can't tell one from another in notepad it's a huge file)
Closed it in notepad.
Opened it in Mach. Still the same old file.
Closed Mach all together.
Restarted Mach
Opened the flle - it's the new one.

Beats me. I can't duplicate it with any other operation. Maybe Eagle messes up Mach. Still smacks of some sort of memory cache problem. Where else would Mach be getting old information.

Sage

Offline Chaoticone

*
  • *
  •  5,624 5,624
  • Precision Chaos
    • View Profile
Re: Mach memory cache annoyance
« Reply #8 on: October 07, 2009, 09:45:24 PM »
I have never seen this either. Only thing I can think of is directories not being right.

Brett
;D If you could see the things I have in my head, you would be laughing too. ;D

My guard dog is not what you need to worry about!

Offline Sage

*
  •  365 365
    • View Profile
Re: Mach memory cache annoyance
« Reply #9 on: October 07, 2009, 09:57:31 PM »
Not sure what your thinking is with that. It's not like Mach is picking up an old file 'cause it's looking in the wrong place or anything. It finds it fine as long as you close mach and open it again.
 In any case I'll remember the issue and if I come across it again under different circumstances I'll test it some more. I've moved on for the moment.


Sage