Time to setup my lathe with 7i76e
- Mike_Eitel
- Offline
- Platinum Member
Less
More
- Posts: 1150
- Thank you received: 184
21 Feb 2018 19:56 #106284
by Mike_Eitel
Replied by Mike_Eitel on topic Time to setup my lathe with 7i76e
I propose to let the supply constant on the mpg's.
I fear that switch on/of can generate random pulses.
And if you miss a digital input line: use 0 volt on the analog to detect your wish to switch off.
My idea is that you could do that by using step with of 0.0000000.
Mike
I fear that switch on/of can generate random pulses.
And if you miss a digital input line: use 0 volt on the analog to detect your wish to switch off.
My idea is that you could do that by using step with of 0.0000000.
Mike
Please Log in or Create an account to join the conversation.
22 Feb 2018 09:30 #106327
by tecno
Replied by tecno on topic Time to setup my lathe with 7i76e
Where can I find example files with wcomp?
Please Log in or Create an account to join the conversation.
22 Feb 2018 12:29 #106333
by tecno
Replied by tecno on topic Time to setup my lathe with 7i76e
Is this the correct syntax to handle analog input for wcomp?
loadrt wcomp count=5
addf wcomp.1 servo-thread
addf wcomp.2 servo-thread
addf wcomp.3 servo-thread
addf wcomp.4 servo-thread
addf wcomp.5 servo-thread
wcomp.1.in << hm2_7i76e.0.7i76.0.0.analogin0
wcomp.1.min 0 // nominal 6.8V
wcomp.1.max 8
wcomp.2.in << hm2_7i76e.0.7i76.0.0.analogin0
wcomp.2.min 8 // nominal 10.8V
wcomp.2.max 12
wcomp.3.in << hm2_7i76e.0.7i76.0.0.analogin0
wcomp.3.min 12 // nominal 14.5V
wcomp.3.max 15.5
wcomp.4.in << hm2_7i76e.0.7i76.0.0.analogin0
wcomp.4.min 15.5 // nominal 16.7V
wcomp.4.max 17
wcomp.5.in << hm2_7i76e.0.7i76.0.0.analogin0
wcomp.5.min 17 // nominal 18.7V
wcomp.5.max 24
loadrt wcomp count=5
addf wcomp.1 servo-thread
addf wcomp.2 servo-thread
addf wcomp.3 servo-thread
addf wcomp.4 servo-thread
addf wcomp.5 servo-thread
wcomp.1.in << hm2_7i76e.0.7i76.0.0.analogin0
wcomp.1.min 0 // nominal 6.8V
wcomp.1.max 8
wcomp.2.in << hm2_7i76e.0.7i76.0.0.analogin0
wcomp.2.min 8 // nominal 10.8V
wcomp.2.max 12
wcomp.3.in << hm2_7i76e.0.7i76.0.0.analogin0
wcomp.3.min 12 // nominal 14.5V
wcomp.3.max 15.5
wcomp.4.in << hm2_7i76e.0.7i76.0.0.analogin0
wcomp.4.min 15.5 // nominal 16.7V
wcomp.4.max 17
wcomp.5.in << hm2_7i76e.0.7i76.0.0.analogin0
wcomp.5.min 17 // nominal 18.7V
wcomp.5.max 24
Please Log in or Create an account to join the conversation.
- Todd Zuercher
- Offline
- Platinum Member
Less
More
- Posts: 5007
- Thank you received: 1441
22 Feb 2018 14:38 #106339
by Todd Zuercher
Replied by Todd Zuercher on topic Time to setup my lathe with 7i76e
Not quite. First numbering should start at 0, 2nd Im not sure if // is accetpible as a comment. 3rd need to net pins to signals, and 4th setp pin values.
loadrt wcomp count=5
addf wcomp.0 servo-thread
addf wcomp.1 servo-thread
addf wcomp.2 servo-thread
addf wcomp.3 servo-thread
addf wcomp.4 servo-thread
net wcomp-input <= hm2_7i76e.0.7i76.0.0.analogin0 => wcomp.0.in
# nominal 6.8V
setp wcomp.0.min 0
setp wcomp.0.max 8
net wcomp-input => wcomp.1.in
# nominal 10.8V
setp wcomp.1.min 8
setp wcomp.1.max 12
net wcomp-input => wcomp.2.in
# nominal 14.5V
setp wcomp.2.min 12
setp wcomp.2.max 15.5
net wcomp-input => wcomp.3.in
# nominal 16.7V
setp wcomp.3.min 15.5
setp wcomp.3.max 17
net wcomp-input => wcomp.4.in
# nominal 18.7V
setp wcomp.4.min 17
setp wcomp.4.max 24
Please Log in or Create an account to join the conversation.
22 Feb 2018 14:45 #106340
by tecno
Replied by tecno on topic Time to setup my lathe with 7i76e
Thanks Todd,
So how do I net above to jog?
So how do I net above to jog?
Please Log in or Create an account to join the conversation.
- Todd Zuercher
- Offline
- Platinum Member
Less
More
- Posts: 5007
- Thank you received: 1441
22 Feb 2018 15:13 #106343
by Todd Zuercher
Replied by Todd Zuercher on topic Time to setup my lathe with 7i76e
That depends, what were you wanting this to select between again?
If you are trying to set your MPG increment you would use a mux (probably mux_generic) with the wcomp outs connected to the mux select bits. Then the output of the mux would set the value of the axis jog increment. (I think) Look up some other MPG examples to try to get a feel for how it should work. It is a lot to piece together in your hal file.
If you are trying to set your MPG increment you would use a mux (probably mux_generic) with the wcomp outs connected to the mux select bits. Then the output of the mux would set the value of the axis jog increment. (I think) Look up some other MPG examples to try to get a feel for how it should work. It is a lot to piece together in your hal file.
Please Log in or Create an account to join the conversation.
22 Feb 2018 15:21 #106344
by tecno
Replied by tecno on topic Time to setup my lathe with 7i76e
MPG increments = yes
Hard to find MPG examples, these are well hidden
Mux = will look around and see what I can find.
Hard to find MPG examples, these are well hidden
Mux = will look around and see what I can find.
Please Log in or Create an account to join the conversation.
- Todd Zuercher
- Offline
- Platinum Member
Less
More
- Posts: 5007
- Thank you received: 1441
22 Feb 2018 16:22 - 22 Feb 2018 16:24 #106346
by Todd Zuercher
Replied by Todd Zuercher on topic Time to setup my lathe with 7i76e
Your Google Foo is weak my friend.
linuxcnc.org/docs/html/examples/mpg.html
linuxcnc.org/docs/html/examples/mpg.html
Last edit: 22 Feb 2018 16:24 by Todd Zuercher.
Please Log in or Create an account to join the conversation.
22 Feb 2018 16:25 #106347
by tecno
Replied by tecno on topic Time to setup my lathe with 7i76e
It sure is my friend, just 5 seconds before you posted I found that page
Please Log in or Create an account to join the conversation.
22 Feb 2018 17:31 #106349
by tecno
Replied by tecno on topic Time to setup my lathe with 7i76e
So today's work in progress. Can somebody please have a look at this and tell me what I am missing.
loadrt wcomp count=5
loadrt mux4 count=1
addf wcomp.0 servo-thread
addf wcomp.1 servo-thread
addf wcomp.2 servo-thread
addf wcomp.3 servo-thread
addf wcomp.4 servo-thread
addf mux4.0 servo-thread
# For velocity mode, set to 1
setp axis.0.jog-vel-mode 1
setp axis.2.jog-vel-mode 1
# This sets the scale that will be used based on the input to the mux4
setp mux4.0.in0 1
setp mux4.0.in1 0.1
setp mux4.0.in2 0.01
setp mux4.0.in3 0.001
# The input to the mux4 component
net scale mux4.0.sel0 <= wcomp.1.out
net scale mux4.0.sel1 <= wcomp.2.out
net scale mux4.0.sel2 <= wcomp.3.out
net scale mux4.0.sel3 <= wcomp.4.out
# The output from the mux4 is sent to each axis jog scale
net mpg-scale <= mux4.0.out
net mpg-scale => axis.0.jog-scale
net mpg-scale => axis.2.jog-scale
# The MPG inputs
net mpg-a encoder.0.phase-A <= hm2_7i76e.0.7i76.0.0.input-16
net mpg-b encoder.0.phase-B <= hm2_7i76e.0.7i76.0.0.input-17
net mpg-a encoder.1.phase-A <= hm2_7i76e.0.7i76.0.0.input-18
net mpg-b encoder.1.phase-B <= hm2_7i76e.0.7i76.0.0.input-19
# The encoder output counts to the axis. Only the selected axis will move.
net encoder-counts <= encoder.0.counts
net encoder-counts => axis.0.jog-counts
net encoder-counts <= encoder.1.counts
net encoder-counts => axis.2.jog-counts
net wcomp-input <= hm2_7i76e.0.7i76.0.0.analogin0 => wcomp.0.in
# nominal 6.8V
setp wcomp.0.min 0
setp wcomp.0.max 8
setp wcomp.0.out
net wcomp-input => wcomp.1.in
# nominal 10.8V
setp wcomp.1.min 8
setp wcomp.1.max 12
setp wcomp.1.out
net wcomp-input => wcomp.2.in
# nominal 14.5V
setp wcomp.2.min 12
setp wcomp.2.max 15.5
setp wcomp.2.out
net wcomp-input => wcomp.3.in
# nominal 16.7V
setp wcomp.3.min 15.5
setp wcomp.3.max 17
setp wcomp.3.out
net wcomp-input => wcomp.4.in
# nominal 18.7V
setp wcomp.4.min 17
setp wcomp.4.max 24
setp wcomp.4.out
Cheers
Bengt
loadrt wcomp count=5
loadrt mux4 count=1
addf wcomp.0 servo-thread
addf wcomp.1 servo-thread
addf wcomp.2 servo-thread
addf wcomp.3 servo-thread
addf wcomp.4 servo-thread
addf mux4.0 servo-thread
# For velocity mode, set to 1
setp axis.0.jog-vel-mode 1
setp axis.2.jog-vel-mode 1
# This sets the scale that will be used based on the input to the mux4
setp mux4.0.in0 1
setp mux4.0.in1 0.1
setp mux4.0.in2 0.01
setp mux4.0.in3 0.001
# The input to the mux4 component
net scale mux4.0.sel0 <= wcomp.1.out
net scale mux4.0.sel1 <= wcomp.2.out
net scale mux4.0.sel2 <= wcomp.3.out
net scale mux4.0.sel3 <= wcomp.4.out
# The output from the mux4 is sent to each axis jog scale
net mpg-scale <= mux4.0.out
net mpg-scale => axis.0.jog-scale
net mpg-scale => axis.2.jog-scale
# The MPG inputs
net mpg-a encoder.0.phase-A <= hm2_7i76e.0.7i76.0.0.input-16
net mpg-b encoder.0.phase-B <= hm2_7i76e.0.7i76.0.0.input-17
net mpg-a encoder.1.phase-A <= hm2_7i76e.0.7i76.0.0.input-18
net mpg-b encoder.1.phase-B <= hm2_7i76e.0.7i76.0.0.input-19
# The encoder output counts to the axis. Only the selected axis will move.
net encoder-counts <= encoder.0.counts
net encoder-counts => axis.0.jog-counts
net encoder-counts <= encoder.1.counts
net encoder-counts => axis.2.jog-counts
net wcomp-input <= hm2_7i76e.0.7i76.0.0.analogin0 => wcomp.0.in
# nominal 6.8V
setp wcomp.0.min 0
setp wcomp.0.max 8
setp wcomp.0.out
net wcomp-input => wcomp.1.in
# nominal 10.8V
setp wcomp.1.min 8
setp wcomp.1.max 12
setp wcomp.1.out
net wcomp-input => wcomp.2.in
# nominal 14.5V
setp wcomp.2.min 12
setp wcomp.2.max 15.5
setp wcomp.2.out
net wcomp-input => wcomp.3.in
# nominal 16.7V
setp wcomp.3.min 15.5
setp wcomp.3.max 17
setp wcomp.3.out
net wcomp-input => wcomp.4.in
# nominal 18.7V
setp wcomp.4.min 17
setp wcomp.4.max 24
setp wcomp.4.out
Cheers
Bengt
Please Log in or Create an account to join the conversation.
Moderators: cmorley
Time to create page: 0.105 seconds