Machsupport Forum

Mach Discussion => Mach Screens => Topic started by: jgsturbo on December 01, 2013, 02:34:20 AM

Title: Display oem dro with math function in user dro
Post by: jgsturbo on December 01, 2013, 02:34:20 AM
And do it in real time not on the push of a button?
I'm using a rotary axis setup as a normal axis based on circumference.
I thought it would be nice to see it in degrees too , in real time.
From what i read I'm dreaming... 
Title: Re: Display oem dro with math function in user dro
Post by: ger21 on December 01, 2013, 07:54:22 AM
Use a macro pump and User DRO
Title: Re: Display oem dro with math function in user dro
Post by: jgsturbo on December 01, 2013, 11:07:31 AM
Any sample code?
Title: Re: Display oem dro with math function in user dro
Post by: jgsturbo on December 02, 2013, 10:23:30 PM
Nevermind, I got it.
My macropump.m1s looks like this...
Code: [Select]
value = GetOEMDRO(801) 
SetOEMDRO(803,value/0.008722222)
Title: Re: Display oem dro with math function in user dro
Post by: Chaoticone on December 03, 2013, 01:42:52 AM
OEMDRO 803 is the A axis distance to go DRO. I'm surprised you can write to it and would have thought it was a read only. I would edit the screen and use a UserDRO above 1000.

value = GetOEMDRO(801) 
SetUserDRO(1100,value/0.008722222)