How to wire MPG on 7i77?
- greeder88
- Offline
- Premium Member
- Posts: 87
- Thank you received: 2
Those pins don't seem to associate to a mpg.
I have a HEDS 5701 f00 with 256 cpr
Where would I wire:
A
B
Vcc
Gn
Where do I configure 256 cpr?
Thanks
Please Log in or Create an account to join the conversation.
- jtc
- Offline
- Elite Member
- Posts: 230
- Thank you received: 13
if I remember correctly, its for a 100ppr encoder, so maybe you will have to play arround.
Please Log in or Create an account to join the conversation.
- JR1050
- Offline
- Platinum Member
- Posts: 450
- Thank you received: 33
Please Log in or Create an account to join the conversation.
- PCW
- Away
- Moderator
- Posts: 17904
- Thank you received: 4774
Can't find anything on how to wire the MPG to pins 16,17,18,19.
Those pins don't seem to associate to a mpg.
I have a HEDS 5701 f00 with 256 cpr
Where would I wire:
A
B
Vcc
Gn
Where do I configure 256 cpr?
Thanks
for MPG enc0:
A --> 7I77 field input 16
B--> 7I77 field input 17
Vcc --> +5V
Gn --> +5V common --> field I/O common
But JR1050s suggestion makes sense if you have a 256 CPR MPG
rather than a standard 100 PPR jog wheel with detents
The 7I77 MPG input is more suited to 100 PPR MPGs with detents
since its default count mode is 1X so you get exactly one increment per
click.
Please Log in or Create an account to join the conversation.
- greeder88
- Offline
- Premium Member
- Posts: 87
- Thank you received: 2
I found it.
# load low-level driver
loadrt hm2_pci config="num_encoders=6 sserial_port_0=003xxx"
Now to keep me from going into the catacombs of knowledge where people get lost for days. Some never make it out.
What does the "xxx" on the end mean? Why is there 3 X's? And or what document has the info?
Note to self:
When machine is finished do a "Build a LinuxCNC for Dummies" cheat sheet web page. Focusing on the dummies part.
Please Log in or Create an account to join the conversation.
- greeder88
- Offline
- Premium Member
- Posts: 87
- Thank you received: 2
#Jog Pendant
loadrt mux4 count=1
loadrt ilowpass
loadrt encoder num_chan=1
setp ilowpass.0.scale 100
setp ilowpass.0.gain 0.01
addf mux4.0 servo-thread
addf ilowpass.0 servo-thread
addf encoder.update-counters servo-thread
addf encoder.capture-position servo-thread
net x-jog-select axis.0.jog-enable <= hm2_5i25.0.7i77.0.0.input-00
net y-jog-select axis.1.jog-enable <= hm2_5i25.0.7i77.0.0.input-01
net z-jog-select axis.2.jog-enable <= hm2_5i25.0.7i77.0.0.input-02
#net a-jog-select axis.3.jog-enable <= hm2_5i25.0.7i77.0.0.input-03
net x10 hm2_5i25.0.7i77.0.0.input-08 => mux4.0.sel0
net x100 hm2_5i25.0.7i77.0.0.input-13 => mux4.0.sel1
setp mux4.0.in0 .0000025
setp mux4.0.in1 .000025
setp mux4.0.in2 .00025
setp mux4.0.in3 .0
net jogscale mux4.0.out => axis.0.jog-scale
net jogscale => axis.1.jog-scale
net jogscale => axis.2.jog-scale
#net jogscale => axis.3.jog-scale
net mpg-a hm2_5i25.0.7i77.0.0.input-14 => encoder.0.phase-A
net mpg-b hm2_5i25.0.7i77.0.0.input-15 => encoder.0.phase-B
net mpg-out encoder.0.rawcounts => ilowpass.0.in
net jogcounts ilowpass.0.out => axis.0.jog-counts
net jogcounts => axis.1.jog-counts
net jogcounts => axis.2.jog-counts
#net jogcounts => axis.3.jog-counts
Please Log in or Create an account to join the conversation.
- PCW
- Away
- Moderator
- Posts: 17904
- Thank you received: 4774
Since you have fast 5V input hardware counters available, it better to use them
for example, to use one of the servo interface encoders (channel 4 here) for the MPG
you just replace:
net mpg-out encoder.0.rawcounts => ilowpass.0.in
with
net mpg-out hm2_5i25.0.encoder.04.rawcounts => ilowpass.0.in
and delete these software encoder HAL lines as they are not needed:
loadrt encoder num_chan=1
addf encoder.update-counters servo-thread
addf encoder.capture-position servo-thread
net mpg-a hm2_5i25.0.7i77.0.0.input-14 => encoder.0.phase-A
net mpg-b hm2_5i25.0.7i77.0.0.input-15 => encoder.0.phase-B
similarly, to use the 7I77s field I/O MPG inputs you would replace
net mpg-out encoder.0.rawcounts => ilowpass.0.in
with
net mpg-out hm2_5i25.0.7i77.0.0.enc0 => ilowpass.0.in
(and also deleting all the software encoder related lines)
But to make the MPG encoder available you need set the field I/O sections process data mode to 3 by adding a "sserial_port_0=300xxx" stanza to the hm2_pci config string (setting sserial modes is documented in the hostmot2 manual)
Note that the encoder name for sserial devices will change in LinuxCNC version 2.6
Please Log in or Create an account to join the conversation.
- greeder88
- Offline
- Premium Member
- Posts: 87
- Thank you received: 2
Here it is in changed form so the next lost wannabe MPG Jogger will just have to copy it and go.
#Jog Pendant
loadrt mux4 count=1
loadrt ilowpass
setp ilowpass.0.scale 100
setp ilowpass.0.gain 0.01
addf mux4.0 servo-thread
addf ilowpass.0 servo-thread
net x-jog-select axis.0.jog-enable <= hm2_5i25.0.7i77.0.0.input-00
net y-jog-select axis.1.jog-enable <= hm2_5i25.0.7i77.0.0.input-01
net z-jog-select axis.2.jog-enable <= hm2_5i25.0.7i77.0.0.input-02
#net a-jog-select axis.3.jog-enable <= hm2_5i25.0.7i77.0.0.input-03
net x10 hm2_5i25.0.7i77.0.0.input-08 => mux4.0.sel0
net x100 hm2_5i25.0.7i77.0.0.input-13 => mux4.0.sel1
setp mux4.0.in0 .0000025
setp mux4.0.in1 .000025
setp mux4.0.in2 .00025
setp mux4.0.in3 .0
net jogscale mux4.0.out => axis.0.jog-scale
net jogscale => axis.1.jog-scale
net jogscale => axis.2.jog-scale
#net jogscale =>axis.3.jog-scale
net mpg-out hm2_5i25.0.encoder.04.rawcounts => ilowpass.0.in
net jogcounts ilowpass.0.out => axis.0.jog-counts
net jogcounts => axis.1.jog-counts
net jogcounts => axis.2.jog-counts
#net jogcounts => axis.3.jog-counts
Please Log in or Create an account to join the conversation.
- andypugh
- Offline
- Moderator
- Posts: 23559
- Thank you received: 4858
What does the "xxx" on the end mean? Why is there 3 X's? And or what document has the info?
www.linuxcnc.org/docs/html/man/man9/hostmot2.9.html
Under "config modparam"
I agree that that manpage probably needs reworking.
Please Log in or Create an account to join the conversation.
- greeder88
- Offline
- Premium Member
- Posts: 87
- Thank you received: 2
I'm planing on doing a web page to make this way simpler for the electronics simpletons such as myself. That should be fun.
Not that much left to do...
The end is near.
Please Log in or Create an account to join the conversation.