SSI ABS Encoder

More
5 years 5 months ago #208105 by nhanpham
Replied by nhanpham on topic SSI ABS Encoder

andypugh wrote: counts-per-rev should probably be 4096. But that isn't the problem.

Setting it to a much larger number might be an interesting experiment, though.

Is there any way to see the raw data from the encoder? if no-wrap is active then the driver doesn't do very much with the data that comes back. Is it possible that what you see is the actual numbers from the encoder?

I think you can use "enable_raw" in the loadrt hostmot2 line of the hal and peek at the actual register values on the FPGA.

linuxcnc.org/docs/2.8/html/man/man9/hostmot2.9.html#Raw%20Mode

I have attached the hostmot2 register map so that you know where to look.


i have used an oscilloscope to see data. it returns a correct value from 0->4095

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

More
5 years 5 months ago - 5 years 5 months ago #208106 by PCW
Replied by PCW on topic SSI ABS Encoder
Sounds like the data is corrupted/shifted
inverted clock maybe?

Andys raw read suggestion is good

For debugging, its important to see what the FPGA reads
Last edit: 5 years 5 months ago by PCW.

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

More
5 years 5 months ago #208112 by nhanpham
Replied by nhanpham on topic SSI ABS Encoder

andypugh wrote: Specifically this bit..

Code:
SSI Data Register0, right justifed. Writes to this location will start a read cycle for the specific SSI interface addressed 0x6900 SSI data register0 channel 0 0x6904 SSI data register0 channel 1 0x6908 SSI data register0 channel 2 0x690C SSI data register0 channel 3 ... 0x6A00 SSI data register1 channel 0 0x6A04 SSI data register1 channel 1 0x6A08 SSI data register1 channel 2 0x6A0C SSI data register1 channel 3


Is it correct?
Code:
setp hm2_7i80.0.raw.read_address 0x6900 show pin hm2_7i80.0.read_data

The values return from 0x0000000->0x0000ffff for 0->4096

thank you for your helping

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

More
5 years 5 months ago #208116 by PCW
Replied by PCW on topic SSI ABS Encoder
What does hm2_7i80.0.ssi.00.zencoder.rawcounts
show?

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

More
5 years 5 months ago - 3 years 11 months ago #208118 by nhanpham
Replied by nhanpham on topic SSI ABS Encoder

PCW wrote: What does hm2_7i80.0.ssi.00.zencoder.rawcounts
show?

it shows from 0-4096
But when I restart linux cnc, the values (3072 to 4096 ) is negative numbers from -1024 ->-1

Last edit: 3 years 11 months ago by nhanpham.

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

More
5 years 5 months ago #208121 by andypugh
Replied by andypugh on topic SSI ABS Encoder

annhandt09 wrote: The values return from 0x0000000->0x0000ffff for 0->4096


This is starting to look like it's my fault, then.

However I am fairly sure that the encoder wrapping logic works properly, as it is used extensively by things like the smart-serial MPG counters.

Is the returned position continuous at least? If it is then the conventional axis home offsets will mask the issue.

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

Time to create page: 0.077 seconds
Powered by Kunena Forum