Hello Guest it is April 24, 2024, 08:44:19 PM

Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Messages - Kenneth

Pages: « 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 »
171
tried below with  Curr?Pos = IsMoving
with nothing changing

X_MovingLED = 1120
Y_MovingLED = 1121
Z_MovingLED = 1122

CurrXPos = GetOEMDRO(800)
CurrYPos = GetOEMDRO(801)
CurrZPos = GetOEMDRO(802)

If CurrXPos = IsActive(X) Then
   SetUserLED(X_MovingLED,1)
Else
   SetUserLED(X_MovingLED,0)
End If 

If CurrYPos = IsActive(Y) Then
   SetUserLED(Y_MovingLED,1)
Else
   SetUserLED(Y_MovingLED,0)
End If

If CurrZPos = IsActive(Z) Then
   SetUserLED(Z_MovingLED,1)
Else
   SetUserLED(Z_MovingLED,0)
End If
                     


X_MovingLED = 1120
Y_MovingLED = 1121
Z_MovingLED = 1122

CurrXPos = GetOEMDRO(800)
'OldXPos = GetUserDRO(2001)
CurrYPos = GetOEMDRO(801)
'OldYPos = GetUserDRO(2002)
CurrZPos = GetOEMDRO(802)
'OldZPos = GetUserDRO(2003)

If CurrXPos = IsActive(800) Then
   SetUserLED(X_MovingLED,1)
    'SetUserDRO(2001,CurrXPos)
Else
   SetUserLED(X_MovingLED,0)
    'SetUserDRO(2001,CurrXPos)
End If 

If CurrYPos = IsActive(801) Then
   SetUserLED(Y_MovingLED,1)
    'SetUserDRO(2002,CurrYPos)
Else
   SetUserLED(Y_MovingLED,0)
    'SetUserDRO(2002,CurrYPos)
End If

If CurrZPos = IsActive(802) Then
   SetUserLED(Z_MovingLED,1)
    'SetUserDRO(2003,CurrZPos)
Else
   SetUserLED(Z_MovingLED,0)
    'SetUserDRO(2003,CurrZPos)
End If
           

172
with below, starting with LEDS off and DROs same.
clicking does nothing. if i change the position of XY and/or Z
the LEDs turn on for any axis that is different from userDRO.
click again and they turn off. clicking again changes nothing. as long
as the two DROs arethe same. turns on again if different. so i'm still
trying........

p.s. is there a doc for the different comparison"<>"

X_MovingLED = 1120
Y_MovingLED = 1121
Z_MovingLED = 1122

CurrXPos = GetOEMDRO(800)
OldXPos = GetUserDRO(2001)
CurrYPos = GetOEMDRO(801)
OldYPos = GetUserDRO(2002)
CurrZPos = GetOEMDRO(802)
OldZPos = GetUserDRO(2003)

If CurrXPos <> OldXPos Then
   SetUserLED(X_MovingLED,1)
    SetUserDRO(2001,CurrXPos)
Else
   SetUserLED(X_MovingLED,0)
    SetUserDRO(2001,CurrXPos)
End If

If CurrYPos <> OldYPos Then
   SetUserLED(Y_MovingLED,1)
    SetUserDRO(2002,CurrYPos)
Else
   SetUserLED(Y_MovingLED,0)
    SetUserDRO(2002,CurrYPos)
End If

If CurrZPos <> OldZPos Then
   SetUserLED(Z_MovingLED,1)
    SetUserDRO(2003,CurrZPos)
Else
   SetUserLED(Z_MovingLED,0)
    SetUserDRO(2003,CurrZPos)
End If
                     

173
using your code, the LEDs change if the two DROs are different(on)
OR that same.(off) not if they are moving. so i was trying different things.

174
the same code, except i changed my dros from 0,1,2 to 800,801,802 and it started working.
this is a VB script. not using brain or pump(not sure what's a macro pump). it doesn't change
the leds UNLESS i change the position of ON(1) and OFF(0) in the scrip.
so maybe i'm using the scrip wrong.
 Thanks Scott.

there's a reason why there're two sets of dros?
0,1,2 and 800,801,802

175
got this to work. it changes the dros but the leds only change if dros
are different(off) otherwise if same(on). does change anything
when movement.


X_MovingLED = 1120
Y_MovingLED = 1121
Z_MovingLED = 1122

CurrXPos = GetOEMDRO(800)
OldXPos = GetUserDRO(2001)
CurrYPos = GetOEMDRO(801)
OldYPos = GetUserDRO(2002)
CurrZPos = GetOEMDRO(802)
OldZPos = GetUserDRO(2003)

While IsMoving()
Wend
If CurrXPos <> OldXPos Then
   SetUserLED(X_MovingLED,1)
    SetUserDRO(2001,CurrXPos)
Else
   SetUserLED(X_MovingLED,0)
    SetUserDRO(2001,CurrXPos)
End If
While IsMoving()
Wend

If CurrYPos <> OldYPos Then
   SetUserLED(Y_MovingLED,1)
    SetUserDRO(2002,CurrYPos)
Else
   SetUserLED(Y_MovingLED,0)
    SetUserDRO(2002,CurrYPos)
End If
While IsMoving()
Wend

If CurrZPos <> OldZPos Then
   SetUserLED(Z_MovingLED,1)
    SetUserDRO(2003,CurrZPos)
Else
   SetUserLED(Z_MovingLED,0)
    SetUserDRO(2003,CurrZPos)
End If
         

176
just to make sure i didn't do something i shouldn't,
i changed from Version R3.043.066 to Version R3.043.062
cause i read 66 was unstable.

177
no sir, that is the only dro 2000. this is the first
i use 2000,2001 and 2002.

178
one more thing. the three userdro(2000,2001,2002)
i can enter info into 2001 and 2002, press enter and the info
remains. when i try that with 2000, it always goes back to zero.
ALL three have the same info in machscreen, except for oem code.

179
currently
dro 2000 = 0.00
dro 2001 = +10.00
dro 2002 = +27978.00

in the vb editor if i change UserDRO(2002 .CurrZPos)
to UserDRO(2002 .0) the number changes to zero. if set back to
UserDRO(2002 .CurrZPos) changes back to +27978.00

180
clicking run continuely in the VB editor makes the UserDRO(2002) change.
and about every third to fifth click makes the UserLED change(Red/Green)
the UserDROs 2000 and 2001 never change that i can see

X_MovingLED = 1120
Y_MovingLED = 1121
Z_MovingLED = 1122

CurrXPos = GetOEMDRO(0)
OldXPos = GetUserDRO(2000)
CurrYPos = GetOEMDRO(1)
OldYPos = GetUserDRO(2001)
CurrZPos = GetOEMDRO(2)
OldZPos = GetUserDRO(2002)


If CurrXPos <> OldXPos Then
   SetUserLED(X_MovingLED,1)
   SetUserDRO(2000,CurrXPos)
Else
   SetUserLED(X_MovingLED,0)
   SetUserDRO(2000,CurrXPos)
End If

If CurrYPos <> OldYPos Then
   SetUserLED(Y_MovingLED,1)
   SetUserDRO(2001,CurrYPo0)
Else
   SetUserLED(Y_MovingLED,0)
   SetUserDRO(2001,CurrYPos)
End If

If CurrZPos <> OldZPos Then
   SetUserLED(Z_MovingLED,1)
   SetUserDRO(2002,CurrZPos)
Else
   SetUserLED(Z_MovingLED,0)
   SetUserDRO(2002,CurrZPos)
End If
       

Pages: « 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 »