Hello Guest it is March 29, 2024, 07:28:16 AM

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 »
181
Never mind :)
i see what i misunderstood about Curr?Pos and Old?Pos

182
tried below again and added a UserDRO(2000) and when i changed
SetUserDRO(2000,CurrZPos) to tried below again and when i changed
SetUserDRO(2000,CurrZPos)  to SetUserDRO(2000,100) it changes
the dro(2000) to whatever i change the number to. so i was wondering
if "Curr?Pos" works? as the dro never changes with Curr?Pos. not sure
about Old?Pos either :)
Thanks


X_MovingLED = 1120
Y_MovingLED = 1121
Z_MovingLED = 1122
CurrXPos = GetOEMDRO(800)
OldXPos = GetUserDRO(2000)
CurrYPos = GetOEMDRO(801)
OldYPos = GetUserDRO(2001)
CurrZPos = GetOEMDRO(802)
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(2000,CurrYPos)
else
   SetUserLED(Y_MovingLED,0)
   SetUserDRO(2000,CurrYPos)
end if

if CurrZPos <> OldZPos then
   SetUserLED(Z_MovingLED,1)
   SetUserDRO(2000,CurrZPos)
else
   SetUserLED(Z_MovingLED,0)
   SetUserDRO(2000,CurrZPos)
end if

183
this doesn't change no matter 0 , 1

X = GetUserLED(1120)
Y = GetUserLED(1121)
Z = GetUserLED(1122)

If IsMoving() Then
   GetOEMDRO(0)
    SetUserLED (X,1)
   GetOEMDRO(1)
    SetUserLED (Y,1)
   GetOEMDrO(2)
    SetUserLED (Z,1)
Else
   GetOEMDRO(0)
    SetUserLED (X,0)
   GetOEMDRO(1)
    SetUserLED (Y,0)
   GetOEMDRO(2)
    SetUserLED (Z,0)
End If
       

184
the image path is - None -
all my user leds have none but they work.
and all my picture are in Mach3\Bitmaps
and sub folder MillBitmaps
and i have Red/Green LED = Yes

185
i have other leds that work as should. where do i find these pictur ?

186
stepping thru this, the program skips over the If
and goes straight to the Else. is this right ?
if i change SetUserLED(X,1) to SetUserLED(X,0)
the led changes

187
Thanks Brett and Scott,
i understand what you mean Brett, so i'm trying the below. not sure
about brains...still learning as i never saw anything like brain.below changes
the leds but i have to change the 0,1 positions in the script.

Scott,
i couldn't get yours to wotk(you were missing a parenthesis
if i changed 1,0 position, it did change the led. but didn't change
when i would jog an axis. one more thing is that i didn't have a userDRO(2000,2001 or 2002)
not sure if i was suppose to make em or they're a system defaults.
Thanks again


X = GetUserLED(1120)
Y = GetUserLED(1121)
Z = GetUserLED(1122)

If IsMoving() Then
   GetOEMDRO(0)
   SetUserLED(X,1)
Else
   GetOEMDRO(0)
   SetUserLED(X,0)
End If

If IsMoving() Then
   GetOEMDRO(1)
   SetUserLED(Y,1)
Else
   GetOEMDRO(1)
   SetUserLED(Y,0)
End If

If IsMoving() Then
   GetOEMDrO(2)
   SetUserLED(Z,1)
Else
   GetOEMDRO(2)
   SetUserLED(Z,0)
End If
         

188
i'm trying to set three leds(XZY) to show movement. with program
running or jogging with keyboard or remote. i have this and it does
nothing even if i set the 0 to 1 or 1 to 0. don't want anyone
writiing the code just let me know which to use. or do i do this
in a brain ?

X = GetUserLED(1120)
Y = GetUserLED(1121)
Z = GetUSerLED(1122)
If IsMoving Then
SetUserLED(X,0)
SetUserLED(Y,0)
SetUserLED(Z,0)
Else
SetUserLED(X,1)
SetUserLED(Y,1)
SetUserLED(Z,1)
End If         

Thanks for any help

p.s. i know about LED 999, but would like to be able to see a led
light when i'm jogging one axis.

189
General Mach Discussion / Re: CV feedrate question
« on: March 14, 2013, 11:23:52 AM »
and is there a way to DIABLE the sound when i click a button ?
and still be able to use Speak

190
General Mach Discussion / Re: CV feedrate question
« on: March 14, 2013, 11:10:14 AM »
Thanks Brett,
so it's mses, the g04 option in general setting is not effected ?

Sleep
Sub Sleep(Time As Integer)
This function causes the CB program to pause for the specified period of time, in mSec.
During this time, other processes can have access to the CPU. A Sleep() call should
always be inserted in any loop which might remain active for any period of time, for
example the While loop used to wait for a move command to complete.
Arguments:
Time, an Integer value expressing the sleep time in milliseconds.
Return Value:
None
Example:
‘ Move to zero position
Code “G0 X0.000 Y0.000”
‘ Wait for move to complete
While IsMoving()
‘ Let other processes have CPU while we wait
Sleep 100
Wend

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 »