Machsupport Forum

Mach Discussion => General Mach Discussion => Topic started by: Sweep on September 23, 2012, 07:43:52 PM

Title: User defined DRO/button?
Post by: Sweep 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
Title: Re: User defined DRO/button?
Post by: ger21 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()
Title: Re: User defined DRO/button?
Post by: Hood on September 24, 2012, 02:45:46 AM
1000 to 2255 is the range as far as I can remember.
Hood
Title: Re: User defined DRO/button?
Post by: Sweep 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
Title: Re: User defined DRO/button?
Post by: cncalex on September 24, 2012, 09:02:28 AM
Yes, that is correct.
Alex