Page 1 of 1

Setting a value in the machine coordinates

Posted: Mon Jul 02, 2018 1:40 pm
by netboss
I understand how to use the DoPCFloat(PC_COMM_SET_X, 4.0) function. This example would set the X axis DRO to a value of 4.000. However, this changes only the program coordinates. How does one set the Machine Coordinates to a given value?

Re: Setting a value in the machine coordinates

Posted: Mon Jul 02, 2018 4:11 pm
by TomKerekes
Hi netboss,

"Setting" the DROs actually don't "set" the DROs. Instead they adjust a GCode Axis Offset in order that the DRO reads the desired value. Basically:

DROs = Machine Coordinates + Offsets

The Machine Coordinates are normally defined when the system initially homes and never change.

Why would you want to change them?

To change the machine coordinates you can disable the axis and re-enable the axis at a new destination with:

DisableAxis(ch);
EnableAxisDest(ch,NewDestination);


With closed loop systems the Axis Position may need to be changed also.

HTH

Re: Setting a value in the machine coordinates

Posted: Mon Jul 02, 2018 6:54 pm
by netboss
OK, thanks.

Additional piece of info: my system is open loop.

My homing routine includes the function to set the axis machine coordinates to zero. While it may seem illogical, I would like to set the machine coordinates to other than zero when the axis is homed.

Thanks,
Gary

Re: Setting a value in the machine coordinates

Posted: Mon Jul 02, 2018 7:28 pm
by TomKerekes
Hi Gary,

It isn't clear to me if that is a question or statement. But yes you can set the machine coordinates to other than zero in your homing routine with the method described.

Re: Setting a value in the machine coordinates

Posted: Mon Jul 02, 2018 9:45 pm
by netboss
Tom, Sorry for not being clear. t was a statement. I was just responding to your comment re: wondering why I would want to set the machine to other than zero on a home.

Thanks again for all your help.

Gary