Fix kinematic update#107
Conversation
|
@LeandroMartinsdS please can you take a look at this? |
|
Thank you for your suggestion. I've observed the issue, but I haven't being able to reproduce your fix. For me the problem seems to remain. I think that a neat way of solving this would be indicating in the |
|
Am I right in suppose that in your case the Q7x (being x the real motor number) are being updated by a PLC in the controller? If this assumption is correct, it explains why I'm not seeing difference in the behaviour, even after your fix. I'll keep investigating the best way of doing this. |
|
Hi @LeandroMartinsdS and @gilesknap, I hope you are well. My problem is related to updating the kinematics Note that when the real motor is moved, the I tried the |
Yes, you are correct. |
|
The I got it working adding the following at the end of |
410784a to
4d292e2
Compare
Hi @LeandroMartinsdS , I did the solution you suggested in I did some monitoring using "gdb", the problem may be related to However, this change would affect all motors modules and it will be difficult to make a "pull request" in the official repository. |
8f3a12f to
16caa8e
Compare
|
@guirodrigueslima, it is not clear if you could achieve the behaviour you expected with your last commit. The implementation seems fine to me, as I could see the There is an issue with the execution order of
This issue becomes less frequent when executing the PLC in RT tasks, but it still depends on the execution frequency. In my tests:
I'm currently uncertain about how to resolve this issue. |
| int csNum = this->getAxis(pAxis->axisNo_)->getAxisCSNo(); | ||
| if (csNum > 0) { | ||
| csResetAllDemands = true; | ||
| makeCSDemandsConsistent(); |
There was a problem hiding this comment.
Substitute makeCSDemandsConsistent() for pCSControllers_[csNum]->updateAxis().
Also, the updateAxis can be removed from the `makeCSDemandsConsistent".
|
Looking again into this, I realise that it can be solved just looking into the I have made suggestions in the code. |
This was my first approach before opening this "pull request", but there is a problem. With simulated motors, this solution works very well, because the position is static. However, with real motors there is a constant fluctuation of the Am I right ? |
|
Indeed, you're completely right, sorry for that. Have edited my suggestions. |
|
I thought of another solution without In the |
|
I think it's in the same direction of I was thinking with my edited suggestion. Do you see any specific reason for looping over all of the CS, instead of calling the |
Sorry, I didn't see your suggested fix above, the loop isn't necessary. |
|
I made all the modifications. It seems to be working very well! 😀 |
|
Have you tested this fix, will the pull request be made? |
|
Yes, I have quickly tested it and everything seems to be in order. |
|
Closed in favor of #116 |
When the .OFF of the real axis was updated, the .VAL of the kinematics did not update. This problem meant that the GUI interface did not update the values correctly, causing an error during the operation of the beamline by researchers.
This change does not impact the current functioning of the getAxisStatus() function and solves the problem of displacement of real axes with kinematics. When the offset value is changed, the position value is changed in the first callback and returns to its state in the second callback, causing the motorStatusDone_ parameter to be updated. Is there another way to fix this problem?
Thanks!