
Modbus communication with HuanYang VFD and PlanetCNC TNG – Part 2
If connection test was successful, and you can see parameter values displayed in the output window, then we can continue with next step, which is controlling the spindle. In settings under File/Settings/User Interface/Commands/Spindle Command -> enable option Uses M-Code: Type M3/M4 into the MDI window and hit Enter. Inverter should start the spindle at set […]

Modbus communication with HuanYang VFD and PlanetCNC TNG – Part 1
This tutorial will describe the necessary steps for successful control of your HuanYang VFD(model: HY01D523B) using PlanetCNC TNG software. Before we start, I would really recommend reading tutorials related to serial communication, MODBUS and PlanetCNC TNG software. These tutorials explain the tools provided by PlanetCNC and how to use them in order to communicate with […]

Serial communication(MODBUS relay board) with PlanetCNC TNG – Part 4
Last part of this tutorial series will describe how to properly design the expression code for Modbus serial communication. In previous part we made two expression functions. One was responsible for turning relay ON the other one for turning it OFF. Our main concern was just to make it work, to see that relay clicks […]

Serial communication(MODBUS relay board) with PlanetCNC TNG – Part 3
In this part, we will use and configure Expr.txt file so that we will be able to control relay board via serial communication using Modbus protocol. Expression array and serial functions described in first two parts will be used in order to achieve this. Modbus supports communication to and from multiple devices connected to […]

Serial communication(MODBUS relay board) with PlanetCNC TNG – Part 2
We will continue with expression functions used for serial communication. In first part we described array expression functions, which are used to prepare the data for serial communication. Now we will describe serial expression functions that are responsible for actually sending the data. serial_list() - Displays all available COM ports of computer. serial_info(port) - Displays […]

Serial communication(MODBUS relay board) with PlanetCNC TNG – Part 1
This series of tutorials will try to explain and demonstrate how to use PlanetCNC TNG software for the means of serial communication. The final goal would be a successful control of external MODBUS input/output relay board, but, to achieve this, we need to start with the basics. PlanetCNC TNG software possesses all the tools […]

CNC machine semaphore application, using expressions (Expr.txt) – Part 3
At this step of the process we pretty much defined everything needed for semaphore application and we can begin writing the program. Diagram of program First we will illustrate simple program diagram(flowchart). Diagram is very helpful, because it visually illustrates the program flow(in this case state machine) which we can use as a reference when […]

CNC machine semaphore application, using expressions (Expr.txt) – Part 2
What is a State Machine and how it is used? If you google State machine, this would be the average result more or less: “A state machine is a behaviour model. It consists of a finite number of states and is therefore also called finite-state machine (FSM). Based on the current state and a given […]

CNC machine semaphore application, using expressions (Expr.txt) – Part 1
For this multi-part tutorial we will create CNC machine semaphore(signal tower lamp). We hope that this tutorial will serve as a good example on how to set application goals and requirements as also on how to define the tools and solutions for achieving them, while using powerful tools and flexibility of PlanetCNC motion control system. […]

Using PRINT command with PlanetCNC TNG software
PRINT command will display any text, variable or parameter value used in PlanetCNC TNG or gcode program. It can be considered as a debug tool, trough which user can observe and diagnose execution of program. As an output, PRINT command uses Output window/panel: Example 1: Click in the MDI window and type this text: […]

Program debugging in PlanetCNC TNG software
Debugging tools in PlanetCNC TNG For purposes of program observation or debugging, user can use PRINT and LOG commands, output window and state tabs for parameter value display. G-code ref manual will also come very handy. Output window To show/hide output panel in PlanetCNC TNG main window, click the middle square symbol in the upper […]

Gcode in PlanetCNC TNG software
PlanetCNC TNG is a motion control software intended for control of CNC machines. As a standard, g-code is used as native programming language. PlanetCNC TNG software processes gcode program and sends series of commands to motion controller. Controller interprets these commands and arranges coordinated machine motion. Gcodes G-code commands can be divided into multiple […]