- Arrotondati valori area trapezio

- Trasferite operazioni di SimulMoveAxis e SetPVLight, SetPYLight nelle funzioni ExecMovePV e ExecMovePY
This commit is contained in:
daniele.nicoli
2025-12-18 11:22:17 +01:00
parent 07a261bfce
commit fce0068d45
+16 -18
View File
@@ -986,21 +986,9 @@ function ExecAuxCmd( sCmd)
end
end
elseif Cmd[1] == '11' then
local dPY = MaxOpen
if Cmd[2] ~= '0' then
dPY = EgtIf( EMT.ROT == -1, EMT.HT, EMT.ST)
end
SimulMoveAxis( 'PY', dPY, MCH_SIM_STEP.RAPID)
SetPYLight( Cmd[2] ~= '0')
ExecMovePY( Cmd[2] ~= '0')
elseif Cmd[1] == '12' then
ExecMovePV( Cmd[2] ~= '0')
local dPV = MaxOpen
if Cmd[2] ~= '0' then
dPV = EgtIf( EMT.ROT == -1, EMT.HT, EMT.ST)
end
SimulMoveAxis( 'PV', dPV, MCH_SIM_STEP.RAPID)
SetPVLight( Cmd[2] ~= '0')
elseif Cmd[1] == '21' then
local nYDelta = tonumber( Cmd[2])
local nVDelta = tonumber( Cmd[3])
@@ -1186,10 +1174,10 @@ function CheckClamping( sClampName)
local dMinClamping = ( MinJoin * MinZClamping)
-- si moltiplica per un coefficiente minimo sotto al quale si da l'errore di pinzaggio
ClampingCoeffMin = EgtClamp( ClampingCoeffMin, 0.01, 1)
if MinZClamping > 116.6119 then
dMinClamping = MinJoin * 116.6119 + ( math.pow( MinJoin, 2) / 2)
if MinJoin > 280.7729 then
dMinClamping = dMinClamping + ( math.pow( MinJoin - 280.7729, 2))
if MinZClamping > 116 then
dMinClamping = MinJoin * 116 + ( math.pow( MinJoin, 2) / 2)
if MinJoin > 280 then
dMinClamping = dMinClamping + ( math.pow( MinJoin - 280, 2))
end
end
@@ -1261,7 +1249,12 @@ end
---------------------------------------------------------------------
function ExecMovePY( bClose)
--SimulMoveAxes( 'PY', EgtIf( not bClose, MaxHoOpen, EMT.HB), MCH_SIM_STEP.RAPID)
--SetPYLight( bClose)
local dPY = MaxOpen
if bClose then
dPY = EgtIf( EMT.ROT == -1, EMT.HT, EMT.ST)
end
SimulMoveAxis( 'PY', dPY, MCH_SIM_STEP.RAPID)
SetPYLight( bClose)
if bClose then
CheckClamping( 'PY')
end
@@ -1270,7 +1263,12 @@ end
---------------------------------------------------------------------
function ExecMovePV( bClose)
--EgtIf( not bClose, MaxHoOpen, EMT.HB), MCH_SIM_STEP.RAPID)
--SetPVLight( bClose)
local dPV = MaxOpen
if bClose then
dPV = EgtIf( EMT.ROT == -1, EMT.HT, EMT.ST)
end
SimulMoveAxis( 'PV', dPV, MCH_SIM_STEP.RAPID)
SetPVLight( bClose)
if bClose then
CheckClamping( 'PV')
end