- Posts: 6803
- Thank you received: 0
QtVCP gcode file opening
Please Log in to join the conversation.
Cheers, Phill.
Please Log in to join the conversation.
cmorley wrote: Just thinking out loud - I would prefer to use the STATUS message called dialog system for the gcode file, so that in principle it would be easy to make a different dialog widget and have the action button or the gcode button use the same dialog.
I just pulled your latest commits and gave them a run...
DIALOGS:
The dialogs for the action button open and gcode editor are the same which is good but the save dialog is still the old one.
ACTION BUTTON:
If I load a file then try to load it again it does not reload it.
It also still gives this error:
GCODE EDITOR:
When I load a file into the editor I like to also load it into linuxcnc.
To get this to work I changed the open function in gcode_editor.py to:
If there is anything I can help with, let me know.
Cheers, Phill.
Please Log in to join the conversation.
I agree the default behavior is surely to have the editor load the program into linuxcnc as well. Using the newer STATUS message way allows more flexibility in the future...
I think I'll use the new STATUS message way for now but adjust it to load the file into linuxcnc. Later we could add an option to load and edit files without loading into the machine controller if that is good utility. (i'm thinking in situations that you wish to edit/build a program while the machine is running a long program - but that may be unneeded complexity)
Your screen looks like it's had a lot of thought into it - nice!
I'm impressed that you have build so many different versions with different screen infrastructure - i look forward to further qtvcp critiques.
I did notice that your axis_tool_buttons for setting the axis origin are set to use the ENTRY dialog but the screenoptions widget does not load an ENTRY dialog.
the options are change the axis_tool_button to use the CALCULATOR dialog (because it looks like screenoptions does load a calculator entry dialog) or select the entry dialog option on the screenoptions widget. -it's fairly new code so I thought you might have missed the change.
Chris
Please Log in to join the conversation.
cmorley wrote: I did notice that your axis_tool_buttons for setting the axis origin are set to use the ENTRY dialog but the screenoptions widget does not load an ENTRY dialog.
the options are change the axis_tool_button to use the CALCULATOR dialog (because it looks like screenoptions does load a calculator entry dialog) or select the entry dialog option on the screenoptions widget. -it's fairly new code so I thought you might have missed the change.
Possibly because I have no idea what I am doing here...
If I click a touchoff button a small popup appears, should I have done it some other way.
When I saw one of your recent commits mention calendar I checked the calendar but I didn't know where to go from there.
I think I need a bit of hand holding in this area...
Cheers, Phill.
Please Log in to join the conversation.
I would suggest to start with go to the screnoptions widget and under the properties select entry and calculator dialogs - then either option should work.
Later if you want to try the calculator as an entry for the touchoff button there is a property called 'dialog code' that you can change from ENTRY to CALCULATOR.
Chris
Please Log in to join the conversation.
cmorley wrote: in the small pop up if you select 'set' a dialog should pop up - I don't think it does.
I would suggest to start with go to the screnoptions widget and under the properties select entry and calculator dialogs - then either option should work.
Later if you want to try the calculator as an entry for the touchoff button there is a property called 'dialog code' that you can change from ENTRY to CALCULATOR.
Ahah, yes, checking entry in the screenoptions does allow the set dialog.
Thank You
Cheers, Phill.
Please Log in to join the conversation.
plasma_feed.ngc twice - I get no error.
can you help me get the loading error?
Thanks.
Chris M
Please Log in to join the conversation.
cmorley wrote: I commented out your class patch for the file dialog, then load your program:
plasma_feed.ngc twice - I get no error.
can you help me get the loading error?
The attached config is the standard axis_mm sim config with a basic qtvcp gui and an unedited default handler file.
I have tested this on the latest master branch (not my plasmac branch).
1. Take machine out of estop.
2. Turn machine on.
3. Load line.ngc from the config directory.
4. Zoom the preview just to change the displayed size.
5. Edit and save line.ngc from an external editor.
6. Load line.ngc from the config directory.
7. Note that the file displayed in the editor is still the original and that the preview has also not changed.
I would expect that the editor should now show the modified file and the preview show the new modified file at the default zoom level
[strike]The above behaviour is the same on my plasmac config except:
1. When loading a file (after 2 and 6 above) the file name is printed to the terminal which doesn't happen above.
2. After 6 above, the error "File ended with no percent sign or program end" is also printed to the terminal.
[/strike]
Note that when I add the code from this post both the above behaviours disappear.
Cheers, Phill.
Edit:
I did a diff on lib/python/qtvcp on master and plasmac branches and there were no differences.
Edit:
In my plasmac branch I replaced the handler file with a copy of the default handler file used in the testing above, added the required callbacks (which are all just pass through) to enable the ui file to load and it shows the first behaviour above, not reloading the gcode file, which I did expect [strike]but it also shows the second behaviour, printing the file name and the error to the terminal.[/strike]
Edit:
Next step was to make the screen preferences in the plasmac config identical to the basic one used above, this had no effect...
Edit:
OK... the printing to the terminal of the filename and the error is due to the filtering of the gcode file...
It is interesting though that if I get the file to reload correctly then this problem also disappears.
Also this printing to terminal does not happen in my other gui configs.
Please Log in to join the conversation.
The problem there is that STATUS compares the old file name to linuxcnc's stat file name - if they are the same, it doesn't emit a 'file-loaded' message.
In your fix you cleared the old file name. in my fix I just checked to see if the file name to be loaded is the same as the one that status has, and if it's the same force an update.
It's really the same fix, but i prefer to not write to the internals of STATUS.
I have not tried with a filter program yet.
Chris M
Please Log in to join the conversation.
