Absolute Encoder Questions / SSI via 5i25

More
26 Aug 2013 03:37 #38091 by PKM
I tried 500kHz, 800kHz too.

What is absenc.N.debug pin? It's always 33333333 no matter what frequency-khz is.
But
+ *enc->hal.pin.debug = hm2->absenc.clock_frequency;

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

More
26 Aug 2013 03:48 #38092 by PCW
Not sure but you can certainly look at the source

50 KHZ is likely to not work, if your encoder can do 1MHZ I would start there

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

More
26 Aug 2013 04:45 #38093 by PKM
I'm trying 1000, no changes.
Something's probably wrong elsewhere.
I even replaced the config string with the string I checked before... still nothing.

andypugh: I commented out that annoying error message. Now it shows
hm2/hm2_5i25.0: num absencs = 0
though I start hm2_pci with num_absencs = 1 or 2 and there are absenc.00 and 01 hal pins.

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

More
26 Aug 2013 16:01 - 26 Aug 2013 16:32 #38097 by PKM
andypugh
I seem to have found a bug

hm2->absenc.clock_frequency = md->clock_freq

Which equals to clock_low = 33.3MHz

UPD: Oh no, wrong conclusion. It's meant this way. Just wonder why we need to report FPGA clock frequency.
To make sure the right parameters written to encoder I just used the parameters string that worked for me. No reading.
Now I will look to read function...
Last edit: 26 Aug 2013 16:32 by PKM.

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

More
26 Aug 2013 19:09 #38106 by andypugh
I am on a ferry at the moment. I will be back online properly in a couple if hours.

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

More
26 Aug 2013 23:26 #38116 by PCW
FPGA clock_low can vary from 33.3 MHz to 100 Mhz or more depending on FPGA card. The driver needs the clock_low frequency in order to set the SSI clock generator to the requested rate:
SSIDDS := (SSIClockRate*65536/Clock_low) SHL 16

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

More
27 Aug 2013 00:23 #38119 by PCW
Probably the best way to start a SSI/BISS/Fanuc encoder transfer or a SPI transfer is via a timer start, some programmable number of uSec before the nominal servo thread actuation, so the data is already there when needed (and the sample time is de-jittered)

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

More
27 Aug 2013 05:41 #38129 by andypugh

Probably the best way to start a SSI/BISS/Fanuc encoder transfer or a SPI transfer is via a timer start, some programmable number of uSec before the nominal servo thread actuation, so the data is already there when needed (and the sample time is de-jittered)


The "trigger" code is tiny. What I can imagine doing is adding it to a base thread that adaptively works out how it is phased relative to the servo thread, and sends a trigger on the correct call instance. (servo thread and base thread are always an integer ratio)

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

More
27 Aug 2013 05:43 - 07 Sep 2013 05:08 #38130 by andypugh
This is the latest patch version, having realised not only that I had data and command swapped, but that the regmap format had changed.
Last edit: 07 Sep 2013 05:08 by andypugh. Reason: Patch superceded

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

More
27 Aug 2013 06:07 #38131 by PCW

The "trigger" code is tiny. What I can imagine doing is adding it to a base thread that adaptively works out how it is phased relative to the servo thread, and sends a trigger on the correct call instance. (servo thread and base thread are always an integer ratio)


This is essentially what the DPLL timer system does except that it requires no base thread (its phase locked to the servo thread)and has ns resolution and ns jitter (the timer start bit in the control register is a gate for this, there will be a 4 bit timer select register (15..12) added as well to select which timer output is used. Each of the 16 available timer output can be programed to an arbitrary phase time relative to the servo thread sync point

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

Time to create page: 0.089 seconds
Powered by Kunena Forum