Encoder Position Snapshot

キャンセル
次の結果を表示 
表示  限定  | 次の代わりに検索 
もしかして: 

Encoder Position Snapshot

ソリューションへジャンプ
1,835件の閲覧回数
dh1
Contributor II

Hi

For our motor control application, we use incremental quadrature encoders. Our controllers typically have the ability to "latch" (take a snapshot of) the encoder position, which can happen by using the encoder index or a digital input.

Now we miss a functionality with the i.MX RT's encoder peripheral. We can use the Trigger Pin to take a snapshot of the position. But the Trigger Pin can only react on rising edge, not on falling edge of the signal. Is there any way to react on the falling edge of the signal?

Another attempt would be to use the HOME signal, which can react on both edges. But the HOME Signal can only reset the counter positions, not latch the position at the occurrence of the signal transition.

Is there any way to find out how much the "offset" of the reset operation was? E.g. if the counter position was 1000 at the time of the HOME Signal transition, then the position will be reset to 0.
Is there a way to find out the value 1000 afterwards?

Thanks and best regards, Daniel

0 件の賞賛
返信
1 解決策
1,770件の閲覧回数
FelipeGarcia
NXP Employee
NXP Employee

Hi Daniel,

As you mentioned trigger pin can only react at rising edge so I don’t think this is possible. The thing that comes to my mind is that you have an external interrupt that when is triggered you manually read counter registers so the holding registers are written with its value. Unfortunately, there is no configuration of the module itself that can perform this.

Regards,

Felipe

元の投稿で解決策を見る

0 件の賞賛
返信
3 返答(返信)
1,806件の閲覧回数
FelipeGarcia
NXP Employee
NXP Employee

Hi Daniel,

Have you tried using holding registers? Please check below snippet from the RM.

FelipeGarcia_1-1620431015025.png

Best regards,

Felipe

0 件の賞賛
返信
1,788件の閲覧回数
dh1
Contributor II

Hi Felipe

Thanks for your reply.

Yes we are using the holding registers.
We use the TRIGGER pin as this is the only pin which allows to copy the current position to the holding registers. But it only allows to react to the rising edge of the signal. We need to be able to react on both edges.

The HOME and INDEX allow to react on both edges, but they can only reset the current position to 0, not to copy the current position to the holding registers.

We could work around the problem, if we know the "shift value" when the reset to 0 happens. Is there a way to know it?

Thanks and regards,
Daniel

0 件の賞賛
返信
1,771件の閲覧回数
FelipeGarcia
NXP Employee
NXP Employee

Hi Daniel,

As you mentioned trigger pin can only react at rising edge so I don’t think this is possible. The thing that comes to my mind is that you have an external interrupt that when is triggered you manually read counter registers so the holding registers are written with its value. Unfortunately, there is no configuration of the module itself that can perform this.

Regards,

Felipe

0 件の賞賛
返信