Gmoccapy no valid configuration found

More
27 Nov 2022 14:03 #257733 by harindugamlath
I'm getting this no valid configuration found when i try to use the auto tool measurement in gmoccapy. 

Simulated versions run fine. But anything i create with the stepconf seems to miss something. I tried copying the postgui hal from gmoccapy sim to the directory and including everything from the sim ini to my ini file but can't seem to get this to work?

What am i missing here? What is a best path to create a proper gmoccapy configuration?

Any help is appreciated.


Attachments:

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

More
27 Nov 2022 14:06 #257734 by harindugamlath
Here are my ini and hal files in case you need to see them

 

File Attachment:

File Name: CNC-ROUTER.hal
File Size:4 KB

File Attachment:

File Name: CNC-ROUTER.ini
File Size:3 KB
Attachments:

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

More
27 Nov 2022 17:27 - 27 Nov 2022 17:41 #257746 by harindugamlath
Last edit: 27 Nov 2022 17:41 by harindugamlath.

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

More
27 Nov 2022 17:42 #257748 by harindugamlath
 Ok. Got it to work. These are the steps if anyone finds themselves in a similar situation.
By this time I have created a working Gmoccapy config with stepconf (pnconf will have the same issue i guess)


1. Create a simulation config of Gmoccapy-tool_sensor from linuxcnc sims.
2. After the folders are created for the simulation config, Copy the folling to your machine config folder
  • macros folder
  • python folder
  • gmoccapy_tool_sensor.para
  • tool_sensor.hal


    3.Then copy these lines to your machine ini file from the Gmoccapy-tool_sensor ini file under the correct section. Ex- [DISPLAY]

    [DISPLAY] PREFERENCE_FILE_PATH = gmoccapy_tool_sensor.para

    [RS274NGC]
    RS274NGC_STARTUP_CODE = G17 G21 G40 G43H0 G54 G64P0.005 G80 G90 G94 G97 M5 M9
    PARAMETER_FILE = linuxcnc.var
    SUBROUTINE_PATH = macros


    # optional features - a bit mask to selectively turn on experimental/dubious features
    # see 
    # RETAIN_G43           0x00000001
    # OWORD_N_ARGS         0x00000002
    # INI_VARS             0x00000004
    # HAL_PIN_VARS         0x00000008
    # NO_DOWNCASE_OWORD    0x00000010
    # turn on all optional features

    # turn on optional features in this case just INI reading 
    FEATURES=12

    ON_ABORT_COMMAND=O <on_abort> call 

    # parameters exposed by change_prolog/evaluated by change_epilog:
    #    #<tool_in_spindle>
    #    #<selected_tool>
    #    #<current_pocket>
    #    #<selected_pocket>
    REMAP=M6  modalgroup=6 prolog=change_prolog ngc=change epilog=change_epilog


    # (this is probably already there) [HAL]  
    POSTGUI_HALFILE = custom_postgui.hal    

    **Under [EMCIO] if you have the following lines or similar please delete them.
    TOOL_CHANGE_POSITION = 100 100 -10
    TOOL_CHANGE_QUILL_UP = 1
    (Documentation describes the variables used are called differently to avoid any unwanted interactions, but they seems to interfere.)

    Finally at the end copy this to your ini. (change your locations accordingly)

    # section for main IO controller parameters
    [TOOLSENSOR]
    X = 00
    Y = 20
    Z = 0
    # abort change if no toolsensor contact after this probe distance
    MAXPROBE =  -20

    # this is not named TOOL_CHANGE_POSITION  on purpose - canon uses it and will
    # interfere
    [CHANGE_POSITION]
    X = 50
    Y = 0
    Z = 0

    # the Python plugins serves interpreter and task
    [PYTHON]
    PATH_PREPEND = python
    TOPLEVEL = python/toplevel.py
    LOG_LEVEL = 8

    # Motion control section


    4. Then in you hal file you will probably have something similar if you have a manual tool change selected.

    loadusr -W hal_manualtoolchange
    net tool-change iocontrol.0.tool-change => hal_manualtoolchange.change
    net tool-changed iocontrol.0.tool-changed <= hal_manualtoolchange.changed
    net tool-number iocontrol.0.tool-prep-number => hal_manualtoolchange.number
    net tool-prepare-loopback iocontrol.0.tool-prepare => iocontrol.0.tool-prepared

    5. remove those lines from your hal file and add these to your custopm_postgui hal file.

    loadusr -W hal_manualtoolchange
    net tool-change iocontrol.0.tool-change => hal_manualtoolchange.change
    net tool-changed iocontrol.0.tool-changed <= hal_manualtoolchange.changed
    net tool-number iocontrol.0.tool-prep-number => hal_manualtoolchange.number
    net tool-prepare-loopback iocontrol.0.tool-prepare => iocontrol.0.tool-prepared
    net tooloffset-z  gmoccapy.tooloffset-z  <=  motion.tooloffset.z


    6. After that hopefully Gmoccapy will happily to a auto touch off when you do a manual tool change. 
    This was the first time i came across such a thing and this was my solution to it. People who understand better will be able to do a better explanation. What I did was tried to figure out how the auto touch off worked and then pieced it together like a caveman.

    In case if you need here are my hal and ini files.

    File Attachment:

    File Name: CNC-ROUTER...1-27.ini
    File Size:4 KB

    File Attachment:

    File Name: custom_postgui.hal
    File Size:0 KB

    File Attachment:

    File Name: CNC-ROUTER...1-27.hal
    File Size:4 KB
Attachments:
The following user(s) said Thank You: andypugh, HansU

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

Moderators: newbynobiHansU
Time to create page: 0.538 seconds
Powered by Kunena Forum