Hello Guest it is March 28, 2024, 08:40:07 PM

Author Topic: User defined DRO/button?  (Read 6006 times)

0 Members and 1 Guest are viewing this topic.

Offline Sweep

*
  •  150 150
    • View Profile
    • pollz.co.uk
User defined DRO/button?
« on: September 23, 2012, 07:43:52 PM »
As part of my project to control my 6 station ATC from Mach, whilst allowing any of my many toolholders to be assigned to one of the 6 stations, I would like to be able to type in a number into a box and have that number then recognised as the tool, when required, to be used as part of the program.
So, for example, I may need 3 tools for a program of which the actual tool holder numbers are, say, 7, 11, & 19. I would then place T7 in slot 1, T11 in slot 2, and T19 in slot 3. I then type the tool number in the corresponding carousel slot on my very primitive Toolchanger screen, see attachment.
And here is where we get to the questions; is there a way I can have a user defined input box where I can just type a number butit  is recognised as an entity to be used in another part of the program. I would have thought it would be called something like UserParam or something like that but I can't find anything.
As each UserParam would be associated with a carousel slot I could have the script ask each of the 6 carousel slots if it equaled the required tool number and select if yes, or move onto the next if no. If all are no, for example if T45 is called where only T7, T11, & T19 are fitted, then an Estop would be called.
I hope that made sense

...Sweep

Offline ger21

*
  • *
  •  6,295 6,295
    • View Profile
    • The CNC Woodworker
Re: User defined DRO/button?
« Reply #1 on: September 23, 2012, 10:52:08 PM »
I don't know the exact range, but UserDRO's are numbered somewhere between 1000 and 2000, maybe higher.
Use SetUserDRO() and GetUserDRO()
Gerry

2010 Screenset
http://www.thecncwoodworker.com/2010.html

JointCAM Dovetail and Box Joint software
http://www.g-forcecnc.com/jointcam.html

Offline Hood

*
  •  25,835 25,835
  • Carnoustie, Scotland
    • View Profile
Re: User defined DRO/button?
« Reply #2 on: September 24, 2012, 02:45:46 AM »
1000 to 2255 is the range as far as I can remember.
Hood

Offline Sweep

*
  •  150 150
    • View Profile
    • pollz.co.uk
Re: User defined DRO/button?
« Reply #3 on: September 24, 2012, 08:19:24 AM »
So, if I understand correctly, within Screen4 or Klaus's screen builder I change the DRO to OEM code function 1000 and that will allow me, when back in Mach3, to type a number into the box and be able to recover that number to another piece of script using GetUserDRO(1000)

...Sweep
Re: User defined DRO/button?
« Reply #4 on: September 24, 2012, 09:02:28 AM »
Yes, that is correct.
Alex