Forget my last post. After months of trying different things I finally seem to have it working flawlessly.
For anyone reading through all these posts, The problems I encountered were:
1) Couldn't communicate with the VFD. The
solution to this was making sure I bought a USB - RS485 converter that: Was based on the FTDI chip, and had "ADDC" or "Automatic Handshake Mode". This basically means the adapter takes care of whether it is sending or receiving data automatically - you dont have to tell it to, since neither of these plugins takes care of that.
2) Noise issues that would cause Mach to either E-Stop or Freeze. This was the big one that I battled with for months. Basically, I could start the spindle no problem and it wouldnt run for an indeterminate amount of time, but would randomly crash during a job. Watching the reported RPM DRO, the rpms would fluctuate up and down and sometimes even report completely strange numbers like "675834". The e-stops would happen because when the reported RPM dropped down near zero for an amount of time, the plugin is programmed to e-stop (which is normal, and meant to protect against a stall). However, since I was having noise, my "reported" rpm would sometimes go down near zero, even though it truly wasnt changing in reality, and thus the plugin would e-stop.
The
solution to this one will be different for everyone. My VFD is in my control cabinet so my noise issues will probably be among the worst, but i was stubborn to keep everything in one box and not change it. I first started by using a firewire cable as my communication line between the usb-rs485 converter and the VFD. Firewire cables are great because they have TONS of shielding in them. I also made sure to ground one end of the inner shielding to my RS485 adapter. Only ground one end - this will make a "Farraday Cage" and help to block out EMI. This helped, but it really seemed like the noise was coming THROUGH the cable (The VFD worked absolutely fine in manual mode and the computer experienced no noise).
Finally, after months of trying things, I started tracing grounds. Im a big grounding cynic as I have rarely found huge differences from different grounding procedures. I grounded the things I should have, but Ive always been quite cynical while doing it. Well..... My VFD (and im sure yours as well) has two places on it with grounding symbols. One on the terminal blocks by the 220 input terminals, and one in the lower left of the VFD. I had the ground from my power supply going to the grounding screw on the bottom left. I had the ground from the motor cable (which was also attached to the motor's ground and the motor's housing) going to the terminal block ground. I made the assumption, for months, that both the grounds would be connected in some fashion, I was wrong. I took a multimeter and checked for continuity between the two ground posts - nothing. So I temporarily jumped the two with a strand of wire and my noise issues basically disappeared.
So, in summary, dont be stubborn like me. Make sure everything is grounded properly. Trace all your grounds with a multimeter to make sure they are all connected. The following grounds should exist:
(Power source implies your 220 breaker panel or similiar within your control panel)
- Spindle motor wiring should have a ground attached to the motor housing
- Spindle motor feed wiring from the VFD should be attached to the motor's ground wire (and thus the motor housing)
- VFD should have a ground coming to it from the power source.
- Spindle motor feed wiring should be grounded on the VFD side to both the VFD and the power source. It may not be best practice, but you can share the same ground terminal
- PC should have its power supply ground attached to the power source ground.
- Motor drive power supply should have its ground attached to the power source ground
- USB-RS485 communication cable should have ONE end of its shield attached to the power source ground (the computer's ground located within the RS485 adapter's breakout terminals)
Also, its a great idea to throw snap on ferrite cores on all your power source and communication cables (limits, usb, etc.) See here for details on ferrite cores (
http://en.wikipedia.org/wiki/Ferrite_core). They can be bought in bulk on ebay for very very cheap.