Machsupport Forum
Mach Discussion => VB and the development of wizards => Topic started by: M250cnc 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
-
Hi
You could do it this way
SetOEMDRO( 2, GetOEMDRO(20) )
(NB. SetDRO and GetDRO are deprecated from v2.6*********)
regards
Melee
-
Melee
Thanks for the reply, unfortunately it did not do what i wanted it too.
Phil
-
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
-
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
-
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
-
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
-
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
-
Thanks Graham