Comments (4)
def error_poll(self):
if "axis" in self.display:
# AXIS polls for errors every 0.2 seconds, so we wait slightly longer to make sure it's happened.
time.sleep(0.25)
error_pin = Popen(
"halcmd getp probe.user.error ", shell=True, stdout=PIPE
).stdout.read()
abort_pin = Popen(
"halcmd getp probe.user.abort ", shell=True, stdout=PIPE
).stdout.read() #working with axis mod using getp axisui.abort
elif "gmoccapy" in self.display:
# gmoccapy polls for errors every 0.25 seconds, OR whatever value is in the [DISPLAY]CYCLE_TIME ini
# setting, so we wait slightly longer to make sure it's happened.
ms = int(self.inifile.find("DISPLAY", "CYCLE_TIME") or 250) + 50
time.sleep(ms / 100)
error_pin = Popen(
"halcmd getp gmoccapy.error ", shell=True, stdout=PIPE
).stdout.read()
else:
print("Unable to poll %s GUI for errors" % self.display)
return -1
if "TRUE" in abort_pin:
text = "Program stopped by user"
self.add_history("Error: %s" % text, "", 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0)
print("Error", text)
self.command.mode(linuxcnc.MODE_MANUAL)
self.command.wait_complete()
return -1
if "TRUE" in error_pin:
text = "See notification popup"
self.add_history("Error: %s" % text, "", 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0)
print("error", text)
self.command.mode(linuxcnc.MODE_MANUAL)
self.command.wait_complete()
return -1
return 0
from probe-screen-ng.
test editing directly axis code work fine but it seem to be not possible to use wrapped version like you do for notification
from probe-screen-ng.
test using [DISLAY]USER_COMMAND_FILE=filename.py does not work better
from probe-screen-ng.
in axis python code this work fine
def task_stop(*event):
if s.task_mode == linuxcnc.MODE_AUTO and vars.running_line.get() != 0:
o.set_highlight_line(vars.running_line.get())
comp["abort"] = True
c.abort()
c.wait_complete()
time.sleep(0.1)
comp["abort"] = False
comp.newpin("abort", hal.HAL_BIT, hal.HAL_OUT)
from probe-screen-ng.
Related Issues (20)
- Python code try to understand self.stat.poll() HOT 2
- some Fixed retract lenght change
- Python trouble with hook macro
- Hook_end suggestion
- Suggested psng_gotots renamed as psng_diameter_tool_setter
- Problem using MSG in hook macro HOT 23
- Rework error handling to avoid race conditions with AXIS UI HOT 4
- Use italic for spinbox block and setter height like other spinbox HOT 6
- move self.command.mode(linuxcnc.MODE_MDI) to base ocode gcode
- Change hook call from macro to python for prevent false error HOT 3
- Need precision about axisrc last change HOT 1
- Looks like some of the vers.by probe screen has been pulled into LinuxCNC itself? HOT 3
- have you see the built in auto toollenght from 2.8 stglue ? HOT 2
- Change hook call from macro to python HOT 10
- changing saving method for pref HOT 8
- suggestion for popup allways on top HOT 4
- tool change HOT 4
- Feature request: add an option for touch plate probing; and questions
- Probe screen empty
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from probe-screen-ng.