SSI absolute encoders and analog servos

More
18 Aug 2016 14:12 #78995 by terkaa
Did you find an example for me?


Tero

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

More
18 Aug 2016 17:41 #79018 by PCW
The config line for the Siemens encoder is this

ssi_chan_0=position%24ge

Meaning 24 bit (g)ray (e)ncoder
(see Hostmot2 manual page)

Here are some minimal setup

setp hm2_5i25.0.ssi.00.frequency-khz 400
setp hm2_5i25.0.ssi.timer-number 1

In addition, the dpll must be set up to start the ssi data transfer before LinuxNCNC read function is called

setp hm2_5i25.0.hm2dpll.01.timer-us -100

(assuming 100 usec is enough for the worst case transfer, 24 bits at 400 KHz is about 63 usec so ok in this case)

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

More
18 Aug 2016 18:02 #79019 by terkaa
Ok, thank you. I will try my best to get this working either tomorrow or monday.

Tero

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

More
19 Aug 2016 08:22 #79040 by terkaa
I get:

Found file(REL): ./core_sim4.hal
./core_sim4.hal:15: parameter or pin 'hm2_5i25.0.ssi.timer-number' not found

Show pin gives:

12 float IN 100 hm2_5i25.0.dpll.01.timer-us
12 float IN 100 hm2_5i25.0.dpll.02.timer-us
12 float IN 100 hm2_5i25.0.dpll.03.timer-us
12 float IN 100 hm2_5i25.0.dpll.04.timer-us
12 float IN 1.000063 hm2_5i25.0.dpll.base-freq-khz
12 u32 OUT 0x0000002A hm2_5i25.0.dpll.ddsize
12 float OUT 13.26796 hm2_5i25.0.dpll.phase-error-us
12 u32 IN 0x00400000 hm2_5i25.0.dpll.plimit
12 u32 OUT 0x00000008 hm2_5i25.0.dpll.prescale
12 u32 IN 0x000007D0 hm2_5i25.0.dpll.time-const
12 u32 OUT 0x00000000 hm2_5i25.0.sserial.port-0.fault-count
12 u32 OUT 0x00000001 hm2_5i25.0.sserial.port-0.port_state
12 bit IN TRUE hm2_5i25.0.sserial.port-0.run
12 u32 OUT 0x00000000 hm2_5i25.0.sserial.port-1.fault-count
12 u32 OUT 0x00000001 hm2_5i25.0.sserial.port-1.port_state
12 bit IN TRUE hm2_5i25.0.sserial.port-1.run
12 bit OUT FALSE hm2_5i25.0.ssi.00.data-invalid
12 s32 OUT 11184810 hm2_5i25.0.ssi.00.positon.count
12 bit I/O FALSE hm2_5i25.0.ssi.00.positon.index-enable
12 float OUT 1.118481e+07 hm2_5i25.0.ssi.00.positon.position
12 s32 OUT 11184810 hm2_5i25.0.ssi.00.positon.rawcounts
12 bit I/O FALSE hm2_5i25.0.ssi.00.positon.reset

Ẁhat is wrong?

Tero

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

More
19 Aug 2016 10:28 #79042 by terkaa
If it should be hm2_5i25.0.encoder.00.timer-num there are no hm2_5i25.0.encoder pins at all.


Tero

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

More
19 Aug 2016 10:48 #79044 by andypugh
Try "show param" too.

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

More
19 Aug 2016 11:40 #79045 by terkaa
Nope it did not work either.


Tero

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

More
19 Aug 2016 11:59 #79049 by andypugh
I just realised... This is an SSI pin.

The SSI pin names depend entirely on the config string passed to the module.

In other words, you only get the pins you ask for. Why do you think that there should be a timer-number pin?

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

More
19 Aug 2016 12:20 #79052 by PCW
Its a parameter:
(s32 r/w) hm2_XiXX.N.ssi.MM.timer-num
This parameter allocates the SSI module to a specific
hm2dpll timer instance. This pin is only of use in
firmwares which contain a hm2dpll function and will
default to 1 in cases where there is such a function, and
0 if there is not. The pin can be used to disable reads
of the encoder, by setting to a nonexistent timer number,
or to 0.

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

More
19 Aug 2016 12:27 #79054 by terkaa
So this line should be "setp hm2_5i25.0.ssi.00.timer-number 1"

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

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