What's the difference...
-
@nightowl999 said in What's the difference...:
...between a macro and a .g file in the \sys folder?
Nope, not a pub quiz question, just me having another confused moment.
thank you
It can be a bit confusing because there can be g-code files placed in the Macro folder which are displayed in the DWC, by name. And usually the name does not include the .g extension.
So when someone says "macro" do they mean a file in the Macro folder or just any g-code file in any location?
Perhaps we need two names?
Frederick
-
@fcwilt If you're asking me what I meant by a macro, I was trying to understand why there's a \macro folder and a \sys folder, if they're essentially the same.
I appreciate some are manadatory and others are desired, but that also led me to think about how my own macros (all none of them) would be better placed in the \macro folder. I've just had Joe's pendant delivered and was thinking if the macros for that should be in there, for example.
-
@nightowl999 You can run macros directly from the macros folder using DWC and they show up on the PanelDue. To run them from /sys you have to use M98, and they do not show up on the PanelDue.
-
@nightowl999 said in What's the difference...:
@fcwilt If you're asking me what I meant by a macro, I was trying to understand why there's a \macro folder and a \sys folder, if they're essentially the same.
As posted by Stephen6309 there is a difference in that g-code files in the \macro folder are displayed in the DWC, in the Dashboard view, which is why they tend of have more "user friendly" names without the .g extension. The can be executed by clicking the desired "macro button"
On the other hand g-code files in either the \macro folder or the \sys folder, when in Files view, cannot run them just by clicking.
If you click a file in the \macro folder you will be asked it you want to run it. But you can right click and get the menu of options, which include Run and Edit.
If you click a file in the \sys folder it will open in the editor. You can also right click and get the menu of options, but Run is not present.
Frederick
-
@nightowl999
I was trying to understand why there's a \macro folder and a \sys folder, if they're essentially the same.
To add some confusion: you can even make up your own folder, both at the root level and within /sys - that are two ways to hide macros effectively. - I don’t do this.
One thing to consider is a pending over-population of the /sys folder. Every new version of RRF introduces additional macros, plus some of your own code which should be in there - for example, if you decide to cut your config into logical segments, or, more often, macro snippets you only call from other /sys inhabitants.
At some point, it becomes difficult to locate a certain file you are just looking for. So it’s a good advice to keep the /sys directory as clean as possible.
-
@infiniteloop
Talking of which, can I bin the DuetWebControl-master folder, and the bed.g and config_default.g files? -
@infiniteloop said in What's the difference...:
So it’s a good advice to keep the /sys directory as clean as possible.
On the other hand it can be easier to find, edit and execute the g-code files if they are mostly together in \sys.
For my most complicated printer I have 53 files in \sys and don't find that to be an problem.
Frederick
-
I agree, @fcwilt, although I haven't got 53 files in my \sys folder!
I suppose the real limit is the size of the SD card, but I was also wondering if the DWC would look for specific files in specific folders, like Windoze does for applications, downloads, My Documents, etc.
-
@nightowl999 said in What's the difference...:
Talking of which, can I bin the DuetWebControl-master folder, and the bed.g and config_default.g files?
bed.g is called by
G32
, so keep it in place.OK, that was easy. TBH, I don't even know the DuetWebControl-master folder or a config_default.g file. I have nothing like that on my SD card. But, before you delete these or any other objects, secure a copy of your SD card - just in case …
And here's some night lecture about the topic
-
@infiniteloop I knew I could rely on you!
I think the config_default.g is for the DuetPi, which I don't have, and the DuetWebControl-master folder is from a previous installation - although why it's on the SD card I don't know. I'll move them to a Do I Need This S**t folder and see what happens
-
@nightowl999
I suppose the real limit is the size of the SD card
Physically, yes. For me, the limiting factor is the screen size, better: the size of the System Directory view in DWC. If I ever change my configuration, I have to go through several files to look things up or to counter-check compatibility with existing code. I still feel comfortable with 37 entries …
-
@nightowl999 said in What's the difference...:
I'll move them to a Do I Need This S**t folder and see what happens
Good idea! However, don't forget regularly backups of your SD card - just in case it dies a sudden death.
-
@nightowl999 said in What's the difference...:
@infiniteloop I knew I could rely on you!
I think the config_default.g is for the DuetPi, which I don't have, and the DuetWebControl-master folder is from a previous installation - although why it's on the SD card I don't know. I'll move them to a Do I Need This S**t folder and see what happens
The SD card that ships with a Duet board comes with a set of files/folders - some of which you will likely never need.
What I do with a new SD card is copy it all to a location on my computer where I keep everything 3D printing related.
Then I format the SD card, install my basic config.g file, which contains just enough to get the Duet up and connected to my network.
The rest of the files ( I tend to use a standard set of files) get uploaded to the Duet either via the DWC or an FTP connection.
Frederick
-
@infiniteloop said in What's the difference...:
@nightowl999
I suppose the real limit is the size of the SD card
Physically, yes. For me, the limiting factor is the screen size, better: the size of the System Directory view in DWC. If I ever change my configuration, I have to go through several files to look things up or to counter-check compatibility with existing code. I still feel comfortable with 37 entries …
As the capability of the Duet firmware has grown my files have grown in number and size. As that has happened I have found the limitations of the DWC editor becoming a bit of a problem.
I recently downloaded all configuration files from each of my printers into a Windows editor that supports "projects". There are several such editors. A "project" is a set of files that the editor keeps together. Just the ability to do project wide search/replace made the change to using Windows editor worthwhile.
I haven't completely gotten out of the habit of editing in the DWC but that will come, I hope.
It will be best if reach the point where I do all my editing/creating in the Windows editor and just upload to the Duet. I wish the editor supported FTP so I could upload directly from the editor.
Frederick
-
@infiniteloop said in What's the difference...:
Good idea! However, don't forget regularly backups of your SD card - just in case it dies a sudden death.
Good point, but not something I've even thought about.
How does one access the SD card on a wired network, or is it simply a case of taking it out of the Duet?
-
@nightowl999 said in What's the difference...:
How does one access the SD card on a wired network, or is it simply a case of taking it out of the Duet?
The simple case. My Mac has a card reader: just a quick copy onto SSD/HDD - that's it.
-
@nightowl999 said in What's the difference...:
How does one access the SD card on a wired network, or is it simply a case of taking it out of the Duet?
You can but there is a risk of damage - those little things are fragile and I have snapped more than one.
I use FTP which is part of the Windows file manager I use (Directory Opus) but I am looking at an editor that supports FTP. The learning curve may just be too steep as I know my current editor well.
You do have to include in the config.g the command to enable FTP.
M586 S1 P1 T0 ; enable (S1) FTP (P1) Disable TLS (T0)
Frederick
-
@fcwilt said in What's the difference...:
It will be best if reach the point where I do all my editing/creating in the Windows editor and just upload to the Duet.
Good solution, but I can't keep up with you - better said: with my single lonely printer, I still try to keep things simple so that DWC doesn't limit me too much … well, until now
-
@Nightowl999 Here is another use case where one might want to put macros in a .sys folder rather than in the macros folder. It's a bit complicated but then I have a rather complicated printer .
Essentially, I have multiple hot end configurations that I swap between (6 input mixing, 6 input multi-material, single input and dual input etc). I use M505 to change configurations which changes the path for .sys. Effectively, this gives me multiple .sys folders. I also have macros called "pre-print" and "post-print". These take care of everything that is needed to happen immediately before a print commences (i.e heat the bed, heat the hot end heater(s), home all, purge and wipe nozzle etc etc). So I simply turn on the printer, change the configuration path if necessary, select a file, hit print and come back a few hours later to retrieve the part. My slicer has just a single command in the start and end gcode sections which are M98 P"PrePrint.g" and M98 P"PostPrint" respectively.
Note that there is no path in that statement because the pre and post print macros reside in those sub folders of .sys not in the .macros folder. The reason is that "pre-print" and "post-print" do different things depending on which hot end I have the configuration set to (e.g. purging 6 tools would have undesirable consequences if only one tool is configured). So I have multiple copies of "pre-print" and "post-print" which have the same file names but exist in different locations and which do different things. Hence I never have to change the line in my slicer start gcode - it will always be M98 P "PrePrint.g" but it will point to a different file depending on the path set by M505.
If I put the pre and post print files in the macros folder, these would be common to all configurations. So I would need to have multiple files with different names (i.e. PrePrint6InputMixing, PrePrintSingleInput etc) and I would have to constantly edit the slicer start and end gcode to call the correct macro.
In summary, anything in ".sys" is common to a particular configuration but anything in "macros" is common across multiple configurations. In practice the vast majority of users will only have a single configuration so will never need to bother about it.
-
@deckingman said in What's the difference...:
In summary, anything in ".sys" is common to a particular configuration but anything in "macros" is common across multiple configurations.
That's a good way to put it!