Compare commits
17 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 8adfbaf24b | |||
| 1ee84c6cf8 | |||
| 44ea5b2a2c | |||
| 3c82040b21 | |||
| 42ab289444 | |||
| e6ab77e59a | |||
| 958b5bbc3a | |||
| f223006bc7 | |||
| 659aa80001 | |||
| 6db40176a2 | |||
| 0fa80629f6 | |||
| 9eb362d312 | |||
| 912bf4f072 | |||
| 717a03a549 | |||
| 1a68f3e543 | |||
| d5165571da | |||
| e2a5b11cfa |
@@ -27,7 +27,9 @@ function OnStart()
|
||||
--EMT.LINEINC = 1 -- incremento numerazione linee
|
||||
--EMT.Ft = 'F' -- token per feed
|
||||
--EMT.St = 'S' -- token per speed
|
||||
EMT.FMAXPINZE = 154000 -- feed massima pinze
|
||||
EMT.FMAXPINZE = EgtClamp( MaxFeedPinze or 154000, 20000, 160000) -- feed massima pinze
|
||||
EMT.MAXACC = MaxAcc or ( EMT.FMAXPINZE / ( 60 * 0.3)) -- accelerazione massima pinze
|
||||
EMT.MINACC = MinAcc or ( EMT.FMAXPINZE / ( 60 * 4)) -- accelerazione minima pinze
|
||||
end
|
||||
|
||||
---------------------------------------------------------------------
|
||||
@@ -183,16 +185,12 @@ function OnDispositionEnd()
|
||||
local STrave = EMT.ST
|
||||
local HOverM = EMT.HOVM
|
||||
-- calcolo dati pinze
|
||||
local MinAccPinze = 0.3
|
||||
local MaxAccPinze = 4
|
||||
local KgMtCubo= WoodDensity or 550 -- densità legno in Kg / metro cubo
|
||||
local Massa = ( HTrave * STrave * LBarra * KgMtCubo ) / 1000000000
|
||||
local FMaxPinze = EMT.FMAXPINZE
|
||||
local ForzaAtrito = 700 / 2 -- Serve per regolare P32 (700 valore reale pistone)
|
||||
local TempoAcc = ( ( Massa * FMaxPinze) / ( 60 * ForzaAtrito) / 1000)
|
||||
if ( TempoAcc < MinAccPinze) then TempoAcc = MinAccPinze end
|
||||
if ( TempoAcc > MaxAccPinze) then TempoAcc = MaxAccPinze end
|
||||
local AccPinze = FMaxPinze / ( 60 * TempoAcc)
|
||||
local AccPinze = EgtClamp( FMaxPinze / ( 60 * TempoAcc), EMT.MINACC, EMT.MAXACC)
|
||||
local RidFeed = 100 / Massa * 100
|
||||
if ( RidFeed > 100) then RidFeed = 100 end
|
||||
if IdTrave >= 0 then
|
||||
@@ -252,9 +250,9 @@ function OnDispositionEnd()
|
||||
EmtOutput( sOut)
|
||||
-- altrimenti recupero rimanenza
|
||||
else
|
||||
EmtOutput( 'G112 EC1'..' Y'..EmtLenToString( LoadT, 3).. ' EY'..EmtLenToString( EMT.YPOS, 3)..' EV'..EmtLenToString( ParkV, 3) ..' EF'..GetFmaxClamp())
|
||||
EmtOutput( 'G112 EC1'..' Y'..EmtLenToString( EMT.TPOS, 3).. ' EY'..EmtLenToString( EMT.YPOS, 3)..' EV'..EmtLenToString( ParkV, 3) ..' EF'..GetFmaxClamp())
|
||||
-- aggiorno dati aggancio carrelli alla trave
|
||||
EMT.YDELTA = EMT.YPOS - LoadT
|
||||
EMT.YDELTA = EMT.YPOS - EMT.TPOS
|
||||
EMT.VDELTA = nil
|
||||
end
|
||||
-- eventuale preparazione per rotazione immediata
|
||||
@@ -654,7 +652,8 @@ function OnRapid()
|
||||
local sES = ' ES'..EgtNumToString( EMT.S, 0)
|
||||
|
||||
-- se carico motosega, ruoto in zona sicura prima di approcciare la lavorazione
|
||||
if not EMT.LOAD and ( EMT.HEAD == 'H3' or ( bZmax and EMT.TTOTLEN > 200)) and EMT.ST > BeamHeightForFixRot and EMT.FLAG2 == 1 then
|
||||
if not EMT.LOAD and ( EMT.HEAD == 'H3' or ( bZmax and EMT.TTOTLEN > 200)) and
|
||||
( EMT.ST > BeamHeightForFixRot or ( EMT.HEAD == 'H1' and EMT.TTOTLEN > 350)) and EMT.FLAG2 == 1 then
|
||||
local sEEPreMove = ' EE' .. EgtIf( bZmax, '3', '4')
|
||||
local sOutPreMove = 'G101' .. ' X' .. EmtLenToString( -SafeXRotAxes, 3) .. ' Z' .. EmtLenToString( MyZHome, 3) ..
|
||||
EmtGetAxis( 'R2') .. EmtGetAxis( 'R1') .. sEE .. sEL .. sER .. sET .. sES
|
||||
|
||||
@@ -27,7 +27,9 @@ function OnStart()
|
||||
--EMT.LINEINC = 1 -- incremento numerazione linee
|
||||
--EMT.Ft = 'F' -- token per feed
|
||||
--EMT.St = 'S' -- token per speed
|
||||
EMT.FMAXPINZE = 154000 -- feed massima pinze
|
||||
EMT.FMAXPINZE = EgtClamp( MaxFeedPinze or 154000, 20000, 160000) -- feed massima pinze
|
||||
EMT.MAXACC = MaxAcc or ( EMT.FMAXPINZE / ( 60 * 0.3)) -- accelerazione massima pinze
|
||||
EMT.MINACC = MinAcc or ( EMT.FMAXPINZE / ( 60 * 4)) -- accelerazione minima pinze
|
||||
end
|
||||
|
||||
---------------------------------------------------------------------
|
||||
@@ -271,9 +273,9 @@ function OnDispositionEnd()
|
||||
EmtOutput( sOut)
|
||||
-- altrimenti recupero rimanenza
|
||||
else
|
||||
EmtOutput( 'G112 EC1'..' Y'..EmtLenToString( LoadT, 3).. ' EY'..EmtLenToString( EMT.YPOS, 3)..' EV'..EmtLenToString( ParkV, 3) ..' EF'..GetFmaxClamp())
|
||||
EmtOutput( 'G112 EC1'..' Y'..EmtLenToString( EMT.TPOS, 3).. ' EY'..EmtLenToString( EMT.YPOS, 3)..' EV'..EmtLenToString( ParkV, 3) ..' EF'..GetFmaxClamp())
|
||||
-- aggiorno dati aggancio carrelli alla trave
|
||||
EMT.YDELTA = EMT.YPOS - LoadT
|
||||
EMT.YDELTA = EMT.YPOS - EMT.TPOS
|
||||
EMT.VDELTA = nil
|
||||
end
|
||||
-- eventuale preparazione per rotazione immediata
|
||||
@@ -722,7 +724,8 @@ function OnRapid()
|
||||
local sES = ' ES'..EgtNumToString( EMT.S, 0)
|
||||
|
||||
-- se carico motosega, ruoto in zona sicura prima di approcciare la lavorazione
|
||||
if not EMT.LOAD and ( EMT.HEAD == 'H3' or ( bZmax and EMT.TTOTLEN > 200)) and EMT.ST > BeamHeightForFixRot and EMT.FLAG2 == 1 then
|
||||
if not EMT.LOAD and ( EMT.HEAD == 'H3' or ( bZmax and EMT.TTOTLEN > 200)) and
|
||||
( EMT.ST > BeamHeightForFixRot or ( EMT.HEAD == 'H1' and EMT.TTOTLEN > 350)) and EMT.FLAG2 == 1 then
|
||||
local sEEPreMove = ' EE' .. EgtIf( bZmax, '3', '4')
|
||||
local sOutPreMove = 'G101' .. ' X' .. EmtLenToString( -SafeXRotAxes, 3) .. ' Z' .. EmtLenToString( MyZHome, 3) ..
|
||||
EmtGetAxis( 'R2') .. EmtGetAxis( 'R1') .. sEE .. sEL .. sER .. sET .. sES
|
||||
@@ -1095,17 +1098,13 @@ end
|
||||
|
||||
---------------------------------------------------------------------
|
||||
function CalcDinamicaPinze( dH, dS, dL)
|
||||
local MinTempoAcc = 0.3 -- [s]
|
||||
local MaxTempoAcc = 4.0 -- [s]
|
||||
local KgMtCubo= WoodDensity or 550 -- densità legno [Kg / metro cubo]
|
||||
local Massa = ( dH * dS * dL * KgMtCubo ) / 1e9 -- massa [Kg]
|
||||
local FMaxPinze = EMT.FMAXPINZE -- Feed massima pinze [mm/min]
|
||||
local ForzaAttrito = 350 * 9.8 * 0.2 -- Forza chiusura pinze [Kgf] * g * Coeff_Attrito -> [N]
|
||||
local TempoAcc = ( ( Massa * FMaxPinze) / ( 60 * ForzaAttrito) / 1000)
|
||||
if ( TempoAcc < MinTempoAcc) then TempoAcc = MinTempoAcc end
|
||||
if ( TempoAcc > MaxTempoAcc) then TempoAcc = MaxTempoAcc end
|
||||
local AccMaxPinze = FMaxPinze / ( 60 * MinTempoAcc)
|
||||
local AccPinze = FMaxPinze / ( 60 * TempoAcc)
|
||||
local AccMaxPinze = EMT.MAXACC
|
||||
local AccPinze = EgtClamp( FMaxPinze / ( 60 * TempoAcc), EMT.MINACC, EMT.MAXACC)
|
||||
local RidFeed = 100 / Massa * 100
|
||||
if RidFeed > 100 then
|
||||
RidFeed = 100
|
||||
|
||||
+11
-12
@@ -31,7 +31,9 @@ function OnStart()
|
||||
--EMT.LINEINC = 1 -- incremento numerazione linee
|
||||
--EMT.Ft = 'F' -- token per feed
|
||||
--EMT.St = 'S' -- token per speed
|
||||
EMT.FMAXPINZE = 154000 -- feed massima pinze
|
||||
EMT.FMAXPINZE = EgtClamp( MaxFeedPinze or 154000, 20000, 160000) -- feed massima pinze
|
||||
EMT.MAXACC = MaxAcc or 4000 -- accelerazione massima pinze. In realtà è il tempo in millisecondi, quindi MAXACC corrisponde al tempo massimo per raggiungere la velocità desiderata
|
||||
EMT.MINACC = MinAcc or 300 -- accelerazione minima pinze. In realtà è il tempo in millisecondi, quindi MINACC corrisponde al tempo massimo per raggiungere la velocità desiderata
|
||||
end
|
||||
|
||||
---------------------------------------------------------------------
|
||||
@@ -273,9 +275,9 @@ function OnDispositionEnd()
|
||||
' P4=' .. EmtLenToString( HOverM, 2) .. ' P5=' .. tostring( nLoad90) .. ' P6=' .. EmtLenToString( EgtIf( IdTrave >= 0, LTrave, LBarra), 2) ..
|
||||
' P7=' .. EgtNumToString( TempAccPinze, 2) .. ' P8=' .. EgtNumToString( TempAccPinz2, 2) .. ' P9=' .. EgtNumToString( TempAccPinz1, 2)
|
||||
EmtOutput( sOut)
|
||||
EmtOutput( 'M112'..' P1='..EmtLenToString( LoadT, 3).. ' P5=1 P6='..EmtLenToString( EMT.YPOS, 3)..' P7='..EmtLenToString( ParkV, 3) ..' P9='..GetFmaxClamp())
|
||||
EmtOutput( 'M112'..' P1='..EmtLenToString( EMT.TPOS, 3).. ' P5=1 P6='..EmtLenToString( EMT.YPOS, 3)..' P7='..EmtLenToString( ParkV, 3) ..' P9='..GetFmaxClamp())
|
||||
-- aggiorno dati aggancio carrelli alla trave
|
||||
EMT.YDELTA = EMT.YPOS - LoadT
|
||||
EMT.YDELTA = EMT.YPOS - EMT.TPOS
|
||||
EMT.VDELTA = nil
|
||||
end
|
||||
-- eventuale preparazione per rotazione immediata
|
||||
@@ -676,7 +678,8 @@ function OnRapid()
|
||||
end
|
||||
|
||||
-- se carico motosega, ruoto in zona sicura prima di approcciare la lavorazione
|
||||
if not EMT.LOAD and ( EMT.HEAD == 'H3' or ( bZmax and EMT.TTOTLEN > 200)) and EMT.ST > BeamHeightForFixRot and EMT.FLAG2 == 1 then
|
||||
if not EMT.LOAD and ( EMT.HEAD == 'H3' or ( bZmax and EMT.TTOTLEN > 200)) and
|
||||
( EMT.ST > BeamHeightForFixRot or ( EMT.HEAD == 'H1' and EMT.TTOTLEN > 350)) and EMT.FLAG2 == 1 then
|
||||
local sOutPreMove = 'M101 P1=1' .. ' P2=' .. EmtLenToString( -SafeXRotAxes, EMT.DECMACRO) .. ' P3=' .. EmtLenToString( MyZHome, EMT.DECMACRO) ..
|
||||
' P4=' .. EgtNumToString( EMT.R2, EMT.DECMACRO) .. ' P5=' .. EgtNumToString( EMT.R1, EMT.DECMACRO) ..
|
||||
' P6=' .. AdjustTcPos( false) .. ' P7=' .. EgtNumToString( EMT.S, 0) ..
|
||||
@@ -1055,24 +1058,20 @@ end
|
||||
|
||||
---------------------------------------------------------------------
|
||||
function CalcDinamicaPinze( dH, dS, dL)
|
||||
local MinTempoAcc = 0.3 -- [s]
|
||||
local MaxTempoAcc = 4.0 -- [s]
|
||||
local MinTempoAcc = EMT.MINACC -- [ms] ~300
|
||||
local MaxTempoAcc = EMT.MAXACC -- [ms] ~4000
|
||||
local KgMtCubo= WoodDensity or 550 -- densità legno [Kg / metro cubo]
|
||||
local Massa = ( dH * dS * dL * KgMtCubo ) / 1e9 -- massa [Kg]
|
||||
local FMaxPinze = EMT.FMAXPINZE -- Feed massima pinze [mm/min]
|
||||
local ForzaAttrito = 350 * 9.8 * 0.2 -- Forza chiusura pinze [Kgf] * g * Coeff_Attrito -> [N]
|
||||
local TempoAcc = ( ( Massa * FMaxPinze) / ( 60 * ForzaAttrito) / 1000)
|
||||
if ( TempoAcc < MinTempoAcc) then TempoAcc = MinTempoAcc end
|
||||
if ( TempoAcc > MaxTempoAcc) then TempoAcc = MaxTempoAcc end
|
||||
local AccMaxPinze = FMaxPinze / ( 60 * MinTempoAcc)
|
||||
local AccPinze = FMaxPinze / ( 60 * TempoAcc)
|
||||
local TempoAcc = EgtClamp( ( Massa * FMaxPinze) / ( 60 * ForzaAttrito), MinTempoAcc, MaxTempoAcc)
|
||||
local RidFeed = 100 / Massa * 100
|
||||
if RidFeed > 100 then
|
||||
RidFeed = 100
|
||||
elseif RidFeed < 10 then
|
||||
RidFeed = 10
|
||||
end
|
||||
return TempoAcc * 1000, MinTempoAcc * 1000, RidFeed
|
||||
return TempoAcc, MinTempoAcc, RidFeed
|
||||
end
|
||||
|
||||
---------------------------------------------------------------------
|
||||
|
||||
+1
-1
@@ -789,7 +789,7 @@ function OnSimulMoveStart()
|
||||
EMT.MCHFIRST = false
|
||||
local bZmax = ( EMT.TOOL ~= EMT.PREVTOOL or EMT.L3 > -1)
|
||||
-- con pezzi alti aggiorno gli assi rotanti prima di muovermi sopra il pezzo
|
||||
if not EMT.LOAD and EMT.MOVE == 0 and EMT.HB > BeamHeightForFixRot and EMT.FLAG2 == 1 then
|
||||
if not EMT.LOAD and EMT.MOVE == 0 and ( EMT.HB > BeamHeightForFixRot or ( EMT.HEAD == 'H1' and EMT.TOTLEN > 350)) and EMT.FLAG2 == 1 then
|
||||
-- se motosega mi muovo a X di sicurezza per ruotare
|
||||
if ( EMT.HEAD == 'H3' or ( bZmax and EMT.TOTLEN > 200)) then
|
||||
SimulMoveAxes( 'X', SafeXRotAxes, MCH_SIM_STEP.RAPID, 'C', EMT.R1, MCH_SIM_STEP.COLLROT, 'B', EMT.R2, MCH_SIM_STEP.COLLROT)
|
||||
|
||||
+2
-2
@@ -931,7 +931,7 @@ function SpecCalcEncumbrance( vtTool, vtArm, ptMin, ptMax, bSaw, bChain, dTLen,
|
||||
local dHeadBack = 350
|
||||
if bSaw then
|
||||
if vtTool:getX() > 0 and abs( vtTool:getY()) < 0.088 and abs( vtTool:getZ()) < 0.088 then
|
||||
dHeadBack = 50 + 0.5 * dTDiam * sqrt( 1 - vtTool:getX() * vtTool:getX())
|
||||
dHeadBack = 50 + 0.5 * dTDiam * sqrt( 1 - vtTool:getX() * vtTool:getX()) + EgtIf( EMC.CNT == 1, 10, 0)
|
||||
elseif abs( vtTool:getZ()) < 0.26 and abs( vtTool:getX()) < 0.35 then
|
||||
dHeadBack = EgtIf( vtArm:getX() < 0, 540, 350)
|
||||
elseif abs( vtTool:getZ()) < 0.26 and abs( vtTool:getX()) < 0.71 then
|
||||
@@ -1022,7 +1022,7 @@ function SpecCalcEncumbrance( vtTool, vtArm, ptMin, ptMax, bSaw, bChain, dTLen,
|
||||
local dHeadFront = 350
|
||||
if bSaw then
|
||||
if vtTool:getX() < 0 and abs( vtTool:getY()) < 0.088 and abs( vtTool:getZ()) < 0.088 then
|
||||
dHeadFront = 50 + 0.5 * dTDiam * sqrt( 1 - vtTool:getX() * vtTool:getX())
|
||||
dHeadFront = 50 + 0.5 * dTDiam * sqrt( 1 - vtTool:getX() * vtTool:getX()) + EgtIf( EMC.CNT == 1, 10, 0)
|
||||
elseif abs( vtTool:getZ()) < 0.26 and abs( vtTool:getX()) < 0.35 then
|
||||
dHeadFront = EgtIf( vtArm:getX() > 0, 540, 350)
|
||||
elseif abs( vtTool:getZ()) < 0.26 and abs( vtTool:getX()) < 0.71 then
|
||||
|
||||
@@ -1,5 +1,17 @@
|
||||
==== Common_FAST Update Log ====
|
||||
|
||||
Versione 2.7g1 (01/07/2025)
|
||||
- (GEN) Aggiunti parametri FMAXPINZE, MAXACC, MINACC configurabili da TS3. Ticket#2052
|
||||
|
||||
Versione 2.7f3 (26/06/2025)
|
||||
- (SIM-GEN) Aggiunti 10mm di sicurezza in caso di primo pinzaggio per stare oltre tolleranza riqualifica laser di 50mm. Ticket#2504
|
||||
|
||||
Versione 2.7f2 (19/06/2025)
|
||||
- (GEN) Se in separazione il pezzo è andato più lontano della posizione standard, viene riletta. Ticket#2498
|
||||
|
||||
Versione 2.7f1 (18/06/2025)
|
||||
- (SIM-GEN) Se utensile più lungo di 350mm, si va in posizione sicurezza come per la motosega. Ticket#2438
|
||||
|
||||
Versione 2.7e1 (26/05/2025)
|
||||
- (SIM) Aumentata dimensione massima per la quale si rimuove uno scarto dal VMILL. Ticket#1438
|
||||
- (SIM) In simulazione, corretto selezione utensile per punte lunghe. Ticket#2438
|
||||
|
||||
+1
-1
@@ -3,7 +3,7 @@
|
||||
|
||||
local InfoCommon_STD_PP = {
|
||||
NAME = 'Common_FAST', -- nome script PP standard
|
||||
VERSION = '2.7e1', -- versione script
|
||||
VERSION = '2.7g1', -- versione script
|
||||
MIN_MACH_VER_PP_COMMON = '2.5k1' -- versione minima kernel
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user