585,733 active members*
4,817 visitors online*
Register for free
Login
Results 1 to 7 of 7
  1. #1
    Join Date
    Jun 2017
    Posts
    143

    TNGv2 Home Script [SOLVED]

    I think there may be a bug in the new home script. At present if I home my machine and then move to machine position X0 Y0 it triggers the limit switches. I think this is because the #<_home_swdist> isn't being added when setting the machines position in the script. I have replaced both lines 63 and 68 with this and now the homing works as expected.

    Code:
    G10 L9 H#<axis> E[#<_home_swpos_axis|#<axis>> + #<dir> * #<_home_swdist>]
    Cheers
    Simon

  2. #2
    Join Date
    Mar 2017
    Posts
    1304

    Re: TNGv2 Home Script - possible bug?

    This is by design.
    Limit switches can be different. Using "_home_swdist" value in G10 L9 will not be optimal. However if used just for return move it does not have impact.
    In your case, to avoid X0 Y0 error you need to set "Switch Position" to X-1 Y-1.
    I can explain issue in more detail if needed.

  3. #3
    Join Date
    Jun 2017
    Posts
    143

    Re: TNGv2 Home Script - possible bug?

    I am not sure this is a good improvement. Previously swdist was called hysteresis which I think was a better description and was more easily explained. I would be happy to hear your reasons for the change. I suspect it may confuse quite a few other people as well.

  4. #4
    Join Date
    Mar 2017
    Posts
    1304

    Re: TNGv2 Home Script - possible bug?

    In new version "switch position" means exactly what it says. Position where switch was triggered. Don't confuse this with machine limit. Limit should be less than this.

    Suppose you have X and Y axes with large industrial switches that need 20mm to release and Z axis with just 50mm travel and switch that needs just 1mm to release. Some sort of large cutter for example.
    There is no way to configure this old way without loosing half of Z axis travel.

  5. #5
    Join Date
    Jun 2017
    Posts
    143

    Re: TNGv2 Home Script - possible bug?

    Ok, that describes the problem that needs solving well. Just a thought, but might it not be better to define hysteresis on each axis rather than a single figure for all? I see that what you have done addresses this but it does seem quite confusing.

  6. #6
    Join Date
    Jun 2017
    Posts
    143

    Re: TNGv2 Home Script - possible bug?

    Thinking about this some more. If you had different types of limit switches on different axis as you pointed out is possible, wouldn't you need to specify the hysteresis for each axis? In your example for the script to work you would need to specify a value greater than 20mm for switch distance so that the switches would release in all axis, which you probably wouldn't want for the z axis in this case (especially if you are using home_speed_low). Something else to consider from your example, you would probably want to be able to specify different home_speed and home_speed_low for each axis. Imagine how long it would take to home the X/Y axis on a large machine if only moving at 100mm/minute, or what would happen on the Z axis if you set the home_speed to 2000mm/minute? I may be completely wrong, but I think it might need some more consideration.

  7. #7
    Join Date
    Mar 2017
    Posts
    1304
    For those special machines that need different speeds one can easily modify script.

    I did consider having separate return distance setting for each axis. It was just too much and it looked complicated.

    Switch position setting is exactly what name suggests and is easy to explain. Take a look at our first tutorial and how hard it was to explain what you are suggesting. I know because I need to deal with user support.

    The way it is the implemented now makes perfect sense, there are no major limitations or drawbacks.

    End of discussion

Similar Threads

  1. TNGv2 for Mac OSX
    By tantemay in forum PlanetCNC
    Replies: 47
    Last Post: 08-24-2023, 07:12 PM
  2. [TNGv2] - Expr.txt
    By PlanetCNC in forum PlanetCNC
    Replies: 14
    Last Post: 05-29-2023, 06:20 PM
  3. [TNGv2] - 2019-11-08
    By PlanetCNC in forum PlanetCNC
    Replies: 0
    Last Post: 11-09-2019, 02:15 AM
  4. [TNGv2 - API]
    By PlanetCNC in forum PlanetCNC
    Replies: 0
    Last Post: 10-27-2019, 11:23 PM
  5. Starting script needed for home made cnc machine
    By solly747 in forum G-Code Programing
    Replies: 7
    Last Post: 08-28-2019, 04:42 PM

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
  •