Giter Site home page Giter Site logo

webcontrol's Introduction

layout title nav_order description wcversion tags
default
Home
1
Help pages for WebControl
0.915.001
web-control

WebControl

The official tool for Maslow CNC; control your Maslow with any web browser.

  • Browser-based, multi-platform controller software.
  • Connects to Maslow's Arduino Mega (or similar) via USB.
  • Includes setup instructions (updated from Maslow Community Garden).
  • Runs gcode (.nc files) for printing cuts.

You can report issues to the volunteer team.

Context

WebControl started as a browser-based port of the original GroundControl application, but has grown to support more features:

  • The calibration and setup process is better documented and easier to use.
  • It implements a flask+socketio web server, so other computers on the network may control the machine.
  • It can be run on a low-cost device, like a Raspberry Pi.
  • It can also support multiple custom firmwares developed by the community which enhance the Maslow.

At this point, WebControl has become the de-facto beginner's tool for Maslow.

Screenshot

Installation

Pre-Built Raspberry Pi Image

See the dedicated repository.

Raspberry Pi

Replace the version number with the latest release...

cd ~
mkdir webcontrol
cd webcontrol
wget https://github.com/WebControlCNC/WebControl/releases/download/v0.920/webcontrol-0.920-rpi-singledirectory.tar.gz
tar -zxvf webcontrol-0.920-rpi-singledirectory.tar.gz

Linux (Debian)

Replace the version number with the latest release...

cd ~</br>
mkdir webcontrol
cd webcontrol
wget https://github.com/WebControlCNC/WebControl/releases/download/v0.920/webcontrol-0.920-linux-singledirectory.tar.gz
tar -zxvf webcontrol-0.920-linux-singledirectory.tar.gz

Linux Autostart (systemd)

To run WebControl automatically on startup for a Linux-based machine, it is recommended to create a service:

nano webcontrol.service

type the following:

[Unit]
Description=WebControl
After=network.target

[Service]
ExecStart=/home/pi/webcontrol/webcontrol
WorkingDirectory=/home/pi/webcontrol
StandardOutput=inherit
StandardError=inherit
Restart=always
User=pi

[Install]
WantedBy=multi-user.target

Save file using Ctrl-X/Yes

sudo cp webcontrol.service /etc/systemd/system

Test with the following:

sudo systemctl start webcontrol.service

Try to reach webcontrol using your browser.

To debug, try:

sudo systemctl status webcontrol

Or, to. get logs:

journalctl -xe

When it works, then type:

sudo systemctl enable webcontrol.service

see for more details: https://www.raspberrypi.org/documentation/linux/usage/systemd.md

Docker & Kubernetes

  • Pull the docker image from inzania/web-control using the armv7 or amd64 tag.
  • Mount a data/config volume at /root/.WebControl
  • Expose port 5000
  • Run with privileged: true security context for USB access.

Remote Access

WebControl can be run behind a front-proxy with TLS termination, such as nginx. You can use this in conjunction with semi-static IP to access your Maslow from anywhere with internet access. The full scope of this is outside this documentation, so you should be sure you understand the security implications before proceeding (hint: WebControl doesn't have a login or user authentication system).

Usage

Open your web browser to localhost:5000 (or use the IP address of your device).

Built With

  • Flask - The web framework used
  • Flask-Socketio - Websocket integration for communications with browser clients
  • Bootstrap4 - Front-end component library
  • Jinja2 - Template engine for web page generation
  • Feather.js - Only icon library I could find that had diagonal arrows.. works well to boot.
  • OpenCV - Library for computer vision to implement optical calibration
  • Numpy - Library for math routines used with optical calibration
  • Scipy - Another library for math routines used with optical calibration
  • Imutils - Adrian Rosebrock's library used with optical calibration
  • Schedule - Library used to schedule checking connection with arduino
  • Ground Control - Much of this was adapted from the Kivy-based Ground Control

Developing

Python Virtual Environment

There are several ways to set up a Python virtual environment (sometimes shown as 'virtualenv' or just 'venv'). Python itself can do this with the command python -m venv venv to create a virtual environment called venv. However, it's quite common to work with multiple versions of Python itself, so having a tool that can manage multiple Python versions and virtual environments is really helpful.

To manage multiple python versions and virtual environments get pyenv (or pyenv-win for Windows)

Here's a well-written walkthrough of setting up your system (macOS, Ubuntu/Debian, Fedora/CentOS/RHEL, Windows) for pyenv and then using pyenv to set up your virtual environment.

Once you've prepared your system and installed pyenv

  • get the latest version of Python that we know works with WebControl, currently that's 3.9.13: pyenv install 3.9.13
  • create a virtual environment with it: pyenv virtualenv 3.9.13 webcontrol_3_9 The webcontrol_3_9 name is arbitrary
  • activate the virtual environment - this will help isolate what you do from the rest of your system: pyenv activate webcontrol_3_9

Prepare the Virtual Environment itself

This next stuff should only need to be done once in your virtual environment.

  • install some useful tools pip install setuptools pip install pip-tools pip install black
  • rebuild the list of requirements needed by WebControl (optional) rm requirements.txt pip-compile -r requirements.in --resolver=backtracking --verbose
  • install the requirements pip install -r requirements.txt

And that's the virtual environment creation and set up done. From now on you'll only need to activate the virtual environment after any restart to get going.

Virtualenv on a Raspberry Pi

When running on the Pi, you'll also need some extra dependencies and will need to build OpenCV from source. See the Dockerfile for details. (TODO: add instructions here)

Now What? Let's Start Up WebControl🎉

Then you can run the code with.

python main.py

The server will then be available at http://localhost:5000

  • If you get an error message with something like ModuleNotFoundError: No module named '_ctypes' within it. Then it means that you didn't get your system properly prepared before creating your virtual environment (looking at you Ubuntu). Please follow the walkthrough linked above to:
  1. deactivate your virtual environment,
  2. delete it,
  3. prepare your system,
  4. recreate your virtual environment.

Automatic code formatting

This project uses black to automatically format python code. To run the autoformatter, simply install black locally with pip.

pip install black

Subsequently, you can just run black . to format all files in the current directory.

black .

If you don't have python3.6+ locally (to be able to run black), you can run black in a Docker container.

docker run -v $(pwd):/code johnboiles/python-black .

IDE

PyCharm

Pycharm Community Edition is a free, well-featured Python IDE.

With the File Watchers and BlackPycharm plugins you can set up your editor to automatically format your code on save. Then you never have to think about code formatting again 🎉

VSCode

Visual Studio Code is a free IDE with awesome support for Python (and every other language you can think of). And yes, you can install it on a Raspberry Pi.

Once it picks up that you're working with Python it will advise on extensions that are available to help you get the best out of it, including Python, PyLance, Black, ... Plus built-in support for GitHub, extensions for Docker, Linux under Windows (WSL), and so much more

Contributing

Please read CONTRIBUTING.md for details on our code of conduct, and the process for submitting pull requests to us.

Versioning

Added to TODO list?

With Thanks

See also the list of contributors who participated in this project.

License

See LICENSE

webcontrol's People

Contributors

dangerdespain avatar dependabot[bot] avatar emilecantin avatar gb0101010101 avatar hackmd-deploy avatar invncibiltycloak avatar johnboiles avatar madgrizzle avatar md8n avatar orob-maslow avatar rolambert avatar shepelt avatar zaneclaes avatar

Stargazers

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

Watchers

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

webcontrol's Issues

Add GPIOs for functionality

Make a new settings page to configure GPIOs on the RPi for the following functions:

  1. HIGH/LOW on WebMCP running/not running
  2. HIGH/LOW on WebControl running/not running
  3. digitalRead to initiate soft shutdown
  4. digitalRead to send ‘stop’ message to controller
  5. digitalRead to send ‘pause’ message to controller
  6. digitalRead to send ‘home’ message to controller

add ability to handle small values

if you have a value like 0.000005 it will become 5e-6 and the firmware will choke on it.

this is one of the things holey calibration added, look there for example code

defaultWebControl.json changes are not loaded

Went to fix the Setting -> Maslow settings -> Z-axis Installed title text and found it defined in the defaultWebControl.json file. Problem is that the code comparison in config.py only compares the setting "Key" index and value, to make sure the setting exists, but does not compare anything else. So the "Title" index and value is ignored and the ~/.Webcontrol/WebControl.json file is not overwritten with changes. The WebControl.json has to be deleted for changes to take effect right now.

Before I take the time to fix this I wanted to confirm the way it should work.

I assume that basically only the Setting "Value" indexes should be kept from the current user configuration? If anything else changes then it should be loaded from defaultWebControl.json file and overwrite.

The other question is what happens if a Setting is removed or replaced by one with a different "Key" value. Should the old Setting be kept? Should this kind of update be dealt with manually in code per case or establish a default rule (keep/discard)?

Rather then comparing every index and value I though it might be easier/better to strip out the "Value" indexes from both, in new temp comparison copies, and then do a simple == comparison.

If they are not equal then copy the "Value" indexes from the current config (if they exist in both) and overwrite the WebControl.json file.

Does that seem good?

Fool WebControl into thinking Maslow control board is present [Question]

I predominately write code at location A when MaslowCNC is at location B. This causes a problem because the location A RaspberryPi is not connected to the location B Maslow board. Is there a way to fool WebControl into thinking that the Maslow board is present and responding for development?

WebControl app for MacOS

I've come up with a process to build an app version of WebControl for MacOS. It uses a modified version of main.spec for pyinstaller.

The main issue to overcome was that the app built by pyinstaller for MacOS doesn't open a terminal window the way the Windows version does. That seems to be unavoidable. The app that pyinstaller builds runs properly in the background, but the user can lose track of whether it is running and fire it up a second time and that can leave port 5000 locked, or leave the app in an unresponsive state where 'force quit' or kill don't help. At that point, a power-switch reset is the only solution I found...

The workaround I came up with uses pyinstaller to package a version of the webcontrol backgrounder executable then uses platypus to create a wrapper around that. The wrapper checks for any instance of the backgrounder already running and kills that before re-running it. It also puts up an alert window of its own and suggests that the user keep that window open to mark that WebControl is running. The fact that the window is open also puts an icon onto the Dock, a further reminder. If that window is closed, the backgrounder remains running and WebControl continues to work, and re-running the app avoids the issue above.

I haven't seen an icon for WebControl, so I the Maslow 'M' turned upside down for a 'W':

webcontrol-icon-inch

The sled hits the bottom support beams during the Holey calibration

Hi, during the Holey calibration my sled hits the bottom support beams (on the photo below). I measured and entered correct values in Quick Configure. Has anyone had this issue before? If so, how did you fix it? Should I just manually change the vertical motor offset to make it work?

IMG_5371

webcontrol-0.921-win64-singlefile Doesn't Open

I downloaded and unzipped webcontrol-0.921-win64-singlefile.zip

I double click on webcontrol.exe

The command prompt window opens, some text flashes by and the window closes. I tried running as adminstrator. Same result.

webcontrol-0.920-win64-singlefile.zip Opens fine with no problems.

I tried webcontrol-0.921-win64-singledirectory.zip.

Nothing happened initially, so I logged out and back in again.

Same result. The command prompt window opens and is blank for a while. Then some text flashes by and it closes.

Bundle Test

I am super excited about the windows bundled version of Web Ground Control. Phenomenal. I had no issues at all starting up the bundle on my computer (Windows 10 ), but once the program was launched it wasn't clear to me how to visit the generated webpage. Would it be possible to add a shortcut in the folder, or even better spawn the browser automatically when the program launches?

report if saved values differ from what webcontrol expects

see holey calibration GC for examples. It pulls all values from the firmware and alerts if they differ from what GC has configured (asking you which version to keep)

currently webcontrol sets some, but not all values (if I manage the firmware with holey GC, then webcontrol, then holey GC I get warnings on some values, but not all, but the cuts end up different for the same g-code)

WebControl G2 Z axis rendering issues

I'm not certain where the error is, but it can be seen by comparing the way that WebControl renders this code:

G20 G90
G0 X0 Y0 Z0
G2 X.0 Y0.001 Z-0.25 I-1.0 J0.0 F100
G2 X.0 Y0.001 Z-0.50 I-1.0 J0.0 F100
G2 X.0 Y0.001 Z-0.75 I-1.0 J0.0 F100
G0 X0 Y0
G3 X.0 Y0.001 Z-0.50 I1.0 J0.0 F100
G3 X.0 Y0.001 Z-0.25 I1.0 J0.0 F100
G3 X.0 Y0.001 Z00.00 I1.0 J0.0 F100
G0 X0 Y0 Z0
M2

screen shot 2018-11-24 at 2 36 17 pm

to the way it is rendered by this gcode renderer
screen shot 2018-11-24 at 2 31 17 pm

Submit and Close button not on screen for "low" resolution screens

If you have a low resolution screen, or using browser in a shortened window, the submit and close buttons are not shown on the screen unless you scroll down on the main screen. The intent is to make a modal that fits within the screen so the submit and close buttons are always visible.

Long gcode lines cause right side bar to resize on PC

Accessing WebControl UI on Linux PC @ 1080P using Firefox 72.0.1. On my screen this makes the controllerMessage div about 410px wide which allows for ~ 33 characters in line length. When the gcode text line exceeds this it causes the div to resize continuously to fit the text. This in turn causes the whole Right Sidebar to resize continuously making it sometimes difficult to click buttons as they change position.

The simple fix is to add CSS that will make the gcode break at any point (including splitting words/numbers) and wrap it to a new line:
#controllerMessage { overflow-wrap: anywhere; }

This may not be an ideal solution as it may cause confusion reading the gcode but at least it stops the resizing problem and keeps all the gcode visible. It may be better to provide X overflow scrollbar which will retain proper formatting but only display part of the gcode.

Z in g code comment causes crash

I came across this weird issue, where Z in a comment causes WebControl to completely lockup. Ground Control works without issues. And I even tried a new SD card in the raspberry pi with a fresh install.

G code attached. This code was originally exported from Fusion 360 and it adds a comment about ( ZMIN = something).

circle test.txt

Cannot 'play' gcode file from specific line number when using 'Goto' input box.

I had an issue with cutting and decided to call it quits for the day so clicked the 'Stop' button. Next day I wanted to restart cutting from a specified section/line number of the same gcode file.

I tried:

  1. Load gcode file
  2. View/edit gcode file to find the section/line number I wanted to restart from
  3. Enter the line number into the 'GoTo' input box.
  4. Click 'Play' button top start cutting.

This did not work with the following happening:

  1. The Left/Right motors made a continuous noise as if they were moving but there was no apparent movement or it was so small that I could not notice it.
  2. Clicking on 'Pause' button had no effect with continued motor noise and not movement but did display 'Resume' button.
  3. Clicking on 'Resume' button had no effect on motor noise and still no movement.
  4. Clicking on 'Stop' did stop motor noise.

To get it to work I did the following:
My gcode is from Fusion 360 using Maslow Post Processor. This by default includes a tool change after initial setup lines.

  1. Load file.
  2. Click 'Play' button.
  3. Tool change requested automatically.
  4. Find section/line number and enter it in GoTo input box.
  5. Click 'Resume' button.

defineHome in actions.py needs default values of "" specified for posX and posY

I found one issue with the actions.py file

self.data.actions.defineHome()

TypeError: defineHome() missing 2 required positional arguments: 'posX' and 'posY'

(Line # 296 should be changed from)

def defineHome(self, posX, posY):

to

def defineHome(self, posX = "", posY = ""):

Without the default value of nothing, calling defineHome with no posX or posY values fails because a value is required. According to the comments, the function should use the current sled position if one isn't specified, but only if there is a default value, now "" with the modified line above.

Can't select port until groundcontrol.ini is imported

There have been reports that you can't do anything (e.g., select port for controller) unless you import your groundcontrol.ini file. I have been unable to duplicate this issue to date.

If you have a clean install (first time running) and you go to Settings->Maslow Settings, the port entry should be blank. If you press the refresh button to the right of the port entry, it will query all of the serial ports and then populate the ones that exist. In Windows, it uses the serial.tools.list_ports.comports() command, for linux/cygwin it uses glob.glob("/dev/tty[A-Za-z]"), and for MacOS it uses glob.glob("/dev/tty."). This process is the same that is used in ground control.

I know that it some times takes time to populate the ports on the screen (especially if there is a bluetooth port) and there is no "busy" indicator.

WC hangs during startup

I noticed tonight that something recent has broken the master branch. After running pyinstaller on it, when it runs I get the following error in the terminal:

... Note: earlier startup lines removed ...
Sent Board Cut Data compressed
Exception in thread Thread-2:
Traceback (most recent call last):
  File "threading.py", line 926, in _bootstrap_inner
  File "site-packages/gevent/threading.py", line 177, in run
  File "threading.py", line 870, in run
  File "Background/messageProcessor.py", line 22, in start
  File "HelpManager/helpManager.py", line 21, in checkForUpdatedHelp
  File "HelpManager/helpManager.py", line 28, in getHelpPages
  File "site-packages/github/Repository.py", line 1514, in get_contents
  File "site-packages/github/Requester.py", line 276, in requestJsonAndCheck
  File "site-packages/github/Requester.py", line 287, in __check
github.GithubException.UnknownObjectException: 404 {'message': 'Not Found', 'documentation_url': 'https://developer.github.com/v3/repos/contents/#get-contents'}

Using git bisect, I think the issue arose [in this commit].(madgrizzle@18964a1)

18964a199b7238cef94c5f1c566911b336f9eec5 is the first bad commit
commit 18964a199b7238cef94c5f1c566911b336f9eec5
Author: John Hogan <[email protected]>
Date:   Wed Nov 20 12:50:17 2019 -0500

    work on help management

 Documentation/boardManagement.md     | 38 -----------------------
 HelpManager/helpManager.py           | 60 +++++++++---------------------------
 WebPageProcessor/webPageProcessor.py | 19 +++++++++++-
 docs/boardManagement.md              | 38 +++++++++++++++++++++++
 templates/helpPages.html             | 16 ++++++++++
 5 files changed, 87 insertions(+), 84 deletions(-)
 delete mode 100644 Documentation/boardManagement.md
 create mode 100644 docs/boardManagement.md
 create mode 100644 templates/helpPages.html

Stop button in Triangular configuration doesn't work

I was running a triangular calibration and had to restart for a couple of external problems. I pressed the Stop button in the triangular control and received this message "Function not currently implemented. Sorry [StopCut]"

Thankfully these weren't time sensitive emergencies and I was able to leave the window and stop the test in the manual menu.

Macro Buttons don't read Macro1_title or Macro2_title from groundcontrol.ini

I use Macro 1 and Macro 2 to start and stop the spindle. In groundcontrol.ini I have this: macro1_title = Router On
sledheight = 139
macro2 = M05
macro1 = M03
zaxis = 1
sledcg = 79
macro2_title = Router Off
But in WebControl both buttons still show: Macro 1 and Macro 2 but when pressed, they send the proper GCodes and the spindle turns on and off.

Goto line numbering off by -1 vs view/edit gcode numbering

  1. Load up gcode
  2. View/Edit Gcode using menu and find a line you want to go to.
  3. Close out View/Edit
  4. Use the Goto input box, enter the line number, click Go

The GCode displayed under the input box is off by -1 line in comparison to the View/Edit window.
e.g. View/Edit line number 500 is actually Goto input box line number 499.

Streaming logs are great!

Not an issue, instead a shout-out. The implementation of streaming logs in a separate page is a great addition 💯🎉 Very well done!

Unable to Open G-Code from Open Gcode Menu

webcontrol-0.919-win64

If I Click G-Code / Open: I see Select Directory and Select file.

Select Directory has ./ in the pull down list. If I click the arrows, no other options appear like it does in ground control.

I can't open any directories and files.

Tracking current G90 (Absolute) and G91 (Incremental) mode?

Does WebControl track the current positioning mode G90 (Absolute) vs G91 (Incremental)?

Looking through the code I cannot seem to find this. If this is not tracked then we may have a problem.

Gcode:

(TEST_POSITION)  
G0 G40 G90  
G21  
G00 X0 Y0  
(RELATIVE)  
G91  
G00 X150 Y150  
(PAUSE_HERE_AND_MOVE_Z)  
G00 X20 Y20

Problem:

  1. Run gcode above all the way through. The final position should end up at X 170 Y 170.
  2. Now run gcode again.
  3. When you see the G00 X150 Y150 command sent click Pause button before movement completes.
  4. Click Z-Axis button to bring up the modal. Move z-axis up/down any amount.
  5. Click Close button.
  6. Click Resume button.
  7. Final position is X 20 Y 20 which is wrong.

This is because the z-axis move action sends gcode
"G91 G00 Z" + str(float(distToMoveZ)) + " G90 "
The G90 at the end incorrectly sets positioning mode to Absolute when the gcode file is in G91 (Incremental).

Fix:
The positioning mode (G90/G91) has to be tracked by WebControl and any action that changes it temporarily must revert it back to what it was.

Manual Z-Axis Control don;t seem to work correctly Z-Axis Motor

I downloaded, unzipped, and ran webcontrol-0.919-win64-singledirectory.zip.
I Upgraded to Holey Firmware

I entered in Maslow, Advanced, and Webcontrol settings as best I could.

I ran the quick configure action.

I wanted to check the Z axis level and pressed Z-Axis in controls. When I pressed raise. the left motor turned instead of the Z-Axis.

I shut Webcontrol down and restarted.

I ran the test encoders action and all motors moved correctly. (L, R, Z)

I went to manual control Z-Axis and pressed raise. The Z motor makes a noise but it doesn't spin. I tried the default raise value. 0.5mm, and 5mm, All had the same result. The motor makes a humming noise. but doesn't spin.

I tried testing the motors and encoders again and all three motors operated correctly.

I tried inches... same result.

I pressed Define Zero and now the motor won't make a noise or spin when I press raise or lower.

Diagnostic file attached

wc_diagnostics_20200113-164018.zip

Buffer Overflow, turns off spindle but does not stop movement.

I'm getting a buffer over flow that kills the spindle signal but then continues to move as if nothing is wrong. The code is generated from Fusion 360, it happens in the first min of the code. The gcode was too long to add but I can forward it. I will add the console output as soon as I am able to rerun it and grab it. Is there a log of all the commands sent?

I am able to run the program fine if I plug the spindle in to a non controlled outlet and turn it on manually.

Triangular calibration changes values not reported by traiangular calibration

I manually entered all of my measurements into webcontrol and ran the triangular calibration.

It reported the following values:

Height of Motors = 1063.2
Rotational Radius: 146.6
Chain Sag Correction: 20.13201

I went back and reviewed all of the settings after clicking Accept results and the following settings were changed:

Distance between motors: I entered 3719.6 (actual gearbox to gearbox minus 40.4). The value changed to 3601.2. Ground control measured it to be 3709.57 and 3711.57.

It is extremely unlikely to be around 3600mm. Why did that value change?

The motor offset height changed from 1056.3 to 468.4, even though the reported triangular calibration measurement was 1063.2. I entered this as a separate ticket (#63 https://github.com/madgrizzle/WebControl/issues/63) because there is definitely something wrong with this part of the update.

The rotational radius didn't change from the default 128.1 value, even though the triangular calibration reported the rotational radius to be 146.6.

The Chain Sag Correction Value for Triangular Kinematics was set at the default 33 before the calibration. The triangular calibration reported an actual chain sag of 20.1302.

It did not change after the update. Shouldn't it have?

I'm not sure if this is the correct behavior or not, but it doesn't make sense from an outsiders perspective. I wouldn't have noticed if the issue from ticket 63 hadn't happened.

Test Rig

Could you share with me how you have your test rig setup? I'm thinking about building one to help with development.

Gcode line containing comments causes loss of connection

webcontrol correctly handles separate comment lines enclosed in parentheses, but if a line with a valid gcode has a comment at the end, the serial connection is lost. The following snippet will demonstrate the issue, causing a disconnect when run. Remove the comment on the 'G90' line and the snippet will run correctly.

( G-Code Modified by G-Code Ripper )  
( by Scorch - 2013-2019 www.scorchworks.com )  
G90 ( this comment will demonstrate the issue ) 
G17    
G21    
(G-Code Preamble)  
(---------------------------------------------------------)  
G0 X0.0 Y0.0 Z0.0000    
G3 X-0.0178 Y0.0178 Z-12.7000 I17.9603 J17.9603 F2540.00    
G0 X0.0 Y0.0    
G2 X-0.0178 Y0.0178 Z0.0000 I-17.9603 J-17.9603    

[Feature Request] - LED output for system status

I'd like GPIO pin setup for LED output (active LOW) to have a light that can be steady or blinking at possibly a couple different selectable rates for system ready / idle, running Gcode, pause, disconnected, moving sled, moving z axis, position error (movement too slow), or other failure error.

I'd be happy to help, but I'm not sure where to put it.

Firmware update/upgrade error

WebControl Maslow Holey firmware upgrade error

    • So I am not sure if you wanted to have it ready or if it was ready but I tried to update the firmware to holey so I could calibrate my machine finally with holey calibration.
  • Initially it couldn't find the file, so I found it in "etc" folder and copied it to the path it seems it was looking for. That didn't work. So I then added a space as noted below and the ENTIRE correct path to the command line to be passed to avrdude.

  • There seems to be an error in the path and maybe just a small typo of a missing space. I am not familiar with the handles/switch commands involved with avrdude or how they are passed through. However just by viewing the python window I could see there was an error and surmise that the "-C" probably needed a space before the path was passed through to avrdude to look for avrdude.conf.

  • AND IT WORKED!!!

  • Below are screen shots you can follow if you choose or just look at the spacing and path that is passed to avrdude and it will fix it!!

  • ONE more thing. I had to shut down Webcontrol to open the com port and allow avrdude to talk to the Arduino.

ScreenClip  2
ScreenClip  3
ScreenClip  4
ScreenClip

https://www.evernote.com/shard/s28/client/snv?noteGuid=2680c421-3a14-49ea-8fb6-0261a8761a73&noteKey=633eee4998e63ccc&sn=https%3A%2F%2Fwww.evernote.com%2Fshard%2Fs28%2Fsh%2F2680c421-3a14-49ea-8fb6-0261a8761a73%2F633eee4998e63ccc&title=WebControl%2BMaslow%2BHoley%2Bfirmware%2Bupgrade%2Berror

Release 0.901 rendering issues

I'm seeing some issues crop up in v0.901 that weren't in the previous version:

  • The red cursor doesn't move as the sled moves
  • The controller text pane is blank
  • The sled position numbers don't populate

I've used Edge and Firefox on Win10, Safari and Firefox on macOS and on iOS, all exhibit the issues. Is there additional data I can provide?

WebControl not opening Gcode files properly

Hi, has anyone had problems with their Gcode files when opening them with WebControl? It looks like my Gcode is missing some sections. Please, see the screenshot below to understand what I mean (it is supposed to be a circle within a square):

image

GroundControl is opening the Gcode file properly:

image

webcontrol-0.914-rpi-singledirectory run error

On an Rpi4, webcontrol installed from 'webcontrol-0.914-rpi-singledirectory.tar.gz' errs out when starting up:

pi@pi4:~/webcontrol-v914 $ ./webcontrol 
Traceback (most recent call last):
  File "main.py", line 2, in <module>
  File "/home/pi/.virtualenvs/webcontrol/lib/python3.5/site-packages/PyInstaller/loader/pyimod03_importers.py", line 627, in exec_module
  File "app.py", line 4, in <module>
ImportError: No module named 'flask_misaka'
[1193] Failed to execute script main

The earlier version v-911 works correctly on that Rpi.

Play, Pause, Resume optimization

Fantastic work on this. Most functionality works great and is a great improvement over GroundControl. Submitting multiple issues whilst they are fresh in memory which have no reflection on your effort. Don't know how to categorize them as Feature Request vs Bug Report on GitHub.

Primary Bug/Issue:
Play button can be clicked after it has already been clicked and has weird outcome. Using gcode from Fusion360 (with Maslow post processor) which always insert a tool change at the beginning.

Reproduce:

  1. Load gcode
  2. Click Play button
  3. Tool change request is displayed, click Resume
  4. Click Pause button before router head reaches the first XY cutting coordinates.

Problem:

  1. Can click the Play button again.

Result:

  1. Tool change operation is run again non interactively.
  2. The gcode preview window shows this happening.
  3. The Z-Axis plunges to stock bottom at current XY location then raises back up previous Z Depth. This cuts a full depth hole where it may not be intended.
  4. No further gcode is processed and nothing happens after this. Clicking Pause/Resume has no effect. Clicking Play again repeats step 3 and 4.
  5. The Stop button must be clicked to get out of the cycle.

Suggested quick fix:
When Play button is clicked then it should be disabled visually and functionally.

Ideal fix
The current Play, Pause/Resume, Stop buttons are not ideal UX.

  1. Stop should only be functional after Play has been clicked.
  2. Play should be non functional after it has been clicked.
  3. Pause should only be functional after Play has been clicked.

I suggest combining the Play and Pause/Resume buttons. There would only be two buttons to control operation:

Play -> Pause- > Resume [Loop: Pause -> Resume]
Stop - Always enabled.

It would cycle through the following states:

  • Play and Stop buttons visible. Play enabled, Stop disabled.
  • Click on Play - Change Play button to Pause button. Enable Stop button.
  • Click on Pause button (previously Play) - Change Pause button to Resume which is enabled.
  • Click on Resume button - Change Resume button to Pause (which is enabled)
  • Click on Stop button (at any time) - Change Play/Pause/Resume button to Play and enable. Disable Stop button.

Which ever was you go I also suggest keeping the the buttons 'sticky' (always visible) at top of browser once the Play button has been clicked. This is only a problem on small screens (phone/tablet) where these buttons can go off screen. I think these button are of primary importance when the machine is running (Play state).

Please let me know if I have not communicated this clearly; its been a long day and I wanted to log it whilst it was fresh in memory. Going to setup dev env and try to find/fix code but not great at cross compiling platforms and expect compiling on RaspberyPi to be very slow. Let me know how I can help and thanks for all the effort.

Web client can lose sync on units when awaken from sleep

In the event a browser is asleep and the settings are changed (units, distance to move, or home position), the browser may remain out of sync when it wakes up.

The javascript for the web client calls settingRequest on document.ready and this is apparently not called upon awaking.

Possible solutions (possibly in order of preference):

  1. see if there is a socket.io reconnection event that happens on waking that the settingsRequest can be added to.
  2. have server occasionally send settings to clients on a timer basis.
  3. have browser occasionally request settings from server on a timer basis.

webcontrol-linux pre-release

tested on Raspbian Stretch, error:

./webcontrol: cannot execute binary file: Exec format error

tested on Linux Mint 19.2 in a VM, ran but G-Code, Actions, Settings, Boards actions did not appear. Sub-menus showed but nothing happens when one is selected.

Motor Offset Height in MM Incorrect Update after Triangular Calibration

I measured and entered the Motor Offset Height in MM to be 1069mm.

I ran the triangular calibration in Webcontrol and clicked update. I immediately started receiving error messages that the sled couldn't be found. Everything worked perfectly up to that point.

I started reviewing the settings to see what could have gone wrong and noticed that the offset height changed to 468.4. I'm not sure where that new number came from, but it must have been modified by the triangular calibration update button.

IP address reported on docker-based system isn't the host's address

Long story short.. when running in a docker on an RPI, webcontrol reports the docker container's internal ip address, which is not accessible outside the RPI.

To fix, it appears the IP address has to be injected via an environmental variable. However, WebMCP is used to start the webcontrol docker, so it needs an injection as well.. that means the startup script in the pre-built image needs to inject it. Lot's of changes to make it work and I'm not sure how to modify everyone's startup scripts.

Z-axis modal UI window: additional "Zero", "Traverse" buttons. "Touch" button? [feature request]

When the Z-axis button is pressed, and the z-axis modal window is displayed, it would be great if there were two more buttons:

  1. "Go to Zero" - Move z-axis to current zero (0) height. Helpful when aligning a different router bit when a tool change is requested.
  2. "Go to Traverse height" - Move z-axis to safe traverse height (above stock). Helpful when skipping though gcode to resume cutting after a failure.

There is currently a Touch button which is always seems to be disabled and therefore does nothing. Is this supposed to move z-axis to 0?

Again: Fantastic work, let me know how I can help. Can make icons for these operations if you want to minimize button area on screen.

Webcontrol Holey Calibration Accept Results button doesn't appear to do anything

webcontrol-0.920-win64-singlefile.zip

  • I pressed the "Upgrade Holey Firmware:51.27 button.
  • I ran the Holey Configuration.
  • I entered the measurements
  • I pressed Calculate and the calculations created the following numbers:
    Motor Height = 1044.66923
    Motor Distance 3674.95128
    Left Chain Tol = -0.21402
    Right Chain Tol = -0.18505
    Cal Error: 2.353674533147113
  • I pressed accept results
    I went back to Settings/Maslow Settings and the following results are listed

Distance = 3719.6
Motor Height = 1056.3

Then I went to Settings / Advanced settings and the following results are listed:

Chain Tol Left = 0
Chain Tol Right = 0

Shouldn't these number change when I press accept results?

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.