View Full Version : Scripting in TNG

10-28-2018, 03:36 AM
I have little understanding of scripting for TNC. Seems to be a prerequisite for full use of TNG at this time. I have viewed the Planet CNC tutorials on the subject and find them and myself, unfortunately inadequate to obtain a grasp of the subject.
Please could anyone suggest a route to enlightenment. I have books on Python, but without a specific incentive it is hard to stay with.
Guidance very much appreciated!

10-28-2018, 05:38 AM
There is no need to use or know Python.
You need to know basic g-codes.
Most important is than you understand what you want from machine.

Old software has a lot of settings. Even I have troubles knowing all of them, specially if it is not used very much. When user wants to set something uncommon they usually ask as for help. Sometimes solution is not possible and this is very frustrating.
With scripts almost everything is possible. It is also easy to understand because everything is done same way.

But I know that basic things need to be done without using scripts and more and more features get integrated - scripts are already made for convenience. There will be more and more such things. After all, I want TNG to be the best and most friendly of all programs.

10-28-2018, 07:07 AM
With respect, you say "With scripts almost everything is possible. It is also easy to understand because everything is done same way."

* So at this time I need to understand it. Since I surely do not find it easy to understand at the moment!

I know my GCodes reasonably well. But that is not scripting, as some of the TNC features currently require.

So I again appeal - Is there a source of learning that I can access or purchase please??

10-28-2018, 07:45 AM
Scripts are nothing more than g-code.
Lets discuss what actual requirements really are. Without special requirements scripting is not needed.
What do you want to do?

10-28-2018, 09:14 AM
OK Thanks.
To begin. I can see the gcode within a script such as "User defined" / "Pocket rectangle" But I am not familiar with the operators. i.e. the green and gold coloured comments. If you could explain a little about those. I think it would help me. Also how to adjust the parameters. If it is just a form of advanced gcode I will study up. Since I only have a simple knowledge of gcode. I see from other posts, that I am not the only person afflicted.
Your kind assistance appreciated.

10-28-2018, 10:03 AM
Here is very basic tutorial:

We will make more advanced one shortly.

10-28-2018, 10:26 AM
Yes I had read and can understand "the principle" very well.
But it is also a good example of what I do not understand. That is, in your example "(name,Spindle ON, 1)" Could you help me to interpret, or learn to interpret, this text/syntax.

10-28-2018, 12:05 PM
This line means that script will be available under "Machine/User Defined" menu as "Spindle ON".

You need to try these tutorials for yourself and I'm sure they will be much more understandable.