Hello Guest it is April 19, 2024, 02:47:44 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 - Tarak

Pages: « 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 »
171
Hi Zealous, I may have to make it a similar colour then, it's hard because the background has a gradient, so the colour changes from the top to the bottom.
I still think it would look nice if the DRO and the G code is on the background.

172
Thanks for the update ger21, good to know what the problem was.

173
I think the screen I'm making would look nice.....
You can get an idea from the attached Pic.

174
Thanks again Graham, it worked using DoOEMButton(256).

175
Thanks, Graham.
I ended up using your code like this:
CODE "G92Y" &Abs(y)
I still can't work out how to get it to change from Work to Machine coords and visa versa.
The standard button that switches inbetween work and machine coords is OEM code 256, I just don't know how to work out what this code does?

176
I think I've looked everywhere (obviously not)
I'm trying to press a button to zero my grinding wheel, then it changes the offset to suit, as per below:

1 Set grinding wheel at zero (approx -37.3 in machine coords) (I've successfully done this)
2 press button ZERO WHEEL (I've successfully done this)
3 changes to machine coords (I can't work out how to do this, at the moment I'm doing this manually)
4 copy's the value in machine coords to a second DRO, but a positve value. (I've got it copying, just not in a positive value)
5 change back to work coords (I can't work out how to do this, at the moment I'm doing this manually)
6 Moves out to home switch (I've successfully done this)
7 Copies the value from the second DRO into the work coords (I've successfully done this)
8 Voilla!!

I'm trying to take a negative value from one DRO and put the same value into another DRO, but a positive value.
The way I do this on a cnc is as follows, I'm just can't get the syntax correct for VB.

#1=-10.00
X[#1-[#1*2]]

This is as far as I've gotten

'change to machine coords here
y=GetDRO(1)
While IsMoving()
Wend
SetOEMDRO(1202,y)
'change to work coords here
DoButton( 23 )
While IsMoving()
Wend
y=GetUserDRO(1202)
CODE "G92Y" &y   

Thanks

177
Thanks Scott, is it possible to emulate a key being pressed?
I thought it may be easier, it'd save a lot of code in my MacroPump (Lazy I know), something like:

'Macropump.m1s
If IsActive(INPUT1) Then
   If GetUserLED(1001) Then
   Emulate pressing hotkey 110 (example only)
   End If
       If GetUserLED(1002) Then
       Emulate pressing hotkey 111 (example only)       
       End If
End If

Also on another note, I might start a post where you VB guru's can offer tid bits of code e.g Set UserLED(1000,1) with a short description and example.
But mostly for the more complex equations. thoughts?
At least I wouldn't have to bug you guys as much.

178
You my friend are a freakin genius, it works great.
BTW in my script I have it turn OFF all LED's at the start e.g
SetUserLED (1001,0)
SetUserLED (1002,0)
etc.etc
I have it do this for 24 individual LED's is there a more efficient way of doing this?
Also how can I enter this into the MacroPump so it will turn OFF all LED's when Mach starts only, rather that making them OFF all the time?
I only ask this because if I estop the sytem when a script is running, my LED's stay on until I run the script again, and it reaches the end of it where I tell the LED's to turn OFF.
......Well my wife's always telling me I'm high maintenance.......

179
Yep me again, is it possible to have 1 external button (much the same as a cycle start), that will run the previous VB script that was run?
I have multiple buttons that all have there own script, but I was thinking it would be nice if you could click the correct button on the screen for the first time, then after that the user could just keep pressing this external button, until a different script is needed etc.etc.
Thanks

180
Mach Screens / Re: Do we need the artificial glare ?
« on: April 22, 2007, 02:58:28 AM »
Touche....

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