Compare commits

...

6 Commits

Author SHA1 Message Date
andrea.villa ad882352d0 Merge remote-tracking branch 'origin/develop' 2024-10-15 09:09:56 +02:00
andrea.villa 8ef399a55c - Piccola correzione nuovo riposizionamento. Non considerava i 50mm di tolleranza su primo pinzaggio dopo ribaltamento
- Gestione attivazione pressore verticale in nuovo riposizionamento
2024-10-15 09:09:45 +02:00
andrea.villa e397ac2627 Merge branch 'main' into develop 2024-10-11 14:50:07 +02:00
andrea.villa cfc1fbc6b6 Merge remote-tracking branch 'origin/develop' 2024-10-11 14:49:49 +02:00
andrea.villa 3b91c0c603 Corretta scrittura macro start/attesa movimenti per NUM. Veniva scritto codice per TPA. 2024-10-11 14:49:30 +02:00
andrea.villa a2d0ff4d77 Merge remote-tracking branch 'origin/main' into develop 2024-10-03 10:25:40 +02:00
5 changed files with 51 additions and 51 deletions
+5 -5
View File
@@ -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")
+5 -5
View File
@@ -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
+32 -39
View File
@@ -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,7 +1287,7 @@ 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
@@ -1489,6 +1492,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 +1629,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 +1640,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 +1652,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 +1737,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 +1747,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 +1759,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
@@ -1858,7 +1872,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 +1889,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 +1917,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 +1978,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 +1995,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 +2021,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 +2281,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)
+8 -1
View File
@@ -1,7 +1,14 @@
==== Common_FAST Update Log ====
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
View File
@@ -3,7 +3,7 @@
local InfoCommon_STD_PP = {
NAME = 'Common_FAST', -- nome script PP standard
VERSION = '2.6j2', -- versione script
VERSION = '2.6j4', -- versione script
MIN_MACH_VER_PP_COMMON = '2.5k1' -- versione minima kernel
}