Machsupport Forum
Mach Discussion => General Mach Discussion => Topic started by: baumandr on April 04, 2012, 09:49:57 AM
-
Hi!
I wrote a small cript with command "JogOn()" in it.
I experienced that this script is working correctly
in Script editor window opened in Mach3 V.....60
but not if the script is embedded in screen file as button
command.
OEM codes like DoOEMButton(1024) are working good in
editor window and in screen.
Please confirm and help me to solve this issue.
Thanks,
Andreas.
-
Hi!
Here ist the entire macro that caused the issue
described in the post before:
The macro is to clear the reference switch if it is
activated by trailer before starting a reference travel.
Sub Main
Pause=100
X_axis = 0
Y_axis = 1
Z_axis = 2
If getoemled(836)<>0 Then
JogOn(Z_axis,1)
End If
Do While getoemled(836)<>0
Sleep(Pause)
Loop
JogOff(Z_axis)
While ismoving()
sleep(Pause)
Wend
If getoemled(830)<>0 Then
JogOn(X_axis,1)
End If
Do While getoemled(830)<>0
Sleep(Pause)
Loop
JogOff(X_axis)
While ismoving()
sleep(Pause)
Wend
If getoemled(833)<>0 Then
JogOn(Y_axis,0)
End If
Do While getoemled(833)<>0
Sleep(Pause)
Loop
JogOff(Y_axis)
While ismoving()
sleep(Pause)
Wend
DoOemButton(1024)
DoOemButton(1022)
DoOemButton(1023)
End Sub
This macro is working without any error
in VB-Script window opened in Menue "Operator".
But it does not execute the command "JogOn()" when it is
embedded in screen.set
Environment:
Mach3 R3.043.060
ESS plugin ESS_v10da2.zip
Windows XP prof. SP3
Please can you verify this issue?
Thanks,
Andreas.