Honor [AXIS_<letter>] TYPE in the interpreter, canon and motion - #4581
grandixximo wants to merge 2 commits into
Conversation
8bd0982 to
04d594b
Compare
|
Can axes X, Y or Z be angular axes? If not, is there a check to error when such axis is marked angular? |
The interpreter and canon took an axis to be a length or an angle by its letter, so an ANGULAR V moved 25.4 times too far under G20 and a LINEAR A did not scale at all. - src/emc/ini/axis_kinds.hh reads TYPE per letter and a new [TRAJ] FEED_AXES (default X Y Z), for both the interpreter and canon. X Y Z must be LINEAR, and the FEED_AXES letters must be LINEAR axes. - G20/G21 converts positions, offsets, stored positions and tool offsets by type. - F, G93 included, is measured along the feed axes that move, else the other linear axes, else the angular axes in degrees. By default that is XYZ, else UVW, else ABC. - Motion still measures a line by letter, so canon scales the rates it sends by motion's length over its own. The ratio is 1 with the default types. - The max velocity slider caps canon's length. Canon sends a per-move scale, 0 for a move measured in degrees, and tcPureRotaryCheck() goes. - WRAPPED_ROTARY and LOCKING_INDEXER_JOINT apply to any ANGULAR axis. - B and C moves use the angular minimum displacement, as A does. - rs274 (sai) takes its axes from [TRAJ] COORDINATES. With the default types the canon output is unchanged.
The interpreter and canon index the per axis tables and conversions by number, 0 X to 8 W. An enum in axis_kinds.hh names them, so axis_wrapped[AXIS_U] reads without counting.
04d594b to
6b7bb68
Compare
|
No, X Y Z have to stay lengths: arcs, cutter compensation and tool length all treat them as lengths. Also force pushed, a few things changed since your first review:
Description updated to match. |
|
I tagged this Two config shapes change:
The population is hand-written configs only: no in-tree config sets |
The interpreter and canon decide by letter what an axis is: X Y Z U V W are lengths, A B C are angles.
[AXIS_<letter>] TYPEis read by the AXIS GUI alone, so a V configuredANGULARon a mm machine moves 25.4 times too far underG20, and an A configuredLINEARdoes not scale at all.This makes both follow the INI:
src/emc/ini/axis_kinds.hh:TYPEper letter, the letter's default when absent, and a new[TRAJ] FEED_AXES, the axes F is measured along,X Y Zby default. X Y Z must stayLINEAR, and everyFEED_AXESletter must be aLINEARaxis; anything else is a startup error. The interpreter and canon read the same table, so they cannot drift.G20/G21conversion of a position, an offset, a stored position (#5161,#5181,#5211,#5221onward), a tool offset and the applied tool offset goes by type, in the interpreter and in canon.G93) and in canon alike: the feed axes that move, else the other linear axes, else the angular axes in degrees. With the defaults that is XYZ, else UVW, else ABC, as today.ANGULARV alone at the linear slider rate while aLINEARA alone escaped it. Canon now sends per move how the slider applies: the same ratio, or 0 for a move measured in degrees, which the slider does not cap. The scale travels with the linear, circular and probe moves totpAddLine()andtpAddCircle(), andtcPureRotaryCheck()is gone. With the defaults it is 1 on every move with X Y Z or U V W and 0 on the others, as before.WRAPPED_ROTARYandLOCKING_INDEXER_JOINTapply to anyANGULARaxis, U V W included, and are ignored on aLINEARone as they are on U V W today. The Python propertiesa/b/c_axis_wrappedanda/b/c_indexer_jnumstay.Two fixes ride along: B and C moves used the linear minimum displacement where A used the angular one, so on an inch machine a B or C move of up to 25.4
CART_FUZZdegrees was dropped; andrs274(sai) reported XYZABC whatever the INI said, so a program with U V W words could not be run through it. It now takes the axes from[TRAJ] COORDINATES.A second commit names the axis indices
AXIS_XtoAXIS_Winaxis_kinds.hh, so a lookup readsaxis_wrapped[AXIS_U]rather than[6]. It is mechanical and can be dropped on its own.Nothing changes by default
With every
TYPEandFEED_AXESat its default the output is unchanged: all 632 programs undertests/andnc_files/, throughrs274with no INI and with theaxis_mm,axisandaxis_9axissims, give the same canon calls byte for byte before and after. (The seven probe_basic probe macros are left out: they read an uninitialised probe result and differ from run to run on master too.)Tests
tests/interp/axis-type:rs274on a mm INI with ALINEARand VANGULARand wrapped: underG20A scales and V does not,G93feeds along A, V wraps from 350 to 370, andG10 L2stores A in mm and V in degrees.tests/axis-type: the same machine through task, canon and motion.G20 A1 V10reaches A 25.4 mm and V 10 degrees, V alone at F3600 turns 60 degrees a second underG20, X with A feeds along X, A with V feeds along A while motion runs its V measure 8 times faster so the move takes its 1 s, and V wraps. Under the slider, V alone keeps its rate, A alone is capped, and A with V is capped along A. On master it fails at the first check, A at 1.Not in this PR
ANGULARV shows in length units there. That follows in its own PR once this one is merged.FGREF, Fanuc parameters 1408/1465).This is the first half of item 10 of the multiaxis work in #4374, where the kinematics also learns which axes orient the tool so a head that tilts on V is driven on V. That part needs this one first; this one needs nothing else and stands on master alone.