Hello Guest it is April 25, 2024, 12:14:18 AM

Author Topic: Can Master - Slave have different Axis screw pitch Settings?  (Read 591 times)

0 Members and 1 Guest are viewing this topic.

Can Master - Slave have different Axis screw pitch Settings?
« on: March 24, 2023, 03:52:49 PM »
Asking for a Friend he has 2 motors on say the Y axis, Master - Slave and the one Ball Screw has a very slight difference in pitch than the other. Can those be set differently in Mach 3/4?
Retired Master Electrician, Commercial HVAC/R Service and lots of Hobbys.
Re: Can Master - Slave have different Axis screw pitch Settings?
« Reply #1 on: March 25, 2023, 06:23:51 PM »
Hi,
I don't think so.

When you have a Master/Slave pair the trajectory data for each motor must be identical and that in turn  depends on how Mach communicates that trajectory to
the motion controller.

My understanding is that the numeric data is in the form of Steps rather than Units (of distance).

Lets say for example your axis has a Steps/Unit value of 500, ie 500 Steps per mm. If in a given 1 millisecond time slice the axis is required to move 0.23mm or 0.23 x 500=115.
Imagine for instance and the current Step count is 4567890....then the next Step count at the end of the time slice will be 4568005 (4567890+115). In effect Mach is specifying
a cumulative Step count where the axis has to be at the end of each 1 ms time slice.

If you have a Master/Slave arrangement the both motors will be given the same numeric Step count data. The motion controller will issue the same number of steps to each
motor driver and yet they will move different distances by virtue of having unequal pitch. It is not my understanding that the motion controller uses or converts the number
of Steps based on the Steps/unit value, that calculation happens in Mach....not the motion controller, ie it is not possible for the motion controller to apply a correction that would have
both motors travel the same difference.

I can only see one way where this would work.

I don't know whether you are familiar with AC servos but they all have 'Electronic Gearing'. This allows you to program the drive to accept a certain number of Steps to turn one revolution.
For instance if you had servo with a native encoder count of 160,000 count per rev (I picked this because this is exactly what my Delta servos have) but you can program it to accept
2500 Steps per revolution. If this were  direct coupled to a 5mm pitch screw then the Steps/unit value would be 500 Steps/mm.

Lets say you had a 0.2inch pitch screw at the other end of the gantry or in metric 5.08mm per rev. If you programmed the Electronic Gearing parameters in the servo drive to
2540 Steps per revolution then with 2500 Steps actually applied this end of the gantry would move 2500/2450 x 5.08=5mm. If the same number of Steps (2500) were applied to the
metric screw it would move exactly 5mm also.

Using the concept of electronic gearing we have made both ballscrews identical to each other...a nifty trick!! This requires that you have servos that utilise Electronic Gearing and this is
a feature of the servo drive.

The rather more complete answer to your question is that, at least to my knowledge, Mach cannot provide different Step data streams for a Master/Slave pair, nor can a motion controller
make a correction. The only solution I am aware of is to make use of Electronic Gearing in a servo drive to correct a difference in pitch between two screws.

Please note this is my understanding of how Mach works....and that I have proven again and again IS FALLIBLE. For instance if the numeric trajectory data to the motion control
is in Units (distance) then it may be possible. Yet another possibility is the Mach produces two numeric streams, one for each motor. In that case it might be possible for Mach to apply
different Step/Unit values for each motor such that they move in unison.

I'm hoping Smurph may see this post and respond......from the 'horses mouth' so to speak....sorry Smurph!

Craig
« Last Edit: March 25, 2023, 06:26:45 PM by joeaverage »
'I enjoy sex at 73.....I live at 71 so its not too far to walk.'
Re: Can Master - Slave have different Axis screw pitch Settings?
« Reply #2 on: March 26, 2023, 01:38:19 AM »
Counts Per Unit is a property per Motor not per Axis, so it may indeed be possible for different pitch screws to be used for the Master and Slaves on a given Axis. Like you, I would prefer for Smurph to speak to this question.

Steve Stallings
www.PMDX.com

Offline smurph

*
  • *
  •  1,546 1,546
  • "That there... that's an RV."
    • View Profile
Re: Can Master - Slave have different Axis screw pitch Settings?
« Reply #3 on: March 27, 2023, 01:48:43 PM »
With Mach 4, this is certainly possible.  As Steve said, the counts per unit are by motor, not the axis.  What happens under the hood is that the planner positions are kept in machine native units, and this is what makes it possible.  Say we have a machine that uses inches as its native units.  And the gantry axis is traveling .0001" where one motor is 10000 counts per inch and the other is 20000 per unit.  When .0001" is pushed down to the motors, it applies the counts per unit calculation to each motor.  .0001 * 100000 == 1 for the first motor and .0001 * 20000 = 2 for the second motor.  So it all works fine.  The counts per unit field in the motor tuning is also a double precision number with allows for the very fine tuning of the counts per unit.  However, if it is a stepper motor, the steps per revolution is ultimately the limiting factor on how granular the motor can be. 

Steve
Re: Can Master - Slave have different Axis screw pitch Settings?
« Reply #4 on: March 27, 2023, 03:11:49 PM »
Hi Steve,
thanks for that clarification.

I had always presumed that the trajectory data output by Mach to the motion controller was in the form of a 32bit integer cumulative Step count. Is this the case?
I would presume also that the trajectory planner if it takes a double precision Step/Unit value that the trajectory is calculated throughout the planner in double
precision format and only as the trajectory is pushed out to the motion controller that its re-cast as 32bit integer?

Craig
'I enjoy sex at 73.....I live at 71 so its not too far to walk.'

Offline smurph

*
  • *
  •  1,546 1,546
  • "That there... that's an RV."
    • View Profile
Re: Can Master - Slave have different Axis screw pitch Settings?
« Reply #5 on: March 27, 2023, 04:44:01 PM »
Craig,

Both the planner positions and the motor counts are double precision numbers.  I was always of the mindset that a count was a count or a step was a step and thus it would be an integer whole number.  But some motion controllers actually will take a fractional step count!  So the step/counts storage is also a double precision number.

Steve
Re: Can Master - Slave have different Axis screw pitch Settings?
« Reply #6 on: March 27, 2023, 04:54:05 PM »
Hi,
does that mean that the number posted to the motion controller (per motor) is a 64bit double precision float or an integer?

Craig
'I enjoy sex at 73.....I live at 71 so its not too far to walk.'

Offline smurph

*
  • *
  •  1,546 1,546
  • "That there... that's an RV."
    • View Profile
Re: Can Master - Slave have different Axis screw pitch Settings?
« Reply #7 on: March 27, 2023, 07:17:11 PM »
Hi,
does that mean that the number posted to the motion controller (per motor) is a 64bit double precision float or an integer?

Craig
Yes.  Well, the number posted to the motion controller's plugin is double precision floating point number (F64 or float64).  The actual motion controller itself may only use an integer.  But we certainly allow for fractional counts/steps IF the motion controller can use them.

Steve
Re: Can Master - Slave have different Axis screw pitch Settings?
« Reply #8 on: March 27, 2023, 07:29:02 PM »
Hi smurph,
Ah, yes. I was forgetting the motion controller plugin. That resides and runs on the PC and is not in anyway disadvantaged or encumbered
by F64 whereas the motion board itself is likely to suffer if it has to recast F64 to integer or whatever. It seems that they mostly have a 32bit
microcontroller or an FPGA neither of which are great at F64...by in large.

Having said that I've used Texas Instruments C2000 microcontrollers for motor control and that does 32 bit floating point good-oh, single cycle
multiply-and-accumulate at all that sort of thing. Yep, they 'put a horn on a jellyfish those things'.

Craig
'I enjoy sex at 73.....I live at 71 so its not too far to walk.'