Hello Guest it is March 19, 2024, 04:04:53 AM

Author Topic: Edit Button -- Code for Jog Speed?  (Read 7076 times)

0 Members and 1 Guest are viewing this topic.

Edit Button -- Code for Jog Speed?
« 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.

Offline Hood

*
  •  25,835 25,835
  • Carnoustie, Scotland
    • View Profile
Re: Edit Button -- Code for Jog Speed?
« Reply #1 on: October 19, 2009, 08:29:42 PM »
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
Re: Edit Button -- Code for Jog Speed?
« Reply #2 on: October 19, 2009, 08:37:20 PM »
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.

Offline Hood

*
  •  25,835 25,835
  • Carnoustie, Scotland
    • View Profile
Re: Edit Button -- Code for Jog Speed?
« Reply #3 on: October 19, 2009, 08:42:51 PM »
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
Re: Edit Button -- Code for Jog Speed?
« Reply #4 on: October 19, 2009, 08:48:58 PM »
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.

Offline Hood

*
  •  25,835 25,835
  • Carnoustie, Scotland
    • View Profile
Re: Edit Button -- Code for Jog Speed?
« Reply #5 on: October 19, 2009, 08:50:18 PM »
3 is the OEM code for the SLOW JOG % DRO.

Hood
Re: Edit Button -- Code for Jog Speed?
« Reply #6 on: October 19, 2009, 10:19:49 PM »
Cool, thanks.
Re: Edit Button -- Code for Jog Speed?
« Reply #7 on: October 19, 2009, 10:29:17 PM »
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
Regards,
Ray L.

Offline Hood

*
  •  25,835 25,835
  • Carnoustie, Scotland
    • View Profile
Re: Edit Button -- Code for Jog Speed?
« Reply #8 on: October 20, 2009, 02:21:15 AM »
Every day is a school day Ray :)
Hood
Re: Edit Button -- Code for Jog Speed?
« Reply #9 on: October 20, 2009, 03:19:58 AM »
I sure as hell hope not. I suffered enough!