Hello Guest it is September 28, 2020, 06:53:11 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 - drew

Pages: « 1 2 3 4 5 6 7 8 »
61
 :o  I didn't know Mach had brains.    ;)  Drew

62
I am dwelling in milliseconds .The turret is currently indexing to the correct tool every time with an occasional unscheduled stop along the way. Index times run about 4 seconds for a clean stop at the right tool  and 8 seconds if it stops at a wrong tool first. I didn't understand the 'logic in Brian' is that a reference to the DL06?
Thanks Drew

63
Ok I found out why the dwell was not working(see macro). Macro now works really well. When indexing tool 5 It stops at 7 then goes to 5 but I can live with that. I have not discovered the minimun dwell amount that will work. These do not seem to be too much. The encoder magnet may need to be adjusted for proper operation. I actually look for the tool position before the tool that is requested then check position after it is stoped.The code is ...

Sub main()
NumSlots=0
OldTurretPos=(GetOEMDRO(824))     'current tool position
NextTool = GetSelectedTool()      'tool to be indexed
EncoderBCD = 0                    'encoder position is number
TurretLock = False        'turret locked down limit switch
EncoderinPos = False        'NextTool and encoder position match
TestM6 = True                'test run sub replace NextTool value by question

If TestM6 Then             'if test get tool to index
  NextTool = Question("Tool to index ")
  End If

If NextTool>8 Or NextTool<1 Then   'valid tool check
  Message("Next Tool out of range")
  Exit Sub
  End If

While Not TurretLock Or Not EncoderinPos
  If OldTurretPos <> NextTool Then      'if same tool skip index
 
   DeActivateSignal(OUTPUT8)  'Release Turret holding pin
     Code"G04 P200"
     While Ismoving()
      Wend
   ActivateSignal(OUTPUT7)  'Rase and rotate Turret

   '=== Index Tool ===
  Select Case NextTool
    Case  1 'Tool#1  encoder pos8
     While Not(IsActive(OEMTRIG4) And Not IsActive(OEMTRIG3) And Not IsActive(OEMTRIG2) And Not IsActive(OEMTRIG1))
   Wend
    Case  2 'Tool#2  encoder pos1
     While Not(Not IsActive(OEMTRIG4) And Not IsActive(OEMTRIG3) And Not IsActive(OEMTRIG2) And IsActive(OEMTRIG1))
   Wend
    Case  3 'Tool#3  encoder pos2
     While Not(Not IsActive(OEMTRIG4) And Not IsActive(OEMTRIG3) And IsActive(OEMTRIG2) And Not IsActive(OEMTRIG1))
   Wend
    Case  4 'Tool#4  encoder pos3
     While Not(Not IsActive(OEMTRIG4) And Not IsActive(OEMTRIG3) And IsActive(OEMTRIG2) And IsActive(OEMTRIG1))
   Wend
    Case  5 'Tool#5  encoder pos4
     While Not(Not IsActive(OEMTRIG4) And IsActive(OEMTRIG3) And Not IsActive(OEMTRIG2) And Not IsActive(OEMTRIG1))
   Wend
    Case  6 'Tool#6  encoder pos5
     While Not(Not IsActive(OEMTRIG4) And IsActive(OEMTRIG3) And Not IsActive(OEMTRIG2) And IsActive(OEMTRIG1))
   Wend
    Case  7 'Tool#7  encoder pos6
     While Not(Not IsActive(OEMTRIG4) And IsActive(OEMTRIG3) And IsActive(OEMTRIG2) And Not IsActive(OEMTRIG1))
   Wend
    Case  8 'Tool#8  encoder pos7
     While Not(Not IsActive(OEMTRIG4) And IsActive(OEMTRIG3) And IsActive(OEMTRIG2) And IsActive(OEMTRIG1))
   Wend

    End Select
   
    ActivateSignal(OUTPUT8)  'Engauge Turret holding pin
     Code"G04 P400"
     While Ismoving()
      Wend
    DeActivateSignal(OUTPUT7)  'Lower and lock Turret
     Code"G04 P800"
     While Ismoving()
      Wend
    DeActivateSignal(OUTPUT8)  'Release Turret holding pin
    NumSlots=NumSlots+1


 End If ' same tool skip
 
EncoderBCD = 0

If IsActive(OEMTRIG4) Then
  EncoderBCD = EncoderBCD + 8
  End If
If IsActive(OEMTRIG3) Then
  EncoderBCD = EncoderBCD + 4
  End If
If IsActive(OEMTRIG2) Then
  EncoderBCD = EncoderBCD + 2
  End If
If IsActive(OEMTRIG1) Then
  EncoderBCD = EncoderBCD + 1
  End If
     
Message("Tool Encoder "& EncoderBCD)
Code"G04 P400"
     While Ismoving()
      Wend

If NextTool = EncoderBCD Then
   EncoderinPos = True
   Else                  'NextTool and encoder position match
     Message("Tool out of Position")
     EncoderinPos= False            'NextTool and encoder position match
     OldTurretPos= 0            'force turret rotation
   End If
   
If IsActive(INPUT1) Then
   TurretLock = True            'turret locked down limit switch
   Else
     Message("Turret not Locked Down")
     TurretLock = False            'turret locked down limit switch
     OldTurretPos=0            'force turret rotation                 
   End If
   
Wend  'verify tool in position and turret down

Message("Tool "& NextTool &" loaded " & "Loop count "& NumSlots)
SetCurrentTool(NextTool)
End sub
                   


64
I am working on my HNC tool changing macro. It is changing tools now but the Code "G4 PXX"  doesn't work as I expected. And the While loops in the Case statement maynot be holding up the execution of the macro as I ecpected also. Big THANKS poppabear just something to start from is a huge help! OEMTRIG 1-4 are from the original turret encoder signales. The dwell needed between I/O signales seens to be my bigest problem right now. I'm still working on it and insight is appecerated. Anyway here it is.

Sub main()
NumSlots=0
OldTurretPos=(GetOEMDRO(824))     'current tool position
NextTool = GetSelectedTool()      'tool to be indexed
EncoderBCD = 0                    'encoder position is number
TurretLock = False        'turret locked down limit switch
EncoderinPos = False        'NextTool and encoder position match
TestM6 = True                'test run sub replace NextTool value by question

If TestM6 Then                               'if test get tool to index
  NextTool = Question("Tool to index ")
  End If

If NextTool>8 Or NextTool<1 Then      'valid tool check
  Message("Next Tool out of range")
  Exit Sub
  End If

While Not TurretLock Or Not EncoderinPos
  If OldTurretPos <> NextTool Then      'if same tool skip index
 
   DeActivateSignal(OUTPUT8)  'Release Turret holding pin
   Code"G04 P200"
   ActivateSignal(OUTPUT7)  'Rase and rotate Turret

   '=== Index Tool ===
  Select Case NextTool
    Case  1 'Tool#1
     While Not(Not IsActive(OEMTRIG4) And Not IsActive(OEMTRIG3) And Not IsActive(OEMTRIG2) And IsActive(OEMTRIG1))
   Wend
    Case  2 'Tool#2
     While Not(Not IsActive(OEMTRIG4) And Not IsActive(OEMTRIG3) And IsActive(OEMTRIG2) And Not IsActive(OEMTRIG1))
   Wend
    Case  3 'Tool#3
     While Not(Not IsActive(OEMTRIG4) And Not IsActive(OEMTRIG3) And IsActive(OEMTRIG2) And IsActive(OEMTRIG1))
   Wend
    Case  4 'Tool#4
     While Not(Not IsActive(OEMTRIG4) And IsActive(OEMTRIG3) And Not IsActive(OEMTRIG2) And Not IsActive(OEMTRIG1))
   Wend
    Case  5 'Tool#5
     While Not(Not IsActive(OEMTRIG4) And IsActive(OEMTRIG3) And Not IsActive(OEMTRIG2) And IsActive(OEMTRIG1))
   Wend
    Case  6 'Tool#6
     While Not(Not IsActive(OEMTRIG4) And IsActive(OEMTRIG3) And IsActive(OEMTRIG2) And Not IsActive(OEMTRIG1))
   Wend
    Case  7 'Tool#7
     While Not(Not IsActive(OEMTRIG4) And IsActive(OEMTRIG3) And IsActive(OEMTRIG2) And IsActive(OEMTRIG1))
   Wend
    Case  8 'Tool#8
     While Not(IsActive(OEMTRIG4) And Not IsActive(OEMTRIG3) And Not IsActive(OEMTRIG2) And Not IsActive(OEMTRIG1))
   Wend

    End Select
   
    ActivateSignal(OUTPUT8)  'Engauge Turret holding pin
     Code"G04 P800"
    DeActivateSignal(OUTPUT7)  'Lower and lock Turret
     Code"G04 P400"
    DeActivateSignal(OUTPUT8)  'Release Turret holding pin
    NumSlots=NumSlots+1


 End If ' same tool skip
 
EncoderBCD = ((8*IsActive(OEMTRIG4)) + (4* IsActive(OEMTRIG3)) + (2* IsActive(OEMTRIG2)) + (1* IsActive(OEMTRIG1)))     
If NextTool = EncoderBCD Then
   EncoderinPos = True
   Else                  'NextTool and encoder position match
     Message("Tool out of Position")
     EncoderinPos= False            'NextTool and encoder position match
     OldTurretPos= 0
     'Code "G04 P500"            'force turret rotation
   End If
   
If IsActive(INPUT1) Then
   TurretLock = True            'turret locked down limit switch
   Else
     Message("Turret not Locked Down")
     TurretLock = False            'turret locked down limit switch
     OldTurretPos=0            'force turret rotation                 
   End If
   
Wend  'verify tool in position and turret down

Message("Tool "& NextTool &" loaded " & NumSlots)
SetCurrentTool(NextTool)
End sub
             

65
Thanks that works . Now if I can just finish changing the things I need to change without screwing the other stuff up. Already off to a bad start on that one.
Also I managed to erase the lettering on some buttons to make blanks.

66
If I hit the 'bitmaps to back' buton and mess up the panals on the simple screen how do I fix it?

67
Galil / Re: Mach3 + Galil
« on: January 25, 2007, 11:58:54 AM »
How big of a job would it be to recode a enet plugin to use usb? I would think that once you got the communication setup that most of the other code for axis and IO would be the same as I'm almost positive the enet and usb use the same command set. But I know ZERO about mach3 plugin's. Although I'm sure timming will play a role here too.

68
Galil / Re: Mach3 + Galil
« on: January 25, 2007, 11:53:16 AM »
Don't forget your vertical slide down LS (input).
Plus with all that IO you can check you vfd for up to speed and falt/error.
I also use a spindle enable ssr(monintary on by macro) to a mechanial relay that self latches this pulls in the motor starter that you don't need with a VFD. E-Stop releases the self latching relay and the motor starter so the spindle won't turn till the ssr resets the self latching relay.
Drew

69
Galil / Re: Mach3 + Galil
« on: January 24, 2007, 12:32:19 PM »
Will a usb Galil work with this plug in something likeĀ  dmc2030 ?
Thanks Drew

roodesign :
"Also, I was wondering what would be the best way to control the turret on the HNC, would you still use a plc?...My Galil has the additional 64 I/O...would a mach3 macro work?...anyway, thoughts please"
I have A HNC that I ran with an AHHA controll you should be able to Index , look for the 4 bits to match tool requested , engage the Lock , turn Index off , check LS for turret to be down , and release lock. Or you can single step the turret by Lock on, dwell .2 sec, Index on, dwell .5sec, Index off, check turret down, lock off. The lock or stop is of some type of cushion that will not catch the current tool but on the next. You can use a limit/prox switch, orig encoder or manual index to find say tool 8 (only time bit 4 active) at start up then keep track of turret position by var. This is much slower than checking the encoder on the fly but can be used with 3 fewer inputs or for Hnc with dead turret encoders.

Drew

70
I really like this screen set only problem is I have a lathe not a mill. I'm working on changing some of the buttons around but my graphics skills lack. Would you be willing to do some extra bitmap buttons geared to lathe use? I changed Y dro to Z dro and Z dro to Spindle speed dro but my new S buttom isn't up to snuff. I coded the S button to M5 fyi.

Pages: « 1 2 3 4 5 6 7 8 »