Machsupport Forum

Mach Discussion => Mach4 General Discussion => Topic started by: native34 on March 08, 2016, 09:29:13 PM

Title: Mach4 spindle setup
Post by: native34 on March 08, 2016, 09:29:13 PM
Does anyone have any info on setting up a spindle in mach4? I have a vfd and motor working in mach3 using pwm but can't seem to figure out how to setup the spindle in mach4. I have a cnc4pc c32 Bob with ess, my motor and vfd are from charter oak automation. Vfd is danfoss, motor is Chinese 3HP 3600rpm.

Rod
Title: Re: Mach4 spindle setup
Post by: Tweakie.CNC on March 09, 2016, 01:49:53 AM
The latest ESS plugin is still being tested with Mach4 build 2914. You need to hold on for a while until this new ESS plugin has been released as there are some differences in the PWM signal config. from earlier versions.

Keep checking with Warp9 for the release, it is due any time now.  http://www.warp9td.com/index.php/kunena/index

Tweakie.
Title: Re: Mach4 spindle setup
Post by: native34 on March 09, 2016, 08:23:17 AM
Thank you. Is there another way for me to get vfd and motor working under mach4 besides pwm? If so how do I accomplish that?
Title: Re: Mach4 spindle setup
Post by: cncman172 on March 09, 2016, 04:11:34 PM
Native34,

Yes, you can setup the spindle with ESS and MACH4, but you will need to add one additional piece of hardware, since the ESS plugin does not have the capability yet.  You can add a C41 PWM speed control board from CNC4PC.  The board comes with a couple of relays and the ability to sent out a voltage signal 0-10V.

Inside the ESS plugin for MACH4 you configure the following:

Port1-Pin14(output) Spindle Fwd
Port1-Pin16(output) Spindle PWM

Inside of MACH4 configuration under Output Signals

Spindle ON     ESS, Spindle PWM
Spindle FWD   ESS  Spindle FWD

Under MACH4 Spindle you set the RPM range.

This works and click the appropriate relays to turn the spindle forward or reverse.
You will probably need to make minor adjustments on the pot on the C41 board to ensure you are getting the full 10Vs at the highest RPM setting.  For example if the spindle is supposed to go 24,000 RPM, then execute M3 S24000 on the MDI line in MACH4 and press cycle start.  You should be able to get a reading of 10V.  Now change the command to M3 S12000 and you should see the voltage drop to 5V.

You also need to configure the VFD to operate remotely using relays for spindle on/direction and remote analog voltage for speed control.  This will get you working and the card is probably $40.

Hope this helps.

Russ
Title: Re: Mach4 spindle setup
Post by: DazTheGas on March 09, 2016, 04:19:32 PM
Quote
Yes, you can setup the spindle with ESS and MACH4, but you will need to add one additional piece of hardware, since the ESS plugin does not have the capability yet.  You can add a C41 PWM speed control board from CNC4PC.  The board comes with a couple of relays and the ability to sent out a voltage signal 0-10V.

The ESS does have PWM always has, I use it myself. The ESS provides the PWM and its upto the BOB to do something with it.

DazTheGas
Title: Re: Mach4 spindle setup
Post by: cncman172 on March 09, 2016, 04:23:24 PM
Your are correct DasTheGas,

What I should have said is the ESS does not have the capability to output the Analog voltage 0-10V or the Relays required to interface with the VFD.  The other method would be modbus but have not seen plugins for VFDs for MACH4 so far.  Some VFDs can accept the ESS signals directly, mine is not one of those.

Russ
Title: Re: Mach4 spindle setup
Post by: native34 on March 10, 2016, 06:52:26 PM
Ok so, I got the spindle running under Mach control. I had to reverse the setting 1_14 is pwm, and 1_16 is spindle fwd. the problem I'm having now is the same problem I was having with mach3. When I set the spindle up so when I command m3 s950 I get 952rpm, and the 0-10v reads 2.3v, and the hz on front panel of vfd reads 15.4. Sounds ok so far. Now comes the messed up part. When I command any other speed like m3 s1800 the rpm reads 1530rpm and with each consecutive change of commanded speed. The spindle rpm doesn't match what is being commanded by a significant amount.
Title: Re: Mach4 spindle setup
Post by: Tweakie.CNC on March 11, 2016, 06:11:21 AM
If it's any help, the relationship between the Mach4 S#### command and the PWM output from the ESS is completely linear. If you are not getting correct RPM readings over the total speed range then the problem is located in the items between the ESS and the spindle.

Tweakie.
Title: Re: Mach4 spindle setup
Post by: cncman172 on March 11, 2016, 07:47:26 AM
The display on the VFD is controlled by how you program the VFD, in fact you could program the VFD to read RPM. Pull out your VFD manual.  No sure what kind of spindle you have but 950 RPM is pretty slow so you probably have something similar to a Bridgeport setup.  The Hertz reading on the VFD should reflect the current Hertz being requested.  For example if your Motor/VFD has a range of 0-300Hz, then at 150Hz it should be running half the maximum speed.  At 100Hz it should be running at 1/3 the maximum speed.   The VFD also need to know what kind of power you have is it 50Hz, or 60Hz which is standard in the USA.

Russ
Title: Re: Mach4 spindle setup
Post by: native34 on March 12, 2016, 09:12:01 PM
All I want is for the machine's rpm to match commanded and actual. I.e. When I command m3 s1800 and measure the actual rpm using a tachometer it matches pretty close, not off by a few hundred rpm.
Title: Re: Mach4 spindle setup
Post by: Tweakie.CNC on March 13, 2016, 01:58:08 AM
All I want is for the machine's rpm to match commanded and actual. I.e. When I command m3 s1800 and measure the actual rpm using a tachometer it matches pretty close, not off by a few hundred rpm.

I understand your frustration but it is not a Mach4 problem and it is not an ESS problem.

The problem lies in whatever connects the PWM output from your ESS to your spindle motor and these are perhaps the areas in which you should be testing.

1) Is the analogue voltage output from your C32 BoB (0 to 10 Volts) linear to the Mach4 commanded S#### ??

2) Does your VFD have linear response (output frequency) when driven by a regulated 0 to 10 Volt standard ??

Tweakie.

Title: Re: Mach4 spindle setup
Post by: native34 on March 13, 2016, 10:42:16 AM
If it is not a mach4 problem then why when I change the pulley settings, does it affect the actual rpm?
Title: Re: Mach4 spindle setup
Post by: Tweakie.CNC on March 13, 2016, 12:11:03 PM
If it is not a mach4 problem then why when I change the pulley settings, does it affect the actual rpm?

I have no answer for that other than what it says in the manual…

"The Spindle dialog allows the configuration and setup of up to 20 spindle rages. The spindle ranges can be gears and or belt settings to allow for a change in the range of speeds available. The reason for the maximum RPM is to allow for proper scaling of the motors RPM on all ranges. The motor RPM is used by motion devices, plugins, VFD's, Lua etc for planning the proper motor RPM to get the requested spindle RPM”.

Whilst the range and the scale can be set, it is my understanding that the problem you are experiencing is one of linearity.

Tweakie.
Title: Re: Mach4 spindle setup
Post by: dude1 on March 15, 2016, 01:55:56 AM
correct Tweakie there was a post last year someone worked out what the scale is and he got it bang on with some fancy numbers, Darwin had or has the same thing with spindle speed control I had to have some big numbers to get the correct speeds
Title: Re: Mach4 spindle setup
Post by: Tweakie.CNC on March 16, 2016, 12:25:25 PM
This topic has now moved http://www.machsupport.com/forum/index.php/topic,32174.0.html

Tweakie.