PDA

View Full Version : Denford Mirac conversion help



Hellfire
20-10-2016, 09:23 PM
Just recently bought a Mirac with tool changer etc.
going to convert it to a more friendly interface.
any recommendations as to which motion control to use.
mach3, mach4, uncc etc or something else.
i have a decent budget for the conversion and think the lathe deserves to be the best it can be.
smooth steppers and bob recommendations would also be awesome.
cheers guys

m_c
20-10-2016, 11:13 PM
Support for turn is quite limited from most motion controllers, as it is a fairly small part of the market, so you really need to check on specifics for anything you're considering.
.
Mach 3 turn works ok, but has a couple issues. CSS doesn't work correctly. Threading depends on what motion controller you use.
Mach 4 turn is gradually getting there, but there seems to be far more people posting with problems, rather than people running it successfully.
Suitable motion controllers would be CS-labs, Warp9 Smoothstepper, PoKeys something or other (can't remember the name of their motion controller!). Other options for Mach 3 are a Dynomotion KFlop, or UCNC, although I'm not sure how well UCNC supports turn, so you'd need to research that. As well as working with Mach 3, both UCNC and Dynomotion have their own control software (I use Dynomotion's KMotionCNC on my lathe, and although being a pretty basic interface, it just does the job without any issues, which is far more than can be said for Mach 3 :-/ )
.
LinuxCNC is another option, which would most likely need some MESA boards.
.
There are a few other options, but I can't think of them just now (PlanetCNC?).
The big questions are, how much are you willing to spend, and how good are you at configuring/programming?
You also need to decide on things like, servos or steppers, do you want to run higher voltage (12-24V) controls to help avoid interference problems, how much in/out do you need,
All those will have a bearing on what will be the better options for you.

Hellfire
20-10-2016, 11:59 PM
Thanks for taking the time to reply, I would love to do servos with a closed loop if possible. But I am not sure if it is feasible or necessary. Time is my enemy, I spend 7 days a week working which only leaves a few nights for this.
there doesn't seem to be to many places in the uk to purchase the hardware I need.
what I do know, the turret is probably going to give me some grief setting up and the encoder on the spindle is going to be another pain.
The pdmx boards seem a good option as they can plug into each other with ribbon cables etc, but USA supplier. I guess there is no recommended setup, I guess I just want a no nonsense setup.

John S
21-10-2016, 11:55 AM
Are the present moment only Kflop, and pokeys can thread inside Mach and for Pokeys it's mach4. Both are a work in progress, a long work IMHO.
Planet CNC can thread but it would be hard to do turret.

Possibly you best bet is Linux CNC but you will need a LOT of help.

m_c
21-10-2016, 05:33 PM
I've just had a look at the Mirac lathe specs and realised potentially what turret it comes with.
If it is a Barafuldi TOE80, then you will not be able to control the turret directly via a Mach 3 macro, Mach 4 might just about manage the timing, but I wouldn't be 100% sure about that, as the timing requirements for the turret require fast responses to inputs/outputs.
Something like a KFlop could, as you can programme the KFlop directly to handle the toolchange, and Mach3 would simply command the KFlop to carry out the tool change.
.
The other option is to use a PLC to handle the tool change (I used a Click PLC, and you're welcome to the code if you choose that option).
.
One thing I should mention, is that even although KMotionCNC does everything I need it to in terms of running my lathe, I do miss the wizards in Mach 3. However, if you have a Mach3 license, most of the code will work, it's just canned cycles where things generally won't.
.
Personally, given the Mirac will most likely use 12 or 24V control circuitry already, I'd be looking at something from CS-Labs, or a KFlop+Konnect(IO board)(+Kanalog if you want to run analogue servos with the KFlop closing the loop).
Smoothstepper/Pokeys only work on 5V.
I can't comment on PlanetCNC, but there are suitable MESA boards available for LinuxCNC, but as John says, help can be very hit or miss.

Mad Professor
21-10-2016, 06:14 PM
Hellfire: I also own a Denford Mirac, but mine does not have the ATC. :blue:

Does your Mirac use the newer control board or the older LCB3?
Mine uses the LCB3, and I am using a Ethernet Smoothstepper in combination with the LCB3.

Best Regards.

Hellfire
21-10-2016, 08:59 PM
Thanks guys, I think it is a Barafuldi TOE80 turret.
Regarding the turret, would it be possible to use the positional switch inside for indexing

John S
21-10-2016, 11:43 PM
Smooth stepper can't thread yet either, It was promised 4 years ago mind you .........................

m_c
22-10-2016, 12:17 AM
If you go to the Denford forums (www.denfordata.com/bb (http://www.denfordata.com/bb)), you can download the TOE80 manual in the Mirac section (it's also in the Cyclone section).
It gives all the details for inputs/outputs and the required timings.
.
John, the Smoothstepper can do threading using a single slot sensor as I used it on my old Conect lathe.
It's encoder threading that still hadn't been implemented the last I checked. I suspect the real reason for the lack of progress is the physical hardware doesn't have the capacity to implement it. I know the last discussion I seen about it, Greg was talking about optimising/freeing up resources, so I think it's another case of underestimating the hardware requirements, aka Gecko GREX and various others.

Hellfire
22-10-2016, 04:57 PM
Hellfire: I also own a Denford Mirac, but mine does not have the ATC. :blue:

Does your Mirac use the newer control board or the older LCB3?
Mine uses the LCB3, and I am using a Ethernet Smoothstepper in combination with the LCB3.

Best Regards.
d411 issue 3 on the control frame, mint 3.28 on the chip

Hellfire
23-10-2016, 05:10 PM
Came across these, are they worth having.
https://www.cnc4you.co.uk/Stepper-Motor-Plus/Stepper-Servo-Motor/Stepper-Servo-Motor-8Nm-Nema-34

m_c
25-10-2016, 01:07 AM
Closed loop steppers are one possible option, and are a pretty good compromise between the existing standard (open loop) stepper motors, and a proper servo system.

Hellfire
04-11-2016, 09:49 PM
Thanks for the help, got the servos and drivers. Went for uc300 and 3 bobs.
bm01
cp0-12v
kk01

needed additional inputs for the rotary switch on the back of the turret.
one question though, why do bobs only come with one relay. I need to be able to reverse the spindle, is it possible to use the relay on one bob for fwd and the relay on the other bob for rev.
cheers

m_c
05-11-2016, 12:28 AM
Yes.
However the exact implementation will depend on how the spindle forward/reverse is controlled.

Hellfire
05-11-2016, 10:10 AM
Scrub that, forgot I had two vfd's to control. One for the turret and one for the spindle. Both need to reverse. This is going to be fun

Hellfire
07-11-2016, 07:19 PM
i have come to the difficult bit now, i am looking some help with a macro for a tool change. on the rear of the tool changer there is a rotary switch with 8 positions and another micro switch to tell the machine it has locked.
i have all the inputs reading on the motion controller.
when the motor goes fwd it pushes the tool plate out and then starts to rotate it, on reverse it draws the plate back in until the micro switch sees it.
should add i have no clue about macros.
cheers

m_c
07-11-2016, 11:55 PM
What turret is fitted?
And are you using Mach3 or UCNC?
.
If it's a Barfuldi TOE and Mach3, unless the UCNC controller has embedded macros/programs, it won't work. Mach3 macros only have a 10Hz update rate, and 1-200ms is far too slow to manage the turret locking sequence, which requires a maximum of a 30ms delay between detecting the strobe bit and activating the locking pin, and only 50ms to reverse the motor direction.

Hellfire
08-11-2016, 09:56 AM
I am using mach3 through a uc300.
the turret doesn't have a locking pin, it meshs into a castle like gear. I can't seem to upload pics for some reason. The motor is controlled by an vfd, which I assume you can control the speed of.
the rotary switch is adjustable on the back to the turret

m_c
08-11-2016, 10:34 AM
Sounds like you've got one of Denford's own DM turrets.
Is it like the diagram in this thread? - http://denfordata.com/bb/viewtopic.php?f=40&t=157
.
Having had a quick look at the wiring diagram and the description in that thread, it seems to be a case of rotate turret clockwise until position matches, then immediately reverse the turret, at which point it should lock.
Depending on how fast the turret spins, you may have a problem, as with the 10Hz macro refresh rate, you have a 100-200ms reaction delay depending on timings. However I can't find any info on the timings required, so it'll have to be a case of try it and see.
.
I've not done any Mach3 macro programming for a long time, so I'm hoping somebody will convert the following to the required Mach3 code-


While (TurretPosition <> CommandedPosition)
ActivateTurretCW
EndWhile
DeActivateTurretCW
(a slight time delay may be needed here?)
ActivateTurretCCW
While (TurretNotLocked)
(Do Nothing)
EndWhile
DeActivateTurretCCW


You'll also want to add safety time outs at various places, as if the turret fails to lock, you don't want it to sit spinning endlessly, until you manually stop it running.
One option you do have, due to the turret using a VFD, is you could slow down the rotation to give Mach more time to respond.

Hellfire
08-11-2016, 11:09 AM
yes thats the turret, thanks for that.
can i make use of the rotary switch on the turret, each contact = a tool. there is also a separate micro switch to tell its locked

m_c
09-11-2016, 01:21 AM
Yes, you could use each contact for individual tools, however if you have the diode block as shown in the Mirac 1996 wiring diagrams, it would half the number of required inputs.
.
The locked switch is also needed to check the tool change has been successful, but it should also be continually monitored to ensure the turret hasn't become unlocked when it shouldn't. In Mach3, you'd normally do that as part of the Macro Pump, but worry about getting the turret working first.

Hellfire
09-11-2016, 09:36 AM
Assuming I was to get a plc to run the turret, what would I need.
How are the input and output signals between the bob and plc achieved. I would still need a macro for mach3 wouldn't I ?
then a programme for the plc.
Think I will go sit in the corner now and rock back and forth for a while

m_c
10-11-2016, 12:11 PM
Something with enough inputs and outputs!
I used the small Click PLC range from Automation Direct for my turret, but had to buy an additional Input/output module to get enough inputs. They also do a slightly more featured range (DL series?) that might have more inputs/outputs on the base modules.
.
Good thing about the Click range though, is the programming software is free and has no limits. The DL software has a limit on program size, above which you have to buy a license.
.
As for communicating between the PLC and controller, the less complicated option is via Modbus, but that can sometimes be problematic to setup. In my lathe, I use Modbus to transfer the desired position to the PLC, and continually read the actual position back. I then have an output from the KFlop to the PLC telling the PLC if it's ok to change position, and an output from the PLC back to the KFlop telling the KFlop that the tool changer is locked, and on the correct position. The KFlop then monitors that input, and if it deactivates when a change hasn't been requested, it triggers an E-stop.

Hellfire
11-11-2016, 12:01 AM
Thanks again for your help, I think I will try it on a macro first. Deserves a try don't you think. Failing that a plc.
spent the last 4 or 5 nights trying to get my head round the macros, safe to say my head is fried.
cheers

Hellfire
11-11-2016, 08:21 PM
this is what i ended up with, but it has no safety steps in it. any idea how i can add some
If GetSelectedTool()=GetCurrentTool() Then
End If


If GetSelectedTool =1 Then
ActivateSignal(Output5)
While Not IsActive(oemtrig1)
Wend
DeactivateSignal(Output5)
ActivateSignal(Output6)
While Not IsActive(oemtrig11)
Wend
Sleep 1000
DeactivateSignal(Output6)
End If







If GetSelectedTool =2 Then
ActivateSignal(Output5)
While Not IsActive(oemtrig2)
Wend
DeactivateSignal(Output5)
ActivateSignal(Output6)
While Not IsActive(oemtrig11)
Wend
Sleep 1000
DeactivateSignal(Output6)
End If






If GetSelectedTool =3 Then
ActivateSignal(Output5)
While Not IsActive(oemtrig3)
Wend
DeactivateSignal(Output5)
ActivateSignal(Output6)
While Not IsActive(oemtrig11)
Wend
Sleep 1000
DeactivateSignal(Output6)
End If




If GetSelectedTool =4 Then
ActivateSignal(Output5)
While Not IsActive(oemtrig4)
Wend
DeactivateSignal(Output5)
ActivateSignal(Output6)
While Not IsActive(oemtrig11)
Wend
Sleep 1000
DeactivateSignal(Output6)
End If




If GetSelectedTool =5 Then
ActivateSignal(Output5)
While Not IsActive(oemtrig5)
Wend
DeactivateSignal(Output5)
ActivateSignal(Output6)
While Not IsActive(oemtrig11)
Wend
Sleep 1000
DeactivateSignal(Output6)
End If




If GetSelectedTool =6 Then
ActivateSignal(Output5)
While Not IsActive(oemtrig6)
Wend
DeactivateSignal(Output5)
ActivateSignal(Output6)
While Not IsActive(oemtrig11)
Wend
Sleep 1000
DeactivateSignal(Output6)
End If




If GetSelectedTool =7 Then
ActivateSignal(Output5)
While Not IsActive(oemtrig7)
Wend
DeactivateSignal(Output5)
ActivateSignal(Output6)
While Not IsActive(oemtrig11)
Wend
Sleep 1000
DeactivateSignal(Output6)
End If




If GetSelectedTool =8 Then
ActivateSignal(Output5)
While Not IsActive(oemtrig8)
Wend
DeactivateSignal(Output5)
ActivateSignal(Output6)
While Not IsActive(oemtrig11)
Wend
Sleep 1000
DeactivateSignal(Output6)
End If
End

m_c
13-11-2016, 01:13 AM
Basically each time you activate a signal, you need to also set a timer, so if the required input signal doesn't happen within the timer, things fault out (use a DoOemButton(xxxx) where xxxx is the code for E-stop), however I've totally forgotten how you do that in Mach3 Macros :-/
.
A quick search on the Mach forum has thrown up this thread - http://www.machsupport.com/forum/index.php/topic,13181.msg86334.html#msg86334
Look at the "timeout" variable and how it is updated/monitored.
That macro also has the required OEM button numbers.
.
You should also add a check before the end of the macro which checks that the correct tool position has been achieved.

Hellfire
15-11-2016, 02:01 PM
the tool change isn't updating the current tool on mach3 screen, it operates the tool changer ok. what am i doing wrong