- Posts: 18
- Thank you received: 0
How to wire MPG on 7i77?
12 years 6 months ago #46000
by greeder88
How to wire MPG on 7i77? was created by greeder88
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
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 to join the conversation.
12 years 6 months ago #46003
by jtc
Replied by jtc on topic How to wire MPG on 7i77?
you have to configure the sserial mode of the 7i77 (on the hal file). see the datasheet and chose the correct sserial mode to accept the MPG.
if I remember correctly, its for a 100ppr encoder, so maybe you will have to play arround.
if I remember correctly, its for a 100ppr encoder, so maybe you will have to play arround.
Please Log in to join the conversation.
12 years 6 months ago #46008
by JR1050
Replied by JR1050 on topic How to wire MPG on 7i77?
The easiest way on a 7i77 is to.use an unused encoder channel. Set the jumpers for the single ended encoder. In your hal.file set the encoder mode for counter and set the encoder scale to 256. You can set the scale in hal.or from the ini file if you set a variable up.for it.
Please Log in to join the conversation.
12 years 6 months ago #46012
by PCW
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.
Replied by PCW on topic How to wire MPG on 7i77?
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 to join the conversation.
12 years 6 months ago #46018
by greeder88
Replied by greeder88 on topic How to wire MPG on 7i77?
I need the MPG and the three position increment switch too. Not sure if or how you can get that using a vacant encoder channel. I have an old Jog Pendant Hal file I will try to change for the 7i77 and see what error messages come up. It uses up a lot of pins unfortunately.
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.
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 to join the conversation.
12 years 6 months ago #46030
by greeder88
Replied by greeder88 on topic How to wire MPG on 7i77?
I had success in getting an error free jog pendant Hal file for the 7i77. Not sure it will actually work right on the machine but Axis is liking it.
#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
#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 to join the conversation.
12 years 6 months ago #46036
by PCW
Replied by PCW on topic How to wire MPG on 7i77?
Using field I/O pins with the software encoder can work but has some problems. If you use a standard 12 or 24V field I/O voltage for noise immunity and relay/solenoid driving capability, the inputs will not be compatible with 5V MPG signals. Also unless you use a low resolution encoder, it will be easy to mis-count. For example, with your 256 PPR encoder (1024 counts per turn) turning the shaft faster than 1 turn per second will result in lost counts.
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
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 to join the conversation.
12 years 6 months ago #46046
by greeder88
Replied by greeder88 on topic How to wire MPG on 7i77?
That is fantastic. I couldn't be happier.
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
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 to join the conversation.
12 years 6 months ago #46055
by andypugh
www.linuxcnc.org/docs/html/man/man9/hostmot2.9.html
Under "config modparam"
I agree that that manpage probably needs reworking.
Replied by andypugh on topic How to wire MPG on 7i77?
greeder88 wrote: 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 to join the conversation.
12 years 6 months ago #46074
by greeder88
Replied by greeder88 on topic How to wire MPG on 7i77?
This is definitely complicated stuff. If you think about it just wiring the connections can tie your head in a knot. But it sure is fun when you get success!.
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.
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 to join the conversation.
Time to create page: 0.348 seconds
