Author Topic: PMDX-126 to Leadshine ES-DH1208 problems  (Read 4595 times)

redrabbit

  • Posts: 7
    • View Profile
PMDX-126 to Leadshine ES-DH1208 problems
« on: August 16, 2016, 10:16:05 PM »
I am new to this forum, great to be here;
Question: I am hooking up a PMDX-126 to 4 ES-DH1208 leadshine drivers (X,Y,Z,X?). My issue is this, I can get the motors to move via the preset programming in the divers but I cannot get the PMDX-126 to move the motors via the step/dir pulses. What I can get are clicks from the motors through mach3 when I jog.
I have tried driving the step/dir with both the common and +5V since these drivers can do either. Switching the step/dir pins in mach3, directly on the board, and while in test mode on the 126.
On that note, in test mode all leds that should be lit are with the multimeter confirming the outputs pins for step/dir. I have the correct dip switches for running in test mode according to the PMDX-126 manual. What the motors, with the correct setup according to the driver manual, do is click initially with each step/dir and then I get a buzz, like a small motor is running. I am suspicious that since these are closed loop I am having an issue with the stepper/driver via the encoder.
Any and all help is greatly appreciated! 

Bob at PMDX

  • Administrator
  • Posts: 368
    • View Profile
    • PMDX
Re: PMDX-126 to Leadshine ES-DH1208 problems
« Reply #1 on: August 17, 2016, 01:07:45 AM »
If you hear 1 click each time you jog one direction, and nothing when you jog the other direction, that usually means that you have the step and direction signals swapped (i.e. the step output from Mach3 is going to the "DIR" input on the motor driver).  Try swapping the step & dir pins in Mach3 and see if that changes anything.

If that doesn't fix things, lets go back to basics and go through things one step at a time.  Some of this will be verifying things that you have already done.  So please be patient and humor with me.

I recommend connecting the ES-DH1208's PUL- and DIR- to the PMDX-126's "PCgnd" terminals on J1, J2, J3 and J4.  The connect the PUL+ and DIR+ to the step and dir terminals on the PMDX-126.  For example, PUL+ to "Pin2" on J4, and DIR+ to "Pin3" on J4.  Or you could have PUL+ to "Pin3" and DIR+ to "Pin2".  It doesn't matter as long as you know which is which, and are consistent on all 4 motors (i.e. PUL+ to even pins and DIR+ to odd pins, or PUL+ to odd pins and DIR+ to even pins).  This configuration corresponds to the "PNP (sinking)" configuration in the ES-DH1208 manual.  It also allows you to set the "step polarity" in Mach3 to active high (i.e. a red "X" in the "Step Low Active" column).

Leave the ENA+ and ENA- terminals unconnected to enable the driver.

Let me know exactly how you have the PMDX-126 wired to the ES-DH1208 for the "X" axis (we will concentrate on that for now).

For the following examples, I will presume that you have the "X" axis driver's PUL+ connected to the "Pin2" terminal on J4, and DIR+ to the "Pin3" terminal.

For the PMDX-126's self-test mode, the DIP switches should be set as follows:

Config7: open or closed, your choice (for now, I suggest "closed" for "push and hold to run" mode)
Config6: Closed (switch towards the "Config6" silkscreen)
Config5: Closed (switch towards the "Config5" silkscreen)
Config4: Closed (switch towards the "Config4" silkscreen)
Config3: Open (switch away from the "Config3" silkscreen)
Config2: Open (switch away from the "Config2" silkscreen)
Config1: Open (switch away from the "Config1" silkscreen - sets STEP (i.e. PUL+) on "Pin2" and DIR on "Pin3",
                       change this to "Closed" if you have PUL+ connected to "Pin3"

Press the PMDX-126's "Test" button one time and release to enter test mode.  When you release the "Test" button, the "Status" LED should turn off.  If it remains on, or if it flashes, there is a fault.

Now each time you press the "Test" button, the LED next to "Pin3" should toggle on and off (i.e. press the button and the LED turns on, press the button again and the LED turns off).  Do you see that?

If you press and hold the "Test" button.  After couple of seconds you should see a dim glow on the "Pin2" LED.  Do you see that?

Do you now get motion from the motor when pressing and holding the "Test" button?  You should hear 5 clicks about 1/2 second apart and then the motor should ramp up to whatever speed corresponds to 1000 steps/second.  Release the "Test" button and the motor should ramp down to a stop.

Do you hear the 5 clicks at the start of the motion?  If you hold the motor shaft, or place your finger against it, you may be able to feel the steps.  But this depends on the "Pulses/Revolution" setting in the ES-DH1208.  The default is 4000 steps/rev, which is equivalent to 20 step microstepping.  You may or may not be able to feel that small of a motion.

Does the motor ramp up in speed?

If you hear and/or feel the 5 clicks but then the motor doesn't ramp up in speed, or if it starts to ramp up and then stalls (while making a whining or buzzing sound), that could mean that the motor stalled (or "cogged").  That *should* cause the ES-DH1208 to enter a fault state and display an error code and/or flash an LED.

If this works and the motor moves, then go verify that Mach3 has the "X" axis step and direction pins assigned to the pin numbers that match your actual wiring.

If this doesn't work, let me know the values of the following ES-DH1208 registers:
PA_07, 08, 09, 15, 17 and 18.
Engineering Hell: Everything's right and nothing works.
Bob's Corollary: If everything's right and nothing works, double check your assumptions.

redrabbit

  • Posts: 7
    • View Profile
Re: PMDX-126 to Leadshine ES-DH1208 problems
« Reply #2 on: August 17, 2016, 11:50:42 AM »
If you hear 1 click each time you jog one direction, and nothing when you jog the other direction, that usually means that you have the step and direction signals swapped (i.e. the step output from Mach3 is going to the "DIR" input on the motor driver).  Try swapping the step & dir pins in Mach3 and see if that changes anything.

*** I get clicks in both directions when jogging in Mach3 with all axis***

If that doesn't fix things, lets go back to basics and go through things one step at a time.  Some of this will be verifying things that you have already done.  So please be patient and humor with me.

I recommend connecting the ES-DH1208's PUL- and DIR- to the PMDX-126's "PCgnd" terminals on J1, J2, J3 and J4.  The connect the PUL+ and DIR+ to the step and dir terminals on the PMDX-126.  For example, PUL+ to "Pin2" on J4, and DIR+ to "Pin3" on J4.  Or you could have PUL+ to "Pin3" and DIR+ to "Pin2".  It doesn't matter as long as you know which is which, and are consistent on all 4 motors (i.e. PUL+ to even pins and DIR+ to odd pins, or PUL+ to odd pins and DIR+ to even pins).  This configuration corresponds to the "PNP (sinking)" configuration in the ES-DH1208 manual.  It also allows you to set the "step polarity" in Mach3 to active high (i.e. a red "X" in the "Step Low Active" column).

***everything is now sinking***

Leave the ENA+ and ENA- terminals unconnected to enable the driver.

***never hooked these up***

Let me know exactly how you have the PMDX-126 wired to the ES-DH1208 for the "X" axis (we will concentrate on that for now).

For the following examples, I will presume that you have the "X" axis driver's PUL+ connected to the "Pin2" terminal on J4, and DIR+ to the "Pin3" terminal.

***correct***

For the PMDX-126's self-test mode, the DIP switches should be set as follows:

Config7: open or closed, your choice (for now, I suggest "closed" for "push and hold to run" mode)
Config6: Closed (switch towards the "Config6" silkscreen)
Config5: Closed (switch towards the "Config5" silkscreen)
Config4: Closed (switch towards the "Config4" silkscreen)
Config3: Open (switch away from the "Config3" silkscreen)
Config2: Open (switch away from the "Config2" silkscreen)
Config1: Open (switch away from the "Config1" silkscreen - sets STEP (i.e. PUL+) on "Pin2" and DIR on "Pin3",
                       change this to "Closed" if you have PUL+ connected to "Pin3

***DIPs all switched over***

Press the PMDX-126's "Test" button one time and release to enter test mode.  When you release the "Test" button, the "Status" LED should turn off.  If it remains on, or if it flashes, there is a fault.

***Status light off and no flashing***

Now each time you press the "Test" button, the LED next to "Pin3" should toggle on and off (i.e. press the button and the LED turns on, press the button again and the LED turns off).  Do you see that?

***I do***

If you press and hold the "Test" button.  After couple of seconds you should see a dim glow on the "Pin2" LED.  Do you see that?

***I do***

Do you now get motion from the motor when pressing and holding the "Test" button? 
***no***
You should hear 5 clicks about 1/2 second apart and then the motor should ramp up to whatever speed corresponds to 1000 steps/second.  Release the "Test" button and the motor should ramp down to a stop.

***I get 5 clicks then a very disturbing buzzing sound, then when the test button is release there is a very light buzz. Almost like the a small motor is "rewinding", it might be my imagination but it appears to come from the encoder.***

Do you hear the 5 clicks at the start of the motion?  If you hold the motor shaft, or place your finger against it, you may be able to feel the steps.  But this depends on the "Pulses/Revolution" setting in the ES-DH1208.  The default is 4000 steps/rev, which is equivalent to 20 step microstepping.  You may or may not be able to feel that small of a motion.

***I hear the clicks and I marked the shaft relative to the body of the motor to detect movement and there is none.***

Does the motor ramp up in speed?

***just the buzzing after the 5 clicks***

If you hear and/or feel the 5 clicks but then the motor doesn't ramp up in speed, or if it starts to ramp up and then stalls (while making a whining or buzzing sound), that could mean that the motor stalled (or "cogged").  That *should* cause the ES-DH1208 to enter a fault state and display an error code and/or flash an LED.

***this is what I was thinking, but the drive does not have any error codes displayed***

If this works and the motor moves, then go verify that Mach3 has the "X" axis step and direction pins assigned to the pin numbers that match your actual wiring.

If this doesn't work, let me know the values of the following ES-DH1208 registers:
PA_07, 08, 09, 15, 17 and 18.

PA_07 = 1600
PA_08 = 4000
PA_09 = 5000
PA_15 = 1
PA_17 = 0
PA_18 = 0

I read in the driver manual that encoder resolution could be the issue to I took PA_08 to 1000 and there was still no change.

If I turn PA_28 from a 0 to a 1, the motor does 1 revolution CW and CCW.

My gut says it has to be the drive but I am at a bit of a loss.
« Last Edit: August 17, 2016, 09:30:15 PM by redrabbit »

redrabbit

  • Posts: 7
    • View Profile
Re: PMDX-126 to Leadshine ES-DH1208 problems
« Reply #3 on: August 18, 2016, 03:23:27 PM »
Update:

Upon contacting leadshine USA I have been told that I have HBS1108 drives which is the Chinese designation for the ES-DH1208 and I need to contact a different office, which I have not heard back from. I fear that this maybe why the PA_## do not all match up with the leadshine USA manual for ES-DH1208.

Using a multimeter on the J4 grd, 2, 3 and +5V outputs in test mode I am getting the following readings.

Grd = 0V
2 = 1.5V when stepping
3= 12 V when on
+5v = 14V

Could this be right? my multimeter is correct when testing 120v and 240V AC and +5v on the comuter USB.

I have come to the conclusion that there must be a miscommunication somewhere between the PMDX126 and drive.

Bob at PMDX

  • Administrator
  • Posts: 368
    • View Profile
    • PMDX
Re: PMDX-126 to Leadshine ES-DH1208 problems
« Reply #4 on: August 18, 2016, 05:32:04 PM »
The 1.5V on pin 2 *could* be realistic if that is the step signal output.  The 12V on "Pin3" is not good, and the 14V on the "+5V" terminal is even worse.  If those readings are accurate then something is very messed up.

Please disconnect *ALL* of the Leadshine drivers from the PMDX-126 board.  And do not reconnect them until you have the correct pinouts.

Now, lets see if the output driver on the PMDX-126 is working.  Repeat the measurements on PMDX-126 connector J4 (with nothing connected).  See what you get.  If "Pin3" is the direction output, you should get close to 0V after jogging one direction, and close to 5V after jogging the other direction.  And HOPEFULLY you see 5V (or very close) on the "+5V" terminal.

Bob
Engineering Hell: Everything's right and nothing works.
Bob's Corollary: If everything's right and nothing works, double check your assumptions.

redrabbit

  • Posts: 7
    • View Profile
Re: PMDX-126 to Leadshine ES-DH1208 problems
« Reply #5 on: August 23, 2016, 06:57:38 AM »
Come to find out the multimeter had shorted somewhere between checking it to the AC and then to the 5+V terminal.

Using a new multimeter I get 5V+ now.

However, I am still having an issue getting a smooth run.

Bob at PMDX

  • Administrator
  • Posts: 368
    • View Profile
    • PMDX
Re: PMDX-126 to Leadshine ES-DH1208 problems
« Reply #6 on: August 24, 2016, 02:37:05 PM »
Well its good to know the voltages are OK!

Looking at your register settings and the manual for the ES-DS series Easy Servo Drives, if PA_07 is 1600 (meaning 1600 steps per motor revolution) and PA_09 (following error) is 5000, that means that the drive won't fault until the motor is more than 3 revolutions behind the commanded position!!! (5000/1600 = 3.125 revolutions).  The default values have the position error at 1/4 of a revolution.  That sounds more reasonable in my mind.  So change PA_09 to no more than 400.  I don't think this is causing the problem, but it needs to be changed anyway.

The PA_08 setting needs to match your physical encoder.  If your encoder has 1000 lines (per revolution) then PA_08 needs to be 4000 (4 times the number of lines).

It is not clear to me from the manual, but I am presuming that changing the PA_07 value will change the number of microsteps the driver uses.  Setting PA_07 to 1600 means 1/8th microstep (8 microsteps per motor full step).

The motor motion caused by the first 5 single steps from the PMDX-126 test mode *should* turn the motor just over 1 degree: (5/1600)*360 = 1.125 degrees.  I don't know if your motor marking is sensitive enough to detect this or not.  You may need to grab the motor shaft to see if you can feel that motion.

You can try to manually generate step pulses: Remove the PUL+ wire from the PMDX-126 "Pin2" terminal.  Touch it to the PMDX-126's "PC+5V" terminal then remove it.  That is 1 step pulse (well, maybe more depending how cleanly the wire make connection and then breaks connection).  Do that a bunch of times and you should see (or feel) the motor move.  If not, the issue is with the motor driver.

Bob
Engineering Hell: Everything's right and nothing works.
Bob's Corollary: If everything's right and nothing works, double check your assumptions.

redrabbit

  • Posts: 7
    • View Profile
Re: PMDX-126 to Leadshine ES-DH1208 problems
« Reply #7 on: August 24, 2016, 10:01:45 PM »
**SOLUTION FOUND***

When trouble shooting this issue I found the caption under your name to be the most fitting... an engineers hell....

I decided to take 1 axis apart from motor to PMDX126 and swap cables and use the multimeter along the way...

And wouldn't you know it I found the problem.

I was using a DB44 cable to run DIR and PUL from the PMDX126 to the driver. I used the multimeter to check the connection and it was perfect. All other pins were tied off but somehow the enable pins were completing a circuit which would disable the drive.....in fact this was the case with all the drives. When I ran single wire unsheilded from the PMDX126 to the female DB44 socket on the drive for all 4 pin (+/- pul and +/- dir) I got that sweet sweet motion I was looking for when testing. However, when I used the DB44 male cable with pins 2-5 spliced out it was a no go.  The DB44 cable is shielded but EMI is the only thing I could hallucinate as being the problem. This rig is shielded heavily since the drives pull direct 110v AC and the spindle VFD is 220AC with a computer not far behind. But I have been careful to avoid ground loops.

I will make the appropriate changes to the drive, thanks for the heads up on the settings.

Again thanks for the feedback and the help,

In my head I am thinking this will be the last time I am on this forum looking for a solution but realistically I might be spending my mornings reading this instead of the news.