Share this

Quick Start Guide | Part 2: How to Develop a ZBasic Motion Controller Program?

2026-04-06 05:59:21 · · #1

Today we'll share with you how to develop a ZBasic motion controller program.

ZBasic programming, based on positive motion technology, is characterized by its simplicity, clear logical structure, and ability to meet various programming requirements, making it widely used today. It provides all standard program syntax: variables, arrays, conditional statements, loops, and mathematical operations. Furthermore, extended instructions and functions offer extensive motion control capabilities.

ZBasic motion controller program development

First, you need to create a new folder on your computer to save the project you are about to create. Open the ZDevelop programming software. The ZDevelop software version used for this example is V3.00.02. For the latest software version, please refer to [link/reference needed].


Click to download : The latest version of ZDevelop software


Video Tutorial : How to Develop a ZBasic Motion Controller Program?


Menu bar: "File" - "New Project".



After clicking "New Project", the "Save As" interface will pop up. Select a folder to open, enter a file name and save the project with the extension ".zpj".


2. Create a new file

Menu bar: "File" - "New File".


After clicking "New File", the following pop-up window will appear. Select "basic" as the new file type and confirm. Mixed programming of Basic/Plc/HMI is supported.


3. Set the file to run automatically

Double-click the location on the right side of the file where it will run automatically, and enter the task number "0".

4. Editing program

Once the program is written, click "Save File".

The newly created basic file will be automatically saved to the same directory as the project zpj.

5. Connect to the controller

Edit the program in the program input window, click "Controller" - "Connect". If there is no controller, you can choose to connect to the simulator for simulation. Click "Connect" - "Connect to Simulator".

Clicking "Connect" will bring up the "Connect to Controller" window. You can choose to connect via serial port or Ethernet port. After selecting the matching serial port parameters or Ethernet IP address, click Connect. A successful connection will be indicated by the following command and output window: Connected to Controller: ZMC432 Version: 4.64-20170623.

 

6. Download the program

Click the menu bar button "RAM" - "Download to RAM" or the button "ROM" - "Download to ROM". A successful download will be indicated in the command and output window. At the same time, the program will be downloaded to the controller and run automatically.

Successfully downloaded to RAM:

ROM downloaded successfully:



Programs downloaded to RAM are not saved after a power outage, while programs downloaded to ROM are saved. Programs downloaded to ROM will automatically run according to their task number the next time the controller is connected.

7. Start debugging

Click "Debug" - "Start/Stop Debugging" in the menu bar to open the Tasks and Monitoring window.

The task window is used to view the running status of multiple tasks and the task line number, while the monitor window is used to monitor information such as axis parameters, custom variables, and input/output status.

8. Oscilloscope sampling

Open the oscilloscope window by selecting "View" - "Oscilloscope" from the menu bar, as shown in the image below:

Open "Settings," select the number of channels, depth, interval, and other parameters to be acquired, and confirm. Here, we select to sample five channels: DPOS for axis 0 and axis 1, VP_SPEED for the main spindle speed of the interpolation motion, and MSPEED for the component speeds of axis 0 and axis 1. After setting, click the "Start" button. Enter the SUB motion program execution condition "modbus_bit(0)=1" in the online command bar to trigger oscilloscope sampling. After executing the motion program, the following waveform data is sampled. X

The trajectory in Y mode is as follows:


That concludes today's sharing on ZBasic motion controller program development from ZhengYun Technology. For more exciting content, please follow our official WeChat account.

This article was originally created by Zheng Motion Assistant. We welcome everyone to reprint it for mutual learning and to improve China's intelligent manufacturing capabilities. Copyright belongs to Zheng Motion Technology. Please indicate the source if you reprint this article.

Regarding positive motion techniques:

Zheng Motion Technology is a national high-tech enterprise specializing in the research and application of motion control technology. It primarily engages in the research, development, production, sales, and service of motion controllers, motion control cards, IO expansion modules, and integrated motion display and control systems. The company has assembled outstanding talent from companies such as Huawei and ZTE. While adhering to independent innovation, it actively collaborates with major universities to dedicate itself to the research and application of motion control technology. It is one of the fastest-growing companies in China's industrial control field and a leading enterprise in China that has fully mastered core motion control technologies and real-time industrial control software platform technologies.

Read next

Analysis: Latest Developments in Automotive Drive Belt Technology

Automotive drive belts are crucial components of car engines and an integral part of the transmission belt system. Many ...

Articles 2026-02-22
CATDOLL Luisa Soft Silicone Head

CATDOLL Luisa Soft Silicone Head

Articles
2026-02-22
CATDOLL 138CM Ya Torso Doll

CATDOLL 138CM Ya Torso Doll

Articles
2026-02-22
CATDOLL Oksana Soft Silicone Head

CATDOLL Oksana Soft Silicone Head

Articles
2026-02-22