estimate velocity encoder
- papagno-source
- Offline
- Senior Member
Less
More
- Posts: 72
- Thank you received: 2
27 May 2023 18:11 #272276
by papagno-source
estimate velocity encoder was created by papagno-source
Hi at all.
I have an encoder capture card and I transfer the counts to a linuxcnc pin. Also knowing the resolution of the encoder as imp/rev , how can I, with a hal component, obtain the rpm speed and the position?
THanks
I have an encoder capture card and I transfer the counts to a linuxcnc pin. Also knowing the resolution of the encoder as imp/rev , how can I, with a hal component, obtain the rpm speed and the position?
THanks
Please Log in or Create an account to join the conversation.
27 May 2023 18:48 - 27 May 2023 18:48 #272279
by PCW
Replied by PCW on topic estimate velocity encoder
If your encoder hardware does not provide a velocity estimate, you can use
the ddt component on the encoder position (assuming you have a floating
point position) to get a crude velocity estimate.
(Its likely you will need to filter this velocity to get usable numbers at low speeds)
the ddt component on the encoder position (assuming you have a floating
point position) to get a crude velocity estimate.
(Its likely you will need to filter this velocity to get usable numbers at low speeds)
Last edit: 27 May 2023 18:48 by PCW.
Please Log in or Create an account to join the conversation.
- papagno-source
- Offline
- Senior Member
Less
More
- Posts: 72
- Thank you received: 2
28 May 2023 15:58 #272345
by papagno-source
Replied by papagno-source on topic estimate velocity encoder
HI PCW.
Thanks for help.
I have test is, ddt.0.out not is rmp/60 , it with about 10 rpm , have value 1000 about.
But ddt component not accept input resolution encoder for estimate the value .
How can have the same out value the hm2.x.encoder.velocity ?
we have only 2 value:
1-encoder resolution 4096imp/rev
2-count in float
Thanks for help.
I have test is, ddt.0.out not is rmp/60 , it with about 10 rpm , have value 1000 about.
But ddt component not accept input resolution encoder for estimate the value .
How can have the same out value the hm2.x.encoder.velocity ?
we have only 2 value:
1-encoder resolution 4096imp/rev
2-count in float
Please Log in or Create an account to join the conversation.
28 May 2023 17:32 #272350
by PCW
Replied by PCW on topic estimate velocity encoder
If the encoder hardware only provides an integer count you may have to
write an encoder component to convert that integer count to a position number
You can partially do this by stringing together existing LinuxCNC realtime components
(first convert to floating point with conv_s32_float and then use the scale component
for scaling to position)
write an encoder component to convert that integer count to a position number
You can partially do this by stringing together existing LinuxCNC realtime components
(first convert to floating point with conv_s32_float and then use the scale component
for scaling to position)
Please Log in or Create an account to join the conversation.
- papagno-source
- Offline
- Senior Member
Less
More
- Posts: 72
- Thank you received: 2
28 May 2023 17:59 #272352
by papagno-source
Replied by papagno-source on topic estimate velocity encoder
HI PCW.
My problem not is pin position , but pin velocity.
The hardware write in pin float the increment the count , in positive or negative , depende sense encoder rotation.
The question is, how can estimate a velocity ?
WE have only count increment pin and know the encoder resolution .
My problem not is pin position , but pin velocity.
The hardware write in pin float the increment the count , in positive or negative , depende sense encoder rotation.
The question is, how can estimate a velocity ?
WE have only count increment pin and know the encoder resolution .
Please Log in or Create an account to join the conversation.
28 May 2023 18:05 #272353
by PCW
Replied by PCW on topic estimate velocity encoder
So if you have a floating point position
you can run it through the scale and ddt components
to get a velocity estimate.
you can run it through the scale and ddt components
to get a velocity estimate.
Please Log in or Create an account to join the conversation.
- papagno-source
- Offline
- Senior Member
Less
More
- Posts: 72
- Thank you received: 2
28 May 2023 18:36 #272358
by papagno-source
Replied by papagno-source on topic estimate velocity encoder
HI PCW.
The ddt.0.out pin , non are rpm , because if turn encoder about 10 rev/min have big value in output about 1000 or 2000.
The ddt.0.out pin , non are rpm , because if turn encoder about 10 rev/min have big value in output about 1000 or 2000.
Please Log in or Create an account to join the conversation.
28 May 2023 18:39 #272360
by PCW
Replied by PCW on topic estimate velocity encoder
That's what the scale component is for...
Normally if you want RPM, say for a spindle "position" is scaled in turns.
(spindles are scaled for 1.0 per turn)
Normally if you want RPM, say for a spindle "position" is scaled in turns.
(spindles are scaled for 1.0 per turn)
Please Log in or Create an account to join the conversation.
Time to create page: 0.071 seconds