MPG jog step is 4mm instead of 1mm per count
- flipzip
- Offline
- New Member
-
Less
More
- Posts: 1
- Thank you received: 0
06 Jun 2025 04:35 #329793
by flipzip
MPG jog step is 4mm instead of 1mm per count was created by flipzip
First Question.
For a 1mm jog, I originally set my MUX40.in1 to 1.0. This was resulting in an exact 4mm jog each count. To fix this I need to set the scale below to 0.25. While I can do this and get the result I want, it bothers me that I have to use a ratio instead of direct number and will be harder to decode at latter dates. It seem arbritary that each count would be 4mm exact.
setp mux4.0.in1 1 (jogs 4 mm per count)
setp mux4.0.in1 0.25 (Jogs 1 mm per count)
net encoder-counts <= encoder.0.counts
net encoder-counts => axis.x.jog-counts
Question is, where is the actual jog value recorded in LinuxCNC.? I cold find nothing in the .ini or .hal files that seems to indicated it would jog exactly 4mm each jog count.
Second question,
Per the below, I am currently using mux4 to determine the jog scale. But my MPG switch does is not using an encoder switch but instead has 3 simple outputs of which I placed into input 26 (1x), 27(10x), 28(100x)
I got everything to work but can not find any details in .hal how to use something other than mux4 logic to place the correct scale into the axis jog. This seems like it should be simple. More or less just want if one of those pins are true, the correct scale is selected. Below is partial code referancing the scale portion. Note. Only using pins 26 and 27 at the moment due to the mux4 requirements. Other than this, everything is working fine.
# This sets the scale that will be used based on the input to the mux4
setp mux4.0.in0 0.025
setp mux4.0.in1 0.25
setp mux4.0.in2 2.5
# The inputs to the mux4 component
net scale1 mux4.0.sel0 <= hm2_7i76e.0.7i76.0.0.input-26
net scale2 mux4.0.sel1 <= hm2_7i76e.0.7i76.0.0.input-27
# 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
Basically want:
if Pin 26 true then axis.x.jog-scale == 0.025
if pin 27 true then axis.x.jog-scale == 0.25
if pin 28 true then axis.x.jog-scale == 2.5
For a 1mm jog, I originally set my MUX40.in1 to 1.0. This was resulting in an exact 4mm jog each count. To fix this I need to set the scale below to 0.25. While I can do this and get the result I want, it bothers me that I have to use a ratio instead of direct number and will be harder to decode at latter dates. It seem arbritary that each count would be 4mm exact.
setp mux4.0.in1 1 (jogs 4 mm per count)
setp mux4.0.in1 0.25 (Jogs 1 mm per count)
net encoder-counts <= encoder.0.counts
net encoder-counts => axis.x.jog-counts
Question is, where is the actual jog value recorded in LinuxCNC.? I cold find nothing in the .ini or .hal files that seems to indicated it would jog exactly 4mm each jog count.
Second question,
Per the below, I am currently using mux4 to determine the jog scale. But my MPG switch does is not using an encoder switch but instead has 3 simple outputs of which I placed into input 26 (1x), 27(10x), 28(100x)
I got everything to work but can not find any details in .hal how to use something other than mux4 logic to place the correct scale into the axis jog. This seems like it should be simple. More or less just want if one of those pins are true, the correct scale is selected. Below is partial code referancing the scale portion. Note. Only using pins 26 and 27 at the moment due to the mux4 requirements. Other than this, everything is working fine.
# This sets the scale that will be used based on the input to the mux4
setp mux4.0.in0 0.025
setp mux4.0.in1 0.25
setp mux4.0.in2 2.5
# The inputs to the mux4 component
net scale1 mux4.0.sel0 <= hm2_7i76e.0.7i76.0.0.input-26
net scale2 mux4.0.sel1 <= hm2_7i76e.0.7i76.0.0.input-27
# 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
Basically want:
if Pin 26 true then axis.x.jog-scale == 0.025
if pin 27 true then axis.x.jog-scale == 0.25
if pin 28 true then axis.x.jog-scale == 2.5
Please Log in or Create an account to join the conversation.
- PCW
-
- Away
- Moderator
-
Less
More
- Posts: 18680
- Thank you received: 5155
06 Jun 2025 04:44 #329794
by PCW
Replied by PCW on topic MPG jog step is 4mm instead of 1mm per count
If you are using a standard 100 PPR MPG, it will count up by 4 every detent
with a standard quadrature counter. It looks like you are using the software
encoder, if so , try setting encoder.0.x4-mode false.
with a standard quadrature counter. It looks like you are using the software
encoder, if so , try setting encoder.0.x4-mode false.
Please Log in or Create an account to join the conversation.
Time to create page: 0.064 seconds