Machsupport Forum

Third party software and hardware support forums. => SmoothStepper USB => Topic started by: dgates80 on January 30, 2011, 02:50:06 PM

Title: PMDX-126 and SS K1 relay (spindle power) control
Post by: dgates80 on January 30, 2011, 02:50:06 PM
This is making me crazy. 

I have recently purchased a PMDX-126 and a SS.  Basic install is going fine, USB and Mach driver installed, they are talking, I can move all 3 axis of my machine. 

Attempting to get the motor control relay that is on the PMDX-126 to work.  I configure the ports/pins to use port 1, pin 2, for step and port 1, pin 14 for direction for relay K1 and K2 respectivly.

Spindle control is enabled, in step/dir mode.

If I set active low the relay energizes and active high it denergizes (love those LED's indicating output state on the PMDX-126).  This sort of tells me that the electrical connectivity is there, and that I have the pin assignments right.

A M3 or M4 command on the MDI do not seem to control the relay though.  M1 has no effect either.  I am at a loss for what to try next!  No a show stopper to running my machine as I had no motor relay control set up so there is the old manual on-off switch, but....
Title: Re: PMDX-126 and SS K1 relay (spindle power) control
Post by: Jeff_Birt on January 30, 2011, 09:44:43 PM
Quote
Attempting to get the motor control relay that is on the PMDX-126 to work.  I configure the ports/pins to use port 1, pin 2, for step and port 1, pin 14 for direction for relay K1 and K2 respectivly.


Huh? Why are you trying to turn a relay on with a step/direction signal? What you need to do is look in the 'Spindle Setup' tab in Ports&Pins under 'Relay Control'. Set the Output number to the logical output you want triggered when the spindle is told to turn on in the forward and reverse direction. For example set M3 to Output #1, and M4 to Output #2. Now go to the 'Outputs' tab and set 'Output #1' and 'Output #2' to the proper port and pin numbers.
Title: Re: PMDX-126 and SS K1 relay (spindle power) control
Post by: dgates80 on January 31, 2011, 05:23:00 AM
That's why the forums are so great!  I was using step/dir because there is a "spindle" in the "motor outputs" tab, an error in intuition and not very well covered in the docs, IMHO.  I will give your idea a go and see if it gets things going. 

Now, if I could just get keep the  USB driver from dropping offline between the computer and teh smoothstepper....  I am going to try a couple of things there, a different computer and a different USB cable for starters.  Also, I rolled back to the lockdown version of the SS plugin -- I noted in the release notes that the developer 'doubled the current from the FPGA to the FDTI (USB) chip' so there is the potential for different USB charisteristics, perhaps. 

On a totally unrelated note, I'm making chips!  It's funny, folks are coming out of the treeline with "can ya make me a ____" requests.  Have made about 8 signboards so far, just basic ones using the "Write" wizard.  Which is *terrible*, but it gets the job done....
Title: Re: PMDX-126 and SS K1 relay (spindle power) control
Post by: Jeff_Birt on January 31, 2011, 07:01:27 AM
Take a look at the 'Installation Tips' document in the SmoothStepper section here:
Quote
http://www.soigeneris.com/Documentation-content.aspx
. Typically the problem with loosing communication is related to how Windows is set up.
Title: Re: PMDX-126 and SS K1 relay (spindle power) control
Post by: dgates80 on January 31, 2011, 10:02:27 AM
Thanks, Jeff, I think you have something there, I will give it a go this evening!

Reading the doc you reference, I can see how power management of USB can cause problems. Even if the SS itself is externally powered, which mine is via the PMDX-126 board, as opposed to using the USB power.  In fact my symptoms sort of point that way in that the FPGA state stays in "done" (vs "init") indicating that the FPGA software is still downloaded and present onboard the SS itself, just the comms piece is going away on me.  Perhaps the FDTI USB chip is still powered by the PC +5V coming across the USB cable?  If that's the case (and I suspect that it is) then when the PC shuts down USB power then the USB connection goes away, resulting in the Mach3 SS plugin throwing a comms assert exception.

Nice catch! 

On a brighter note, I notice a huge improvment in the axis motion of my machine with SS.  I was getting stalling and skipped steps with the PP interface, upon reflection probably due to the DMA associated with the mobo's onboard graphics doing DMA and stealing cycles from the pp driver ring 0 process... just speculating though.  It truely *is* a smoother stepper!! ;-)

On the down side, the SS plug in loses the - sometimes handy - PP driver based feature of that pop-up window saying "a limit switch has tripped, would you like for Mach to fix this", which allows one to back off a limit switch via a couple of jog cycles.  With SS I have to estop the machine (and I have estop tied into both the PMDX-126 *and* the G540, so that the steppers go limp) and then back out of the limit switch by turning the lead screws by hand.  Of course, ya'll never hit limit switches because you are MUCH better machine operators than I!



-- Don Gates
Title: Re: PMDX-126 and SS K1 relay (spindle power) control
Post by: Jeff_Birt on January 31, 2011, 10:16:14 AM
You just need to tell Mach to let you back off the limit switch (in configuration). Or, better yet get the Soft Limits set up and you'll never have to worry about hitting a limit.
Title: Re: PMDX-126 and SS K1 relay (spindle power) control
Post by: dgates80 on January 31, 2011, 10:23:31 AM
I will check the config for that option.  As for soft limits, seems when I turn them on they keep annoying me and getting in the way, my work pieces seem to push right to the edge of the working envelope.  But you're right.

-dg
Title: Re: PMDX-126 and SS K1 relay (spindle power) control
Post by: dgates80 on January 31, 2011, 12:06:50 PM
You just need to tell Mach to let you back off the limit switch (in configuration). Or, better yet get the Soft Limits set up and you'll never have to worry about hitting a limit.

Is this the "home switch safety" check box in config? 
Title: Re: PMDX-126 and SS K1 relay (spindle power) control
Post by: dgates80 on January 31, 2011, 03:46:46 PM
Well.  I implemented your suggestion regarding the spindle motor control relays assigned to an output and set the approprite output and THAT works. 

Got the FTDI USB driver error again, switching to the v.17 plugin now, have reset pwr management in device manager, going to see if it's more stable now.

Wish me luck!  (It ran 90% through a 10,000 line gcode file and then I accidentelly pulled the USB cable.  Arrgh.  Do-Over)
-dg
Title: Re: PMDX-126 and SS K1 relay (spindle power) control
Post by: dgates80 on January 31, 2011, 04:52:12 PM
Arrgh.  Smoothstepper appears in device manager.  Turn off power to SS and it goes away.  Turn power back on and it comes back.  Mach plugin won't see it.  Making me crazy.
Title: Re: PMDX-126 and SS K1 relay (spindle power) control
Post by: dgates80 on January 31, 2011, 06:07:27 PM
I am getting two "Microsoft Raw Ports" in the "eject removable device" gadget.  Hmmm.  It's being a piggy mystery why it sometimes works and sometimes does not.  Going to get the laptop soon and see if that works more reliably.  In the middle of a cut job, too! 
Title: Re: PMDX-126 and SS K1 relay (spindle power) control
Post by: Jeff_Birt on January 31, 2011, 06:17:51 PM
I'm not sure I follow. If you have the SS externally powered and turn off the external power supply it will of course shut off and the PC won't see it any more. If you have the SS powered by the USB cable it should always show up.
Title: Re: PMDX-126 and SS K1 relay (spindle power) control
Post by: dgates80 on January 31, 2011, 06:31:50 PM
The SS *is* powered by the PMDX-126.  It powers off when I turn off AC power to it and the G540, is all on same AC switch.

Problem is that the comms to the SS drops out, then the M3 plug in reports no SS found during USP port scan.  Dev Mgr shows it there. 

I may have found a clue -- it sems if I force a "scan for hardware changes" it makes the SS USB device available again.  I think. 

Problem *may* be this comouter, it's an Athlon 64 running Win7 Ultimate 32 bit.  Laptop is an Intel i7 CPU, may load different code during the USB driver install.  Or, maybe USB hardware on this computer is flakey. 

When it runs, it runs great.  It just periodically drops USB comms.
Title: Re: PMDX-126 and SS K1 relay (spindle power) control
Post by: dgates80 on January 31, 2011, 06:33:11 PM
I'm not sure I follow. If you have the SS externally powered and turn off the external power supply it will of course shut off and the PC won't see it any more. If you have the SS powered by the USB cable it should always show up.

I have *not* tried several things (had a job to run today) -- USB cable is unchanged, computer is unchanged, etc.  Much to try before I truely throw my hands up.....
Title: Re: PMDX-126 and SS K1 relay (spindle power) control
Post by: dgates80 on January 31, 2011, 07:10:24 PM
I'm not sure I follow. If you have the SS externally powered and turn off the external power supply it will of course shut off and the PC won't see it any more. If you have the SS powered by the USB cable it should always show up.

I have *not* tried several things (had a job to run today) -- USB cable is unchanged, computer is unchanged, etc.  Much to try before I truely throw my hands up.....

Oh -- I checked, this is a recently shipped SS board that have the cap and the resistor next to the USB port on the SS removed.  

Hanging it up for today.  

Q:  When the plugin is scanning for the SS USB device, what exactly is is looking for?  The device had many enumerated properties, one of which is not getting picked up... sometimes.  The device is clearly being recognized by Win7, as evidenced by it showing up in dev mgr when plugged in and then going away when unplugged or powered down.  

Based on the error messages it is pretty clear it's related to the USB comms.  Once the FPGA gets initialized, it's all good until usb comms drops.  

Time for dinner.  Managed to get cut job done, though it took 5 tries to run roughly 12,000 lines of gcode.  Should have taken, with tool changes, 90 minutes, worked on it 5 hours.
Title: Re: PMDX-126 and SS K1 relay (spindle power) control
Post by: dgates80 on January 31, 2011, 08:54:56 PM
Looking at the guidenet website regarding usb problems, the issue may indeed be the usb chipset in the *Athlon* AMD motherboard on the CNC host computer.....  Thinking about it, this machine's mobo has had more than it's share of wierdness in the past.  The SATA implementation did not play well with an OCZ SSD, for example.

I may see a dramatic change in the state of computer happyness with this laptop tomorrow. 

Think kind thoughts....

=dg
Title: Re: PMDX-126 and SS K1 relay (spindle power) control
Post by: dgates80 on February 01, 2011, 06:18:23 PM
Much improvement.  First, SS runs stable using the HP laptop!  How about that! 

This is not to say that I still don't get USB comm faults, I do.  But guess what?  I have identified a smoking gun!  It trips offline every time the shop heater kicks on, repeatably.  Every time.  Whoo Hoo! 

Now, how do I fix THAT?  Hmmm.  The shop heater is a kerosene "turbine" type heater, old as heck, puts out a ton of heat.  Works great.  I note though that it is *not* grounded, and generates a fair bit of RFI when running as evidenced by the static I hear on the shop radio.  I wonder if I grounded the heater frame......

I am going to try that, along with a couple of other things related to grounding and see if I can chase this gremlin down.

The other computer may have had greater sensitivity to the noise, for one.  I think there may have been multiple issues working too though, dunno for sure.

Title: Re: PMDX-126 and SS K1 relay (spindle power) control
Post by: dgates80 on February 02, 2011, 09:18:25 AM
Turns out the shopvac does the same thing as the heater, kicks the USB comms offline.  I think I am going to try a UPS / line conditioner on the motor control 115VAC plug, see if that cures this.

On a bright note, I left the machine running overnight and it was still up and running this morning, a 10 hour run with no usb comms drops.  I'm liking that!

Title: Re: PMDX-126 and SS K1 relay (spindle power) control
Post by: dgates80 on February 02, 2011, 05:01:16 PM
Got the UPS installed.  Th shop vac no linger kills USB comms but the heater does.  Hmmm.  Variations on a theme will fix this.  With the outside temp going to be 27F tonight, gotta have the heater!
Title: Re: PMDX-126 and SS K1 relay (spindle power) control
Post by: Jeff_Birt on February 02, 2011, 05:22:29 PM
Would you be willing to try something for me? Remove the UPS. Unplug the ribbon cable(s) from the SmoothStepper and make sure it is powered by the USB cable, not an external supply. This should still let Mach connect to the SS, with Mach talking to the SS (red LED blinking) try your shop heater and see if the SS/PC communication is still disrupted.
Title: Re: PMDX-126 and SS K1 relay (spindle power) control
Post by: dgates80 on February 02, 2011, 05:27:15 PM
Would you be willing to try something for me? Remove the UPS. Unplug the ribbon cable(s) from the SmoothStepper and make sure it is powered by the USB cable, not an external supply. This should still let Mach connect to the SS, with Mach talking to the SS (red LED blinking) try your shop heater and see if the SS/PC communication is still disrupted.

I just gained operational success when I moved the heater to a different breaker in my shops load center. 

I will restore the electric config that causes problems and give it a try for you though.  I suppose I will also need to rejumper teh SS board to use USB power too, right?

-dg
Title: Re: PMDX-126 and SS K1 relay (spindle power) control
Post by: Jeff_Birt on February 02, 2011, 05:32:49 PM
If you would try it that would be great. You might try it on USB power and external power to see if there is a difference. When you are testing on USB power you might want to pull the external power connector off. I'm just trying to determine if the noise is getting to the SS through the ribbon cables, the power cable, or the USB cable.

Also, if it seems to work on USB power with the ribbon cable(s) dissconnect from the SS, you might try it again with USB power and the ribbon cables connected.

Thanks!
Title: Re: PMDX-126 and SS K1 relay (spindle power) control
Post by: dgates80 on February 02, 2011, 05:39:44 PM
By "ribbon cables" I am guessing you refer to the port 1 and port 2 cables coming off the PMDX-126 BOB to the smoothstepper. 

I am not sure what Steve is doing to produce 5v on his BOB, probably something like a a LM7805 or the like. 

There is a fairly small transformer connected to 115VAC, a pair of small surface mount bridge rectifiers, some small can caps, and two three pin regulator chips... pretty standard power supply design. 

Title: Re: PMDX-126 and SS K1 relay (spindle power) control
Post by: Jeff_Birt on February 02, 2011, 06:10:03 PM
Are you hooking the 5V from the BOB to the 5V external power terminals up by the USB connector? Or, are you just using the Port1 & Port 2 cables themselves?
Title: Re: PMDX-126 and SS K1 relay (spindle power) control
Post by: dgates80 on February 03, 2011, 12:56:49 PM
Just the port 1 and port 2 cables.  I have thought about building a little 5v external supply using an ATX computer power supply, putting a 10ohm 10W resistor onto the output to provide the nessessary minimum load for proper regulation and providing terminal posts etc. as accessories.  With that I suppose I *could* power the SS from a well regulated external supply. 

Cart before the horse though, would like to identify where the noise impulse is coming from first, might be from the computer side.  Will be working the procedure you requested tomight after work, did not get out to the shop yesterday hardly at all, I had evening meetings to take care of.
Title: Re: PMDX-126 and SS K1 relay (spindle power) control
Post by: Jeff_Birt on February 03, 2011, 02:36:57 PM
Quote
Just the port 1 and port 2 cables.


I'm not sure that is such a great idea. The connector to supply an external 5V that is on the SS board, located up by the USB connector has some filtering built into it. If you are powering the SS through the BOB than if your BOBs power supply is picking up noise you are just transferring that noise directly to the SS itself. As far as an external power supply I would not mess with getting a PC supply to work, that is a very inefficient way of doing things. I have small 5V supplies here: http://www.soigeneris.com/MeanWell_PS_05_Power_Supplies-details.aspx (http://www.soigeneris.com/MeanWell_PS_05_Power_Supplies-details.aspx) (my website) that work very well with the SmoothStepper and do not have a minimum load requirement.
Title: Re: PMDX-126 and SS K1 relay (spindle power) control
Post by: dgates80 on February 03, 2011, 03:42:56 PM
I agree, not all that efficient, however I have the stuff to do the ATX PSU conversion on hand, and it's money I don't have to spend. 

interesting comment about not using the BOB power via the ribbon cables.  The BOB docs say that it's fine to do so, but maybe not int his case.  I think I will try USB power first, then eventually set up the external 5V -- I can use a utility source of 5V for other stuff anyway.