Compare commits
12 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 3132d213c1 | |||
| cbf5df9895 | |||
| ec8fa72ca2 | |||
| 6ace9c266d | |||
| 2a7b732444 | |||
| 6206ba44db | |||
| ad882352d0 | |||
| 8ef399a55c | |||
| e397ac2627 | |||
| cfc1fbc6b6 | |||
| 3b91c0c603 | |||
| a2d0ff4d77 |
@@ -848,13 +848,13 @@ function OnRapid()
|
||||
local sOut = 'G101' .. EmtGetAxis( 'L2') .. EmtGetAxis( 'L3') ..' B=' .. EgtNumToString( dBAxis, 3) ..
|
||||
' C=' .. EgtNumToString( dCAxis, 3) .. sEE .. sEL .. sER .. sET .. sES
|
||||
EmtOutput( sOut)
|
||||
EmtOutput( 'M101 P1=2')
|
||||
EmtOutput( 'M101 P1=3')
|
||||
EmtOutput( 'G101 ET1001')
|
||||
EmtOutput( 'G101 ET2001')
|
||||
sOut = 'G101' .. ' X' .. EmtLenToString( -SafeXRotAxes, 3) .. EmtGetAxis( 'L3') ..' B=' .. EgtNumToString( dBAxis, 3) ..
|
||||
' C=' .. EgtNumToString( dCAxis, 3) .. sEE .. sEL .. sER .. sET .. sES
|
||||
EmtOutput( sOut)
|
||||
EmtOutput( 'M101 P1=2')
|
||||
EmtOutput( 'M101 P1=3')
|
||||
EmtOutput( 'G101 ET1001')
|
||||
EmtOutput( 'G101 ET2001')
|
||||
end
|
||||
-- se altrimenti movimento in Home
|
||||
elseif EMT.FLAG == 4 then
|
||||
@@ -876,7 +876,7 @@ function OnRapid()
|
||||
EmtGetAxis( 'R2') .. EmtGetAxis( 'R1') .. sEE .. sEL .. sER .. sET .. sES
|
||||
EmtOutput( sOut)
|
||||
EmtOutput( 'G101 ET1001')
|
||||
EmtOutput( 'G101 ET2001')
|
||||
EmtOutput( 'G101 ET2001')
|
||||
-- altrimenti errore
|
||||
else
|
||||
EmtSetLastError( 1212, "Unknown Rapid flag")
|
||||
|
||||
@@ -922,14 +922,14 @@ function OnRapid()
|
||||
local sOut = 'G101' .. EmtGetAxis( 'L2') .. EmtGetAxis( 'L3') ..' B=' .. EgtNumToString( dBAxis, 3) ..
|
||||
' C=' .. EgtNumToString( dCAxis, 3) .. sEE .. sEL .. sER .. sET .. sES
|
||||
EmtOutput( sOut)
|
||||
EmtOutput( 'M101 P1=2')
|
||||
EmtOutput( 'M101 P1=3')
|
||||
EmtOutput( 'G101 ET1001')
|
||||
EmtOutput( 'G101 ET2001')
|
||||
sOut = 'G101' .. ' X' .. EmtLenToString( -SafeXRotAxes, 3) .. EmtGetAxis( 'L3') ..' B=' .. EgtNumToString( dBAxis, 3) ..
|
||||
' C=' .. EgtNumToString( dCAxis, 3) .. sEE .. sEL .. sER .. sET .. sES
|
||||
EmtOutput( sOut)
|
||||
EmtOutput( 'M101 P1=2')
|
||||
EmtOutput( 'M101 P1=3')
|
||||
end
|
||||
EmtOutput( 'G101 ET1001')
|
||||
EmtOutput( 'G101 ET2001')
|
||||
end
|
||||
-- se altrimenti movimento in Home
|
||||
elseif EMT.FLAG == 4 then
|
||||
-- non previsto
|
||||
|
||||
+40
-40
@@ -1214,6 +1214,9 @@ function SpecCalcCarriages( dDistFront, dDistBack, bFixedDelta, bFixedPos)
|
||||
end
|
||||
local dDistBackEff = min( dDistBack, EMC.LB - MyMinOther - EMC.HCING - EMC.HOVM)
|
||||
|
||||
-- se primo scambio
|
||||
local MyMinY = EgtIf( EMC.CNT == 1, MinY + AGG_LOAD, MinY)
|
||||
|
||||
EgtOutLog( ' Dist/Min : Back=' .. EgtNumToString( dDistBackEff, 1) .. '/' .. EgtNumToString( MinBackJoin, 1) ..
|
||||
' Front=' .. EgtNumToString( dDistFrontEff, 1) .. '/' .. EgtNumToString( MinFrontJoin, 1) ..
|
||||
' Fixed : Delta=' .. EgtIf( bFixedDelta, 'T', 'F') .. ' Pos=' .. EgtIf( bFixedPos, 'T', 'F'), 3)
|
||||
@@ -1233,7 +1236,7 @@ function SpecCalcCarriages( dDistFront, dDistBack, bFixedDelta, bFixedPos)
|
||||
if dDistFrontEff < MinFrontJoin and dDistBackEff > MinBackJoin - GEO.EPS_SMALL then
|
||||
-- se Y non era in presa, mi ricalcolo la posizione
|
||||
if not dYDelta then
|
||||
dYDelta = dVDelta + ( MinY - MaxV)
|
||||
dYDelta = dVDelta + ( MyMinY - MaxV)
|
||||
end
|
||||
dNewYDelta = EMC.LB - dDistBackEff
|
||||
-- verifico se posso lasciare la morsa in posizione
|
||||
@@ -1250,11 +1253,11 @@ function SpecCalcCarriages( dDistFront, dDistBack, bFixedDelta, bFixedPos)
|
||||
elseif dDistBackEff > MinBackJoin - GEO.EPS_SMALL and dDistFrontEff > MinFrontJoin - GEO.EPS_SMALL then
|
||||
-- se Y non era in presa, mi ricalcolo la posizione
|
||||
if not dYDelta then
|
||||
dYDelta = dVDelta + ( MinY - MaxV)
|
||||
dYDelta = dVDelta + ( MyMinY - MaxV)
|
||||
end
|
||||
-- se V non era in presa, mi ricalcolo la posizione
|
||||
if not dVDelta then
|
||||
dVDelta = dYDelta - ( MinY - MaxV)
|
||||
dVDelta = dYDelta - ( MyMinY - MaxV)
|
||||
end
|
||||
|
||||
dNewYDelta = EMC.LB - dDistBackEff
|
||||
@@ -1284,12 +1287,17 @@ function SpecCalcCarriages( dDistFront, dDistBack, bFixedDelta, bFixedPos)
|
||||
elseif dDistBackEff < MinBackJoin and dDistFrontEff > MinFrontJoin - GEO.EPS_SMALL then
|
||||
-- se V non era in presa, mi ricalcolo la posizione
|
||||
if not dVDelta then
|
||||
dVDelta = dYDelta - ( MinY - MaxV)
|
||||
dVDelta = dYDelta - ( MyMinY - MaxV)
|
||||
end
|
||||
dNewVDelta = dDistFrontEff
|
||||
-- verifico se posso lasciare la morsa in posizione
|
||||
local dVDeltaTol = GetDeltaTol( dNewVDelta, EMC.TCING, EMC.HCING, EMC.HOVM, 'V', bFixedDelta)
|
||||
local bVDeltaS = ( dNewVDelta > dVDelta + dVDeltaTol or dNewVDelta < dVDelta - DELTA_SIC)
|
||||
local bVDeltaS
|
||||
if EMC.YDELTA == nil and EMC.YDELTANEXT == nil then
|
||||
bVDeltaS = (( dNewVDelta > dVDelta + dVDeltaTol and not bFixedPos) or dNewVDelta < dVDelta - DELTA_SIC)
|
||||
else
|
||||
bVDeltaS = ( dNewVDelta > dVDelta + dVDeltaTol or dNewVDelta < dVDelta - DELTA_SIC)
|
||||
end
|
||||
-- reimposto i delta finali in caso di spostamenti richiesti significativi, tenuto conto delle tolleranze
|
||||
if bVDeltaS then
|
||||
dNewVDelta = dNewVDelta - dVDeltaTol/2
|
||||
@@ -1489,6 +1497,17 @@ function SpecCalcPreRot()
|
||||
return vCmd
|
||||
end
|
||||
|
||||
---------------------------------------------------------------------
|
||||
local function CalcCharStatus( sType, dDelta)
|
||||
-- se per carrello Y
|
||||
if sType == 'Y' then
|
||||
return EgtIf( EMC.LB - dDelta < LenToPress, 1, 2)
|
||||
-- altrimenti per carrello V
|
||||
else
|
||||
return EgtIf( dDelta < LenToPress, 1, 2)
|
||||
end
|
||||
end
|
||||
|
||||
---------------------------------------------------------------------
|
||||
function SpecAdjustCarriages( vCmd, dTPosI, dYDeltaI, dVDeltaI, dTPosF, dYDeltaF, dVDeltaF, bFixedDelta, bFixedPos)
|
||||
local dYPosA, dVPosA, dTPosA
|
||||
@@ -1615,7 +1634,7 @@ function SpecAdjustCarriages( vCmd, dTPosI, dYDeltaI, dVDeltaI, dTPosF, dYDeltaF
|
||||
dTPosI = dTPosA
|
||||
|
||||
-- blocco la morsa
|
||||
table.insert( vCmd, { 12, 1})
|
||||
table.insert( vCmd, { 12, CalcCharStatus( 'V', dVDeltaF)})
|
||||
|
||||
-- imposto i nuovi parametri di aggancio
|
||||
if EMC.YDELTANEXT and EMC.VDELTANEXT then
|
||||
@@ -1626,7 +1645,7 @@ function SpecAdjustCarriages( vCmd, dTPosI, dYDeltaI, dVDeltaI, dTPosF, dYDeltaF
|
||||
dYPosA = dTPosF + dYDeltaF
|
||||
dVPosA = dTPosF + dVDeltaF
|
||||
table.insert( vCmd, { 3, 'Y', dYPosA , 'T', dTPosA, 'V', dVPosA})
|
||||
table.insert( vCmd, { 11, 1})
|
||||
table.insert( vCmd, { 11, CalcCharStatus( 'Y', dYDeltaF)})
|
||||
-- la morsa al carico è adesso in posizione
|
||||
dYDeltaI = dYDeltaF
|
||||
end
|
||||
@@ -1638,7 +1657,7 @@ function SpecAdjustCarriages( vCmd, dTPosI, dYDeltaI, dVDeltaI, dTPosF, dYDeltaF
|
||||
dTPosA = -( dYPosA + dVDeltaF)
|
||||
dVPosA = dTPosA + dVDeltaF
|
||||
table.insert( vCmd, { 3, 'Y', dYPosA , 'T', dTPosA, 'V', dVPosA})
|
||||
table.insert( vCmd, { 11, 1})
|
||||
table.insert( vCmd, { 11, CalcCharStatus( 'Y', dYDeltaF)})
|
||||
-- la morsa al carico è adesso in posizione
|
||||
dYDeltaI = dYDeltaF
|
||||
end
|
||||
@@ -1723,7 +1742,7 @@ function SpecAdjustCarriages( vCmd, dTPosI, dYDeltaI, dVDeltaI, dTPosF, dYDeltaF
|
||||
dTPosI = dTPosA
|
||||
|
||||
-- blocco la morsa
|
||||
table.insert( vCmd, { 11, 1})
|
||||
table.insert( vCmd, { 11, CalcCharStatus( 'Y', dYDeltaF)})
|
||||
|
||||
-- imposto i nuovi parametri di aggancio
|
||||
if EMC.YDELTANEXT and EMC.VDELTANEXT then
|
||||
@@ -1733,7 +1752,7 @@ function SpecAdjustCarriages( vCmd, dTPosI, dYDeltaI, dVDeltaI, dTPosF, dYDeltaF
|
||||
dYPosA = dTPosF + dYDeltaF
|
||||
dVPosA = dTPosF + dVDeltaF
|
||||
table.insert( vCmd, { 3, 'Y', dYPosA , 'T', dTPosA, 'V', dVPosA})
|
||||
table.insert( vCmd, { 12, 1})
|
||||
table.insert( vCmd, { 12, CalcCharStatus( 'V', dVDeltaF)})
|
||||
-- la morsa al carico è adesso in posizione
|
||||
dVDeltaI = dVDeltaF
|
||||
end
|
||||
@@ -1745,7 +1764,7 @@ function SpecAdjustCarriages( vCmd, dTPosI, dYDeltaI, dVDeltaI, dTPosF, dYDeltaF
|
||||
dTPosA = dVPosA - dVDeltaF
|
||||
dYPosA = dTPosA + dYDeltaF
|
||||
table.insert( vCmd, { 3, 'Y', dYPosA , 'T', dTPosA, 'V', dVPosA})
|
||||
table.insert( vCmd, { 12, 1})
|
||||
table.insert( vCmd, { 12, CalcCharStatus( 'V', dVDeltaF)})
|
||||
-- la morsa al carico è adesso in posizione
|
||||
dVDeltaI = dVDeltaF
|
||||
end
|
||||
@@ -1772,6 +1791,7 @@ 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
|
||||
@@ -1784,6 +1804,7 @@ 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
|
||||
@@ -1858,7 +1879,7 @@ function SpecAdjustCarriages( vCmd, dTPosI, dYDeltaI, dVDeltaI, dTPosF, dYDeltaF
|
||||
dTPosA = dTPosI - dVPosI + MinV
|
||||
dYPosA = dYDeltaF + dTPosA
|
||||
table.insert( vCmd, { 3, 'Y', dYPosA , 'T', dTPosA, 'V', dVPosA})
|
||||
table.insert( vCmd, { 11, 1})
|
||||
table.insert( vCmd, { 11, CalcCharStatus( 'Y', dYDeltaF)})
|
||||
table.insert( vCmd, { 12, 0})
|
||||
dTPosI = dTPosA
|
||||
EMC.YDELTA = dYDeltaF
|
||||
@@ -1875,7 +1896,7 @@ function SpecAdjustCarriages( vCmd, dTPosI, dYDeltaI, dVDeltaI, dTPosF, dYDeltaF
|
||||
dVPosA = dTPosI + dVDeltaI - dTotMove
|
||||
dTPosA = dTPosI - dTotMove
|
||||
table.insert( vCmd, { 3, 'Y', dYPosA , 'T', dTPosA, 'V', dVPosA})
|
||||
table.insert( vCmd, { 11, 1})
|
||||
table.insert( vCmd, { 11, CalcCharStatus( 'Y', dYDeltaF)})
|
||||
table.insert( vCmd, { 12, 0})
|
||||
|
||||
-- aggiorno nuova posizione della morsa al carico dopo riposizionamento
|
||||
@@ -1903,12 +1924,12 @@ function SpecAdjustCarriages( vCmd, dTPosI, dYDeltaI, dVDeltaI, dTPosF, dYDeltaF
|
||||
|
||||
-- imposto i nuovi parametri di aggancio
|
||||
if EMC.YDELTANEXT and EMC.VDELTANEXT then
|
||||
table.insert( vCmd, { 12, 1})
|
||||
table.insert( vCmd, { 12, CalcCharStatus( 'V', dVDeltaF)})
|
||||
table.insert( vCmd, { 21, dYDeltaF, dVDeltaF})
|
||||
elseif EMC.YDELTANEXT then
|
||||
table.insert( vCmd, { 21, dYDeltaF, 0})
|
||||
else
|
||||
table.insert( vCmd, { 12, 1})
|
||||
table.insert( vCmd, { 12, CalcCharStatus( 'V', dVDeltaF)})
|
||||
table.insert( vCmd, { 11, 0})
|
||||
-- sposto il carrello Y in parcheggio
|
||||
table.insert( vCmd, { 1, 'Y', ParkY})
|
||||
@@ -1964,7 +1985,7 @@ function SpecAdjustCarriages( vCmd, dTPosI, dYDeltaI, dVDeltaI, dTPosF, dYDeltaF
|
||||
dTPosA = dTPosI + ( MaxY - dYPosI)
|
||||
dVPosA = dVDeltaF + dTPosA
|
||||
table.insert( vCmd, { 3, 'Y', dYPosA , 'T', dTPosA, 'V', dVPosA})
|
||||
table.insert( vCmd, { 12, 1})
|
||||
table.insert( vCmd, { 12, CalcCharStatus( 'V', dVDeltaF)})
|
||||
table.insert( vCmd, { 11, 0})
|
||||
dTPosI = dTPosA
|
||||
EMC.YDELTA = dYDeltaI
|
||||
@@ -1981,7 +2002,7 @@ function SpecAdjustCarriages( vCmd, dTPosI, dYDeltaI, dVDeltaI, dTPosF, dYDeltaF
|
||||
dVPosA = dTPosI + dVDeltaI - dTotMove
|
||||
dTPosA = dTPosI + dTotMove
|
||||
table.insert( vCmd, { 3, 'Y', dYPosA , 'T', dTPosA, 'V', dVPosA})
|
||||
table.insert( vCmd, { 12, 1})
|
||||
table.insert( vCmd, { 12, CalcCharStatus( 'V', dVDeltaF)})
|
||||
table.insert( vCmd, { 11, 0})
|
||||
|
||||
-- aggiorno nuova posizione della morsa allo scarico dopo riposizionamento
|
||||
@@ -2007,22 +2028,12 @@ function SpecAdjustCarriages( vCmd, dTPosI, dYDeltaI, dVDeltaI, dTPosF, dYDeltaF
|
||||
dYDeltaI = dYDeltaF
|
||||
end
|
||||
|
||||
-- sistemo apertura morse
|
||||
if EMC.YDELTANEXT then
|
||||
table.insert( vCmd, { 11, 1})
|
||||
end
|
||||
if not EMC.VDELTANEXT then
|
||||
table.insert( vCmd, { 12, 0})
|
||||
-- sposto il carrello Y in parcheggio
|
||||
table.insert( vCmd, { 1, 'V', ParkV})
|
||||
end
|
||||
|
||||
-- imposto i nuovi parametri di aggancio
|
||||
if EMC.YDELTANEXT and EMC.VDELTANEXT then
|
||||
table.insert( vCmd, { 11, 1})
|
||||
table.insert( vCmd, { 11, CalcCharStatus( 'Y', dYDeltaF)})
|
||||
table.insert( vCmd, { 21, dYDeltaF, dVDeltaF})
|
||||
elseif EMC.YDELTANEXT then
|
||||
table.insert( vCmd, { 11, 1})
|
||||
table.insert( vCmd, { 11, CalcCharStatus( 'Y', dYDeltaF)})
|
||||
-- sposto il carrello Y in parcheggio
|
||||
table.insert( vCmd, { 12, 0})
|
||||
table.insert( vCmd, { 1, 'V', ParkV})
|
||||
@@ -2277,17 +2288,6 @@ function SpecAdjustCarriagesOLD( dTPosI, dYDeltaI, dVDeltaI, dTPosF, dYDeltaF, d
|
||||
end
|
||||
end
|
||||
|
||||
---------------------------------------------------------------------
|
||||
local function CalcCharStatus( sType, dDelta)
|
||||
-- se per carrello Y
|
||||
if sType == 'Y' then
|
||||
return EgtIf( EMC.LB - dDelta < LenToPress, 1, 2)
|
||||
-- altrimenti per carrello V
|
||||
else
|
||||
return EgtIf( dDelta < LenToPress, 1, 2)
|
||||
end
|
||||
end
|
||||
|
||||
---------------------------------------------------------------------
|
||||
local function GetCorseDisp( dCorsaYfc, dCorsaVfc, dDistN, sSide)
|
||||
local dRecTotn = min( dDistN, dCorsaYfc+ dCorsaVfc) -- recupero possibile al netto di dCorsa..TrA)
|
||||
|
||||
+14
-1
@@ -1,7 +1,20 @@
|
||||
==== Common_FAST Update Log ====
|
||||
|
||||
Versione 2.6j6 (17/10/2024)
|
||||
- (GEN) Si ribadisce che la pinza era in presa, prima di cominciare con lo scambio del passo del pellegrino. Ticket#2121
|
||||
|
||||
Versione 2.6j5 (17/10/2024)
|
||||
- (SIM-GEN) Piccola correzione nuovo riposizionamento. Nel taglio dello scarto finale riposizionava nel vuoto. Ticket#2115
|
||||
|
||||
Versione 2.6j4 (15/10/2024)
|
||||
- (SIM-GEN) Piccola correzione nuovo riposizionamento. Non considerava i 50mm di tolleranza su primo pinzaggio dopo ribaltamento
|
||||
- (SIM-GEN) Gestione attivazione pressore verticale in nuovo riposizionamento
|
||||
|
||||
Versione 2.6j3 (11/10/2024)
|
||||
- (GEN) Corretta scrittura macro start/attesa movimenti per NUM. Veniva scritto codice per TPA.
|
||||
|
||||
Versione 2.6j2 (03/10/2024)
|
||||
- (SIM-GEN) Piccola correwzione calcolo posizione carrello durante riposizionamento, nuova gestione
|
||||
- (SIM-GEN) Piccola correzione calcolo posizione carrello durante riposizionamento, nuova gestione
|
||||
|
||||
Versione 2.6j1 (01/10/2024)
|
||||
- (SIM-GEN) Sistemato calcolo in nuova disposzione carrelli
|
||||
|
||||
+1
-1
@@ -3,7 +3,7 @@
|
||||
|
||||
local InfoCommon_STD_PP = {
|
||||
NAME = 'Common_FAST', -- nome script PP standard
|
||||
VERSION = '2.6j2', -- versione script
|
||||
VERSION = '2.6j6', -- versione script
|
||||
MIN_MACH_VER_PP_COMMON = '2.5k1' -- versione minima kernel
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user