Hello Guest it is May 14, 2024, 08:17:45 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 - natefoerg

Pages: « 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 »
51
So a friend has helped me with the code a bit...

If GetSelectedTool() = GetCurrentTool() Then
 End
Else
 Code "G53 G0 Z24" 'Z full retract at rapid speed.
  While IsMoving()
  Wend

 CurrentTool = GetCurrentTool()
 SelectedTool  = GetSelectedTool()

 Select Case CurrentTool
  Case 1
  Code "G53 G1 U0 F20" 'U tool position 1 at 20IPM.
  Case 2
  Code "G53 G1 U4 F20" 'U tool position 2 at 20IPM.
  Case 3
  Code "G53 G1 U8 F20" 'U tool position 3 at 20IPM.
  Case 4
  Code "G53 G1 U12 F20" 'U tool position 4 at 20IPM.
  Case 5
  Code "G53 G1 U16 F20" 'U tool position 5 at 20IPM.
  Case 6
  Code "G53 G1 U24 F20" 'U tool position 6 at 20IPM.
 End Select
  While IsMoving()
  Wend
 
 Code "G53 G1 Z18 F20" 'Moves to tool release Z position.
  While IsMoving()
  Wend
 
 ActivateSignal(Output1) 'Unclamps drawbar.
 Sleep .5 'Pauses half second for drawbar to fully unclamp.

 Code "G53 G0 Z24" 'Z full retract at rapid speed.
  While IsMoving()
  Wend

 Select Case SelectedTool
  Case 1
  Code "G53 G1 U0 F20" 'U tool position 1 at 20IPM.
  Case 2
  Code "G53 G1 U4 F20" 'U tool position 2 at 20IPM.
  Case 3
  Code "G53 G1 U8 F20" 'U tool position 3 at 20IPM.
  Case 4
  Code "G53 G1 U12 F20" 'U tool position 4 at 20IPM.
  Case 5
  Code "G53 G1 U16 F20" 'U tool position 5 at 20IPM.
  Case 6
  Code "G53 G1 U20 F20" 'U tool position 6 at 20IPM.
 End Select
  While IsMoving()
  Wend

 Code "G53 G1 Z18 F20" 'Move to Z tool pickup height at 20IPM.
  While IsMoving()
  Wend


 DeActivateSignal(Output1) 'Clamps drawbar.
 Sleep 1 'Pauses one second for drawbar to fully clamp.

 Code "G53 G0 Z24" 'Z full retract at rapid speed.
  While IsMoving()
  Wend

 Code "G53 G0 U-4" 'retracts U tool rack to home position at rapid speed.
  While IsMoving()
  Wend

 'Lower spindle(Z) to its program location (with correct Z offset)
 
End If 


I am not sure how this macro can know what tool is currently loaded and what tool is requested.

I think that I may need to have it "pull" from a dro 1200.

How can I do this?

52
Just tried the Macro in a PC here at work in the Mach 3 VB editor and got the following error on line 122 "Buffer too small"

53
Hello, I am a good ways through building a conversion for my 3 axis BP mill.  I purchased a Cat40 spindle from a Tree mill that has a ball bearing gripper that is operated by an air cyllinder inside the spindle itself. I have almost finished construction of an aluminum (7/8's thick) structure that mounts onto my mill from the Knee ways up to above where the head normally is. The entire head and ram assembley (with my traditional cnc Z axis quill) will be removed and sold. The aluminum structure has robust linear roller (not ball) ways that carry the spindle and motor and its associated parts (like a traditional VMC)

My tool changer is of a fairly novel design. When the spindle and its housing are fully retracted (Z+ limit) (about 30 inches from the mills table(gaining a ton of Z height with this conversion BTW)) a hole that is in the position of the front of the original Ram is opened. from this opening a carriage emerges riding on smaller linear rails that houses the tools. I plan on a carraige with 6 tools for now. The spindle then deposits the tool in its original location, retracts and descends to pick up the new tool. Spindle then retracts again, carraige retracts also and then the spindle descends to its lotation for machining.

I have the spindles air cyllinder functional and it is controlled with a C6 board and solenoid through Mach with a M998 and M999 command.

I have read Hoss's "wine rack" style macro about a thousand times trying to wrap my head around how it works. I have been studying the VB mach manual and reading everything I can find.

Here is what I want to do.

Code calls for tool change.
Macro determines if tool called is tool in use.
If tool called is not tool in use, retract spindle(Z) fully.
Move tool carriage axis (in this case I will use U because I already have a 4th axis) to current tool loaded in spindles location.
Lower spindle(Z) to tool storage depth.
Activate M998 to release tool.
Retract spindle (Z) fully.
Move tool carraige axis to called tool location.
Lower spindle (Z) to tool storage depth.
Activate M999 to grab tool.
Retract spindle(Z) fully.
Retract tool carraige to its home location. (I presume this will be U0, and I plan on having the tools in locations such as U2, U4, U6, etc..)
Lower spindle(Z) to its program location (with correct Z offset) and resume machining.

 
Here is my Macro so far-

I have yet to test it, as I am away from the machine till tonight. Am I on the right track?

If GetSelectedTool() = GetCurrentTool() Then
End
 End If 

If CurrentTool() = 1 Then
Code "G53 G0 Z24" 'Z full retract at rapid speed.
While IsMoving()
Code "G53 G1 U0 F20" 'U tool position 1 at 20IPM.
While IsMoving()
Code "G53 G1 Z18 F20"
While IsMoving()
ActivateSignal(Output1) 'Unclamps drawbar.
Sleep .5 'Pauses half second for drawbar to fully unclamp.
Code "G53 G0 Z24" 'Z full retract at rapid speed.

If CurrentTool() = 2 Then
Code "G53 G0 Z24" 'Z full retract at rapid speed.
While IsMoving()
Code "G53 G1 U4 F20" 'U tool position 2 at 20IPM.
While IsMoving()
Code "G53 G1 Z18 F20"
While IsMoving()
ActivateSignal(Output1) 'Unclamps drawbar.
Sleep .5 'Pauses half second for drawbar to fully unclamp.
Code "G53 G0 Z24" 'Z full retract at rapid speed.

If CurrentTool() = 3 Then
Code "G53 G0 Z24" 'Z full retract at rapid speed.
While IsMoving()
Code "G53 G1 U8 F20" 'U tool position 3 at 20IPM.
While IsMoving()
Code "G53 G1 Z18 F20"
While IsMoving()
ActivateSignal(Output1) 'Unclamps drawbar.
Sleep .5 'Pauses half second for drawbar to fully unclamp.
Code "G53 G0 Z24" 'Z full retract at rapid speed.

If CurrentTool() = 4 Then
Code "G53 G0 Z24" 'Z full retract at rapid speed.
While IsMoving()
Code "G53 G1 U12 F20" 'U tool position 4 at 20IPM.
While IsMoving()
Code "G53 G1 Z18 F20"
While IsMoving()
ActivateSignal(Output1) 'Unclamps drawbar.
Sleep .5 'Pauses half second for drawbar to fully unclamp.
Code "G53 G0 Z24" 'Z full retract at rapid speed.

If CurrentTool() = 5 Then
Code "G53 G0 Z24" 'Z full retract at rapid speed.
While IsMoving()
Code "G53 G1 U16 F20" 'U tool position 5 at 20IPM.
While IsMoving()
Code "G53 G1 Z18 F20"
While IsMoving()
ActivateSignal(Output1) 'Unclamps drawbar.
Sleep .5 'Pauses half second for drawbar to fully unclamp.
Code "G53 G0 Z24" 'Z full retract at rapid speed.

If CurrentTool() = 6 Then
Code "G53 G0 Z24" 'Z full retract at rapid speed.
While IsMoving()
Code "G53 G1 U24 F20" 'U tool position 6 at 20IPM.
While IsMoving()
Code "G53 G1 Z18 F20"
While IsMoving()
ActivateSignal(Output1) 'Unclamps drawbar.
Sleep .5 'Pauses half second for drawbar to fully unclamp.
Code "G53 G0 Z24" 'Z full retract at rapid speed.
 
If GetSelectedTool = 1 Then
Code "G53 G0 Z24" 'Z full retract at rapid speed.
While IsMoving()
Code "G53 G1 U4 F20" 'U tool position 1 at 20IPM.
While IsMoving()
ActivateSignal(Output1) 'Unclamps drawbar.
Sleep .5 'Pauses half second for drawbar to fully unclamp.
Code "G53 G1 Z18 F20" 'Move to Z tool pickup height at 20IPM.
While IsMoving()
DeActivateSignal(Output1) 'Clamps drawbar.
Sleep 1 'Pauses one second for drawbar to fully clamp.
Code "G53 G0 Z24" 'Z full retract at rapid speed. 
While IsMoving()
Code "G53 G0 U-4" 'retracts U tool rack to home position at rapid speed.
While IsMoving()
End If.

If GetSelectedTool = 2 Then
Code "G53 G0 Z24" 'Z full retract at rapid speed.
While IsMoving()
Code "G53 G1 U8 F20" 'U tool position 2 at 20IPM.
While IsMoving()
ActivateSignal(Output1) 'Unclamps drawbar.
Sleep .5 'Pauses half second for drawbar to fully unclamp.
Code "G53 G1 Z18 F20" 'Move to Z tool pickup height at 20IPM.
While IsMoving()
DeActivateSignal(Output1) 'Clamps drawbar.
Sleep 1 'Pauses one second for drawbar to fully clamp.
Code "G53 G0 Z24" 'Z full retract at rapid speed. 
While IsMoving()
Code "G53 G0 U-4" 'retracts U tool rack to home position at rapid speed.
While IsMoving()
End If.

If GetSelectedTool = 3 Then
Code "G53 G0 Z24" 'Z full retract at rapid speed.
While IsMoving()
Code "G53 G1 U8 F20" 'U tool position 3 at 20IPM.
While IsMoving()
ActivateSignal(Output1) 'Unclamps drawbar.
Sleep .5 'Pauses half second for drawbar to fully unclamp.
Code "G53 G1 Z18 F20" 'Move to Z tool pickup height at 20IPM.
While IsMoving()
DeActivateSignal(Output1) 'Clamps drawbar.
Sleep 1 'Pauses one second for drawbar to fully clamp.
Code "G53 G0 Z24" 'Z full retract at rapid speed. 
While IsMoving()
Code "G53 G0 U-4" 'retracts U tool rack to home position at rapid speed.
While IsMoving()
End If.

If GetSelectedTool = 4 Then
Code "G53 G0 Z24" 'Z full retract at rapid speed.
While IsMoving()
Code "G53 G1 U12 F20" 'U tool position 4 at 20IPM.
While IsMoving()
ActivateSignal(Output1) 'Unclamps drawbar.
Sleep .5 'Pauses half second for drawbar to fully unclamp.
Code "G53 G1 Z18 F20" 'Move to Z tool pickup height at 20IPM.
While IsMoving()
DeActivateSignal(Output1) 'Clamps drawbar.
Sleep 1 'Pauses one second for drawbar to fully clamp.
Code "G53 G0 Z24" 'Z full retract at rapid speed. 
While IsMoving()
Code "G53 G0 U-4" 'retracts U tool rack to home position at rapid speed.
While IsMoving()
End If.

If GetSelectedTool = 5 Then
Code "G53 G0 Z24" 'Z full retract at rapid speed.
While IsMoving()
Code "G53 G1 U16 F20" 'U tool position 5 at 20IPM.
While IsMoving()
ActivateSignal(Output1) 'Unclamps drawbar.
Sleep .5 'Pauses half second for drawbar to fully unclamp.
Code "G53 G1 Z18 F20" 'Move to Z tool pickup height at 20IPM.
While IsMoving()
DeActivateSignal(Output1) 'Clamps drawbar.
Sleep 1 'Pauses one second for drawbar to fully clamp.
Code "G53 G0 Z24" 'Z full retract at rapid speed. 
While IsMoving()
Code "G53 G0 U-4" 'retracts U tool rack to home position at rapid speed.
While IsMoving()
End If.

If GetSelectedTool = 6 Then
Code "G53 G0 Z24" 'Z full retract at rapid speed.
While IsMoving()
Code "G53 G1 U20 F20" 'U tool position 6 at 20IPM.
While IsMoving()
ActivateSignal(Output1) 'Unclamps drawbar.
Sleep .5 'Pauses half second for drawbar to fully unclamp.
Code "G53 G1 Z18 F20" 'Move to Z tool pickup height at 20IPM.
While IsMoving()
DeActivateSignal(Output1) 'Clamps drawbar.
Sleep 1 'Pauses one second for drawbar to fully clamp.
Code "G53 G0 Z24" 'Z full retract at rapid speed. 
While IsMoving()
Code "G53 G0 U-4" 'retracts U tool rack to home position at rapid speed.
While IsMoving()
End If.








 
 



  

54
So I have a CNC mill (Bridgeport) running mach 3, geckos, SS etc...

I just bought an TELESIS TMM4250 The marker does not have a controler. I would like to trigger the solenoids (piston extend) and (piston retract) using an output in Mach3.

I know how to have a solenoid operated with mach via an output, but I cant figure out a way to have the solenoids fire alternately and at a predetermined rate of fire.

How would you go about this? Write a script? ideas on what the script might look like?

Best,
Nate.

55
As most 4th axis do, mine has a large gear reduction, 72:1 and further, a 3 to 1 belt reduction. When I am running code, the full rapids are at 100IPM for X, Y and Z, but the A axis moves at a snails pace.

I believe that Mach3 thinks that the A axis is moving at 100IPM, but because it is rotary and with such a heavy reduction, the rotation is crazy slow.

Oddly, when I am not running code and have the jogging feed set at 100, the A axis rotates at an appropriate rate.

Anyone have any ideas on how to fix this?

56
Looked through the G4 datasheet. I dont know how I would interface it with the SS. I know that it is intended to interface with one of their cards in a PC, or a Brain.

I would assume that I could get or make a BOB for the output strip of connections on this device. then I could wire them to the input pins of the SS.

The datasheet did not specify what the output voltage or signal is... the data sheet assumes that you are using one of their cards or brains...

57
Thanks Brett.

I looked at "G4 DC Input 4-16 VDC 16-channel Integral Rack" http://www.opto22.com/site/pr_details.aspx?cid=4&item=G4PB16J

It looks simmilar to what I was thinking about building. It even has LEDs for showing the status of each input!

How would I interface this to my SS/Mach3?

I take it I would run my inputs in to this device, it would then pass them on (optoisolated) through its output and I could then input those outputs into my SS's input pins. This right?

 

58
http://www.mouser.com/ProductDetail/Optek/OPI7340/?qs=sGAEpiMZZMteimceiIVCB7pvIurvlx9%2fZttGPD22suA%3d

Do you guys think these would work? I like that they are not surface mount. Ie: I can bend the legs and put them into sockets of some sort...

59
For various and sundry reasons, I wish to be able to opto-isolate multiple inputs into my SmoothStepper( without use of a BOB).

I have around 10 inputs for things like limit switches that I would like to keep opto-isolated. All of the inputs are 5VDC and under.

I know that I will need optocouplers/sockets for them, a breadboard or make a circuit board, 2 power supplies, and terminal blocks for attaching the inputs and power supplies.

How would I go about this? anyone have any recomendations for optocouplers and how to connect all this?

I have made a PCB or two in the past, but am otherwise a novice...

Best,
Nate.

60
Thanks Hood!

Last night I stripped down my controller so I could rewire and get rid of the bob and just use the C25 breakout board. This will give me both SS ports 1&2.

When I put things back together, I will retest the 3rd port pins and see if I can get them to work.

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