Hello Guest it is March 28, 2024, 08:38:32 AM

Author Topic: Toggle axis jog control?  (Read 15243 times)

0 Members and 1 Guest are viewing this topic.

Offline budman68

*
  • *
  •  2,352 2,352
    • View Profile
Toggle axis jog control?
« on: October 03, 2012, 07:10:31 PM »
Hi all,

I have a question for those of you that get VB scripting. I have a shuttle pro 2 controller and I'd like to consolidate some buttons into one button, if possible.

I have buttons setup for each axis but I was wondering if it was possible to have one button to just toggle through the 4 axes until I get to the one I want to jog?

Thanks for your time,
Dave
----------------------------------------------------------------------
Just because I'm a Global Moderator, don't assume that I know anything !

Dave->    ;)

Offline BR549

*
  •  6,965 6,965
    • View Profile
Re: Toggle axis jog control?
« Reply #1 on: October 03, 2012, 08:08:59 PM »
Have you tried OemButton(1031)  "Jog Toggle" ?

IF there is no button for what you need to you will have to set a macro that toggles between the functions that work. Let us know if that is what you need.

(;-) TP

Offline budman68

*
  • *
  •  2,352 2,352
    • View Profile
Re: Toggle axis jog control?
« Reply #2 on: October 03, 2012, 08:11:58 PM »
I will look at that Terry, thank you, and if that isn't it, I would love some help with the macro if needed.

Thanks again,
Dave
----------------------------------------------------------------------
Just because I'm a Global Moderator, don't assume that I know anything !

Dave->    ;)

Offline BR549

*
  •  6,965 6,965
    • View Profile
Re: Toggle axis jog control?
« Reply #3 on: October 03, 2012, 09:14:53 PM »
Dave what function calls are being made with the current buttons?

(;-) TP

Offline budman68

*
  • *
  •  2,352 2,352
    • View Profile
Re: Toggle axis jog control?
« Reply #4 on: October 04, 2012, 10:31:22 AM »
Hi Terry,

Ok, had a look at the OEM function 1031 and it didn't do anything at all for me?

The way I have it set up is like the picture below of the pendant I use. You can see the X,Y, and Z are chosen separately, and the screenshots are of the shuttle Pro config dialog box and you choose the functions though the drop down boxes.

If there's anything else you'd like or need to know, just give me a shout and I appreciate your time!
Dave
----------------------------------------------------------------------
Just because I'm a Global Moderator, don't assume that I know anything !

Dave->    ;)

Offline BR549

*
  •  6,965 6,965
    • View Profile
Re: Toggle axis jog control?
« Reply #5 on: October 04, 2012, 02:59:03 PM »
Hiya Dave, When you make an axis selection (press Button) does it turn any of the axis leds on the jog flyout panel ? ANy of the MPG axis leds turn on  Trying to figure out how the pendant uses the functions.

Do you have any leds you monitor to see WHICH axis is Active for jogging?

SO IF I do a macro that toggles through the axis can it be applied to a button?

(;-) TP

Offline budman68

*
  • *
  •  2,352 2,352
    • View Profile
Re: Toggle axis jog control?
« Reply #6 on: October 04, 2012, 03:05:36 PM »
Hi, Terry,

No sir, no LEDs, just a message in the standard message bar that says which axis has been selected for jogging. See screen shot below of my screenset in Mach mill.

Thanks,
Dave
----------------------------------------------------------------------
Just because I'm a Global Moderator, don't assume that I know anything !

Dave->    ;)

Offline BR549

*
  •  6,965 6,965
    • View Profile
Re: Toggle axis jog control?
« Reply #7 on: October 04, 2012, 05:38:27 PM »
Dave this is a simple example of a macro that can increment through a set of fuinctions. It runs through 4 functions and then repeats from the beginning. At each press of the button it updates the Mach status bar as to the function selected.

You can add in the FUNCTION code that makes it actually run the functions

If GetUserDro(1999) < 5 Then
   SetUserDro(1999,GetUserDro(1999)+1)
   End If
If GetUserDro(1999) >= 5 Then
   SetUserDro(1999,1)
   End If
   
If GetUserDro(1999) = 1 Then
   Message("Selecting X axis for Jogging")
   '(add function code here)   
   End If
If GetUserDro(1999) = 2 Then
   Message("Selecting Y axis for Jogging")
   '(add function code here)
   End If
If GetUserDro(1999) = 3 Then
   Message("Selecting Z axis for Jogging")
   '(add function code here)
   End If
If GetUserDro(1999) = 4 Then
   Message("Selecting A axis for Jogging")
   '(add function code here)
   End If

End

(;-) TP

Offline budman68

*
  • *
  •  2,352 2,352
    • View Profile
Re: Toggle axis jog control?
« Reply #8 on: October 04, 2012, 05:46:59 PM »
Terry,

That worked at toggling the messages, but it only jogs the X axis?

Thanks,
Dave
----------------------------------------------------------------------
Just because I'm a Global Moderator, don't assume that I know anything !

Dave->    ;)

Offline budman68

*
  • *
  •  2,352 2,352
    • View Profile
Re: Toggle axis jog control?
« Reply #9 on: October 04, 2012, 05:50:20 PM »
Ok, I think I misunderstood, it's actually doing exactly what you said it would do, and I have to figure out how to add in the functions, correct?

crap..... I have no clue what I'm doing with this, lol!  :D

I'll let you know how I make out!

Thanks again, my friend-
Dave
----------------------------------------------------------------------
Just because I'm a Global Moderator, don't assume that I know anything !

Dave->    ;)