Slaved pair auto squaring with closed-loop control

All things related to Centroid Oak, Allin1DC, MPU11 and Legacy products

Moderator: cnckeith

Post Reply
cncsnw
Posts: 3854
Joined: Wed Mar 24, 2010 5:48 pm

Slaved pair auto squaring with closed-loop control

Post by cncsnw »

I would like to hear what others are doing for auto-squaring gantry-style axes with closed loop controls.

A fundamental decision is whether to label the slave axis 'N', or whether to give it an addressable axis label such as 'V' or 'U'.

For conversation's sake, suppose we have a machine with a gantry Y axis, with the slave servo as axis #4. Axis #4, then, is paired with axis #2 to drive the gantry. Parameter 64 = 2 for pairing active; parameter 64 = 0 to turn pairing off.

Pros and cons if the slave axis is labeled 'N':
+) There is no chance of inadvertently moving the slave independently while paired, with an inappropriate G code command
+) There is no chance of the operator jogging the slave independently while paired, using 4th-axis jog panel buttons
+) The slave axis is automatically hidden from the DRO display and Part Setup screen
-) The slave axis will not hold position if pairing is turned off, e.g. during a squaring sequence
-) The slave axis cannot have its machine zero set or changed with M26
-) Because power is released from the slave axis when pairing is turned off, a resync may be required when it is turned back on.
A resync that occurs in the middle of a cycle (e.g. running the homing macro) causes that cycle to end prematurely.

Pros and cons if the slave axis is labeled 'V':
+) The slave will hold position even when pairing is turned off
+) The slave can be moved independently during auto squaring using its axis letter
+) The slave home can be set independently with M26
-) The slave home must be set with M26; it is not automatically set by M26/Y
-) Extra PLC logic is required to prevent the operator from jogging the slave axis independently while paired

Cons in either case:
-) The operator can move the slave axis independently, while paired, using the MPG handwheel unless PLC code is added to prevent this.

On the machine I was working on last week, the gantry has perhaps 0.150" - 0.200" possible movement between ends. The slave home sensor is positioned about 2.6" in (minus) from the Y+ limit/home position. The machine has some twist in the bridge, such that a small amount of servo torque (ca. 10%) is required just to hold the gantry square. It is unlikely that is going to get fixed any time soon.

Because releasing servo power during or after squaring allows the slave axis to spring away, labeling the slave axis 'N' on this machine was untenable.

The final homing macro I arrived at was:

Code: Select all

#101 = -2.6376        ; Expected Y axis machine position when slave home sensor trips

G10 P64 R2            ; Slave 4th axis to 2nd axis (Y)
G4 P0.5               ; Pause for slaving to take effect

M92/Z                 ; Home Z to plus switch
M26/Z                 ; Set Z home here

M92/X                 ; Home X to plus sensor
M26/X                 ; Set X home here

M92/Y                 ; Home slaved pair to Y+ sensor
M26/Y/V               ; Set home on slaved pair here

M105/Y P-50008 F30    ; Move slaved pair until clear of slave home sensor
M106/Y P+50008 F1     ; Move very slowly plus until sensor trips again
#102 = #101 - #5022   ; Difference between stored position and this Y position is out-of-square amount
IF [ABS[#102] < 0.001] THEN GOTO 900
  G10 P64 R0            ; Un-slave axes so Y can move independently
  G4 P0.5
  G1 G91 F10 Y#102      ; Move Y by the necessary correction amount
  M26/Y L#23804         ; Reset Y home to match slave encoder
  G10 P64 R2            ; Restore slaving
  G4 P0.5
  M92/Y                 ; Re-home slaved pair to Y+ sensor
  M26/Y/V               ; Set home on slaved pair here
N900
The key feature of this method is that it never forces the gantry more out-of-square than it was when we started, as can happen when doing M92 or M91 moves independently. Instead, we move the axes as a pair, until we have found out how much independent movement is necessary for squaring.

It does depend on the repeatability of the slave axis home sensor (the prox switch on INP8), because we just move until it trips, instead of looking for an encoder index pulse. On this machine, at least, moving to the prox sensor at 1.0 in/min seems to repeat within 0.001" or so, which is acceptable for the customer.

It would have made more sense, after the "G1 G91" correction move, to have reset the V home to match Y, with "M26/V L#23802". That would have eliminated the need for the subsequent M92 and M26. However, that did not work as expected. Unfortunately I did not make a detailed note of exactly how it failed to work....

If anyone else has addressed these challenges in a different way, I would like to hear about it.
cncsnw
Posts: 3854
Joined: Wed Mar 24, 2010 5:48 pm

Re: Slaved pair auto squaring with closed-loop control

Post by cncsnw »

I recently learned there is another major pitfall to assigning an axis label to the slave axis.

The System Test, in CNC12 Mill v5.08 and presumably in all earlier versions, does not look at Parameter 64 and does not recognize the slave axis for what it is. System Test, therefore, tries to move the slave axis independently until the machine jams and stalls.

Do not attempt to run System Test if you have assigned a letter label to your slave axis.
cnckeith
Posts: 7334
Joined: Wed Mar 03, 2010 4:23 pm
Acorn CNC Controller: Yes
Allin1DC CNC Controller: Yes
Oak CNC controller: Yes
CNC Control System Serial Number: none
DC3IOB: Yes
CNC11: Yes
CPU10 or CPU7: Yes
Contact:

Re: Slaved pair auto squaring with closed-loop control

Post by cnckeith »

System Test Advisement
system test image.png
Do not start or use the System Test macro with Hickory or with a system that has software Paired axes.

We released Hickory CNC12 software without testing the System Test macro with Hickory, and i'm frankly not sure how the software paired axes issue fell through the cracks. Please read below on how to defeat the System Test requirement from CNC12.

The Centroid System Test was created to ensure OEM’s properly setup the CNC Controller and don’t drop ship a CNC machine Tool to an enduser that has not been properly configured. The System Test has been around for years and has not been updated for use with Hickory.
Instructions for how to use the System Test for Oak and Allin1DC without paired axes is here
https://www.centroidcnc.com/dealersuppo ... ds/327.pdf


For Acorn and AcornSix the 'forced' System Test was removed from CNC12 many years ago since most of these users are building the CNC control themselves.

The System Test is largely trying to verify the Limit and Home switches are properly configured. For Hickory systems that use absolute encoders Limit and Home switches are redundant and most user will elect not to install them as they are optional items with Hickory systems.

The System Test also has an issue with systems that are setup with Software Paired Axes.

So, Do not start or use the System Test macro with Hickory or with system using paired axes.

You can eliminate it from the CNC12 start menu by running this macro attached or hand typing each line in MDI and then closing CNC12 and Rebooting the CNC controller.

forcing of System Test will be removed from the upcoming v5.1 CNC12 release and reintroduced in v5.2 after we have updated it and thoroughly tested it.
Attachments
defeat_system_test.nc
(185 Bytes) Not downloaded yet
Need support? READ THIS POST first. http://centroidcncforum.com/viewtopic.php?f=60&t=1043
All Acorn Documentation is located here: viewtopic.php?f=60&t=3397
Answers to common questions: viewforum.php?f=63
and here viewforum.php?f=61
Gear we use but don't sell. https://www.centroidcnc.com/centroid_di ... _gear.html
Post Reply