Machsupport Forum

Third party software and hardware support forums. => Galil => Topic started by: fullqueue on September 23, 2011, 11:28:17 AM

Title: Galil DMC2140 Help
Post by: fullqueue on September 23, 2011, 11:28:17 AM
This is my first post here so please bear with me.  I wanted to include some background information in case there was something that I did, or an assumption made that I shouldn't have.

I have a fully functional 3 axis machine that is based on a Galil DMC2140 motion controller with Parker servos.  It's an XYZ table that was used in a lab with a Labview front end.  We received this machine so that we could retrofit it so that it could perform a DXF import and trace the drawing with a paste using an EFI dispenser.  Instead of trying to implement the DXF to DMC function (which is no longer supported by Galil) I figured that something like Mach would do this in a snap.

Current Status
We had previously upgraded the computer to a Win7 machine so I had some issues using GalilTools with Mach3.  After finding some threads on this issue and finding a new DLL plugg-in posted by smurph, I was able to get the PC and DMC talking.

After they were talking, I was having major issues getting any movement.  After several days of randomly trying different configurations, I set the Axis Setup --> Motor Type to Servo Reverse.  Now I was able to jog!  However, now the motors judder while they are stopped.

Question 1: Is it normal for the servo motors to vibrate while the machine is stopped?  This only happens after I've initiated a jog command and the motor comes to a stop.  Note that I'm new to machine building in general so let me know if this is a dumb question.  Right now, I'm assuming that it has something to do with a servo tuning parameter that Mach has modified since this machine was tuned properly when we received it.

The machine is setup with a +, - and home switch for each axis.  I'm able to home XYZ if I start on the + side of the home for XY (I have home negative selected) and on the - side of Z.  If I'm on the other side of home, Mach will reach the limit switch and EStop.  After an EStop I can't reset the controller (using RESET button) until I power cycle the controller and move the axis off the limit using another tool to jog it.

Question 2: How can I get Mach to override the limit?  I have Auto LimitOverRide selected in the settings page.
Question 3: How can I get Mach to bounce off a limit and continue to home?

I've attached 2 debug files.

GalilDebug-Startup-X+Limit.txt:  This is a Mach startup with the X axis on the X+ limit switch.  At startup, I can't get Mach to do anything.

GalilDebug-HomeZ-HomeY-XLimit.txt:  This is a log of me jogging the Z axis south of home then successfully homing.  Then jogging the Y axis to the + side of home, then successfully homing.  Then homing the X axis on the - side of home and getting stuck at the - limit.

Other info, I'm actually able to load and run the "Roadrunner" gcode file successfully if I position each axis in the center of travel.  I feel like I'm pretty close to getting this thing to work!

Any guidance at all would be greatly appreciated.

Title: Re: Galil DMC2140 Help
Post by: NosmoKing on September 23, 2011, 01:51:31 PM
Are the  O.T.  Limit inputs fed directly into the Galil? As they usually are direction dependent, i.e. If you hit one direction Galil does not switch the motors off, only the reverse direction is enabled to allow you to jog off again. If the + & - switch connection is reversed, then it could also be the cause.
They may be wired in differently  with Mach?
For tuning, I always use either the free Galil Terminal program to talk directly to the card and carry out the manual tuning suggested in the front of the manual, or better still get the ServoTune program from Galil, it used to be ~$200.00.
Once the Galil tuning parameters are working, burn them in to Eprom (BN command).
The old system may have just loaded them every power up time, (the lazy way)!!
BTW I just looked at your tuning parameters KI, KD, KP and they show all Galil default, so there may be the issue.
Title: Re: Galil DMC2140 Help
Post by: fullqueue on September 26, 2011, 10:31:44 AM
Thanks for the reply!

The O.T. limit inputs are fed directly into the Galil.  I'll recheck the wire connections to be certain, but the Limit LED indicators on the Settings page of Mach seem to indicate a correct connection.  I can activate the sensors and watch all of the correct LEDs light up.  This machine has fancy hall effect sensors on it so I can just put a piece of metal in front of the sensor.

I plan on purchasing the full version of GalilTools this morning.  It claims to add the ability to perform an automatic servo tuning.  It's currently running $195.

Last Friday I felt that I was pretty close to a running system.  I made the mistake of upgrading the Galil firmware to the latest version and everything seemed to go downhill from there.  Even the C# program that I had written to speak DMC to jog the Galil stopped working.  Now I get error 22 if a limit is hit.  This error does not go away until I turn the machine off and back drive the table to deactivate the sensor.  Before I upgraded, I could at least power cycle the Galil and jog off of the limit.

Title: Re: Galil DMC2140 Help
Post by: fullqueue on September 26, 2011, 10:41:30 PM
OK.  I was able to get the system back to where I left off before I upgraded the firmware.

It turns out that the Galil was configured to drive the Parker drives and Parker servo motors as steppers.  After I changed the motor type to stepper active high, everything started behaving as before.

Also, since this machine has Parker drives for each axis, all of the servo tuning was done in the drive.

I still have the issue of not being able to jog off of a limit or Reset mach after I've reached a limit.  To recover, I need to open up GalilTools and jog off of the limit manually before I can Reset mach.  Has anyone else experienced this issue?  Am I trying to use mach incorrectly?

What do most people do in order to "Home" their machine when their home switches are near the center of travel?  Or do people mostly put their home switched near their negative limit?

Thanks for any and all input!
Title: Re: Galil DMC2140 Help
Post by: kcrouch on September 27, 2011, 08:46:40 AM
If using Galil tools, can you jog into a limit switch and then back off OK? If so then it is likely that you have some Mach settings such as jogging direction set incorrectly. The limits might also be set to the wrong state active high or low in the plugin. But until you verify that everything works using only Smartterm or Tools, you won't know for sure.
I keep the home switch very close to one of the limits as it makes setup and operation much easier.
Title: Re: Galil DMC2140 Help
Post by: fullqueue on September 28, 2011, 05:59:34 PM
Kenny,  thanks for your reply.

I am able to jog to a limit switch and back off using GalilTools... I actually use a simple app that I wrote that will issue jog commands using buttons.  This works well.  But this also works using DMC commands in the terminal in GalilTools.

I believe that the limits are configured correctly since I don't have any LEDs active on the diagnostics page.  That is unless I've asserted one of the limits.  I'm using the "Config Galil Limits Active Low" option in the plugin dialog (not Active Low in ports and pins).  The homes are active high.

I've also experimented with disabling the limits in the ports and pins page.  This does not change the behavior!  Mach will still go into EStop when I hit a limit.  The only thing that changes is that the LEDs will no longer light up when the limit is activated.

I've also experimented with mapping the home to the limit switches (via ports and pins).  What happens is that Mach will EStop when homing when it hits the limit.  It does light the Limit and Home LED at the same time but it does not ignore the limit situation during a home.  I'm not sure how to use the "Use Limits as Homes" option in the pluggIn dialog.

Other than this issue, I have the machine working well.  I can home. I can load GCode and run a program.  The only thing I can't do is jog off of a limit switch!

Again, what I'm expecting (from watching the tutorials) is that Mach will EStop when I hit a limit.  Then I "Override the limit", Reset and jog off the switch.  Instead, I just can't reset until the limit is not active.

Any ideas?  I'm willing to try out any other configurations of pins, high/low logic or other if anyone has any ideas.

Title: Re: Galil DMC2140 Help
Post by: Machinehead57 on April 04, 2012, 02:56:10 AM
If you are still having this problem, in the ports and pins setup there is a limit overide input. A push button assighned to this pin correctly will allow you to a reset then job off your limit. You have to hold the button then press the reset then jog off. The button nulls the limit.

Title: Re: Galil DMC2140 Help
Post by: fullqueue on April 04, 2012, 09:59:54 AM
Thanks for the reply!  The machine is working great except fort this limit override issue.  I'm delivering the machine to the customer next week but I will let them know how they could work around this using the override button.  It hasn't been a big issue really.  The only problem is that I have another application that I wrote to use machine vision to position the machine.  When I switch between this application and Mach3 there is potential for hitting a limit while homing.
Title: Re: Galil DMC2140 Help
Post by: smurph on June 04, 2012, 03:36:40 PM
Limit switches are a bit funny with the Galil.  It has to do with how the limit switches are wired.  If LSCOM is positive, then the limits will show active high (a 1 in the data record) when the appropriate limit is shorted to ground.  If LSCOM is negative, then the limits will show active low (a zero in the data record) when the appropriate limit is connected to positive.  Then, in the plugin config, you need to tell the plugin how the limits are configured (active low or high).  This actually sends a CN command down to the galil.  If this is not setup correctly, then you will not be able to jog off the limits.