Probe Screen V2 Python & file not open errors

More
07 Feb 2023 17:01 #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:
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):
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:
('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.
Attachments:

Please Log in or Create an account to join the conversation.

More
07 Feb 2023 17:09 - 07 Feb 2023 17:11 #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?
Last edit: 07 Feb 2023 17:11 by fletch. Reason: [code] stuff all over the place

Please Log in or Create an account to join the conversation.

More
07 Feb 2023 23:12 #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 or Create an account to join the conversation.

More
08 Feb 2023 11:34 #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 or Create an account to join the conversation.

More
08 Feb 2023 12:24 #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 or Create an account to join the conversation.

More
08 Feb 2023 13:53 - 08 Feb 2023 13:56 #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:

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
'probe-in'
is 'known name' for the probe screen.

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

Any ideas what this unopened file is called, or how I might find out?
Last edit: 08 Feb 2023 13:56 by fletch. Reason: More [code] tags randomely scattered...

Please Log in or Create an account to join the conversation.

More
08 Feb 2023 14:25 #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 or Create an account to join the conversation.

More
08 Feb 2023 14:48 - 08 Feb 2023 14:51 #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:

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!
Last edit: 08 Feb 2023 14:51 by fletch. Reason: M3 is not what I want

Please Log in or Create an account to join the conversation.

More
08 Feb 2023 16:35 - 08 Feb 2023 16:38 #264062 by fletch
Please ignore the M1 and M3 - these are debugs from the Manualmatic when task_mode (Manual, MDI, Auto) changes...
Last edit: 08 Feb 2023 16:38 by fletch.

Please Log in or Create an account to join the conversation.

More
09 Feb 2023 00:24 #264082 by andypugh

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) 
 
The following user(s) said Thank You: tommylight, fletch

Please Log in or Create an account to join the conversation.

Time to create page: 0.412 seconds
Powered by Kunena Forum