586,065 active members*
4,884 visitors online*
Register for free
Login
IndustryArena Forum > Machine Controllers Software and Solutions > PlanetCNC > How to specify what Axis you want to use from a Dialog Window - Scripting on TNGv2
Results 1 to 2 of 2
  1. #1
    Join Date
    Apr 2017
    Posts
    3

    How to specify what Axis you want to use from a Dialog Window - Scripting on TNGv2

    Hello folks, I am trying to modify the following script for Mach3:

    It attempts to capture the backlash for a chosen axis using a dial indicator.

    UCCNC Macro
    http://bit.ly/2OFAJxd

    Mach3 Macro
    http://bit.ly/2PSXnP6

    In both scripts it asks for an end user to select which axis they want to test; X, Y or Z.

    I have attempted to recreate the script for use with the latest TNG/planet-cnc program, like so.:

    %
    (name,EnterAxis)


    (dlgname,EnterAxis)
    (dlg,Enter AXIS X Y or Z, typ=label, x=20, w=280, color=0xffa500)
    (dlg,AXIS To Move, x=0, dec=0, def=X, param=axistomove)
    (dlg,Press OK to continue, typ=label, x=120, w=170, color=0xffa500)
    (dlgshow)

    Simply put, trying to capture the answer; X, Y or Z as an input variable.

    How could I then go about specifying to move 1mm for the chosen axis, for example, I have tried.

    G1 #<axistomove>1
    g04 p1

    BUT the syntax is wrong for the G1 movement command. I have also tried a bunch of other combinations, but I cant seem to specify the axis as the parameter to set. I can easily specify X for the axis and then a parameter to move for, but not the actual axis and then a hardcoded movement value.

    Any help, much appreciated.

    Chris





  2. #2
    Join Date
    Mar 2017
    Posts
    1312

    Re: How to specify what Axis you want to use from a Dialog Window - Scripting on TNGv

    %
    (name,Move Axis)
    (dlgname,Move Axis)
    (dlg,Select axis, typ=label, color=0xffa500)
    (dlg,|X|Y|Z, typ=checkbox, def=1, param=axis)
    (dlg,Press OK to continue, typ=label, x=120, w=170, color=0xffa500)
    (dlgshow)


    M73
    G91
    G00 H[#<axis>-1] E5
    %

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •