Miglioria 2.6j9. Si ribadisce pinza in presa sempre, all'inizio, in base a quella attiva

This commit is contained in:
andrea.villa
2024-10-25 14:35:36 +02:00
parent f346df9d27
commit 4448156fec
3 changed files with 12 additions and 5 deletions
+8 -4
View File
@@ -1544,6 +1544,14 @@ function SpecAdjustCarriages( vCmd, dTPosI, dYDeltaI, dVDeltaI, dTPosF, dYDeltaF
local bZmaxOk = EnsureZmax( bZmaxOk, vCmd)
end
-- ribadisco pinzaggio
if EMC.YDELTA then
table.insert( vCmd, { 11, 1})
end
if EMC.VDELTA then
table.insert( vCmd, { 12, 1})
end
-- reset contatore primo riposizionamento con compensazione lettura laser
EMC.CNT = nil
@@ -1578,7 +1586,6 @@ function SpecAdjustCarriages( vCmd, dTPosI, dYDeltaI, dVDeltaI, dTPosF, dYDeltaF
if ( dYDeltaI - dVDeltaF) + 10 * GEO.EPS_SMALL >= MyMinY - MaxV and abs( dVDeltaF - dVDeltaI) > 10 * GEO.EPS_SMALL and not EMC.PILGRIMSTEP and
( dVDeltaF - dVDeltaI > MinV - dVPosI + MyMinY - dYPosI) then
table.insert( vCmd, { 0, 'Direct-V-Y'})
table.insert( vCmd, { 12, 1})
-- se l'altra morsa non era in presa, vado a pinzare il pezzo
if not EMC.YDELTA then
dYPosA = MyMinY
@@ -1684,7 +1691,6 @@ function SpecAdjustCarriages( vCmd, dTPosI, dYDeltaI, dVDeltaI, dTPosF, dYDeltaF
elseif ( dYDeltaF - dVDeltaI) + 10 * GEO.EPS_SMALL >= MyMinY - MaxV and abs( dYDeltaF - dYDeltaI) > 10 * GEO.EPS_SMALL and not EMC.PILGRIMSTEP and
( dYDeltaF - dYDeltaI < MaxY - dYPosI + MaxV - dVPosI) then
table.insert( vCmd, { 0, 'Direct-Y-V'})
table.insert( vCmd, { 11, 1})
-- se l'altra morsa non era in presa, vado a pinzare il pezzo
if not EMC.VDELTA then
dVPosA = MaxV
@@ -1793,7 +1799,6 @@ function SpecAdjustCarriages( vCmd, dTPosI, dYDeltaI, dVDeltaI, dTPosF, dYDeltaF
-- compatto al centro
if not EMC.YDELTA then
table.insert( vCmd, { 0, 'Compact Y'})
table.insert( vCmd, { 12, 1})
table.insert( vCmd, { 11, 0})
dTPosA = MaxV - dVDeltaI
dVPosA = MaxV
@@ -1806,7 +1811,6 @@ function SpecAdjustCarriages( vCmd, dTPosI, dYDeltaI, dVDeltaI, dTPosF, dYDeltaF
end
if not EMC.VDELTA then
table.insert( vCmd, { 0, 'Compact V'})
table.insert( vCmd, { 11, 1})
table.insert( vCmd, { 12, 0})
dTPosA = MyMinY - dYDeltaI
dVPosA = MaxV