Configuration File Conversion Doc for Probe Basic Py3

08 Mar 2023 16:30 - 08 Mar 2023 17:01 #266123 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:

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.

MACHINE = (your_machine_name_here)

DISPLAY = probe_basic
CONFIG_FILE = custom_config.yml
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***

# ***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

# ***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/
#PATH_APPEND = /home/(your_machine_name_here)/linuxcnc/configs/(your_config_folder_name_here)/python/

RS274NGC_STARTUP_CODE = F10 S300 G20 G17 G40 G49 G54 G64 P0.001 G80 G90 G91.1 G92.1 G94 G97 G98
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

COMM_WAIT = 0.010

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

AXES = 5

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 =>


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!

Last edit: 08 Mar 2023 17:01 by Lcvette.
The following user(s) said Thank You: tommylight, besriworld, sharp_reaper, Ac1dburn, Stepping3D, CNC_ANDI, KpAtch3s

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

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