Probe Screen V2 Python & file not open errors

More
3 years 8 months ago #263961 by fletch
After my 'accidental' purchase of a Renishaw probe, I thought I might as well use it. A bit of turning and electronics ( youtube.com/shorts/Yk2ZmRjruxY ) later and I'm now trying to install the Probe Screen V2.

Once I'd editing the ini/hall files as required, I had the Gmoccapy tab and the probe screen displaying OK but when using the 'jog' function on the Probe Screen V2 I get the following error:
Code:
Traceback (most recent call last): File "python/probe_screen.py", line 383, in on_btn_jog_pressed velocity = float(self.inifile.find("TRAJ", "DEFAULT_VELOCITY")) TypeError: float() argument must be a string or a number Traceback (most recent call last): File "python/probe_screen.py", line 407, in on_btn_jog_released self.command.jog( linuxcnc.JOG_STOP, axis ) TypeError: function takes at least 3 arguments (2 given)

Adding DEFAULT_VELOCITY to the [TRAJ] section of the ini file (even though DEFAULT_LINEAR_VELOCITY is the 'new' label?) results in the following similar error (even if DEFAULT_VELOCITY is set to an integer, not a float):
Code:
Traceback (most recent call last): File "python/probe_screen.py", line 394, in on_btn_jog_pressed self.command.jog( linuxcnc.JOG_CONTINUOUS, axisnumber, direction * velocity ) TypeError: integer argument expected, got float Traceback (most recent call last): File "python/probe_screen.py", line 407, in on_btn_jog_released self.command.jog( linuxcnc.JOG_STOP, axis ) TypeError: function takes at least 3 arguments (2 given)

I can still jog OK on the main screen, so thought I'd try the X+ button (the simplest probe operation) on the probe screen.  I then get the following error:
Code:
('MDI Mode', False) ntb_button_switch_page hal status motion mode changed 3 2 RUN IDLE 3 2 RUN IDLE emc/task/emctask.cc 416: interp_error: File not open File not open error File not open MANUAL Mode ntb_button_switch_page hal status motion mode changed

So it would appear I have both a Python error (it looks very similar to the errors I had when writhing t=for the Manualmatic) and a 'file' error - I have no idea what the file is that is not opened.

Initially errors occurred on my proper install but have also now replicated in a vanilla Gmoccapy simulation (ini/hal files attached). I'm using the Raspberry Pi image which is now version 2.8.4.

There are a lot of threads/replies on here about the Probe Screen but I haven't yet found any that match these errors.

Is it likely the Probe Screen is now out of sync with LinuxCNC (last update to the git repository was 4 years ago)?

Any help digging into this would be much appreciated.

Please Log in to join the conversation.

More
3 years 8 months ago #263962 by fletch

Is it likely the Probe Screen is now out of sync with LinuxCNC (last update to the git repository was 4 years ago)?
 
Hmm... Working my way through the github forks and this might imply that is the case: github.com/verser-git/probe_screen_v2/co...f12265c314470e5d2b49

Am I using an out of date resource?

Please Log in to join the conversation.

More
3 years 8 months ago #263991 by andypugh
Looking at the timestamps, it seems very likely that the handler file will need to be converted to Python 3. This shouldn't be particularly hard.

Please Log in to join the conversation.

More
3 years 8 months ago #264024 by fletch
Thanks Andy - following the 'forking trail'*, I notice you've forked the Probe Screen NG ( github.com/andypugh/probe-screen-ng ) and that antbarney has an NG fork ( github.com/antbarney/probe-screen-ng ) with recent commits for 2.9.

I'm going to back out my V2 config and try the NG version - will report back.

*it would be far quicker and less error prone if github showed the number of commits ahead in the fork lists!

Please Log in to join the conversation.

More
3 years 8 months ago #264029 by andypugh

Thanks Andy - following the 'forking trail'*, I notice you've forked the Probe Screen NG ( github.com/andypugh/probe-screen-ng )
So I have! Though I think that it probably all that I have done. I had completely forgotten about it ;-)
 

Please Log in to join the conversation.

More
3 years 8 months ago #264047 by fletch
Progress of sorts - I can jog without errors but when attempting to X+ probe I get a slow X travel (expected), a long delay (a couple of seconds, not expected), a rapid Z travel (eek!) and then the error:

Code:
hal status motion mode changed 3 2 RUN IDLE Sent M1 Sent M3 3 2 RUN IDLE MANUAL Mode ntb_button_switch_page hal status motion mode changed Sent M1 Sent M3 emc/task/emctask.cc 416: interp_error: File not open File not open ('MDI Mode', False) ntb_button_switch_page hal status motion mode changed ('error', 'See notification popup') Sent M1 MANUAL Mode ntb_button_switch_page hal status motion mode changed

The 'See notification popup' is a bit of a tease because it just says 'File not open'...

The probe is wired in (the LED goes out on the 7i96 when the probe is activated) and pncconf configured for the probe input. I have not seen any documentation in either V2 or NG regarding linking the probe input to the probe screen - I'm assuming
Code:
'probe-in'
is 'known name' for the probe screen.

Code:
# --- PROBE-IN --- net probe-in <= hm2_7i96.0.gpio.00

Any ideas what this unopened file is called, or how I might find out?

Please Log in to join the conversation.

More
3 years 8 months ago #264050 by andypugh
ntb_button_switch_page is a routine in gmoccapy.

There is this bug mentioning it: github.com/LinuxCNC/linuxcnc/issues/1398

Though I don't see "file not open" there so that's probably not related.

Do you get the same error if a G-code file is loaded?

I am a bit concerned to see an M3 mentioned in the context of probing.

Please Log in to join the conversation.

More
3 years 8 months ago #264051 by fletch
I have not loaded any G code while using the probe so far but get the following error when I have loaded (but not run) spiral.ngc from the examples directory:

Code:
emc/task/emctask.cc 416: interp_error: EOF in file:/home/pi/linuxcnc/nc_files/examples/spiral.ngc seeking o-word: o from line: 0 EOF in file:/home/pi/linuxcnc/nc_files/examples/spiral.ngc seeking o-word: o from line: 0 /usr/lib/python2.7/dist-packages/gmoccapy/notification.py:168: GtkWarning: Invalid icon size 48

If I run spiral.ngc first I get the same error but - highly dangerously - the probe screen is now using inches rather than mm for travel movements!! Really pleased I had my hand over the estop! I think I've earned an emoji for that

Edit: Yikes! I just realised what M3 is - we're going to need a bigger emoji!

Please Log in to join the conversation.

More
3 years 8 months ago #264062 by fletch
Please ignore the M1 and M3 - these are debugs from the Manualmatic when task_mode (Manual, MDI, Auto) changes...

Please Log in to join the conversation.

More
3 years 8 months ago #264082 by andypugh

Code:
but - highly dangerously - the probe screen is now using inches rather than mm for travel movements!! 
OK, that's really serious. Even though the probe screen isn't part of LinuxCNC, enough people use it that I think you should raise a tracker on this at:

github.com/LinuxCNC/linuxcnc/issues

(Maybe mention that I told you to, so that folk don't question the relevance) 
 

Please Log in to join the conversation.

Time to create page: 0.100 seconds
Powered by Kunena Forum