Py3 - Probe Basic Config Conversion Doc Lcnc 2.9+

More
07 Dec 2023 15:29 #287454 by Unlogic
I followed this guide today and came across the following error on startup:

2023-12-07 16:20:11,555 - qtpyvcp.app.launcher - CRITICAL - Unhandled exception in probe_basic line 8
Traceback (most recent call last):
  File "/usr/bin/probe_basic", line 8, in <module>
    sys.exit(main())
             ^^^^^^
  File "/usr/lib/python3/dist-packages/probe_basic/__init__.py", line 20, in main
    qtpyvcp.run_vcp(opts, VCP_CONFIG_FILE)
  File "/usr/lib/python3/dist-packages/qtpyvcp/__init__.py", line 26, in run_vcp
    run(*args, **kwargs)
  File "/usr/lib/python3/dist-packages/qtpyvcp/app/__init__.py", line 129, in run
    launch_application(opts, config)
  File "/usr/lib/python3/dist-packages/qtpyvcp/app/launcher.py", line 78, in launch_application
    loadWindows(config)
  File "/usr/lib/python3/dist-packages/qtpyvcp/app/launcher.py", line 228, in loadWindows
    window = _initialize_object_from_dict(window_dict)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3/dist-packages/qtpyvcp/app/launcher.py", line 208, in _initialize_object_from_dict
    return obj(*args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3/dist-packages/probe_basic/probe_basic.py", line 56, in __init__
    self.load_programmable_coolant_cannon_settings()
  File "/usr/lib/python3/dist-packages/probe_basic/probe_basic.py", line 93, in load_programmable_coolant_cannon_settings
    self.activate_programmable_coolant.setValue(int(INIFILE.find("COOLANT_CANNON", "ACTIVATE")) or 0)
                                                ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
TypeError: int() argument must be a string, a bytes-like object or a real number, not 'NoneType'


I found no documentation about this error but after reading through the source code /usr/lib/python3/dist-packages/probe_basic/probe_basic.py in added the following lines to my INI file which solved the problem.

[COOLANT_CANNON]
ACTIVATE = 0
HORIZONTAL_SPINDLE_NOZZLE_DIST = 0
VERTICAL_SPINDLE_NOZZLE_DIST = 0
PC_ANGLE_OFFSET = 0


Though I'd mention this here in case anyone else runs into the same problem.
 

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

More
07 Dec 2023 16:22 #287459 by dpslwk
apologies, a fix for that has just been pushed

anyone using the programable coolant cannon does need to add the new ini section and set there setting

however if not using the cannon the new ini section is not required
The following user(s) said Thank You: Unlogic

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

More
07 Dec 2023 20:10 #287480 by Unlogic
Thanks you, that was very quick.

I got Probe Basic up and running now but as soon I do any movement of the machine I get this error (the servos still move however).

[qtpyvcp.app.launcher][CRITICAL]  Unhandled exception in vtk_backplot.py line 598 (launcher.py:37)
Traceback (most recent call last):
  File "/usr/lib/python3/dist-packages/qtpyvcp/widgets/display_widgets/vtk_backplot/vtk_backplot.py", line 598, in update_position
    active_wcs_offset = self._datasource.getWcsOffsets()[self._datasource.getActiveWcsIndex()]
                        ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
KeyError: -1

I don't know if it's related but I also get this error on startup in the log.

[qtpyvcp.widgets.display_widgets.vtk_backplot.linuxcnc_datasource][WARNING] 


KeyError: Likely means no program loaded. (linuxcnc_datasource.py:176)

Any idea what could be causing this?
 
Attachments:

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

More
07 Dec 2023 22:36 #287493 by dpslwk
a fix to qtpyvcp has just been pushed, apt update, apt upgrade should clear that up
The following user(s) said Thank You: Lcvette, Unlogic

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

More
07 Dec 2023 23:36 #287500 by Lcvette
Thanks dpslwk!

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

More
08 Dec 2023 09:42 #287507 by Unlogic

a fix to qtpyvcp has just been pushed, apt update, apt upgrade should clear that up
 

I installed the updated qtpycp package but I'm still getting the same error as soon as I do any movement of the machine:

qtpyvcp.app.launcher][CRITICAL]  Unhandled exception in vtk_backplot.py line 598 (launcher.py:37)
Traceback (most recent call last):
  File "/usr/lib/python3/dist-packages/qtpyvcp/widgets/display_widgets/vtk_backplot/vtk_backplot.py", line 598, in update_position
    active_wcs_offset = self._datasource.getWcsOffsets()[self._datasource.getActiveWcsIndex()]
                        ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
KeyError: -1

The warning in the log during startup is also still there:

[qtpyvcp.widgets.display_widgets.vtk_backplot.linuxcnc_datasource][WARNING] 


KeyError: Likely means no program loaded. (linuxcnc_datasource.py:176)

If I home the machine and select an offset like G55 the error goes away. Could it be that it always expects an offset to be set?

However when I get past the error and start moving the machine I instead get a segmentation fault, but that may be related to the graphics card in this machine so I'm gonna try this on another machine now.

linuxcnc console output:

/usr/bin/linuxcnc: line 977:  3641 Segmentation fault      $EMCDISPLAY -ini "$INIFILE" $EMCDISPLAYARGS $EXTRA_ARGS
Shutting down and cleaning up LinuxCNC...
task: 4371 cycles, min=0.000013, max=0.055746, avg=0.010063, 1 latency excursions (> 10x expected cycle time of 0.010000s)
hm2_eth: in hm2_eth_reset
hm2_eth: HostMot2 ethernet driver unloaded
hm2: unloading
Note: Using POSIX realtime
LinuxCNC terminated with an error.  You can find more information in the log:
    /home/cnc/linuxcnc_debug.txt
and
    /home/cnc/linuxcnc_print.txt
as well as in the output of the shell command 'dmesg' and in the terminal


dmesg outout:

[  892.129212] probe_basic[3324]: segfault at 0 ip 0000000000000000 sp 00007ffd69873828 error 14 in python3.11[400000+1f000] likely on CPU 1 (core 1, socket 0)
[  892.129231] Code: Unable to access opcode bytes at 0xffffffffffffffd6.

Attachments:

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

More
08 Dec 2023 11:29 #287520 by dpslwk
hmm

| Could it be that it always expects an offset to be set?

well yes, seem it does expect be have an active wco g54-g59.3,
but I did not eve think it was possible to not have one set!
and most have G54 in there [RS274NGC]RS274NGC_STARTUP_CODE its in the recommended INI changes at the start of this guide for pb.



perhaps future posts on this should be moved to there own thread
The following user(s) said Thank You: Unlogic

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

More
08 Dec 2023 11:48 #287521 by Unlogic
Thanks again for a quick reply.

The segfault was as I suspected the caused by the graphics card, tried another machine and it solved that problem.

I'll start a separate thread regarding the offset problem.

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

More
12 Dec 2023 22:21 #287986 by jay.perez1
Hi Chris,

I heard there's been a lot of development on Probe_Basic recently and some new contributors.

Thanks for the fantastic work everyone !!!

Question; We currently have two CNC routers running Probe_Basic on Debian 10 and Mesa cards. We're trying to build a new Probe_Basic controller using a Raspberry Pi 4 and the BTT SKR v1.4 Turbo board. Do you know if the instructions above will work for that situation ?

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

More
06 Jan 2024 12:56 #289959 by jc2ktr
Hi,
thanks to your instructions i got Probe Basic set up.

But i have a weird problem which i don´t understand. I have a working Machine with Axis Screen and Ethercat Hardware (motion & io).
If i start this Machine i am able to jog around and the jogged distances & speeds match the movement on the machine.

In Probe basic somehow the Axis are moving far to slow also the distances are off. Seems that there is some scaling done in background?

I don´t know where i can also look.


My Axis - INI / hal

File Attachment:

File Name: EtherCAT_S...1-06.ini
File Size:2 KB

File Attachment:

File Name: ethercat-c...1-06.xml
File Size:8 KB
 

File Attachment:

File Name: probe-ec.hal
File Size:5 KB


My Probe Basic - INI / hal
 

File Attachment:

File Name: probe_ec.ini
File Size:5 KB

 

File Attachment:

File Name: ethercat_s...1-06.xml
File Size:8 KB

 

File Attachment:

File Name: EtherCAT_S...1-06.hal
File Size:4 KB
 
Attachments:

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

Moderators: KCJLcvette
Time to create page: 0.200 seconds
Powered by Kunena Forum