GithubHelp home page GithubHelp logo

3dprinterinterface's People

Contributors

nneves avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

3dprinterinterface's Issues

Printing .gcode files that contain inline comments will hang printer

If .gcode file contains inline comments the printer will not respond and process will not continue.

demo:

M104 S200 ; wait for temperature to be reached
G28 ; home all axes
G90 ; use absolute coordinates
G21 ; set units to millimeters
G92 E0 ; reset extrusion distance
M82 ; use absolute distances for extrusion
G1 Z0.200 F7800.000 ; move to next layer

Need to implement a new functionality to get data from Printer via Serial Port

At the moment there is no way to get the printer (serial port) data response from the node.js application directly into the client (browser) due to the initial necessity to make te all process quick and asynchronous. Every client request is done via XHR and node.js will respond with an 'ACK' (updated to {"result": true} for every request, independently if printer communicaties or not! (response is related to the http request and not to async serial port communication)

It is required to pass some of the printer serial port data back to the client:

  • fetch data from a controller board (Ultimaker UltiController to list SD card filenames)
  • get board info (firmware version)
  • fetch temperature info.

Switching between relative and absolute position while streaming data from .gcode file and sending manual commands

When starting to print from a .gcode file, normally the printer gets set to use absolute position for the XYZ movements (G90) but when sending manual GCODE commands from the UI/front-end WebApp it is expected to use relative movement (G91) to avoid caching of the printer XYZ coords.

Possible solution1: Start caching the printer XYZ coords or request this data before making the initial absolute movement (whenever user switches from print from .gcode file to UI printer manual control)

Possibel solution2: Printer gets initialised with G91, every time the user requests to print .gcode file, the prior UI printer manual control command requires to send a mandatory G91 code. If parallel commands are allowed when printing from .gcode file, then this will raise and additional problem of switching from relative to absolute position (don't think that manual movement gcode commands will be allowed while printing from file - may ruin the printing job)

Adjust WebSocket functionality to use ./config/*.json data

Current WebSocket functionality (socket.io) was set in code with fixed values ([rest.js] ipaddress and tcpport), hooked to the REST API interface (harcoded values).

  • Create a REST node to retrieve the WS config data:
    http://127.0.0.1:9080/api/getwsconfig/

    {"response":{"ipaddress":"192.168.1.109","tcpport":9081,"websockets":true}}
    .

  • Adjust UI javascript code to only use WS if the config property "websockets" is set to TRUE, if not WS should not be initialized and /public/socket.io/socket.io.js should return a blank file instead of the dynamic version provided by the socket.io node module.

Add REST endpoints to support synchronized requests

Current available REST endpoint only support async requests and would response with a {"response": "ok"}; message without waiting for the printer response (ack from the rest app and not from the printer), data was then fetched from socket.io channel.

Getting this a bit more cleaned, REST should have async ans sync endpoint versions, where the sync should only respond to request after the printer response has been triggered (using a callback queue for that effect).

Read configurations from ./config files

Remove old un-finished ./config/*.json configuration files and implement a new functionality based on node-config module: https://npmjs.org/package/config

  • Configuration file will contain all required settings for all modules
  • Load config file from app.js and propagate the info from modules initialization function (only 1st module loads the data from file)
  • Create 3 sets of config files for each system:
  • default.json: to run with /dev/null (printer basic emulation)
  • linux.json (set to /dev/ttyACM0 - to be used with rPi)
  • macosx.json (to test on laptop over /dev/tty.usbmodem621)

When launching webapp 'node app.js' it will run with the default.json config file.
To set an alternative just type:

$ export NODE_ENV=linux
$ node app.js

or

$ export NODE_ENV=macosx
$ node app.js

To create your own config file just clone the default.json, rename it to a specific NAME and then export that name before launching app.js.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.