2 Commits

Author SHA1 Message Date
andrea.villa cc6592dc62 Modificate accelerazioni minima e massima 2026-04-09 15:58:20 +02:00
andrea.villa fc1e206cf7 - Piccole modifiche a simulazione in caso di motosega caricata con Q=0
- Blocco della generazione se Q=0
2025-08-29 08:57:41 +02:00
3 changed files with 26 additions and 10 deletions
+4 -3
View File
@@ -178,8 +178,8 @@ function OnDispositionEnd()
local STrave = EMT.ST
local HOverM = EMT.HOVM
-- calcolo dati pinze
local MinAccPinze = 0.3
local MaxAccPinze = 4
local MinAccPinze = 1
local MaxAccPinze = 12
local KgMtCubo= 550 -- densità legno in Kg / metro cubo
local Massa = ( HTrave * STrave * LBarra * KgMtCubo ) / 1000000000
local FMaxPinze = EMT.FMAXPINZE
@@ -1747,7 +1747,8 @@ function GetET( sHead, sTcPos, dAxR3)
return ' ET42'
elseif sHead == 'H13' then
if dAxR3 and abs( dAxR3 - 0) < 0.1 then
return ' ET101'
EmtSetLastError( 1210, 'Chain saw orientation not allowed: ' .. EMT.MCHNAME)
-- return ' ET101'
elseif dAxR3 and abs( dAxR3 + 90) < 0.1 then
return ' ET102'
else
+17 -4
View File
@@ -26,8 +26,8 @@
require( 'EmtGenerator')
EgtEnableDebug( false)
PP_VER = '2.7d1'
PP_NVER = '2.7.4.1'
PP_VER = '3.1d1'
PP_NVER = '2.7.8.1'
-- Parametri macchina
NumericalControl = 'NUM' -- solo NUM
@@ -39,10 +39,12 @@ ParkX1 = -1.0
MinZ1 = 0
MaxZ1 = 1810
ParkZ1 = 0
ParkZ1_H13_101 = 1600
MinA1 = -180
MaxA1 = 360
ParkA1 = 0
ParkH11_A1 = 0
ParkH13_A1 = 90
MillOffs = 177.0
SawOffs = -242.55
SawBOffs = 0
@@ -693,20 +695,31 @@ function OnSetHead()
EmtModifyAxisStroke( 'A1', { MinA1, MaxA1})
EmtModifyAxisHome( 'A1', ParkH11_A1)
end
EmtModifyAxisHome( 'Z1', ParkZ1)
-- se testa 1 lama
elseif EMC.HEAD == 'H12' then
EmtModifyAxisStroke( 'A1', { MinA1, MaxA1})
EmtModifyAxisHome( 'A1', ParkA1)
EmtModifyAxisHome( 'A1', ParkA1)
EmtModifyAxisHome( 'Z1', ParkZ1)
-- se testa sega a catena
elseif EMC.HEAD == 'H13' then
-- aggiustamenti per distanza
if EMC.DIST and abs( EMC.DIST) > 1 then
EmtModifyExitPosition( EMC.HEAD, EMC.EXIT, Point3d( 0, EMC.DIST, 0))
local vtMove = Point3d( 0, EMC.DIST, 0) - Point3d( EMC.EXITPOS)
local ExitId = EgtGetFirstNameInGroup( EgtGetHeadId( EMC.HEAD), 'T'..tostring( EMC.EXIT))
EgtMove( ExitId, vtMove)
end
-- recupero il valore dell'asse virtuale bloccato Q
local sVal = EgtGetMachiningParam( MCH_MP.BLOCKEDAXIS)
dPosQ = tonumber( sVal:sub( 3))
if abs( dPosQ) < 0.1 then
EmtModifyAxisHome( 'Z1', ParkZ1_H13_101)
else
EmtModifyAxisHome( 'Z1', ParkZ1)
end
EmtModifyAxisStroke( 'A1', { MinA1, MaxA1})
EmtModifyAxisHome( 'A1', ParkA1)
EmtModifyAxisHome( 'A1', ParkH13_A1)
-- se testa 2 fresa
elseif EMC.HEAD == 'H21' then
-- se con utensile lungo limito la corsa e imposto home speciale
+5 -3
View File
@@ -434,7 +434,8 @@ function OnSimulToolSelect( dPosQ)
-- imposto il valore di Q
EgtSetAxisPos( 'Q', dPosQ)
if abs( dPosQ) < 0.1 then
EgtSetAxisPos( 'B', 0)
EgtSetAxisPos( 'B', -90)
EgtSetAxisPos( 'Z1', ParkZ1_H13_101)
end
EgtSetAxisPos( 'A1', 90)
end
@@ -465,11 +466,12 @@ function OnSimulToolDeselect()
local CollSimRotStep = min( RapSimRotStep, 5)
-- movimento scarico sega a catena
if EMT.HEAD == 'H13' then
SimulMoveAxis( 'Z1', MinZ1, RapSimStep)
local dPosQ = EgtGetAxisPos( 'Q')
if abs( dPosQ) < 0.1 then
SimulMoveAxis( 'Z1', ParkZ1_H13_101, RapSimStep)
SimulMoveAxes( 'A1', 90, CollSimRotStep, 'B', -90, CollSimRotStep)
else
SimulMoveAxis( 'Z1', MinZ1, RapSimStep)
SimulMoveAxes( 'A1', 90, CollSimRotStep, 'B', -180, CollSimRotStep)
end
-- movimento scarico utensile di grosso diametro
@@ -751,7 +753,7 @@ function OnSimulMoveStart()
local BPos = EgtGetAxisPos( 'B')
if abs( EMT.R1 - BPos) > 30 then
if nHSet == 1 then
SimulMoveAxis( 'Z1', ParkZ1, RapSimStep)
SimulMoveAxis( 'Z1', EgtGetAxisHomePos( 'Z1'), RapSimStep)
else
SimulMoveAxis( 'Z2', ParkZ2, RapSimStep)
end