Hello Guest it is July 30, 2021, 10:34:18 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 - fdos

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 33 »
41
Show"N"Tell ( Your Machines) / Re: Yet another Retrofit. Hardinge HXL-S
« on: September 19, 2008, 02:41:36 PM »


It Lives !!!

Well at least the X axis.   I'll do the Z tomorrow, have a couple of PCB's to make to tidy things up some more.

Wayne.....

42
Show"N"Tell ( Your Machines) / Re: Yet another Retrofit. Hardinge HXL-S
« on: September 17, 2008, 03:28:45 PM »
Dave

The language barriers hit again!

I googled it to find out where it came from ;)

http://en.wikipedia.org/wiki/Pukka_sahib

I meant it as "real" or "proper" standoff for example.


Wayne...

43
Show"N"Tell ( Your Machines) / Re: Yet another Retrofit. Hardinge HXL-S
« on: September 16, 2008, 08:47:15 PM »
Not plastic.  The SS is stood off 5mm on pukka standoffs.  Then 25mm standoffs to separate the 2nd plate.

One of the mounting holes on the SS can be set to GND, and this I have done.

Wayne....

44
Show"N"Tell ( Your Machines) / Re: Yet another Retrofit. Hardinge HXL-S
« on: September 16, 2008, 06:18:12 PM »
Here's a pic of the Smoothstepper and diycnc.co.uk breakout board mounted in a DIN rail adapter.

Wayne....



45
Show"N"Tell ( Your Machines) / Re: Yet another Retrofit. Hardinge HXL-S
« on: September 12, 2008, 02:44:28 PM »
The Cubloc has Modbus.

So I just use the standard Modbus support in Mach.

Yes £100 is pretty good considering what you get.   There are smaller CUSB devices, and also the CB405 boards which give even more IO.

example

http://www.audon.co.uk/cb405.html#expansion

For the 405 Baseboard.  Processor not included unlike the CUSB devices.

Wayne....

46
Show"N"Tell ( Your Machines) / Re: Yet another Retrofit. Hardinge HXL-S
« on: September 12, 2008, 01:38:41 PM »
Hood.

The Study board is.   The CUSB36R is 24v able via the onboard opto's.   

http://cubloc.com/product/03_02cusb36r.php

you can also get it in the UK for £100...


Wayne...

47
General Mach Discussion / Re: Open door as pause
« on: September 12, 2008, 01:15:32 PM »
Or less severe than physical injury, just designing yourself into a corner.   Done it myself many times!   Makes you think more about possible scenarios in subsequent projects ;)

Myown lathe is almost constantly on my mind at the moment,  Maybe I'll start dreaming solutions soon haha....

Wayne...

48
Show"N"Tell ( Your Machines) / Re: Yet another Retrofit. Hardinge HXL-S
« on: September 12, 2008, 11:44:40 AM »
More stuff here.   This time the Diagnostic/In progress version on my Cubloc code.

I'll update this as I make significant alterations to it.   But might come in handy to anyone starting out or struggling with the Cubloc PLC's.

Mostly in Cubloc basic.   Some ladder will be added later.

Also a pic of the cubloc study board just about fully loaded with every switch and Led used up to test the logic on the desk.   Everything has been connected to match the IO assignments on the CUSB36R PLC.

The code below has been updated here a fair bit.   BUT BE AWARE is has a lot of diagnostic code included.  e.g the Pendant stuff which enabled me to test the toolchange routine when not connected to Mach.  I ran out of inputs and had to use the Estop input for the 4th button!   This obviously is not staying like that as I have no use for the pendant on the real machine.

Wayne....



'Hardinge HXL-S PLC code for CUSB36R

Const Device = CB280
Set Display 2,0,1,50
Opencom 1,115200,3,80,80
Set Modbus 1,1,20

Cls
Wait 1500

Locate 3,0
Print "HARDINGE HXL-S"
Locate 1,1
Print "FDOS Design   2008"
Locate 0,3
Print "PLC Firmware   V0.08"
Csroff

Wait 1500
Cls
Csroff

Dim cl As String               'Clear Line
Dim spin As String            'Spindle Status (CW, CCW, OFF)            
Dim sro As Integer            'Spindle Override Pot (% FSD)
Dim fro As Integer            'Fedrate Override Pot (% FSD)

Dim station As Integer         'Decoded Turret Station #
Dim estop As Integer            'EStop Chain Status
Dim status_page As Integer      'Current Page (LCD Display)

Dim req_tool As Integer         'Requested Tool
Dim turret_encoder As Integer   'Encoder value (all 4 bits)
Dim pendant As Integer
Dim settle_time As Long


'*******************************************
'*              RELAY OUPUTS               *
'*******************************************

Usepin 4,Out,coolant          'Coolant
Usepin 5,Out,spindle_cw         'Spindle CW   
Usepin 6,Out,spindle_ccw      'Spindle CCW
Usepin 7,Out,spindle_lock       'Spindle Lock Disengage

Usepin 16,Out,collet_open      'collet open
Usepin 17,Out,collet_close      'collet close

Usepin 22,Out,tstock_fwd      'tailstock forward
Usepin 23,Out,tstock_ret      'tailstock retract

Usepin 40,Out,cush_ret         'air cushion retract
Usepin 41,Out,cush_eng         'air cushion engage
Usepin 42,Out,index            'Turret Up and Index

Usepin 43,Out,lube_pump         'Lube Pump

Usepin 44,Out,sys_enable      'System Enable

'*******************************************
'*             ANALOGUE INPUTS             *
'*******************************************

Input 24                      'Feedrate Override
Input 25                      'Spindle Override

'*******************************************
'*               'OPTO Inputs              *
'*******************************************

Usepin 10,In,turret_down      'turret down
Usepin 11,In,index_complete   'index complete
Usepin 12,In,spindle_locked   'spindle locked
Usepin 13,In,tstock_inuse      'tailstock in Use

Usepin 28,In,tur_enc1         'turret station 1
Usepin 29,In,tur_enc2         'turret station 2
Usepin 30,In,tur_enc3         'turret station 3
Usepin 31,In,tur_enc4         'turret station 4

Usepin 32,In,low_coolant      'low coolant switch
Usepin 33,In,low_collet         'low collet pressure
Usepin 34,In,low_air            'low air pressure

Usepin 35,In,emg_stop         'EMERGENCY STOP!

Usepin 36,In                  'Page Select

Usepin 37,In,pendant1         'spare
Usepin 38,In,pendant2         'spare
Usepin 39,In,pendant3         'spare

'*******************************************
'*             startup defaults            *
'*******************************************

cl = "                    "   '20 Spaces (clear line)
status_page = 0
settle_time = 250               'Air valve settle time in milliseconds

Set Ladder On
Wait 10                        'Allow time for ladder to start


'*******************************************
'*            Bootup Operations            *
'*******************************************

Do While low_air = 0            'check low air switch is closed before proceeding
   sys_enable = 0               'Open PLC estop relay
   Gosub error_title
   Gosub low_air_error
   Wait 1000
   Locate 0,0
      Print cl                  'Flash ERROR! msg 1 sec interval
   Wait 1000   
Loop

Cls
Csroff

Locate 2,0
   Print "Reseting Startup"
Locate 6,2
   Print "Defaults"

coolant = 0                     'coolant off
spindle_cw = 0                  'spindle cw off
spindle_ccw = 0               'spindle ccw off

Do While spindle_locked = 0   'read spindle locked switch
   spindle_lock = 1            'disengage spindle lock
Loop   

Wait settle_time
spindle_lock = 0   

cush_ret = 1                  'retract air cushion
Wait settle_time
cush_ret = 0

cush_eng = 1                  'engage air cushion
Wait settle_time
cush_eng = 0

Wait 1000

start:

'*******************************************
'*                 Main Loop               *
'*******************************************

Do

   
   Gosub scan_page
   
   _d(13) = station             'load current station # into d13
   req_tool = _D(12)          'read data register 12 for requested tool

   Gosub scan_pendant

   If req_tool > 0 Then
      Gosub index_turret
   End If

   _D(10) = Adin(0)             'Read ADC0 Feedrate overide load into D10
   fro = _D(10)/10.21
 
   _D(11) = Adin(1)            'Read ADC0 Spindle overide load into D11
   sro = _D(11)/10.21
   estop = In(35)

   Csroff                     'Cursor Off
 
Loop


'*******************************************
'*              Sub  Routines              *
'*******************************************

page0:

   Gosub decode_turret
   
   Locate 0,0
   Print "P", Dec status_page," (Turret Status)  "
   Locate 0,1
   Print "Enc 1-2-3-4 Req = ",Dec req_tool," "
   Locate 0,2
   Print "Act ",Dec tur_enc1,"-",Dec tur_enc2,"-",Dec tur_enc3,"-",Dec tur_enc4
   Locate 11,2

   If station = 0 Then
      Print " : Error!"
   Else
      Print " Stn = ",Dec station," "   
   End If

   Locate 0,3
   Print "Idx Cmp ",Dec In(11),"  Tur Dwn ",Dec In(10)

Return

page1:

   Locate 0,0
   Print "P",Dec status_page," (Warning Inputs)"
   Locate 0,1
   Print "ESTOP ",Dec In(35),"    Low Air ", Dec In(34)
   Locate 0,2
   Print "Low Collet Press ",Dec In(33)," "
   Locate 0,3

Print "Low Coolant ",Dec In(32),"       "

Return

page2:

   Locate 0,0
   Print "P",Dec status_page," (Analogue Inputs)"
   Locate 0,1
   Print "FRO ",Dp(fro,3),"%","    SRO ",Dp(sro,3),"%"
   Locate 0,2
   Print cl
   Locate 0,3
   Print cl

Return

page3:
   Gosub scan_pendant
   Locate 0,0
      Print "P",Dec status_page," (Blank)          "
   Locate 0,1
      Print "spindle locked ",Dec spindle_locked,"    "
   Locate 0,2
      Print "turret down ",Dec turret_down
   Locate 0,3
      Print "Index Complete ",Dec index_complete

Return



error_title:

   Locate 7,0
      Print "ERROR!"
Return

low_air_error:

   Locate 2,2
      Print "LOW AIR PRESSURE"
   Locate 2,3
      Print "SYSTEM INHIBITED"

Return

 
scan_page:

   If Keyinh(36,250)  Then
      status_page = status_page + 1
   Endif
   
   If status_page >3 Then
      status_page = 0
   Endif
   
   Select Case status_page
      Case 0
         Gosub page0
      Case 1
         Gosub page1
      Case 2
         Gosub page2
      Case 3
         Gosub page3
   End Select
   
Return

scan_pendant:                  'Temporary routine for testing toolchange via pendant            

pendant = (pendant1 * 8) + (pendant2 * 4) + (pendant3 * 2) + emg_stop   'Convert to Pseudo Binary

Select Case pendant
   Case &b1000
      req_tool = 1
   Case &b0100
      req_tool = 2
   Case &b0010
      req_tool = 3
   Case &b0001
      req_tool = 4
   Case Else
      req_tool = 0
End Select

Return


index_turret:

   If req_tool >4 Then
      Return
   Endif
   


   Cls
   Wait 50

   Locate 0,0
      Print "Toolchange Requested"

   Do

      If station = req_tool Then
         Exit Do
      Endif   
   
      Locate 0,1
         Print "Requested Station= ",Dec req_tool
      Locate 0,2
         Print "  Current Station= ",Dec station
         Locate 0,3
            Print "Idx Comp ",Dec index_complete," Tur Dwn ",Dec turret_down
      Csroff
   
      Do Until index_complete = 1
         index = 1
         Locate 0,3
            Print "Idx Comp ",Dec index_complete," Tur Dwn ",Dec turret_down
         Csroff
      Loop
   
      Do Until turret_down = 1
         index = 0
         Locate 0,3
            Print "Idx Comp ",Dec index_complete," Tur Dwn ",Dec turret_down
         Csroff
      Loop

      Gosub decode_turret
   
      If station = 0 Then
         Goto turret_failure
      Endif
   
Loop

Return


decode_turret:

   turret_encoder = (tur_enc1 * 8) + (tur_enc2 * 4) + (tur_enc3 * 2) + tur_enc4   'Convert to Pseudo Binary

   Select Case turret_encoder
      Case &b0111
         station = 1
      Case &b1011
         station = 2
      Case &b1101
         station = 3
      Case &b1110
         station = 4
      Case Else
         station = 0
   End Select

Return

turret_failure:

   Cls
   Gosub error_title
   Locate 1,2
      Print "Toolchange Failure"
   Csroff
   sys_enable = 0                        'Generate Estop

   Wait 5000

   Goto start                           'Temporary restart


Function status(raw As Byte)As String

   If raw = 1 Then
      status = "ON "
   Else
      status = "OFF"
   Endif

End Function





49
General Mach Discussion / Re: Open door as pause
« on: September 12, 2008, 10:23:43 AM »
All the better reason to think and RETHINK this stuff out before you commit to ANY wiring ;)

Wayne.....



50
General Mach Discussion / Re: Open door as pause
« on: September 11, 2008, 03:40:49 PM »
You could easily create an interlock to do what you want, using just a relay with it's contacts in series with the spindle start output in Mach   Coil to be operated by the door switch.

Same relay with enough poles could put mach into Feedhold.

Probably better to do that than rely on software alone.


Wayne....

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 33 »