Hello
Guest
it is
April 25, 2024, 02:27:44 AM
Guest
Login
Register
Menu
Home
Help
Search
Calendar
Members
Members
View the memberlist
Search For Members
Login
Register
YouTube
Machsupport Forum
/
Mach Discussion
/
General Mach Discussion
/
DRO Script help.
« previous
next »
Print
Pages:
1
Go Down
Author
Topic: DRO Script help. (Read 2395 times)
0 Members and 1 Guest are viewing this topic.
c30232
122
DRO Script help.
«
on:
November 08, 2014, 11:10:15 PM »
I am using the below script to move a gantry move or specifically a selectable rip fence for a gang-rip saw. I need help redefining the DRO in the script from User DRO to X DRO.
Distance = GetUserDRO(1008)
Code "g90 G0 X" & distance & "A" & distance
The User DRO is the value of the coordinate used to position the fence. I would like to capture the value from from the Y axis DRO in place of the user DRO.. The User DRO is a manual entry. The Y axis DRO would be derived from the jog movement of Y which drives a laser line.
Thus the distance + X DRO rather than the user DRO.
Logged
c30232
122
Re: DRO Script help.
«
Reply #1 on:
November 08, 2014, 11:37:48 PM »
Hmm, I got it to work as below by changing to OEM codes, however, I have not been successful when using the standard code label.
Distance = GetOEMDRO(801)
Code "g90 G0 X" & distance & "A" & distance
Logged
Atlas56
31
Re: DRO Script help.
«
Reply #2 on:
November 11, 2014, 07:12:31 PM »
Try this.
SetUserDRO(1008, 1.234) 'UserDRO(1008) = 1.234
Distance = GetUserDRO(1008)
Code "g90 G0 X" & distance & "A" & distance
'X and A move to 1.234
Logged
c30232
122
Re: DRO Script help.
«
Reply #3 on:
November 11, 2014, 07:22:51 PM »
Thanks, I will give it a try. What does 1.234 represent?
I found a conflict when the value goes negative and and scratched this out.
Distance = (GetDRO(30) * -1) + (GetOEMDRO(800) - GetOEMDRO(803))
Code "F30 g90 G0 X" & distance & "A" & distance
Logged
c30232
122
Re: DRO Script help.
«
Reply #4 on:
November 11, 2014, 09:19:25 PM »
Thanks, it works.
Logged
Print
Pages:
1
Go Up
« previous
next »