Retrofitting Mikron WF41C: Distance coded homing success

More
5 years 6 months ago #205814 by gaston48
Replied by gaston48 on topic Retrofitting Mikron WF41C
At the oscilloscope, the signal is very clean. Even if this does not correspond to real precision,
concerning the control loop, the calculation of the instantaneous speed is more fluid I think.
To avoid noise on the analog inputs, each channel is shielded in a separate box.

Please Log in or Create an account to join the conversation.

More
5 years 6 months ago #205831 by andypugh
Replied by andypugh on topic Retrofitting Mikron WF41C

mwinterm wrote: So the next step now is to find out how we can home the machine using these index signals. It looks to me that the the standard homeing sequences of LinuxCNC are not suited to home glasscales like the LS403C. Any help / suggestions are greatly appreciated.


It would probably be easier to do if you were not using quadrature. (ie, if the absolute position could be sent via serial)

Are the two pulses on the same or different channels?

Please Log in or Create an account to join the conversation.

More
5 years 6 months ago #205856 by gaston48
The following user(s) said Thank You: J Green

Please Log in or Create an account to join the conversation.

More
5 years 6 months ago #205858 by andypugh
Replied by andypugh on topic Retrofitting Mikron WF41C
I think that this can be done with a HAL component, if home-to-index is enabled.

The HAL component would sit between the hm2_ninn.0.encoder-position pin and the joint.N.position-fb pin.
It would take index-enable as an input and output a modified index-enable to the counter.

index-enable -> true, the component sets index-enable on the counter. The counter is zeroed and the component stores the (rawcounts - counts), waits for index-enable from the counter to go false and sets it true again. When that signal is set to false again by the counter the component once more calculates (rawcounts - counts) to calculate the absolute position (10.02, 20, 30.04, 40, 50.06...), and adds that value to the position fed back to the system whilst setting its own index-enable input pin to zero to indicate to the system that homing can complete.
This putative HAL component should run first after hm2_minn.0.read.

I will try to knock something together this lunchtime.
The following user(s) said Thank You: J Green

Please Log in or Create an account to join the conversation.

More
5 years 6 months ago #205861 by andypugh
Replied by andypugh on topic Retrofitting Mikron WF41C

andypugh wrote: I think that this can be done with a HAL component, if home-to-index is enabled


Or, even better, it could be built-in to the hm2 and software encoder drivers.

Please Log in or Create an account to join the conversation.

More
5 years 6 months ago #205880 by mwinterm
Replied by mwinterm on topic Retrofitting Mikron WF41C
@gaston48: Thank you very much for sharing the Heidenhain document with the formula. Would have saved me from figuring it out
myself but nice to see that my calculation was correct :-)

@andypugh: What you are proposing is the very same I also had in mind (see my old post here: forum.linuxcnc.org/27-driver-boards/4060...rial?start=10#203443 ). I also already tested it with a little hacked together Python hal-component (I know not really real-time suited, but good enough for what I wanted to try out). I could easily implement this as well in a C++ hal-component. The only thing I'm unclear about is how to do as you stated

and adds that value to the position fed back to the system


I also looked a little more into the LinuxCNC homing source code and it does not look so complicated anymore as I thought initially. So adding there something like a distance-encoded-index option could to my understanding also be feasible.

@andypugh: I'm not sure if I understand your last post correctly:

Or, even better, it could be built-in to the hm2 and software encoder drivers.

Is this because the reset once the index is hit is executed by the hm2 driver? Where would you calculate the position and take the parameters specific to the individual galsscale from? Sorry, I'm not yet very familiar with the whole architecture...

Best regards,

Marc

Please Log in or Create an account to join the conversation.

Time to create page: 0.594 seconds
Powered by Kunena Forum