MechMate CNC Router Forum

MechMate CNC Router Forum (http://www.mechmate.com/forums/index.php)
-   50. Toolheads (http://www.mechmate.com/forums/forumdisplay.php?f=25)
-   -   Mach 3 VFD and Spindle Control (http://www.mechmate.com/forums/showthread.php?t=3411)

danilom Mon 20 June 2011 11:43

Mach 3 VFD and Spindle Control
 
Well after a long time trying to figure it out I finally got it !

Mach3 is now in control of my VFD and spindle. Start, stop and speed works great and only with help of this 3$ adapter from ebay

http://cnc.rs/mechmate/rs485.jpg

setting it up was easy once you understand the mach modbus serial and pin assignment.
In short its like this:
to enable control of my VFD I have to set parameter 6.43 (642) Control Word Enable to decimal 1. And there is a Control Word with 16 bits that represent various commands. Decimal 163 means Drive Enable, Run Forward and RUN now, 129 disables Run Forward and Run so it stops and brakes. just shutting down Enable does not brake but freewheels the spindle until it stops.

If someone needs I can take printscreens of the setup. All needed info I found in this thread on the cnczone
http://www.cnczone.com/forums/mach_m...2_drive-2.html

IN-WondeR Mon 20 June 2011 12:15

Cool, I have bought the same converter, just need to mount it and set it up, so now I can go ahead and get that out of the way. :D

MetalHead Mon 20 June 2011 13:36

Please post the print screen and also some pics of the hookup if you have them.

danilom Sat 25 June 2011 05:49

Here it is, I will be glad to answer any of the questions.

http://cnc.rs/mechmate/modbus_serial.png
http://cnc.rs/mechmate/spindle.png
http://cnc.rs/mechmate/vb.png
http://cnc.rs/mechmate/vb_m5.png
http://cnc.rs/mechmate/control_word.png
http://cnc.rs/mechmate/commander_sk_rs485.png

polfilm Tue 15 November 2011 17:37

Quote:
Originally Posted by danilom View Post
Here it is, I will be glad to answer any of the questions
danilom: thank you for posting the screenshots. this is a good start for my case.

I'm attempting to hook up HuanYang VFD to RS485. Is the parallel motor control board involved in controlling the spindle in any way? I got the spindle working with VFD by itself but obviously want to control it with Mach3.

I got a USB version of RS485 adapter so its powered from USB directly therefore it has only 4 pins out. TX+, TX-, RX+, RX- but it shows up as regular serial on com1.

I will be able to experiment with settings on screen shots and macros you provided and perhaps finding the modbus serial and pin assignments.

I understand you have a different VFD but could you post some example of wiring?

Has anyone done control of HuanYang VFD from Mach3? (Start, Stop, CW, CCW, Speed) Perhaps I have missed a thread? Any indication as to wiring, VFD setup and pin assignments would be of great relief.

Edit:
Also where did you come up with last two images? Control Word Constructor and EIA485/RJ45 connector (isn't that like a network plug) Or perhaps I'm just on a wrong path and your VFD has the EIA485/RJ45 connectors and that's why you can use the RS485 adapter and I'm out of luck because I won't be able to use that with the HuanYang VFD. Nothing to go by so just guessing.

danilom Tue 15 November 2011 17:39

There is a plugin for your VFD, look here
http://www.mechmate.com/forums/showt...light=HuanYang

polfilm Tue 15 November 2011 18:25

Quote:
Originally Posted by danilom View Post
There is a plugin for your VFD, look here
http://www.mechmate.com/forums/showt...light=HuanYang
Thank you for this. So much work has been done allready. I deleted my post above totally by accident where I asked [danilom] for some insight to HuanYang VFD. Thanks again for lightning fast reply.

Its 2am, looks like I'm not going to bed tonite...but its a good thing :) Controling the spindle through Mach3 is like the last step before I attempt my first cut. Mechmate has been exactly one year in the making.

MetalHead Tue 15 November 2011 19:55

I put your postback. Get some sleep !!!

PEU Wed 16 November 2011 10:47

Instead of RS485 I used the circuit included in this pdf: http://is.gd/fzuHjW and it works very well.

I removed the led in my build.

danilom Wed 16 November 2011 11:17

For me the modbus is better because you can start and stop the spindle and also reverse the direction, just using code in mach not some outputs on bob.
Its pretty easy to set up and cheap ($2)

Alan_c Wed 16 November 2011 12:06

Danilo, please give us details on how to implement modbus to control the spindle.

Kobus_Joubert Wed 16 November 2011 12:12

Alan, with the Mach3 BOB from GREG it is just as easy. The relay that switched your router on/off can trigger the VFD as well....you just need to program the VFD.

danilom Wed 16 November 2011 16:57

Everything is in the 1# and 4# post, just plug in the rs232-rs485 adapter in serial port connect its A and B (TX-,TX+) to the VFD, set the parameters, and edit the m3 m5 scripts.

polfilm Sat 19 November 2011 05:40

Massive confusion. Lucky you who did not purchase HuanYang VFD because with that it ended up being the most time consuming part of the whole MechMate project. [Obviously not MechMate problem as I chose myself to go with that somewhat nice looking, should-be-ok spindle+VFD and not much research] If I knew, like you do right now, I would have gladly paid 200-300 bucks more for a nicer VFD. Problems are as follows:

1. HuanYang VFD is NOT trully modbus compliat. [get the Mach3 plugin]
2. At least half of the units that leave the factory do not have the 485 interface chip on board. Supposedly its an option and you have to MAKE SURE it's on the invoice when you order. Yey, they saved 2 cents and I'm pulling my hair out.

Luckily, there are tons of us with such problem and the community always finds a way even if it means soldering our own 485 chip [$2 on ebay] onto the VFD where it should be.

I will keep you posted. My local store sent me USB-Serial controller instead of USB-RS485 with adapter. Another 2-3 days of nail-biting before I can go back to experiments.

It's still the most exctiting electro-mechanical project I have ever undertaken. "Never give up. Never surrender." :)

Guillermo Thu 05 April 2012 17:24

Hi all

In my wáter Jet proyect , I need to control whit MACH 3 the pump motor

speed (a 10 hp,7.5Kw motor) alternating between two different speeds to get

high and low pressures. (STOP , HIGH and LOW speeds)

I don’t know if it is because very few ones uses spindles and VFD but don’t

see in the forum a consensus about the best way to go whit the VFD and the MACH 3

control of it.

I need help with tips about VDF models, installation and configuration.

What are the comments about this HITACHI VFD. MODEL NO. X200-075LFU2

https://i-store.hitachi.us/ISDWebSto...m=X200-075LFU2

Thanks

Guillermo

danilom Fri 06 April 2012 01:48

modbus control is THE most direct and accurate way to command a VFD. it writes data and settings directly to his registers. its digital and accepts noise.
buy using analog 0-10v control input you use 2 pins on bob, one for 0-10v and one to start a vfd, if you need reverse then its 3 pins.

Guillermo Fri 06 April 2012 06:45

What about the VFD model.

Are there suggestion for USA market ????.

Thanks Danilo

Guillermo

KenC Fri 06 April 2012 09:34

Any VFD which offer modbus control.

Guillermo Fri 06 April 2012 09:57

Danilo and Kent

Thanks

Guillermo

danilom Fri 06 April 2012 10:17

Hitachi, Delta, Omron, yaskawa, Control Techniques, etc

Guillermo Fri 06 April 2012 10:23

Then I am going to make my research.

Thanks again Danilo.

Guillermo

Surfcnc Sat 11 January 2014 00:57

I was hoping a few of the fine details of this great post might be made a little clearer for me.

Is there any speed control or only FWD and Reverse?
Are the control words (maybe parameters) like 163 etc universal?
In other words are the M3 and M5 macros used for all VFD's.

I was hoping to have implement this with a USB to RS485 converter using a laptop as a controller.
Other than finding the virtual port number are there any other gotchas anyone can anticipate?

Thanks
Ross

racedirector Sat 11 January 2014 01:15

Ross, what VFD are you running? If you have an Hitachi X200 I can help by posting my setup. Fully controlled speed wise from Gcode (using Modbus) and responds to M codes as required.

Surfcnc Sat 11 January 2014 01:30

Oh to be working on a X200 Hitachi VFD !!
It is a Delta VFD E series, the menu system is so confusing and the manual is rubbish.
My opinion after a bad day button pressing so that might be a little coloured :)

I was drawn to this solution as it does not use a Modbus board and uses included software in Mach3 to control Modbus.
If you have something I can use by all means.
Thanks Bruce.

Ross

racedirector Sat 11 January 2014 02:02

I'll take screen shots of my stuff, maybe it will help. Give me 'til tomorrow, my old CNC is now in pieces and the PC is shut down. I'll dig it out for ya :) Oh, and no Modbus board here, the Hitachi supports Modbus out of the box.

racedirector Sat 11 January 2014 05:47

1 Attachment(s)
Ross, I was thinking about your situation tonight and wondered if you have considered 0-10V PWM to control the spindle. I don't think my setup would help you much due to the Hitachi being Modbus aware.

I found this PDF on using a Delta VFD-E via PWM to help you along. They don't use Mach3 but the USBCNC software that I am seriously considering.....

Cheers

racedirector Sat 11 January 2014 05:59

Hold the phone@! I see your VFD DOES support Modbus/RS485 so will continue with the original plan of offering screenshots.....

danilom Sat 11 January 2014 07:02

Parameters are not universal, these are registers for controlling RUN and setting Forward/Reverse on control techniques VFD. Others may be similar you have to look inside datasheet for modbus control.

The frequency parameter is set to on of the presets (in mine preset 1 is parameter 18)
then all you need to set is in Spindle setup->modbus spindle . 4000 is because my VFD accepts frequency in 0.1 steps but the register is 4 digits without a point so 4000 is 400.0 Hz

Surfcnc Sat 11 January 2014 23:20

Bruce - I am currently using the PWM function on a C11 board, but I was wanting another way to do it.
I had seen that Damien CNC doc and it was a good start on the PWM connections for me.
The Delta I was using was different again, so some guessing was still involved.

Danilo - Thanks for the clarification, your method seems very good and that is why I was wanting to have this as another possible option for spindle control.

Thanks
Ross


All times are GMT -6. The time now is 01:25.

Powered by vBulletin® Version 3.8.3
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.