SSI absolute encoders and analog servos
18 Aug 2016 14:12 #78995
by terkaa
Replied by terkaa on topic SSI absolute encoders and analog servos
Did you find an example for me?
Tero
Tero
Please Log in or Create an account to join the conversation.
18 Aug 2016 17:41 #79018
by PCW
Replied by PCW on topic SSI absolute encoders and analog servos
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)
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.
18 Aug 2016 18:02 #79019
by terkaa
Replied by terkaa on topic SSI absolute encoders and analog servos
Ok, thank you. I will try my best to get this working either tomorrow or monday.
Tero
Tero
Please Log in or Create an account to join the conversation.
19 Aug 2016 08:22 #79040
by terkaa
Replied by terkaa on topic SSI absolute encoders and analog servos
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
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.
19 Aug 2016 10:28 #79042
by terkaa
Replied by terkaa on topic SSI absolute encoders and analog servos
If it should be hm2_5i25.0.encoder.00.timer-num there are no hm2_5i25.0.encoder pins at all.
Tero
Tero
Please Log in or Create an account to join the conversation.
19 Aug 2016 10:48 #79044
by andypugh
Replied by andypugh on topic SSI absolute encoders and analog servos
Try "show param" too.
Please Log in or Create an account to join the conversation.
19 Aug 2016 11:40 #79045
by terkaa
Replied by terkaa on topic SSI absolute encoders and analog servos
Nope it did not work either.
Tero
Tero
Please Log in or Create an account to join the conversation.
19 Aug 2016 11:59 #79049
by andypugh
Replied by andypugh on topic SSI absolute encoders and analog servos
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?
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.
19 Aug 2016 12:20 #79052
by PCW
Replied by PCW on topic SSI absolute encoders and analog servos
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.
(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.
19 Aug 2016 12:27 #79054
by terkaa
Replied by terkaa on topic SSI absolute encoders and analog servos
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.
Time to create page: 0.111 seconds