Hello Guest it is April 18, 2024, 08:18:59 PM

Author Topic: Accurate homing  (Read 26497 times)

0 Members and 1 Guest are viewing this topic.

Offline Hood

*
  •  25,835 25,835
  • Carnoustie, Scotland
    • View Profile
Re: Accurate homing
« Reply #40 on: May 17, 2010, 01:50:55 PM »
I do Index homing in my drives, they are Allen Bradley but I suspect they will work the same way as your Teco drives. I will explain how mine work, I send a signal to the drives to start homing and off they go seeking the home switch, the switch is seen and the motors instantly reverse and seek out the Index pulse, once that is seen then the drives will move a user preset distance and then stop and that is the axis homed. The drive now sends out a signal saying it has homed and Mach sets that as home position. In fact there are quite a few different ways my drives can be configured for homing but that is how I have mine configured.
 To do this in Mach I have just altered the VB in the Ref All button, I use ModBUS via my PLC to activate the output and read the input but you could use normal I/O from a parallel port, problem however with that is your drives I/O may be like mine and 24V so you would also have to convert that to the 5v of the parallel port.
 The VB I have in my Ref All button is very simple and is as follows. (below is for my lathe, my mill is similar but I have the Y axis also)

DoOemButton (240)                     'De-Reference All axis
 Sleep(10)
 If GetOemLED (809) Then               'Check that Ref Z LED is RED
  Do
   Call SetModOutput (21,1)             'Activate ModOutPut 20
    If GetInput(19) Then Exit Do       'Loop until ModInPut 18 is seen
    Sleep (10)
    Loop
    End If
    Call SetModOutPut (21,0)            'DeActivate ModOutPut 20
    DoOemButton (1024)                    'Set Z axis Home

   
 If GetOemLED (807) Then
  Do
   Call SetModOutPut (20,1)
    If GetInput(18) Then Exit Do
    Sleep (10)
    Loop
    End If
    Call SetModOutPut (20,0)
    DoOemButton (1022) 

Hood

Offline Hood

*
  •  25,835 25,835
  • Carnoustie, Scotland
    • View Profile
Re: Accurate homing
« Reply #41 on: May 17, 2010, 01:54:38 PM »
Oh meant to say you do NOT set up any home switches in Mach when you are doing this external homing, as far as Mach is concerned it knows nothing about it.
Hood
Re: Accurate homing
« Reply #42 on: May 17, 2010, 04:56:20 PM »
Thank you very much for the information. It all sounds very logical and I am sure it will work.  I am installing a Machmotion control with Teco drives on to an old Emco 340 lathe which is in perfect mechanical condition. I am setting up a bench for simulation first. I have the following challenges ahead:

Homing with index pulse
Management of backlash (wonder if Mach3 manages this, have not read all the documentation yet)
Programming for control of the original Sauter turret (it comes with an A.C. motor inside).
Controlling a hydraulic unit which controls the chuck, parts catcher and tailstock.

Looks like  PLC programming will be lots of fun !!!!

Offline Hood

*
  •  25,835 25,835
  • Carnoustie, Scotland
    • View Profile
Re: Accurate homing
« Reply #43 on: May 17, 2010, 05:02:18 PM »
Not sure how the MachMotion stuff works but if it doesnt have a PLC already and you dont already have a PLC then look at the DL06 from Automation Direct. Thats what I use and if you need help I can probably do so, though I am not an expert, I can usually muddle through :)
Hood
Re: Accurate homing
« Reply #44 on: June 25, 2010, 06:34:23 PM »
Hello,
I have a Milll equipped with 3 servo equipped with 3 rotary encoder
We also have 3 DRO linear encoder 5micron
The index of the Dro linear encoder is on the middle
Due to the short time available to see the index I have made a little electronic using a flipflop and opto so when the pulse appear(even at full speed) it stay on. Mach then get enough time to see it stop go reverse very low speed and when he reach the index again stop.
The problem :
I use a bob where the limit switch and the home switch are linked . So if i send a home signal it's equivalent to a limit.
I have put a relay that inhibit the entry of the opto so even if the home signal is deliver the flipflop will not see it

I must write a macro  for homing:
I activate an output that will select a relay and energized my opto
 Since i do not know where i am :go left if i reach home stop reverse slow if i reach soft limit i go reverse until i find my home 

But i do not know how to write a macro in mach (list of instructions, environments variables, editor) since i used to program in C , i am not too affraid but i need to get the starting point

Offline Hood

*
  •  25,835 25,835
  • Carnoustie, Scotland
    • View Profile
Re: Accurate homing
« Reply #45 on: June 26, 2010, 11:56:57 AM »
Ray Livingstone wrote a draft manual for VB, you should find it here http://www.machsupport.com/forum/index.php/topic,12740.0.html

Hood

Offline stirling

*
  • *
  •  2,188 2,188
  • UK
    • View Profile
    • www.razordance.co.uk
Re: Accurate homing
« Reply #46 on: June 27, 2010, 07:13:54 AM »
Also take a look at the cypress VB manual in the wiki

i used to program in C
Then it's like you used to fly jet fighters and now you're about to learn how to flap your arms (but with one of them tied behind your back) - you'll be fine.

Cheers

Ian
« Last Edit: June 27, 2010, 07:20:50 AM by stirling »
Re: Accurate homing
« Reply #47 on: June 27, 2010, 08:29:08 PM »

Ray Livingstone wrote a draft manual for VB, you should find it here http://www.machsupport.com/forum/index.php/topic,12740.0.html

Hood

Thank you very much This is exactly what i am looking for .
About jet fighters, unfortunately(?) it's not the language that make the program ! and a precise idea of what you want to do + a good knowledge of what can be done may compensate a n heavy syntax also our computers are very fast now so i think we can handle it.
I also meet guy who where programming in c VERY inefficiently !
And since some manage to do it so i can do it too(hopefully)



Offline stirling

*
  • *
  •  2,188 2,188
  • UK
    • View Profile
    • www.razordance.co.uk
Re: Accurate homing
« Reply #48 on: June 28, 2010, 04:56:23 AM »
About jet fighters, unfortunately(?) it's not the language that make the program ! and a precise idea of what you want to do + a good knowledge of what can be done may compensate a n heavy syntax also our computers are very fast now so i think we can handle it.
I also meet guy who where programming in c VERY inefficiently !
And since some manage to do it so i can do it too(hopefully)
I stand corrected - sorry for my attempt at encouragement by way of a little joke...
Re: Accurate homing
« Reply #49 on: June 28, 2010, 08:49:45 PM »
I stand corrected - sorry for my attempt at encouragement by way of a little joke...

I did like the joke, but i have met so many young guys programming with high level language but making a good job feel complexed in front of old horses (like me) who have made assembly, c, lisp(yes) and i say to them go buy a little arduino and discover that 95% (at least) of your job is not requiring  low level so if and only if you have timing problems then dig it.
I am convinced that a good analyst programmer with whatever language can make a good job, and, in front of a real problem will be much more easily able than they think  to program in c Kerningham& ritchie will help  ;D