We know creating your first working config file can be frustrating. We are continuously trying to to make it easier. We want the errors messages to be more helpful. We are also looking into a web based editor and validator. Your feedback is helpful. If you you have anything you think would help our documentation, please let us know.
You should edit with a fixed width font, so you can see the alignment. It helps to have an editor that color codes the config file. Some even allow you to collapse levels. Here are some editors that are good.
If you have problems look for [MSG ERR...] type statements in the startup messages.
Some errors may cause a crash or reboot. Look for the messages before the crash.
When loading config files all errors and warnings are sent to the serial port. They cannot be sent via WiFi or Bluetooth because the error are happening before those networks are setup or connected.
If you get a message like this (filename may be different)...
[MSG:WARN: Cannot open configuration file: config.yaml]
This is the default name for the config file. A file named
config.yaml is not installed with the install scripts. Default values in memory are used until a config file is loaded. You must load your own config file. Here are some troubleshooting tips if you think you did load a config file.
$Config/Filename=<yourfile>to your filename.
You can change the message reporting level. The default is "Info" if you change it to "Debug" with $Message/Level=Debug, you will see a lot more messages. These are not errors, but could give some help to what might be causing the problem. Note: There will be hundreds of them.
[MSG:DBG: Setting up pin gpio.25:high] [MSG:DBG: Attempting to set up pin: gpio index 25] [MSG:DBG: Setting up pin gpio.35:low] [MSG:DBG: Attempting to set up pin: gpio index 35]
item: value group: item: value group: item0: value item1: value
The hierarchy of the config file represents the hierarchy of the machine. There items or groups of items. Each group may consist of several items and sub groups. This is designated by indenting. Items indented under a group name belong to that group. If the indenting is wrong, the items will not be applied to the right group. When you see errors or warnings about indenting fix them in the order they appear in the startup messages. If an error occurs near the beginning it can cause a lot of problems later because a large part of the hierarchy can be broken with a single problem.
Only use spaces to indent. Do not use tabs.
If you see something like this in your startup messages.
[MSG:ERR: Skipping key motor0 indent 5 this Indent 4]
This is telling you that there is a key
motor0 at indent 5 and the current indent is 4. Look at all the
motor0 keys for one at indent 5 (5 spaces). It is likely at the wrong indent level.
If you see ignored keys there could be several reasons. This can happen for a misspelled key. A common is reason is the key is not valid where it was found. This could be do to an indentation problem or it is under the wrong group.
[MSG:ERR: Ignored key badkey] [MSG:ERR: Ignored key pulloff_mm]
If you get a message like this...
[MSG:WARN: frequency_hz value 0 constrained to range (1000000,20000000)]
It means that the value you have for the config item is not in the valid numeric range for that config item. In this case the range is 1000000 to 20000000 and you have 0. If you show the current config with
$CD is will show a value of 1000000. Update your config file to get rid of this message.
Use the $localfs/Show=<filename> command to view the file. The name of the file being used for the config is shown in the startup messages. You can also get it with the $Config/Filename command.
You can also see the current config with the $Config/Dump command. This will probably look a little different from the file. It dumps the config items in the order it stores them internally and it may show some default config items/values of items not in your file.
Each pin can only be used once. Search for the pin in the file.
If the problem is really bad, the firmware will load a default config. This cannot be used to control your machine, but you should still be able to see the networking and WebUI to help you fix the problems.
If critical errors occur when processing the config file, FluidNC will force a restart and fall back to a rudimentary "safe" configuration so you
can interact with the system to fix problems. Note: Other bugs, etc, that cause a restart could accidentally trigger Fluid to load a safe configuration.
Critical errors typically occur if you have a correct key, but the value of that key is not valid.
Look at the data on the serial port for clues to what happened.
[MSG:ERR: Configuration parse error: Expected a float value like 123.456 @ 1:8 near : 1.000foo] Guru Meditation Error: Core 1 panic'ed (LoadProhibited). Exception was unhandled. Core 1 register dump: PC : 0x400f710c PS : 0x00060f30 A0 : 0x800da284 A1 : 0x3ffb1f20 A2 : 0x3ffc1a64 A3 : 0x3f4044f0 A4 : 0x3ffb30f4 A5 : 0x00000000 ...
This shows that a float value was expected, but it read 1.000foo. Look for that value in your config file and fix it. Trailing spaces can also cause errors.
Be sure to look at the rest of the startup messages, well above the crash point. You may see some [MSG:ERR...] messages about other things that could be contributing to the crash. There can also be errors in your config file that do not force a reset, but must be fixed before you can use the affected feature.