- Posts: 19311
- Thank you received: 4655
mwinterm wrote: When an index is found the encoder would still reset while the machine being in motion. Unless I would within the HAL-component try to capture the event of the reset instantaneously and artificially generate a 'fake' position signal consistent with the one before the reset
(something I would not consider to be very elegant)
Please Log in or Create an account to join the conversation.
I agree that this is feasible...mwinterm wrote: When an index is found the encoder would still reset while the machine being in motion. Unless I would within the HAL-component try to capture the event of the reset instantaneously and artificially generate a 'fake' position signal consistent with the one before the reset
That is exactly what I am proposing for the first index.
(something I would not consider to be very elegant)
It's all just numbers to the computer. The system gets a position update from the Mesa driver once every 1ms, if the HAL component is inserted in the call-list between hm2_xxxx.read and motion-command-handler then the timing is guaranteed and the motion controller will always see the modified result.
The HAL component is going to have to modify the input position to convert it to an absolute position anyway.
I have seen that there are some measures in place (didn't study them thoroughly though). But I tried using an unmodified LinuxcCNC to just home to the next index found (no distance-coded homing) and the jerky move at the end of the homing happened non-the-less (not necessarily an f-error; f-error seemed only to occur on top when homing with faster speeds). I have the impression that the means in place to avoid the f-error work probably fine for step/dir controlled systems but not so well for velocity controlled systems with direct position measuring like the Mikron. I experimented a bit with it and the only way to reset the offsets without some jerky moves I found so far are when first making sure that the system is not moving before resetting.The LinuxCNC system already has a way to avoid an f-error when the index reset happens on homing, which saves some trouble.
That is exactly the configuration I used for the experiment with a single index-pulse described above as well as with the modified homing I used for distance-encoded homing.The system should be configured for HOME_INDEX_ONLY_START which is set if the latch velocity is non-zero and HOME_INDEX_ENABLE is true. That is probably the appropriate configuration in this case.
That is also what I found. However according to the docu linuxcnc.org/docs/html/config/ini-homing...ome_absolute_encoderWhat isn't ideal is that there seems to be no way to skip the HOME_FINAL_MOVE_START so whilst the home search will be a short move, the system will still move the HOME_POSITION afterwards.
Please Log in or Create an account to join the conversation.
mwinterm wrote: I'm pretty indifferent regarding the distance-coded homing within the LinuxCNC homing routine or within a separate HAL-component. But modifying the Hostmot2 to allow for an index-signal trigger without resetting is basically three lines of code and in my mind simpler than doing the additional fake position math in the HAL-component.
PS: ...the only way I could find so far to have an encoder reset during a move without the jerky stuff was by driving the servo directly with a constant voltage during homing. But I doubt that this is the way to go....
Please Log in or Create an account to join the conversation.
PS: ...the only way I could find so far to have an encoder reset during a move without the jerky stuff was by driving the servo directly with a constant voltage during homing. But I doubt that this is the way to go....
Please Log in or Create an account to join the conversation.
Please Log in or Create an account to join the conversation.
Please Log in or Create an account to join the conversation.