Relative Encoder Read
- hemantdandekar
- Topic Author
- Offline
Less
More
- Posts: 36
- Thank you received: 0
16 years 5 months ago #13375123
by hemantdandekar
Relative Encoder Read was created by hemantdandekar
<P style="MARGIN: 0px">Trying to read Encoder in position mode.
<P style="MARGIN: 0px">Reading absolute value while motor is moving or stopped is fine.
<P style="MARGIN: 0px">Reading relative value while motor is moving is also fine.
<P style="MARGIN: 0px">But when try to read relative encoder count when motor has reached the final position causes the motor to run again for the same count as before. Why this happens when we are not giving any SET command?.
<P style="MARGIN: 0px">
<P style="MARGIN: 0px">Secondly if we try to reset the encoder counter after completing one motion segment the motor again moves by the earlier programmed move. Why?
<P style="MARGIN: 0px">Reading absolute value while motor is moving or stopped is fine.
<P style="MARGIN: 0px">Reading relative value while motor is moving is also fine.
<P style="MARGIN: 0px">But when try to read relative encoder count when motor has reached the final position causes the motor to run again for the same count as before. Why this happens when we are not giving any SET command?.
<P style="MARGIN: 0px">
<P style="MARGIN: 0px">Secondly if we try to reset the encoder counter after completing one motion segment the motor again moves by the earlier programmed move. Why?
Please Log in or Create an account to join the conversation.
- cosma
16 years 5 months ago #13376706
by cosma
Replied by cosma on topic Re:Relative Encoder Read
<P style="MARGIN: 0px">The first point should not be happening. When testing the encoder with Roborun (Encoder Tab), you may be able to see that it is permanently querying the controller's absolute position with the ?q0 and ?q1 queries. This is done continuously and the motor stays at its position when stopped even though these queries are taking place. Make sure that you are using the query (?q0) and not the command (!q0)
<P style="MARGIN: 0px">
<P style="MARGIN: 0px">If you reset the counter and keep the destination alone, then you immediately get a delta between the current position (resetted counter) and the destination, and the motor will start moving.
<P style="MARGIN: 0px">
<P style="MARGIN: 0px">If you reset the counter and keep the destination alone, then you immediately get a delta between the current position (resetted counter) and the destination, and the motor will start moving.
Please Log in or Create an account to join the conversation.
- hemantdandekar
- Topic Author
- Offline
Less
More
- Posts: 36
- Thank you received: 0
16 years 5 months ago #13377168
by hemantdandekar
Replied by hemantdandekar on topic Re:Relative Encoder Read
The problem i am talking about is reading "relative encoder count" that is command ?q4 and ?q5. When i issue these commands (?Q4, ?Q5) while motors are at rest after executing previous !Q command , the motors again starts moving by the previous count.
Please Log in or Create an account to join the conversation.
- cosma
16 years 5 months ago #13377400
by cosma
Replied by cosma on topic Re:Relative Encoder Read
<P style="MARGIN: 0px">we can replicate your problem.
<P style="MARGIN: 0px">
<P style="MARGIN: 0px">It appears that when reading the encoder in relative value, the counter gets reset, so it then moves again to the destination.
<P style="MARGIN: 0px">
<P style="MARGIN: 0px">We will look into the problem but it will not be immediate to find a solution. In the meantime, please consider working in absolute mode.
<P style="MARGIN: 0px">
<P style="MARGIN: 0px">It appears that when reading the encoder in relative value, the counter gets reset, so it then moves again to the destination.
<P style="MARGIN: 0px">
<P style="MARGIN: 0px">We will look into the problem but it will not be immediate to find a solution. In the meantime, please consider working in absolute mode.
Please Log in or Create an account to join the conversation.
Moderators: tonysantoni
Time to create page: 0.065 seconds