Mesa 7i76 - setting nvencmode0 to 4 - how?

  • tommylight
  • tommylight's Avatar
  • Away
  • Moderator
  • Moderator
More
15 Jul 2020 08:38 #174701 by tommylight
Replied by tommylight on topic Mesa 7i76 - setting nvencmode0 to 4 - how?
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 or Create an account to join the conversation.

  • Joco
  • Joco's Avatar Topic Author
  • Offline
  • Platinum Member
  • Platinum Member
More
15 Jul 2020 09:25 #174706 by Joco

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.
The following user(s) said Thank You: tommylight

Please Log in or Create an account to join the conversation.

  • Joco
  • Joco's Avatar Topic Author
  • Offline
  • Platinum Member
  • Platinum Member
More
15 Jul 2020 09:28 #174707 by Joco

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 or Create an account to join the conversation.

  • tommylight
  • tommylight's Avatar
  • Away
  • Moderator
  • Moderator
More
15 Jul 2020 09:31 #174711 by tommylight
Replied by tommylight on topic Mesa 7i76 - setting nvencmode0 to 4 - how?

I think the daughter board will be the safe path.

Yup, that would be the best option.

Please Log in or Create an account to join the conversation.

  • Joco
  • Joco's Avatar Topic Author
  • Offline
  • Platinum Member
  • Platinum Member
More
15 Jul 2020 09:34 #174713 by Joco

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 or Create an account to join the conversation.

More
15 Jul 2020 13:43 #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)
;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)
The following user(s) said Thank You: tommylight, Joco

Please Log in or Create an account to join the conversation.

  • Joco
  • Joco's Avatar Topic Author
  • Offline
  • Platinum Member
  • Platinum Member
More
15 Jul 2020 19:51 #174772 by Joco
PCW - that would be AWESOME. Hope the memory comes back quickly. :-)

Please Log in or Create an account to join the conversation.

More
21 Jul 2020 21:51 - 21 Jul 2020 21:53 #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
Last edit: 21 Jul 2020 21:53 by PCW.
The following user(s) said Thank You: Joco

Please Log in or Create an account to join the conversation.

  • Joco
  • Joco's Avatar Topic Author
  • Offline
  • Platinum Member
  • Platinum Member
More
22 Jul 2020 00:08 #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 or Create an account to join the conversation.

More
22 Jul 2020 00:47 - 22 Jul 2020 01:00 #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)
Last edit: 22 Jul 2020 01:00 by PCW.

Please Log in or Create an account to join the conversation.

Moderators: PCWjmelson
Time to create page: 0.086 seconds
Powered by Kunena Forum