Author Topic: PMDX-424 Gantry squaring (master AND slave drive limit switches)  (Read 8371 times)

beerus

  • Posts: 15
    • View Profile
Dear all, I have four motors mapped out in Mach4 as follows:
Motor0 - *NOTHING*
Motor1 - Z Axis (Up + / Down -)
Motor2 - X Axis (Right + / Left -)
Motor3 - Y Axis (Forward + / Back -) (NOTE 1)
NOTE 1: I am letting PMDX 424 Slave feature control my two-motor gantry and they are plugged in to the 3A (master) and 3B (slave) jumpers respectively (with the 3B motor having reversed the phase manually).
NOTE 2: I have four proximity switches on the Y axis: Two in the front: Y- (Left) and Y-- (Right); and Two in the back: Y+ (Left) and Y++ (Right).
QUESTION: Is there a way to "map out" ALL FOUR proximity switches on the Y axis in EITHER Mach4 (which I couldn't find) or the SmartBOB controller? I would like to be able to use them for either/both Squaring the gantry / limit switches. So far, I only found a way to use EITHER the Y-, Y+ (Left set) OR the Y--, Y++ (Right set) combinations. Hope this makes sense!
Thank you!!!
P.S. To achieve this, I had to revert back to Motor0 (Z), Motor1 (X), Motor2 (Y master), Motor3 (Y slave) configuration (manually making Motor3 a slave to Motor2 in Mach4 and "loosing" the 3b Jumper).

Bob at PMDX

  • Administrator
  • Posts: 368
    • View Profile
    • PMDX
Re: PMDX-424 Gantry squaring (master AND slave drive limit switches)
« Reply #1 on: August 21, 2016, 01:08:58 AM »
The only way to have separate limit switches for the master and slave motors is to use Mach4 to define the master/slave.  When using the PMDX-424's hardware slave feature Motor3A and Motor3B appear in Mach4 as a single motor named "Motor3" and so there is only 1 set of Limit+/Limit-/Home inputs available.

NOTE: The SmartBOB plug-in does not currently support gantry squaring, either on the PMDX-424's Motor3A/3B hardware slave, or using Mach4 to configure the master/slave motors.  This is mentioned in our release notes under "Known Issues'.  We *will* support this, but it isn't there yet.

In fact, if you assign different home switch inputs to the master and slave motors and try to home that axis, the plug-in will generate an error saying the axis motors must use the same home switch.  The plug-in *will* allow different limit switches for the master and slave motors.  It is only the home switch that must be the same for both motors.  This restriction will go away when we support gantry squaring.
Engineering Hell: Everything's right and nothing works.
Bob's Corollary: If everything's right and nothing works, double check your assumptions.

beerus

  • Posts: 15
    • View Profile
Re: PMDX-424 Gantry squaring (master AND slave drive limit switches)
« Reply #2 on: August 21, 2016, 09:35:30 AM »
Thank you. While we leave these tinctures.

broered

  • Posts: 22
    • View Profile
Re: PMDX-424 Gantry squaring (master AND slave drive limit switches)
« Reply #3 on: October 10, 2016, 02:30:42 PM »
NOTE: The SmartBOB plug-in does not currently support gantry squaring, either on the PMDX-424's Motor3A/3B hardware slave, or using Mach4 to configure the master/slave motors.

I assume that BOTH methods will eventually allow you to step the two gantry motors separately. 

(Bob; can you please verify the information provided below.  if not, please remove this so it doesn't add confusion) 

PMDX-424 SOLUTION:
MACH4 setup is configured to recognize the PMDX-424's M3 to drive the gantry.  MACH4 "thinks" this is just one motor.  The PMDX-424; M3a output drives one gantry motor, M3b output drives the other gantry motor in the opposite direction.  The squaring solution would have to be a software routine, designed into the SmartBOB driver software, that would allow for separate movement of M3a and M3b. 

MACH4 SOLUTION:
MACH4 setup is configured to recognize the PMDX-424's M0 and M3a to be the two gantry motors.  MACH4 configuration setup would need to have one of the two motors operate in reverse direction or reverse the wiring on one of the two motors.  The squaring solution would need to be done through a family of MACH4 scripted routines that would allow individual movement of the PMDX's M0 or M3A.

Once PMDX gets gantry squaring working, I'm betting this would be a preferred method.  In the mean time, I'm wondering if anyone has gone to the trouble of writing the necessary scripts to use the MACH4 solution?


Bob at PMDX

  • Administrator
  • Posts: 368
    • View Profile
    • PMDX
Re: PMDX-424 Gantry squaring (master AND slave drive limit switches)
« Reply #4 on: October 11, 2016, 03:05:59 AM »
Your description of the "PMDX-424 Solution" is essentially correct.

The "Mach4 Solution" is not quite.  In Mach4, homing is handled entirely in the plug-in and motion device.  All that Mach4 does is send the plug-in a message saying "Home this axis and tell me when you are done".  That is the same whether or not Mach4 is configured for slaved motors.  Our plug-in reads the motor mapping information and detects whether there are slaved motors on any axis.

It may be *hypothetically" possible to write Lua code to try and home motors, but it will be impossible to get any kind of accuracy due to the non-deterministic response time in getting home switch info into the Mach4 core.

Someone early on in the Mach4 development (maybe late 2015???) created (or tried to create) Lua code that would un-slave the two gantry motors, map the slave motor to, say, the "C" axis.  It then commanded the "X" and "C" axis to home at the same time.  After the homing was complete it would then re-map the 2nd motor as a slave on the X axis.  This was posted on the Mach4 support forums (https://www.machsupport.com/forum/) so if you are interested you can go search there.  I don't recall if it ever worked.

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

broered

  • Posts: 22
    • View Profile
Re: PMDX-424 Gantry squaring (master AND slave drive limit switches)
« Reply #5 on: October 11, 2016, 02:02:15 PM »
Thanks Bob
WOW!  I now understand why PMDX is working a gantry squaring effort to support the PMDX-424.  Never imagined that the MACH4 solution could be such a can of worms!

Looks the best thing would be to wait for the PMDX squaring solution.  Hope you can help us out soon.

On the bright side -- at least I know how I should wire the PMDX-424 to my motor drivers now.

phogg

  • Posts: 3
    • View Profile
Re: PMDX-424 Gantry squaring (master AND slave drive limit switches)
« Reply #6 on: April 08, 2019, 11:04:13 PM »
Hi,

I am wondering if this feature is something that is likely to be included soon? There seems to be no easy way of doing this from Mach4, but would be absolutely fantastic if the PMDX-416 could handle optionally auto-squaring an axis if it has a slave motor with it's own associated limit switch. Would help me out a tonne! My machine uses Clearpath servos which 'jiggle' when you initially power them, so every time I boot the machine up I have to mess around trying to square the gantry axis.

I'd even be willing to pay for the development of this feature. Any chance??

Phill

mckinleyrb

  • Posts: 3
    • View Profile
Re: PMDX-424 Gantry squaring (master AND slave drive limit switches)
« Reply #7 on: December 09, 2020, 04:22:28 PM »
Here is my working solution.  I think the code could use some improvement but it works every time.  If anybody wants to tell me why  I need to call mc.mcCntlEnable 6 times I would appreciate it.

https://www.machsupport.com/forum/index.php?topic=44044.new#new