- Posts: 1630
- Thank you received: 0
Pimping the mini-lathe
On the one hand it looks reasonably simple, but seeing as I am a really sloppy coder (I again locked up Linuxcnc in endless loops yesterday by looping to infinity....twice) I would be concerned about bricking my 7i96 dicking around with this.
Mark
Please Log in to join the conversation.
- tommylight
-
- Offline
- Administrator
-
- Posts: 22010
- Thank you received: 3
I do not know if 7i96 has dual firmwares as most of the Mesa boards do, so here we go :
PCW, helppppp !
Please Log in to join the conversation.
the fallback area of the EEPROM:
mesaflash --device 7i96 --addr xx.xx.xx.xx --write test.bit --fallback
and then load the FPGA from the fallback area of the EEPROM:
mesaflash --device 7i96 --addr xx.xx.xx.xx --reload --fallback
If this fails, you can just power cycle the card and reload the user configuration
As far as MPGs go, running a software encoder on the isolated inputs is one way
but will only work with 5V MPG signals if you have the input common at ground
If you are running LinuxCNC 2.9 you can also get hardware MPG encoders on the isolated
inputs using the inm firmware (the inm firmware also has hardware debouncing on the isolated inputs)
Please Log in to join the conversation.
I don't think I will bother adding linear encoders to this machine (that might be polishing a turd), but for a future build (a better lathe), would probably add them to the expansion pinhead. Can you also run differential signals to the pinhead, or only single ended?
I have been really happy with the Mesa hardware since I got the 5i25+7i77 PnP kit for the Maho, but once you see how flexibly these are, if you put a little effort into learning the full capabilties, it is really impressive hardware you company has produced Peter. Thanks for the ongoing support.
Looking at the configs changes Peter (Talla83) did...
Attachment not found
... is there a manual or list of rules of what you can place where, and what doesnt work? He demonstrated on a 7i92, but the 7i96 has more hardware function dedicated pins.
Mark
Please Log in to join the conversation.
but the on board I/O like stepgen pins and isolated inputs have a fixed direction so can only
be used in their designed directions and may have other limitations like maximum speed.
For example the 7I96 stepgen outputs are driven by 5V buffer chips to get a full
5V signal that can drive 24 mA. This buffer only works as an output. Similarly
the isolated input pins can only function as inputs, and are speed limited by
the Optocouplers used for isolation to about 5KHz maximum input frequency.
Please Log in to join the conversation.
RotarySMP wrote: Given that my lathe only uses a fraction of the 7i96's capacity (2 Stepgen, 1 ENC and 1 Pwmgen) at present, would it be possible to add a further encoder through mesaflash to read a jog wheel? I looked through the bit files, and see there is one that looks like it converts to six ENC (7i96_6enc_d.bit). What would I need to do to make a 1pwmgen+ 1 addition ENC bitfile?
Actually given that jogwheels are only 100 PPR, and the normal input pins are read at 1kHz, I can't hand jog at 10 RPS anyway, so there is probably no disadvantage of puttnig the jog wheel onto general I/O except that they need a few pins.
Bonus question, would it be possible to reconfigure both the two unused Stepgens to ENC? With two stepgens, 1 pwmgen, and 3 Enc (the existing one plus two more), I could add linear encoders to the two axis, and run the jog wheel off I/O. That would be awsome for a lathe.
Mark
This is what I have used on a mill using a 7i96 for jogging 3 axis
If you want the hal file as well just shout
Please Log in to join the conversation.
Please Log in to join the conversation.
Motion at last!
By the way, does anyone have an aswer to a question I posted a couple of days go?
Just playing around, what is the syntax to use natural constants like Pi or "e" in gcode?
Please Log in to join the conversation.
tsapps.nist.gov/publication/get_pdf.cfm?pub_id=823374
indicates e exists as EXP but does not explain the usage
I think it will be EXP(n) or EXP[n]
as for pi, I think you would need to define it as a variable.
Please Log in to join the conversation.
net spindle-enable <= spindle.0.on
net spindle-enable => hm2_7i96.0.ssr.00.out-00
net spindle-cw <= spindle.0.forward
net spindle-cw => hm2_7i96.0.ssr.00.out-01
net spindle-ccw <= spindle.0.reverse
net spindle-cww => hm2_7i96.0.ssr.00.out-02
When I push Gmoccapy spindle fwd button, both out-00 and out-01 go true. Spindle starts correctly.
When I push the rev rotation button, spindle enable out-00 goes high, but out-02 stay false. I can't see the error.
Second issue:
I am a bit lost with the spindle closed loop connection. I have the following generated by PNCConf
#*******************
# SPINDLE
#*******************
setp pid.s.Pgain [SPINDLE_0]P
setp pid.s.Igain [SPINDLE_0]I
setp pid.s.Dgain [SPINDLE_0]D
setp pid.s.bias [SPINDLE_0]BIAS
setp pid.s.FF0 [SPINDLE_0]FF0
setp pid.s.FF1 [SPINDLE_0]FF1
setp pid.s.FF2 [SPINDLE_0]FF2
setp pid.s.deadband [SPINDLE_0]DEADBAND
net ratio_select.out pid.s.maxoutput
setp pid.s.error-previous-target true
net spindle-index-enable <=> pid.s.index-enable
net spindle-enable => pid.s.enable
net spindle-vel-cmd-rpm-abs => pid.s.command
net spindle-vel-fb-rpm-abs => pid.s.feedback
net spindle-pid-out pid.s.output => scale.gear.in
net gear-ratio ratio_select.out-f => scale.gear.gain
setp ratio_select.in00 0.000405
setp ratio_select.in01 0.000175
net gear-select-a => ratio_select.sel0
net spindle-output <= scale.gear.out
# ---Encoder feedback signals/setup---
setp [HMOT](CARD0).encoder.00.counter-mode 0
setp [HMOT](CARD0).encoder.00.filter 1
setp [HMOT](CARD0).encoder.00.index-invert 0
setp [HMOT](CARD0).encoder.00.index-mask 0
setp [HMOT](CARD0).encoder.00.index-mask-invert 0
setp [HMOT](CARD0).encoder.00.scale [SPINDLE_0]ENCODER_SCALE
net spindle-revs <= [HMOT](CARD0).encoder.00.position
net spindle-vel-fb-rps <= [HMOT](CARD0).encoder.00.velocity
net spindle-index-enable <=> [HMOT](CARD0).encoder.00.index-enable
# ---setup spindle control signals---
net spindle-vel-cmd-rps <= spindle.0.speed-out-rps
net spindle-vel-cmd-rps-abs <= spindle.0.speed-out-rps-abs
net spindle-vel-cmd-rpm <= spindle.0.speed-out
net spindle-vel-cmd-rpm-abs <= spindle.0.speed-out-abs
I added
net spindle-vel-cmd-rpm-abs => hm2_7i96.0.pwmgen.00.value
but it does respond to a change in command S word.
Thanks for assistance.
Mark
Please Log in to join the conversation.
