Hello Guest it is March 28, 2024, 01:35:28 PM

Author Topic: Encoder position to Mach3 DRO  (Read 7222 times)

0 Members and 1 Guest are viewing this topic.

Encoder position to Mach3 DRO
« on: July 21, 2010, 10:21:34 AM »
Hello everybody,

I have a rather simple question (at least I think so) but this problem is driving me nuts for hours now >:( >:(
I have linear encoders mounted to all three axis. I want to update Mach3 DROs with the encoder postions.
I have written a small VB programm that gets the encoder position by "getoemdro(29)" for the x-axis.
Then I do a "G92" command with this position, so that it updates the x-Mach3 DRO. But this command also changes
the position of the encoder (on the settings page of Mach3) what it shall not do !!!!!! >:(
The encoder position shall remain as it is, so that both Mach3 DRO and Encoder have the same position.
I also tried to change the encoder position after the G92 command back to its original value by "setoemdro(29,value)".
Also no success, Mach3 always adds some stupid offsets or something like that so that the encoder value is not correct.
I also tried to use just Setdro(0,"encoder position") without the G92 command, but this also changes both values (the Mach3 DRO
and the encoder position on the settings page).
I also used the button "to dro" on the settings page near the encoder DRO. This updates the Mach3 DRO nearly correct (there is always a
difference of about 0.005-0.01mm) but it seems that the new value is not really used. When I do a G1 command to a new position afterwards it does not
use the new updated position but the old position. So the updated value is displayed on the Mach3 DRO but internally it works with the old value.

If anyone knows a way to change the value of the Mach3 DRO to a new value from the encoder (e.g. G92 command) without affecting the Encoder position itself please help!!

Greetings
Thomas