Compare commits

...

12 Commits

Author SHA1 Message Date
luca.mazzoleni 038eed3541 - Modificato YAML per comunicazione versioni a LiMan.
- Aggiunta PP_NVER, versione in formato numerico.
2024-09-18 16:07:30 +02:00
andrea.villa 5ead166d6d Piccole migliorie dopo test autmatici 2024-09-13 15:24:38 +02:00
andrea.villa 19b0efa341 - Allineamento con common ver. 2.6i2
- Inseriti in NGE solidi collisione TC
2024-09-13 11:56:29 +02:00
andrea.villa 5f343e9806 -Allineamento con common ver. 2.6i1
- File YML con prefisso di ricerca "Common_" per compilazione
2024-09-02 10:35:12 +02:00
andrea.villa 827e9e3c03 - Allineamento con common ver. 2.6h2 2024-08-07 10:12:12 +02:00
andrea.villa f8c217a85d - Allineamento con common ver. 2.6h1 2024-08-01 12:57:16 +02:00
andrea.villa e029dfa64b Tolto stato finale paratia carico 2024-07-31 17:18:21 +02:00
andrea.villa e925500b5f Piccola correzione segni quote parcheggio 2024-07-31 15:23:57 +02:00
andrea.villa cf04020f10 Merge remote-tracking branch 'origin/develop' 2024-07-31 11:05:48 +02:00
andrea.villa f06bfab111 - Allineamento con common ver. 2.6g5 2024-07-31 11:05:37 +02:00
andrea.villa d344027033 Merge branch 'AdjustClampAfterRotation' into develop 2024-07-31 11:04:33 +02:00
andrea.villa c082727044 Alla linea con EA75 e EA76 si scrive ET1 2024-07-25 15:36:53 +02:00
8 changed files with 376 additions and 84 deletions
+70 -10
View File
@@ -7,14 +7,21 @@ variables:
NET_SHARE_Z: '\\10.74.82.201\Artifacts'
NET_SHARE_S: '\\10.74.82.201\Scambio'
NET_SHARE_R: '\\10.74.82.201\EgwTech'
NET_SHARE_H: '\\10.74.82.252\team drives'
NET_USERQ: 'steamw\egalware'
NET_USER_SERVICES: 'steamw\services'
MACH_VERS: '0.0.0.0'
TEMP_PATH: 'C:\MachinesDeploy'
MACHINES_PATH_R: 'R:\EgtData\Machines'
DEST_MACHINES_PATH_R: 'R:\EgtData\Machines\zTestYAML'
DEST_MACHINES_PATH_H: 'H:\Beam & Wall - Essetre\test'
SRC_PATH: ''
BASE_PATH: ''
TEST_PATH: ''
URL_VERSIONS_LOG: "https://liman.egalware.com/ELM.API/api/release/save"
MACH_VERS_NUM: '0.0.0.0'
CRITICAL_STRING: "#critical#"
#Note compilazione LUA:
# lua54 -o bin\$FileName -s $FileName: -o = output, -s = NON include i debug symbols
@@ -44,6 +51,22 @@ variables:
SLEEP 2
net use R: /delete
# helper copia script verso drive condiviso
.ReplicaStor01: &ReplicaStor01
- |
net use H: /delete
SLEEP 2
net use H: $env:NET_SHARE_H /u:$env:NET_USER_SERVICES $SRVCS_PASSWD
echo "-----------------------"
echo " Copia macchina su stor01"
echo "-----------------------"
SLEEP 2
$destinationPath = "$env:DEST_MACHINES_PATH_H\$env:MACH_NAME" + "\"
echo $destinationPath
ROBOCOPY "$env:BASE_PATH" "$destinationPath\" *.zip
SLEEP 2
net use H: /delete
# helper copia script verso cartella di rete R:\ per develop
.ReplicaR_DEV: &ReplicaR_DEV
- |
@@ -84,17 +107,14 @@ variables:
Rename-Item -Path "$env:TEST_PATH\$env:MACH_NAME.ini" -NewName "$env:MACH_NAME_TEST.ini"
ROBOCOPY . "$env:SRC_PATH\bin\$env:MACH_NAME\" /E /XF "*.bat" /XF "*.yml" /XF ".gitignore" /XD ".git" /XF "UpdateLog.txt" /XD ".vscode"
echo "-----------------------"
echo " Compilazione file *.lua 32/64bit di Common*"
echo " Compilazione file *.lua 32/64bit"
echo "-----------------------"
$FileList = Get-ChildItem("Common*")
$FileList = Get-ChildItem("Common_*")
ForEach ($File in $FileList) {
$FileName = Split-Path $File -leaf
lua54 -o $env:SRC_PATH\bin\$env:MACH_NAME\$FileName -s $FileName
echo "lua54 -o bin\$FileName -s $FileName"
}
echo "-----------------------"
echo " FINE Compilazione"
echo "-----------------------"
# helper recupero nome macchina
.machName-fix: &machName-fix
@@ -112,12 +132,22 @@ variables:
echo "-----------------------"
echo " Calcolo versione"
echo "-----------------------"
# calcolo versione formato stringa
$fPath = "$env:MACH_NAME.mlde";
$vLine = Select-String -path $fPath -Pattern 'PP_VER';
$vLine = Select-String -path $fPath -Pattern '^PP_VER';
$comp = $vLine -split "=";
$env:MACH_VERS = $comp[1].Replace("'","").Trim()
# display versione
Write-Output $env:MACH_VERS;
# display versione formato stringa
Write-Output $env:MACH_VERS
# calcolo versione formato numerico
$fPath = "$env:MACH_NAME.mlde";
$vLine = Select-String -path $fPath -Pattern '^PP_NVER';
$comp = $vLine -split "=";
$env:MACH_VERS_NUM = $comp[1].Replace("'","").Trim()
# display versione formato numerico
Write-Output $env:MACH_VERS_NUM
# helper calcolo versione se develop
.version-fix_DEV: &version-fix_DEV
@@ -129,7 +159,7 @@ variables:
$commitAuthor = $commitAuthor[0].Trim()
$env:MACH_VERS = $commitAuthor
# display versione
Write-Output $env:MACH_VERS;
Write-Output $env:MACH_VERS
# helper creazione folders
.folder-fix: &folder-fix
@@ -161,6 +191,33 @@ variables:
7zip a -tzip $Target $Source
Write-Output "called ZIP $Source --> $Target"
# helper invio notifica a log versioni online (LiMan)
.SendToVersionsLog: &SendToVersionsLog
- |
echo "-----------------------"
echo " Invio versione a log online"
echo "-----------------------"
$tags = ""
# se critico scrive tag
if ( $CI_COMMIT_MESSAGE | Select-String -Pattern $env:CRITICAL_STRING) {
$tags = "CRITICAL"
}
$body =
@{
codInst = "EgalWare"
codApp = $env:MACH_NAME
uplAppId = "UpdateManager"
masterKey = $LiMan_Key
tipo = "Machine"
versNum = $env:MACH_VERS_NUM
versText = $env:MACH_VERS
releaseDate = (Get-Date).toString("yyyy-MM-ddTHH:mm:ss.fffZ")
relTags = $tags
}
$jsonBody = ConvertTo-Json -InputObject $body
echo $jsonBody
Invoke-WebRequest -Method Post -URI $env:URL_VERSIONS_LOG -ContentType "application/json" -Body $jsonBody -UseBasicParsing
# helper esecuzione test
.RunTest: &RunTest
@@ -189,6 +246,8 @@ LuaCompile:build:
- *LuaCompile
- *ZipClean
- *ReplicaR
- *ReplicaStor01
- *SendToVersionsLog
LuaCompileDev:build:
stage: build
@@ -236,4 +295,5 @@ LuaCompileDev:build:
# script:
# - *LuaCompile
# - *ZipClean
# - *ReplicaR
# - *ReplicaR
+193 -44
View File
@@ -424,6 +424,7 @@ function OnMachiningStart()
EMT.MCHUSERNOTES = EgtGetMachiningParam( MCH_MP.USERNOTES)
EMT.MCHSPLIT = ( EMT.MCHUSERNOTES:find( 'Split;', 1, true) ~= nil)
EMT.MCHPRECUT = ( EMT.MCHUSERNOTES:find( 'Precut;', 1, true) ~= nil)
EMT.MCHCUT = ( EMT.MCHUSERNOTES:find( 'Cut;', 1, true) ~= nil)
-- se sega a catena, aggiusto subito angolo scelto per asse virtuale A
if EMT.HEAD == 'H13' or EMT.HEAD == 'H15' then
@@ -602,6 +603,10 @@ function OnMachiningEnd()
EMT.PREVTOOL = EMT.TOOL
EMT.PREVHEAD = EMT.HEAD
EMT.PREVTCPOS = EMT.TCPOS
-- se taglio finale, aggiorno lunghezza barra
if EMT.MCHCUT then
EMT.LB = EMT.LT + ( EMT.X_OFF or 0)
end
-- salvo anche utlimo utensile su testa
local nHSet = GetHeadSet( EMT.HEAD)
if nHSet == 1 then
@@ -798,6 +803,12 @@ function OnRapid()
local PrevR1 = EMT.R1p or EMT.R1pp or HomeR1
local PrevR2 = EMT.R2p or EMT.R2pp or HomeR2
EmtResetPrev()
-- gestione speciale per pezzi molto alti. Se il movimento successivo è più alto del precedente, allora prendo il successivo
if EMT.L3s then
if EMT.L3s > EMT.L3 then
EMT.L3 = EMT.L3s
end
end
-- se prima lavorazione
if EMT.LOAD then
EMT.V2POS = ParkV2
@@ -840,26 +851,41 @@ function OnRapid()
local HomeB1 = EgtGetAxisHomePos( 'B1')
local HomeC1 = EgtGetAxisHomePos( 'C1')
local dTRad, dTLen = GetToolRadLen()
local dXref = EMT.L2
if EMT.HEAD == 'H12' and EMT.L2 < -LimX1PlRotSaw then
dXref = -LimX1PlRotSaw
end
-- se fresa o lama
if not HeadIsChainSaw( EMT.HEAD) then
EmitMoveDataHead( 1, { X=dXref, Z=MyMaxZ1, B=ParkB1, C=ParkC1, TRad=dTRad, TLen=dTLen, S=Speed})
EmitMoveDataHead( 1, { X=-ParkX1, Z=MyMaxZ1, B=ParkB1, C=ParkC1, TRad=dTRad, TLen=dTLen, S=Speed})
EmitMoveStartHead( 1)
EmitMoveWaitHead( 1)
EmitMoveWaitChars( EgtIf( bOnlyCharY, 1, 3))
local bMoveZbeforeX = false
local dZref = EMT.L3
-- se carico destro e ho due teste, altrimenti in caso abbia una testa , tipo ONE, il controlo è invertito
if EMT.HEAD == 'H12' and ( EgtIf( not EgtGetHeadId( 'H21') or BD.RIGHT_LOAD, EMT.L2 < -LimX1RotSaw, EMT.L2 > -LimX1RotSaw) or EMT.R2 < -91) then
if EMT.HEAD == 'H12' and ( EgtIf( BD.RIGHT_LOAD, EMT.L2 < -LimX1RotSaw, EMT.L2 > -LimX1RotSaw) or EMT.R2 < -91) then
dZref = min( dSafeZ1 + GetZExtra( EMT.HEAD, EMT.R2) - 100, MyMaxZ1)
end
-- se la quota di lavoro è più in alta della posizione a ZHOME della testa, prima si va alla Z di lavoro e poi si approccia il pezzo
if EMT.L3 > dZref then
bMoveZbeforeX = true
end
local dXref = EMT.L2
if EMT.HEAD == 'H12' and EMT.L2 < -LimX1PlRotSaw then
dXref = -LimX1PlRotSaw
EmitMoveDataHead( 1, { X=dXref, Z=MyMaxZ1, B=ParkB1, C=ParkC1, S=Speed})
elseif not bMoveZbeforeX then
EmitMoveDataHead( 1, { X=dXref, Z=MyMaxZ1, B=ParkB1, C=ParkC1, S=Speed})
else
EmitMoveDataHead( 1, { X=-LimX1PlRotSaw, Z=MyMaxZ1, B=ParkB1, C=ParkC1, S=Speed})
end
-- caso speciale per trave alta con rotazione lama pericolosa (tolto "and EMT.SB > 379")
if EMT.HEAD == 'H12' and abs( PrevR1 - EMT.R1) > 1 and ( abs( HomeC1 - EMT.R1) > 30.1 or abs( HomeB1 - EMT.R2) > 30.1) then
EmitMoveDataHead( 1, { X=dXref, Z=MyMaxZ1, B=0, C=ParkC1, S=Speed})
EmitMoveDataHead( 1, { B=0, S=Speed})
EmitMoveDataHead( 1, { C=EMT.R1, S=Speed})
EmitMoveDataHead( 1, { Z=dZref, B=EMT.R2, S=Speed})
if bMoveZbeforeX then
EmitMoveDataHead( 1, { Z=EMT.L3, S=Speed})
end
-- caso standard
else
EmitMoveDataHead( 1, { X=dXref, Z=dZref, B=ParkB1, C=ParkC1, S=Speed})
@@ -907,29 +933,43 @@ function OnRapid()
-- allontanamento o eventuale preselezione successiva testa 1
PreselectNextDiffHead( EMT.MCHID, EMT.HEAD)
-- movimento testa
local dSafeZ1 = EgtGetAxisHomePos( 'Z21')
local dSafeZ1 = EgtGetAxisHomePos( 'Z1')
local MyMaxZ1 = EgtGetAxisMax( 'Z1')
local HomeC1 = EgtGetAxisHomePos( 'C1')
local HomeB1 = EgtGetAxisHomePos( 'B1')
local dTRad, dTLen = GetToolRadLen()
-- se fresa o lama
if not HeadIsChainSaw( EMT.HEAD) then
EmitMoveDataHead( 1, { X=EMT.L2, Z=MyMaxZ1, B=HomeB1, C=HomeC1, TRad=dTRad, TLen=dTLen, S=Speed})
EmitMoveDataHead( 1, { X=-ParkX2, Z=MyMaxZ1, B=HomeB1, C=HomeC1, TRad=dTRad, TLen=dTLen, S=Speed})
EmitMoveStartHead( 1)
EmitMoveWaitHead( 1)
EmitMoveWaitChars( EgtIf( bOnlyCharY, 1, 3))
local bMoveZbeforeX = false
local dZref = EMT.L3
if EMT.HEAD == 'H12' and ( EgtIf( not EgtGetHeadId( 'H21') or BD.RIGHT_LOAD, EMT.L2 < -LimX1RotSaw, EMT.L2 > -LimX1RotSaw) or EMT.R2 > 91) then
if EMT.HEAD == 'H12' and ( EgtIf( BD.RIGHT_LOAD, EMT.L2 < -LimX1RotSaw, EMT.L2 > -LimX1RotSaw) or EMT.R2 > 91) then
dZref = min( dSafeZ1 + GetZExtra( EMT.HEAD, EMT.R2) - 100, MyMaxZ1)
end
-- se la quota di lavoro è più in alta della posizione a ZHOME della testa, prima si va alla Z di lavoro e poi si approccia il pezzo
if EMT.L3 > dZref then
bMoveZbeforeX = true
end
if not bMoveZbeforeX then
EmitMoveDataHead( 1, { X=EMT.L2, Z=MyMaxZ1, B=HomeB1, C=HomeC1, S=Speed})
else
EmitMoveDataHead( 1, { X=-LimX1RotSawTC2, Z=MyMaxZ1, B=HomeB1, C=HomeC1, S=Speed})
end
-- caso speciale per trave alta con rotazione lama pericolosa (tolto "and EMT.SB > 379")
if EMT.HEAD == 'H12' and abs( PrevR1 - EMT.R1) > 1 and ( abs( HomeC1 - EMT.R1) > 30.1 or abs( HomeB1 - EMT.R2) > 30.1) then
EmitMoveDataHead( 1, { X=EMT.L2, Z=MyMaxZ1, B=0, C=HomeC1, S=Speed})
EmitMoveDataHead( 1, { B=0, S=Speed})
EmitMoveDataHead( 1, { C=EMT.R1, S=Speed})
EmitMoveDataHead( 1, { Z=dZref, B=EMT.R2, S=Speed})
if bMoveZbeforeX then
EmitMoveDataHead( 1, { Z=EMT.L3, S=Speed})
end
-- altrimenti caso standard
else
EmitMoveDataHead( 1, { X=EMT.L2, Z=dZref, B=HomeB1, C=HomeC1, S=Speed})
EmitMoveDataHead( 1, { Z=dZref, S=Speed})
EmitMoveDataHead( 1, { B=EMT.R2, S=Speed})
EmitMoveDataHead( 1, { C=EMT.R1, S=Speed})
end
@@ -968,22 +1008,37 @@ function OnRapid()
local dTRad, dTLen = GetToolRadLen()
-- se fresa o lama
if not HeadIsChainSaw( EMT.HEAD) then
EmitMoveDataHead( 2, { X=EMT.L2, Z=MyMaxZ2, B=HomeB2, C=HomeC2, TRad=dTRad, TLen=dTLen, S=Speed})
EmitMoveDataHead( 2, { X=-ParkX2, Z=MyMaxZ2, B=HomeB2, C=HomeC2, TRad=dTRad, TLen=dTLen, S=Speed})
EmitMoveStartHead( 2)
EmitMoveWaitHead( 2)
EmitMoveWaitChars( EgtIf( bOnlyCharY, 1, 3))
local bMoveZbeforeX = false
local dZref = EMT.L3
if EMT.HEAD == 'H22' and ( EgtIf( BD.RIGHT_LOAD, EMT.L2 < -LimX2RotSaw, EMT.L2 > -LimX2RotSaw) or EMT.R2 > 91) then
dZref = min( dSafeZ2 + GetZExtra( EMT.HEAD, EMT.R2) - 100, MyMaxZ2)
end
-- se la quota di lavoro è più in alta della posizione a ZHOME della testa, prima si va alla Z di lavoro e poi si approccia il pezzo
if EMT.L3 > dZref then
bMoveZbeforeX = true
end
if not bMoveZbeforeX then
EmitMoveDataHead( 2, { X=EMT.L2, Z=MyMaxZ2, B=HomeB2, C=HomeC2, S=Speed})
else
EmitMoveDataHead( 2, { X=-LimX2RotSaw, Z=MyMaxZ2, B=HomeB2, C=HomeC2, S=Speed})
end
-- caso speciale per trave alta con rotazione lama pericolosa (tolto "and EMT.SB > 379")
if EMT.HEAD == 'H22' and abs( PrevR1 - EMT.R1) > 1 and ( abs( HomeC2 - EMT.R1) > 30.1 or abs( HomeB2 - EMT.R2) > 30.1) then
EmitMoveDataHead( 2, { X=EMT.L2, Z=MyMaxZ2, B=0, C=HomeC2, S=Speed})
EmitMoveDataHead( 2, { B=0, S=Speed})
EmitMoveDataHead( 2, { C=EMT.R1, S=Speed})
EmitMoveDataHead( 2, { Z=dZref, B=EMT.R2, S=Speed})
if bMoveZbeforeX then
EmitMoveDataHead( 2, { Z=EMT.L3, S=Speed})
end
-- altrimenti caso standard
else
EmitMoveDataHead( 2, { X=EMT.L2, Z=dZref, B=HomeB2, C=HomeC2, S=Speed})
EmitMoveDataHead( 2, { Z=dZref, S=Speed})
EmitMoveDataHead( 2, { B=EMT.R2, S=Speed})
EmitMoveDataHead( 2, { C=EMT.R1, S=Speed})
end
@@ -1070,6 +1125,7 @@ function OnRapid()
EMT.ZMAX = true
EMT.TO_ZMAX = nil
EMT.TO_XHOME = nil
EMT.L1pp = nil
EMT.L3pp = nil
PrevR1 = EgtGetAxisHomePos( EgtIf( nHSet == 1, 'C1', 'C2'))
PrevR2 = EgtGetAxisHomePos( EgtIf( nHSet == 1, 'B1', 'B2'))
@@ -1118,6 +1174,7 @@ function OnRapid()
end
EMT.TO_XHOME = nil
EMT.L1pp = nil
EMT.L3pp = nil
PrevR1 = HomeR1
PrevR2 = HomeR2
@@ -1139,7 +1196,7 @@ function OnRapid()
EmitMoveDataChars( EMT.MDCHAR[i])
end
if #EMT.MDCHAR > 0 then
local nMoveType = EgtIf( EMT.RELOAD, 1, 3)
local nMoveType = EgtIf( EMT.POSTROT or EMT.RELOAD, 1, 3)
EmitMoveStartChars( nMoveType)
EmitMoveWaitChars( nMoveType)
end
@@ -1162,23 +1219,39 @@ function OnRapid()
if EMT.ZMAX or ( EMT.FLAG == 2 and EMT.FLAG2 == 1) then
-- se fresa o lama
if not HeadIsChainSaw( EMT.HEAD) then
local CurrX1 = EMT.L1pp or ( -LimX1PlRotSaw)
local CurrZ1 = EMT.L3pp or MyMaxZ1
local CurrB1 = PrevR2
local CurrC1 = PrevR1
local bMoveZbeforeX = false
local dZref = EMT.L3
if EMT.HEAD == 'H12' and ( EgtIf( BD.RIGHT_LOAD, EMT.L2 < -LimX1RotSaw, EMT.L2 > -LimX1RotSaw) or EMT.R2 < -91) then
dZref = min( dSafeZ1 + GetZExtra( EMT.HEAD, EMT.R2) - 100, MyMaxZ1)
end
-- se la quota di lavoro è più in alta della posizione a ZHOME della testa, prima si va alla Z di lavoro e poi si approccia il pezzo
if EMT.L3 > dZref then
bMoveZbeforeX = true
end
local dXref = EMT.L2
if EMT.HEAD == 'H12' and EMT.L2 < -LimX1PlRotSaw then
dXref = -LimX1PlRotSaw
EmitMoveDataHead( 1, { X=dXref, Z=CurrZ1, B=CurrB1, C=CurrC1, TRad=dTRad, TLen=dTLen, S=Speed})
elseif not bMoveZbeforeX then
EmitMoveDataHead( 1, { X=dXref, Z=CurrZ1, B=CurrB1, C=CurrC1, TRad=dTRad, TLen=dTLen, S=Speed})
else
EmitMoveDataHead( 1, { X=CurrX1, Z=CurrZ1, B=CurrB1, C=CurrC1, TRad=dTRad, TLen=dTLen, S=Speed})
end
EmitMoveDataHead( 1, { X=dXref, Z=CurrZ1, B=CurrB1, C=CurrC1, TRad=dTRad, TLen=dTLen, S=Speed})
local dZref = EMT.L3
if EMT.HEAD == 'H12' and ( EgtIf( not EgtGetHeadId( 'H21') or BD.RIGHT_LOAD, EMT.L2 < -LimX1RotSaw, EMT.L2 > -LimX1RotSaw) or EMT.R2 < -91) then
dZref = min( dSafeZ1 + GetZExtra( EMT.HEAD, EMT.R2) - 100, MyMaxZ1)
end
-- caso speciale per trave alta con rotazione lama pericolosa (tolto "and EMT.SB > 379")
if EMT.HEAD == 'H12' and abs( PrevR1 - EMT.R1) > 1 and ( abs( HomeC1 - EMT.R1) > 30.1 or abs( HomeB1 - EMT.R2) > 30.1) then
EmitMoveDataHead( 1, { B=0, S=Speed})
EmitMoveDataHead( 1, { C=EMT.R1, S=Speed})
EmitMoveDataHead( 1, { Z=dZref, B=EMT.R2, S=Speed})
if bMoveZbeforeX then
EmitMoveDataHead( 1, { Z=EMT.L3, S=Speed})
end
-- altrimenti caso standard
else
EmitMoveDataHead( 1, { Z=dZref, S=Speed})
@@ -1236,20 +1309,36 @@ function OnRapid()
if EMT.ZMAX or ( EMT.FLAG == 2 and EMT.FLAG2 == 1) then
-- se fresa o lama
if not HeadIsChainSaw( EMT.HEAD) then
local CurrX1 = EMT.L1pp or ( -LimX1PlRotSaw)
local CurrZ1 = EMT.L3pp or MyMaxZ1
local CurrB1 = PrevR2
local CurrC1 = PrevR1
EmitMoveDataHead( 1, { X=EMT.L2, Z=CurrZ1, B=CurrB1, C=CurrC1, TRad=dTRad, TLen=dTLen, S=Speed})
local bMoveZbeforeX = false
local dZref = EMT.L3
if EMT.HEAD == 'H12' and ( EgtIf( not EgtGetHeadId( 'H21') or BD.RIGHT_LOAD, EMT.L2 < -LimX1RotSaw, EMT.L2 > -LimX1RotSaw) or EMT.R2 > 91) then
if EMT.HEAD == 'H12' and ( EgtIf( BD.RIGHT_LOAD, EMT.L2 < -LimX1RotSaw, EMT.L2 > -LimX1RotSaw) or EMT.R2 < -91) then
dZref = min( dSafeZ1 + GetZExtra( EMT.HEAD, EMT.R2) - 100, MyMaxZ1)
end
-- se la quota di lavoro è più in alta della posizione a ZHOME della testa, prima si va alla Z di lavoro e poi si approccia il pezzo
if EMT.L3 > dZref then
bMoveZbeforeX = true
end
if not bMoveZbeforeX then
EmitMoveDataHead( 1, { X=EMT.L2, Z=CurrZ1, B=CurrB1, C=CurrC1, TRad=dTRad, TLen=dTLen, S=Speed})
else
EmitMoveDataHead( 1, { X=CurrX1, Z=CurrZ1, B=CurrB1, C=CurrC1, TRad=dTRad, TLen=dTLen, S=Speed})
end
-- caso speciale per trave alta con rotazione lama pericolosa (tolto "and EMT.SB > 379")
if EMT.HEAD == 'H12' and abs( PrevR1 - EMT.R1) > 1 and ( abs( HomeC1 - EMT.R1) > 30.1 or abs( HomeB1 - EMT.R2) > 30.1) then
EmitMoveDataHead( 1, { B=0, S=Speed})
EmitMoveDataHead( 1, { C=EMT.R1, S=Speed})
EmitMoveDataHead( 1, { Z=dZref, B=EMT.R2, S=Speed})
-- altrimenti caso standard
if bMoveZbeforeX then
EmitMoveDataHead( 1, { Z=EMT.L3, S=Speed})
end
-- altrimenti caso standard
else
EmitMoveDataHead( 1, { Z=dZref, S=Speed})
EmitMoveDataHead( 1, { B=EMT.R2, S=Speed})
@@ -1284,19 +1373,35 @@ function OnRapid()
if EMT.ZMAX or ( EMT.FLAG == 2 and EMT.FLAG2 == 1) then
-- se fresa o lama
if not HeadIsChainSaw( EMT.HEAD) then
local CurrX2 = EMT.L1pp or ( -LimX2RotSaw)
local CurrZ2 = EMT.L3pp or MyMaxZ2
local CurrB2 = PrevR2
local CurrC2 = PrevR1
EmitMoveDataHead( 2, { X=EMT.L2, Z=CurrZ2, B=CurrB2, C=CurrC2, TRad=dTRad, TLen=dTLen, S=Speed})
local bMoveZbeforeX = false
local dZref = EMT.L3
if EMT.HEAD == 'H22' and ( EgtIf( BD.RIGHT_LOAD, EMT.L2 < -LimX2RotSaw, EMT.L2 > -LimX2RotSaw) or EMT.R2 > 91) then
if EMT.HEAD == 'H22' and ( EgtIf( BD.RIGHT_LOAD, EMT.L2 > -LimX2RotSaw, EMT.L2 < -LimX2RotSaw) or EMT.R2 < -91) then
dZref = min( dSafeZ2 + GetZExtra( EMT.HEAD, EMT.R2) - 100, MyMaxZ2)
end
-- se la quota di lavoro è più in alta della posizione a ZHOME della testa, prima si va alla Z di lavoro e poi si approccia il pezzo
if EMT.L3 > dZref then
bMoveZbeforeX = true
end
if not bMoveZbeforeX then
EmitMoveDataHead( 2, { X=EMT.L2, Z=CurrZ2, B=CurrB2, C=CurrC2, TRad=dTRad, TLen=dTLen, S=Speed})
else
EmitMoveDataHead( 2, { X=CurrX2, Z=CurrZ2, B=CurrB2, C=CurrC2, TRad=dTRad, TLen=dTLen, S=Speed})
end
-- caso speciale per trave alta con rotazione lama pericolosa (tolto "and EMT.SB > 379")
if EMT.HEAD == 'H22' and abs( PrevR1 - EMT.R1) > 1 and ( abs( HomeC2 - EMT.R1) > 30.1 or abs( HomeB2 - EMT.R2) > 30.1) then
EmitMoveDataHead( 2, { B=0, S=Speed})
EmitMoveDataHead( 2, { C=EMT.R1, S=Speed})
EmitMoveDataHead( 2, { Z=dZref, B=EMT.R2, S=Speed})
if bMoveZbeforeX then
EmitMoveDataHead( 2, { Z=EMT.L3, S=Speed})
end
-- altrimenti caso standard
else
EmitMoveDataHead( 2, { Z=dZref, S=Speed})
@@ -1570,6 +1675,44 @@ end
---------------------------------------------------------------------
function OnArc()
-- se necessario, impostazione riferimento locale
if EMT.REFLOC == 0 then
-- gruppo della testa
local nHSet = GetHeadSet( EMT.HEAD)
-- calcolo per piano generico
CalcInterpPlane()
EMT.REFLOC = 1
-- salvo posizione attuale
local OldL1 = EMT.L1
local OldL2 = EMT.L2
local OldL3 = EMT.L3
-- imposto posizione precedente (non contiene l'offset in X per sovramateriale di testa EMT.X_OFF)
EMT.L1 = EMT.L1o
EMT.L2 = EMT.L2o
EMT.L3 = EMT.L3o
-- trasformo i punti nel piano
MyAdjustLinearAxes()
EmtAdjustRotaryAxes()
EMT.L1p = nil
EMT.L2p = nil
EMT.L3p = nil
local sDouFlag = EgtIf( EMT.DOU_TYPE, ' EE1', '')
EmtOutput( 'G142'..EmtGetAxis('L1')..EmtGetAxis('L2')..EmtGetAxis('L3')..EMT.IPLGLSTR..EgtIf( nHSet~=2, ' EU1', ' EU2')..sDouFlag..' EF'..GetFmaxClamp())
-- emissione movimento
local sOut = 'G0'..EmtGetAxis('L1')..EmtGetAxis('L2')..EmtGetAxis('L3')..
EmtGetAxis('R2')..EmtGetAxis('R1')
EmtOutput( sOut)
-- aggiorno precedenti
local nOriginalMove = EMT.MOVE
EMT.MOVE = 0
EmtUpdatePrev()
EMT.MOVE = nOriginalMove
-- ripristino posizione attuale
EMT.L1 = OldL1
EMT.L2 = OldL2
EMT.L3 = OldL3
end
-- non modale su archi
EmtResetPrevLinear()
-- aggiustamento valori
@@ -2087,7 +2230,10 @@ function PreparePreRotation( sCmd, nInd)
if Cmd[2] ~= 'Z' then
local MDChar
if EMT.PREROT then
MDChar = { [Cmd[2]]=tonumber(Cmd[3]), IniStatY1=86, FinStatY1=87, IniStatY2=1, BeamVise=0}
-- parcheggio per sicurezza morsa e paratia lato scarico
MDChar = { Y2=ParkY2, V2=ParkV2, IniStatY2=1, FinStatY2=1, BeamVise=0}
table.insert( EMT.MDCHAR, MDChar)
MDChar = { [Cmd[2]]=tonumber(Cmd[3]), IniStatY1=86, FinStatY1=87, BeamVise=0}
elseif EMT.SPECSPLIT then
MDChar = { [Cmd[2]]=tonumber(Cmd[3]), V1=ParkV1, IniStatY1=EMT.ISY1, FinStatY1=EMT.FSY1, IniStatY2=EMT.ISY2, FinStatY2=EMT.FSY2, IniStatV1=3, BeamVise=EMT.BV}
EMT.V1POS = MDChar.V1
@@ -2178,20 +2324,19 @@ function PreparePostRotation( sCmd, nInd)
-- se dichiarazione inizio riposizionamento carrelli
if Cmd[2] == 'CARR_MOVE' then
EMT.POSTROT = false
table.insert( EMT.MDCHAR, { Start=3})
table.insert( EMT.MDCHAR, { Wait=3})
table.insert( EMT.MDCHAR, { Start=1})
table.insert( EMT.MDCHAR, { Wait=1})
end
elseif Cmd[1] == '1' then
-- non interessa
elseif Cmd[1] == '2' then
if Cmd[2] == 'Y1' then
-- tolgo eventuale sovramateriale presente sul pezzo in posizione iniziale (la misura laser è ora col finito)
local MDChar = { Y1=tonumber(Cmd[3])-EMT.HOVM, IniStatY1=75, V1=ParkV1, V2=ParkV2, FinStatY1=-1, FinStatV1=-1, BeamVise=0, Aux=' (E80058=0)', MovType=3}
local MDChar = { Y1=tonumber(Cmd[3])-EMT.HOVM, IniStatY1=75, V1=ParkV1, FinStatY1=-1, BeamVise=0, Aux=' (E80058=0)', MovType=1}
table.insert( EMT.MDCHAR, MDChar)
EMT.V1POS = ParkV1
EMT.V2POS = ParkV2
elseif Cmd[2] == 'T' then
local MDChar = { Y1=tonumber(Cmd[3]), IniStatY1=76, FinStatY1=EMT.FSY1, BeamVise=0, MovType=3}
local MDChar = { Y1=tonumber(Cmd[3]), IniStatY1=76, FinStatY1=EMT.FSY1, BeamVise=0, MovType=1}
table.insert( EMT.MDCHAR, MDChar)
EMT.TPOS = tonumber(Cmd[3])
end
@@ -2217,7 +2362,7 @@ function PreparePostRotation( sCmd, nInd)
EMT.Y2DELTA = nY2Delta
end
if not FindReadHeadWithLaser( EMT.MDCHAR) then
local MDChar = { Y1=LoadT, IniStatY1=76, FinStatY1=EMT.FSY1, BeamVise=0, MovType=3}
local MDChar = { Y1=LoadT, IniStatY1=76, FinStatY1=EMT.FSY1, BeamVise=0, MovType=1}
table.insert( EMT.MDCHAR, MDChar)
EMT.TPOS = LoadT
end
@@ -2551,7 +2696,7 @@ function EmitZmax( bReset, bEnd, bXhome, PrevR1, PrevR2, bSplitCut, bUsePrevDelt
-- eseguo la salita a Z1max (oriento solo se assi rotanti non già a posto)
if abs( dSafeC1 - PrevR1) > 0.1 or abs( dSafeB1 - PrevR2) > 0.1 then
local dZref = dSafeZ1 + GetZExtra( EMT.HEAD, PrevR2)
if EgtIf( not EgtGetHeadId( 'H21') or BD.RIGHT_LOAD, -EMT.L2o < -LimX1RotSaw, -EMT.L2o > -LimX1RotSaw) then
if EgtIf( BD.RIGHT_LOAD, -EMT.L2o < -LimX1RotSaw, -EMT.L2o > -LimX1RotSaw) then
dZref = dZref - EgtIf( not Mortiser, 100, 370)
end
dZref = min( dZref, dMaxZ1)
@@ -2779,10 +2924,14 @@ function EmitParkRoller( dPosT, bSplitCut, bUsePrevDelta)
if bSplitCut then
if DiffY1 > 0.1 then
MDChar.Y1 = dPosY1 + DiffY1
else
MDChar.Y1 = dPosY1
end
if DiffY2 < -0.1 then
MDChar.Y2 = dPosY2 + DiffY2
dPosT = dPosT + DiffY2
else
MDChar.Y2 = dPosY2
end
elseif DiffY1 > 0.1 and DiffY2 < -0.1 then
EmtSetLastError( 1201, 'Error Collision in ParkRoller')
@@ -2810,7 +2959,7 @@ function EmitParkRoller( dPosT, bSplitCut, bUsePrevDelta)
local dPosY1 = dPosT + dY1Delta
local DiffY1 = MyParkY1 - dPosY1
local dMoveY1 = EgtIf( DiffY1 > 0.1, dMoveV1, 0)
local dTryMoveY1 = ParkV1 - dPosT - EgtIf( bSplitCut or EMT.FALL, EMT.LT, 0)
local dTryMoveY1 = min( ParkV1 - dPosT - EgtIf( bSplitCut or EMT.FALL, EMT.LT, 0), MaxY1 - dPosY1 - 10)
if ( dPosT > ParkV2 - ExtraParkV and dPosT < ParkV1 and dPosY1 + dTryMoveY1 < MaxY1) then dMoveY1 = max( dMoveY1, dTryMoveY1) end
MDChar.Y1 = dPosY1 + dMoveY1
MDChar.MovType = 1
@@ -2821,7 +2970,7 @@ function EmitParkRoller( dPosT, bSplitCut, bUsePrevDelta)
local dPosY2 = dPosT + dY2Delta
local DiffY2 = MyParkY2 - dPosY2
local dMoveY2 = EgtIf( DiffY2 < -0.1, dMoveV2, 0)
local dTryMoveY2 = ParkV2 - dPosT - EMT.LT - EMT.DELTA_LT - EMT.HOVM
local dTryMoveY2 = max( ParkV2 - dPosT - EMT.LT - EMT.DELTA_LT - EMT.HOVM, MinY2 - dPosY2 + 10)
if ( dPosT + EMT.LT + EMT.DELTA_LT + EMT.HOVM < ParkV1 + ExtraParkV and dPosT + EMT.LT + EMT.DELTA_LT + EMT.HOVM > ParkV2 and dPosY2 + dTryMoveY2 > MinY2) then dMoveY2 = min( dMoveY2, dTryMoveY2) end
MDChar.Y2 = dPosY2 + dMoveY2
MDChar.MovType = 2
@@ -2883,11 +3032,11 @@ function PreselectNextDiffHead( nMchId, sHead)
if nNextHSet ~= nHSet then
local sNextTcPos = EgtTdbGetCurrToolParam( MCH_TP.TCPOS)
-- se testa attuale da caricare è sega a catena, mando l'altra prima in HomeX (per evitare possibili collisioni) e poi lancio preselezione
if sHead == 'H13' and EMT.PREVHEAD ~= 'H13' then
if sHead == 'H13' and nHSet ~= GetHeadSet( EMT.PREVHEAD_H1) then
EmitMoveDataHead( 2, { X=-ParkX2, Z=MaxZ2, B=ParkB2, C=ParkC2, TPos=AdjustTcPos( false, EMT.PREVTCPOS_H2)})
EmitMoveStartHead( 2)
EmitMoveWaitHead( 2)
elseif sHead == 'H23' and EMT.PREVHEAD ~= 'H23' then
elseif sHead == 'H23' and nHSet ~= GetHeadSet( EMT.PREVHEAD_H2) then
EmitMoveDataHead( 1, { X=-ParkX1, Z=MaxZ1, B=ParkB1, C=ParkC1, TPos=AdjustTcPos( false, EMT.PREVTCPOS_H1)})
EmitMoveStartHead( 1)
EmitMoveWaitHead( 1)
@@ -3087,12 +3236,12 @@ end
function EmitBeamHeadData( BhData)
if not BhData.Pz5 then
local sOut = 'G152'
if BhData.T then sOut = sOut .. ' Y' .. EmtLenToString( BhData.T, 3) end
if BhData.Y1 then sOut = sOut .. ' EY' .. EmtLenToString( BhData.Y1, 3) end
if BhData.Y2 then sOut = sOut .. ' EV' .. EmtLenToString( BhData.Y2, 3) end
if BhData.V1 then sOut = sOut .. ' B' .. EmtLenToString( BhData.V1, 3) end
if BhData.V2 then sOut = sOut .. ' C' .. EmtLenToString( BhData.V2, 3) end
if BhData.W then sOut = sOut .. ' EW' .. EmtLenToString( BhData.W, 3) end
if BhData.T then sOut = sOut .. ' Y' .. EmtLenToString( BhData.T, 3) end
if BhData.Y1 then sOut = sOut .. ' EY' .. EmtLenToString( BhData.Y1, 3) end
if BhData.Y2 then sOut = sOut .. ' EV' .. EmtLenToString( BhData.Y2, 3) end
if BhData.V1 then sOut = sOut .. ' B' .. EmtLenToString( BhData.V1, 3) end
if BhData.V2 then sOut = sOut .. ' C' .. EmtLenToString( BhData.V2, 3) end
if BhData.W then sOut = sOut .. ' EW' .. EmtLenToString( BhData.W, 3) end
if BhData.ViseY1 then sOut = sOut .. ' EA' .. EgtNumToString( BhData.ViseY1, 0) end
if BhData.ViseY2 then sOut = sOut .. ' EB' .. EgtNumToString( BhData.ViseY2, 0) end
if BhData.SetHead then sOut = sOut .. ' EC' .. EgtNumToString( BhData.SetHead, 0) end
+62 -10
View File
@@ -119,6 +119,8 @@ function OnSimulStart()
{ Grp = 'Base', Sub = 'COLLISION', Name = 'TRAV'},
{ Grp = 'Base', Sub = 'COLLISION', Name = 'COL1'},
{ Grp = 'Base', Sub = 'COLLISION', Name = 'COL2'},
{ Grp = 'Base', Sub = 'COLLISION', Name = 'TC1'},
{ Grp = 'Base', Sub = 'COLLISION', Name = 'TC2'},
{ Grp = 'Base', Sub = 'BELT', Name = 'COLLISION'}}
-- gruppo CHSAW si attiva solo se progress, one con BIT mortiser o PF
if Progress or Mortiser or EgtGetHeadId( 'H21') then
@@ -132,6 +134,10 @@ function OnSimulStart()
if Progress and EgtGetHeadId( 'H21') then
table.insert( McdData, { Grp = 'Base', Sub = 'COLLISION', Name = 'SAW1'})
end
-- se non è Progress ed è una ONE, aggiungo collisioni magazzino speciale
if not Progress and not EgtGetHeadId( 'H21') then
table.insert( McdData, { Grp = 'Base', Sub = 'COLLISION', Name = 'MTC'})
end
if Clamp5 then
table.insert( McdData, { Grp = 'W', Sub = 'COLLISION', Name = 'STM1'})
@@ -965,6 +971,12 @@ function OnSimulMoveStart()
end
-- se movimento in rapido ad inizio lavorazione
if EMT.MOVE == 0 and EMT.MOVEIND <= 3 then
-- gestione speciale per pezzi molto alti. Se il movimento successivo è più alto del precedente, allora prendo il successivo
if EMT.L3s then
if EMT.L3s > EMT.L3 then
EMT.L3 = EMT.L3s
end
end
-- Dati
local B1Pos = EgtGetAxisPos( 'B1')
local B1Home = EgtGetAxisHomePos( 'B1')
@@ -979,20 +991,35 @@ function OnSimulMoveStart()
-- se movimento iniziale da Zmax con lama o fresa
if EMT.ZMAX or EMT.FLAG == 1 or ( EMT.FLAG == 2 and EMT.FLAG2 == 1) then
--EgtOutBox( 'Flag 2,1', 'Info Rapid')
local bMoveZbeforeX = false
local dZref = EMT.L3
if EMT.HEAD == 'H12' and ( EgtIf( BD.RIGHT_LOAD, -EMT.L2 < -LimX1RotSaw, -EMT.L2 > -LimX1RotSaw) or EMT.R2 < -91) then
dZref = Z1Home + GetZExtra( EMT.HEAD, EMT.R2) - 100
end
-- se la quota di lavoro è più in alta della posizione a ZHOME della testa, prima si va alla Z di lavoro e poi si approccia il pezzo
if EMT.L3 > dZref then
bMoveZbeforeX = true
end
local dXref = EMT.L2
if EMT.HEAD == 'H12' and -EMT.L2 < -LimX1PlRotSaw then
dXref = LimX1PlRotSaw
SimulMoveAxis( 'X1', dXref, MCH_SIM_STEP.RAPID)
elseif not bMoveZbeforeX then
SimulMoveAxis( 'X1', dXref, MCH_SIM_STEP.RAPID)
else
SimulMoveAxis( 'X1', LimX1PlRotSaw, MCH_SIM_STEP.RAPID)
end
SimulMoveAxis( 'X1', dXref, MCH_SIM_STEP.RAPID)
local dZref = EMT.L3
if EMT.HEAD == 'H12' and ( EgtIf( not EgtGetHeadId( 'H21') or BD.RIGHT_LOAD, -EMT.L2 < -LimX1RotSaw, -EMT.L2 > -LimX1RotSaw) or EMT.R2 < -91) then
dZref = Z1Home + GetZExtra( EMT.HEAD, EMT.R2) - 100
end
-- caso speciale per trave alta con rotazione lama pericolosa (tolto "and EMT.SB > 379")
if EMT.HEAD == 'H12' and abs( C1Pos - EMT.R1) > 1 and ( abs( C1Home - EMT.R1) > 30.1 or abs(B1Home - EMT.R2) > 30.1) then
SimulMoveAxis( 'B1', 0, MCH_SIM_STEP.COLLROT)
SimulMoveAxis( 'C1', EMT.R1, MCH_SIM_STEP.COLLROT)
SimulMoveAxes( 'Z1', dZref, MCH_SIM_STEP.RAPID, 'B1', EMT.R2, MCH_SIM_STEP.COLLROT)
if bMoveZbeforeX then
SimulMoveAxis( 'Z1', EMT.L3, MCH_SIM_STEP.RAPID)
end
-- caso standard
else
SimulMoveAxis( 'Z1', dZref, MCH_SIM_STEP.RAPID)
@@ -1036,16 +1063,29 @@ function OnSimulMoveStart()
if EMT.HEAD == 'H11' or EMT.HEAD == 'H12' then
if EMT.ZMAX or EMT.FLAG == 1 or ( EMT.FLAG == 2 and EMT.FLAG2 == 1) then
--EgtOutBox( 'Flag 2,1', 'Info Rapid')
SimulMoveAxis( 'X1', EMT.L2, MCH_SIM_STEP.RAPID)
local bMoveZbeforeX = false
local dZref = EMT.L3
if EMT.HEAD == 'H12' and ( -EMT.L2 < -LimX1RotSaw or EMT.R2 > 91) then
dZref = Z1Home + GetZExtra( EMT.HEAD, EMT.R2) - 100
end
-- se la quota di lavoro è più in alta della posizione a ZHOME della testa, prima si va alla Z di lavoro e poi si approccia il pezzo
if EMT.L3 > dZref then
bMoveZbeforeX = true
end
if not bMoveZbeforeX then
SimulMoveAxis( 'X1', EMT.L2, MCH_SIM_STEP.RAPID)
else
SimulMoveAxis( 'X1', LimX1RotSawTC2, MCH_SIM_STEP.RAPID)
end
-- caso speciale per trave alta con rotazione lama pericolosa (tolto "and EMT.SB > 400")
if EMT.HEAD == 'H12' and abs( C1Pos - EMT.R1) > 1 and ( abs( C1Home - EMT.R1) > 30.1 or abs(B1Home - EMT.R2) > 30.1) then
SimulMoveAxis( 'B1', 0, MCH_SIM_STEP.COLLROT)
SimulMoveAxis( 'C1', EMT.R1, MCH_SIM_STEP.COLLROT)
SimulMoveAxes( 'Z1', dZref, MCH_SIM_STEP.RAPID, 'B1', EMT.R2, MCH_SIM_STEP.COLLROT)
if bMoveZbeforeX then
SimulMoveAxis( 'Z1', EMT.L3, MCH_SIM_STEP.RAPID)
end
-- caso standard
else
SimulMoveAxis( 'Z1', dZref, MCH_SIM_STEP.RAPID)
@@ -1095,16 +1135,28 @@ function OnSimulMoveStart()
-- se movimento iniziale da Zmax con lama o fresa
if EMT.ZMAX or EMT.FLAG == 1 or ( EMT.FLAG == 2 and EMT.FLAG2 == 1) then
--EgtOutBox( 'Flag 2,1', 'Info Rapid')
SimulMoveAxis( 'X2', EMT.L2, MCH_SIM_STEP.RAPID)
local bMoveZbeforeX = false
local dZref = EMT.L3
if EMT.HEAD == 'H22' and ( EgtIf( BD.RIGHT_LOAD, EMT.L2 < -LimX2RotSaw, EMT.L2 > -LimX2RotSaw) or EMT.R2 > 91) then
dZref = Z2Home + GetZExtra( EMT.HEAD, EMT.R2) - 100
end
-- se la quota di lavoro è più in alta della posizione a ZHOME della testa, prima si va alla Z di lavoro e poi si approccia il pezzo
if EMT.L3 > dZref then
bMoveZbeforeX = true
end
if not bMoveZbeforeX then
SimulMoveAxis( 'X2', EMT.L2, MCH_SIM_STEP.RAPID)
else
SimulMoveAxis( 'X2', LimX2RotSaw, MCH_SIM_STEP.RAPID)
end
-- caso speciale per trave alta con rotazione lama pericolosa (tolto "and EMT.SB > 379")
if EMT.HEAD == 'H22' and abs( C2Pos - EMT.R1) > 1 and ( abs( C2Home - EMT.R1) > 30.1 or abs(B2Home - EMT.R2) > 30.1) then
SimulMoveAxis( 'B2', 0, MCH_SIM_STEP.COLLROT)
SimulMoveAxis( 'C2', EMT.R1, MCH_SIM_STEP.COLLROT)
SimulMoveAxes( 'Z2', dZref, MCH_SIM_STEP.RAPID, 'B2', EMT.R2, MCH_SIM_STEP.COLLROT)
if bMoveZbeforeX then
SimulMoveAxis( 'Z2', EMT.L3, MCH_SIM_STEP.RAPID)
end
-- caso standard
else
SimulMoveAxis( 'Z2', dZref, MCH_SIM_STEP.RAPID)
@@ -1543,7 +1595,7 @@ function ExecMoveZmax( bMchSplit, btoXHome)
if not HeadIsChainSaw( EMT.HEAD) then
if abs( HomeC - CurrC) > 0.1 or abs( HomeB - CurrB) > 0.1 then
local dZref = HomeZ + GetZExtra( EMT.HEAD, CurrB)
if EgtIf( not EgtGetHeadId( 'H21') or BD.RIGHT_LOAD, -CurrX < -LimX1RotSaw, -CurrX > -LimX1RotSaw) then
if EgtIf( BD.RIGHT_LOAD, -CurrX < -LimX1RotSaw, -CurrX > -LimX1RotSaw) then
dZref = dZref - EgtIf( not Mortiser, 100, 370)
end
SimulMoveAxes( 'Z1', EgtIf( dZref > CurrZ, dZref, CurrZ), MCH_SIM_STEP.RAPID, 'B1', EgtClamp( CurrB, -90, 90), MCH_SIM_STEP.COLLROT)
@@ -1811,7 +1863,7 @@ function ExecParkRoller( PosY1, PosY2, PosV1, PosV2, bSpliCut, bAgg)
local MoveV1 = ParkV1 - PosV1
local DiffY1 = MyParkY1 - PosY1
local MoveY1 = EgtIf( DiffY1 > 0.1, MoveV1, 0)
local TryMoveY1 = ParkV1 - PosT - EgtIf( bSpliCut or EMT.FALL, EMT.LT, 0) - EMT.HOVM
local TryMoveY1 = min( ParkV1 - PosT - EgtIf( bSpliCut or EMT.FALL, EMT.LT, 0) - EMT.HOVM, MaxY1 - PosY1 - 10)
if ( PosT > ParkV2 - ExtraParkV and PosT < ParkV1 and PosY1 + TryMoveY1 < MaxY1 and not EMT.W2DELTA) then MoveY1 = max( MoveY1, TryMoveY1) end
-- se appena eseguito taglio di separazione
if bSpliCut then
@@ -1841,7 +1893,7 @@ function ExecParkRoller( PosY1, PosY2, PosV1, PosV2, bSpliCut, bAgg)
local MoveV2 = ParkV2 - PosV2
local DiffY2 = MyParkY2 - PosY2
local MoveY2 = EgtIf( DiffY2 < -0.1, MoveV2, 0)
local TryMoveY2 = ParkV2 - PosT - EMT.LT - EMT.DELTA_LT - EMT.HOVM
local TryMoveY2 = max( ParkV2 - PosT - EMT.LT - EMT.DELTA_LT - EMT.HOVM, MinY2 - PosY2 + 10)
if ( PosT + EMT.LT + EMT.DELTA_LT + EMT.HOVM < ParkV1 + ExtraParkV and PosT + EMT.LT + EMT.DELTA_LT + EMT.HOVM > ParkV2 and PosY2 + TryMoveY2 > MinY2) then MoveY2 = min( MoveY2, TryMoveY2) end
if not SimulMoveAxes( 'T', PosT + MoveY2, MCH_SIM_STEP.RAPID,
'V1', ParkV1, MCH_SIM_STEP.RAPID,
+20 -17
View File
@@ -824,6 +824,13 @@ end
---------------------------------------------------------------------
function SpecApplyPath( bPreSplit, bSplitting, bPreCut, bCutting, bUnload, bPreRotMch)
-- mi salvo info lavorazione su una lista
local AuxInfoMach = {}
AuxInfoMach.bPreSplit = bPreSplit
AuxInfoMach.bSplitting = bSplitting
AuxInfoMach.bPreCut = bPreCut
AuxInfoMach.bCutting = bCutting
AuxInfoMach.bUnload = bUnload
-- Assegno flag di pezzo separato dal resto del grezzo
SPLIT = IsEndPhase( EMC.PHASE) or IsMid2Phase( EMC.PHASE) or IsEnd2Phase( EMC.PHASE)
@@ -921,7 +928,7 @@ function SpecApplyPath( bPreSplit, bSplitting, bPreCut, bCutting, bUnload, bPreR
local dPosT = LoadT
if IsFirstMachiningAfterRotation( EMC.MCHID) then dPosT = dPosT + TurnerOffs end
local vCmd = SpecCalcLoad( dPosT, dDistFront, max( dDistBack, MinJoin + EgtIf( SPLIT, EMC.TCING, 0), EMC.LB - ( MaxY1 - MinY1) + 6))
local vCmd2 = SpecCalcCarriages( dDistFront, dDistBack, dRollFront, dRollBack, dY1DeltaMaxSP, dY2DeltaMinUL, nChar)
local vCmd2 = SpecCalcCarriages( dDistFront, dDistBack, dRollFront, dRollBack, dY1DeltaMaxSP, dY2DeltaMinUL, nChar, AuxInfoMach)
if bSplitting and EMC.ERR == 18 then
table.insert( vCmd, { 22, dRollBack, -dRollFront})
end
@@ -934,7 +941,7 @@ function SpecApplyPath( bPreSplit, bSplitting, bPreCut, bCutting, bUnload, bPreR
-- Se altrimenti carri entrambi diponibili, eseguo calcoli per carrelli
elseif not IsEndPhase( EMC.PHASE) then
local vCmd = SpecCalcCarriages( dDistFront, dDistBack, dRollFront, dRollBack, dY1DeltaMaxSP, dY2DeltaMinUL, nChar)
local vCmd = SpecCalcCarriages( dDistFront, dDistBack, dRollFront, dRollBack, dY1DeltaMaxSP, dY2DeltaMinUL, nChar, AuxInfoMach)
-- Se non ci sono spostamenti, confermo i parametri di aggancio e di posizione roller
if SpecTestOnlyRemarkInCmds( vCmd) then
table.insert( vCmd, { 21, EgtIf( EMC.Y1DELTA, EMC.Y1DELTA, 0), EgtIf( EMC.Y2DELTA, EMC.Y2DELTA, 0)})
@@ -1262,7 +1269,7 @@ function SpecCalcLoad( dPosT, dDistFront, dDistBack)
end -- SpecAdjustLoad [L]
---------------------------------------------------------------------
function SpecCalcCarriages( dDistFront, dDistBack, dRollFront, dRollBack, dY1DeltaMaxSP, dY2DeltaMinUL, nChar)
function SpecCalcCarriages( dDistFront, dDistBack, dRollFront, dRollBack, dY1DeltaMaxSP, dY2DeltaMinUL, nChar, AuxInfoMach)
local MinFrontJoin = MinJoin + EMC.HCING + EMC.HOVM
local MyMinOther = MinOther + EgtIf( EMC.CNT == 1, AggLoad, 0)
@@ -1301,13 +1308,11 @@ function SpecCalcCarriages( dDistFront, dDistBack, dRollFront, dRollBack, dY1Del
WorkTab.dV2PosF = -dRollFront
WorkTab.bV2CloseF = false
-- aggiuntivo per non avere problemi con pezzi a caduta
if WorkTab.dY1DeltaMaxF - WorkTab.dY1DeltaMinF > 5 * BD.CHAR_EXTRA_DIST then
WorkTab.dY1DeltaMinF = WorkTab.dY1DeltaMinF + 4 * BD.CHAR_EXTRA_DIST
elseif WorkTab.dY1DeltaMaxF - WorkTab.dY1DeltaMinF > 2.5 * BD.CHAR_EXTRA_DIST then
WorkTab.dY1DeltaMinF = WorkTab.dY1DeltaMinF + 2 * BD.CHAR_EXTRA_DIST
elseif WorkTab.dY1DeltaMaxF - WorkTab.dY1DeltaMinF > 1.5 * BD.CHAR_EXTRA_DIST then
WorkTab.dY1DeltaMinF = WorkTab.dY1DeltaMinF + BD.CHAR_EXTRA_DIST
-- dopo che si è calcolato il minimo e massimo dell'intervallo, verifico che in testa rimanga almeno il minimo per poter fare passaggio pinze e scaricare
if AuxInfoMach and ( AuxInfoMach.bSplitting or AuxInfoMach.bCutting) then
if WorkTab.dY1DeltaMaxF - WorkTab.dY1DeltaMinF > 1.5 * BD.CHAR_EXTRA_DIST and WorkTab.dY1DeltaMaxF > EMC.LT + BD.MINRAW_S + BD.CHAR_EXTRA_DIST then
WorkTab.dY1DeltaMinF = max( min( EMC.LT + BD.MINRAW_S, WorkTab.dY1DeltaMaxF - 1), WorkTab.dY1DeltaMinF)
end
end
-- verifico validità intervallo ammesso per Y1
@@ -1346,13 +1351,11 @@ function SpecCalcCarriages( dDistFront, dDistBack, dRollFront, dRollBack, dY1Del
WorkTab.dV2PosF = -dRollFront
WorkTab.bV2CloseF = false
-- aggiuntivo per minimizzare scambi carrelli
if WorkTab.dY1DeltaMaxF - WorkTab.dY1DeltaMinF > 5 * BD.CHAR_EXTRA_DIST then
WorkTab.dY1DeltaMinF = WorkTab.dY1DeltaMinF + 4 * BD.CHAR_EXTRA_DIST
elseif WorkTab.dY1DeltaMaxF - WorkTab.dY1DeltaMinF > 2.5 * BD.CHAR_EXTRA_DIST then
WorkTab.dY1DeltaMinF = WorkTab.dY1DeltaMinF + 2 * BD.CHAR_EXTRA_DIST
elseif WorkTab.dY1DeltaMaxF - WorkTab.dY1DeltaMinF > 1.5 * BD.CHAR_EXTRA_DIST then
WorkTab.dY1DeltaMinF = WorkTab.dY1DeltaMinF + BD.CHAR_EXTRA_DIST
-- dopo che si è calcolato il minimo e massimo dell'intervallo, verifico che in testa rimanga almeno il minimo per poter fare passaggio pinze e scaricare
if AuxInfoMach and ( AuxInfoMach.bSplitting or AuxInfoMach.bCutting) then
if WorkTab.dY1DeltaMaxF - WorkTab.dY1DeltaMinF > 1.5 * BD.CHAR_EXTRA_DIST and WorkTab.dY1DeltaMaxF > EMC.LT + BD.MINRAW_S + BD.CHAR_EXTRA_DIST then
WorkTab.dY1DeltaMinF = max( min( EMC.LT + BD.MINRAW_S, WorkTab.dY1DeltaMaxF - 1), WorkTab.dY1DeltaMinF)
end
end
-- verifico validità intervallo ammesso per Y1
+11 -1
View File
@@ -64,12 +64,22 @@
-- 2024/07/17 ver 2.6g3 Allineamento con common ver. 2.6g3
-- 2024/07/22 ver 2.6g4 Gestione pezzi fino a 30 metri
-- Allineamento con common ver. 2.6g4
-- 2024/07/31 ver 2.6g5 Allineamento con common ver. 2.6g5
-- Aggiunta file note tool e machining
-- 2024/08/01 ver 2.6h1 Allineamento con common ver. 2.6h1
-- 2024/08/07 ver 2.6h2 Allineamento con common ver. 2.6h2
-- 2024/09/02 ver 2.6i1 Allineamento con common ver. 2.6i1
-- 2024/09/13 ver 2.6i2 Allineamento con common ver. 2.6i2
-- Inseriti in NGE solidi collisione TC, Aggiunta avriabile LimX1RotSawTC2
-- 2024/09/18 ver 2.6i3 Modificato YAML per comunicazione versioni a LiMan. Aggiunta PP_NVER, versione in formato numerico.
-- Intestazioni
require( 'EmtGenerator')
EgtEnableDebug( false)
PP_VER = '2.6g4_DEV'
PP_VER = '2.6i3'
PP_NVER = '2.6.9.3'
MIN_MACH_VER = '2.5k1'
MACH_NAME = 'Essetre-PF'
BIN
View File
Binary file not shown.
+19 -1
View File
@@ -1,7 +1,25 @@
==== Common_ONE-PF Update Log ====
Versione 2.6-- (--/--/2024)
Versione 2.6i2 (13/09/2024)
- (GEN) Migliorato calcolo chiusura paratia rulli con aggiornamento lunghezza della barra in caso di ultimo taglio e grezzo residuo in coda. Ticket#2017
- (NGE-MLDE-GEN-SIM) Aggiunto solidi collisione TC. Corretto movimento a Y di sicurezza con lama. Ticket#2042
- (NGE-SIM) Aggiunta collisione magazzino motosega ONE
Versione 2.6i1 (02/09/2024)
- (SIM-GEN) Quando si aprono i rulli, se la trave non può seguire i rulli perchè la pinza andrebbe in extra-corsa, si sposta comunque la pinza fino al massimo della sua corsa. Ticket#1949
- (GEN) In preselezione. Se lavorazione motosega, non mando a parcheggio altra testa con utensile precedente, perchè subito dopo viene chiamata preselezione. Ticket#1961
Versione 2.6h2 (07/08/2024)
- (SIM) Allineata simulazione a generazione in primo movimento rapido approccio al pezzo.
Versione 2.6h1 (01/08/2024)
- (GEN) Corretto segno posizione X di sicurezza per rotazione assi rotanti.
Versione 2.6g5 (31/07/2024)
- (SIM-GEN) Se motosega allineata ad asse B per tagli di fianco, corretto movimento che manda testa a parcheggio. Pezzi più alti di 650 va solo in Zmax. Ticket#1943
- (SIM-GEN) Gestione movimenti speciali per pezzi molto alti. Se HomeZ < primo punto lavorazione, allora vado al punto Z lavorazione prima di approcciare il pezzo in X. Ticket#1943
- (GEN) Gestione creazione piano generico in caso il primo movimento della lavorazione sia un arco. Ticket#1891
- (SIM-GEN) Modifica limite inferirore intervallo di pinzaggio per garantire, se possibile, il passaggio pezzo a pinza 2. Da Common-PF1250.
- (GEN) Corretta scrittura ISO per parcheggiare morsa 3 dopo ribaltamento. Ticket#1922,#1733
Versione 2.6g4 (19/07/2024)
+1 -1
View File
@@ -3,7 +3,7 @@
local InfoCommon_STD_PP = {
NAME = 'Common_ONE-PF', -- nome script PP standard
VERSION = '2.6--DEV', -- versione script
VERSION = '2.6i2', -- versione script
MIN_MACH_VER_PP_COMMON = '2.5k1' -- versione minima kernel
}