Mesa 7i76 - setting nvencmode0 to 4 - how?
- tommylight
- Away
- Moderator
- Posts: 19422
- Thank you received: 6516
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
- Topic Author
- Offline
- Platinum Member
- Posts: 523
- Thank you received: 315
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 or Create an account to join the conversation.
- Joco
- Topic Author
- Offline
- Platinum Member
- Posts: 523
- Thank you received: 315
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.
[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
- Away
- Moderator
- Posts: 19422
- Thank you received: 6516
Yup, that would be the best option.I think the daughter board will be the safe path.
Please Log in or Create an account to join the conversation.
- Joco
- Topic Author
- Offline
- Platinum Member
- Posts: 523
- Thank you received: 315
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.I don't think there is much point going from a 7i76 to a 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.
- PCW
- Away
- Moderator
- Posts: 17881
- Thank you received: 4780
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)
Please Log in or Create an account to join the conversation.
- Joco
- Topic Author
- Offline
- Platinum Member
- Posts: 523
- Thank you received: 315
Please Log in or Create an account to join the conversation.
- PCW
- Away
- Moderator
- Posts: 17881
- Thank you received: 4780
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 or Create an account to join the conversation.
- Joco
- Topic Author
- Offline
- Platinum Member
- Posts: 523
- Thank you received: 315
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.
- PCW
- Away
- Moderator
- Posts: 17881
- Thank you received: 4780
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 or Create an account to join the conversation.