Duet Web Control

From RepRap
Revision as of 21:00, 24 March 2016 by PRZ (talk | contribs) (Author: wording and precisions)
Jump to: navigation, search

The web interface

While Duet board could be handled with a command program on your PC communicating by USB with the board as traditional in 3D printing, a web server (Duet Web Control – DWC) exist on the Duet, is the choice of most users and a major asset of the RepRap firmware. A capable server integrated in the main printer board is now (March 2016) without equivalent [1]. Connecting via Ethernet allow communication with the web server to drive the printer. Installing an Ethernet Wi-Fi bridge will allow connection with any Wi-Fi enabled device having a browser. All printing is done after uploading G-code file on the board SD card, which benefits from the fast Ethernet communication of the Duet (up to 350~400 kb/sec with a good SD card).

Principle of operation

This web server, operated by program files located on the SD card in the www directory, is somewhat independent from the firmware stored on the board flash memory. First, the web server shall connect to the firmware, which is automatic while opening the web server, and could be forced with the button "Connect" if communication is lost (which occurs regularly). The server send commands to the board firmware and get information from answers to a small set of commands ( M408, M105, M20, M36) according to a specific protocol. The browser window layout adjustment is mainly automatic, based upon the printer configuration as reported by firmware.

It is now possible to display in the web interface an image transmitted by an IP camera using protocol ?

How does it looks

Main tab is : "Machine control" tab. Note that if the calibration button is not available, you will restore it with a "Zoom out" of the window.

Machine Control tab

While you could upload files to print in the "G-codes Files" tab, it is often wise for up-to-date files to use the first line button "upload and print". You can also drag and drop a file on this button.

Print Status tab opens automatically while the printing starts.

Print Status tab

There is three time estimates, based upon filament use, file progress and layer progress, with not very accurate values.

To send G-code or check calibration result, you will use the G-code console tab

G-code Console tab

View all user commands and the result of some server sent command (notably calibration)

To upload or execute G-code file, the G-code Files tab:

G-code Files tab

Files could be organised in directories

To configure the web server, the 'Settings' tab:

Settings tab, General sub-tab

Modify configuration or upload system files. There are sub tabs in this tab, which allow to check or update printer parameters and fine tune the web interface.


First start

If Netbios or mDNS names are recognized on your network (most network do), you can simply connect to the web server using the printer name as defined in the 'config.g' file. e.g. http://lily. Name is not case sensitive. Note that in the config.g file the first letter ‘P’ indicates a parameter and is not part of the name. See M550: Set name

Alternatively, you can connect to your printer with its IP address, e.g. http://192.168.1.14 . In that case, it is more practical to define a static IP address (and IP mask) in config.g file instead of relying on address attributed by DHCP server. See M552: Set IP address , M553: Set NetMask and M554: set Gateway.

Note that you could open multiple sessions of the web server and could operate from multiple computers operating a single printer.

Many printers can coexist in the same network, provided you define a specific MAC address for each printer (change the last digit for each printer). See M540: Set MAC Address. They can be operated from a unique browser session.

Languages

Default language is English, but other languages are available (in Settings tab): German, French, Spanish, Swedish and Chinese. New translation could be added while modifying the '/www/language.xml' file.

Configuration

In the "settings" tab, you could modify parameters. Configuration parameters are stored in the local storage of your browser and the cookies shall be activated. If you clean up regularly your browser data for safety, you shall modify the variable "settings" in file "/www/js/model.js" to set permanent modifications. This file replace the former "interface.js" file which was splitted in "model.js" (configuration) and "viewmodel.js" (execution) from DWC version 1.08. Updating this file is done like updating the config.g file

Note that the web server use a password defined in the file "/www/js/model.js", which shall be the same as the one defined in the config.g (default password: RepRap). A modified password is needed if your network is connected to wifi. See M551: set password.

Special configuration

  • The graph scale max temperature is defined in the "www/js/viewmodel.js" file, variable "tempChartOptions" "yaxis" "max" which may be increased if you use temperatures over 250°C
  • The minimum manual displacement of the head (for calibration) is defined in file "www/js/model.js" in variable "increaseVal". For finer calibration, you may reduced it to e.g. 0.025, however all other Z displacement will be scaled by multiples of 10 of your minimal value.
  • You can change the color of Z sensor trigger field for better noticeability in file "www/js/viewmodel.js" in the variable "probeTriggerColor", which may be set to another more visible color, e.g. "#FF4500"
  • If you have multiple printers, it is quite easy to confuse control panels of each printer, so you can distinguish your printers while giving them a different background color in the file "www/css/default.css", you may add a background color in the "body" class e.g. "background-color:#e6f8e0;" This modify the panel color and not the header or sidebar color.

Author

Christian Hammacher (Chrishamm) write and maintain the present web server on GitHub. It also maintain own fork of the RepRap firmware, as the web server improvement may need new firmware functions or modifications. Chrishamm fork is itself a fork of DC42 firmware fork and they have frequent exchanges and are very similar. Chrishamm also added useful functions on the RepRap firmware, notably recently the capability to do firmware update from the web interface (see M997:Perform in-application firmware update).

References

  1. There is a web server on the Smoothieboard, but with limited capabilities. The low speed of the Smoothie Ethernet link will also limit usability.