linuxcnc 五轴并口手轮配置

本文详细描述了如何配置JogPendant设备,包括设置编码器、MUX通道选择、运动模式(位置和速度)、以及信号输入和输出,以实现精确的轴运动控制。
摘要由CSDN通过智能技术生成

# Jog Pendant
loadrt encoder num_chan=2
loadrt mux4 count=1
addf encoder.capture-position servo-thread
addf encoder.update-counters servo-thread
addf mux4.0 servo-thread

# If your MPG outputs a quadrature signal per click set x4 to 1
# If your MPG puts out 1 pulse per click set x4 to 0
setp encoder.0.x4-mode 0

# For velocity mode, set to 1
# In velocity mode the axis stops when the dial is stopped
# even if that means the commanded motion is not completed,
# For position mode (the default), set to 0
# In position mode the axis will move exactly jog-scale
# units for each count, regardless of how long that might take,
setp axis.x.jog-vel-mode 0
setp axis.y.jog-vel-mode 0
setp axis.z.jog-vel-mode 0
#setp axis.a.jog-vel-mode 0
#setp axis.c.jog-vel-mode 0
# This sets the scale that will be used based on the input to the mux4
setp mux4.0.in0 0.1
setp mux4.0.in1 0.01
setp mux4.0.in2 0.001

# The inputs to the mux4 component
net scale1 mux4.0.sel0 <= parport.1.pin-08-in-not
net scale2 mux4.0.sel1 <= parport.1.pin-07-in-not

# The output from the mux4 is sent to each axis jog scale
net mpg-scale <= mux4.0.out
net mpg-scale => axis.x.jog-scale
net mpg-scale => axis.y.jog-scale
net mpg-scale => axis.z.jog-scale
#net mpg-scale => axis.a.jog-scale
#net mpg-scale => axis.c.jog-scale
# The MPG inputs
net mpg-a encoder.0.phase-A <= parport.1.pin-09-in
net mpg-b encoder.0.phase-B <= parport.1.pin-10-in

# The Axis select inputs
net mpg-x axis.x.jog-enable <= parport.1.pin-02-in-not
net mpg-y axis.y.jog-enable <= parport.1.pin-03-in-not
net mpg-z axis.z.jog-enable <= parport.1.pin-04-in-not
#net mpg-A axis.a.jog-enable <= parport.1.pin-05-in
#net mpg-C axis.c.jog-enable <= parport.1.pin-06-in
# The encoder output counts to the axis. Only the selected axis will move.
net encoder-counts  <= encoder.0.counts
net encoder-counts => axis.x.jog-counts
net encoder-counts => axis.y.jog-counts
net encoder-counts => axis.z.jog-counts
#net encoder-counts => axis.a.jog-counts
#net encoder-counts => axis.c.jog-counts
 

评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值