Skip to main content

Site Navigation

Your Account

Choose Language

Help

Revision to Duet 2 Maestro 12864 display menu system

David Crocker

== Menu files ==
 
Folder '''/menu''' of the micro SD card installed in the Duet Maestro is usedtoused to hold menu files. Each file in '''/menu''' defines one page on the display. There must be a file called '''main '''in '''/menu''', which is the initial file loaded at startupstartup.
Folder '''/menu''' of the micro SD card installed in the Duet Maestro is usedtoused to hold menu files. Each file in '''/menu''' defines one page on the display. There must be a file called '''main '''in '''/menu''', which is the initial file loaded at startupstartup.
 
Generally, each line inYou can create and edit menu files within Duet web Control version 1.22.1 and later. If the /menu folder doesn't exist on the SD card, it will be created when you use the New File button to create a menu file describes one display elementfile.
Generally, each line inYou can create and edit menu files within Duet web Control version 1.22.1 and later. If the /menu folder doesn't exist on the SD card, it will be created when you use the New File button to create a menu file describes one display elementfile.
 
Each elementGenerally, each line in a menu file describes one display element. Each line has the following syntax:
Each elementGenerally, each line in a menu file describes one display element. Each line has the following syntax:
 
''command parameter1 parameter2 parameter3 ...''
* R is the row number for the top of the display element, in pixels counting down from the top of the display, with R0 being the top row. The default is the same row as used for the previous element. The default at the start of the file is 0.
* C is the column number for the left hand edge of the display element, in pixels counting from the left, with C0 being the leftmost column. The default is one pixel after the previous element ends. The default at the start of the file is 0.
* GA is the name of a commandan action to execute, either a Gcode command or a menu commandexecute (see later)
* GA is the name of a commandan action to execute, either a Gcode command or a menu commandexecute (see later)
* F is a font to select. There are currently two fonts, 0 (small, the default) and 1.
* D is a number of decimal places to show when displaying numbers. If zero (which is the default), no decimal point is shown.
* T is text to be displayed
* L is a menu or image filename to be used
 
The following commands will be supported:
|--
| image
| Rnn Cnn P"filename" [X"command"][Rnn] [Cnn] [Fnn] L"filename"
| Display the bitmap image read from the specified file. If a command is provided, allow the image to be selected and run the specified command if it is clicked.
| Rnn Cnn P"filename" [X"command"][Rnn] [Cnn] [Fnn] L"filename"
| Display the bitmap image read from the specified file. If a command is provided, allow the image to be selected and run the specified command if it is clicked.
|--
| text
| Rnn Cnn[Rnn] [Cnn] [Fnn] P"text" [X"command"]T"text"
| Display the specified text using the specified font. If a command is provided, allow the image to be selected and run the specified command if it is clicked.
| Rnn Cnn[Rnn] [Cnn] [Fnn] P"text" [X"command"]T"text"
| Display the specified text using the specified font. If a command is provided, allow the image to be selected and run the specified command if it is clicked.
|--
| numberbutton
| Rnn Cnn[Rnn] [Cnn] [Fnn] [Dnn] P"identifier"T"text" [Vnn] A"action" [L"filename"]
| Display selectable text using the specified value infont. If the specified font totext is clicked then execute the specified number of decimal placesaction. Some actions require a filename.
| numberbutton
| Rnn Cnn[Rnn] [Cnn] [Fnn] [Dnn] P"identifier"T"text" [Vnn] A"action" [L"filename"]
| Display selectable text using the specified value infont. If the specified font totext is clicked then execute the specified number of decimal placesaction. Some actions require a filename.
|--
| adjustvalue
| Rnn Cnn[Rnn] [Cnn] [Fnn] [Dnn] [Snn] P"identifier"Wnn] Nvv
| Display the specified value inwith the specified fontwidth to the specified number of decimal places and allow it to be adjusted in steps of nn (default 1)
| adjustvalue
| Rnn Cnn[Rnn] [Cnn] [Fnn] [Dnn] [Snn] P"identifier"Wnn] Nvv
| Display the specified value inwith the specified fontwidth to the specified number of decimal places and allow it to be adjusted in steps of nn (default 1)
|--
| pageadjust
| Rnn Cnn[Rnn] [Cnn] [Fnn] P"pagename"[Dnn] [Wnn] Nvv
| Display a link to the specified menu and allow it to be selected. "pagename" is bothvalue with the textspecified width to display and the filename.
|--
| macro
| P"name" [S"file"]
| Show
the specified macronumber of decimal places and allow it to be selected and run. If the S parameter is missing it defaults to /macros/<name>.
|--
| cd
| P"folder"
| Set current directory to specified folder
|--
| execute
| P"command-string"
| Execute the specified command string
|--
| popup
| Hnn Wnn P"file"
|
altered
| pageadjust
| Rnn Cnn[Rnn] [Cnn] [Fnn] P"pagename"[Dnn] [Wnn] Nvv
| Display a link to the specified menu and allow it to be selected. "pagename" is bothvalue with the textspecified width to display and the filename.
|--
| macro
| P"name" [S"file"]
| Show
the specified macronumber of decimal places and allow it to be selected and run. If the S parameter is missing it defaults to /macros/<name>.
|--
| cd
| P"folder"
| Set current directory to specified folder
|--
| execute
| P"command-string"
| Execute the specified command string
|--
| popup
| Hnn Wnn P"file"
|
altered
|--
| files
| Rnn Cnn Hnn Fnn[Rnn] [Fnn] Nnn I"initial-directory"
| Display a list of files N files high and allow one of the files to be selectedselected. The list uses the full width of the display.
| Rnn Cnn Hnn Fnn[Rnn] [Fnn] Nnn I"initial-directory"
| Display a list of files N files high and allow one of the files to be selectedselected. The list uses the full width of the display.
}
 
An action string ('A' parameter) can be any of:
 
* A Gcode command string (must begin with G, M or T). In such a string, #0 represents the full name of the current file, in double quotes. When executing the 'files' command, this is the file selected by the user. When executing the 'button' command, this is copied from the L parameter.
* 'menu' chains to the menu file given in the L parameter
* 'return' returns to the parent menu
 
Multiple actions can be specified, separated by the vertical-bar character, e.g. "M32 #0|return|return" but 'menu' if present may only be the last command.
 
The V parameter in the 'button' command specifies the button's visibility with value:
 
* 0 always visible (default)
* 2 visible when the printer is actively printing (actively printing defined as not paused, pausing or resuming)
* 3 visible when the printer is NOT actively printing
* 4 visible when the printer is printing (includes paused, pausing and resuming states)
* 5 visible when the printer is NOT printing
* 6 visible when the printer is printing and in paused state (paused or pausing)
* 7 visible when the printer is printing and NOT in paused state (actively printing or resuming)
* 10 visible when SD card 0 is mounted
* 11 visible when SD card 0 is NOT mounted
* 20 visible when the current or default tool has a temperature fault
* 28 visible when the bed heater has a temperature fault
 
The N parameter in the "value" and "alter" commands specifies the value to display or change as follows:
 
* 000-078 Tool N first heater current temperature e.g. 0 = tool 0 current temperature (display only)
* 079 Currently selected tool first heater current temperature (display only)
* 080-089 Bed heater (N-80) current temperature e.g. 80 = bed heater 0 current temperature (display only)
* 090-099 Chamber heater (N-90) current temperature e.g. 90 = chamber heater 0 current temperature (display only)
* 100-178 Tool (N-100) first heater active temperature e.g. 100 = tool 0 active temperature
* 179 Currently selected tool first heater active temperature
* 180-189 Bed heater (N-180) active temperature e.g. 180 = bed heater 0 active temperature
* 190-199 Chamber heater (N-190) active temperature e.g. 190 = chamber heater 0 active temperature
* 200-278 Tool (N-200) first heater standby temperature e.g. 200 = tool 0 standby temperature
* 279 Currently selected tool first heater standby temperature
* 280-289 Bed heater (N-280) standby temperature e.g. 280 = bed heater 0 standby temperature
* 290-299 Chamber heater (N-290) standby temperature e.g. 290 = chamber heater 0 standby temperature
* 300-398 Fan (N-300) percent full PWM e.g. 302 = fan 2 percent
* 399 Current tool fan percent full PWM
* 400-499 Extruder (N-400) extrusion factor
* 500 Speed factor
* 510-516 Current axis location (X, Y, Z, E0, E1, E2, E3 respectively) (display only)
* 519 Z baby-step offset (display only)
* 520 Currently selected tool number
* 530-533 Actual IP address, octets 1 through 4
 
=== Example menu files ===
 
[code]
text R0 C0 F1 P"MyT"My Super 3D Printer "
image P”reprapimg.bin”
macro R40
L"reprapimg.bin"
text R15
C0 P"PreheatF0 T"Bed temp "
alter N180 W30
text T" actual "
value N80 W30
button R27 C0 T"Preheat
PLA"
macro R60
A"M98 P#0" L"/macros/Preheat PLA"
button R39
C0 P"PreheatT"Preheat ABS" A"M98 P#0" L"/macros/Preheat ABS"
menu R80

button R51
C0 P"SelectT"Select file to print" A"menu" L"listFiles"
text R0 C0 F1 P"MyT"My Super 3D Printer "
image P”reprapimg.bin”
macro R40
L"reprapimg.bin"
text R15
C0 P"PreheatF0 T"Bed temp "
alter N180 W30
text T" actual "
value N80 W30
button R27 C0 T"Preheat
PLA"
macro R60
A"M98 P#0" L"/macros/Preheat PLA"
button R39
C0 P"PreheatT"Preheat ABS" A"M98 P#0" L"/macros/Preheat ABS"
menu R80

button R51
C0 P"SelectT"Select file to print" A"menu" L"listFiles"
[/code]
 
File "Select file to printlistFiles"
File "Select file to printlistFiles"
 
[code]
text R0 C0 F0 "Select file"
cd P"/gcodes
T"Select file to print "
button T"Back" A"return
"
files R20 C0 H100 A2
popup P"filepopup" S"#0"
cd P"#0
R15 N4 I"/gcodes" A"M32 #0|return"
text R0 C0 F0 "Select file"
cd P"/gcodes
T"Select file to print "
button T"Back" A"return
"
files R20 C0 H100 A2
popup P"filepopup" S"#0"
cd P"#0
R15 N4 I"/gcodes" A"M32 #0|return"
[/code]
 
File "filepopup":
 
[code]text R0 C0 "File " "#1"[/code]

To undo the changes made by this version, click 'Revert Changes.' This will automatically restore the previous version of this guide.

Revert Changes