Welcome, Guest. Please login or register.
Did you miss your activation email?
May 25, 2012, 01:40:18 PM

Login with username, password and session length
Search:     Advanced search
* Home Help Search Calendar Links Login Register
+  Machsupport Forum
|-+  Mach Discussion
| |-+  VB and the development of wizards
| | |-+  PLease Help with code
Pages: 1   Go Down
Print
Author Topic: PLease Help with code  (Read 764 times)
0 Members and 2 Guests are viewing this topic.
M250cnc
Active Member

Offline Offline

Posts: 591




View Profile
« 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  Grin

Thanks
Logged

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

The Bad Thing About Mach3, Is It's Too Configurable
melee
Guest
« 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
Logged
M250cnc
Active Member

Offline Offline

Posts: 591




View Profile
« 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
Logged

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

The Bad Thing About Mach3, Is It's Too Configurable
melee
Guest
« 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
Logged
M250cnc
Active Member

Offline Offline

Posts: 591




View Profile
« 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
Logged

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

The Bad Thing About Mach3, Is It's Too Configurable
melee
Guest
« 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
Logged
M250cnc
Active Member

Offline Offline

Posts: 591




View Profile
« 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
Logged

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

The Bad Thing About Mach3, Is It's Too Configurable
Graham Waterworth
Administrator
*
Offline Offline

Posts: 1,665


West Yorkshire, England



View Profile WWW
« 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
Logged

G-Code is on the cutting edge

Autovalues Engineering, CNC machining specialists, Bradford, England
M250cnc
Active Member

Offline Offline

Posts: 591




View Profile
« Reply #8 on: January 01, 2010, 07:57:05 AM »

Thanks Graham
Logged

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

The Bad Thing About Mach3, Is It's Too Configurable
Pages: 1   Go Up
Print
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.16 | SMF © 2011, Simple Machines Valid XHTML 1.0! Valid CSS!