Application of EtherCAT Motion Controller in CNC Handwheel Tracking

Click the aboveMotion Assistant, stay tuned for updates!

This article takes the ZMC408CE motion controller with a dedicated handwheel interface from Motion Technology as an example to introduce the handwheel, its functions and principles, the wiring of the controller’s handwheel interface, and the configuration of the handwheel program.

01
Functions and Principles of the Handwheel
The handwheel, also known as a manual pulse generator, is mainly used for CNC machine tools, 3D processing centers, horizontal processing centers, and gantry processing centers and other CNC equipment.When the handwheel rotates, the encoder generates signals corresponding to the movement of the handwheel, which are used by the CNC system to select coordinates and position them.
The manual pulse generator has a photoelectric code disk with a central axis, which has ring-shaped light and dark markings. After shaking the handwheel, the photoelectric transmitter and receiver read the markings, obtaining two sets of sine wave signals HA and HB, each with a phase difference of 90 degrees.Because the signals HA and HB are 90 degrees out of phase, the direction of rotation can be determined by whether A phase leads or B phase leads, which generates forward or reverse pulses to control the servo motor’s direction.

Application of EtherCAT Motion Controller in CNC Handwheel Tracking

02
Introduction to the Handwheel
1.Use the “Axis Selection Knob” on the handwheel to select the coordinate axis that needs to be moved;

2.Use the “Magnification Selection Knob” to choose the appropriate movement magnification (×1/×10/×100);

3.Rotate the “handwheel handle” to move the coordinate axis. Clockwise rotation is forward movement, counterclockwise rotation is backward movement, and the speed of rotation can control the speed of the coordinate axis;

4. The “Emergency Stop” button stops the handwheel movement immediately;

5. The controller’s handwheel interface is a dual-row standard DB15 female connector, requiring the handwheel connector to be a dual-row standard DB15 male connector.

Application of EtherCAT Motion Controller in CNC Handwheel Tracking

Application of EtherCAT Motion Controller in CNC Handwheel Tracking

Handwheel interface diagram

03
Wiring of the Controller Handwheel Interface

1. Hardware Introduction

The case uses the ZMC408CE motion controller, which has a dedicated handwheel interface.

Application of EtherCAT Motion Controller in CNC Handwheel Tracking

The ZMC408CE is a high-performance EtherCAT bus motion controller launched by Motion Technology, utilizing advanced FPGA technology for hardware position comparison output and precise output functions, ensuring outstanding performance and stability in continuous trajectory processing, as well as real-time dynamic data capture for more precise control and improved production efficiency and quality.

The ZMC408CE supports EtherCAT bus axes + pulse axis mixed interpolation, can operate offline or online, controls up to 8 motor axes, with special models providing options for 16 or 32 axes, and supports ZDevelop + various advanced upper computer mixed programming, enabling point-to-point motion, electronic cam, linear interpolation, circular interpolation, continuous trajectory processing, and control of 30+ robot models.
ZMC408CE Product Highlights
1. High-performance processor, improving computation speed, response time, and scanning cycle;

2. One-dimensional/two-dimensional/three-dimensional, multi-channel vision flying capture, high-speed and high-precision;

3. Position synchronous output PSO, precise control over glue dispensing and laser energy control during continuous trajectory processing;

4. Multi-axis synchronous control, independent control of multiple coordinate systems;

5. EtherCAT synchronous cycle as fast as 125us;

6. EtherCAT bus and pulse axis mixed interpolation;

7. Linear interpolation, arbitrary space circular interpolation, spiral interpolation, spline interpolation, etc.;

8. Flexible application, can be developed on PC or run independently offline;;

ZMC408CE Video Introduction

2. Definition of Controller Handwheel Interface MPG

Interface

Pin Number

Signal

Description

Application of EtherCAT Motion Controller in CNC Handwheel Tracking

1

H-5V

5V power output positive, dedicated to powering the handwheel

2

HA-

Encoder A phase signal (IN40)

3

HB-

Encoder B phase signal (IN41)

4

HEMGN

Emergency stop signal (IN51)

5

NC

Unused

6

HX1

Select X1 magnification (IN42)

7

HX10

Select X10 magnification (IN43)

8

HX100

Select X100 magnification (IN44)

9

HSU

Axis select 3 (IN48)

10

HSV

Axis select 4 (IN49)

11

EGND

5V power output negative, common signal

12

HSW

Axis select 5 (IN50)

13

HSZ

Axis select 2 (IN47)

14

HSY

Axis select 1 (IN46)

15

HSX

Axis select 0 (IN45)

Note:

1. The 5V power output is only for powering the handwheel, do not use it to power other devices.

2. All signals in this interface are digital input signals, numbered IN (40-51).

3. Handwheel Wiring Reference

Application of EtherCAT Motion Controller in CNC Handwheel Tracking

4. Precautions
The wiring principle of the handwheel encoder axis interface is shown in the above figure. The designs by handwheel manufacturers vary widely; please check the internal design diagram of the handwheel and confirm with the motion controller before wiring cautiously;Please use twisted shielded cables, especially in harsh environments, and ensure the shielding layer is adequately grounded.
04
Program Configuration
1. Refer to the above handwheel wiring diagram to correctly connect the handwheel and controller;

2. After powering on, please select any of the Ethernet, RS232, or RS485 interfaces to connect to ZDevelop;

3.Configure Axis Number: The controller’s handwheel interface has no available default AXIS axis number (mapping must avoid pulse axis numbers), it must be remapped, the operation steps are as follows:
BASE(目标轴号)     'Remap axis numberATYPE(目标轴号)=0  'Set axis type to 0BASE(8)            'Initial axis number of handwheel interface 8 (invalid)ATYPE(8)=0         'Set initial axis type of handwheel interface to 0AXIS_ADDRESS (目标轴号)= (-1<<16)+8      'Bind initial axis number 8 to target axis numberATYPE(目标轴号)=3     'Set handwheel axis type to orthogonal encoder type
4.Configure IO: Assign axis selection (HSX, HSY, HSZ, HSU) and magnification (HX1, HX10, HX100) and emergency stop (HEMGN) functions as needed; these signals are essentially digital input signals with fixed numbers (refer to the previous section), but have no fixed functions and requireZDevelop development; their names are recommended functional configurations, where axis selection refers to the connected axis for CONNECT synchronous motion, and magnification refers to the CONNECT ratio.
5. Once the above configurations are complete, you can start using the handwheel.

Sample program below, running the program below will enable control of the handwheel.

'Different controller models have different handwheel axis numbers, magnifications, and axis selection IN numbers, refer to the controller's user manual. This example uses the controller model ZMC408CE' Different handwheel control axes can vary; this example controls 6 axes'Axis number settingsglobal const axis_X  = 0    'X axisglobal const axis_Y  = 1    'Y axisglobal const axis_Z  = 2    'Z axisglobal const axis_U  = 3    'U axisglobal const axis_V  = 4    'V axisglobal const axis_W  = 5    'W axisglobal const def_R      = 8    'Default axis number for handwheelglobal const axis_R  = 10    'Remapped axis number for handwheel 'Magnification IN number settingsconst io_Handlow = 42  '1 magnificationconst io_Handmid = 43  '10 magnificationconst io_Handhigh = 44  '100 magnification 'Axis selection IN number settings const io_HandX = 45    'Handwheel X axisconst io_HandY = 46    'Handwheel Y axisconst io_HandZ = 47     'Handwheel Z axisconst io_HandU = 48   'Handwheel U axisconst io_HandV = 49     'Handwheel V axisconst io_HandW = 50   'Handwheel W axis 'Emergency stop signal IN number settingsconst io_HandEMGN = 51   'Emergency stopglobal dim conflag      'Handwheel connected axis flagconflag = -1ATYPE(def_R) = 0 'Restore axis 8 axis typeATYPE(axis_R) = 0 'Restore axis 10 axis typeAXIS_ADDRESS(axis_R) = (-1<<16)+ def_R 'Map MPG handwheel axis address to axis 10ATYPE(axis_R) = 3 'Set handwheel axis type to orthogonal encoder typeUNITS(axis_R) = 1 'Set handwheel axis pulse equivalent pulse to unitWhile 1  if  in(io_handX) = on  then    if in(io_handlow) = on then      connect(1, axis_R) axis(axis_X)  'Link to axis X, magnification 1    elseif in(io_handmid) = on then      connect(10, axis_R) axis(axis_X)  'Link to axis X, magnification 10    elseif in(io_handhigh) = on then      connect(100, axis_R) axis(axis_X)  'Link to axis X, magnification 100    endif    conflag = axis_X  elseif  in(io_handY) = on  then    if in(io_handlow) = on then      connect(1, axis_R) axis(axis_Y)      elseif in(io_handmid) = on then      connect(10, axis_R) axis(axis_Y)      elseif in(io_handhigh) = on then      connect(100, axis_R) axis(axis_Y)      endif    conflag = axis_Y  elseif  in(io_handZ) = on  then    if in(io_handlow) = on then      connect(1, axis_R) axis(axis_Z)    elseif in(io_handmid) = on then      connect(10, axis_R) axis(axis_Z)      elseif in(io_handhigh) = on then      connect(100, axis_R) axis(axis_Z)      end if    conflag = axis_Z  elseif  in(io_handU) = on  then    if in(io_handlow) = on then      connect(1, axis_R) axis(axis_U)    elseif in(io_handmid) = on then      connect(10, axis_R) axis(axis_U)      elseif in(io_handhigh) = on then      connect(100, axis_R) axis(axis_U)      endif    conflag = axis_U  elseif  in(io_handV) = on  then    if in(io_handlow) = on then      connect(1, axis_R) axis(axis_V)    elseif in(io_handmid) = on then      connect(10, axis_R) axis(axis_V)      elseif in(io_handhigh) = on then      connect(100, axis_R) axis(axis_V)      endif    conflag = axis_V  elseif  in(io_handW) = on  then    if in(io_handlow) = on then      connect(1, axis_R) axis(axis_W)    elseif in(io_handmid) = on then      connect(10, axis_R) axis(axis_W)      elseif in(io_handhigh) = on then      connect(100, axis_R) axis(axis_W)      endif    conflag = axis_W  elseif conflag <> -1 then    'Cancel connection    cancel(2) axis(conflag)    conflag = -1  elseif   in(io_HandEMGN) = off  then      RAPIDSTOP(2)  endif Wend

This time, Motion Technology shared the application of the EtherCAT motion controller in CNC handwheel tracking, here.

For more exciting content, please follow the “Motion Assistant” public account. For related development environments and example code, please consult Motion Technology sales engineers: 400-089-8936.

This article is original from Motion Technology. Everyone is welcome to reprint it for mutual learning and to improve China’s intelligent manufacturing level together. The copyright of this article belongs to Motion Technology. If reprinted, please indicate the source.

Review Previous Content

It’s time to announce the winners! Fans who participated in the “Motion Control System Application and Practice” book giveaway, look here

Book Giveaway! Fully Autonomous IDE of “Motion Control System Application and Practice”

Application of High Flexibility SS Acceleration and Deceleration Curve in Lithium Battery Welding

What are the differences between EtherCAT and Ethernet, and what does communication cycle mean?

In the era of Industrial Ethernet, how to choose a bus motion controller?

PSO Visual Flying Capture and Precise Output of Motion Controller C++ Development (III): Two-Dimensional/Three-Dimensional/Multi-Axis PSO Output

PSO Visual Flying Capture and Precise Output of Motion Controller C++ Development (II): Multi-Axis PSO Equidistant/Cyclic Output

PSO Visual Flying Capture and Precise Output of Motion Controller C++ Development (I): Single Axis PSO

Eight-Channel PSO of Motion Controller Visual Flying Capture and Precise Output

Windows Real-Time Motion Control Soft Core (VII): LOCAL High-Speed Interface Testing with Labview

Windows Real-Time Motion Control Soft Core (VI): LOCAL High-Speed Interface Testing with Matlab

Windows Real-Time Motion Control Soft Core (V): LOCAL High-Speed Interface Testing with VC6.0

Windows Real-Time Motion Control Soft Core (IV): LOCAL High-Speed Interface Testing with VB.NET

Windows Real-Time Motion Control Soft Core (III): LOCAL High-Speed Interface Testing with C++

Windows Real-Time Motion Control Soft Core (II): LOCAL High-Speed Interface Testing with Qt

Windows Real-Time Motion Control Soft Core (I): LOCAL High-Speed Interface Testing with C#

Open Laser Galvo Motion Controller: C++ Rapid Call Graphical Library Application

Open Laser Galvo Motion Controller: C++ Galvo Correction Methods and Implementation

Open Laser Galvo Motion Controller: C++ Rapid Development

Open Laser Galvo Motion Controller (V): ZMC408SCAN Fiber Laser Energy Control

Open Laser Galvo Motion Controller (IV): ZMC408SCAN Galvo Control for Fiber Laser Processing

Open Laser Galvo Motion Controller (III): ZMC408SCAN Axis Control for Fiber Laser Processing

Open Laser Galvo Motion Controller (II): ZMC408SCAN Laser Interface and Control

Open Laser Galvo Motion Controller (I): ZMC408SCAN Interface and Functions

PSO Position Synchronous Output of Motion Controller (III): High Precision Equidistant Two-Dimensional Three-Dimensional PSO Output

PSO Position Synchronous Output of Motion Controller (II): Detailed Explanation of PSO Mode

PSO Position Synchronous Output of Motion Controller (I): Hardware Platform and Introduction to PSO Commands

Economical EtherCAT Motion Controller (X): Quick Start Guide to EtherCAT Bus

Economical EtherCAT Motion Controller (IX): Use of Oscilloscope

Economical EtherCAT Motion Controller (VIII): Axis Parameters and Motion Commands

Economical EtherCAT Motion Controller (VII): Motion Buffering

Economical EtherCAT Motion Controller (VI): Data Storage

Economical EtherCAT Motion Controller (V): Multi-Task Operation

Economical EtherCAT Motion Controller (IV): ModbusRTU or ModbusTcp Communication with Touch Screen

Economical EtherCAT Motion Controller (III): PLC Realization of Multi-Axis Linear Interpolation and Electronic Cam

Economical EtherCAT Motion Controller (II): ZBasic Implementation of Multi-Axis Linear Interpolation Motion

Economical EtherCAT Motion Controller (I): Function Introduction and Application Scenarios

Motion Control + Machine Vision Demo Software Framework (III): Visual Correction + Continuous Interpolation Recipe Editing

Motion Control + Machine Vision Demo Software Framework (II): Mobile Calibration and Shape Matching

Motion Control + Machine Vision Demo Software Framework (I): Management of Mechanical Parameters and Recipe Files

Overview of Motion Control + Machine Vision Demo Software Framework System

Open Laser Galvo + Motion Controller (VI): Dual Galvo Motion

Open Laser Galvo + Motion Controller (V): Introduction to ZMC408SCAN Controller Hardware

Open Laser Galvo + Motion Controller (IV): Application of PSO Position Synchronous Output in Laser Galvo Processing

Open Laser Galvo + Motion Controller (III): Galvo Correction

Open Laser Galvo + Motion Controller (II): Galvo Filling

Open Laser Galvo + Motion Controller (I): Hardware Interface

Application of EtherCAT Axis Expansion Module EIO16084 in Motion Control Systems
Quick Debugging and Diagnosis of Pulse Interface in EtherCAT Motion Controllers
Usage of ZMIO300 Module in EtherCAT Motion Controllers
PLC Programming of EtherCAT Motion Controllers (IV) Electronic Cam
PLC Programming of EtherCAT Motion Controllers (III) Electronic Gear
PLC Programming of EtherCAT Motion Controllers (II) Circular Interpolation
PLC Programming of EtherCAT Motion Controllers (I) Linear Interpolation

Quick Start | Part Twenty-One: Introduction to ZHMI Configuration Programming of Motion Controllers

Quick Start | Part Twenty-One: Custom Communication of Motion Controllers by Motion Technology

Quick Start | Part Twenty: Modbus Communication of Motion Controllers by Motion Technology

Quick Start | Part Nineteen: Multi-Axis Synchronization and Electronic Cam Command Introduction of Motion Controllers by Motion Technology

Quick Start | Part Eighteen: Use of Pulse Type Motion Controllers by Motion Technology

Quick Start | Part Seventeen: Use of Multi-Axis Interpolation Motion Commands of Motion Controllers by Motion Technology

Quick Start | Part Sixteen: Quick Start Guide to EtherCAT Bus of Motion Controllers by Motion Technology

Quick Start | Part Fifteen: Introduction to Motion Buffering of Motion Controllers by Motion Technology

Quick Start | Part Fourteen: Basic Axis Parameters and Basic Motion Control Commands of Motion Controllers by Motion Technology

Quick Start | Part Thirteen: Use of ZDevelop Programming Software for Motion Controllers by Motion Technology

Quick Start | Part Twelve: Use of USB Interface of Motion Controllers by Motion Technology

Quick Start | Part Eleven: Application of Interrupts in Motion Controllers by Motion Technology

Quick Start | Part Ten: Features of Multi-Task Operation of Motion Controllers by Motion Technology

Quick Start | Part Nine: How to Apply Oscilloscope with Motion Controllers by Motion Technology?

Quick Start | Part Eight: How to Use EtherCAT Bus of Motion Controllers by Motion Technology?

Quick Start | Part Seven: How to Use ZCAN Bus Expansion Module of Motion Controllers by Motion Technology?

Quick Start | Part Six: How to Apply Data and Storage with Motion Controllers by Motion Technology?

Quick Start | Part Five: How to Apply Input/Output IO of Motion Controllers by Motion Technology?

Quick Start | Part Four: How to Communicate with Touch Screen using Motion Controllers by Motion Technology?

Quick Start | Part Three: How to Develop ZPLC Program using Motion Controllers by Motion Technology?

Quick Start | Part Two: How to Develop ZBasic Program using Motion Controllers by Motion Technology?

Quick Start | Part One: How to Upgrade Firmware of Motion Controllers by Motion Technology?

Configuration and Implementation of EtherCAT and RTEX Driver Axis Zeroing

Application of G-code on Motion Controllers

Custom G-code Programming Application for Motion Controllers

Offline Simulation Debugging to Accelerate Project Progress!

Use of 8-Axis EtherCAT Axis Expansion Module EIO24088

Demo of Motion Controller Pursuit Cutting Application

Laser Galvo Control of Motion Controllers
Configuration and Implementation of Axis Zeroing of Motion Controllers

Application of Position Latching Function of Motion Controllers

Quick Start for ZMC Motion Controller SCARA Robot Application

Quick Start for RTEX Bus Usage of Motion Controllers

Usage of CAD Mapping Software with Controllers by Motion Technology

Advanced Application of EtherCAT Bus Motion Controllers

EtherCAT Motion Control Card Development Tutorial with Qt (Middle): Continuous Trajectory Processing, Pause and Resume

EtherCAT Motion Control Card Development Tutorial with Qt (Upper): Development Environment Configuration and Simple Motion Control Application

EtherCAT Motion Control Card Development Tutorial with Python

Application of EtherCAT Motion Control Card for SCARA and Other Robot Instructions

Synchronization of PWM and Analog Output with Motion Speed of EtherCAT Motion Control Card

Hardware Comparison Output and Encoder Latching of EtherCAT Motion Control Card

IO Actions and Motion Control Synchronization of EtherCAT Motion Control Card

Real-Time Program Operation and Read/Write Control of EtherCAT Motion Control Card

Pause, Resume, and System Safety Settings of EtherCAT Motion Control Card

Continuous Interpolation Motion of EtherCAT Motion Control Card with Small Line Segments

Multi-Axis Interpolation Motion and Handwheel Motion of EtherCAT Motion Control Card

Introduction to Auxiliary Debugging Tools and Methods of EtherCAT Motion Control Card

Axis Parameter Settings and Axis Motion of EtherCAT Motion Control Card

Hardware Wiring and C# Hardware Peripheral Read/Write and Zeroing Motion of EtherCAT Motion Control Card

Hardware Wiring and C# Single Axis Motion Control of EtherCAT Motion Control Card

Simple and Easy-to-Use Motion Control Card (XVI): Pitch Compensation and Reverse Gap Compensation

Simple and Easy-to-Use Motion Control Card (XV): Real-Time Program of PC Start-Stop Controller

Simple and Easy-to-Use Motion Control Card (XIV): Synchronization of PWM, Analog Output and Motion Control

Simple and Easy-to-Use Motion Control Card (XIII): Synchronization of IO Actions and Motion Control

Simple and Easy-to-Use Motion Control Card (XII): Safety Settings of Motion Control Systems

Simple and Easy-to-Use Motion Control Card (XI): Pause, Resume and Speed Magnification Settings of Motion

Simple and Easy-to-Use Motion Control Card (X): Continuous Interpolation and Small Line Segment Prediction

Simple and Easy-to-Use Motion Control Card (IX): Circular Interpolation and Spiral Interpolation

Simple and Easy-to-Use Motion Control Card (VIII): Linear Interpolation and Handwheel Motion

Simple and Easy-to-Use Motion Control Card (VII): One-Time Loading of Multiple Continuous Small Line Segment Data

Simple and Easy-to-Use Motion Control Card (VI): Basic File Download and Continuous Trajectory Processing

Simple and Easy-to-Use Motion Control Card (V): IO Configuration and Zeroing Motion

Simple and Easy-to-Use Motion Control Card (IV): Function Library Encapsulation

Simple and Easy-to-Use Motion Control Card (III): Axis Parameter Configuration and Single Axis Motion Control

Simple and Easy-to-Use Motion Control Card (II): Peripheral Read/Write and ZDevelop Diagnosis

Simple and Easy-to-Use Motion Control Card (I): Hardware Wiring and Upper Computer Development

Application of Motion Control Card in ROS (Lower)

Application of Motion Control Card in ROS (Upper)

EtherCAT Motion Control Card and LabVIEW Build Smart Equipment (V)

EtherCAT Motion Control Card and LabVIEW Build Smart Equipment (IV)

EtherCAT Motion Control Card and LabVIEW Build Smart Equipment (III)

EtherCAT Motion Control Card and LabVIEW Build Smart Equipment (II)

EtherCAT Motion Control Card and LabVIEW Build Smart Equipment (I)

Motion Control and Data Acquisition of EtherCAT Motion Control Card in LabVIEW

Application Development Tutorial of Motion Control Card in MATLAB

Application Development Tutorial of Motion Control Card in C++

Application Development Tutorial of Motion Control Card in Python

Application Development Tutorial of Motion Control Card in C#

Application Development Tutorial of Motion Control Card in Linux

Application Development Tutorial of Motion Control Card in VB.NET

Application Development Tutorial of Motion Control Card in VB6.0

Application Development Tutorial of Motion Control Card in VC6.0

Application Development Tutorial of Motion Control Card using Qt

Application Development Tutorial of Motion Control Card in LabVIEW

Application Development Tutorial of Motion Control Card for Laser Galvo Control

Application Development Tutorial of Motion Control Card for Hardware Comparison Output

About Motion Technology

Motion Technology focuses on research in motion control technology and the development of general motion control software and hardware products, is a national high-tech enterprise, with main products including motion controllers, motion control cards, vision motion control integrated machines, human-machine interfaces, and expansion modules.

Motion Technology brings together outstanding talents from companies such as Huawei and ZTE, actively collaborating with major universities to research the basic technologies of motion control while adhering to independent innovation, making it one of the fastest-growing companies in the domestic industrial control field, and one of the few companies in the country that fully masters core motion control technologies and real-time industrial control software platform technologies.

Motion Technology is backed by the booming manufacturing industry, keeping pace with the times, being innovative, and is committed to continuously improving the technical application and manufacturing level of intelligent manufacturing equipment suppliers and end-users. After years of application development with numerous partners, its products are widely used in various domestic and international fields such as 3C electronics, semiconductors, printing and packaging, textile and clothing, laser processing, mechanical processing, robotics, new energy, healthcare, and stage entertainment.

Application of EtherCAT Motion Controller in CNC Handwheel Tracking

Leave a Comment