PM-1440GT PLC\VFD Conversion? Stupid?

Hi @Beantown

I understand your desire to use technology, PLC, that you are familiar with. This is normal, but, it seems you are disregarding all the controls that the VFD has already built in so that a PLC can be added. The VFD is driven by some form of internal computer and is constantly sweeping the control inputs to make the desired changes. By the way, a PLC is not free, takes up extra space and power, as well as being something additional that can fail. If there were no VFD involved or you were trying to control multiple VFDs and motors I think I could see a reason to add this extra logic power. However, the lathe is a simple system. We only added the VFD to get to 3 phase, then because it had all of these extra functions we begin to add things like variable speed, electronic braking, proximity sensor, etc. By the way the transistors I used cost less than $0.10 each. Good capacitors cost more than small transistors. Relays are far more costly.

I am not familiar with the VFD you purchased, but I assume it has similar functions to the Hitachi. It would seem that to simply turn all of the signals off to the VFD is a bit like surrendering control of the system to what ever the VFD might happen to do. Also, there is a bit of concern as to what effects electrical noise might have on the VFD inputs when there are no signal being applied what so ever. You should definitely have some form of safety latch whether is is latch I designed, the relay system in the original equipment, or some other form that you come up with. Don't get lazy and think that nothing is ever going to go wrong. It WILL and you infinity want to be able to stop the machine easily and quickly. I have seen people get caught in machinery and it is not pretty and I can tell you people panic and do strange things in trying to stop a machine.

Shutting off all powere is one approach, but note that if you choose to have a proximity sensor, which is nice to have, you need to figure out how you would implement it and how to move the tooling away from it when it is putting out a "stop" signal.

You might want to remember that the inputs to the VFD in my design become active when a current is supplied into the control terminal. It is sensitive to current (it is not a voltage driven system). A couple of milli-amps into an input activates it. No current, or a current below the threshold, means the input is deactivated.

There are no solid state relays in my design, except for one used to turn the 220Vac off and on to the coolant pump. The one I used is way overkill and I used it simply because it is common and I had a couple of extras laying around. I did design a two bi-polar transistor latch (Q2 and Q3) into the design (we have been calling the safety latch). I use a few other bipolar transistors as interfaces between the mechanical switches of the lathe and the inputs to the VFD and to enable the effect of the safety latch. The VFD programing provides the logic and control. In the design there are a few diodes at places like the Jog line (labeled Jog-F and Jog -R) to prevent the Forward/Reverse signals from causing a Jog signal simultaneously. Likewise at the auto oil/coolant line diodes D1 and D2 provide a similar effect, but are simply providing a signal to Q6 via Q7 to turn on Q6 when the coolant switch is in the auto coolant position. I suppose you could say that Q4 and Q5 enable an AND function. So this is a very low level logic. If the safety latch is not active then neither Q4 nor Q5 can conduct and so the effectively AND the Latch condition with the signal coming from the mechanical switch. (Don't get confused by the colored LED-diodes. Other than the one at Q1 they are not needed. They are just there to light up and so inform the observer if there is current flowing in that path.)

By the way, the Hitachi VFD has an internal 24V dc supply to drive the control inputs. It's output current is limited (~100ma ?), but never specified in the documentation. I chose not to use it, but rather to use a small, cheap (~$15), external 1 Amp, 24Vdc supply. I did this primarily to ensure not to burn out the VFD's 24V supply. Features like digital displays and especially the proximity sensor require far more current/power than the VFD inputs. This supply is sufficient to also provide power to the lathe LED lamp (~0.5 Amp).

Dave L.

PS. I have a friend who is now implementing a PCB board to make putting my circuit together easier. He just sent off and got a board made and will be populating it and testing it in the future. Then he will probably redesign it to accommodation small changes like the connector arrangements. His plan is, once he is happy with it, to make it available to others. Amazingly it cost almost nothing to have the board made. He has a different lathe than the 1440 and he already has a relay style VFD conversion, but he is going to replace it with the solid state version primarily to conserve space.
 
I understand your desire to use technology, PLC, that you are familiar with. This is normal, but, it seems you are disregarding all the controls that the VFD has already built in so that a PLC can be added.
Yea, I think you nailed it. I totally understand I'm throwing $100s of dollars at a problem because it was be the easiest route for me. It will take me 100x longer to deciphering your schematic than it would to wire up the PLC and write the code for it. Totally a comfort thing. My limited experience is in microcontrollers and logic ICs. They really make it easy to grasp.

I also have this weird thing with schematics, which is probably just inexperience, but my eyes almost get crossed trying to follow a trace and since they often look nothing like the physical layout of a circuit they just confuse me until I can understand what is going on. Especially with ground and power connections. I really have to study schematics to make it click. I understand all the symbols and what not....just the path gets crossed in my head and I'm always expecting it to be more complicated than it is. If I can actually see the wires I can easily grasp what is going on, but the schematic alway complicates it for me. Once it does click I'm always shocked how simple it really is. I think it's because everything I have learned is self-taught and most of the time from taking stuff apart to see how it's made. I just do research to fill in the gaps.

I think the latching logic in your design was giving me the most confusion. I isolated it from the schematic so I could process what you are doing. It's a flip-flop circuit. I have honestly never used component level transistors like that before, but now it makes perfect sense. The only time I have gotten down to the transistor component level was for simple switching or amplification. What further confused me was on a different thread I asked if you used discrete logic\ICs for your control circuit. I believe you said something like "I don't know where you would need such a thing". Anytime I have used a flip-flop it was by using a logic IC (SN74HC157A). It will do the same thing you are doing in a single IC but the couldn't handle the current your transistor design will do. They are only $1, but still 10x the cost of a transistor.

You might want to remember that the inputs to the VFD in my design become active when a current is supplied into the control terminal. It is sensitive to current (it is not a voltage driven system). A couple of milli-amps into an input activates it. No current, or a current below the threshold, means the input is deactivated.
This is also different for me to grasp. My fiddling with microcontrollers has always been voltage driven. That makes sense in something like this.


PS. I have a friend who is now implementing a PCB board to make putting my circuit together easier. He just sent off and got a board made and will be populating it and testing it in the future. Then he will probably redesign it to accommodation small changes like the connector arrangements. His plan is, once he is happy with it, to make it available to others. Amazingly it cost almost nothing to have the board made. He has a different lathe than the 1440 and he already has a relay style VFD conversion, but he is going to replace it with the solid state version primarily to conserve space.
Oh man! I would grab one in a heartbeat, but I imagine they won't be ready by the time I need it. I guess it just depends. Keep me posted. I think my lathe is still about 2-3 months out.

Anyway, now that this has clicked in my head, I think I will just copy your design. There really isn't anything I would need the PLC for at this point. Thank you for sticking it out until it got through my thick skull! I still have a bit more reading on your documentation to fully understand, but the missing puzzle piece has been found now. :D
 
I'm going a bit of a weird route with a Programmable Logic Controller. I know it's overkill and unconventional, but it will be fun and it will be far easier to wrap my mind around software logic rather than the relay logic. I am switching from physical relay logic to software controlled logic, but PLC runs pretty much every manufacturing plant in the world. In theory it should be extremely reliable?
I'm glad I'm not the only one. I'm just now in the middle of wiring my PM 1340 GT with the Automation Direct P1AM (arduino based) PLC system. Using a combination 8 input, 7 output solid state relay to send the VFD logical inputs for forward, reverse, jog, 2 stage braking et. All switches lead into inputs on the PLC and then PLC logic to control outputs to VFD. AutomationDirect's Productivity 1000 series seems like a nice system you can easily add on extra I/Os, relays, expansions stuff.

I'm not doing this because it's "better" in anyway and I realize in many ways, it adds unnecessary complexity and possibly more potential for failure. However, it's a great learning tool for me, mainly just because. The lathe is a perfect platform, it's simple enough but also has enough complexity when I add things like proximity switch and with some logic, I can enable the jog function in one direction to back away from the sensor when activated... though, I may still add a required override button in that scenario.

Like others commented, my e-stop is two fold. Input into PLC so it knows it's activated and does it's thing, but also cuts power to any logical input to VFD. The bummer about my VFD, the common Hitachi WJ200, it does not have an e-stop function.

But, I was thinking with the PLC I could really customize things. Like having it control the worklight and coolant pump with various routines. I could push function button on an HMI screen and it would turn on the work light and set the coolant pump to activate with the spindle is running and silly stuff like that. I'm just overthinking it at this point.
PLC does have the advantage of adding features without re-wiring major components. Over think, over engineer, solve problems just created in my head... now that's what I'm good at, or at least have fun with :).

I've half thought about making the 2 stage braking dynamic. If my plc knows how fast I'm turning at, it could be smart to automatically turn on two stage braking. Though, I understand 2 stage isn't just about rpms, but also weight... and the PLC wouldn't know the mass of what I'm spinning.


Other thoughts...
As far as size goes, 4 components I'll be using of the AD Productivity 1000 series, is in total about 4" x 4" x 4" cube, so it's relatively small. Wiring does become a little simpler, basically home runs from switches to inputs on PLC. PLC knows you can't run in fwd and reverse at same time...error condition, or activate the JOG joy stick while turning... error condition.

As far as reliability and you now have another moving part, software. Very true... but I'm also relaying on software inside the VFD. I'm not under the illusion my code is better than theirs and frankly, theirs's will be tested far more than mine. At least, that's my rational for not being an absolutely dumb idea, rather said, very unsafe idea.
 
Last edited:
I programmed/installed PLC's since the Allen-Bradley 1774 series days. PLC-2, PLC-3, PLC-5, ControlLogix, Triconex etc. It's easy to write relay ladder logic but you should have been able to read/create elementary diagrams and logic diagrams before you were ever allowed to touch the keyboard. Having said all that, there is a time and place for PLC's. Sometimes KISS approach is all your really need. I'd suggest reading back thru Mark Jacob's @mksj postings on keeping original relays. Your getting a new machine and those contacts have not been used for high voltage and can be utilized for logic level inputs. You can have a nice functional lathe in less time with all the features you'll ever need. Once you have it up and running and your bored, then go back and pimp your lathe with colored lighting and big screen TV.

Precision Matthews even supplied a very similar document on VFD install, implying that the warranty still applied.
 
Last edited:
I programmed/installed PLC's since the Allen-Bradley 1774 series days. PLC-2, PLC-3, PLC-5, ControlLogix, Triconex etc. It's easy to write relay ladder logic but you should have been able to read/create elementary diagrams and logic diagrams before you were ever allowed to touch the keyboard. Having said all that, there is a time and place for PLC's. Sometimes KISS approach is all your really need. I'd suggest reading back thru Mark Jacob's @mksj postings on keeping original relays. Your getting a new machine and those contacts have not been used for high voltage and can be utilized for logic level inputs. You can have a nice functional lathe in less time with all the features you'll ever need. Once you have it up and running and your bored, then go back and pimp your lathe with colored lighting and big screen TV.
KISS, very true! I have relied on @mksj documents and several direct questions to him for wiring, etc and was planning on the basic install... but then got diverted down the PLC route and my fascination with linking software to mechanical things got the best of me. I'm a software engineer by day, so I'm comfortable in that world. Mark has been super helpful, much like this entire community. No doubt the PLC is a project on it's own and I do want to get using the lathe for a lathe, not an electronics project. I don't know any ladder logic, never seen it, other than to know it exists... my PLC will be arduino/c++ based... but ladder logic all boils down to machine code anyway. I'll post my install/setup when it's complete.
 
KISS, very true! I have relied on @mksj documents and several direct questions to him for wiring, etc and was planning on the basic install... but then got diverted down the PLC route and my fascination with linking software to mechanical things got the best of me. I'm a software engineer by day, so I'm comfortable in that world. Mark has been super helpful, much like this entire community. No doubt the PLC is a project on it's own and I do want to get using the lathe for a lathe, not an electronics project. I don't know any ladder logic, never seen it, other than to know it exists... my PLC will be arduino/c++ based... but ladder logic all boils down to machine code anyway. I'll post my install/setup when it's complete.
Ha! Must be an IT thing. I'm not a full stack developer by any means, but I was a Systems Engineer for 1.5 decades until I moved into management. Automation was the funnest part of the job, so overcomplicating a few switches and levers is right up my alley. Like they say...."if you are holding a hammer everything looks like a nail."

Once you have it up and running and your bored, then go back and pimp your lathe with colored lighting and big screen TV.
HAHAHA! That cracked me up. It's the story of my life. I have a pattern of buying something brand new....gutting it and rebuilding it. I think it's a sickness.
 
Yep, an IT (programmer) thing, or just my nature. It's easy to make things complicated, it's a lot of work to engineer simplicity that's durable, resilient, maintainable, etc... We use the term YAGNI... you ain't gonna need it.

The VFD, 3 phase, relays, contactors, a re-wire to some degree were all big scary things. I just didn't understand it. I switched to 3 phase motor... mainly just for the braking and slow start features, as well as tuning RPM if needed... I really wanted a plug it in when I got it home setup. Then after lots of reading, manuals, Mark's docs, many times (a bit slow on the up take for electronic components and wiring, how it all works) I realized, starting the motor in forward or reverse is nothing more, at least on the WJ200 vfd, connecting the P24 24VDC to one of the logical inputs. It dawned on me, you actually don't need ANY of the contactors, relays, control panel that came with my lathe if all you want is forward, reverse and e-stop. Wire the forward/reverse switches (limit switches on the PM1340 GT) directly to the VFD logic inputs to close those circuits from the 24VDC+ to logical input. Maybe that's not advisable for many reasons, but it would work.

Once I seemingly had a handle on the root/core simplicity of it... now I can go nuts with overkill, aka, PLC. Though, not totally if you want all the bells and whistles in a flexible way. Then many hours later into topics like sourcing vs sinking devices, NPN, PNP, how DC electricity works, pull up, pull down resistors, EMI, where and what you ground, the billion different wire types. It is a hobby, doesn't have to make total sense.
 
So you were the guys that only got to play with the PLC trainer, I get it. As was mentioned earlier, there is a very important interlock relay wired on the lathe as it comes from the factory. You would be wise to keep it or at the very least duplicate it. It will prevent one of those AWW-SHI@ moments. You don't have it and have a power-blip right in the middle of threading a very expensive part. You step away for a second to see what's up and power returns, you forgot to program a fault routine and your lathe forward/reverse handle is engaged and lathe continues threading on it's own until it crashes into the spindle.
 
So you were the guys that only got to play with the PLC trainer, I get it. As was mentioned earlier, there is a very important interlock relay wired on the lathe as it comes from the factory. You would be wise to keep it or at the very least duplicate it. It will prevent one of those AWW-SHI@ moments. You don't have it and have a power-blip right in the middle of threading a very expensive part. You step away for a second to see what's up and power returns, you forgot to program a fault routine and your lathe forward/reverse handle is engaged and lathe continues threading on it's own until it crashes into the spindle.
That is a concern and thought I have had as well. I appreciate any and all pushback on my ideas and implementation... cause otherwise, I might get hurt because of what I didn't know. Just because I have good intentions, doesn't make it safe. Fully realize, just to get something to work, is far from the "proper" way to make it work. For me, I have to break it all down so I can get it, not just told what wires to connect where with no fundamental understanding of why and what each component's purpose is.

I know on the WJ200 VFD, they have the USP that will aid in preventing that. This can be a jumper wire, always connected on the VFD, no reason not to use this feature. My PLC will also have similar logic. Programmed like a state machine... you can only enter certain states, like running it from known and valid states. For instance, during startup, you cannot go into run mode on startup. You can only go into run forward or reverse when it's past the start up state and sitting in an idle/neutral state.

Maybe in the end, if I deem it un safe, or unreliable after testing all these scenarios I'll back out to known and proven setup. In that process, I've learned a lot, even if it's knowing what the wrong way is. My safety and a reliable setup is top priority. I certainly, don't claim to be an expert in any of this.

WJ200 VFD, USP.
1698076790420.png
 
WJ200 VFD, USP.
1698076790420.png
Yep, my Yaskawa GA500 does the same thing. However, if you just panic stop and the power feed was engaged and you reenable I don't think this will save you? Will it? Unless you were planning to have the PLC logic kill power to the VFD? The Yaskawa basically has a deadman input, but it's still a digital input. I was planning to build an e-stop subroutine that won't return to the main program until the right conditions are met.

No matter what direction I go, I will probably build a physical latching circuit just because it's easy enough. However, the reality is, unless your safety circuit kills power to the VFD, we are trusting a microcontroller\software in the VFD for our safety. The digital inputs are not physical and OSHA doesn't allow e-stops to be software based. Nevertheless, the PLC does cause some redundancy if your use it as part of your e-stop and another point of failure. I get that.

I'm still not too sure which way I will go. I still have a few months until I even get my lathe, so I'm sure I will just loop through ALL of the options until my wife punches me in the e-stop for ignoring her while I obsess on this stuff. :D
 
Back
Top