Mesa 7i76 - setting nvencmode0 to 4 - how?

More
6 years 3 months ago #174701 by tommylight
Having fast hardware encoders on a 7i76 is easy, use the 2 headers on it.
That implies flashing the firmware and very careful wiring, and the encoders must be 5V. Also no differential inputs.
But that will get you fully functional and very fast encoder readings.

Please Log in to join the conversation.

More
6 years 3 months ago #174706 by Joco

tommylight wrote: Having fast hardware encoders on a 7i76 is easy, use the 2 headers on it.
That implies flashing the firmware and very careful wiring, and the encoders must be 5V. Also no differential inputs.
But that will get you fully functional and very fast encoder readings.


Sounds interesting but as soon as you are heading into "very careful wiring" territory that smells like a recipe for someone like me to release the magic smoke. And that doesn't even cover the creation of what I am guessing must be custom firmware.

I think the daughter board will be the safe path.

Cheers,
James.

Please Log in to join the conversation.

More
6 years 3 months ago #174707 by Joco

Aciera wrote: James,

Rereading my post I just realized I forgot to mention the fact that I use a 7i85 connected to the 7i76e. Should have had my coffee first I guess. So really I totally failed to understand that you want to use the MPG inputs for the glass scales. That of course is something totally different to using the dedicated encoder inputs of the 7i85.
Now I understand why Rod said it's would be slow.:blush:

[edit]
Aw, jeez. It changed the title of the post as well! Can somebody change that back please?


Ah - you had my hopes up there. All good. a 7i85 or 7i89 will be the answer.

Please Log in to join the conversation.

More
6 years 3 months ago #174711 by tommylight

Joco wrote: I think the daughter board will be the safe path.

Yup, that would be the best option.

Please Log in to join the conversation.

More
6 years 3 months ago #174713 by Joco

rodw wrote: I don't think there is much point going from a 7i76 to a 7i76e.

Was looking at this mainly cose had a 7i76e and it makes it easier to separate computer away from mill to a more convenient spot. It is also way tidier to do the add ons via the 25pin headers with the 7i76e.

What I was thinking of was to use the encoder component on some spare input pins...
linuxcnc.org/docs/2.8/html/man/man9/encoder.9.html


Interesting. But I'm not sure that will work based on how I understand the way the input pins work. They are referenced to field voltage and at 24V the 5V TTL will not be enough to get them to register as going high.

Cheers,
J.

Please Log in to join the conversation.

More
6 years 3 months ago #174750 by PCW

Sounds interesting but as soon as you are heading into "very careful wiring" territory that smells like a recipe for someone like me to release the magic smoke. And that doesn't even cover the creation of what I am guessing must be custom firmware.


You can use the FPGA parallel expansion ports directly for TTL level interfacing _but_ they are susceptible to damage
from negative inputs if there is no current limiting, The inputs have protection diodes to ground but these diodes will only
take 20 mA or so. How do you get a negative input? say you accidentally connect an input pin to frame ground and you
have 1V of high frequency ground bumping from a VFD or axis drive, you lose... A 100 ohm series resistor will protect
against this fault

Interesting. But I'm not sure that will work based on how I understand the way the input pins work. They are referenced to field voltage and at 24V the 5V TTL will not be enough to get them to register as going high.


The 7I76/7I76E field inputs are all read as analog voltages (at about 50 KHz or so) so the threshold for MPG inputs is set in
software...


BTW I found the encmode RO issue in our config file: (all the encmode stuff should be bidir)
Code:
;7I76 00000001 0 hwmode Standard 00000001 0 swmode IO_Spin 00000010 1 swmode IO_Ana_Spin 00000100 2 swmode IO_Enc_Ana_Spin_FV ;00001000 3 swmode IO_Enc_Ana_Spin_FV 00001111 32 bits input 0.0 0.0 None Input 00001111 16 bits output 0.0 0.0 None Output 00001111 16 unsigned output 0.0 100.0 Percent SpinOut 00001111 8 Boolean output 0.0 0.0 None SpinEna 00001111 8 Boolean output 0.0 0.0 None SpinDir 00001110 8 unsigned input 0.0 36.3 Volts AnalogIn0 00001110 8 unsigned input 0.0 36.3 Volts AnalogIn1 00001110 8 unsigned input 0.0 36.3 Volts AnalogIn2 00001110 8 unsigned input 0.0 36.3 Volts AnalogIn3 00001100 16 unsigned input 0.0 36.3 Volts FieldVoltage 00001100 8 count input 0.0 0.0 Counts Enc0 00001100 8 count input 0.0 0.0 Counts Enc1 00000000 16 unsigned output 0.0 0.0 None SwRevision 00000000 16 unsigned output 0.0 0.0 None HwRevision 00000000 16 nonvolunsigned bidir 0.0 0.0 None NVBaudRate 00000000 32 nonvolunsigned input 0.0 0.0 None NVUnitNumber 00000000 16 nonvolunsigned input 0.0 0.0 None NVWatchDogTimeout 00000000 16 unsigned input 0.0 0.0 None EncMode0 00000000 16 unsigned input 0.0 0.0 None EncMode1 00000000 16 nonvolunsigned input 0.0 0.0 None NVEncMode0 00000000 16 nonvolunsigned input 0.0 0.0 None NVEncMode1

I will take a look at rebuilding this when I get a bit of time (and I remember how to do it, this has not changed since 2013)

Please Log in to join the conversation.

More
6 years 3 months ago #174772 by Joco
PCW - that would be AWESOME. Hope the memory comes back quickly. :-)

Please Log in to join the conversation.

More
6 years 3 months ago #175362 by PCW
Updated 7i76/7I76E DSPIC firmware with encoder mode directions fixed

freeby.mesanet.com/7I76R15.BIN

Note that the mode must be set in the hal file
not after LinuxCNC has started, for example.

setp hm2_7i76e.0.7i76.0.0.encmode0 4

in the hal file will work, but

halcmd: setp hm2_7i76e.0.7i76.0.0.encmode0 4

when linuxCNC is running will not work


Sorry it took so long to get to this but I have not had
much free time in the last few months

Please Log in to join the conversation.

More
6 years 3 months ago #175366 by Joco
Thanks PCW. I'll load this up and see how we go.
Assume this is just a case of loading up the new bin file with the mesaflash utility? Not ever loaded new firmware on the card.

Please Log in to join the conversation.

More
6 years 3 months ago #175367 by PCW
Its a bit more involved as uses the setsserial command
I will try to update the scripts tonight to make this easier

NM I somehow though you had a 7I76E
the normal scripts should work for a 7I76/5i25 or 6i25:

www.mesanet.com/sserial.tgz

(read the README file)

Please Log in to join the conversation.

Time to create page: 0.071 seconds
Powered by Kunena Forum