7i96s maximum number of encoders?

More
29 Jan 2025 10:55 - 29 Jan 2025 11:04 #320068 by slowpoke
7i96s maximum number of encoders? was created by slowpoke
I'm using a 7i96s with 7i96s_p1encd.bin

I'm using an isolated I/O board to interface to the P1 connector, and I'm using the 4 encoders there:
    Encoder0: Linear Scale X  - tested and working
    Encoder1: Linear Scale Z - tested and working
    Encoder2: MPG input for X - waiting on encoder to arrive
    Encoder3: MPG input for Z - waiting on encoder to arrive

I just made a little potentiometer -> voltage to frequency converter circuit dc-1kHz and it's presently driving isolated input 0 on TB-3, I can see it pulsing in halshow.

I was hoping to use hm2_7i96s.0.encoder.xx.velocity to allow that pot to control Jog rate.
I bumped up num_encoders from 4 to 5, however looking at the available pins in HAL show, encoder 4 does not have all the pins available for encoders 0-3, so I'm guessing there is a 4 encoder limit for the 7i96s?

Perhaps there is another 7i96s version that allows more encoders (hoping for 2 more, one for jog speed and one for feed speed) with two of them on the isolated TB-3 terminals.

If that's not possible, is there another HAL method to measure frequency on the TB-3 isolated inputs?

 
Last edit: 29 Jan 2025 11:04 by slowpoke.

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

More
29 Jan 2025 12:19 - 29 Jan 2025 12:41 #320075 by PCW
Replied by PCW on topic 7i96s maximum number of encoders?
The number of available encoders depends on the firmware and pin/FPGA size limitations.
The 7i96s_p1encd firmware has 7 encoders: 0..6. They are all basically identical
(except encoder 6 has no index input pin due to lack of pins)

Here are all the encoder 4 pins and parameters (using 7i96s_p1encd firmware): 


 
Attachments:
Last edit: 29 Jan 2025 12:41 by PCW.
The following user(s) said Thank You: Unlogic, slowpoke

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

More
29 Jan 2025 17:07 - 29 Jan 2025 17:11 #320099 by slowpoke
Replied by slowpoke on topic 7i96s maximum number of encoders?

The number of available encoders depends on the firmware and pin/FPGA size limitations.The 7i96s_p1encd firmware has 7 encoders: 0..6. They are all basically identical(except encoder 6 has no index input pin due to lack of pins)Here are all the encoder 4 pins and parameters (using 7i96s_p1encd firmware):    
 

 


That's good news.
I'm a little confused with the 7196s pin assignments associated with the encoders. Ideally there would be 4 encoders assigned to the P1 expansion port and 2 to the TB3 inputs. The two on the TB3, don't actually have to be quadrature inputs, because those two will simple be driven with a simple square wave .IIRC 7i96s pin assignment can be tweaked by editing 7i96s_p1encd.pin?

Can I simply edit that file, and if so how would I assign the last two encoders to TB3 pins?

I thought I could get the latest pin assignment with: 
mesaflash --device 7I96s --addr 10.10.10.10 --readhmid

However I get and error (see attached) when I try that.
 

File Attachment:

File Name: 7i96s_p1encd.pin.txt
File Size:7 KB
Attachments:
Last edit: 29 Jan 2025 17:11 by slowpoke.

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

More
29 Jan 2025 17:18 - 29 Jan 2025 17:32 #320102 by PCW
Replied by PCW on topic 7i96s maximum number of encoders?
There are no normal encoders on TB3
(there are 4 MPG encoders but these are not suitable
for measuring frequency)

It would require different firmware to put standard
encoders on TB3 (7i96s_p1encd has 1 encoder on TB2 and
6 more on P1)

Your mesaflash command may have failed because either you have LinuxCNC running
or LinuxCNC did not exit cleanly. LinuxCNC blocks access to the Ethernet port it uses
when running.

The .pin file just a human readable file that  describes the firmware contents and
pin connections. Its made by running mesaflash's --readhmid command.

To make new firmware, one changes the PINXXXX.vhd file and re-compiles
the firmware source using the software toolchain for the particular FPGA.
 
Last edit: 29 Jan 2025 17:32 by PCW. Reason: clarify

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

More
29 Jan 2025 20:38 #320114 by slowpoke
Replied by slowpoke on topic 7i96s maximum number of encoders?

There are no normal encoders on TB3
(there are 4 MPG encoders but these are not suitable
for measuring frequency)

It would require different firmware to put standard
encoders on TB3 (7i96s_p1encd has 1 encoder on TB2 and
6 more on P1)

Your mesaflash command may have failed because either you have LinuxCNC running
or LinuxCNC did not exit cleanly. LinuxCNC blocks access to the Ethernet port it uses
when running.

The .pin file just a human readable file that  describes the firmware contents and
pin connections. Its made by running mesaflash's --readhmid command.

To make new firmware, one changes the PINXXXX.vhd file and re-compiles
the firmware source using the software toolchain for the particular FPGA.

 

Hmmm....

So with the existing firmware, it sounds like I could connect my two MPG encoders to say the first two MPG inputs on TB3, and then connect my two potentiometer based frequency sources to the 3rd & 4th encoder inputs on P1?

Assuming that sounds acceptable, if I want to get the frequency values from the P1 encoders, should I be wiring my frequency sources, to A, B, or IDX of those P1 encoder inputs? I'm not sure which of the three signals is the source for hm2_7i96s.0.encoder.04.velocity




 

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

More
29 Jan 2025 20:44 #320115 by PCW
Replied by PCW on topic 7i96s maximum number of encoders?
With a single input, it must connect to the 'A' pin.
(and the encoder counter set to counter mode)


 
The following user(s) said Thank You: slowpoke

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

More
30 Jan 2025 02:35 #320131 by slowpoke
Replied by slowpoke on topic 7i96s maximum number of encoders?

With a single input, it must connect to the 'A' pin.
(and the encoder counter set to counter mode)

 

That works , I now have an external pot controlling Feed Override. Not sure why hm2_7i96s.0.encoder.04.velocity is negative?, but I used scale to flip the polarity and that seems to work.

Tomorrow I will add Jog speed in a similar fashion, and then on to the MPG's, I think the MPG's are the last hurdle.

Thanks for all your help
 

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

More
30 Jan 2025 03:00 #320132 by PCW
Replied by PCW on topic 7i96s maximum number of encoders?
The direction is determined by the 'B' pin

If you are only measuring frequency you
can make firmware that has only 'A' inputs
The following user(s) said Thank You: slowpoke

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

More
30 Jan 2025 08:26 #320138 by slowpoke
Replied by slowpoke on topic 7i96s maximum number of encoders?

The direction is determined by the 'B' pin

If you are only measuring frequency you
can make firmware that has only 'A' inputs
 

I'm glad you mentioned the 'B' pin, because I just realized the 'B' pin is now floating on my isolated input, will fix that.

When you say "you can make firmware", what software tools would I need to do that?

It's been a while since I dabbled with VHDL, Verilog

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

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