Py3 - Probe Basic Config Conversion Doc Lcnc 2.9+
08 Mar 2023 16:30 - 08 Mar 2023 17:01 #266123
by Lcvette
Py3 - Probe Basic Config Conversion Doc Lcnc 2.9+ was created by Lcvette
I am making this doc and adding it as a sticky to help those converting a Pncconf config over to a working python3 linuxcnc >=2.9 Probe Basic Config in step by step follow along, hopefully it helps those who are new!
Step 1: From a running Debian 12 Bookworm Installation you can follow the instructions below to install Probe Basic and its dependencies using downloaded .deb files. Installation instructions can be found here:
forum.linuxcnc.org/qtpyvcp/48373-qtpyvcp...nside?start=0#265849
Step 2: Create a configuration for your machine using Pncconf or mesact/mesact2 from the linuxcnc menu in the applications drop down in the upper menu bar In this example we are using pncconfig. It is recommended to use the Axis gui display for this initial build. You should have your machine's wiring schematic premade to make filling in the required information fast, easy and accurate in Pncconf.
After you have completed the Pncconf configuration builder and have created a new machine configuration that has been saved in the linuxcnc config directory, it is advised that you start linuxcnc using your new config to verify there are no errors. It is also advisable to test the machine to verify the base functionality is correct, for example, jogging, spindle function, axis motion is as expected and the commanded distance matches the actual distance moved, and any other sort any gremlins prior to making the switch to probe basic. This will ensure when you transition it goes smoothly. Once completed and found to function correctly, you can proceed to step 3.
Step 3: In the Linuxcnc config folder, there should now be a config folder from the output of Pncconf, there should also be the probe_basic config folder. Both will be used for copying required files over to the new machine config folder. Open two windows in the file tree, the new Pncconf folder and the probe_basic config folder. Copy the highlighted files shown below from the probe basic config folder to the Pncconf config folder. Below you can see that I removed any unnecessary files and folders from what would be a basic installation for converting to probe basic. If you have a special case for having certain files then please use your discretion in leaving the required files for your use. What is shown will be the minimum starting point for the config conversion for Probe Basic:
Step 4: In the probe_basic config folder, open the hallib folder. Copy over the three highlighted folders and file shown in the image below to the new Pncconfig folder.
Open the hallib folder in the Probe Basic Sim config directory, Copy over the two highlighted files as shown in the below image:
Your config folder should now look like this and have the required files in it:
Step 5: Editing the ini and hal files for probe basic requirements. In your text editor, open the new machine config ini file. In the example it is named my_config.ini, the below ini entries are required for probe basic and should be present in your machine configuration for full functionality. This partial snippet of a working probe basic ini file contains the required ini entries that are missing or different from the Pncconf ini file for running probe basic. Copy each section or edit the appropriate lines that are there but are different to the appropriate section on the Pncconf ini file. Note that there are sections that require editing for paths specific to your machine computer name and your machine configuration folder name. Be sure to exchange the placeholder text with your unique path information so the files can be found at startup. Once complete save the ini file.
[EMC]
MACHINE = (your_machine_name_here)
[DISPLAY]
DISPLAY = probe_basic
CONFIG_FILE = custom_config.yml
FULLSCREEN = True
MAX_FEED_OVERRIDE = 2.000000
MAX_SPINDLE_OVERRIDE = 2.000000
MIN_SPINDLE_OVERRIDE = 0.500000
INTRO_TIME = 1
PROGRAM_PREFIX = /home/(your_pc_name_here)/(your_desired_ngc_program_directory_here) ***This Directory will be the default directory shown in the file page in Probe Basic***
INCREMENTS = JOG .1in .01in .001in .0001in ***JOG adds the jog button to the increments line in Probe Basic***
[ATC]
# ***If using an ATC, uncomment POCKETS line and add your pocket count***
# Carousel image available for 8, 10, 12, 14, 16, 18, 20, 21, 24
#POCKETS = 12
[PYTHON]
# ***leave the following commented out unless you are using the ATC macros***
#TOPLEVEL = /home/(your_machine_name_here)/linuxcnc/configs/(your_config_folder_name_here)/python/toplevel.py
#PATH_APPEND = /home/(your_machine_name_here)/linuxcnc/configs/(your_config_folder_name_here)/python/
#LOG_LEVEL = 8
[RS274NGC]
RS274NGC_STARTUP_CODE = F10 S300 G20 G17 G40 G49 G54 G64 P0.001 G80 G90 G91.1 G92.1 G94 G97 G98
FEATURES = 30
PROGRAM_PREFIX = ~/linuxcnc/nc_files
PARAMETER_FILE = linuxcnc.var
SUBROUTINE_PATH = /home/(your_pc_name_here)/linuxcnc/configs/(your_config_folder_name_here)/subroutines/
# ***ATC tool change use, uncomment the following remapped M codes at bottom of [RS274NGC] section ***
#REMAP=M6 modalgroup=6 prolog=change_prolog ngc=toolchange epilog=change_epilog
#REMAP=M10 modalgroup=6 argspec=p ngc=m10
#REMAP=M11 modalgroup=6 argspec=p ngc=m11
#REMAP=M12 modalgroup=6 argspec=p ngc=m12
#REMAP=M13 modalgroup=6 ngc=m13
#REMAP=M21 modalgroup=6 ngc=m21
#REMAP=M22 modalgroup=6 ngc=m22
#REMAP=M23 modalgroup=6 ngc=m23
#REMAP=M24 modalgroup=6 ngc=m24
#REMAP=M25 modalgroup=6 ngc=m25
#REMAP=M26 modalgroup=6 ngc=m26
[EMCMOT]
COMM_WAIT = 0.010
[HAL]
HALUI = halui
HALFILE = (your_config_halfile_name_here).hal
#HALFILE = coolant_cannon.hal ***leave commented out unless using programmable coolant nozzle***
POSTGUI_HALFILE = probe_basic_postgui.hal
[TRAJ]
AXES = 5
COORDINATES = X Y Z A B
Step 6: Editing the hal file. In the text editor, open your Pncconf hal file, show in the example as my_linuxCNC_machine.hal. Probe basic uses dio and aio for its various subroutines and macros, the count of these needs to be added to the hal file by editing/adding to the line as shown in the below image:
Step 7: Editing the probe_basic_postgui.hal file. The two edits below should be used to convert from the sim required file to your machine postgui halfile. ***NOTE only one postgui halfile can be used so any post gui hal entries you may need should be incorporated into this file or there will be conflicts. The first edit is to comment out or delete the line:
net probe-in => qtpyvcp.probe-in.out
(This line is only used in sim for development of probing routines and cannot be used in a machine configuration)
The second edit is to remove the connection to the spindle encoder if one is not used. If you are using a spindle encoder, you can edit this line to match the output from your configuration file which will give you the option in probe basic to select it as the spindle speed DRO rpm source. The user selection to change between software calculated rpm display and actual encoder display is on the settings page in probe basic. To comment out and leave in the file for future use simply enter the # symbol in front of the line as shown below.
#net spindle-rpm-filtered scale_to_rpm.out => qtpyvcp.spindle-encoder-rpm.in
As long as the information you entered in the Pncconf config builder is correct, this should now give you a working probe basic installation that will run your machine.
if you find any issues, please report them so we can make corrections!
Thanks all!
Chris
Step 1: From a running Debian 12 Bookworm Installation you can follow the instructions below to install Probe Basic and its dependencies using downloaded .deb files. Installation instructions can be found here:
forum.linuxcnc.org/qtpyvcp/48373-qtpyvcp...nside?start=0#265849
Step 2: Create a configuration for your machine using Pncconf or mesact/mesact2 from the linuxcnc menu in the applications drop down in the upper menu bar In this example we are using pncconfig. It is recommended to use the Axis gui display for this initial build. You should have your machine's wiring schematic premade to make filling in the required information fast, easy and accurate in Pncconf.
After you have completed the Pncconf configuration builder and have created a new machine configuration that has been saved in the linuxcnc config directory, it is advised that you start linuxcnc using your new config to verify there are no errors. It is also advisable to test the machine to verify the base functionality is correct, for example, jogging, spindle function, axis motion is as expected and the commanded distance matches the actual distance moved, and any other sort any gremlins prior to making the switch to probe basic. This will ensure when you transition it goes smoothly. Once completed and found to function correctly, you can proceed to step 3.
Step 3: In the Linuxcnc config folder, there should now be a config folder from the output of Pncconf, there should also be the probe_basic config folder. Both will be used for copying required files over to the new machine config folder. Open two windows in the file tree, the new Pncconf folder and the probe_basic config folder. Copy the highlighted files shown below from the probe basic config folder to the Pncconf config folder. Below you can see that I removed any unnecessary files and folders from what would be a basic installation for converting to probe basic. If you have a special case for having certain files then please use your discretion in leaving the required files for your use. What is shown will be the minimum starting point for the config conversion for Probe Basic:
Step 4: In the probe_basic config folder, open the hallib folder. Copy over the three highlighted folders and file shown in the image below to the new Pncconfig folder.
Open the hallib folder in the Probe Basic Sim config directory, Copy over the two highlighted files as shown in the below image:
Your config folder should now look like this and have the required files in it:
Step 5: Editing the ini and hal files for probe basic requirements. In your text editor, open the new machine config ini file. In the example it is named my_config.ini, the below ini entries are required for probe basic and should be present in your machine configuration for full functionality. This partial snippet of a working probe basic ini file contains the required ini entries that are missing or different from the Pncconf ini file for running probe basic. Copy each section or edit the appropriate lines that are there but are different to the appropriate section on the Pncconf ini file. Note that there are sections that require editing for paths specific to your machine computer name and your machine configuration folder name. Be sure to exchange the placeholder text with your unique path information so the files can be found at startup. Once complete save the ini file.
[EMC]
MACHINE = (your_machine_name_here)
[DISPLAY]
DISPLAY = probe_basic
CONFIG_FILE = custom_config.yml
FULLSCREEN = True
MAX_FEED_OVERRIDE = 2.000000
MAX_SPINDLE_OVERRIDE = 2.000000
MIN_SPINDLE_OVERRIDE = 0.500000
INTRO_TIME = 1
PROGRAM_PREFIX = /home/(your_pc_name_here)/(your_desired_ngc_program_directory_here) ***This Directory will be the default directory shown in the file page in Probe Basic***
INCREMENTS = JOG .1in .01in .001in .0001in ***JOG adds the jog button to the increments line in Probe Basic***
[ATC]
# ***If using an ATC, uncomment POCKETS line and add your pocket count***
# Carousel image available for 8, 10, 12, 14, 16, 18, 20, 21, 24
#POCKETS = 12
[PYTHON]
# ***leave the following commented out unless you are using the ATC macros***
#TOPLEVEL = /home/(your_machine_name_here)/linuxcnc/configs/(your_config_folder_name_here)/python/toplevel.py
#PATH_APPEND = /home/(your_machine_name_here)/linuxcnc/configs/(your_config_folder_name_here)/python/
#LOG_LEVEL = 8
[RS274NGC]
RS274NGC_STARTUP_CODE = F10 S300 G20 G17 G40 G49 G54 G64 P0.001 G80 G90 G91.1 G92.1 G94 G97 G98
FEATURES = 30
PROGRAM_PREFIX = ~/linuxcnc/nc_files
PARAMETER_FILE = linuxcnc.var
SUBROUTINE_PATH = /home/(your_pc_name_here)/linuxcnc/configs/(your_config_folder_name_here)/subroutines/
# ***ATC tool change use, uncomment the following remapped M codes at bottom of [RS274NGC] section ***
#REMAP=M6 modalgroup=6 prolog=change_prolog ngc=toolchange epilog=change_epilog
#REMAP=M10 modalgroup=6 argspec=p ngc=m10
#REMAP=M11 modalgroup=6 argspec=p ngc=m11
#REMAP=M12 modalgroup=6 argspec=p ngc=m12
#REMAP=M13 modalgroup=6 ngc=m13
#REMAP=M21 modalgroup=6 ngc=m21
#REMAP=M22 modalgroup=6 ngc=m22
#REMAP=M23 modalgroup=6 ngc=m23
#REMAP=M24 modalgroup=6 ngc=m24
#REMAP=M25 modalgroup=6 ngc=m25
#REMAP=M26 modalgroup=6 ngc=m26
[EMCMOT]
COMM_WAIT = 0.010
[HAL]
HALUI = halui
HALFILE = (your_config_halfile_name_here).hal
#HALFILE = coolant_cannon.hal ***leave commented out unless using programmable coolant nozzle***
POSTGUI_HALFILE = probe_basic_postgui.hal
[TRAJ]
AXES = 5
COORDINATES = X Y Z A B
Step 6: Editing the hal file. In the text editor, open your Pncconf hal file, show in the example as my_linuxCNC_machine.hal. Probe basic uses dio and aio for its various subroutines and macros, the count of these needs to be added to the hal file by editing/adding to the line as shown in the below image:
Step 7: Editing the probe_basic_postgui.hal file. The two edits below should be used to convert from the sim required file to your machine postgui halfile. ***NOTE only one postgui halfile can be used so any post gui hal entries you may need should be incorporated into this file or there will be conflicts. The first edit is to comment out or delete the line:
net probe-in => qtpyvcp.probe-in.out
(This line is only used in sim for development of probing routines and cannot be used in a machine configuration)
The second edit is to remove the connection to the spindle encoder if one is not used. If you are using a spindle encoder, you can edit this line to match the output from your configuration file which will give you the option in probe basic to select it as the spindle speed DRO rpm source. The user selection to change between software calculated rpm display and actual encoder display is on the settings page in probe basic. To comment out and leave in the file for future use simply enter the # symbol in front of the line as shown below.
#net spindle-rpm-filtered scale_to_rpm.out => qtpyvcp.spindle-encoder-rpm.in
As long as the information you entered in the Pncconf config builder is correct, this should now give you a working probe basic installation that will run your machine.
if you find any issues, please report them so we can make corrections!
Thanks all!
Chris
Attachments:
Last edit: 08 Mar 2023 17:01 by Lcvette.
The following user(s) said Thank You: tommylight, pommen, besriworld, Swag, sharp_reaper, jay.perez1, my1987toyota, hilo90mhz, Ac1dburn, Stepping3D and 5 other people also said thanks.
Please Log in or Create an account to join the conversation.
- nighteagle
- Offline
- Senior Member
Less
More
- Posts: 72
- Thank you received: 6
23 Oct 2023 12:21 - 23 Oct 2023 12:51 #283595
by nighteagle
Replied by nighteagle on topic Py3 - Probe Basic Config Conversion Doc Lcnc 2.9+
Hello,
my System:
Linux DEBIAN Bookworm newest - then LINUXCNC 2.9 with MESA7i97 on Optiplex980 i5 with Grapihcs-Adapter
So i have Axis up and running - my machine working - now follow your instructions to go to probe-basic and have following error-report after finish - see attached txt.
my System:
Linux DEBIAN Bookworm newest - then LINUXCNC 2.9 with MESA7i97 on Optiplex980 i5 with Grapihcs-Adapter
So i have Axis up and running - my machine working - now follow your instructions to go to probe-basic and have following error-report after finish - see attached txt.
Last edit: 23 Oct 2023 12:51 by nighteagle.
Please Log in or Create an account to join the conversation.
23 Oct 2023 14:01 #283600
by Lcvette
Replied by Lcvette on topic Py3 - Probe Basic Config Conversion Doc Lcnc 2.9+
you have configuration issues. missing/wrong information in the ini file in the hal file call section, also some errors for display and intro graphic.. this looks like no conversion work has been done. need to open the sim and verify your installation is correct then work on your configuration conversion as shown above.
Please Log in or Create an account to join the conversation.
- nighteagle
- Offline
- Senior Member
Less
More
- Posts: 72
- Thank you received: 6
23 Oct 2023 16:58 #283615
by nighteagle
Replied by nighteagle on topic Py3 - Probe Basic Config Conversion Doc Lcnc 2.9+
So - the AXIS run fine with my hal and ini - then the SIM of probe-basic works fine after installation - then i have make the few modification above. Copy the files etc... now... i have make it again and the same errors...
Please Log in or Create an account to join the conversation.
23 Oct 2023 19:48 #283635
by Lcvette
Replied by Lcvette on topic Py3 - Probe Basic Config Conversion Doc Lcnc 2.9+
post your hal and ini files
Please Log in or Create an account to join the conversation.
23 Oct 2023 20:06 #283636
by Lcvette
/home/user/linuxcnc/configs/Siegfried/probe_basic_postgui.hal:7: Pin 'halui.program.is-idle' was already linked to signal 'pdnt.program.is-idle'
Failed to load POSTGUI_HALFILE with error: 1
it appears you have a conflict with your pendant. need to sort that to remove this error.
Replied by Lcvette on topic Py3 - Probe Basic Config Conversion Doc Lcnc 2.9+
[qtpyvcp.app.launcher][[36mINFO[0m] Loading POSTGUI_HALFILE: /home/user/linuxcnc/configs/Siegfried/probe_basic_postgui.hal (launcher.py:96)So - the AXIS run fine with my hal and ini - then the SIM of probe-basic works fine after installation - then i have make the few modification above. Copy the files etc... now... i have make it again and the same errors...
/home/user/linuxcnc/configs/Siegfried/probe_basic_postgui.hal:7: Pin 'halui.program.is-idle' was already linked to signal 'pdnt.program.is-idle'
Failed to load POSTGUI_HALFILE with error: 1
it appears you have a conflict with your pendant. need to sort that to remove this error.
Please Log in or Create an account to join the conversation.
- nighteagle
- Offline
- Senior Member
Less
More
- Posts: 72
- Thank you received: 6
24 Oct 2023 07:28 - 24 Oct 2023 07:36 #283671
by nighteagle
Replied by nighteagle on topic Py3 - Probe Basic Config Conversion Doc Lcnc 2.9+
Hello and thank you for the help,
warnings are cleared now by me - because some setting testing - i had double entries.
But this one problem:
Pin 'halui.program.is-idle' was already linked to signal 'pdnt.program.is-idle'
So have found the pendant in chinahandrad.hal - for an usb JOG i have installed.
Have to merge something - but how is the right way?
here the ini and hals:
warnings are cleared now by me - because some setting testing - i had double entries.
But this one problem:
Pin 'halui.program.is-idle' was already linked to signal 'pdnt.program.is-idle'
So have found the pendant in chinahandrad.hal - for an usb JOG i have installed.
Have to merge something - but how is the right way?
here the ini and hals:
Attachments:
Last edit: 24 Oct 2023 07:36 by nighteagle.
Please Log in or Create an account to join the conversation.
- nighteagle
- Offline
- Senior Member
Less
More
- Posts: 72
- Thank you received: 6
24 Oct 2023 07:39 - 24 Oct 2023 07:41 #283674
by nighteagle
Replied by nighteagle on topic Py3 - Probe Basic Config Conversion Doc Lcnc 2.9+
Here the linked signals in chinahandrad.hal
So can i outcomment it - because it is in the other hal also?
# program related signals net pdnt.program.is-idle whb.halui.program.is-idle halui.program.is-idle
So can i outcomment it - because it is in the other hal also?
Last edit: 24 Oct 2023 07:41 by nighteagle.
Please Log in or Create an account to join the conversation.
26 Nov 2023 09:38 #286536
by dpslwk
Replied by dpslwk on topic Py3 - Probe Basic Config Conversion Doc Lcnc 2.9+
in probe_basic_postgui.hal try replacing
with
net prog-running not.0.in <= halui.program.is-idle
net prog-paused halui.program.is-paused
with
net pdnt.program.is-idle => not.0.in
net pdnt.program.is-paused => time.0.pause
Please Log in or Create an account to join the conversation.
07 Dec 2023 12:10 - 07 Dec 2023 12:13 #287437
by Unlogic
Replied by Unlogic on topic Py3 - Probe Basic Config Conversion Doc Lcnc 2.9+
I think it might be a good idea to update the first post in this thread with a comment after the following the line mentioning that metric users need to change from G20 to G21.
[RS274NGC]
RS274NGC_STARTUP_CODE = F10 S300 G20 G17 G40 G49 G54 G64 P0.001 G80 G90 G91.1 G92.1 G94 G97 G98
It's mentioned in other threads here on the forum but it's easy to miss for rookies (like me) following this guide.
[RS274NGC]
RS274NGC_STARTUP_CODE = F10 S300 G20 G17 G40 G49 G54 G64 P0.001 G80 G90 G91.1 G92.1 G94 G97 G98
It's mentioned in other threads here on the forum but it's easy to miss for rookies (like me) following this guide.
Last edit: 07 Dec 2023 12:13 by Unlogic.
Please Log in or Create an account to join the conversation.
Time to create page: 0.467 seconds