The handwheel is also called the hand pulse generator, which is mainly used for CNC equipment such as CNC machine tools, three-dimensional machining centers, horizontal machining centers, and gantry machining centers. When the handwheel rotates, the encoder generates the signal that corresponds to the movement of the handwheel, and then the coordinates are selected and positioned by the CNC (computer numerical control) system.
The manual pulse generator has an axial photoelectric encoding disk in the center, and there are ring-shaped and dark engraved lines on it. After shaking the handwheel, it is read by the photoelectric transmitting and receiving devices to obtain 2 sets of sinusoidal signals HA, HB, and there is one 90 degrees phase difference between each sinusoidal signal. Since the HA and HB signals differ by 90 degrees, the direction of pulse rotation can be selected to control the forward rotation or reverse rotation of the servo motor through choosing whether the A phase is in the front or the B phase is in the front according to the difference.
(1) Select the coordinate axis to be moved through the "axis selection knob" on the handwheel.
(2) Select the appropriate moving ratio (×1/×10/×100) through the "magnification selection knob".
(3) Rotate the "hand wheel crank" to move the coordinate axis. Clockwise rotation is forward movement, counterclockwise rotation is inverse movement, and the speed of rotation can control the movement speed of the coordinate axis.
(4) Press the button "emergency stop" to stop the movement of the handwheel in an emergency.
(5) The controller handwheel interface is a double-row standard DB15 female head, and the handwheel connector should be a double-row standard DB15 male head.
(1) handwheel introduction
Here, we take ZMC408CE motion controller as the example, because it has specified handwheel interface.
ZMC408CE is one high-performance EtherCAT bus motion controller launched by Zmotion technology. Advanced FPGA technology is used to achieve hardware position comparison output and precision output, to ensure excellent performance and stability of continuous trajectory processing, and to capture dynamic data in real-time, then in this way, control precisely can be realized and production efficiency and quality can be improved through our Zmotion ZMC408CE EtherCAT bus motion controller.
ZMC408CE supports mixed interpolation between EtherCAT and pulse axis. And it can run offline or online. Except mixed interpolation, it supports ZDevelop + multiple kinds of advanced host computer hybrid programming, then it can achieve point to point motion, electronic cam, linear interpolation, circular interpolation, continuous trajectory processing and 30+ robot models control.
ZMC408CE Product Highlights
1. High-performance processor, computing speed, response time and scan cycle, etc. are can be improved.
2. One-dimensional / two-dimensional / three-dimensional, multi-channel visual flying shooting, high speed and high precision.
3. Position synchronization output "PSO", precise dispensing glue volume control and laser energy control in continuous trajectory processing.
4. Multi-axis synchronous control, multi-coordinate system independent control, etc.
5. EtherCAT synchronization cycle can reach 125us.
6. Support hybrid interpolation between EtherCAT bus and pulse axis.
7. Linear interpolation, circular interpolation in any space, helical interpolation, spline interpolation, etc.
8. Flexible application, it can be developed by PC host computer, and can also run independently offline.
(2) controller handwheel MPG introduction
--definition--
--wiring reference--
(3) notes
The wiring principle of the handwheel encoder axis is shown in the figure above. The designs of the handwheel manufacturers are various. Please check the design drawing inside the handwheel first and then confirm the correctness with the motion controller before wiring carefully. Please use STP (twisted-pair shielded) wires, especially If the environment is harsh, the shielding layer must be fully grounded.
How To Configure Program?
(1) refer to above handwheel wiring graphic, correctly connect the handwheel and controller.
(2) after powered on, please select ETHERNET or RS232 or RS485 to connect to ZDevelop.
(3) configure axis No.
if there is no default AXIS axis No. (please don't use pulse axis No. for mapping) of controller handwheel interface, remapped must be done. Followings are processes.
BASE(target axis No.) ‘the axis No. to be remapped
ATYPE(target axis No.) = 0 ‘set axis type as 0
BASE(8) ‘handwheel interface initial axis No. is 8 (invalid)
ATYPE(8) = 0 ‘set initial type of handwheel interface as 0
AXIS_ADDRESS(target axis number)=(-1<<16) + 8 'bind initial axis 8 to target axis No.
ATYPE(target axis number) = 3 'set this new axis interface as required axis type, such as 3 or 6
(4) configure IO
assign axis selection (HSX, HSY, HSZ, HSU) and ratio (HX1, HX10, HX100) and emergency stop (HEMGN) functions as required. These signals are essentially digital input signals with fixed numbers but no fixed functions. It needs ZDevelop development (the axis selection is the connected axis of “connect” synchronization motion, and the ratio is the “connect” ratio.
(5) when completed above steps, it can start to use handwheel.
'different controller models, handwheel axis number, magnification and axis selection IN number are different, refer to the controller manual, the controller model used in this example is ZMC408CE
'The number of axes controlled by different handwheels is different, and the number of axes controlled by this routine is 6
'set axis No.
global const axis_X = 0 'axis X
global const axis_Y = 1 'axis Y
global const axis_Z = 2 'axis Z
global const axis_U = 3 'axis U
global const axis_V = 4 'axis V
global const axis_W = 5 'axis W
global const def_R = 8 'default axis No. of handwheel
global const axis_R = 10 'handwheel remaps axis No.
'set ratio IN No.
const io_Handlow = 42 'ratio 1
const io_Handmid = 43 'ratio 10
const io_Handhigh = 44 'ratio 100
'set IN No.
const io_HandX = 45 'handwheel axis X
const io_HandY = 46 'handwheel axis Y
const io_HandZ = 47 'handwheel axis Z
const io_HandU = 48 'handwheel axis U
const io_HandV = 49 'handwheel axis V
const io_HandW = 50 'handwheel axis W
'set emergency stop signal IN No.
const io_HandEMGN = 51 'emergency stop
global dim conflag 'handwheel connection axis flag
conflag = -1
ATYPE(def_R) = 0 'restore axis type of axis 8
ATYPE(axis_R) = 0 'restore axis type of axis 10
AXIS_ADDRESS(axis_R) = (-1<<16)+ def_R 'map MPG manual axis address to axis 10
ATYPE(axis_R) = 3 'set manual pulse axis as quadrature encoder type
UNITS(axis_R) = 1 'set pulse as the unit of manual pulse axis' pulse amount
While 1
if in(io_handX) = on then
if in(io_handlow) = on then
connect(1, axis_R) axis(axis_X) 'connect to axis X, ratio is 1
elseif in(io_handmid) = on then
connect(10, axis_R) axis(axis_X) 'connect to axis X, ratio is 10
elseif in(io_handhigh) = on then
connect(100, axis_R) axis(axis_X) 'connect to axis X, ratio is 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 the connection
cancel(2) axis(conflag)
conflag = -1
elseif in(io_HandEMGN) = off then
RAPIDSTOP(2)
endif
Wend
ABOUT ZMOTION
That's all, thank you for your reading -- Zmotion EtherCAT Motion Controller Application on CNC Handwheel Follow-up Processing
For more information, please pay close attention to "Support" and "Download" , and there are other platforms about Zmotion - Youtube & LinkedIn & Twitter & Tiktok & Facebook, including technical information (development environment, routine code), product showing, company development, etc.
Hope to meet you, talk with you and be friends with you. Welcome!
This article is edited by ZMOTION, here, share with you, let's learn together.
ZMOTION: DO THE BEST TO USE MOTION CONTROL.
Note: Copyright belongs to Zmotion Technology, if there is reproduction, please indicate article source. Thank you.
Zmotion Technology focuses on development of motion control technology and general motion control products, it is a national high and new technology enterprise. Due to its concentration and hard work in motion control technology, ZMOTION already become one of the fastest growing industrial motion control companies in China, and is also the rare company who has managed core technologies of motion control and real time industrial control software completely. Here, Zmotion provides motion controller, motion control card, vision motion controller, expansion module and HMI. In addition, there is one program software developed by Zmotion -- ZDevelop. It is a good choice for you to program and compile. And program through upper computer, there is PC manual.
Zmotion Technology provides motion control card, motion controller, vision motion controller, expansion module and HMI. ( more keywords for Zmotion: EtherCAT motion control card, EtherCAT motion controller, motion control system, vision controller, motion control PLC, robot controller, vision positioning...)
Have a good day, best wishes, see you next time.