Author Topic: PMDX Configuration with G540 and VFD  (Read 13820 times)

bill anderson

  • Posts: 5
    • View Profile
PMDX Configuration with G540 and VFD
« 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.

Steve Stallings

  • Administrator
  • Posts: 529
  • www.PMDX.com/Images/Avatar120.jpg
    • View Profile
Re: PMDX Configuration with G540 and VFD
« Reply #1 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.












« Last Edit: February 05, 2017, 05:16:49 PM by Steve Stallings »
Steve Stallings
www.PMDX.com

bill anderson

  • Posts: 5
    • View Profile
Re: PMDX Configuration with G540 and VFD
« Reply #2 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.

Steve Stallings

  • Administrator
  • Posts: 529
  • www.PMDX.com/Images/Avatar120.jpg
    • View Profile
Re: PMDX Configuration with G540 and VFD
« Reply #3 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.

Steve Stallings
www.PMDX.com

bill anderson

  • Posts: 5
    • View Profile
Re: PMDX Configuration with G540 and VFD
« Reply #4 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.

Steve Stallings

  • Administrator
  • Posts: 529
  • www.PMDX.com/Images/Avatar120.jpg
    • View Profile
Re: PMDX Configuration with G540 and VFD
« Reply #5 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.
Steve Stallings
www.PMDX.com

bill anderson

  • Posts: 5
    • View Profile
Re: PMDX Configuration with G540 and VFD
« Reply #6 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?

bill anderson

  • Posts: 5
    • View Profile
Re: PMDX Configuration with G540 and VFD
« Reply #7 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.

Steve Stallings

  • Administrator
  • Posts: 529
  • www.PMDX.com/Images/Avatar120.jpg
    • View Profile
Re: PMDX Configuration with G540 and VFD
« Reply #8 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.
Steve Stallings
www.PMDX.com

j2mariashop

  • Posts: 9
    • View Profile
Re: PMDX Configuration with G540 and VFD
« Reply #9 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

12strings

  • Posts: 278
    • View Profile
Re: PMDX Configuration with G540 and VFD
« Reply #10 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

j2mariashop

  • Posts: 9
    • View Profile
Re: PMDX Configuration with G540 and VFD
« Reply #11 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

j2mariashop

  • Posts: 9
    • View Profile
Re: PMDX Configuration with G540 and VFD
« Reply #12 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.

12strings

  • Posts: 278
    • View Profile
Re: PMDX Configuration with G540 and VFD
« Reply #13 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.

j2mariashop

  • Posts: 9
    • View Profile
Re: PMDX Configuration with G540 and VFD
« Reply #14 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