Hello Guest it is March 29, 2024, 10:45:19 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.


Topics - mike^3

Pages: 1 2 3 »
1
Hello everyone!

I love this forum!

I am almost complete with my CHNC4 to mach 3 conversion, however I am having an issue, the spindle speed is not trying to correct to the commanded spindle speed position.

Here is a quick video.

https://www.youtube.com/watch?v=FjkSUMz8I6o

Any help guys?

I have an Ethernet Smooth Stepper with a c23 board. I can change the spindle speed manual with the speed box, but it will not try to correct to the commanded speed.

THANK YOU ALL SO MUCH!

2
Hello community! I am almost done retrofitting my CHNC4 to mach 3,

I am having an issue though.

When I use the lathe wizard, it threads great when at 500 rpm, or whatever I set it at.

The problem is that the first pass is 45rpm, then 250, then 500 (requested rpm in the wizard).

Any ideas?

Im going to try to make some cam gcode with fusion 360 and see if that fixes it.

Thanks so much! I will upload a video shortly! :)

3
Hi everyone! you are all great! I appreciate all help. Im getting really frustrated with this...  ??? ??? ???

Heres my problem, in this macro the second wait command does not happen, even though I think it is written properly. Please take a look


Here is the code that I have, it works fine but it will not wait after it senses the right input, I put ****** by it...



I only added the ****** for the first two cases, but not the rest, its the same thing for the rest. Perhaps the wait commands are not put in properly?



The first whileismoving() works fine but the second one does not work, it doesnt even wait... Any ideas?



'Macro ATC turret V2.02.01


Sub MovePos(ByVal ToolNumber As Integer)

OldTool = GetCurrentTool()

NewTool = GetSelectedTool()

ToolNumber = NewTool

If NewTool = OldTool Then

Message" Same Tool, NO ACTION"

End

End If

If NewTool > 8 Or NewTool < 1 Then

MsgBox" Tool # Not a Valid Number 1-8 ONLY, ENDING Program RUN "

DoButton(3)

End

End If

Tcount = 0

Select Case ToolNumber 'Position to each tool number by input signal

 

 

Case = 1

Message" Select Tool #1 "


ActivateSignal(Output5) 'Releases stop dog


While IsMoving()

Sleep 1000 ******************it will wait here fine...

Wend


ActivateSignal(Output6) 'Start Turret


Tcnt = 0

Do Until GetOemLed(821) = true And GetOemLed(822) = false And GetOemLed(823) = false And GetOemLed(824) = false Or Tcnt > 200000

Tcnt = (Tcnt+1)

Loop


If Tcnt >= 200000 Then

DoButton(3)

DeActivateSignal(Output5) 'Stopping turret

DeActivateSignal(Output6) 'Lowering and stopping air motor

MsgBox" Tool Turret Timed Out not receieving input signal from turret encoder"

End


Else


DeActivateSignal(Output5) 'Trigger Stop Dawg

Message"Triggering Stop Dawg"

While IsMoving()

Sleep 2000 **********************It does not wait here for some reason***************

Wend


DeActivateSignal(Output6) 'Lowering and stopping air motor

Message"Lowering and stopping air motor"


End If


'''''''''''''''''''''''''''''''''''''''''''''''''''''


Tcnt2 = 0


Do Until isactive(29) ' Check for reseating of turret

Tcnt2 = (Tcnt2 +1)

If Tcnt2 > = 10000 Then

DoButton(3)

MsgBox(" Turret Timed Out and Did Not Reseat")

End

End If

Loop




message " Tool #1 Loaded"


''*****************************************************************

Case = 2

Message" Select Tool #2 "


ActivateSignal(Output5) 'Releases stop dog


While IsMoving()

Sleep 1000 *************waits ok

Wend


ActivateSignal(Output6) 'Start Turret


Tcnt = 0

Do Until GetOemLed(821) = false And GetOemLed(822) = true And GetOemLed(823) = false And GetOemLed(824) = false Or Tcnt > 200000

Tcnt = (Tcnt+1)

Loop


If Tcnt >= 200000 Then

DoButton(3)

DeActivateSignal(Output5) 'Stopping turret

DeActivateSignal(Output6) 'Lowering and stopping air motor

MsgBox" Tool Turret Timed Out not receieving input signal from turret encoder"

End


Else


DeActivateSignal(Output5) 'Trigger Stop Dawg

Message"Triggering Stop Dawg"

While IsMoving()

Sleep 2000  **********************it does not wait

Wend


DeActivateSignal(Output6) 'Lowering and stopping air motor

Message"Lowering and stopping air motor"

End If


''''''''''''''''''''''''''''''''''''''''''''''''''''''''''


Tcnt2 = 0


Do Until isactive(29) ' Check for reseating of turret

Tcnt2 = (Tcnt2 +1)

If Tcnt2 > = 10000 Then

DoButton(3)

MsgBox(" Turret Timed Out and Did Not Reseat")

End

End If

Loop


message " Tool #2 Loaded"


''*****************************************************************

Case = 3

Message" Select Tool #3 "


ActivateSignal(Output5) 'Releases stop dog


While IsMoving()

Sleep 1000

Wend



ActivateSignal(Output6) 'Start Turret


Tcnt = 0

Do Until GetOemLed(821) = true And GetOemLed(822) = true And GetOemLed(823) = false And GetOemLed(824) = false Or Tcnt > 200000

Tcnt = (Tcnt+1)

Loop


If Tcnt >= 200000 Then

DoButton(3)

DeActivateSignal(Output5) 'Stopping turret

DeActivateSignal(Output6) 'Lowering and stopping air motor

MsgBox" Tool Turret Timed Out not receieving input signal from turret encoder"

End


Else


DeActivateSignal(Output5) 'Trigger Stop Dawg

Message"Triggering Stop Dawg"

While IsMoving()

Sleep 2000

Wend


DeActivateSignal(Output6) 'Lowering and stopping air motor

Message"Lowering and stopping air motor"

End If


'''''''''''''''''''''''''''''''''''''''''''''''''''''''''''


Tcnt2 = 0


Do Until isactive(29) ' Check for reseating of turret

Tcnt2 = (Tcnt2 +1)

If Tcnt2 > = 10000 Then

DoButton(3)

MsgBox(" Turret Timed Out and Did Not Reseat")

End

End If

Loop

message " Tool #3 Loaded"


''*****************************************************************

 

Case = 4

Message" Select Tool #4 "


ActivateSignal(Output5) 'Releases stop dog


While IsMoving()

Sleep 1000

Wend



ActivateSignal(Output6) 'Start Turret


Tcnt = 0

Do Until GetOemLed(821) = false And GetOemLed(822) = false And GetOemLed(823) = true And GetOemLed(824) = false Or Tcnt > 200000

Tcnt = (Tcnt+1)

Loop


If Tcnt >= 200000 Then

DoButton(3)

DeActivateSignal(Output5) 'Stopping turret

DeActivateSignal(Output6) 'Lowering and stopping air motor

MsgBox" Tool Turret Timed Out not receieving input signal from turret encoder"

End


Else


DeActivateSignal(Output5) 'Trigger Stop Dawg

Message"Triggering Stop Dawg"

While IsMoving()

Sleep 2000

Wend


DeActivateSignal(Output6) 'Lowering and stopping air motor

Message"Lowering and stopping air motor"

End If


'''''''''''''''''''''''''''''''''''''''''''''''''''''''''''


Tcnt2 = 0


Do Until isactive(29) ' Check for reseating of turret

Tcnt2 = (Tcnt2 +1)

If Tcnt2 > = 10000 Then

DoButton(3)

MsgBox(" Turret Timed Out and Did Not Reseat")

End

End If

Loop


Message " Tool #4 Loaded"


''*****************************************************************

Case = 5

Message" Select Tool #5 "



ActivateSignal(Output5) 'Releases stop dog


While IsMoving()

Sleep 1000

Wend


ActivateSignal(Output6) 'Start Turret


Tcnt = 0

Do Until GetOemLed(821) = true And GetOemLed(822) = false And GetOemLed(823) = true And GetOemLed(824) = false Or Tcnt > 200000

Tcnt = (Tcnt+1)

Loop


If Tcnt >= 200000 Then

DoButton(3)

DeActivateSignal(Output5) 'Stopping turret

DeActivateSignal(Output6) 'Lowering and stopping air motor

MsgBox" Tool Turret Timed Out not receieving input signal from turret encoder"

End


Else


DeActivateSignal(Output5) 'Trigger Stop Dawg

Message"Triggering Stop Dawg"

While IsMoving()

Sleep 2000

Wend


DeActivateSignal(Output6) 'Lowering and stopping air motor

Message"Lowering and stopping air motor"

End If


'''''''''''''''''''''''''''''''''''''''''''''''''''''''''''


Tcnt2 = 0


Do Until isactive(29) ' Check for reseating of turret

Tcnt2 = (Tcnt2 +1)

If Tcnt2 > = 10000 Then

DoButton(3)

MsgBox(" Turret Timed Out and Did Not Reseat")

End

End If

Loop

message " Tool #5 Loaded"


''*****************************************************************

Case = 6

Message" Select Tool #6 "


ActivateSignal(Output5) 'Releases stop dog


While IsMoving()

Sleep 1000

Wend



ActivateSignal(Output6) 'Start Turret


Tcnt = 0

 

Do Until GetOemLed(821) = false And GetOemLed(822) = true And GetOemLed(823) = true And GetOemLed(824) = false Or Tcnt > 200000

Tcnt = (Tcnt+1)

Loop


If Tcnt >= 200000 Then

DoButton(3)

DeActivateSignal(Output5) 'Stopping turret

DeActivateSignal(Output6) 'Lowering and stopping air motor

MsgBox" Tool Turret Timed Out not receieving input signal from turret encoder"

End


Else


DeActivateSignal(Output5) 'Trigger Stop Dawg

Message"Triggering Stop Dawg"

While IsMoving()

Sleep 2000

Wend


DeActivateSignal(Output6) 'Lowering and stopping air motor

Message"Lowering and stopping air motor"

End If



'''''''''''''''''''''''''''''''''''''''''''''''''''''''''''


Tcnt2 = 0


Do Until isactive(29) ' Check for reseating of turret

Tcnt2 = (Tcnt2 +1)

If Tcnt2 > = 10000 Then

DoButton(3)

MsgBox(" Turret Timed Out and Did Not Reseat")

End

End If

Loop

message " Tool #6 Loaded"


''*****************************************************************

Case = 7

Message" Select Tool #7 "


ActivateSignal(Output5) 'Releases stop dog


While IsMoving()

Sleep 1000

Wend


ActivateSignal(Output6) 'Start Turret


Tcnt = 0

Do Until GetOemLed(821) = true And GetOemLed(822) = true And GetOemLed(823) = true And GetOemLed(824) = false Or Tcnt > 200000

Tcnt = (Tcnt+1)

Loop


If Tcnt >= 200000 Then

DoButton(3)

DeActivateSignal(Output5) 'Stopping turret

DeActivateSignal(Output6) 'Lowering and stopping air motor

MsgBox" Tool Turret Timed Out not receieving input signal from turret encoder"

End


Else


DeActivateSignal(Output5) 'Trigger Stop Dawg

Message"Triggering Stop Dawg"

While IsMoving()

Sleep 2000

Wend


DeActivateSignal(Output6) 'Lowering and stopping air motor

Message"Lowering and stopping air motor"

End If


'''''''''''''''''''''''''''''''''''''''''''''''''''''''''''


Tcnt2 = 0


Do Until isactive(29) ' Check for reseating of turret

Tcnt2 = (Tcnt2 +1)

If Tcnt2 > = 10000 Then

DoButton(3)

MsgBox(" Turret Timed Out and Did Not Reseat")

End

End If

Loop

message " Tool #7 Loaded"


''*****************************************************************

Case = 8

Message" Select Tool #8 "


ActivateSignal(Output5) 'Releases stop dog


While IsMoving()

Sleep 1000

Wend


ActivateSignal(Output6) 'Start Turret


Tcnt = 0

Do Until GetOemLed(821) = false And GetOemLed(822) = false And GetOemLed(823) = false And GetOemLed(824) = true Or Tcnt > 200000

Tcnt = (Tcnt+1)

Loop


If Tcnt >= 200000 Then

DoButton(3)

DeActivateSignal(Output5) 'Stopping turret

DeActivateSignal(Output6) 'Lowering and stopping air motor

MsgBox" Tool Turret Timed Out not receieving input signal from turret encoder"

End


Else


DeActivateSignal(Output5) 'Trigger Stop Dawg

Message"Triggering Stop Dawg"

While IsMoving()

Sleep 2000

Wend


DeActivateSignal(Output6) 'Lowering and stopping air motor

Message"Lowering and stopping air motor"

End If


'''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''


Tcnt2 = 0


Do Until isactive(29) ' Check for reseating of turret

Tcnt2 = (Tcnt2 +1)

If Tcnt2 > = 10000 Then

DoButton(3)

MsgBox(" Turret Timed Out and Did Not Reseat")

End

End If

Loop

message " Tool #8 Loaded"

''********************************************************************

End Select


SetOemDro(824,NewTool)

End Sub

End


4
General Mach Discussion / CNC Lathe turret tool changer help?
« on: October 07, 2015, 04:06:28 PM »
 ;D I appreciate all help!!!

Hello everyone! I am retrofitting my CHNC4, I am working on the lathe portion now. Currently there are 4 wires coming off the lathe encoder.

Here is the output states of each wire to what tool it is at.


Output 6 is the output to start and stop the turret.

Tool   pin 2   pin 3   pin 4   pin 5
1   1   0   0   0
2   0   1   0   0
3   1   1   0   0
4   0   0   1   0
5   1   0   1   0
6   0   1   1   0
7   1   1   1   0
8   0   0   0   1


Here is the script I started. However I have 2 questions:

Question #1: What do I need to add to the script to update the current tool and tool offset to reflect selected tool?

Question #2: How would I be able to compare the signals for example when I get to tool 7 when pin 2,3, and 4 are HI? To tell mach, yes you are at tool 7 because all states are HI? I tried to put Active1 & active2 etc etc when the 2 or more signals need to be compared. However when I emulate an active state on those inputs, mach does not activate output6 or stop when I hit the emulated key (it shows on the diagnostic screen that it is active when I hit the key)

If GetSelectedTool() = GetCurrentTool() Then
     message("Tool is the same NO tool change needed")
   END
    End If
 
 
 If GetSelectedTool = 1 Then
 Message "Moving to Tool# " &GetselectedTool()

    Do
     ActivateSignal(OutPut6)
   If IsActive(Active1) Then Exit Do
   Loop
    DeActivateSignal(Active1)
       Message("Tool#1 Loaded")
   End If
 
 If GetSelectedTool = 2 Then
 Message "Moving to Tool# " &GetselectedTool()

    Do
     ActivateSignal(OutPut6)
   If IsActive(Active2) Then Exit Do
   Loop
    DeActivateSignal(OutPut6)
       Message("Tool#1 Loaded")
   End If
   
 If GetSelectedTool = 3 Then
 Message "Moving to Tool# " &GetselectedTool()

    Do
     ActivateSignal(OutPut6)
   If IsActive(Active1) & IsActive(Active2) Then Exit Do
   Loop
    DeActivateSignal(OutPut6)
       Message("Tool#1 Loaded")
   End If   

 If GetSelectedTool = 4 Then
 Message "Moving to Tool# " &GetselectedTool()

    Do
     ActivateSignal(OutPut6)
   If IsActive(Active3) Then Exit Do
   Loop
    DeActivateSignal(OutPut6)
       Message("Tool#1 Loaded")
   End If   
   
 If GetSelectedTool = 5 Then
 Message "Moving to Tool# " &GetselectedTool()

    Do
     ActivateSignal(OutPut6)
   If IsActive(Active1) & IsActive(Active3) Then Exit Do
   Loop
    DeActivateSignal(OutPut6)
       Message("Tool#1 Loaded")
   End If   
   
 If GetSelectedTool = 6 Then
 Message "Moving to Tool# " &GetselectedTool()

    Do
     ActivateSignal(OutPut6)
   If IsActive(Active2) & IsActive(Active3) Then Exit Do
   Loop
    DeActivateSignal(OutPut6)
       Message("Tool#1 Loaded")
   End If   
   
 If GetSelectedTool = 7 Then
 Message "Moving to Tool# " &GetselectedTool()

    Do
     ActivateSignal(OutPut6)
   If IsActive(Active1) & IsActive(Active2) & IsActive(Active3) Then Exit Do
   Loop
    DeActivateSignal(OutPut6)
       Message("Tool#1 Loaded")
   End If   
   
 If GetSelectedTool = 8 Then
 Message "Moving to Tool# " &GetselectedTool()

    Do
     ActivateSignal(OutPut6)
   If IsActive(Active4) Then Exit Do
   Loop
    DeActivateSignal(OutPut6)
       Message("Tool#1 Loaded")
   End If      
   
     End    

5
General Mach Discussion / Tool changer help?
« on: October 06, 2015, 09:46:57 AM »
Hello,
I have a tool changer on my lathe and need some help...

Its 8 stations, and i have 4 states that come off the tool changer.


Output 6 is the output to start and stop the turret.

Tool    pin 2   pin 3   pin 4   pin 5
1   1   0   0   0
2   0   1   0   0
3   1   1   0   0
4   0   0   1   0
5   1   0   1   0
6   0   1   1   0
7   1   1   1   0
8   0   0   0   1

Can anyone help me set up this in the inputs and tool change macro?

Thank you!

6
General Mach Discussion / New cnc lathe turret macro ? :D
« on: October 02, 2015, 08:51:58 PM »
Hi Guys, how would I make my macro if these were the steps I wanted? For a tool changer, I have 8 inputs on my c23 board for each tool change position. inputs 1 - 8 = tool 1 - 8

goto z0.2 (machine coordinates)

activate output 6

wait for signal on input 1 (high) for tool 1 ( and input 2-8 if I want tools 2 - 8) (it is an 8 station tool changer)

if signal is not seen within 20 secs, e-stop and alarm and stat (tool changer not sensing input)

then deactivate output 6

Update current tool to selected tool, and tool offset

resume program,

Any help guys?>

7
General Mach Discussion / Turret macro question! VERY COOL TURRET :D
« on: October 02, 2015, 06:10:18 PM »
 ;D ??? ::) >:D ???


Hello Mach community! I have an awesome project I am working on, with your previous help I have been able do so much :)!.

I am converting a CHNC right now, I have one prob though....

The turret is very unique...

This is the process of what should happen:

Trigger output 5 ON (lift and spins turret counter clockwise)

Wait for input (this is where it gets narly)

There is 4 wires that come off of this encoder (signal outputs 12v), yet there is 8 positions, so I am assuming there is a BCD code, like tool one = 1001, tool two = 1010

The (1) represents wire (X) is high and (0) represents wire (x) is low

So I have the outputs wired to 4 inputs on my cnc4pc c23 card.

When is gets the right output on the right inputs, then

Trigger output 6 (fires a stop dog that stops the turret)

Trigger output 5 OFF
Trigger output 6 OFF

change current tool to selected tool and current offset to selected offset.

continue program.

If you could help it would be very appreciated!!! :D

Mike ???

8
hello!

When using my cnc lathe, that has a rear tool post with tool changer, I can't seem to get the gcode right for cutting.

Everytime I use the lathe wizard, it thinks the tool is in the front and posts that way, how do I change it to use the rear post?

I already tried to change the tool from front to rear im mach 3, still doesnt help, it still assumes that the tool is in the front.

Any help?

9
Hello, here is a sample script

 If GetSelectedTool = 1 Then
  Code "G53 G0 A0"
 Code "G53 G0 A-5"
 Code"G92 A0"   
 While IsMoving()
 Wend
 End If

However, I only want the tool changer that I have (8 station) to rotate in ONE direction, positive, not negative. Where it stands right now it will rotate to the g0 a0. I would like for it to go forward until it goes to the tool no matter where (360 degrees) it is at. Forward direction only, is this possible?

Thanks!

10

Hello

I am trying to creat 8 buttons on my screen so that I can click on one and it will goto the commanded tool.

 I have this code that works great in m6 macro for my tool changer, yet when I copy and past (only the top one for tool 1) into the button script, it wont work, gives me errors. Any help? I just want button 1, to goto tool one and use the first if statement in it.

 If GetSelectedTool() = GetCurrentTool() Then
 End
 End If
 
 If GetSelectedTool = 1 Then
  Code "G53 G0 A0"
 Code "G53 G0 A-5"
 Code"G92 A0"   
 While IsMoving()
 Wend
 End If
 
 If GetSelectedTool = 2 Then
  Code "G53 G0 A45"
 Code "G53 G0 A40"
 Code"G92 A45"
 While IsMoving()
 Wend
 End If
 
 If GetSelectedTool = 3 Then
  Code "G53 G0 A90"
 Code "G53 G0 A85"
 Code"G92 A90"
 While IsMoving()
 Wend
  End If
 
 If GetSelectedTool = 4 Then
  Code "G53 G0 A135"
 Code "G53 G0 A130"
 Code"G92 A135"
 While IsMoving()
 Wend
  End If
 
 If GetSelectedTool = 5 Then
  Code "G53 G0 A180"
 Code "G53 G0 A175"
 Code"G92 A180"
 While IsMoving()
 Wend
  End If
 
 If GetSelectedTool = 6 Then
  Code "G53 G0 A225"
 Code "G53 G0 A220"
 Code"G92 A225"
 While IsMoving()
 Wend
  End If 
 
 If GetSelectedTool = 7 Then
  Code "G53 G0 A270"
 Code "G53 G0 A265"
 Code"G92 A270"
 While IsMoving()
 Wend
  End If
 
 If GetSelectedTool = 8 Then
  Code "G53 G0 A315"
 Code "G53 G0 A310"
 Code"G92 A315"
 While IsMoving()
 Wend
  End If   

END

Pages: 1 2 3 »