Hello Guest it is March 19, 2024, 05:43:06 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 - jevs

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 29 30 31 32 »
291
General Mach Discussion / Which probe is better.....?
« on: April 08, 2011, 01:33:35 AM »
I am looking for a probe to do digitizing and also edge and center finding etc. Which of these is better or more accurate?

http://www.wildhorse-innovations.com/index.php?_a=viewProd&productId=80

http://www.imsrv.com/deskcnc/probe.htm

Or should I be looking for something better? If so what would it be?

292
Thanks, I got my tool changer macro done, the previous posters method worked fine. You can see the code here if you want:

http://www.machsupport.com/forum/index.php/topic,18069.0.html


293
After a day to clear my head and start fresh, I got back to it tonight and got it fully funtional. Here is a video:
http://www.youtube.com/watch?v=DsizLpAXTns

Here is the Code in case anyone else has something like this:

'Tool change macro for 7 tool turret
Sub Main()
   'Sets variable OldTool to what is currently loaded
   OldTool=GetCurrentTool()
   'Sets variable Newtool to the one being selected
   NewTool=GetSelectedTool()
   'Sets Variable MaxToolNum to the max number of tools possible
   MaxToolNum=7
   
   'Get positions before moving to do tool change
   x = GetToolChangeStart( 0 )
   y = GetToolChangeStart( 1 )
   z = GetToolChangeStart( 2 )
   a = GetToolChangeStart( 3 )
   b = GetToolChangeStart( 4 )
   c = GetToolChangeStart( 5 )
   
   'If the current tool loaded is 0 or greater than 7 then tool has been lost
   'so need to ask what tool is currently loaded
   While OldTool=0 Or OldTool>7
   OldTool=Question ("Current tool unknown, enter tool in spindle 1 to " & MaxToolNum)
   Wend
   
   'Sets CurrentTool to Oldtool in case a it was lost and entered above
   SetCurrentTool(OldTool)

   'If the tool asked for is invalid then this makes you select a valid tool
   While NewTool > MaxToolNum Or NewTool <1
   NewTool = Question ("Invalid tool selected, select a tool number 1 to " & MaxToolNum)
   Wend
   
   'If the tool asked for is the same one that is already loaded then exit macro
   If NewTool=OldTool Then
      Exit Sub
   End If

'Turn off soft limits if they are on
If GetOEMLED(23) Then
DoOEMButton(119)
End If

'Moves To Z home from where ever it is
code "G53G0Z0"
While IsMoving()
Wend

'Sets ChangeNums to 0 for safety in case it is not at 0
ChangeNums=0

'Makes the magic happen and moves the proper number of times if new tool is higher than old
If NewTool>OldTool Then
   For ChangeNums=1 To NewTool-OldTool
   
   'Moves Z axiis to the top of tool change
   code "G53 G1 F70 Z5.800"
   While IsMoving()
   Wend

   'Moves back to bottom of tool change area
   code "G53 G1 F70 Z3.8"
   While IsMoving()
   Wend
   
   Next
   
'Makes the magic happen and moves the proper number of times if new tool is lower than old   
Else
   For ChangeNums=(OldTool-NewTool) To 6
   
   'Moves Z axis to the top of tool change
   code "G53 G1 F70 Z5.800"
   While IsMoving()
   Wend

   'Moves back to bottom of tool change area
   code "G53 G1 F70 Z3.8"
   While IsMoving()
   Wend
   
   Next
End If

'Move Back to Z Home
code "G53 G1 F70 Z0"
While IsMoving()
Wend
   
'Should be a succesful tool change at this point so this sets the NewTool as the current tool
SetCurrentTool(NewTool)

'Turn back on soft limits
DoOEMButton(119)
End Sub 

294
I am working on a Macro for a turret tool changer. You can see the machine here:
http://www.youtube.com/watch?v=W-0q5uM8jbU
I have the motions programmed and I have it set to auto turn off soft limits if they are on to get past the soft limit at Zhome.

My next task is how to make it keep track of what tool it is on and run the macro the number of times it needs to get to the right tool. Also if something were to crash or power was lost or something wierd happened while it was in the tool change area, how would it know what tool it is on when you get it back up and running and homed?
Should I make it ask me what tool it is on when I start the program or something? If so how would I do this.
Here is what I got so far which works (motion wise)


'Turn off soft limits if they are on
If GetOEMLED(23) Then
DoOEMButton(119)
End If
NewTool = GetSelectedTool()
'Make it the current tool
SetCurrentTool(NewTool)
'Get positions before moving to do tool change
x = GetToolChangeStart( 0 )
y = GetToolChangeStart( 1 )
z = GetToolChangeStart( 2 )
a = GetToolChangeStart( 3 )
b = GetToolChangeStart( 4 )
c = GetToolChangeStart( 5 )
'Moves to Z home from where ever it is
code "G53G0Z0"
While IsMoving()
Wend 
'Moves Z axiis to the top of tool change
code "G53 G1 F70 Z5.800"
While IsMoving()
Wend
'Moves back to Z home with the next tool loaded
code "G53 G1 F70 Z0"
While IsMoving()
Wend
'Turn back on soft limits
DoOEMButton(119)

295
Oh and there is a limit switch at the top of the tool change area and at the bottom of the z that are the hard limits in series tied to the Z limit input. So, it is still safe......

296

If GetOEMled (23) Then
DoOEMButton (119)
End If

This seems to work, but how come no variable? It just assumes IF "on" Then? I guess if wanting to tell if it is off then you would do something like this-IF NOT GetOEMLED(23) Ten.......?


As for getting out of the softlimits......I don't want to be able to jog out of the "machinable" area when I am manually jogging the machine. So my softlimit is set at the home switch of Z which happens to be in the middle somewhere. Above this home switch tool change occurs. See the video here for better understanding. This was just a manual jog to show a tool change. I have the macro working now, I just have to get it counting the tools next and keeping track of which one it is on. 
http://www.youtube.com/watch?v=W-0q5uM8jbU

297
Oh if someone has a simple command to just turn soft limits off, that would be great also, but I cant find anything but toggle, which is lame.

298
VB and the development of wizards / Turn off soft limits in macro.....
« on: April 03, 2011, 09:06:03 PM »
I have been fighting VB for hours.
How can I tell it to turn off the softlimits if they are on?
I am working on a tool change macro that has to move the Z axis out of it's soft limits.

DoOEMButton(119) will toggle it, but that does me no good if the macro executes while the softlimits happen to be off. If that happens then it just turns the soft limits back on and gives you a reset during the macro because you are out of soft limit area.

I need it to check if soft limits are on and then toggle them to off, but if they are already off do nothing

I have tried this:
SoftLimit = GetOEMLED(23)
If SoftLimit = 1 Then DoOEMButton(119)   

It doesn't work

I have tried this:
If GetOEMLED(23) = 1 Then DoOEMButton(119)

That doesn't work either.

P.S. why in the heck does the window to type in a message always bounce up so you can't see what your typing on this stupid thing!   

299
General Mach Discussion / Re: How to wire and run automatic oiler?
« on: March 23, 2011, 09:42:45 PM »
Figured it out. It was actually really simple (after finding the brains video).
Create a brain called oiler
Add an input of "X axis Feedrate" and hit + and tell it greater than 0
Add an input of "Y axis Feedrate" and hit + and tell it greater than 0
Select both "greater than zero blocks" (turn them green)
Hit the + key and pick the OR function
Then select the OR box (turn it green) and terminate with an output 5 (which is the one I happen to have the relay that turns on the oiler hooked to AKA port 2 pin 4 in my ports and pins)

That is it, now anytime the X or Y axis moves no matter how it is doing it (program or jog buttons) the oiler comes on.
Every 15 minutes of actualy X or Y movement it will squirt 2.5 CC of oil out to the ways.

You could also use the "ismoving" input and turn it on anytime any axis moves. My Z axis gets no oil anyway so I went the other route.

300
General Mach Discussion / Re: How to wire and run automatic oiler?
« on: March 23, 2011, 04:07:18 PM »
I believe I have a solution......I will post back once I try it......

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 29 30 31 32 »