Hello Guest it is April 19, 2024, 04:04:17 PM

Author Topic: PLease Help with code  (Read 4109 times)

0 Members and 1 Guest are viewing this topic.

PLease Help with code
« on: December 22, 2009, 09:59:34 AM »
This is the code on a button to zero machine co ordinates

What would be the code to set the dro to another dro

SetMachZero(2)
call SetDRO( 2, 0 )

So that dro 2 is the same as dro 20 as an example

I am sorry but i don't want to learn another app  ;D

Thanks
The Good Thing About Mach3, Is It's very Configurable

The Bad Thing About Mach3, Is It's Too Configurable

melee

*
Re: PLease Help with code
« Reply #1 on: December 22, 2009, 11:32:34 AM »
Hi

You could do it this way

SetOEMDRO( 2, GetOEMDRO(20) )

(NB. SetDRO and GetDRO are deprecated from v2.6*********)

regards

Melee
Re: PLease Help with code
« Reply #2 on: December 23, 2009, 01:03:41 AM »
Melee

Thanks for the reply, unfortunately it did not do what i wanted it too.

Phil
The Good Thing About Mach3, Is It's very Configurable

The Bad Thing About Mach3, Is It's Too Configurable

melee

*
Re: PLease Help with code
« Reply #3 on: December 23, 2009, 04:39:12 AM »
Hi

You will need to be specific as to the exact code you used, where you put it and how it is activated.

SetOEMDRO( 800, GetOEMDRO(801) ) for instance, WILL set the X axis main DRO to the contents of the main Y axis DRO.

regards

Melee
Re: PLease Help with code
« Reply #4 on: December 23, 2009, 05:29:08 AM »
Hi & thanks

I want to set X machine Co Ord OEM83 dro to X Ref POs Offset OEM33 Dro

I set it as to the format you said would work but it doesn't.

What i am trying to achieve with the press of a button is to set machine co ordinates (X=83) to that  axis offset dro (X=33)

Thanks
The Good Thing About Mach3, Is It's very Configurable

The Bad Thing About Mach3, Is It's Too Configurable

melee

*
Re: PLease Help with code
« Reply #5 on: December 23, 2009, 09:52:11 AM »
Ahhh I see,

Unfortunately I suspect you will be unable to set the Machine Axis Co-ordinates to anything, except 0 when referencing to Home.

The machine co-ordinates are absolute and physical.
If you could change them to another figure ( even an offset of themselves ), the controller would be unable to tell where the machine axes were and would happily crash at speed through the home positions.

I actually  tried changing the values through MachMad and whilst you can see it change, it is immediately returned to its original value.

regards

Melee
Re: PLease Help with code
« Reply #6 on: December 23, 2009, 11:55:42 PM »
Melee,

Thanks for your help on this, but a bit of a shame really.

Any machine owners who do not use homing switches and hard limits, "and there seem to be lots", makes life is harder.

Phil
The Good Thing About Mach3, Is It's very Configurable

The Bad Thing About Mach3, Is It's Too Configurable

Offline Graham Waterworth

*
  • *
  •  2,672 2,672
  • Yorkshire Dales, England
    • View Profile
Re: PLease Help with code
« Reply #7 on: December 26, 2009, 06:09:26 AM »
If you look in Config..Homing/Limits you can specify a home offset for each axis there. You can not change it on the fly but if the offset is static it will work, I use it for my tool changer.

Graham
Without engineers the world stops
Re: PLease Help with code
« Reply #8 on: January 01, 2010, 07:57:05 AM »
Thanks Graham
The Good Thing About Mach3, Is It's very Configurable

The Bad Thing About Mach3, Is It's Too Configurable