Hello Guest it is August 17, 2019, 02:03:57 PM

Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.

Messages - smurph

Galil / Re: Spindle Basic Setup
« on: January 04, 2011, 12:48:26 PM »
Like I said, that subject is waaaay beyond the scope of this Galil support forum.  You might try posting in the General forum and get some help.  There are also video tutorials on Brains.  But bear in mind, you are wanting to do what almost no one has wanted to do in the past.  So there is not going to be a drop in solution.  It may not even be possible.

I will try and put something in the plugin that will make it easier.  But I'm really having trouble figuring out how I would get that information back to Mach.  I might just have to place that information into a user DRO or something.  But that will not be in the plugin until I get finished with the new API (no idea when at the moment).  So it you want the RPM feedback sooner, then you will need to investigate other options.


Contec / Re: Which Contec cards work with the plugin and which don't
« on: January 04, 2011, 12:36:34 AM »
Sorry, no.  That is not an option.  It's an I/O plugin only.  Have a look at the Smooth Stepper for a nice stepper motor controller that doesn't use the parallel port.


Galil / Re: Spindle Basic Setup
« on: January 03, 2011, 03:25:35 AM »
There is no problem.  Typically, Mach commands the spindle to a certain value.  If you set the spindle speed to 1000 RPM, then Mach expects the spindle speed to be 1000 RPM.  There is no PID loop from Mach controlling the spindle for external motion plugins, so there is no need for RPM feedback.

Feedback from the galil is in counts because, after all, it reads an encoder.  You could possibly write a brain to sample the counts of the spindle encoder and do the required math to calculate RPM based on your encoder counts per revolution.  But that is a subject waaaaaay beyond the scope of this Galil forum.

Why do you need spindle speed feedback?  If you just want to check that the spindle is doing the commanded speed, then put a tachometer on it temporarily.


Galil / Re: Position or torque mode?
« on: January 03, 2011, 02:24:36 AM »
You have mid-move stutters when the Galil is doing the slaving?  If so, then there is a mechanical problem.  Mach should be driving the X axis and the slaved axis should just follow it.

PM me your email address.  I have a new plugin for you to try.  MPG may be buggy in this plugin, as I just re-vamped the MPG code.  But it should do the right thing for slaving if the master axis is configured as a stepper axis.


Galil / Re: Position or torque mode?
« on: January 02, 2011, 11:04:59 PM »
I took a look at the debug file.  I didn't see any MPG commands in it.  It does show that you are using Mach to slave your Galil D axis to your Galil A axis.

The Galil plugin was developed primarily to enable the use of analog servos in Mach.  You are using your servos like steppers.  That being said, there is support for stepper motors in the Galil.  However, support for stepper motors is very lacking in the plugin, as none of the developers of the plugin have any stepper motors.  Stepper motors seem to work fine with a basic config.  But slaving is not the same command with steppers, as you have discovered.  

If you enable slaving in Mach, then the galil plugin is going to send a GA,,,X, as this is the proper thing to do with servos.  This basically negates your previous command of GA,,,CA.  So...  you need to disable slaving in Mach and do it all on the Galil.  These commands are what you will be needing in the GalilInit.txt file.  Remember, no slaving in Mach!

GA,,,CA  // slave axis D to master axis
GR,,,1    // gear ratio 1:1
GM,,,1   // gantry mode

(Leave the comments out of the file.)

This way, Mach only controls axes A, B, and C.  The Galil does all of the slaving.  But...  you will have to make sure that the gantry axis is square before Initializing the Galil from the plugin.  When Mach homes the gantry axis, it will think it is only homing 1 axis.  Mach will have no notion what so ever that there is a slave configuration.  This is fine, as long as you realize that none of the Mach slaving controls will be useful.

I updated the plugin code to take a look at the master axis motor type and do the right thing if it is a stepper motor.  However, that will not be available until the next release.  (I don't know when that will be at the moment.)  Maybe this will get you going until then.


Galil / Re: Position or torque mode?
« on: January 02, 2011, 06:03:26 PM »
Make a file called GalilInit.txt, put your GA,,,CA command in it, and place the file in the plugins directory.  When the plugin initializes the Galil, it will send the contents of that file to the controller.  You can put more than one command in that file if needed.  One command per line.

BTW, if you think position mode is fast, try velocity or torque mode.  The full version of Galil Tools provides a tuning function for the servos.  It will get you in the ball park.  Well worth the price of admission if you have never tuned servos before.


Mach SDK plugin questions and answers. / Re: PLUG IN WRITERS
« on: January 01, 2011, 07:07:02 PM »
Sorry...  I didn't get the notifications that people had responded.  They got caught up in my spam filter.  I have sent the plugin to all that have provided email addresses.


Galil / Re: Crazy @$$ MPG
« 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?  :(


Galil / Re: Home switch set up
« on: December 30, 2010, 02:06:38 AM »
-X low and X home enabled with the same pin config is not a good idea.  They are two separate signals in Mach.  So keep them separate.  Map Mach X-- to port 1, pin 9.  Then map Mach X home to port 1, pin 17.  If you use a limit switch also for a home switch, jumper the switch to both the -X and X home on the Galil ICM.  Limits switch signals are disabled when homing!  This is to allow using a limit switch also as a home switch. (Which I really don't know why anyone would want to do, but people asked for it.  Me?  I'm buying a $8.00 switch to do the job...)

The Galil plugin is looking for the Mach home signal to become activated.  It basically does a jog towards the home switch using the Galil JG command.  Say 2000 counts per second.  That would be JGX=2000 to move the X axis in a positive direction as 2000 is a positive number.  If you hit the home switch and then move off before Mach catches the signal (1/10th of a second), then you might have a problem.  If this is the case, you need to rig your switch to stay activated longer.

When Mach sees the home signal get activated, the galil plugin stops the axis.  It then reverses the axis by taking the initial jog velocity and multiplying it times -0.1  So 2000 becomes -200.  So JGX=-200 is sent to the controller.

When Mach sees the home switch go to the inactive state, the galil plugin stops the axis withing 1/10th of a second.  Homing is done at this point unless you have specified the use of the index pulse.  

If using the index pulse, the galil plugin issues the same JGX=-200 jog command until it finds the index pulse from the encoder.

That's the sequence anyway.  If you are blowing past your switch and your are seeing the signal light up in Mach, then there might be an error in the commands going to the controller.  Enable the debug output in the plugin configuration.  This creates a GalilDebug.txt file with the commands sent to the controller and the controller's response to them.  Then repeat your home operation and exit Mach.  This will fill the GalilDebug.txt file with the information from your home operation.  Then find the GalilDebug file (usually in c:\mach3 or c:\mach3\plugins) and send it to either Kenny or Myself.  Our email addresses are in the plugin PDF manual.


Galil / Re: Mach3 & Galil using stepper motor and encoder feedback
« on: December 30, 2010, 12:36:32 AM »
That's Stepper Position Maintenance (SPM).  You have to set up code to catch position errors.  Where the position error is "caught", the motor stopped, and then a POSERR subroutine is called to correct the error.  Unfortunately, this is nowhere near a closed PID loop.  :(  

Also, this "mode" of correction is not suited to the way we stream data to the controller.  We don't download a Galil script to the controller at all.  If you run the plugin and enable debug output, then you can see what we are doing by looking at the GalilDebug.txt file.  

So, unfortunately, all that the plugin supports is open loop control for stepper motors on the Galil.  :(