Machsupport Forum
Mach Discussion => General Mach Discussion => Topic started by: Cartierusm on October 19, 2009, 08:15:16 PM
-
Howdy, I hope someone can help me. I'm adding some buttons to my Mach Turn and I need the VB script or whatever to change jog speeds. Basically I'm making a button so I can change from 10 IPM to .3 IPM when I'm parting. Thanks.
-
Suppose the easiest way would just be to alter the Slow Jog % DRO.
It would just be Call SetOEMDRO(***,**) in your button, the first *** is the OEM for the Jog % DRO and the ** would be the % that would work out to the speeds you want.
Hood
-
Sorry all I need is the percent. Thanks. I just tried it without the second set of asterisks and it didn't work. Do I need the '(' in there? I just reread your post, I don't understand what OEM for Jog % does. I don't care what it's currently at cause I'm making buttons for different jog % rates.
-
OK the slow jog DRO shows a % of your full rapid so if set to 100% it will jog at full rapid, if its set to 50% it will jog at half rapid.
So what you want to do is work out what % of your rapid speed you want each button to be and have that in the VB,
For example if you have 200IPM as your rapid in motor tuning and you want to jog at 20IPM you would set the DRO to 10%, to do that from a VB button you would have the following in the button.
Call SetOEMDRO(3,10)
If you wanted 100IPM in another button it would be
Call SetOEMDRO(3,50)
Hood
-
Sweet, that worked, I think originally when I tried what you said I forgot the 'call' part as I overlooked it as part of your sentence. What does the number '3' reperesent in your example? I already got it working, just curious. Thanks.
-
3 is the OEM code for the SLOW JOG % DRO.
Hood
-
Cool, thanks.
-
Sweet, that worked, I think originally when I tried what you said I forgot the 'call' part as I overlooked it as part of your sentence. What does the number '3' reperesent in your example? I already got it working, just curious. Thanks.
Actually, the "call" is optional - a vestige of (very) old-style Basic.
Regards,
Ray L
-
Every day is a school day Ray :)
Hood
-
I sure as hell hope not. I suffered enough!
-
The difference is its fun learning now that I dont have to :)
Hood