Hello Guest it is June 26, 2019, 07:05:58 PM

Author Topic: Mentor2 Spindle Drive - Using 'Speed Achieved'  (Read 4201 times)

0 Members and 1 Guest are viewing this topic.

Mentor2 Spindle Drive - Using 'Speed Achieved'
« on: July 11, 2010, 07:40:19 AM »
I'm in the process of Mach-converting a Bridgeport Interact 1Mk2 which has a Mentor2 Spindle VFD.

The spindle motor has a tacho output which connects directly to the Mentor2.  It appears the way the Bridgeport used it was to send the Mentor a voltage (0 to 10v as usual) and when the Mentor achieved the requested speed, it closed a relay - allowing the CNC controller to move to the next line.

Since the Mentor's PID parameters are nicely tuned to the machine - it makes sense to use it in this mode.

Can Mach accept a 'speed achieved' input instead of a spindle tacho?

Alternatively, would I be better just fitting another tacho and connecting that to Mach as normal?

Si

Offline Hood

*
  •  25,847 25,847
  • Carnoustie, Scotland
    • View Profile
Re: Mentor2 Spindle Drive - Using 'Speed Achieved'
« Reply #1 on: July 11, 2010, 11:09:08 AM »
I am thinking it may be possible to use a M3/M4 macros to look at the signal and loop until its seen.

Hood
Re: Mentor2 Spindle Drive - Using 'Speed Achieved'
« Reply #2 on: July 11, 2010, 11:17:39 AM »
Thanks Hood - that was kind of the conclusion I was coming to.

How would it react if I wired it up as a limit switch / end-stop?  Presumably that would stop any of the axes moving until it had achieved the requested speed?

Si

Offline Hood

*
  •  25,847 25,847
  • Carnoustie, Scotland
    • View Profile
Re: Mentor2 Spindle Drive - Using 'Speed Achieved'
« Reply #3 on: July 11, 2010, 11:21:44 AM »
Not a good idea I dont think, would cause an E-Stop in Mach if you did that.
Having the M3/M4 macros loop until the signal is seen would stop any movement until the macro completes, so thats the way I would go.
Hood

Offline BR549

*
  •  6,873 6,873
    • View Profile
Re: Mentor2 Spindle Drive - Using 'Speed Achieved'
« Reply #4 on: July 11, 2010, 11:31:38 AM »
Justa thought, mach has a feature that prevents the Gcode from running if a safety input is active(door open)

I would  use a brain to

If spindle is active AND waittimer for 3secs and IF input from VFD is NOT active then apply  Mach safety to prevent the machine from running code.

That would stop the Gcode from running IF the M3/M4 was active AND after 3 secs the VFD does not give the OK signal to move

I would also map the function on out to a BIG yellow LED to show the state of the control for trouble shooting down the road.  It would be like the out of lube function we use to stop the machine function if the lube is LOW. Hard to remember without that LED flashing at ya

« Last Edit: July 11, 2010, 11:36:09 AM by BR549 »
Re: Mentor2 Spindle Drive - Using 'Speed Achieved'
« Reply #5 on: July 11, 2010, 12:29:50 PM »
Not a good idea I dont think, would cause an E-Stop in Mach if you did that.
Having the M3/M4 macros loop until the signal is seen would stop any movement until the macro completes, so thats the way I would go.
Hood

Maybe I meant home switches rather than limit?  It cannot eStop on these as you use them to reference the axes?  I wouldn't swear to this as I can't remember the last time I homed the axes on my Lathe (previous Mach conversion).

Although doing it in software is straightforward - If possible I'd like it to be hardware simply because, several years down the line when I have to rebuild the PC - or worse still, it's next owner does - I would like it to work with a fairly standard copy of Mach.  Then it will run with only the ports & pins set.

Si
« Last Edit: July 11, 2010, 12:31:28 PM by SimonRafferty »

Offline Hood

*
  •  25,847 25,847
  • Carnoustie, Scotland
    • View Profile
Re: Mentor2 Spindle Drive - Using 'Speed Achieved'
« Reply #6 on: July 11, 2010, 01:01:50 PM »
Your idea with home switch wouldnt work as far as I can see. A home switch is used for homing and that is all, it doesn't prevent the axis from moving if it is active and Mach only pays attention to it when you are doing a homing move, all other times its ignored..
You need to put the input into Mach and either have a brain look at it like Terry has said or have your M3/M4 macro do the looking, either of these will work.
No problems with swapping computers or users in the future as long as you keep a backup of the brain/macro for future use.
Hood
Re: Mentor2 Spindle Drive - Using 'Speed Achieved'
« Reply #7 on: July 11, 2010, 01:04:48 PM »
Fair enough - thanks for your help.

I'll just modify the macros and see how it goes.

Si

Offline BR549

*
  •  6,873 6,873
    • View Profile
Re: Mentor2 Spindle Drive - Using 'Speed Achieved'
« Reply #8 on: July 11, 2010, 03:14:59 PM »
Carefull in the Macro that you don't create an endless loop if the VFD does not trip the signal some wait for loops are hard to get out of(;-) you need an escape route if it happens.

The brains are 100 times faster and take up no real CPU time with wait for loops. VB can hogg resources if you are not carefull.

Just a thought, (;-)
Re: Mentor2 Spindle Drive - Using 'Speed Achieved'
« Reply #9 on: July 11, 2010, 04:13:32 PM »
I've only written a couple of macros for things like peck drilling on my lathe - in VB.  I'll watch out for resource hogging though.

I had figured on something like testing every couple of seconds to see if the speed has been reached.  If it has not after say 6 sec, then terminate the program.

Si