PMDX Forum

General Category => General Discussion => Topic started by: bill anderson on February 01, 2017, 09:15:18 PM

Title: PMDX Configuration with G540 and VFD
Post by: bill anderson on February 01, 2017, 09:15:18 PM
I am looking for documentation or an explanation of what I need to do to configure PWM spindle control with Mach 4 Industrial --> PMDX 411 --> G540  to my VFD. The VFD uses Gecko G540 Output 1 (DB25 pin 17) --> FWD Run  and Output 2 (DB25 pin 1)--> REV Run

Thanks
bill a.
Title: Re: PMDX Configuration with G540 and VFD
Post by: Steve Stallings on February 05, 2017, 05:12:19 PM
Using the tabs at the top of the Mach4 screen, go to Configure > Mach. A new configuration
window will open.

You must not have Mach4 enabled. If you have a red Disable button in the lower left of
your screen, click on it so that it changes to read Enable. The label shows the action that
will happen if clicked, not the current state.

Pick the Output Signals tab at the top of this new configuration window.

Scroll down the list of signals until you find Spindle Fwd in the left column.

Change the red X in the Mapping Enabled column to a green check mark beside Spindle Fwd.

Use the dropdown selector in the Device column to select SmartBOBUSB.

Use the dropdown in the Output Select column to select Pin 17.

Leave the red X in the Active Low column. This leaves the signal as active high.

Now scroll down the list of signals until you find Spindle Rev in the left column.

Change the red X in the Mapping Enabled column to a green check mark beside Spindle Rev.

Use the dropdown selector in the Device column to select SmartBOBUSB.

Use the dropdown in the Output Select column to select Pin 1.

Leave the red X in the Active Low column.

Now click on the boxes at the bottom of the window for Apply and then OK.

Next use the tabs at the top of the Mach4 screen, go to Configure > Plugins > PMDX-SmartBOB.

A configuration window for the PMDX-SmartBOB device will open.

Select the Spindle Config tab at the top of this window.

Select the PWM button near the top of the window.

Below that, select the Pin 14 button as the place to output the PWM.

Set the value in the PWM Frequency box to be 50.

Set the value in the Minimum PWM Duty Cycle as needed, for example if your
spindle motor relies on an internal fan and would overheat if run too slow, you
can enforce a minimum speed.

Set the PWM/PulseFreq Output Polarity to Active High.

In the lower half of the window, select Echo commanded RPM unless you have
an actual one pulse per revolution signal to use as feedback.

Click on OK to close the window.

Now you are ready to test your setup.












Title: Re: PMDX Configuration with G540 and VFD
Post by: bill anderson on February 10, 2017, 09:53:15 PM
That seemed to fix one problem, it seems to talk to the vfd now. I just have no control from the MDI line it ignores the M03S400 command. It will start the spindle moving when I hit the onscreen button (m03) on the right lower side of the screen, but it stops almost immediately. When I hit the button (M05) again to stop the spindle it faults with an error condition "ERROR Could not disable the PMDX - SmartBOB-USB, cannot communicate with device". I have to disconnect the USB to the PMDX 411, close out Mach4, reconnect the 411 and restart Mach4 again in order to try again. I reinstalled the PMDX firmware through the update firmware button on the SmartBOB configuration page.

Hopefully you can help or point me in the right direction

I have attached my machine.ini file if that may help


Thanks
bill a.
Title: Re: PMDX Configuration with G540 and VFD
Post by: Steve Stallings on February 10, 2017, 10:57:09 PM
There may be two different issues here.

First, the MDI line requires a Cycle Start to execute. Unlike Mach3 a
carriage return while in the MDI window does not execute the command.

Second, the loss of communication sounds like a noise issue. Can you
try it without power applied to the VFD to see if it still fails communication.

Title: Re: PMDX Configuration with G540 and VFD
Post by: bill anderson on February 10, 2017, 11:30:22 PM
Using cycle start allows the commands to talk to Mach4, it still fails with the same error and the same conditions when the VFD is powered. Where should I look to shield from noise? I was using a USB smoothstepper with Mach3 and it didn't seem to have any noise problems related to the VFD, just a whole series of other problems relating to FDTI_write and running out of data.
Title: Re: PMDX Configuration with G540 and VFD
Post by: Steve Stallings on February 11, 2017, 12:50:20 PM
If the commands execute without the VFD powered, but fail if it
is powered, then noise from the VFD is the likely source of the
problem. I am going to assume that you are controlling the VFD
on/off by using the FWD and REV terminal on its interface and
not a separate power contactor.

The power cable from the VFD to the spindle motor should be
a shielded cable and the shield should be grounded to the
safety ground at the VFD. This may be a screw on a terminal
strip or may be a bare (often green colored) metal screw into
the VFD chassis.

Sometimes the power input of the VFD radiates noise back
into the power line. For this a ferrite donut choke is often
used. Traditional computer style noise filters are not rated
for the kinds of harmonic current that a VFD will generate.

The metal shell of the DB-25 connector where the PMDX-411
plugs into the G540 should not be connected to the chassis
or safety ground because this can create a ground loop. If
this connection is unavoidable, try adding an 18 AWG wire
from the G540 case to the chassis of your computer.
Title: Re: PMDX Configuration with G540 and VFD
Post by: bill anderson on February 11, 2017, 05:06:25 PM
I've tried rerouting wiring, tightening grounds, adding RF chokes, nothing seems to work. I measured 1.58->1.71 VAC between the DB25 shell of the PMDX-411 and computer ground is that normal?
Title: Re: PMDX Configuration with G540 and VFD
Post by: bill anderson on February 11, 2017, 05:27:20 PM
I took a piece of solder wick and wrapped around the DB25 shell of the PMDX-411 and tightened down the connector to the G540 that has it working for now. there was no voltage between the computer ground and the machine ground and "0" resistance. Since I'm also planning on LinuxCNC and a 5i25 card I'd sure like to know about a permanent fix.

bill a.
Title: Re: PMDX Configuration with G540 and VFD
Post by: Steve Stallings on February 11, 2017, 06:00:22 PM
The important thing is not having current flowing through the
shield of the USB cable because of a ground loop. Measuring
voltage does not actually answer the question because it is
possible to have significant voltage there without problems
as long as the USB ground is not getting grounded to the
machine or the G540 case. This is because the G540 has
optoisolators on its inputs which would block the current
flow to ground.

If you did not have continuity between the USB ground and
the G540 case, and adding the solder wick to create a path
there solved the problem then it is black magic time since
that implies radiated noise is still getting into the cable.
Title: Re: PMDX Configuration with G540 and VFD
Post by: j2mariashop on February 09, 2018, 04:16:03 PM
Steve

I set  up the PMDX411 and I seem to have the same issue described here. My spindle speeds up to max rpm with no way of controlling the speed via S. When I go to the Output tab and enable Spindle Fwd and Rev as suggested, and select SmartBob as the device, no pins are now available.

My spindle config is PWM on Pin 14 (Gecko540) at 50 Hz, rpm estimated from PWM output.

My Inputs #1 through #4 are pins 10 through 13, with x in the Active Low col, Index is on Pin10, Motor Homes and Limits are on Pin11, Index on Pin 10 and EStop on Pin 15. Spindle at Speed and Spindle at Zero are set on Pin 11 (not sure if this is needed or correct), all with x in the Active Low col

Output#1 is Pin 17 and Output #2 is Pin 1 with x in the Active Low col. and Charge Pump is on Pin 16 with x in the Active Low. I have 0 in Min rpm in the Spindle tab and 3000 as max rpm.

On m3 s200 the spindle runs straight to around 2900. I have no control over changing the speed.

Any ideas?

Joe
Title: Re: PMDX Configuration with G540 and VFD
Post by: 12strings on February 10, 2018, 12:04:16 AM
First - You do not need, and should not configure, the Mach4 "Spindle at Speed" and "Spindle at Zero" input signals.  And specially, they should not be mapped to the same input pin as your motor home and limit switches!  Disable these two input signals.  I don't think this is causing your problem, but you need to change it anyway.

Second - Need more information.  Specifically, what do you have connected to the G540 12-pin screw terminal pins 5, 6, 7, 8 and 9?  And it would be helpful to upload either your Machine.ini (i.e. config) file, or if you don't know how to get that, create a profile package and upload that.  That way we can see ALL of your configuration.  If you don't know how to create this, see:

https://faq.pmdx.com/content/2/10/en/where-do-i-find-the-machineini-configuration-file.html
Title: Re: PMDX Configuration with G540 and VFD
Post by: j2mariashop on February 13, 2018, 02:16:29 PM
It doesn't look as if my reply went through.

I am attaching my profile file along with a wiring diagram for pins 5 through 9 on my Gecko540 (next post).

Thanks for your help

Joe
Title: Re: PMDX Configuration with G540 and VFD
Post by: j2mariashop on February 13, 2018, 02:18:41 PM
Here is my wiring diagram for a NOWFOREVER E100S and my Geck540 with the connections to pins 5-9.
Title: Re: PMDX Configuration with G540 and VFD
Post by: 12strings on February 21, 2018, 12:38:51 AM
A few things first on your configuration and wiring diagram:

Input Signals:

You have Mach4 input names "Input #1" through "Input #4" mapped to PMDX-411 pins 11, 12, 13 and 15.  First off, unless you have a Lua script specifically reading "Input #1", you do not need these signals.  Mach4 normally doesn'tuse them, though they don't cause any harm. But may just confuse things.  And second, if you ARE trying to keep track of G540 "Input 1" pin number, they should be assigned to pins 10, 11, 12 and 13.

You have "Index" mapped to Pin 13, this should be Pin 10 (which is G540 Input 1, terminal pin 1, blue wire to your spindle sensor).

You have "Limit Override" mapped to pin 12, which is G540 Input 3, terminal number 3 which you show not connected to anything.  That is OK, I guess.

You have E-Stop mapped to Pin 10.  For a G540 this needs to be Pin 15 (Fault).  I think it is active high (red X in the "Active Low" column), but I could be wrong.  The G540 manual does not mention the polarity, but their sample Mach3 XML file looks to show it as active high.


Output Signals:

You have "Output #0" mapped to pin17. Again, unless you have a Lua script specifically controlling this Mach4 output signal name (I suspect you don't), you do not need this.  Yes, pin 17 controls the G540 "Output 1" terminal, but Mach4 normally does nothing with signals "Output #0" through "Output #63" (unlike Mach3).  If you want to use the G540 "Output 1" to run the spindle forward, see below.

You have "Spindle On" mapped to pin 1, which is G450 "Output 2" on terminal pin 6 which you show wired to spindle controller "X2" (rev run).

In this configuration, you can only run your spindle in the 'reverse" direction (unless you have a Lua script controlling "Output #0" as mentioned above).  If you want to be able to run the spindle forward and backward, change your Mach4 output signal configuration like this:

1) Disable the "Output #0" signal and un-map from the SmartBOBUSB Pin 17.

2) Disable the "Spindle On" output and un-map from the SmartBOBUSB Pin 1.

3) Enable "Spindle Fwd", map to SmartBOBUSB pin 17.  I presume active low since you had the "Spindle On" set that way, but I don't know.

4) Enable "Spindle Rev" and map to SmartBOBUSB pin 1.  Same presumption about active low as the "Spindle Fwd" signal.


Now, finally, to your inability to control the spindle speed.  I have no idea :)  On your spindle controller, are the two "com" terminals electrically connected?  Sometimes the common for the VFD speed control is isolated from the other command or ground terminals.  I notice you have the G540 VFD "ground" tied to the "com".  If so, try the changes above and see what happens.  If you have a DC volt meter, try various "S" commands and measure the voltage between G540 terminals 7 and 8 (8 is positive) and let us know what you measure.
Title: Re: PMDX Configuration with G540 and VFD
Post by: j2mariashop on February 21, 2018, 02:20:50 PM
Thank you so much for your detailed write-up and correction of my screw ups!! I've made all the changes you suggested.

I did measure the voltage on pins 7 and 8 and I think this may be the issue. All the way from 300 rpm up to my max 1500 rpm, in increments of 200, the voltage was a flat 6.63 volts. I assume there is a linear relationship of voltage to rpm.

Joe
Title: Re: PMDX Configuration with G540 and VFD
Post by: j2mariashop on February 21, 2018, 02:37:17 PM
I reopened Mach3 and measured Pin 7 and Pin 8 voltage at varying rpms as follows:

RPM
Title: Re: PMDX Configuration with G540 and VFD
Post by: j2mariashop on February 21, 2018, 02:41:58 PM
I reopened Mach3 and measured voltage across Pins 7 & 8 as follows:

RPM     V

100      1.5
300      2.4
500      3.8
700      5.3
900      6.7
1100    8.1
1300    9.5
1500    10.8

I assume this is what one would expect. Under manual control varying the Hz changes rpm proportionally. It looks like only under Mach4 the voltage is a constant 6.6v. There is one thing I noticed in Mach3 (not having run it for a month or so). Spindle acceleration is very slow; on a new S command, rpm drops around 50% before it slowly climbs back up to the commanded rpm. However, it does reach this rpm. Not sure if this has anything to do with Mach4 not recognizing S commands.

Joe
Title: Re: PMDX Configuration with G540 and VFD
Post by: 12strings on February 28, 2018, 02:40:31 PM
That kind of voltage response is what I would expect.  I presume that is Mach3 with a parallel port connected to the G540, right?

It is very interesting that with the PMDX-411 you always get 6.63V.  I would have expected something close to 0V if the PWM from the 411 weren't working at all.  6.63V is mighty close to 1/2 scale, and is what I would expect if, say, the charge pump signal were actually being output on the PWM pin (even though the charge pump frequency is MUCH higher than the 50Hz recommended PWM frequency).

Do you have the "charge pump" switch on the G540 set to "On" or "Off"?

With Mach4 "disabled", what voltage do you see between G540 terminals 7 and 6?

 Please post  your revised profile (create a new profile package).  I don't have a PMDX-411, but I can try this on my 422 and see what it does with the PWM.
Title: Re: PMDX Configuration with G540 and VFD
Post by: j2mariashop on March 01, 2018, 11:29:54 AM
Hi

This is a message from Steve Stallings at PMDX. Steve reproduced the problem on one of their lathes. It looks like the spindle runs fine for Mill but not for Lathe.


Hello Joe,
 
I have reproduced your problem on a system here.
 
Everything works properly on a Mill configuration using a G540 config
with PWM on pin 14.
 
When I run a Lathe configuration, I see symptoms similar to what
you described.
 
This is going to take more work to figure out where the problem is
happening.
 
Regards,
Steve Stallings
PMDX
Title: Re: PMDX Configuration with G540 and VFD
Post by: j2mariashop on April 13, 2018, 12:09:41 PM
Here's an update on the lathe spindle speed issue:

Steve Stallings of PMDX recreated the same issue on their lathe. Here is his reply:


>>>I have reproduced your problem on a system here.
 
>>>Everything works properly on a Mill configuration using a G540 config
>>>with PWM on pin 14.
 
>>>When I run a Lathe configuration, I see symptoms similar to what
>>>you described.

>>>W>hen I take our sample Mill profile and set it to Lathe Diameter mode
>>>>it does seem to work. Something is fishy here.....

A few days later Steve came back with the following work around:

>>>>Open the page at   Config > Mach and it will default to the General tab.
 
>>>>In the second column of options at the bottom is a block called Spindle Mode.
 
>>>>Click on Constant RPM and the Apply.
 
>>>>This should make it possible to control your spindle speed. It does not
>>>>solve the issue of how to actually do Constant Surface Speed. I am looking
>>>>into how that works. Seems very few people know and I need to talk to the
>>>>right guy at MachSupport.

So, here I am on MachSupport!

I am running March 4 Build #3481 with a PMDX411 SmartBob [Rev A PCB] with SmartBob USB PlugIn version 0.52.254,  SmartBob USB Bootloader version 1.13.73, and SmartBob USB Firmware version 0.58.205.

Any ideas, anyone?

Joe
Title: Re: PMDX Configuration with G540 and VFD
Post by: 12strings on April 23, 2018, 05:59:26 PM
So, here I am on MachSupport!
Actually, this is the PMDX support forums.  Machsupport (for Mach4) is here:
https://www.machsupport.com/forum/index.php?board=94.0

Or wait for Steve to go back channel to them and get the answer.
Title: Re: PMDX Configuration with G540 and VFD
Post by: MichaelSmith on November 28, 2018, 06:00:10 AM
Very helpful thread I found here. Very detailed explanation and simple to follow. Thanks for this.
Title: Re: PMDX Configuration with G540 and VFD
Post by: Surfmaster on June 04, 2019, 03:53:49 AM
Thanks for starting this thread, I learned a lot from it.