GCode Editor

MSM turn mode support (and mill-turn as it runs in turn mode).
sivtek
Posts: 46
Joined: Tue Aug 20, 2013 12:14 am

GCode Editor

Post by sivtek »

Hi

I can not use the GCode Editor on the load page. Get this message:"Utility not present. - Configured GCode Editor dos not exist on disk----. - Please check GCode Editor utility configuration".

In Mach, General Logic Configuration, Editor, GCode Editor I have entered notpad , C:/WINDOWS/system32/notepad.exe.

Running Mach3 the GCode Editor works ok. What to do?

Regards
Johannes
User avatar
DaveCVI
Site Admin
Posts: 798
Joined: Mon Feb 04, 2013 3:15 pm
Contact:

Re: GCode Editor

Post by DaveCVI »

Hi,
The string that is entered must be exactly the path and filename of the editor program that you want to use.
When the system says it can't find the program, that means either
1) there is probably some small error in the path or file name that was entered, or
2) the program is not where you think it is (I.e. the path is not correct).

The easiest way to set the program path and name is to use the browse button from the dialog box.
Then you simply browse to to the directory with the program you want (in this example notepad.exe) and click OK. The system will store the path and file name you browsed to; this method eliminates the chance to make typing errors when entering the path and filename.

BTW, I just doubled checked this on MSM 2.0.10 running on win7 and I could use notepad as the gcode editor.

Dave
Productivity Software for Personal CNC Machinists
http://www.CalypsoVentures.com
sivtek
Posts: 46
Joined: Tue Aug 20, 2013 12:14 am

Re: GCode Editor

Post by sivtek »

Hi Deve

I am using the browse button from the dialog box, but is getting the same message. This is on my lathe settup.

I am also running a mill. Here I get the message: "Error on line: 928 - Internal error"

So I can not use the Editor on my lathe or mill. Seems to be an internal error?

Regards
Johannes
User avatar
DaveCVI
Site Admin
Posts: 798
Joined: Mon Feb 04, 2013 3:15 pm
Contact:

Re: GCode Editor

Post by DaveCVI »

That's odd, as it is working for me.
Please tell me your
MSM version
Mach version
Windows version
And I'll try the same combination to see if I can see what you are seeing.
Dave

Please excuse typos; posted from smart phone
Productivity Software for Personal CNC Machinists
http://www.CalypsoVentures.com
sivtek
Posts: 46
Joined: Tue Aug 20, 2013 12:14 am

Re: GCode Editor

Post by sivtek »

I am using two PCs, both running Windows XP. On both PCs the settup is, - Mach3, v.: R3.043.066, MSM v.:3.0.8.

Thanks
Johannes
User avatar
DaveCVI
Site Admin
Posts: 798
Joined: Mon Feb 04, 2013 3:15 pm
Contact:

Re: GCode Editor

Post by DaveCVI »

Odd, I am having no problem with that same software combination.

So let's try a test -
(These instructions are for the mill setup, the same could be done for lathe if we need to).

Note: these instructions say the files are attached to this post, but they are not - I'll email them to you directly.
My own board is not allowing .mcc attachements to posts and I will solve that later..

Please do this
1) go to C:\Mach3\ScreenSetMacros\MachStdMill.set\Masters\Scripts\Common and rename GCodeedit.mcc to GCodeEditRENAMED.mcc
2) copy the attached GCodeEditDebug.mcc to C:\Mach3\ScreenSetMacros\MachStdMill.set\Masters\Scripts\Common then rename it to GCodeEdit.mcc
This will replace the normal script with a debug version
3) load a short gcode program - it you want one to use, there is a one line program attached.
4) click the edit button on the Load page -
If you get an error, please write it down and let me know what it says.
5) get c:\mach3\LastErrors.txt and send it to me - The debug script puts messages in the mach LastErrors file.

Here is what I get in the log when I do this:
Tue - 19:54:35 ---Program Startup
Tue - 19:54:45 ---MachStdMill Initialized
Tue - 19:55:15 ---Title: oneline gcode file
Tue - 19:55:18 ---GcodeEdit Debug: Entered GCodeEdit ...
Tue - 19:55:18 ---GcodeEdit Debug: loaded gcode FileFQFN:C:\Mach3\GCode\OneLineGCode.tap
Tue - 19:55:19 ---GcodeEdit Debug: EditorFQFN:C:\Windows\System32\notepad.exe
Tue - 19:55:19 ---GcodeEdit Debug: Switches were null
Tue - 19:55:19 ---GcodeEdit Debug: CS = "C:\Windows\System32\notepad.exe" "C:\Mach3\GCode\OneLineGCode.tap"
Tue - 19:55:19 ---GcodeEdit Debug: shelling editor...
Tue - 19:55:20 ---GcodeEdit Debug: having mach close gcode file...
Tue - 19:55:20 ---GcodeEdit Debug: Waiting for Editor process to finish...
Tue - 19:55:22 ---GcodeEdit Debug: Editor process finished...
Tue - 19:55:23 ---GcodeEdit Debug: reloading FileFQFN...
Tue - 19:55:23 ---Title: oneline gcode file
Tue - 19:55:23 ---GcodeEdit Debug: Exiting GCodeEdit ...

I'll be interested to see what your log file says.

Dave
Productivity Software for Personal CNC Machinists
http://www.CalypsoVentures.com
sivtek
Posts: 46
Joined: Tue Aug 20, 2013 12:14 am

Re: GCode Editor

Post by sivtek »

On my lathe I still get the same notice: Get this message:"Utility not present. - Configured GCode Editor dos not exist on disk----. - Please check GCode Editor utility configuration".
And the Last Errors- Notisblock reads:
Wed - 14:48:10 ---Program Startup

On the mill I get the message: "Error on Line - "946-Internal Error.
And the Last Errors- Notisblock reads:
Wed - 14:53:07 ---Program Startup
Wed - 14:53:27 ---MachStdMill Initialized
Wed - 14:54:02 --- Drill1
Wed - 14:54:02 --- T6 : 5.0
Wed - 14:54:12 ---GcodeEdit Debug: Entered GCodeEdit ...
Wed - 14:54:12 ---GcodeEdit Debug: loaded gcode FileFQFN:H:\CNC arb. 2013\Burniching attachment.Part1.nc
Wed - 14:54:12 ---GcodeEdit Debug: EditorFQFN:C:\Program Files\Microsoft Works\lfbmp13n.dll
Wed - 14:54:12 ---GcodeEdit Debug: Switches were null
Wed - 14:54:13 ---GcodeEdit Debug: CS = "C:\Program Files\Microsoft Works\lfbmp13n.dll" "H:\CNC arb. 2013\Burniching attachment.Part1.nc"
Wed - 14:54:13 ---GcodeEdit Debug: shelling editor...
Wed - 14:54:13 ---Error on line: 946 - Internal error

Regards
Johannes
User avatar
DaveCVI
Site Admin
Posts: 798
Joined: Mon Feb 04, 2013 3:15 pm
Contact:

Re: GCode Editor

Post by DaveCVI »

Hi,
sivtek wrote:On my lathe I still get the same notice: Get this message:"Utility not present. - Configured GCode Editor dos not exist on disk----. - Please check GCode Editor utility configuration".
If you want to get the same debug trace for the lathe, you can copy the debug version of the script into
C:\Mach3\ScreenSetMacros\MachStdMillLathe.lset\Masters\Scripts\Common
There are two copies of the script - one for mill and one for lathe. The instructions I provided only changed the mill copy of the script.

That message comes when the script asks windows to see if the Editor FQFN exists - and windows has said "no, that file does not exist on disk". So if you get a debug trace from the lathe, I'll bet that the editor FQFN is not set to a file that exists.

For the mill, the information we need is given in what you posted...

The debug trace shows that the gcode editor path and name is NOT set to notepad.exe.
sivtek wrote: Wed - 14:48:10 ---Program Startup
On the mill I get the message: "Error on Line - "946-Internal Error.
This happens because the editor path and name (The Fully Qualified File Name or FQFN in programmer speak) is set to a dll file (which we will see in the trace messages below).
When windows is asked to run a dll file as a program, windows returns an error because that is not possible.
Unfortunately I forgot to trap the error in order to give the operator a reasonable text error message - so by default it says error on line number 946. I'll improve that for the next MSM release.

Now we will see that the source problem is:
sivtek wrote: And the Last Errors- Notisblock reads:
Wed - 14:53:07 ---Program Startup
Wed - 14:53:27 ---MachStdMill Initialized
Wed - 14:54:02 --- Drill1
Wed - 14:54:02 --- T6 : 5.0
Wed - 14:54:12 ---GcodeEdit Debug: Entered GCodeEdit ...
so far things are OK...
sivtek wrote: Wed - 14:54:12 ---GcodeEdit Debug: loaded gcode FileFQFN:H:\CNC arb. 2013\Burniching attachment.Part1.nc
This line is not the cause of the error, but I wanted to draw your attention to it. While the path node "CNC arb. 2013" is a valid sub directory name for windows, the . and then a space in the directory name could cause trouble for mach. I have seen several cases where Mach does not work correctly when there are unusual characters in directory names. Mach apparently does it's own parsing of file paths inside mach instead of using windows to do that task; so sometimes things that are OK for windows are not OK for mach.
sivtek wrote: Wed - 14:54:12 ---GcodeEdit Debug: EditorFQFN:C:\Program Files\Microsoft Works\lfbmp13n.dll
This is the problem that is causing the error.
The gcode editor is not set to c:\windows\systme32\notepad.exe as you thought.
The trace message shows that the editor is set to:C:\Program Files\Microsoft Works\lfbmp13n.dll
So the system is asking windows to start a DLL file and that can't be done - hence the error.

If you fix the gcode editor string to be an actual program application file, the error will go away.
On the setting common page, use the "Set Utility Paths" button - the first path it will show is for the GCode Editor - I bet that is set to
C:\Program Files\Microsoft Works\lfbmp13n.dll
sivtek wrote: Wed - 14:54:12 ---GcodeEdit Debug: Switches were null
Wed - 14:54:13 ---GcodeEdit Debug: CS = "C:\Program Files\Microsoft Works\lfbmp13n.dll" "H:\CNC arb. 2013\Burniching attachment.Part1.nc"
Wed - 14:54:13 ---GcodeEdit Debug: shelling editor...
Wed - 14:54:13 ---Error on line: 946 - Internal error

Regards
Johannes
Dave
Productivity Software for Personal CNC Machinists
http://www.CalypsoVentures.com
sivtek
Posts: 46
Joined: Tue Aug 20, 2013 12:14 am

Re: GCode Editor

Post by sivtek »

Dave wrote:
"On the setting common page, use the "Set Utility Paths" button - the first path it will show is for the GCode Editor - I bet that is set to C:\Program Files\Microsoft Works\lfbmp13n.dll"

Sorry no Dave. The first pathe is: C:/WINDOWS/systeme32/notepad.exe. The secon pathe is C:/Program Files/Microsoft Works/lfbmp13m.dll.

I have used the browser to chose the notpad in the general configuration, so that should bee ok.

On the "Set Utility Paths" page it is two boxes, the bottom one is emty, only the topp one have text, like (C:/WINDOWS/systeme32/notepad.exe.)

Suppose this subject should have been on the mill forum? but have the same problems both on te mill and lathe settup.

Johannes
User avatar
DaveCVI
Site Admin
Posts: 798
Joined: Mon Feb 04, 2013 3:15 pm
Contact:

Re: GCode Editor

Post by DaveCVI »

Hi,
I think there is some confusion here - I will try to clear it up. :)
There are THREE different utilities that MSM can use:
1) non-GCode editor
2) GCode editor
3) PDF reader
sivtek wrote:Dave wrote:
"On the setting common page, use the "Set Utility Paths" button - the first path it will show is for the GCode Editor - I bet that is set to C:\Program Files\Microsoft Works\lfbmp13n.dll"

Sorry no Dave. The first pathe is: C:/WINDOWS/systeme32/notepad.exe.
The first DIALOG BOX that the "Set Utility Paths" button shows is for the NON-GCODE editor. The dialog has two entries:
1) the first entry is for the path and file name of the editor that you want MSM to use for NON-GCODE files (for example reports of tool tables etc).
2) the second entry is for any command line switches that the editor may need when it is started. For Notepad you would leave this area blank.
sivtek wrote: The secon pathe is C:/Program Files/Microsoft Works/lfbmp13m.dll.
The SECOND DIALOG BOX that the "Set Utility Paths" button shows is for the GCODE editor.
You are telling me that this is set to C:/Program Files/Microsoft Works/lfbmp13m.dll - and that is the problem.
Windows CANNOT run a .dll file as an application.
You need to change this to an actual editor program. If you want to use notepad for GCode files, then make this the same as the first dialog box for the NON-GCode editor.
sivtek wrote: I have used the browser to chose the notpad in the general configuration, so that should bee ok.

On the "Set Utility Paths" page it is two boxes, the bottom one is emty, only the topp one have text, like (C:/WINDOWS/systeme32/notepad.exe.)

Suppose this subject should have been on the mill forum? but have the same problems both on te mill and lathe settup.

Johannes
No problem about which forum for the topic. The topic actually applies to both mill and lathe and both the personal and professional editions of MSM. They all use the same internal scripts for these features.

Please see the attached PDF file for more information.

Dave
Attachments
MSM utility path slides.pdf
MSM utility path examples
(90.34 KiB) Downloaded 2879 times
Productivity Software for Personal CNC Machinists
http://www.CalypsoVentures.com
Post Reply