Hello Guest it is July 15, 2024, 08:28:18 AM

Author Topic: Crazy @$$ MPG  (Read 5648 times)

0 Members and 1 Guest are viewing this topic.

Crazy @$$ MPG
« on: December 31, 2010, 05:28:35 AM »
I have a strange occurrence happening, and wanted to see if someone could help me trouble shoot it.

I am using a generic MPG with multiple switches, 2 lights, and a 100 ct encoder (400 in quadrature).  Galil seems to like it, as all of the buttons, switches, lights and even the encoder work just fine... until I enable my drives.  Once the drives are enabled (and only when the drives are enabled), the encoder (mapped through the H axis) begin to count backwards with no wheel movement.  I extended the mpg cable with some high quality shielded cable.  I have checked all of the pins, and nothing is shorted to the shielding.  All buttons and switches behave just fine, even during the error.  The encoder works great until the drives are enabled.

Any ideas on what could be causing this?  I will be digging deeper tomorrow, but wanted to see if anyone had some wisdom to share.



Offline kcrouch

  •  193 193
  • In way too deep!!!
Re: Crazy @$$ MPG
« Reply #1 on: December 31, 2010, 08:55:55 AM »
The MPG movement is handled entirely within the Galil, so, it appears to be noise on your MPG encoder lines that cause the movement. Use Smartterm and check to see if the position changes in the data record. That will help rule out Mach and the plugin as causes. If the encoder is single ended, you may need to use a DS26C31 line driver to make things more noise resistent. Long cables are killers for the low voltage signals in a machine environment.
Having way too much fun! Something must surely be wrong.
Re: Crazy @$$ MPG
« Reply #2 on: December 31, 2010, 02:09:56 PM »
I will read up on line drivers.  Odd that it works fine until the amps get turned on.  I am using shielded wire.

Also, neither Mach or the Plugin are responsible, I am only using the galiltools when I get this error.  The axis encoder is definitely reporting movement.   They are differential encoders, too.

« Last Edit: December 31, 2010, 02:23:20 PM by rforney »

Offline smurph

  • *
  •  1,548 1,548
  • "That there... that's an RV."
Re: Crazy @$$ MPG
« Reply #3 on: December 31, 2010, 06:54:55 PM »

It is not strange at all that the error comes when the amps are enabled.  Amps will introduce noise!  I would check your shielding.  Shielded wire does nothing if it is not properly implemented.  You may have to do some shielding on the amp and motor wires too.

This sort of thing is a nice big pain in the rear, isn't it?  :(

Re: Crazy @$$ MPG
« Reply #4 on: December 31, 2010, 07:51:00 PM »

I just checked the mpg shield, and it is well grounded.  Also, all of my cables are shielded, to include the servo power, I/O, and a lot of the cabinet internal wiring.  I double checked all of the shielding on all wires, and everything has good continuity.  I am willing to try anything at this point... Any other ideas?

Re: Crazy @$$ MPG
« Reply #5 on: December 31, 2010, 08:21:15 PM »
Hi Rob,
  I know nothing of the Galil but I can vouch for the line driver approach.
I had everything noise proofed as good as I possibly could and still had Master encoder State faults at my drives when connected single ended.
A line driver cleaned it right up.
Man, the time I wasted fighting it.
Will know next time.
Just my experience....good luck.
Re: Crazy @$$ MPG
« Reply #6 on: December 31, 2010, 08:39:31 PM »
For clarity, I would like to list how I am running things currently.

Axis A-D are running my servos.  Axis H main encoder is hooked up to my MPG (A+,A-,B+,B-, 5V, 0v).  For axis A-D, I am jumpered for Low Amp Enable Sinking, with isolated power supply (24V).  The H axis for the mpg is jumpered to High Amp Enable Sink, and using the onboard-5V power supply.  

The encoder works fine with the drives powered down.  If I disable the main power to the drives, and leave the control power on, and issue the SH command, my MPG still works fine.  It is only when I have the servo-drives truly engaged (main power on, and amp enable on) that I am recieving a drifting encoder count.

I thought that using a Diff encoder was supposed to noise-proof things up a bit.  

I will look more into the line driver, and figure out how I will implement one.  The one I saw online was a small IC chip-looking thing, and that kind of scares me.  I guess I will have to learn yet a little more before this is all done...

Also worth noting, there are no encoder errors whatsoever on my servo drives.


Re: Crazy @$$ MPG
« Reply #7 on: December 31, 2010, 10:11:38 PM »
Oh, it is already a differential connection. Wasn't sure from the previous posts.
The AB drives I'm using refer to the STEP and DIR signals as inputs from an auxiliary encoder, same as an encoder follower like an MPG.
Only 16 shielded inches from the BOB to the drives and they woud not work single ended.
I wish you luck.
Re: Crazy @$$ MPG
« Reply #8 on: January 09, 2011, 10:43:08 PM »
Just wanted to revisit this, and post my lessons learned.  I fixed my problem, and it was a two part problem.

Problem 1:  When grounding the shield on my servo power cables, I made a pigtail, spliced them to a green wire, and ran those about 24 inches away.  The right way was to ground them on the drive itself, along with the ground wire from the servo.  This was causing noise to spew everywhere!

Problem 2:  I made a wire harness, to allow my mpg to enter the cabinet using a cannon plug.  Inside the cabinet, I used two cables from the cannon plug-jack.  One to a galil axis, and the other to I/O stuff.  These are all shielded cables, and I chose to ground the I/O cable shield inside the cabinet to avoid ground loop, leaving the Axis cable shield disconnected from the cannon plug-jack.  Oops.  The fix was to remove my shield ground from the I/O cable, and to ground all of these shields to the galil axis cable. 

Man, the time I wasted thinking about resistors, capacitors, you name it.

I also realized that I should be using twisted-pair cables for my extension cable.  Hopefully, the shield will prove to be enough.

Thank you all for the help, I am almost there!