Hey there...
I have a question regarding the Shuttle-Plugin and it's ability to start Macros...
A mate wrote a macro for me to switch through the Jog-Steps. I know, i can switch through the Jog-Steps already, but i want to have only three Jog-Steps (1mm, 0,1mm, 0,01mm) and not 10(!) of them.
And if you repeat the 1 0,1 0,01-thing you have 1mm at the end AND at the beginning of the 10 Steps.
So, to avoid errors when switching through the steps, a mate wrote a macro for me that does what i need, switch from1 to 0,1 to 0,01mm and then start over
The Macro:
'M1.m1s
Sub Makro1()
If GetOEMDRO(828) = 1 Then
SetOEMDRO(828,0.1)
Message("Jog Step auf 0.1 gesetzt")
Else
If GetOEMDRO(828) = 0.1 Then
SetOEMDRO(828,0.01)
Message("Jog Step auf 0.01 gesetzt")
Else
If GetOEMDRO(828) = 0.01 Then
SetOEMDRO(828,1)
Message("Jog Step auf 1 gesetzt")
Else
MsgBox("!Achtung! Jog Step steht nicht auf 1 oder 0.1 oder 0.01")
End If
End If
End If
End Sub
The macro is stored as M1.m1s in the Macro-Folder of the profile i use (and in every other macro-folder in the meantime...)
And if i run the macro directly from the VB-Editor it does, what it is supposed to do, it switches from 1 to 0,1 and then to 0,01mm, every time i run it.
BUT:
If i try to run the macro with the shuttle-plugin (Defined a button as "Custom Macro Number 1" and entered the integer "1" in the Custom-Macro-Number-1-field) nothing happens...?
So, what do i do wrong?
For example, if i enter the integer "4" in the macro-field and then press the button, the spindel starts (what complies with M4.m1s)
So:
The macro itself does work (from VB-Editor)
The Plugin starts Macros (the M4-Spindel-Start-macro)
But the Plugin won't start my M1-Macro!
What the ...?
Can anyone help me with this problem?
Regards,
Marc
P.S. Sorry for my bad english, but it is a long time ago since school^^