-
Notifications
You must be signed in to change notification settings - Fork 9
G code
In this page we give a summary of new and existing g-code commands and commands relevant to the development of custom heads.
- M563: Define tool configuration
- M575: Set serial communication parameters
- M790: Send text to head
- M793: Read or set the installed head id
This command let you define different configurations for the peripherals available on the FABtotum.
Parameters
-
PnnnTool configuration number (Only0is supported and accepted at the moment) -
SnnnEnable (1) or disable (0) serial communication
Output
- When a configuration is given, a ok is returned for confirmation.
- When no configuration is given the current configurations are returned.
Each configuration defines a logical tool. A tool configuration can
be activated issuing a Tnnn command. Installing a factory head
through FAB-UI automatically configures the FABtotum for that head,
possibly overriding any manual setup.
Serial communication parameters can be configured separately for each serial interface available with the command M575. Toolheads are linked to communication interface 4.
This command let you set communication parameters for one of the communication interfaces available on the FABtotum.
Parameters
-
PnnnInterface number -
RnnnSet receiving pin number on TOTUMduino -
TnnnSet trasmitting pin number on TOTUMduino -
BnnnSet interface baud rate
Output
- ok for confirmation
Interface indexes 0-3 are reserved. Interface 4 is linked to the toolhead.
This command can either send a single line of text to the head, or activate a text forwarding mode.
Parameters
-
PnnnThe interface number -
"..."String of text to send
Output
- Any output read from the interface
Parameter P selects the communication interface where to send the
text. Interface number for heads is 4.
When a string enclosed in double quotes is specified, the content of the string are sent on the selected interface. Double quotes inside the string cannot be neither identified nor escaped, so the string must not contain any instance of double quotes.
If no string is given, the firmware enters in relay mode wherein any subsequent line of text received on input is sent as-is the the head. To exit from relay-mode the user must send a line containing only a dot.
Whatever the mode, any output read from the head (interface 4) is repeated on the main serial interface.
With this command you manually set the ID for the installed head, or read its current value.
Parameters
-
SnnnSet installed head ID
Ouput
- The presently or newly set id
IDs from 0 to 99 are reserved. IDs from 100 upwards are free to use for third-party and custom applications.
Warning: the manually set value is overridden by FAB-UI when rebooting the machine or after resetting the controller.