Hello Guest it is April 25, 2024, 09:55:22 AM

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

1231
Galil / Re: Mitsubishi J2S-40A and Galil DMC-2183 with ICM-20105
« on: November 29, 2013, 10:58:57 PM »
No, we don't use the Galil CR command.  Mach plans the trajectory for the circle and sends it down via LI or CD commands, depending on what the user has chosen to use in the Galil plugin (Linear Interpolation or Contour mode).  Whether it is a straight line with a single axis or a circle with multiple axes, it does not matter.  The same thing is happening.  The Galil gets the trajectory data from Mach and then the Galil is in charge of following it.  No matter what plans the trajectory, it NEVER gets planned more than once.  NEVER.  I don't know of any machine controller on the planet that does this.  Fanuc, Fidia, EMC, etc...  Why would they?  The trajectory is computed and then it has to be followed.  If the machine cannot follow the trajectory and it has to have the trajectory re-planned, that is a bit like having the tail wag the dog.  That is one messed up dog!  :)

Here is a sample of what we are sending to the Galil (A lathe in this case).  The moves are incremental and it is using Linear Interpolation in this example.  Mach plans the LI data points.  The BG S command tells the Galil to start executing the trajectory:

LM AC
VT 1.000
VD 30000000
VA 30000000
LI -170,,-57<11206
LI -341,,-114<22470
LI -204,,-68<13438
LI -1,,-1<88
BG S  
LE

If the movement is complete and the table is not at the correct position, then the PID parameters need to be looked at.  The real-time component in a servo motion system is used to look at the incoming position data and adjust the servo drive command inputs (via the PID filter) to maintain an acceptable following error.  The target positions and target velocities have not changed.  If the following error is too great, then the PID loop may specify more voltage on the command inputs of the drive.  (Stepping on the gas).  If it gets too aggressive, then the PID loop may specify less voltage on the command inputs of the drive.  (Stepping on the brakes).  

The car/driver analogy fits very well.  Say you plan your route to get to the hardware store.  This route includes a lot of starts and stops and some curves.  This route planning is what Mach does.  Accel to slew, slew (Speed limit), and decel to stop.  Turn right, accel to slew, slew, and decel to stop, etc...  You, as the driver of the car, are responsible for following the route.  You are the motion controller!  If you accell too much, you may get a speeding ticket.  Also, if you fail to decel, you make get a ticket for failing to stop.  You manage all of this by looking at the speedometer and visual judgements (encoders) and adjusting how much gas or brakes (PID loop) it takes to command the car.  This is the real-time component.  What happens if you hit the brakes too much and you don't reach the stop sign at the intersection?  Do you re-plan your route?  No.  Because the route has not changed.  The road has not gotten any longer and the target stop sign hasn't moved.  You just failed to command the car correctly.  In this case you need to go back to driving school (update your PID values).  :)

With the Mach/Galil combo, Mach is the HMI, G code interpreter, and trajectory planner.  The Galil controls the motion to follow that trajectory.  That system will make beautiful parts with high accuracy and repeatability if the machine hardware is up to it.  In fact, it puts the original YASNAC controller on my Matsuura mill to shame.

Steve

1232
Galil / Re: Mitsubishi J2S-40A and Galil DMC-2183 with ICM-20105
« on: November 29, 2013, 02:44:11 PM »
Mach does the trajectory planning once.  Say move X axis 20.0 units (G01 X20.0 F20).  Why would Mach ever have to re-plan that trajectory?  That part never changes!  The over all goal is to move the X axis 20.0 units.  The planner calculates the proper accel/slew/decel profile to get there and that is a constant!  I don't know why people get stuck on trajectories ever having to be re-planed.  This is NEVER the case no matter what control is being used.  Mach can send these trajectories to the Galil in a variety ways;  Linear Interpolation mode, Contour mode, and (in the future) position with velocity over time (PVT) mode on the newer controllers.

What I think people get confused with is what the PID loop is actually doing.  It is not controlling the planner or modifying it.  It is controlling the servo drive by looking at the following error.  If the drive is not able to follow the planned trajectory and the following error increases, the PID loop makes adjustments to the servo drive inputs (command velocity/torque) to correct that situation.

Mach feeds the Galil with a trajectory.  The Galil then does what it takes to follow that trajectory.  If the Galil can't make the servos follow the trajectory, then no re-planning is ever done.  Mach told the Galil to move X 20.0 units and it just didn't get it done.  Is this a reason to re-plan the trajectory?  No!  It is a symptom of an incorrectly tuned servo/control loop!  The Galil KP, KI, and KD parameters need to be tuned.

When Mach plans a trajectory to move the X axis 20.0 units, it is very much analogous to using the Galil PR command.  Say the encoder is 10000 counts per unit so PRX=200000 would be equivalent to the G code G01 X20.0.  If you issued that PRX=200000 command on the Galil terminal, the Galil would plan the trajectory and then execute it.  It will never re-plan that trajectory if the servos didn't hit the numbers.  It does not come back and issue an extra PRX=1000 if the servos ended up 1000 counts short.  What it does do is look at the following error and see that it is 1000 counts short of it's planned trajectory and then it increases the command voltage to the servo drive to get it there.  If the PID parameters are correct, then the goal will be obtained.

All of the features of the Galil still work when used with Mach.  You can still use the dual encoder feedback.  Why?  Because the loop is closed on the Galil.  Mach doesn't have to close the loop.  Mach will never close the servo/control loop on Windows because Windows is not a real-time operating system.  Mach depends on controllers like the Galil, Vital Systems DSPMC, and Mesa (future) to do this.  Closing the servo loop NEVER involves re-planning the trajectory.  Closing the loop is always about correcting the following error while executing the planned trajectory. 

I have run the dual encoder feedback on the Galil.  It does work but it has its limits.  Galil fully explains these limits.  And it should be used as a last resort!  It is always best to fix mechanical errors with hardware rather than fixing them in software.  Galil also offers special firmware that can map screw variances and account for backlash.

Steve

1233
Contec / Re: Which Contec cards work with the plugin and which don't
« on: November 22, 2013, 01:00:46 PM »
It depends on the current capacity of the card and the specs of the relay coils.  I have no idea what the specs of the card is.  The Contec website probably has that information.

1234
Galil / Re: Galil Plug In
« on: November 21, 2013, 02:39:42 AM »
The documentation is on the plugin download page.

1235
Galil / Re: Mitsubishi J2S-40A and Galil DMC-2183 with ICM-20105
« on: November 21, 2013, 02:38:49 AM »
The Galil has the servo/PID (control) loop.  With the Mach/Galil combo, Mach is the HMI and trajectory planner.  The Galil does all of the real-time PID loop stuff.  The combination works really well. 

1236
Galil / Re: Galil controller compatability (what works with the plugin)
« on: October 30, 2013, 06:53:09 PM »
Nothing is downloaded to the controller in the normal case.  The plguin is a Windows DLL that drives the Galil controller.  So yes, Mach3 is all Windows. 

Mach4 will have a Galil plugin eventually.  However, it will not be at the time of the Mach4 release.  I actually have a semi-working Mach4 plugin.  But it will take a while to get it as fully functional as it is under Mach3.  But I can say with certainty that the Mach3/Galil combination is a good one for a 3 axis mill.  It blows away the old YASNAC controller that was on my machine.  Puts it to shame.  The Galil plugin supports gantry type machines.  But I don't have a gantry machine so the code may not be the best for gantry systems.

Steve

1237
Galil / Re: Galil controller compatability (what works with the plugin)
« on: October 30, 2013, 01:07:58 PM »
Does the DMC-40X0 controller work with Mach 3? Any restrictions?

At the time I wrote that compatibility synopsis, the 40x0 and 41x3 controllers were not here yet.  But to answer your question, the 40x0 and 41x3 controllers work fine with no restrictions.  In fact, I run my Matsuura mill on a 4080.  It is poetry in motion.

Steve

1238
Galil / Re: Updated PCI driver, Mach can't connect
« on: October 27, 2013, 03:29:01 PM »
It is rather difficult to use the Galil Tools or Galil Suite API and libraries.  They are C++ and as such, It needs library that is compatible with VS2003, among other things.  Galil Tools dropped support for the ISA and USB (20x0) controllers and they have not come back in Galil Suites.  So is it just a matter of time that PCI goes as well?  I think so. 

The 4.5 plugin has code that works with SmartTerm or Galil Tools PCI device drivers.  This was unbelievably hard to do.  It totally bypasses the Galil API and only the device drivers need be installed.  I have no idea if Galil changed the device drivers for Galil Suites, so your mileage may vary.

Unfortunately, we can't write one plugin that works with SmartTerm, Galil Tools, and Galil Suites APIs all at the same time. 

Steve

1239
Galil / Re: Amp enable pins
« on: October 27, 2013, 03:15:24 PM »
The Galil controls the amp enable vial the SH and MO commands.  This is the ONLY thing that will drive those.  The plguin issues SH and MO appropriately.  However, if you want to control the enable of your amps directly from Mach, you will need to use output and map the mach enable signals to them.

Steve

1240
Galil / Re: Galil for spindle
« on: October 27, 2013, 03:11:25 PM »
You simply map the spindle to the axis in the plugin configuration and use the motor cmd for that axis to drive the VFD speed.  Then you tell if it is 0-10 or -10 to +10.