User Tools

Site Tools


sdk:sdk

PlanetCNC SDK

There are two ways to use SDK with TNG:

Using TNG from an external application

In this method, TNG is controlled by an external process, such as a Python script, C# application or another application that can use C style API. When using TNG this way, the internal Python functionality is disabled, which may lead to “Python is disabled” message. There are two possible scenarios in this setup:

A) External connection to an already running TNG instance

In this case, the external application communicates with a TNG instance that's already running as a separate process. However, not all commands are available, and communication may be slower, making it less suitable for high-intensity operations.

B) Starting a new TNG instance as an in-process application

Here, the external application starts its own TNG instance using one of the Run commands. TNG runs as an integrated part of your application, allowing for faster communication and full command functionality. This approach lets you build your own application while using TNG as the core engine.

Example:
DemoCSharp.zip

Using Python internally within TNG

This method is mainly used for generating G-code and executing custom commands, though it also supports more advanced scenarios. For this to work, you need to set the path to the Python DLL in the settings. If configured correctly, clicking the “Check” button should display the Python version number.

Example:
Lissajous.py

sdk/sdk.txt · Last modified: 2024/10/10 10:57 by andrej

Page Tools