Machsupport Forum

Mach Discussion => Mach4 General Discussion => Topic started by: wheelman on November 08, 2016, 04:02:08 PM

Title: Mach4, C11 BOB, & Huanyang VFD - how to control spindle?
Post by: wheelman on November 08, 2016, 04:02:08 PM
I think I'm losing my mind. ??? I've been over hundreds of forum posts and tried every conceivable configuration of Mach4 I can find. I cannot figure out this VFD.

I have a  3 KW Spindle  (http://www.automationtechnologiesinc.com/products-page/cnc-spindle/3-kw-4hp-air-cooled-spindle), 
Huanyang 3 KW VFD (http://www.automationtechnologiesinc.com/products-page/cnc-spindle/3-kw-4hp-air-cooled-spindle), a  C11 Breakout Board (http://www.automationtechnologiesinc.com/products-page/breakout-boards/c11-multifunction-cnc) and an   Ethernet SmoothStepper (http://www.automationtechnologiesinc.com/products-page/breakout-boards/smoothstepper-ethernet-motion-control-board-for-mach-3)

ESS Plugins are enabled and XYZ, homing, and everything else works. I can control the relays on the BOB, but I can't get Mach4 to control the spindle. Spindle works, I was able to manually control it from the VFD with it completely disconnected.

Here's pics of the breakout board (I'm assuming I'm supposed to be using pin 14 and 16, one for direction/enable and one for a 0-10v analog output for speed control) as well as the input to the VFD.

I have the spindle configured in ESS as PWM, although I've tried step/dir, and relay. Pin 14 is my 0-10v analog output, and pin 16 is a relay to control enabling/direction.

I realize you can't trace the wire connectivity in the pictures, but where am I off on this? What needs to connect where, and what should my Mach4 settings be?

thanks in advance
Title: Re: Mach4, C11 BOB, & Huanyang VFD - how to control spindle?
Post by: TOTALLYRC on November 08, 2016, 04:12:37 PM
Use a voltmeter to make sure that you are getting 0-10v when you command a spindle speed from Mach. This should be pin14.
Verify that the VFD is setup for external speed control via analog input.

Mike
Title: Re: Mach4, C11 BOB, & Huanyang VFD - how to control spindle?
Post by: wheelman on November 08, 2016, 04:41:39 PM
I am not getting 0-10v. It must be a Mach setting that's wrong. VFD is configured for external by configuring Parameter 0001 for external.


Title: Re: Mach4, C11 BOB, & Huanyang VFD - how to control spindle?
Post by: TOTALLYRC on November 08, 2016, 05:12:16 PM
I would disconnect all of the spindle wiring from the BOB and keep testing until you get the 0-10v. Then work you way to the VFD. You may want to start testing at the ESS as to eliminate the BOB as a problem.
I am not an ESS user so I probably won't be of much more help.
Title: Re: Mach4, C11 BOB, & Huanyang VFD - how to control spindle?
Post by: wheelman on November 08, 2016, 08:14:48 PM
I've now gotten voltage on pin 14. My base PWM frequency is 1000hz, the ESS Base frequency is 25hz, and when I command different spindle speeds in Mach4, my voltmeter picks up voltages from 0-7 volts. I can't get it to go to 10v at 18000 RPM.

Title: Re: Mach4, C11 BOB, & Huanyang VFD - how to control spindle?
Post by: wheelman on November 08, 2016, 08:51:41 PM
I'm still unsure on what connections from my breakout board need to be made to the VFD. Additionally, what do the Mach4 configuration settings need to be for my frequencies?
Title: Re: Mach4, C11 BOB, & Huanyang VFD - how to control spindle?
Post by: DazTheGas on November 09, 2016, 01:29:05 AM
So you got an output that goes to 7v max at 18000 rpm, those types of graphs are excellant, but try doing one first from the ESS and to see if your getting the full 5v from the ESS, if this the case then you are setup ESS wise and need to sort the c11.

DazTheGas
Title: Re: Mach4, C11 BOB, & Huanyang VFD - how to control spindle?
Post by: cncman172 on November 14, 2016, 11:48:54 AM
With this type board there is a POT that you can adjust to make sure you are getting full scale voltage, meaning all the way to 10V.  It is yellow on your particular board with the number 304 printed on the pot.  Look at your instructions on your particular board and they will have instructions on how to adjust the pot.  Most of these boards run on 5V so they use a circuit to create the higher voltage.  Once you get this adjusted so you can swing from 0 to 10V then you can hook up your VFD and it will all work correctly.

Russ
Title: Re: Mach4, C11 BOB, & Huanyang VFD - how to control spindle?
Post by: wheelman on November 14, 2016, 06:32:56 PM
Got it. I adjusted pot output to max 10v. However, I don't know which wires to connect to the VFD. See my original post for the pics of the VFD and output from breakout board.
Title: Re: Mach4, C11 BOB, & Huanyang VFD - how to control spindle?
Post by: cncman172 on November 15, 2016, 08:24:32 AM
This is actually very easy.  ACM is the analog common on the VFD, that connects to analog common on your little board.  Keep in mind that Common is not a ground common the only thing connected to it should be the common on the VFD.  Now the VFD uses VI as the analog voltage input for speed, that connects to the analog output that goes from 0-10V on your little board.  There are two relays on these boards they are used to control the direction of the spindle and enable the spindle.  They can be configured to operate in the US standard or the European standard.  You have to adjust little jumpers to which standard you would like to use.  You also have to tell the VFD which standard you are going to use.

The wires for the VFD are the DCM, FWD, REV only three wires are required for the direction control.

Russ
Title: Re: Mach4, C11 BOB, & Huanyang VFD - how to control spindle?
Post by: cncman172 on November 15, 2016, 08:37:33 AM
I tried to upload a PDF with a wiring diagram for your VFD with this type board, but it just hangs.

Russ
Title: Re: Mach4, C11 BOB, & Huanyang VFD - how to control spindle?
Post by: wheelman on November 16, 2016, 11:51:00 PM
Could you screenshot that schematic?

So pardon my ignorance, but I'm literally at wit's end on this board, and what you said only served to complicate things. There are 2 ACM's on the board, and I've already told the VFD via a jumper that I'm going to use voltage input instead of 0-20ma current input.

So here's what I think is right:
FOR SPEED CONTROL
Breakout Board                              VFD
Analog Output Ground - - - - - - - - ACM (next to AI/VI on lower level of VFD)
Analog Output 10v --  - - - - - - - - -VI - this is the 0-10v signal that I'm able to control via speed in Mach4


Does the attached wiring diagram look plausible?


Title: Re: Mach4, C11 BOB, & Huanyang VFD - how to control spindle?
Post by: cncman172 on November 17, 2016, 08:18:40 AM
Strange, this forum is not letting me upload pictures, pdf, anything very strange.

Here is a link that shows you the typical wiring diagram.  Your setup should be almost identical.

http://cnc4pc.com/Tech_Docs/2-C41R2%20and%20Huanyang.pdf

Russ
Title: Re: Mach4, C11 BOB, & Huanyang VFD - how to control spindle?
Post by: cncman172 on November 17, 2016, 08:20:42 AM
This could be another issue.
Normally you have to program the VFD to let it know you will be using analog voltage and external controls to control the VFD.  What jumpers are you setting.  What model VFD are you using, it looked like the standard Huanyang from China?

Russ



've already told the VFD via a jumper that I'm going to use voltage input instead of 0-20ma current input.
Title: Re: Mach4, C11 BOB, & Huanyang VFD - how to control spindle?
Post by: MadDogSTrack on November 17, 2016, 07:22:51 PM
Wheelman;

Sorry if you knew this already...
I also have a Huanyang VFD, unfortunately for your problem, I use MODBUS to control the drive.  (Huanyang uses a flavor of MODBUS, so takes a special driver... bummer)

Anyway, I just looked at my manual, and there are other settings that must be selected to get the VFD to recognize the 0-10 Volt external signal - others than the PD001 "Source of Run Command" (set to "1" for your installation).

Please also read about selecting 0-10 volt as opposed to 0 to 20mA, or 0-5V.  Look at PD070, PD072 through PD076.
I set mine up years ago, and remember similar learning curve.  Lesson here is to write down all the settings once the system does what you want it to... (smile)

If you are safe about it, you should be able to remove wires from controller board, put a voltage source across the terminals (think 1.5 volt "AA" battery) to ensure the drive is reacting to a 0-10 Volt signal.  Of course make sure spindle is ready to spin, etc.

My drive:
Model HY07D543B

Best of luck.

Title: Re: Mach4, C11 BOB, & Huanyang VFD - how to control spindle?
Post by: cncman172 on November 18, 2016, 08:11:45 AM


Each BOB connectors are unique and your manual has a section on the spindle. You basically need it to be able to output 0-10V which is fed into the VFD. Then you have to program the VFD for external control for both direction and speed, these are parameters inside the VFD.


Two relays are used to enable the VFD and allow it to change direction from Foward to Reverse, or vice versa.

PD001 = 1, this is for external control for operation commands
PD002 = 1, this is for getting operating frequency RPM from external analog input
PD044 = 01, for the RUN function
PD045 = 05, for the Switching from Forward to Reverse

PD070 = 0, this takes analog input from 0 to 10V

Please check the manual for you VFD but most of these have not changed for most of the Huanyang VFDs.

Russ
Title: Re: Mach4, C11 BOB, & Huanyang VFD - how to control spindle?
Post by: BalloonEngineer on November 29, 2016, 03:00:29 AM
Wheelman, I think that I understand what you may be missing and some of the above gets you there but is easy to miss.  I'll give you the short version and I think you'll be able to figure it out,  and then, if necessary post all the nitty gritty details once I can get back to my machine.

Mach4 has 3 functions relating to spindles you need to configure: a pin for SPINDLE ON, the speed function (pmw is what is discussed so far) and a direction function- mach wants you to configure a pin for FWD rotation and/or REV rotation (i.e. If you want to use both, you are configuring two separate pins for direction). Now looking at the VFD you see their is no pin for spindle off/on, and the direction is controlled by jumpering either FWD and DCM for forward and REV and DCM for reverse.  This is the secret, the action of completing the jumpering the direction pins is the on/off function for the spindle.

What mach4 will do when it sees a M3 command is turn ON the SPINDLE ON pin and turn ON the FWD pin.  You need to connect the output of either the SPINDLE ON pin or FWD  pin to a relay.  The relay should be wired to the VFD such that the relay Common pin is connected to VFD DCM pin, and the relay NO ( normally open) pin is wired to the VFD FWD pin. Thus when Mach4 triggers  the SPINDLE ON pin, the relay is energized and the VFD DCM pin and FWD pins are shorted together, turning on and setting the direction simultaneously and actually starting the spindle.  Of course, if you are using both forward and reverse, you should use the Mach4 FWD pin and Mach4 REV pin to trigger 2 separate relays wired to the appropriate VFD pins.  The SPINDLE ON must be configured in Mach4 but does not need to be connected to anything, the direction pin will do both the on/off and set direction on the VFD.

The relay can be low voltage (mine is a 5v one), it is not switching any power, only creating a "short"  or continuity between two pins at logic level.

Hopefully this is enough for you to get this working.  Looks like you already have the pmw speed funtion configured.

Richard
Title: Re: Mach4, C11 BOB, & Huanyang VFD - how to control spindle?
Post by: wheelman on December 04, 2016, 11:24:49 PM
Thanks for help so far, but I still CANNOT get the machine running.

If I hook a 9v battery from ACM to VI and then jumper DCM to FOR, then the spindle spins perfectly. It spools up to 400 hz very nicely. As for Mach4, well it's still being a PITA and won't control it.

I want to use Pin16 (which is a relay out on my BOB) for my FOR-DCM, and Pin 14, which is an analog output to control speed. I dont think I'm wrong on this, and it all makes sense in my head, but Mach seems like one of the most unintuitive programs to configure in the world.

When I click spindleCW in Mach4 (M03) I want the spindle to TURN ON. It won't do this. I have wires from v_in and NO (normally open) from the relay on Pin 16 connected. How do I make Mach4 close said relay when M03 or the button is enabled? I've tried every mapping I can dream of through ESS and it doesnt work active high, active low, or anything else in the middle.

I'm at my wits end here and don't know where to turn. Mach4 and ESS just seem impossible to configure, and from an intuitive sense I understand exactly what I'm trying to do.
Title: Re: Mach4, C11 BOB, & Huanyang VFD - how to control spindle?
Post by: wheelman on December 04, 2016, 11:43:57 PM
I changed the pin mappings in ESS Output Signals for Spindle On - maps to Pin 16, which causes relay to close and connect DCM to FOR, and the spindle starts. I think I've gotten closer, now to figure out how to scale the voltage from 0-10 to correspond to speed.

thanks again for the help
Title: Re: Mach4, C11 BOB, & Huanyang VFD - how to control spindle?
Post by: ref1ection on February 08, 2017, 10:59:13 PM
Have you had any further progress getting 0-10v on the analog output? I'm trying to do the same with a C23 board and having the same issues.