Mesa 7i77 support for absolute linear encoder

More
06 Dec 2023 19:02 - 09 Dec 2023 01:47 #287372 by PCW
Here is fixed firmware, the previous firmware was missing the DPLL:

 

File Attachment:

File Name: 5i25_7i77x...2-06.zip
File Size:101 KB


The sserial settings are not relevant since
the serial expansion port is now a BISS interface
Attachments:
Last edit: 09 Dec 2023 01:47 by PCW.

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

More
08 Dec 2023 11:48 #287522 by pmchetan

Here is fixed firmware, the previous firmware was missing the DPLL:

 

File Attachment:

File Name: 5i25_7i77x...2-06.zip
File Size:101 KB


The sserial settings are not are not relevant since
the serial expansion port is now a BISS interface

The timer-us pin is now available and I have been trying to make the HAL file exactly like another topic on the forum , but I keep getting: couldn't read from hm2_5i25.0.biss.00 You  may need to change the timing of the hm2dpll timer. This warning  will not repeat.

In the HAL configuration, pins>BISS>0> there is a hm2_5i25.0.biss.00.read_invalid(pin name from memory, might have slightly different name) pin set to true. The pin is not writable.
The encoder is of the same make and has exactly same bit length and type as mentioned in the 6i25-7i85 BISS topic on the forum mentioned above:
www.forum.linuxcnc.org/media/kunena/atta..._20220113_091133.png
I tried changing the following with wide values:
hm2_5i25.0.dpll.01.timer-us -100
hm2_5i25.0.biss.00.timer-number 1
hm2_5i25.0.biss.00.frequency-khz 2000

And hm2_pci config="biss_chan_0=null%1bcrc%6fwarning%1berror%1bencoder%26e" seem to show the said pins in Hal configuration but nothing flips, nor position updates or no changes in the pins if I move the encoder.
I flipped the (clock) MA+ MA- and (data) SLO+ SLO- wiring on the board among the positive and negative pins and I got no result.

I don't know what else can be done. I have anyways ordered 7i85 and 7i74 boards which will reach me in another week. If there is anything else I could try to get the encoder working on 7i77, I'm all ears. 

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

More
08 Dec 2023 14:38 #287537 by PCW
What is your servo thread period?
Are you running a standard LinuxCNC configuration file?
Do you get clock pulses?

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

More
08 Dec 2023 17:29 - 08 Dec 2023 17:31 #287561 by pmchetan

What is your servo thread period?
Are you running a standard LinuxCNC configuration file?
Do you get clock pulses?
 


Running on a fairly fast intel 7880 i7 Hp Z8 workstation. stock Debian 12 with preempt-rt installed. I kept the servo thread at 100000 ns.
LinuxCNC configured using pncconf and edited the main HAL file directly (not custom HAL or postgui HAL). Not getting any clock pulse, 120-150 milli volts peak to peak just noise. 
When I enable the linuxcnc machine(F1), turn on the software emergency stop (F2) and try to jog, the controller locks up and emergency stop is activated. I'm guessing maybe thats because there is no joint feedback.
Should we try 6i25 firmware?
Last edit: 08 Dec 2023 17:31 by pmchetan. Reason: Formatting

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

More
08 Dec 2023 17:37 - 08 Dec 2023 23:00 #287563 by PCW
If you are not getting clock pulses, there is likely a hardware or setup error somewhere

You should get a pulse train from the clock pins (7I77 TX pins) every servo thread

What are the static voltage levels of TX- and TX+ with nothing connected?
(TX- is TB6 pin pin 6 TX+ is TB6 pin 6)
Last edit: 08 Dec 2023 23:00 by PCW. Reason: dup

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

More
08 Dec 2023 22:25 - 08 Dec 2023 23:46 #287592 by PCW
Just verified that the firmware I posted works on a 5I25 + 7I77 + BISS encoder.

One thing I noticed is that I had to increase the DPLL pre-read time from -100 to -200 usec
This is because in addition to the BISS data transmission time (biss-clockperiod*number of bits),
you have to add the encoders inherent readback delay to the pre-read time. Otherwise
you get the "invalid data" error. The "invalid data" error means that the BISS serial data was still
being sent when read  by LinuxCNC, indicating that you need to start the read earlier.

For the connections, I found this note in my test ini file:

CONFIG="num_encoders=1 num_stepgens=4 biss_chan_0="position%30e" "
# AM3021-1C41-000 Motor with BISS encoder 19 bits/turn 11 bits turn count
# Mesa Serial port polarities are reversed relative to BISS signal names so
# BISS CLK+ = Mesa TX- BISS Data+ = Mesa RX- etc

 
Last edit: 08 Dec 2023 23:46 by PCW. Reason: clarify

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

More
21 Dec 2023 19:26 #288783 by pmchetan

If you are not getting clock pulses, there is likely a hardware or setup error somewhere

You should get a pulse train from the clock pins (7I77 TX pins) every servo thread

What are the static voltage levels of TX- and TX+ with nothing connected?
(TX- is TB6 pin pin 6 TX+ is TB6 pin 6)

I will have access to the encoders in another 10 days, I ordered renishaw BISS protocol encoder in hopes that I could figure out the way to servo my axes with it.
With nothing connected, TX- and TX+ pins are at 0.002V

 One thing I noticed is that I had to increase the DPLL pre-read time from -100 to -200 usec

I tried -50 to -500 usecs. Still throwsup the error couldn't read from encoder, you might need to change the timing of hm2dpll timer at the begining of Axis.

CONFIG="num_encoders=1 num_stepgens=4 biss_chan_0="position%30e"

I believe that biss_chan_0="____" is very important. I had put biss_chan_0=null%1bcrc%6fwarning%1berror%1bencoder%26e" cobbled up from  another topic on the forum  and based on the data sheet of the encoder. Is there a detailed syntax documentation? the man page for hm2 glosses over it saying the format is biss_chan_N=abc% nq


I wanted to test the encoder with 7i77 board because thats all I had with me. Now that I have anyways bought the encoder (waiting for delivery) and mesa 7i74 and 7i85 boards (delivered tomorrow or the day after) Can you make the firmware for 5i25-7i74 and 5i25-7i85 with BISS?

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

More
21 Dec 2023 19:52 #288784 by PCW
If BISS is enabled, the TX lines must have a voltage difference between
TX+ and TX- pins.  If this is not the case, there is a hardware issue.

The BISS format string tokens are the same as the SSI format string tokens
which are documented on the hostmot2 manual page.

On a previous post, you said

I kept the servo thread at 100000 ns.

 Did you mean 1000000 ns (1 ms)?  because 100000 ns (100 usec) is likely way too fast for the
BISS encoder to respond, especially at a low (400 KHz?) clock rate
 

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

More
22 Dec 2023 00:33 #288797 by PCW
 

File Attachment:

File Name: 5i25_biss.zip
File Size:236 KB


5i25 BISS firmware files for
7I77+7I74
7I85
7I74
Attachments:
The following user(s) said Thank You: pmchetan

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

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