Compare commits

...

80 Commits

Author SHA1 Message Date
andrea.villa 7c3bb2ce81 In simulazione aggiunti solidi griglie vicino TC margherita con relativo controllo collisione 2024-04-24 15:43:07 +02:00
andrea.villa 930819d007 Aggiunta simulazione macchina tipo "corsa corta" e "corsa lunga" 2024-04-24 09:20:09 +02:00
andrea.villa 5311301eab In MLDE si prende il minimo tra MaxZ1Blade e MaxZ1 2024-04-23 16:17:13 +02:00
andrea.villa 33b4e4861d - Allineamento con common ver. 2.6d2
- Aggiunta variabile MaxZ1Blade e relativa gestione
- Aggiunto solido collisione in NGE
2024-04-23 16:05:23 +02:00
luca.mazzoleni 833bfe2dca Merge branch 'develop' 2024-04-16 17:07:28 +02:00
luca.mazzoleni fb69b0bec3 in yaml aggiunta copia in R anche per develop (senza versione) 2024-04-16 17:07:20 +02:00
luca.mazzoleni 2d4c1afd56 Merge branch 'develop' 2024-04-16 15:10:34 +02:00
luca.mazzoleni dc959734f4 yaml lanciato solo per master 2024-04-16 15:10:22 +02:00
luca.mazzoleni 9f183dabb7 update yaml 2024-04-16 13:17:33 +02:00
luca.mazzoleni e838ea6e31 - in yaml migliorata visibilità output 2024-04-16 13:04:05 +02:00
luca.mazzoleni dba32792e2 - in yaml aggiunta echo esplicativi 2024-04-16 12:50:53 +02:00
luca.mazzoleni 5e930151f4 correzione yaml 2024-04-16 12:12:45 +02:00
luca.mazzoleni 5b201e1f8c - in yaml percorso di test non copiato in storico versioni 2024-04-16 12:09:19 +02:00
luca.mazzoleni 1b315af794 update yaml e test 2024-04-16 12:04:04 +02:00
luca.mazzoleni a37d193656 Merge branch 'main' into develop 2024-04-16 11:51:25 +02:00
luca.mazzoleni 2898dc1059 Merge branch 'develop' 2024-04-16 11:49:32 +02:00
andrea.villa 29eb98eb99 Aggiornato nome parametro ForceToCloseRollersGate 2024-04-12 09:07:02 +02:00
andrea.villa c5a5d2553b Merge branch 'develop' 2024-04-09 11:52:19 +02:00
andrea.villa 703cfbd4a0 - Allineamento con common ver. 2.6d1
- Aggiunto parametro ForceToCloseRollersGate
2024-04-09 11:52:03 +02:00
andrea.villa ba5dd2cdce in M992 emissione posizioni 201->204 per aggregato lama sotto 2024-03-28 16:46:34 +01:00
andrea.villa 43ac6207b5 Corretto calcolo speed su aggregato lama testa sotto con fattore moltiplicativo 2024-03-28 15:03:47 +01:00
andrea.villa 517247d739 In generazione, quando sale a ZMAX non serve scaricare la motosega 2024-03-28 10:57:09 +01:00
luca.mazzoleni afedcc1daa - aggiunta lettura costante OVM_MID da ts3v7
- in compilazione esclusa la cartella .vscode
2024-03-28 09:37:39 +01:00
luca.mazzoleni 97efea9cac Merge branch 'main' into develop 2024-03-28 09:21:37 +01:00
Dario Sassi 01408ddaed PF1250MAX 2.6c9 :
- correzioni per riposizionamento carrelli e scarico di pezzi fino a 30 metri.
2024-03-28 08:59:09 +01:00
andrea.villa 4069a834ec Corretto scrittura dimensioni seconda motosega in M992 2024-03-27 16:57:02 +01:00
andrea.villa 826341d694 Corretto movimento punte lunghe in generazione quando vengono scaricate. Ora allieneato a simulazione. 2024-03-27 16:23:56 +01:00
andrea.villa 88c329fa4b Corretto aggiustamento lunghezza aggregato lama da sotto 2024-03-27 15:25:01 +01:00
andrea.villa 2638f8b309 Aggiunta lettura nuovi parametri offset per lama su aggregato testa sotto 2024-03-27 11:38:37 +01:00
andrea.villa 49d34f1baa Piccole modifiche a movimento home lama su aggregato da sotto 2024-03-26 17:13:25 +01:00
andrea.villa 27ddccbda4 Merge branch 'main' of https://gitlab.steamware.net/egalware-machines/essetre/Essetre-PF1250MAX 2024-03-26 13:31:34 +01:00
andrea.villa 580d6c61ce - Aggiunto variabile 'ParkLongB1'
- Modificate collisioni traversa
- Allineamento con common ver. 2.6c5
2024-03-26 13:31:30 +01:00
Samuele Locatelli 461a3455e4 Merge branch 'develop' 2024-03-21 15:01:01 +01:00
andrea.villa c7bcbf5f1c Predrill: aggiunta lavorazione tipo 'Predrill_H2' per testa sotto 2024-03-18 13:32:29 +01:00
andrea.villa 3054c19ec7 - Allineamento con common ver. 2.6c4
- Aggiunto nuovo tipo di lavorazione: Predrill
2024-03-14 11:07:06 +01:00
andrea.villa 987e86e7b5 Allineamento con common ver. 2.6c3 2024-03-12 12:53:40 +01:00
luca.mazzoleni c809c510ff - aggiunti portautensili custom 2024-03-08 18:17:23 +01:00
luca.mazzoleni e7e820be06 update log mlde e versione 2024-03-05 15:32:39 +01:00
luca.mazzoleni f9b9d97249 Merge branch 'develop' 2024-03-05 15:30:29 +01:00
luca.mazzoleni 16e028b162 - corretto portautensile Standard_LC_108 2024-03-05 15:30:15 +01:00
andrea.villa b1d3882275 Merge remote-tracking branch 'origin/develop' 2024-03-04 10:41:55 +01:00
andrea.villa de461afbc9 - Modificato log con nome macchina
- Allineamento con common ver. 2.6c2
2024-03-04 10:41:38 +01:00
luca.mazzoleni 3f13a7267e - corretto portautensile Standard_LC_108 (geometria di collisione errata) 2024-03-01 12:46:50 +01:00
andrea.villa 8ba4e8bf3f Cambiato output log versione Post 2024-03-01 10:06:05 +01:00
andrea.villa 53d7ec91c8 Merge branch 'main' into develop 2024-02-29 10:00:58 +01:00
andrea.villa 3986246bae Allineamento con common ver. 2.6c1 2024-02-29 10:00:47 +01:00
luca.mazzoleni 25917ff9a8 Merge branch 'main' into develop 2024-02-27 12:22:10 +01:00
luca.mazzoleni 9719ee616f corretta versione e aggiunto compile 2024-02-26 16:07:17 +01:00
luca.mazzoleni 2414169862 - allineamento con common 2.6b4
- in mlde aggiunte chiamate a EgtAddToPackagePath
- eliminate chiamate a EgtGetSourceDir
2024-02-26 13:10:42 +01:00
andrea.villa 473a3a8fe6 Allineamento con common 2.6b3 2024-02-20 11:40:47 +01:00
andrea.villa dcf475d446 - Allineamento con common 2.6b2
- 'GetCurrChainSawingVirtualAxis' in MLDE
2024-02-15 15:39:12 +01:00
luca.mazzoleni 2add45fe3a Merge branch 'develop' 2024-02-09 14:54:57 +01:00
luca.mazzoleni caab876f4e 2.6b1
- Corretto errore in definizione testa H22
- In BeamData migliorata funzione GetBlockedAxis
2024-02-09 14:54:35 +01:00
luca.mazzoleni 1113c02971 Merge remote-tracking branch 'origin/main' into develop 2024-01-30 12:32:07 +01:00
andrea.villa a65d80cbf1 Allineamento con Common 2.6a4 2024-01-25 09:38:56 +01:00
andrea.villa bb5fef1d7b Merge branch 'develop' 2024-01-22 13:30:40 +01:00
andrea.villa 6c37440557 Merge branch 'develop' of https://gitlab.steamware.net/egalware-machines/essetre/Essetre-PF1250MAX into develop 2024-01-22 13:29:50 +01:00
andrea.villa a00ed32933 Essetre-PF1250MAX 2.6a3
- Migliorata preselezione utensile
- Rimosse funzioni ribaltamento pezzo
- Allineamento con Common-PF1250 v.2.6a3
2024-01-22 13:26:53 +01:00
luca.mazzoleni 2f4499b15d Merge branch 'main' into develop 2024-01-22 13:14:04 +01:00
luca.mazzoleni b4646d8fa7 Merge branch 'develop' 2024-01-22 13:13:48 +01:00
luca.mazzoleni 47942a8921 in BeamLib aggiunta la funzione GetBlockedAxis che sostituisce le altre (GetChainSawBlockedAxis e GetSawBlockedAxis) 2024-01-22 13:13:22 +01:00
andrea.villa a4b28964a3 Merge branch 'main' into develop 2024-01-09 16:54:58 +01:00
andrea.villa c97b8dad28 Merge branch 'develop' 2024-01-09 16:54:40 +01:00
andrea.villa 1138140133 2.6a2 Allineamento con Common-PF1250 v.2.6a2 2024-01-09 16:53:48 +01:00
andrea.villa a33867ccec Merge branch 'main' into develop 2024-01-09 14:56:28 +01:00
andrea.villa f38e0cffec Merge branch 'develop' 2024-01-09 14:55:08 +01:00
andrea.villa 166a7666bc Piccole correzioni a messaggi 2024-01-09 14:52:11 +01:00
andrea.villa d03c605285 Merge branch 'develop' 2024-01-09 14:47:27 +01:00
andrea.villa d751b4950f Aggiunato variabile 'WriteAllCoordsOnFirstM101' e allineamento con 2.6a1 common 2024-01-09 12:28:57 +01:00
luca.mazzoleni 2c36caab30 corretto typo nome variabile 2024-01-08 18:15:15 +01:00
luca.mazzoleni 82106271ab Costanti MinForzaPinze e MaxForzaPinze portati in mlde/Ts3data (erano hardcoded) 2024-01-05 18:01:06 +01:00
andrea.villa 4e4d73bb6e Merge branch 'develop' of https://gitlab.steamware.net/egalware-machines/essetre/Essetre-PF1250MAX into develop 2024-01-05 12:44:55 +01:00
andrea.villa 85069971c1 Piccola correzione posizione magazzini sotto-trave 2024-01-05 12:44:52 +01:00
luca.mazzoleni fca3f67082 In BeamData aggiunta GetSawBlockedAxis per fissare asse bloccato per aggregato lama sotto 2024-01-04 16:29:24 +01:00
andrea.villa c51a208c4a Tolta testa H14 per utensili speciali. Si utilizza H11 per frese standard 2024-01-04 12:12:24 +01:00
andrea.villa caf990c23b Corretto movimento testa 2 in ToolDesel e movimento controllo collisione 2023-12-22 13:26:26 +01:00
luca.mazzoleni 8d4ab5ce67 aggiunto portautensile LC da 108 mm 2023-12-22 11:39:01 +01:00
andrea.villa fae1c3e50d - Invertiti magazzini mortasatrice-truciolatore e adeguati solidi di collisione
- Abbasstata testa 2 di 300mm
- Parcheggio motosega portato a 1700mm
2023-12-21 15:39:39 +01:00
andrea.villa cb27d30d6e 2.6a1 : Prima versione con post Common-PF1250 2023-12-20 13:02:35 +01:00
luca.mazzoleni 817880d925 Merge tag '2.5l4' into develop
Finish Release: 2.5l4
2023-12-20 11:56:47 +01:00
19 changed files with 1599 additions and 470 deletions
+1
View File
@@ -15,3 +15,4 @@
/Wall/PocketingData.lua
/Wall/SawingData.lua
/Wall/Ts3Data.lua
.vscode/settings.json
+236
View File
@@ -0,0 +1,236 @@
variables:
VERS_MAIN: '1.0'
MACH_NAME: ''
MACH_NAME_TEST: ''
NEW_REL: ''
NET_SHARE_X: '\\10.74.82.201\EgwTech'
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_USERQ: 'steamw\egalware'
MACH_VERS: '0.0.0.0'
TEMP_PATH: 'C:\MachinesDeploy'
MACHINES_PATH_R: 'R:\EgtData\Machines'
DEST_MACHINES_PATH_R: 'R:\EgtData\Machines\zTestYAML'
SRC_PATH: ''
BASE_PATH: ''
TEST_PATH: ''
#Note compilazione LUA:
# lua54 -o bin\$FileName -s $FileName: -o = output, -s = NON include i debug symbols
# helper copia script verso cartella di rete S:\ delle cartelle bin
.ReplicaS: &ReplicaS
- |
net use S: /delete
SLEEP 2
net use S: $env:NET_SHARE_S /u:$env:NET_USERQ $SDRIVE_PASSWD
ROBOCOPY /MIR $env:BASE_PATH S:\LucaM\MachinesDeploy\$env:MACH_NAME\$env:MACH_VERS\ /XD "bin" /XD "$env:MACH_NAME_TEST"
SLEEP 2
net use S: /delete
# helper copia script verso cartella di rete R:\
.ReplicaR: &ReplicaR
- |
net use R: /delete
SLEEP 2
net use R: $env:NET_SHARE_R /u:$env:NET_USERQ $ZDRIVE_PASSWD
echo "-----------------------"
echo " Copia macchina su R"
echo "-----------------------"
ROBOCOPY /MIR "$env:SRC_PATH" "$env:DEST_MACHINES_PATH_R\$env:MACH_NAME\" /XD "bin"
ROBOCOPY "$env:TEST_PATH" "$env:DEST_MACHINES_PATH_R\$env:MACH_NAME_TEST\" /E /XD "bin"
ROBOCOPY /MIR "$env:BASE_PATH" "$env:DEST_MACHINES_PATH_R\Deploy\$env:MACH_NAME\$env:MACH_VERS\" /XD "bin" /XD "$env:MACH_NAME_TEST"
SLEEP 2
net use R: /delete
# helper copia script verso cartella di rete R:\ per develop
.ReplicaR_DEV: &ReplicaR_DEV
- |
net use R: /delete
SLEEP 2
net use R: $env:NET_SHARE_R /u:$env:NET_USERQ $ZDRIVE_PASSWD
echo "-----------------------"
echo " Copia macchina su R - DEV"
echo "-----------------------"
ROBOCOPY /MIR "$env:BASE_PATH" "$env:DEST_MACHINES_PATH_R\Deploy\$env:MACH_NAME\_DEV\$env:MACH_VERS\" /XD "bin" /XD "$env:MACH_NAME_TEST"
SLEEP 2
net use R: /delete
#helper copia sorgenti da R a percorso temporaneo
.CreateBaseFolder: &CreateBaseFolder
- |
net use R: /delete
SLEEP 2
net use R: $env:NET_SHARE_R /u:$env:NET_USERQ $ZDRIVE_PASSWD
echo "-----------------------"
echo " Recupero file non git da R e copia su macchina virtuale"
echo "-----------------------"
ROBOCOPY "$env:LAST_MACHINE_PATH" "$env:SRC_PATH" /E /XF "*.bat" /XF "*.yml" /XF ".gitignore" /XD ".git" /XF "UpdateLog.txt" /XD ".vscode"
ROBOCOPY "$env:LAST_MACHINE_PATH" "$env:SRC_PATH\bin\$env:MACH_NAME\" /E /XF "*.bat" /XF "*.yml" /XF ".gitignore" /XD ".git" /XF "UpdateLog.txt" /XD ".vscode"
SLEEP 2
net use R: /delete
# helper compilazione LUA a 32 e 64 bit
.LuaCompile: &LuaCompile
- |
Set-Alias lua54 C:\Tools\Lua32\luac54
echo "-----------------------"
echo " Copia file su macchina virtuale"
echo "-----------------------"
ROBOCOPY . "$env:SRC_PATH" /E /XF "*.bat" /XF "*.yml" /XF ".gitignore" /XD ".git" /XF "UpdateLog.txt" /XD ".vscode"
ROBOCOPY . "$env:TEST_PATH" /E /XF "*.bat" /XF "*.yml" /XF ".gitignore" /XD ".git" /XF "UpdateLog.txt" /XD ".vscode"
Rename-Item -Path "$env:TEST_PATH\$env:MACH_NAME.mlde" -NewName "$env:MACH_NAME_TEST.mlde"
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"
echo "-----------------------"
$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"
}
# helper recupero nome macchina
.machName-fix: &machName-fix
- |
echo "-----------------------"
echo " Recupero nome macchina"
echo "-----------------------"
$fileName = dir *.mlde
$env:MACH_NAME = $fileName.BaseName
$env:MACH_NAME_TEST = $env:MACH_NAME + ".TEST"
# helper calcolo versione
.version-fix: &version-fix
- |
echo "-----------------------"
echo " Calcolo versione"
echo "-----------------------"
$fPath = "$env:MACH_NAME.mlde";
$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;
# helper calcolo versione se develop
.version-fix_DEV: &version-fix_DEV
- |
echo "-----------------------"
echo " Calcolo versione - DEV"
echo "-----------------------"
$commitAuthor = $CI_COMMIT_AUTHOR -split " "
$commitAuthor = $commitAuthor[0].Trim()
$env:MACH_VERS = $commitAuthor
# display versione
Write-Output $env:MACH_VERS;
# helper creazione folders
.folder-fix: &folder-fix
- |
echo "-----------------------"
echo " Creazione cartelle su macchina virtuale"
echo "-----------------------"
$env:LAST_MACHINE_PATH = "$env:MACHINES_PATH_R\$env:MACH_NAME";
Write-Output $env:LAST_MACHINE_PATH;
$env:SRC_PATH = "$env:TEMP_PATH\$env:MACH_NAME\$env:MACH_VERS\$env:MACH_NAME";
$env:BASE_PATH = "$env:TEMP_PATH\$env:MACH_NAME\$env:MACH_VERS";
$env:TEST_PATH = "$env:TEMP_PATH\$env:MACH_NAME\$env:MACH_VERS\$env:MACH_NAME_TEST";
Write-Output $env:BASE_PATH;
if (Test-Path $env:BASE_PATH) { Remove-Item -Path "$env:BASE_PATH\*" -R -Force };
Write-Output $env:TEST_PATH;
# helper compressione e pulizia folders
.ZipClean: &ZipClean
- |
" Compressione file su macchina virtuale"
$7zipPath = $env:ProgramFiles+"\7-Zip\7z.exe";
if (-not (Test-Path -Path $7zipPath -PathType Leaf)) {
throw "7 zip file '$7zipPath' not found"
}
Set-Alias 7zip $7zipPath
$Target = "$env:BASE_PATH\$env:MACH_NAME.zip"
cd "$env:SRC_PATH\bin\"
$Source = "*"
7zip a -tzip $Target $Source
Write-Output "called ZIP $Source --> $Target"
# helper esecuzione test
.RunTest: &RunTest
- |
Write-Output "Test done!"
stages:
- build
# - test
# - deploy
LuaCompile:build:
stage: build
only:
- main
- master
tags:
- win
before_script:
- *machName-fix
- *version-fix
- *folder-fix
script:
- *CreateBaseFolder
- *LuaCompile
- *ZipClean
- *ReplicaR
LuaCompileDev:build:
stage: build
only:
- develop
tags:
- win
before_script:
- *machName-fix
- *version-fix_DEV
- *folder-fix
script:
- *CreateBaseFolder
- *LuaCompile
- *ZipClean
- *ReplicaR_DEV
# LuaCompile:test:
# stage: test
# needs: ["LuaCompile:build"]
# only:
# - main
# - master
# - develop
# tags:
# - win
# before_script:
# - *version-fix
# - *folder-fix
# script:
# - *LuaCompile
# - *RunTest
# LuaCompile:deploy:
# stage: deploy
# needs: ["LuaCompile:test"]
# only:
# - main
# - master
# tags:
# - win
# before_script:
# - *version-fix
# - *folder-fix
# script:
# - *LuaCompile
# - *ZipClean
# - *ReplicaR
+35 -11
View File
@@ -67,9 +67,9 @@ local BeamData = {
DH_MAX_TOP = 370, -- quota massima raggiungibile dalla testa da sotto dal sotto del pezzo
KIOTP = 2, -- coefficiente moltiplicativo per attacco/uscita lama tangente anzichè perpendicolare
MAXDIAM_POCK_CORNER = 30, -- diametro massimo utensile ammesso per tasche con angoli interni
USE_LONGCUT = false, -- per i tagli longitudinali usare solo la lavorazione di lama LongCut
USE_LONGCUT = true, -- per i tagli longitudinali usare solo la lavorazione di lama LongCut
ADVANCE_TAIL_CUT = true, -- per spostare prima del taglio di separazione il taglio di coda su pezzi corti con robabile caduta
ADVANCE_TAIL_OFFS = 5, -- accorciamento taglio di coda avanzato (minimo 1)
ADVANCE_TAIL_OFFS = 5, -- accorciamento taglio di coda avanzato (minimo 1)
DOUBLE_HEAD_DOVETAIL = true, -- flag abilitazione lavorazione mortase a coda di rondine in doppio
DOUBLE_HEAD_MORTISE = true, -- flag abilitazione lavorazione mortase in doppio
DOUBLE_HEAD_DRILLING = true -- flag abilitazione forature in doppio
@@ -78,11 +78,9 @@ local BeamData = {
---------------------------------------------------------------------
-- Aggiornamento con dati da TechnoEssetre7
local sTs3Data = EgtGetStringFromIni( 'Beam', 'DATA_DIR', "C:\\TechnoEssetre7\\EgtData", EgtGetIniFile()).."\\Essetre-PF1250MAX.data"
local sDataBeam = EgtGetSourceDir().."\\Ts3Data.lua"
local sDataWall = EgtGetCurrMachineDir()..'\\Wall\\Ts3Data.lua'
local sDataBeam = EgtGetCurrMachineDir().."\\Beam\\Ts3Data.lua"
if EgtExistsFile( sTs3Data) then
EgtCopyFile( sTs3Data, sDataBeam)
EgtCopyFile( sTs3Data, sDataWall)
local sTs3DataOld = sTs3Data..'.old'
EgtEraseFile( sTs3DataOld)
EgtRenameFile( sTs3Data, sTs3DataOld)
@@ -101,6 +99,7 @@ if EgtExistsFile( sDataBeam) then
BeamData.DIM_STRIP_SMALL = Machine.Offsets.DIM_STRIP_SMALL or BeamData.DIM_STRIP_SMALL
BeamData.DIM_TO_CENTER_STRIP = Machine.Offsets.DIM_TO_CENTER_STRIP or BeamData.DIM_TO_CENTER_STRIP
BeamData.MAXDIAM_POCK_CORNER = Machine.Offsets.MAXDIAM_POCK_CORNER or BeamData.MAXDIAM_POCK_CORNER
BeamData.OVM_MID = Machine.Offsets.OVM_MID or BeamData.OVM_MID
end
if Machine.Trave then
BeamData.MIN_WIDTH = Machine.Trave.XMIN or BeamData.MIN_WIDTH
@@ -178,15 +177,40 @@ end
BeamData.GetMinUnloadableRaw = GetMinUnloadableRaw
---------------------------------------------------------------------
local function GetChainSawBlockedAxis( nInd)
if nInd == 1 then
return 'A1=90'
local function GetBlockedAxis( sHead, nToolType, sBlockedAxis)
-- lama
if nToolType == MCH_TY.SAW_STD or nToolType == MCH_TY.SAW_FLAT then
if sHead == 'H22' then
if sBlockedAxis == 'parallel' then
return 'A2=0'
elseif sBlockedAxis == 'perpendicular' then
return 'A2=90'
end
else
return ''
end
-- sega a catena
elseif nToolType == MCH_TY.MORTISE_STD then
if sHead == 'H13' then
if sBlockedAxis == 'parallel' then
return 'A1=0'
elseif sBlockedAxis == 'perpendicular' then
return 'A1=90'
end
else
return ''
end
-- fresa
elseif nToolType == MCH_TY.MILL_STD or nToolType == MCH_TY.MILL_NOTIP then
return ''
-- punta
elseif nToolType == MCH_TY.DRILL_STD or nToolType == MCH_TY.DRILL_LONG then
return ''
else
return 'A1=0'
return ''
end
end
BeamData.GetChainSawBlockedAxis = GetChainSawBlockedAxis
BeamData.GetBlockedAxis = GetBlockedAxis
---------------------------------------------------------------------
return BeamData
+2
View File
@@ -10,6 +10,8 @@
2=Drill_H2
3=Pocket
4=Pocket_H2
5=Predrill
6=Predrill_H2
[Milling]
1=Prof
File diff suppressed because it is too large Load Diff
+337 -175
View File
@@ -1,18 +1,22 @@
-- Processore macchina Essetre-PF1250 by EgalTech s.r.l. 2023/11/21
-- Processore standard macchine tipo PF1250 by EgalWare s.r.l. 2024/01/22
-- Funzioni generiche indipendenti dal controllo
-- Intestazioni
require( 'EmtGenerator')
EgtEnableDebug( false)
-- Carico libreria
local BD = require( 'BeamData')
---------------------------------------------------------------------
-- *** GENERATION ***
---------------------------------------------------------------------
local sBaseDir = EgtGetSourceDir()
local sBaseDir = EgtGetCurrMachineDir()
if NumericalControl == 'NUM' then
error( 'Numerical Control error : NUM not yet managed')
elseif NumericalControl == 'TPA' then
dofile( sBaseDir .. 'Essetre-PF1250.TPA.mlpe')
dofile( sBaseDir .. '\\Common-PF1250.TPA.mlpe')
else
error( 'Numerical Control error : unkwnown type')
end
@@ -20,7 +24,46 @@ end
---------------------------------------------------------------------
-- *** SIMULATION ***
---------------------------------------------------------------------
local COLL_SAFE_DIST = 4
local COLL_SAFE_DIST = 3
---------------------------------------------------------------------
function OnSimulInit()
-- se macchina con carico destro, imposto offset direzioni di vista standard
if BD.RIGHT_LOAD then
local nOrigViewOffs = EgtGetViewOrizzOffsStep()
local dOrigViewAngV, dOrigViewAngH = EgtGetGenericView()
if nOrigViewOffs ~= 2 then
EgtSetViewOrizzOffsStep( 2)
if dOrigViewAngV < 0.1 then
EgtSetView( SCE_VD.TOP, false)
elseif dOrigViewAngV > 179.9 then
EgtSetView( SCE_VD.BOTTOM, false)
else
local dViewAngH = dOrigViewAngH + EgtIf( dOrigViewAngH > 180, 2 * 90, 0)
EgtSetGenericView( dOrigViewAngV, dViewAngH, false)
end
end
end
end
---------------------------------------------------------------------
function OnSimulExit()
-- se macchina con carico destro, annullo offset direzioni di vista standard
if BD.RIGHT_LOAD then
local nOrigViewOffs = EgtGetViewOrizzOffsStep()
local dOrigViewAngV, dOrigViewAngH = EgtGetGenericView()
if nOrigViewOffs == 2 then
EgtSetViewOrizzOffsStep( 0)
if dOrigViewAngV < 0.1 then
EgtSetView( SCE_VD.TOP, false)
elseif dOrigViewAngV > 179.9 then
EgtSetView( SCE_VD.BOTTOM, false)
else
EgtSetGenericView( dOrigViewAngV, dOrigViewAngH - 2 * 90, false)
end
end
end
end
---------------------------------------------------------------------
function OnSimulStart()
@@ -63,6 +106,11 @@ function OnSimulStart()
AddToCollisionCheck( 'X2', 'COLLISION', EMT.COLLOBJ)
AddToCollisionCheck( 'C2', 'COLLISION', EMT.COLLOBJ)
AddToCollisionCheck( 'B2', 'COLLISION', EMT.COLLOBJ)
if EgtGetHeadId('H31') then
AddToCollisionCheck( 'Z3', 'COLLISION', EMT.COLLOBJ)
AddToCollisionCheck( 'C3', 'COLLISION', EMT.COLLOBJ)
AddToCollisionCheck( 'B3', 'COLLISION', EMT.COLLOBJ)
end
DumpCollisionCheck( EMT.COLLOBJ, 'Collision Objects :', 4)
-- Preparo lista solidi macchina con cui possono collidere gli oggetti sopra riportati (in aggiunta a VMill)
EMT.MCODET = {}
@@ -72,12 +120,24 @@ function OnSimulStart()
{ Grp = 'Base', Sub = 'COLLISION', Name = 'COL1'},
{ Grp = 'Base', Sub = 'COLLISION', Name = 'COL2'},
{ Grp = 'Base', Sub = 'COLLISION', Name = 'CHSAW'},
{ Grp = 'Base', Sub = 'COLLISION', Name = 'CHSAW2'},
{ Grp = 'Base', Sub = 'COLLISION', Name = 'SPTOOLS'},
{ Grp = 'Base', Sub = 'COLLISION', Name = 'AGGREBLADEUNDER'},
{ Grp = 'Base', Sub = 'COLLISION', Name = 'TCUNDER'},
{ Grp = 'Base', Sub = 'COLLISION', Name = 'CEIL'},
{ Grp = 'Base', Sub = 'COLLISION', Name = 'BOTTOMGRID'},
{ Grp = 'Base', Sub = 'COLLISION', Name = 'BACKGRID'},
{ Grp = 'Z2', Sub = 'COLLISION', Name = 'COL1'},
{ Grp = 'Z2', Sub = 'COLLISION', Name = 'CHAIN'},
{ Grp = 'Z2', Sub = 'COLLISION', Name = 'COL2'}}
{ Grp = 'Z2', Sub = 'COLLISION', Name = 'COL2'},
{ Grp = 'X1', Sub = 'COLLISION', Name = 'STM'}}
if EgtGetHeadId('H31') then
table.insert( McdData, { Grp = 'X3', Sub = 'COLLISION', Name = 'STM'})
end
-- inserisco gruppi opzionali
if SecondChain then table.insert( McdData, { Grp = 'Base', Sub = 'COLLISION', Name = 'CHSAW2'}) end
if TcSpecialTools then table.insert( McdData, {Grp = 'Base', Sub = 'COLLISION', Name = 'SPTOOLS'}) end
if TcAggreBladeUnder then table.insert( McdData, {Grp = 'Base', Sub = 'COLLISION', Name = 'AGGREBLADEUNDER'}) end
EgtOutLog( 'MCODET Objects :', 4)
local nMcdNullCnt = 0
for i = 1, #McdData do
@@ -250,8 +310,8 @@ function OnSimulDispositionStart()
EMT.SCRAP = nil
end
EMT.LB = b3Bar:getDimX()
EMT.LT = b3Raw:getDimX()
EMT.LP = b3Part:getDimX()
EMT.LR = b3Raw:getDimX()
EMT.LT = b3Part:getDimX()
EMT.CUTID = EgtGetInfo( EgtGetFirstPartInRawPart( nPartRawId or GDB_ID.NULL) or GDB_ID.NULL, 'CUTID', 'i') or 0
EMT.Y1SPEC = nil
-- se vero inizio, assegno solidi per verifica collisione
@@ -391,10 +451,22 @@ function OnSimulToolSelect( dPosA)
EMT.TLEN = EgtTdbGetCurrToolParam( MCH_TP.LEN)
EMT.TTOTLEN = EgtTdbGetCurrToolParam( MCH_TP.TOTLEN)
EMT.TUSERNOTES = EgtTdbGetCurrToolParam( MCH_TP.USERNOTES)
-- recupero il gruppo
local nSetHead = GetHeadSet( EMT.NEXTHEAD)
-- se fresa o lama su testa 1, reset assi rotanti
if EMT.HEAD == 'H11' or EMT.HEAD == 'H14' or EMT.HEAD == 'H12' or EMT.HEAD == 'H13' or EMT.HEAD == 'H16' then
if nSetHead == 1 then
-- se ho la testa 3, la mando a parcheggio
if EgtGetHeadId( 'H31') then
EgtSetAxisPos( 'X3', ParkX3)
end
if EMT.HEAD == 'H12' then
EgtSetAxisPos( 'Z1', MaxZ1Blade)
end
EgtResetAxisPos( 'C1')
EgtResetAxisPos( 'B1')
-- se testa 3 parcheggio la 1
elseif nSetHead == 3 then
EgtSetAxisPos( 'X1', ParkX1)
end
-- se sega a catena, imposto subito angolo scelto per asse virtuale A
if EMT.HEAD == 'H13' then
@@ -402,8 +474,8 @@ function OnSimulToolSelect( dPosA)
dPosA = dPosA or GetNextChainSawingVirtualAxis( EMT.MCHID)
-- imposto il valore di A
EgtSetAxisPos( 'A1', dPosA)
-- imposto home dell'asse C1 (A=0 -> T101, A=90 -> T104)
local MyParkCSawC1 = GetChainSawCHomeFromVirtualAxis( dPosA)
-- imposto home dell'asse C1 (A1=0 -> T101, A1=90 -> T104)
local MyParkCSawC1 = GetChainSawCHomeFromVirtualAxis( dPosA, EMT.TTOTLEN)
EmtModifyAxisHome( 'C1', MyParkCSawC1)
EgtSetAxisPos( 'C1', MyParkCSawC1)
-- Imposto visualizzazione
@@ -411,16 +483,18 @@ function OnSimulToolSelect( dPosA)
end
-- se lama su aggregato da sotto, imposto subito angolo scelto per asse virtuale A
if EMT.HEAD == 'H22' then
-- valore dell'asse virtuale
dPosA = dPosA or GetNextSawingVirtualAxis( EMT.MCHID)
-- imposto il valore di A
EgtSetAxisPos( 'A2', dPosA)
-- imposto home dell'asse C1 (A=0 -> T101, A=90 -> T104)
local MyParkSawC2 = GetSawCHomeFromVirtualAxis( dPosA)
EmtModifyAxisHome( 'C2', MyParkSawC2)
EgtSetAxisPos( 'C2', MyParkSawC2)
-- Imposto visualizzazione
EgtSetMode( EgtGetHeadId( EMT.HEAD) or GDB_ID.NULL, GDB_MD.STD)
if dPosA then
-- valore dell'asse virtuale
dPosA = dPosA or GetNextSawingVirtualAxis( EMT.MCHID)
-- imposto il valore di A
EgtSetAxisPos( 'A2', dPosA)
-- imposto home dell'asse C1 (A2=0 -> T101, A2=90 -> T104)
local MyParkSawC2 = GetSawCHomeFromVirtualAxis( dPosA)
EmtModifyAxisHome( 'C2', MyParkSawC2)
EgtSetAxisPos( 'C2', MyParkSawC2)
-- Imposto visualizzazione
EgtSetMode( EgtGetHeadId( EMT.HEAD) or GDB_ID.NULL, GDB_MD.STD)
end
end
-- carico utensile, con breve pausa
EgtPause( 100)
@@ -438,7 +512,7 @@ function OnSimulToolSelect( dPosA)
-- se attivo Collision Check
EMT.SAFEDIST = COLL_SAFE_DIST
if EMT.COLLOBJ then
local nInd = EgtIf( EMT.HEAD ~= 'H21' and EMT.HEAD ~= 'H22', 1001, 1011)
local nInd = EgtIf( nSetHead ~= 2, 1001, 1011)
AddToolToCollisionObj( EMT.TOOL, EMT.HEAD, EMT.EXIT, nInd, true)
AddToolHolderToCollisionObj( EMT.TOOL, EMT.HEAD, EMT.EXIT, nInd + 1)
for i, Coll in ipairs( EMT.COLLOBJ or {}) do
@@ -449,14 +523,18 @@ end
---------------------------------------------------------------------
function OnSimulToolDeselect( dPrevA)
-- se prossimo utensile non cambia e non è sega a catena, esco
if ( EMT.NEXTTOOL == EMT.PREVTOOL_H1 or EMT.NEXTTOOL == EMT.PREVTOOL_H2) and EMT.NEXTHEAD ~= 'H13' and EMT.NEXTHEAD ~= 'H22' then return end
-- se prossimo utensile non cambia e non è sega a catena o lama su rinvio da sotto, esco
if ( EMT.NEXTTOOL == EMT.PREVTOOL_H1 or EMT.NEXTTOOL == EMT.PREVTOOL_H2) and EMT.NEXTHEAD ~= 'H13' and ( EMT.NEXTHEAD ~= 'H22' or not dPrevA) then return end
-- deposito utensile
EgtOutText( 'Tool change in progress...')
-- recupero il gruppo
local nSetHead = GetHeadSet( EMT.NEXTHEAD)
-- recupero il gruppo attuale e il successivo
local nNextSetHead = GetHeadSet( EMT.NEXTHEAD)
local nSetHead = GetHeadSet( EMT.HEAD)
-- se devo deselezionare testa 3, la mando a parcheggio
if nSetHead == 3 then
SimulMoveAxis( 'X3', ParkX3, MCH_SIM_STEP.RAPID)
-- per testa gruppo 2
if nSetHead == 2 then
elseif nNextSetHead == 2 and EMT.PREVTCPOS_H2 then
-- deposito lama su aggregato testa sotto
if EMT.PREVHEAD_H2 == 'H22' then
-- simulo movimento
@@ -464,8 +542,9 @@ function OnSimulToolDeselect( dPrevA)
if dPrevA then
ParkC2 = GetSawCHomeFromVirtualAxis( dPrevA)
end
SimulMoveAxes( 'B2', ParkSawB2, MCH_SIM_STEP.RAPROT, 'C2', ParkC2, MCH_SIM_STEP.RAPROT)
SimulMoveAxis( 'Z2', MinZ2, MCH_SIM_STEP.RAPID)
SimulMoveAxis( 'X2', ParkSawX2, MCH_SIM_STEP.RAPID)
SimulMoveAxes( 'B2', ParkSawB2, MCH_SIM_STEP.COLLROT, 'C2', ParkC2, MCH_SIM_STEP.COLLROT)
end
-- breve pausa
EgtPause( 100)
@@ -474,9 +553,9 @@ function OnSimulToolDeselect( dPrevA)
-- nascondo l'utensile sulla testa
EgtSetStatus( EgtGetHeadId( EMT.PREVHEAD_H2 or '') or GDB_ID.NULL, GDB_ST.OFF)
-- se testa gruppo 1
else
elseif nNextSetHead == 1 and EMT.PREVTCPOS_H1 then
-- deposito utensile fresa
if EMT.PREVHEAD_H1 == 'H11' or EMT.PREVHEAD_H1 == 'H14' then
if EMT.PREVHEAD_H1 == 'H11' then
-- simulo movimento
local nPrevTc = GetTcForTopHeadTool( EMT.PREVTCPOS_H1)
if EMT.PREVTTOTLEN_H1 < LongTool then
@@ -485,11 +564,11 @@ function OnSimulToolDeselect( dPrevA)
SimulMoveAxis( 'X1', dPosX, MCH_SIM_STEP.RAPID)
else
if nPrevTc ~= 2 then
SimulMoveAxes( 'B1', ParkB1, MCH_SIM_STEP.RAPROT, 'C1', ParkLongTc1C1, MCH_SIM_STEP.RAPROT)
SimulMoveAxes( 'B1', ParkLongB1, MCH_SIM_STEP.RAPROT, 'C1', ParkLongTc1C1, MCH_SIM_STEP.RAPROT)
local dPosX = ParkX1
SimulMoveAxis( 'X1', dPosX, MCH_SIM_STEP.RAPID)
else
SimulMoveAxes( 'B1', ParkB1, MCH_SIM_STEP.RAPROT, 'C1', ParkLongTc2C1, MCH_SIM_STEP.RAPROT)
SimulMoveAxes( 'B1', ParkLongB1, MCH_SIM_STEP.RAPROT, 'C1', ParkLongTc2C1, MCH_SIM_STEP.RAPROT)
local dPosX = ParkTc2X1
SimulMoveAxis( 'X1', dPosX, MCH_SIM_STEP.RAPID)
end
@@ -504,7 +583,7 @@ function OnSimulToolDeselect( dPrevA)
-- simulo movimento
local ParkC1 = EgtGetAxisHomePos( 'C1')
if dPrevA then
ParkC1 = GetChainSawCHomeFromVirtualAxis( dPrevA)
ParkC1 = GetChainSawCHomeFromVirtualAxis( dPrevA, EMT.TTOTLEN)
end
SimulMoveAxes( 'B1', ParkCSawB1, MCH_SIM_STEP.RAPROT, 'C1', ParkC1, MCH_SIM_STEP.RAPROT)
SimulMoveAxis( 'X1', ParkCSawX1, MCH_SIM_STEP.RAPID)
@@ -521,14 +600,25 @@ function OnSimulToolDeselect( dPrevA)
-- nascondo l'utensile sulla testa
EgtSetMode( EgtGetHeadId( EMT.PREVHEAD_H1 or '') or GDB_ID.NULL, GDB_MD.HIDDEN)
end
-- se passo da testa 1 a 3 o viceversa
if nNextSetHead == 3 then
-- deposito eventuale sega a catena
if EMT.PREVHEAD_H1 == 'H13' then
-- visualizzo utensile su TcPos
ShowToolInTcPos( EMT.PREVTCPOS_H1, true)
-- nascondo l'utensile sulla testa
EgtSetMode( EgtGetHeadId( EMT.PREVHEAD_H1 or '') or GDB_ID.NULL, GDB_MD.HIDDEN)
end
SimulMoveAxis( 'X1', ParkX1, MCH_SIM_STEP.RAPID)
end
-- movimento per prendere nuovo utensile
-- prendo utensile fresa
if EMT.NEXTHEAD == 'H11' or EMT.NEXTHEAD == 'H14' then
if EMT.NEXTHEAD == 'H11' then
-- simulo movimento
SimulMoveAxes( 'B1', ParkB1, MCH_SIM_STEP.RAPROT, 'C1', ParkC1, MCH_SIM_STEP.RAPROT)
local dPosX = EgtIf( GetTcForTopHeadTool( EMT.NEXTTCPOS) ~= 2, ParkX1, ParkTc2X1)
SimulMoveAxis( 'X1', dPosX, MCH_SIM_STEP.RAPID)
SimulMoveAxis( 'Z1', 0, MCH_SIM_STEP.RAPID)
SimulMoveAxis( 'Z1', MaxZ1, MCH_SIM_STEP.RAPID)
-- prendo utensile lama
elseif EMT.NEXTHEAD == 'H12' then
-- simulo movimento
@@ -549,12 +639,15 @@ function OnSimulToolDeselect( dPrevA)
-- simulo movimento
SimulMoveAxes( 'B2', ParkB2, MCH_SIM_STEP.RAPROT, 'C2', ParkC2, MCH_SIM_STEP.RAPROT)
SimulMoveAxis( 'X2', ParkX2, MCH_SIM_STEP.RAPID)
-- prendo utensile seconda lama
-- prendo utensile lama su aggregato
elseif EMT.NEXTHEAD == 'H22' then
-- aggiungo utensile per verifica collisione
AddToolToCollisionObj( EMT.NEXTTOOL, EMT.NEXTHEAD, EMT.NEXTEXIT, 1011, false)
AddToolHolderToCollisionObj( EMT.NEXTTOOL, EMT.NEXTHEAD, EMT.NEXTEXIT, 1011 + 1)
-- simulo movimento
SimulMoveAxes( 'B2', ParkSawB2, MCH_SIM_STEP.RAPROT, 'C2', EgtGetAxisHomePos( 'C2'), MCH_SIM_STEP.RAPROT)
SimulMoveAxis( 'X2', ParkSawX2, MCH_SIM_STEP.RAPID)
end
SimulMoveAxes( 'B2', ParkSawB2, MCH_SIM_STEP.COLLROT, 'C2', ParkSawC2, MCH_SIM_STEP.COLLROT)
end
end
---------------------------------------------------------------------
@@ -574,7 +667,7 @@ function OnSimulMachiningStart()
if EMT.HEAD == 'H22' and EMT.HEAD == EMT.PREVHEAD_H2 then
local dPrevA = EgtGetAxisPos( 'A2')
local sVal = EgtGetMachiningParam( MCH_MP.BLOCKEDAXIS)
local dPosA = tonumber( sVal:sub( 4))
local dPosA = tonumber( sVal:sub( 4)) or 0
if abs( dPosA - dPrevA) > 1 then
ExecParkRoller( nil, nil, nil, nil, false, bAgg)
OnSimulToolDeselect( dPrevA)
@@ -582,21 +675,6 @@ function OnSimulMachiningStart()
OnSimulToolSelect( dPosA)
end
end
-- salvo dati utensile
local nSetHead = GetHeadSet( EMT.HEAD)
-- per gruppo testa 1
if nSetHead == 1 then
EMT.PREVTOOL_H1 = EMT.TOOL
EMT.PREVHEAD_H1 = EMT.HEAD
EMT.PREVTCPOS_H1 = EMT.TCPOS
EMT.PREVTTOTLEN_H1 = EMT.TTOTLEN
-- per gruppo testa 2
elseif nSetHead == 2 then
EMT.PREVTOOL_H2 = EMT.TOOL
EMT.PREVHEAD_H2 = EMT.HEAD
EMT.PREVTCPOS_H2 = EMT.TCPOS
EMT.PREVTTOTLEN_H2 = EMT.TTOTLEN
end
-- recupero alcuni dati della lavorazione
EMT.MCHNAME = EgtGetOperationName( EMT.MCHID)
EMT.MCHTYPE = EgtGetMachiningParam( MCH_MP.TYPE)
@@ -657,6 +735,7 @@ function OnSimulMachiningStart()
SimulMoveAxis( 'X2', ParkX2, MCH_SIM_STEP.RAPID)
EMT.DOU_TO_ZMAX = nil
end
-- non ancora iniziata la lavorazione
EMT.MCHFIRST = true
end
@@ -674,6 +753,29 @@ function OnSimulMachiningEnd()
if EMT.DOU_TYPE and not EMT.ZMAX then EMT.DOU_TO_ZMAX = EMT.DOU_TYPE end
EMT.DOU_TYPE = nil
EMT.DOU_TOOL = nil
-- salvo dati utensile
local nSetHead = GetHeadSet( EMT.HEAD)
-- per gruppo testa 1
if nSetHead == 1 then
EMT.PREVTOOL_H1 = EMT.TOOL
EMT.PREVHEAD_H1 = EMT.HEAD
EMT.PREVTCPOS_H1 = EMT.TCPOS
EMT.PREVTTOTLEN_H1 = EMT.TTOTLEN
-- per gruppo testa 2
elseif nSetHead == 2 then
EMT.PREVTOOL_H2 = EMT.TOOL
EMT.PREVHEAD_H2 = EMT.HEAD
EMT.PREVTCPOS_H2 = EMT.TCPOS
EMT.PREVTTOTLEN_H2 = EMT.TTOTLEN
-- per gruppo testa 3 (resetto dati testa 1)
else
EMT.PREVTOOL_H3 = nil
EMT.PREVHEAD_H3 = nil
EMT.PREVTCPOS_H3 = nil
EMT.PREVTTOTLEN_H3 = nil
end
end
---------------------------------------------------------------------
@@ -690,13 +792,13 @@ end
---------------------------------------------------------------------
function OnSimulPathEnd()
-- rimozione sfridi
RemoveScraps()
ExecRemoveScraps()
-- se non ci sono comandi ausiliari associati e richiesta risalita a Zmax
if EMT.AUXTOT == 0 and EMT.TO_ZMAX then
if EMT.MCHSPLIT and not EMT.TO_FALL then
EMT.SPLIT_Y1DELTA = EMT.Y1DELTA
EMT.Y1DELTA = nil
SetPY1Light( false)
ExecMovePY1( false)
end
ExecMoveZmax( EMT.MCHSPLIT)
EMT.TO_ZMAX = nil
@@ -706,19 +808,19 @@ end
---------------------------------------------------------------------
function OnSimulPathStartAux()
-- eseguo il comando
ExecAuxCmd( EMT.AUX)
ExecAuxCmd( EMT.AUX, true)
-- se ultimo comando e lavorazione di split, sgancio il carro Y1
if EMT.AUXIND == EMT.AUXTOT and EMT.MCHSPLIT and not EMT.TO_FALL then
EMT.SPLIT_Y1DELTA = EMT.Y1DELTA
EMT.Y1DELTA = nil
SetPY1Light( false)
ExecMovePY1( false)
end
end
---------------------------------------------------------------------
function OnSimulPathEndAux()
-- eseguo il comando
ExecAuxCmd( EMT.AUX)
ExecAuxCmd( EMT.AUX, false)
-- se ultimo comando e richiesta risalita a Zmax
if EMT.AUXIND == EMT.AUXTOT and EMT.TO_ZMAX then
ExecMoveZmax( EMT.MCHSPLIT)
@@ -808,20 +910,25 @@ function OnSimulMoveStart()
local C1Home = EgtGetAxisHomePos( 'C1')
local Z1Pos = EgtGetAxisPos( 'Z1')
local Z1Home = EgtGetAxisHomePos( 'Z1')
local MyMaxZ1 = EgtGetAxisMax( 'Z1')
-- se fresa o lama
if EMT.HEAD ~= 'H13' then
-- se movimento iniziale da Zmax con lama o fresa
if EMT.ZMAX or ( EMT.FLAG == 2 and EMT.FLAG2 == 1) then
local bXSpec = EgtIf( BD.RIGHT_LOAD, EMT.L2 < DeltaTabY, EMT.L2 > DeltaTabY)
-- in caso di rotazione della lama lontano dalla posizione di home degli assi rotanti
if ( EMT.HEAD == 'H12' or EMT.HEAD == 'H16') and ( abs( C1Pos - EMT.R1) > 1 or abs( B1Pos - EMT.R2) > 1) and ( abs( C1Home - EMT.R1) > 30.1 or abs( B1Home - EMT.R2) > 30.1) then
local bXSpec = ( EMT.L2 > DeltaTabY)
SimulMoveAxis( 'X1', EgtIf( bXSpec, DeltaTabY, EMT.L2), MCH_SIM_STEP.RAPID)
SimulMoveAxis( 'B1', 0, MCH_SIM_STEP.COLLROT)
SimulMoveAxes( 'Z1', MyMaxZ1, MCH_SIM_STEP.RAPID, 'B1', 0, MCH_SIM_STEP.COLLROT)
SimulMoveAxis( 'C1', EMT.R1, MCH_SIM_STEP.COLLROT)
SimulMoveAxis( 'X1', EMT.L2, MCH_SIM_STEP.RAPID)
SimulMoveAxes( 'Z1', EMT.L3, MCH_SIM_STEP.RAPID, 'B1', EMT.R2, MCH_SIM_STEP.COLLROT)
-- caso standard
else
-- se bisogna scrivere tutti gli assi
if WriteAllCoordsOnFirstM101 then
SimulMoveAxis( 'X1', EgtIf( bXSpec, DeltaTabY, EMT.L2), MCH_SIM_STEP.RAPID)
end
SimulMoveAxis( 'Z1', EMT.L3, MCH_SIM_STEP.RAPID)
SimulMoveAxis( 'B1', EMT.R2, MCH_SIM_STEP.COLLROT)
SimulMoveAxis( 'C1', EMT.R1, MCH_SIM_STEP.COLLROT)
@@ -838,16 +945,54 @@ function OnSimulMoveStart()
-- se movimento iniziale da Zmax
if EMT.ZMAX or ( EMT.FLAG == 2 and EMT.FLAG2 == 1) then
SimulMoveAxes( 'Z1', Z1Home, MCH_SIM_STEP.RAPID, 'B1', EMT.R2, MCH_SIM_STEP.COLLROT)
-- se motosega molto lunga, ruoto prima di muovermi in X
if EMT.TTOTLEN >= MinLengthLongCSaw then
SimulMoveAxis( 'C1', EMT.R1, MCH_SIM_STEP.COLLROT)
end
end
end
-- altrimenti testa 2
else
-- Porto la X alla giusta quota
local X2Pos = EgtGetAxisPos( 'X2')
-- se altrimenti testa 2
elseif nSetHead == 2 then
local B2Home = EgtGetAxisHomePos( 'B2')
local C2Home = EgtGetAxisHomePos( 'C2')
local Z2Home = EgtGetAxisHomePos( 'Z2')
local X2Home = EgtGetAxisHomePos( 'X2')
if X2Pos > X2Home - 1 then
SimulMoveAxis( 'X2', EMT.L2, MCH_SIM_STEP.RAPID)
local X2Pos = EgtGetAxisPos( 'X2')
local B2Pos = EgtGetAxisPos( 'B2')
local C2Pos = EgtGetAxisPos( 'C2')
if EMT.TOOL ~= EMT.PREVTOOL_H2 then
if EMT.ZMAX then
-- se bisogna scrivere tutti gli assi
if WriteAllCoordsOnFirstM101 then
if EMT.HEAD == 'H22' and EMT.PREVHEAD_H2 ~= EMT.HEAD then
SimulMoveAxes( 'X2', MinX2, MCH_SIM_STEP.RAPID, 'B2', B2Home, MCH_SIM_STEP.COLLROT, 'C2', C2Home, MCH_SIM_STEP.COLLROT)
else
SimulMoveAxes( 'X2', SafeX2, MCH_SIM_STEP.RAPID, 'B2', B2Home, MCH_SIM_STEP.COLLROT, 'C2', C2Home, MCH_SIM_STEP.COLLROT)
end
end
SimulMoveAxis( 'Z2', Z2Home, MCH_SIM_STEP.RAPID)
-- Porto la X alla giusta quota
if X2Pos > ParkMchY2 and ( B2Pos ~= EMT.R2 or C2Pos ~= EMT.R1) then
SimulMoveAxis( 'X2', ParkMchY2, MCH_SIM_STEP.RAPID)
end
else
-- Porto la X alla giusta quota
if X2Pos > ParkMchY2 and ( B2Pos ~= EMT.R2 or C2Pos ~= EMT.R1) then
SimulMoveAxis( 'X2', ParkMchY2, MCH_SIM_STEP.RAPID)
end
end
else
-- Porto la X alla giusta quota
if X2Pos > ParkMchY2 and ( B2Pos ~= EMT.R2 or C2Pos ~= EMT.R1) then
SimulMoveAxis( 'X2', ParkMchY2, MCH_SIM_STEP.RAPID)
end
end
if EMT.HEAD == 'H22' then
SimulMoveAxes( 'B2', EMT.R2, MCH_SIM_STEP.COLLROT, 'C2', EMT.R1, MCH_SIM_STEP.COLLROT)
end
-- altrimenti testa 3
else
; -- non devo fare alcunchè di speciale
end
end
-- se lavorazione split, muovo per riaggancio del carro Y1
@@ -872,7 +1017,7 @@ function OnSimulMoveStart()
else
EMT.AuxAxes = 4 + 4
EMT.A5n = 'X2'
local X2 = Delta2TabY + EMT.DOU_TLEN - ( -DeltaTabY + EMT.L2 + EMT.TLEN + EMT.HB)
local X2 = Delta2TabY + EMT.DOU_TLEN - ( -DeltaTabY + EMT.L2 + EMT.TLEN + EgtIf( BD.RIGHT_LOAD, -EMT.HB, EMT.HB))
if EMT.MCHTYPE == MCH_MY.DRILLING and EMT.FLAG == 101 then
EMT.DOU_DRILL_END = -( EMT.L2p - EMT.L2)
X2 = X2 + 2 * EMT.DOU_DRILL_END
@@ -895,7 +1040,7 @@ function OnSimulMoveStart()
EmtSetLastError( 1208, sErr)
end
-- se appena sopra inizio, sistemo subito la quota in Z
if EMT.MOVE == 0 and EMT.FLAG == 1 then
if EMT.MOVE == 0 then
SimulMoveAxes( 'Z2', EMT.A6, MCH_SIM_STEP.RAPID)
end
end
@@ -928,17 +1073,28 @@ function OnSimulMoveStart()
end
end
-- se necessario ...
if EMT.MCHFIRST then
if EMT.MCHFIRST and EMT.EnabAxes ~= false then
if nSetHead == 1 then
SimulMoveAxes( 'X1', EMT.L2, MCH_SIM_STEP.RAPID,
'Z1', EMT.L3, MCH_SIM_STEP.RAPID,
'C1', EMT.R1, MCH_SIM_STEP.RAPROT,
'B1', EMT.R2, MCH_SIM_STEP.RAPROT)
else
'C1', EMT.R1, MCH_SIM_STEP.COLLROT,
'B1', EMT.R2, MCH_SIM_STEP.COLLROT)
if EMT.DOU_TYPE and EMT.AuxAxes == 8 then
SimulMoveAxes( 'X2', EMT.A5, MCH_SIM_STEP.RAPID,
'Z2', EMT.A6, MCH_SIM_STEP.RAPID,
'C2', EMT.A7, MCH_SIM_STEP.COLLROT,
'B2', EMT.A8, MCH_SIM_STEP.COLLROT)
end
elseif nSetHead == 2 then
SimulMoveAxes( 'X2', EMT.L2, MCH_SIM_STEP.RAPID,
'Z2', EMT.L3, MCH_SIM_STEP.RAPID,
'C2', EMT.R1, MCH_SIM_STEP.RAPROT,
'B2', EMT.R2, MCH_SIM_STEP.RAPROT)
'C2', EMT.R1, MCH_SIM_STEP.COLLROT,
'B2', EMT.R2, MCH_SIM_STEP.COLLROT)
else
SimulMoveAxes( 'X3', EMT.L2, MCH_SIM_STEP.RAPID,
'Z3', EMT.L3, MCH_SIM_STEP.RAPID,
'C3', EMT.R1, MCH_SIM_STEP.COLLROT,
'B3', EMT.R2, MCH_SIM_STEP.COLLROT)
end
end
if nRes ~= 0 then
@@ -946,16 +1102,21 @@ function OnSimulMoveStart()
EMT.A4 = EgtIf( GetV2ToClose(), EMT.V2NEXTPOS, ParkV2)
end
EMT.ZMAX = nil
EMT.TO_ZMAX = nil
end
---------------------------------------------------------------------
function OnSimulMoveEnd()
-- rimozione eventuali sfridi
if EMT.FLAG == 301 then
ExecRemoveScraps()
end
-- se primo rapido della lavorazione
if EMT.MCHFIRST and EMT.MOVE == 0 then
-- se lavorazione split, dichiaro carro Y1 riagganciato
if EMT.SPLIT_Y1DELTA then
EMT.SPLIT_Y1DELTA = nil
SetPY1Light( true)
ExecMovePY1( true)
end
-- chiusura o apertura rulli V1
if GetV1ToClose() then
@@ -989,7 +1150,7 @@ function OnSimulMoveEnd()
-- se Zmax dopo fine lavorazione
if EMT.MOVE == 0 and EMT.FLAG == 3 then
-- eventuale rimozione sfridi
RemoveScraps()
ExecRemoveScraps()
-- eseguo
ExecMoveZmax( EMT.MCHSPLIT)
EMT.TO_ZMAX = nil
@@ -1001,13 +1162,9 @@ function OnSimulCollision()
-- se prima collisione della lavorazione, la segnalo
if EMT.MCHNAME ~= EMT.LAST_MCHNAME_COLLIDE then
local Class = ''
if EMT.SIMCOBIND == 1001 then
if EMT.SIMCOBIND == 1001 or EMT.SIMCOBIND == 1011 then
Class = 'T_'..EMT.HEAD
elseif EMT.SIMCOBIND == 1011 then
Class = 'T_'..EMT.HEAD
elseif EMT.SIMCOBIND == 1002 then
Class = 'TH_'..EMT.HEAD
elseif EMT.SIMCOBIND == 1012 then
elseif EMT.SIMCOBIND == 1002 or EMT.SIMCOBIND == 1012 then
Class = 'TH_'..EMT.HEAD
else
Class = EMT.COLLOBJ[EMT.SIMCOBIND].Cl
@@ -1022,7 +1179,7 @@ function OnSimulCollision()
end
---------------------------------------------------------------------
function ExecAuxCmd( sCmd)
function ExecAuxCmd( sCmd, bPathStart)
-- analizzo il comando
local Cmd = EgtSplitString( sCmd)
if Cmd[1] == '0' then
@@ -1035,29 +1192,31 @@ function ExecAuxCmd( sCmd)
end
EgtOutText( Cmd[2])
elseif Cmd[1] == '1' then
if EMT.SPLIT then ExecOpenRoller( 1) end
if EMT.UNLOADING or EMT.TO_FALL then ExecOpenRoller( 2) end
local sV1, MoveV1, sV2, MoveV2 = CalcMoveV1V2ForAuxCmd( Cmd)
local bOk, bOk1, bOk2, bOk3 = SimulMoveAxes( Cmd[2], tonumber( Cmd[3]), MCH_SIM_STEP.RAPID,
sV1, MoveV1, MCH_SIM_STEP.RAPID,
sV2, MoveV2, MCH_SIM_STEP.RAPID)
if not bOk then
if not bOk1 then
if VerifyY1Y2Stroke( Cmd[2], tonumber( Cmd[3])) == nil then
EgtOutLog( 'Error on ExecAuxCmd : ' .. sCmd)
if Cmd[2] ~= 'Z' then
ExecOpenRoller( 1)
ExecOpenRoller( 2)
local sV1, MoveV1, sV2, MoveV2 = CalcMoveV1V2ForAuxCmd( Cmd)
local bOk, bOk1, bOk2, bOk3 = SimulMoveAxes( Cmd[2], tonumber( Cmd[3]), MCH_SIM_STEP.RAPID,
sV1, MoveV1, MCH_SIM_STEP.RAPID,
sV2, MoveV2, MCH_SIM_STEP.RAPID)
if not bOk then
if not bOk1 then
if VerifyY1Y2Stroke( Cmd[2], tonumber( Cmd[3])) == nil then
EgtOutLog( 'Error on ExecAuxCmd : ' .. sCmd)
end
elseif not bOk2 then
VerifyV1V2Stroke( sV1, MoveV1)
elseif not bOk3 then
VerifyV1V2Stroke( sV2, MoveV2)
end
elseif not bOk2 then
VerifyV1V2Stroke( sV1, MoveV1)
elseif not bOk3 then
VerifyV1V2Stroke( sV2, MoveV2)
end
end
elseif Cmd[1] == '2' then
-- Verifico movimento carrello con trave agganciata
VerifyOneChariotSlide( Cmd[2], Cmd[3], Cmd[4], Cmd[5])
-- Eseguo i movimenti necessari
if EMT.SPLIT then ExecOpenRoller( 1) end
if EMT.UNLOADING or EMT.TO_FALL then ExecOpenRoller( 2) end
ExecOpenRoller( 1)
ExecOpenRoller( 2)
local sV1, MoveV1, sV2, MoveV2 = CalcMoveV1V2ForAuxCmd( Cmd)
local bOk, bOk1, bOk2, bOk3, bOk4 = SimulMoveAxes( Cmd[2], tonumber( Cmd[3]), MCH_SIM_STEP.RAPID,
Cmd[4], tonumber( Cmd[5]), MCH_SIM_STEP.RAPID,
@@ -1079,8 +1238,8 @@ function ExecAuxCmd( sCmd)
-- Verifico movimento carrelli con trave agganciata
VerifyTwoChariotsSlide( Cmd[2], Cmd[3], Cmd[4], Cmd[5], Cmd[6], Cmd[7])
-- Eseguo i movimenti necessari
if EMT.SPLIT then ExecOpenRoller( 1) end
if EMT.UNLOADING or EMT.TO_FALL then ExecOpenRoller( 2) end
ExecOpenRoller( 1)
ExecOpenRoller( 2)
local sV1, MoveV1, sV2, MoveV2 = CalcMoveV1V2ForAuxCmd( Cmd)
local bOk, bOk1, bOk2, bOk3, bOk4, bOk5 = SimulMoveAxes( Cmd[2], tonumber( Cmd[3]), MCH_SIM_STEP.RAPID,
Cmd[4], tonumber( Cmd[5]), MCH_SIM_STEP.RAPID,
@@ -1100,13 +1259,13 @@ function ExecAuxCmd( sCmd)
end
end
elseif Cmd[1] == '4' then
ExecMoveHome( Cmd[2] == '1', EMT.MCHSPLIT)
ExecMoveHome( Cmd[2] == '1', EgtIf( bPathStart, false, EMT.MCHSPLIT))
elseif Cmd[1] == '11' then
SimulMoveAxes( 'PY1', EgtIf( Cmd[2] == '0', MaxHoOpen, EMT.HB), MCH_SIM_STEP.RAPID)
SetPY1Light( Cmd[2] ~= '0')
local bClose = Cmd[2] ~= '0'
if bPathStart and EMT.MCHSPLIT and not EMT.FALL and GetPY2Light() then bClose = false end
ExecMovePY1( bClose)
elseif Cmd[1] == '12' then
SimulMoveAxes( 'PY2', EgtIf( Cmd[2] == '0', MaxHoOpen, EMT.HB), MCH_SIM_STEP.RAPID)
SetPY2Light( Cmd[2] ~= '0')
ExecMovePY2( Cmd[2] ~= '0')
elseif Cmd[1] == '21' then
local nY1Delta = tonumber( Cmd[2])
local nY2Delta = tonumber( Cmd[3])
@@ -1162,7 +1321,7 @@ function ExecStartHome()
EgtResetAxisPos( 'C1')
EgtResetAxisPos( 'B1')
-- Testa 2
EgtResetAxisPos( 'X2')
EgtSetAxisPos( 'X2', SafeX2)
EgtSetAxisPos( 'Z2', MinZ2)
EgtResetAxisPos( 'C2')
EgtResetAxisPos( 'B2')
@@ -1172,12 +1331,7 @@ end
function ExecMoveHome( bNearV, bMchSplit)
-- risalita a Zmax
ExecMoveZmax( bMchSplit)
-- se testa sotto
if GetHeadSet( EMT.HEAD) == 2 then
if not SimulMoveAxis( 'X2', ParkX2, MCH_SIM_STEP.RAPID) then
EgtOutLog( 'Error on MoveHome : X2')
end
end
EMT.TO_ZMAX = nil
-- se richiesto, avvicino i rulli
if bNearV then
ExecOpenRoller( 1)
@@ -1214,25 +1368,27 @@ function ExecMoveZmax( bMchSplit)
end
-- se testa sopra
if nSetHead == 1 then
local MyMaxZ1 = EgtGetAxisMax( 'Z1')
-- se fresa o lama
if EMT.HEAD ~= 'H13' then
if abs( HomeC - CurrC) > 0.1 or abs( HomeB - CurrB) > 0.1 then
local dZref = HomeZ + GetZExtra( EMT.HEAD, CurrB)
SimulMoveAxes( 'Z1', EgtIf( dZref > CurrZ, dZref, CurrZ), MCH_SIM_STEP.RAPID, 'B1', EgtClamp( CurrB, -90, 90), MCH_SIM_STEP.COLLROT)
if ( EMT.HEAD == 'H12' or EMT.HEAD == 'H16') and ( abs( HomeC - CurrC) > 30.1 or abs( HomeB - CurrB) > 30.1) then
SimulMoveAxes( 'Z1', MaxZ1, MCH_SIM_STEP.RAPID, 'B1', 0, MCH_SIM_STEP.COLLROT)
SimulMoveAxes( 'Z1', MyMaxZ1, MCH_SIM_STEP.RAPID, 'B1', 0, MCH_SIM_STEP.COLLROT)
end
if EMT.L2 > DeltaTabY then
if ( not BD.RIGHT_LOAD and EMT.L2 > DeltaTabY) or ( BD.RIGHT_LOAD and EMT.L2 < DeltaTabY) then
SimulMoveAxis( 'X1', DeltaTabY, MCH_SIM_STEP.RAPID)
end
SimulMoveAxis( 'C1', HomeC, MCH_SIM_STEP.COLLROT)
SimulMoveAxis( 'B1', HomeB, MCH_SIM_STEP.COLLROT)
end
SimulMoveAxis( 'Z1', MaxZ1, MCH_SIM_STEP.RAPID)
SimulMoveAxis( 'Z1', MyMaxZ1, MCH_SIM_STEP.RAPID)
-- altrimenti sega a catena
else
-- salzo in Z sicurezza raddrizzando la B
SimulMoveAxes( 'Z1', ParkCSawZ1, MCH_SIM_STEP.RAPID, 'B1', HomeB, MCH_SIM_STEP.COLLROT)
-- salgo in Z sicurezza raddrizzando la B
local SafeZ1 = EgtIf( EMT.TTOTLEN < MinLengthLongCSaw, ParkCSawZ1, ParkLongCSawZ1)
SimulMoveAxes( 'Z1', SafeZ1, MCH_SIM_STEP.RAPID, 'B1', HomeB, MCH_SIM_STEP.COLLROT)
SimulMoveAxes( 'X1', HomeX, MCH_SIM_STEP.RAPID, 'C1', HomeC, MCH_SIM_STEP.COLLROT)
end
-- se lavorazione in doppio
@@ -1248,11 +1404,19 @@ function ExecMoveZmax( bMchSplit)
SimulMoveAxis( 'X2', ParkX2, MCH_SIM_STEP.RAPID)
EMT.DOU_TO_ZMAX = nil
end
-- altrimenti testa sotto
else
-- se altrimenti testa sotto
elseif nSetHead == 2 then
SimulMoveAxis( 'Z2', ParkZ2, MCH_SIM_STEP.RAPID)
SimulMoveAxes( 'B2', ParkB2, MCH_SIM_STEP.COLLROT, 'C2', ParkC2, MCH_SIM_STEP.COLLROT)
SimulMoveAxis( 'X2', ParkX2, MCH_SIM_STEP.RAPID)
if EMT.HEAD == 'H22' then
SimulMoveAxis( 'X2', SafeX2, MCH_SIM_STEP.RAPID)
else
SimulMoveAxis( 'X2', ParkX2, MCH_SIM_STEP.RAPID)
end
-- altrimenti testa 3
else
SimulMoveAxes( 'Z3', MaxZ3, MCH_SIM_STEP.RAPID)
SimulMoveAxes( 'B3', ParkB3, MCH_SIM_STEP.COLLROT)
end
EMT.ZMAX = true
end
@@ -1266,21 +1430,25 @@ function ExecUnloading()
-- li sposto per lasciare spazio al nuovo pezzo
local nId = EgtGetFirstInGroup( nVmGrpId)
while nId do
EgtMove( nId, Vector3d( 0, -( EMT.HB + 50.0), 0), GDB_RT.GLOB)
EgtMove( nId, Vector3d( 0, EgtIf( BD.RIGHT_LOAD, ( EMT.HB + 50.0), -( EMT.HB + 50.0)), 0), GDB_RT.GLOB)
nId = EgtGetNext( nId)
end
-- creo un nuovo layer e vi inserisco il nuovo pezzo
local nLayId = EgtGroup( nVmGrpId, EgtGetGlobFrame( vMillId))
EgtRelocate( vMillId, nLayId)
local vtMove = Vector3d( 0, -1600, 0)
if EMT.FALL then vtMove = Vector3d( 0, -2600, -1150) end
local vtMove = Vector3d( 0, EgtIf( BD.RIGHT_LOAD, 1600, -1600), 0)
if EMT.FALL then vtMove = Vector3d( 0, EgtIf( BD.RIGHT_LOAD, 3200, -2600), -1150) end
EgtMove( nLayId, vtMove, GDB_RT.GLOB)
EgtSetLevel( vMillId, GDB_LV.USER)
-- aggiungo gli spigoli
local nFirstId, nCount = EgtVolZmapGetEdges( vMillId, nLayId)
if nFirstId then
for nId = nFirstId, nFirstId + nCount - 1 do
EgtSetColor( nId, Color3d( 96, 96, 96))
if EgtVolZmapSetShowEdges then
EgtVolZmapSetShowEdges( vMillId, true)
else
local nFirstId, nCount = EgtVolZmapGetEdges( vMillId, nLayId)
if nFirstId then
for nId = nFirstId, nFirstId + nCount - 1 do
EgtSetColor( nId, Color3d( 96, 96, 96))
end
end
end
-- rilascio Vmill
@@ -1305,6 +1473,18 @@ function ExecUnloading()
end
end
---------------------------------------------------------------------
function ExecMovePY1( bClose)
SimulMoveAxes( 'PY1', EgtIf( not bClose, MaxHoOpen, EMT.HB), MCH_SIM_STEP.RAPID)
SetPY1Light( bClose)
end
---------------------------------------------------------------------
function ExecMovePY2( bClose)
SimulMoveAxes( 'PY2', EgtIf( not bClose, MaxHoOpen, EMT.HB), MCH_SIM_STEP.RAPID)
SetPY2Light( bClose)
end
---------------------------------------------------------------------
local function LinkRemainingPartsToY1()
local nCurrOrd = GetPhaseOrd( EMT.PHASE)
@@ -1334,6 +1514,9 @@ function ExecParkRoller( PosY1, PosY2, PosV1, PosV2, bSpliCut, bAgg)
-- Parcheggi pinze
local MyParkY1 = ParkY1 + EgtIf( bAgg, AggLoad, 0)
local MyParkY2 = ParkY2
-- Apro i rulli, se necessario
if abs( ParkV1 - PosV1) > 0.1 then ExecOpenRoller( 1) end
if abs( ParkV2 - PosV2) > 0.1 then ExecOpenRoller( 2) end
-- Eseguo spostamenti
if EMT.Y1DELTA and EMT.Y2DELTA then
local DiffY1 = MyParkY1 - PosY1
@@ -1387,7 +1570,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.LP, 0)
local TryMoveY1 = ParkV1 - PosT - EgtIf( bSpliCut or EMT.FALL, EMT.LT, 0)
if ( PosT > ParkV2 - ExtraParkV and PosT < ParkV1 and PosY1 + TryMoveY1 < MaxY1) then MoveY1 = max( MoveY1, TryMoveY1) end
-- se appena eseguito taglio di separazione
if bSpliCut then
@@ -1417,8 +1600,8 @@ 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.LP
if ( PosT + EMT.LP < ParkV1 + ExtraParkV and PosT + EMT.LP > ParkV2 and PosY2 + TryMoveY2 > MinY2) then MoveY2 = min( MoveY2, TryMoveY2) end
local TryMoveY2 = ParkV2 - PosT - EMT.LT
if ( PosT + EMT.LT < ParkV1 + ExtraParkV and PosT + EMT.LT > 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,
'V2', ParkV2, MCH_SIM_STEP.RAPID,
@@ -1453,14 +1636,14 @@ function ExecOpenRoller( nInd)
end
---------------------------------------------------------------------
function RemoveScraps()
function ExecRemoveScraps()
-- se attivo VMILL, lavorazione ed è richiesto di eliminare gli sfridi
if EMT.VMILL and #EMT.VMILL > 0 and not EMT.OPEISDISP and EMT.VMRS then
local vMillId = EMT.VMILL[1]
local nPart = EgtVolZmapPartCount( vMillId)
if nPart > 1 then
-- ricerca del pezzo con massimo volume
local dTCenX = -EgtGetAxisPos( 'T') - EMT.LP / 2
local dTCenX = -EgtGetAxisPos( 'T') - EMT.LT / 2
local nPartMax = 0
local dVolMax = 0
for i = 1, nPart do
@@ -1484,7 +1667,6 @@ function RemoveScraps()
end
EMT.VMRS = false
end
end
---------------------------------------------------------------------
@@ -1653,14 +1835,14 @@ end
---------------------------------------------------------------------
function GetV1ToClose()
--EgtOutLog( string.format( 'L1m=%.3f L1M=%.3f V2NP=%.3f LB=%.3f', EMT.MAXMIN[1], EMT.MAXMAX[1], EMT.V2NEXTPOS, EMT.LB))
--EgtOutLog( string.format( 'LB=%.3f LT=%.3f', EMT.LB, EMT.LP or 0))
--EgtOutLog( string.format( 'LB=%.3f LT=%.3f', EMT.LB, EMT.LT or 0))
return ( EMT.MAXMAX[1] <= EMT.V1NEXTPOS + RollCageMin and EMT.MAXMIN[1] + EMT.LB >= EMT.V1NEXTPOS + RollCageMax)
end
---------------------------------------------------------------------
function GetV2ToClose()
--EgtOutLog( string.format( 'L1m=%.3f L1M=%.3f V2NP=%.3f LB=%.3f', EMT.MAXMIN[1], EMT.MAXMAX[1], EMT.V2NEXTPOS, EMT.LB))
--EgtOutLog( string.format( 'LB=%.3f LT=%.3f', EMT.LB, EMT.LP or 0))
--EgtOutLog( string.format( 'LB=%.3f LT=%.3f', EMT.LB, EMT.LT or 0))
return ( EMT.MAXMAX[1] <= EMT.V2NEXTPOS - RollCageMax and EMT.MAXMIN[1] + EMT.LB >= EMT.V2NEXTPOS - RollCageMin)
end
@@ -1676,44 +1858,30 @@ end
---------------------------------------------------------------------
function LoadFirstTool( nHSet, sTcPosDef)
if nHSet ~= 1 and nHSet ~= 2 then return end
EgtUnloadTool( EgtIf( nHSet == 1, 'H11', 'H21'), 1)
if GetHeadSetFromTcPos( sTcPosDef) ~= nHSet then return end
local sTool, sHead, sTcPos = FindFirstToolOnHeadSet( nHSet)
local sTool, sHead, sTcPos, sTTotLen, sBlockedAxis = FindFirstToolOnHeadSet( nHSet)
if not sTool then
local vTools = EgtGetToolsInCurrSetupPos( sTcPosDef)
if vTools and vTools[1] then
sTool = vTools[1]
sTcPos = sTcPosDef
if nHSet == 1 then
-- seconda lama
if SecondSaw and sTcPos == 'T21' then
sHead = 'H16'
-- utensili speciali
elseif TcSpecialTools and sTcPos == 'T121' then
sHead = 'H14'
-- motoseghe
elseif sTcPos == 'T101' or sTcPos == 'T111' then
sHead = 'H13'
-- utensili standard o prima lama
else
sHead = EgtIf( sTcPos == 'T1', 'H12', 'H11')
end
else
-- lama su aggregato da sotto
if TcAggreBladeUnder and sTcPos == 'T201' then
sHead = 'H22'
-- utensili standard da sotto
else
sHead = 'H21'
end
end
sHead = GetAdjHeadFromTcPos( nHSet, sTcPos)
end
end
if sTool then
-- imposto correttamente i dati di testa
local OrigEMC = EMC
EMC = { HEAD = sHead, TOOL = sTool, TCPOS = sTcPos, TOTLEN = 0}
EMC = { HEAD = sHead, TOOL = sTool, TCPOS = sTcPos, TOTLEN = sTTotLen, BLOCKEDAXIS = sBlockedAxis}
OnSetHead()
EMC = OrigEMC
if sBlockedAxis then
local dPosA = tonumber( sBlockedAxis:sub( 4) or '') or 0
if dPosA ~= 0 then
-- imposto il valore di A
EgtSetAxisPos( EgtIf( nHSet == 1 , 'A1', 'A2'), dPosA)
end
end
-- carico l'utensile
EgtLoadTool( sHead, 1, sTool)
ShowToolInTcPos( sTcPos, false)
@@ -2130,7 +2298,7 @@ function FindFirstToolOnHeadSet( nHSet)
local CurrMachId = EgtGetCurrMachining()
local CurrTool = EgtTdbGetCurrToolParam( MCH_TP.NAME)
-- cerco lavorazione con utensile su gruppo testa indicato
local sTool, sHead, sTcPos
local sTool, sHead, sTcPos, sTTotLen, sBlockedAxis
local OpId = EgtGetFirstActiveOperation()
while OpId do
local nType = EgtGetOperationType( OpId)
@@ -2142,6 +2310,8 @@ function FindFirstToolOnHeadSet( nHSet)
if GetHeadSet( sHead) == nHSet then
sTool = sTest
sTcPos = EgtTdbGetCurrToolParam( MCH_TP.TCPOS)
sTTotLen = EgtTdbGetCurrToolParam( MCH_TP.TOTLEN)
sBlockedAxis = EgtGetMachiningParam( MCH_MP.BLOCKEDAXIS)
break
end
end
@@ -2153,7 +2323,7 @@ function FindFirstToolOnHeadSet( nHSet)
EgtSetCurrMachining( CurrMachId or GDB_ID.NULL)
EgtTdbSetCurrTool( CurrTool or '')
-- restituisco risultato
return sTool, sHead, sTcPos
return sTool, sHead, sTcPos, sTTotLen, sBlockedAxis
end
---------------------------------------------------------------------
@@ -2171,14 +2341,6 @@ function GetToolTcPos( sTool)
return sTcPos
end
---------------------------------------------------------------------
function GetCurrChainSawingVirtualAxis()
-- recupero il valore dell'asse virtuale bloccato A
local sVal = EgtGetMachiningParam( MCH_MP.BLOCKEDAXIS) or 'A1=0'
local dPosA = tonumber( sVal:sub( 4)) or 0
return dPosA
end
---------------------------------------------------------------------
function GetNextChainSawingVirtualAxis( MchId)
-- recupero la lavorazione successiva
@@ -2254,7 +2416,7 @@ end
---------------------------------------------------------------------
function RollerParkingNeeded( sHead, dAng1p, dAng2p, dAng1, dAng2)
if sHead == 'H11' or sHead == 'H14' or sHead == 'H12' or sHead == 'H13' or sHead == 'H16' then
if sHead == 'H11' or sHead == 'H12' or sHead == 'H13' or sHead == 'H16' then
return ( abs( dAng1 - dAng1p) > 1 or ( abs( dAng2 - dAng2p) > 1 and abs( dAng1 % 180.0) > 1))
elseif sHead == 'H21' or sHead == 'H22' then
return ( abs( dAng1 - dAng1p) > 1 or ( abs( dAng2 - dAng2p) > 1 and abs( dAng1 % 180.0) > 1))
+85 -39
View File
@@ -1,12 +1,11 @@
-- Special Operations macchina Essetre-PF1250 by EgalTech s.r.l. 2023/11/21
-- Special Operations macchina Essetre-PF1250 by Egalware s.r.l. 2024/04/09
-- Intestazioni
require( 'EmtGenerator')
EgtEnableDebug( false)
-- Carico i dati globali
local sBaseDir = EgtGetSourceDir()
local BD = dofile( sBaseDir .. 'Beam\\BeamData.lua')
-- Carico libreria
local BD = require( 'BeamData')
---------------------------------------------------------------------
-- *** Special Z moves ***
@@ -44,13 +43,15 @@ function OnSpecialGetMaxZ()
-- Sistemazione dati di input
local vtTp = Vector3d( EMC.TDIRp)
local bFromZmax = false
-- recupero il gruppo
local nSetHead = GetHeadSet( EMC.HEAD)
if vtTp:isSmall() then
vtTp = X_AX()
bFromZmax = true
if EMC.HEAD == 'H11' or EMC.HEAD == 'H14' or EMC.HEAD == 'H12' or EMC.HEAD == 'H16' then
if nSetHead == 1 then
EMC.R1p = ParkC1
EMC.R2p = ParkB1
elseif EMC.HEAD == 'H21' or EMC.HEAD == 'H22' then
elseif nSetHead == 2 then
EMC.R1p = ParkC2
EMC.R2p = ParkB2
end
@@ -60,7 +61,7 @@ function OnSpecialGetMaxZ()
local bBSameSign = (( EMC.R2p < 10 and EMC.R2 < 10) or ( EMC.R2p > -10 and EMC.R2 > -10))
-- Calcolo in funzione della testa e dei parametri
if EMC.HEAD == 'H11' or EMC.HEAD == 'H14' then
if EMC.HEAD == 'H11' then
if bBSameSign and vtTp:getX() > -0.1 and vtT:getX() > -0.1 then
EMC.MAXZ = MaxZ1
else
@@ -70,14 +71,14 @@ function OnSpecialGetMaxZ()
elseif EMC.HEAD == 'H12' then
if vtTp:getX() > 0.3 and vtT:getX() > 0.3 then
if bBSameSign and abs( EMC.R1 - EMC.R1p) < 165 then
EMC.MAXZ = MaxZ1 - EgtIf( abs( EMC.R2) < 90.1 and abs( EMC.R2p) < 90.1, 0, 130)
EMC.MAXZ = MaxZ1Blade - EgtIf( abs( EMC.R2) < 90.1 and abs( EMC.R2p) < 90.1, 0, 130)
elseif vtTp:getZ() > 0.707 or vtT:getZ() > 0.707 then
EMC.MAXZ = ParkZ1 + 200
else
EMC.MAXZ = ParkZ1 + 1
end
elseif bBSameSign and EMC.R1p > 29.9 and EMC.R1p < 180.1 and EMC.R1 > 29.9 and EMC.R1 < 180.1 and EMC.R2p > -10 and EMC.R2 > -10 then
EMC.MAXZ = MaxZ1 - EgtIf( abs( EMC.R2) < 90.1 and abs( EMC.R2p) < 90.1, 0, 130)
EMC.MAXZ = MaxZ1Blade - EgtIf( abs( EMC.R2) < 90.1 and abs( EMC.R2p) < 90.1, 0, 130)
elseif bBSameSign and EMC.R1p > -0.1 and EMC.R1p < 180.1 and EMC.R1 > -0.1 and EMC.R1 < 180.1 and EMC.R2p > -10 and EMC.R2 > -10 then
local vMZ = {{ Tz=0.85, Ez=440}, { Tz=0.5, Ez=200}, { Tz=-0.01, Ez=5}, { Tz=-0.5, Ez=1}}
EMC.MAXZ = ParkZ1 + CalcExtraZ( vtTpZm, vtT, vMZ)
@@ -88,14 +89,14 @@ function OnSpecialGetMaxZ()
elseif EMC.HEAD == 'H16' then
if vtTp:getX() > 0.3 and vtT:getX() > 0.3 then
if bBSameSign and abs( EMC.R1 - EMC.R1p) < 165 then
EMC.MAXZ = MaxZ1 - EgtIf( abs( EMC.R2) < 90.1 and abs( EMC.R2p) < 90.1, 0, 130)
EMC.MAXZ = MaxZ1Blade - EgtIf( abs( EMC.R2) < 90.1 and abs( EMC.R2p) < 90.1, 0, 130)
elseif vtTp:getZ() > 0.707 or vtT:getZ() > 0.707 then
EMC.MAXZ = ParkZ1 + 200
else
EMC.MAXZ = ParkZ1 + 1
end
elseif bBSameSign and EMC.R1p > 29.9 and EMC.R1p < 180.1 and EMC.R1 > 29.9 and EMC.R1 < 180.1 and EMC.R2p > -10 and EMC.R2 > -10 then
EMC.MAXZ = MaxZ1 - EgtIf( abs( EMC.R2) < 90.1 and abs( EMC.R2p) < 90.1, 0, 130)
EMC.MAXZ = MaxZ1Blade - EgtIf( abs( EMC.R2) < 90.1 and abs( EMC.R2p) < 90.1, 0, 130)
elseif bBSameSign and EMC.R1p > -0.1 and EMC.R1p < 180.1 and EMC.R1 > -0.1 and EMC.R1 < 180.1 and EMC.R2p > -10 and EMC.R2 > -10 then
local vMZ = {{ Tz=0.85, Ez=440}, { Tz=0.5, Ez=200}, { Tz=-0.01, Ez=5}, { Tz=-0.5, Ez=1}}
EMC.MAXZ = ParkZ1 + CalcExtraZ( vtTpZm, vtT, vMZ)
@@ -115,9 +116,9 @@ end
---------------------- OnSpecialMoveZup -----------------------------
function OnSpecialMoveZup()
--EgtOutLog( 'OnSpecialMoveZup : ' .. EMC.HEAD .. '.' .. tostring( EMC.EXIT))
-- Inizializzazioni
EMC.ERR = 0
EMC.MODIF = false
@@ -131,7 +132,7 @@ function OnSpecialMoveZup()
-- se fresa su testa1 o testa 2
if EMC.HEAD == 'H11' or EMC.HEAD == 'H14' or EMC.HEAD == 'H21' or EMC.HEAD == 'H22' then
if EMC.HEAD == 'H11' or EMC.HEAD == 'H21' or EMC.HEAD == 'H22' then
;
-- se lama
else
@@ -251,6 +252,22 @@ local function GetNextStartOrRestPhase( nPhase)
return nNextPhase
end
---------------------------------------------------------------------
local function IsFirstMachiningOfStart( nMchId)
-- se non è fase inizio di pezzo, ritorno risultato negativo
if not IsStartOrRestPhase( EMC.PHASE) then
return false
end
-- recupero la precedente operazione attiva
local nPrevOperId = EgtGetPrevActiveOperation( nMchId)
-- se non esiste o non è una disposizione, ritorno risultato negativo
if not nPrevOperId or EgtGetOperationType( nPrevOperId) ~= MCH_OY.DISP then
return false
end
-- è la prima
return true
end
---------------------------------------------------------------------
local function UpdateMinJoin()
MinJoin = BD.GetMinJoin( EMC.SB, EMC.HB, EMC.LB)
@@ -486,7 +503,7 @@ end
---------------------------------------------------------------------
function OnPostApplyMachining()
EgtOutLog( ' Lavorazione : ' .. EgtGetName( EMC.MCHID), 1)
EgtOutLog( ' Lavorazione : ' .. EgtGetName( EMC.MCHID) .. ' (' .. tostring( EMC.MCHID) .. ')')
-- Inizializzo codice di errore
EMC.ERR = 0
@@ -667,6 +684,7 @@ function SpecApplyPath( bPreSplit, bSplitting, bPreCut, bCutting, bUnload)
EMC.SB = b3Tot:getDimY()
EMC.HB = b3Tot:getDimZ()
EMC.LT = b3Raw:getDimX()
EgtOutLog( ' BarLen='..EgtNumToString( EMC.LB, 1), 3)
-- Aggiorno limiti di presa
UpdateMinJoin()
@@ -746,6 +764,7 @@ function SpecApplyPath( bPreSplit, bSplitting, bPreCut, bCutting, bUnload)
-- Altrimenti, non muovo i carrelli rispetto alla trave ma impongo la posizione dei rulli
else
SpecOutputCNT()
local vCmd = {}
table.insert( vCmd, { 21, EgtIf( EMC.Y1DELTA, EMC.Y1DELTA, 0), EgtIf( EMC.Y2DELTA, EMC.Y2DELTA, 0)})
table.insert( vCmd, { 22, dRollBack, -dRollFront})
@@ -779,7 +798,7 @@ function SpecApplyPath( bPreSplit, bSplitting, bPreCut, bCutting, bUnload)
return false
end
-- eseguo la separazione
EgtOutLog( 'MaxLenLeft=' .. EgtNumToString( dMaxLenLeft, 1))
EgtOutLog( 'MaxLenLeft=' .. EgtNumToString( dMaxLenLeft, 1), 1)
vCmd = SpecCalcSplit( b3Raw:getDimX(), dMaxLenLeft)
end
-- Se taglio finale di grezzo a perdere
@@ -846,27 +865,37 @@ function SpecialCalcMachiningEncumbrance( nMchId, bPreCut)
for i = 1, #vAxMin do
vAxMid[i] = ( vAxMin[i] + vAxMax[i]) / 2
end
-- recupero il gruppo
local nSetHead = GetHeadSet( sHead)
-- Calcolo dell'ingombro della testa rispetto allo Zero Macchina (assi rotanti fissi, C=4, B=5, A=6)
local b3Enc
if sHead ~= 'H21' and sHead ~= 'H22' then
if nSetHead == 1 then
EgtSetAxisPos( 'C1', vAxMid[4])
EgtSetAxisPos( 'B1', vAxMid[5])
if sHead == 'H13' then
EgtSetAxisPos( 'A1', vAxMid[6])
end
b3Enc = EgtGetBBoxGlob( EgtGetAxisId( 'C1'), GDB_BB.ONLY_VISIBLE)
else
elseif nSetHead == 2 then
EgtSetAxisPos( 'C2', vAxMid[4])
EgtSetAxisPos( 'B2', vAxMid[5])
if sHead == 'H22' then
EgtSetAxisPos( 'A2', vAxMid[6])
end
b3Enc = EgtGetBBoxGlob( EgtGetAxisId( 'C2'), GDB_BB.ONLY_VISIBLE)
else -- 'H31'
EgtSetAxisPos( 'C3', vAxMid[4])
EgtSetAxisPos( 'B3', vAxMid[5])
b3Enc = EgtGetBBoxGlob( EgtGetAxisId( 'C3'), GDB_BB.ONLY_VISIBLE)
end
local dMinFrontEng = EgtIf( sHead ~= 'H21' and sHead ~= 'H22', MIN_ENG_RACK_V, EgtIf( vAxMax[3] < MIN_Z2_FOR_ENG_XZ2_V, MIN_ENG_V, MIN_ENG_XZ2_V))
local dRollFront = max( b3Enc:getMax():getX(), dMinFrontEng) + SIC_V
local dMinBackEng = EgtIf( sHead ~= 'H21' and sHead ~= 'H22', MIN_ENG_V, EgtIf( vAxMax[3] < MIN_Z2_FOR_ENG_XZ2_V, MIN_ENG_V, MIN_ENG_XZ2_V))
local dRollBack = max( -b3Enc:getMin():getX(), dMinBackEng) + SIC_V
-- Forzo la distanza di sicurezza da utensile
local nSecRollerDist = EgtGetValInNotes( EgtTdbGetCurrToolParam( MCH_TP.USERNOTES), 'SECDIST', 'i') or SIC_V
local dMinFrontEng = EgtIf( nSetHead ~= 2, MIN_ENG_RACK_V, EgtIf( vAxMax[3] < MIN_Z2_FOR_ENG_XZ2_V, MIN_ENG_V, MIN_ENG_XZ2_V))
local dRollFront = max( b3Enc:getMax():getX(), dMinFrontEng) + nSecRollerDist
local dMinBackEng = EgtIf( nSetHead ~= 2, MIN_ENG_V, EgtIf( vAxMax[3] < MIN_Z2_FOR_ENG_XZ2_V, MIN_ENG_V, MIN_ENG_XZ2_V))
local dRollBack = max( -b3Enc:getMin():getX(), dMinBackEng) + nSecRollerDist
EgtOutLog( ' RollFront = ' .. EgtNumToString( dRollFront, 1) .. ' RollBack = ' .. EgtNumToString( dRollBack, 1), 3)
-- Calcolo della posizione della Punta Utensile rispetto allo Zero Macchina
local ptTip
@@ -1052,8 +1081,8 @@ function SpecCalcCarriages( dDistFront, dDistBack, dRollFront, dRollBack, dY1Del
return {}
end
-- al carico si deve ignorare l'ingombro delle lavorazioni di testa per il pinzaggio
if EMC.LOAD then EMC.HCING = 0 end
-- al carico o con prima lavorazione di un pezzo si deve ignorare l'ingombro delle lavorazioni di testa per il pinzaggio
if EMC.LOAD or IsFirstMachiningOfStart( EMC.MCHID) then EMC.HCING = 0 end
return SpecAdjustCarriages( WorkTab)
@@ -1255,21 +1284,30 @@ end
---------------------------------------------------------------------
local function ChangedTool( nMchId)
local bChanged = false
local nChanged = 0
-- Salvo lavorazione e utensile correnti, per ripristinarli alla fine
local nOrigMchId = EgtGetCurrMachining()
local sOrigTool = EgtTdbGetCurrToolParam( MCH_TP.NAME)
local sOrigBlockedAx = EgtGetMachiningParam( MCH_MP.BLOCKEDAXIS)
-- Recupero l'utensile della lavorazione precedente
local nPrevMchId = EgtGetPrevActiveOperation( nMchId or GDB_ID.NULL)
if nPrevMchId and EgtGetOperationType( nPrevMchId) ~= MCH_OY.DISP then
EgtSetCurrMachining( nPrevMchId)
local sTool = EgtGetMachiningParam( MCH_MP.TOOL)
bChanged = ( sTool ~= sOrigTool)
nChanged = EgtIf( sTool ~= sOrigTool, 1 , 0)
local sBlockedAx = EgtGetMachiningParam( MCH_MP.BLOCKEDAXIS)
-- se stesso utensile, ma modo caricamento diverso, è come se fosse un cambio utensile. Vale solo se aggregato su lama da sotto.
if sTool == sOrigTool then
local sHead = EgtTdbGetCurrToolParam( MCH_TP.HEAD)
if sHead == 'H22' and sOrigBlockedAx ~= sBlockedAx then
nChanged = 2
end
end
end
-- Ripristino lavorazione e utensile correnti
if nOrigMchId then EgtSetCurrMachining( nOrigMchId) end
if sOrigTool then EgtTdbSetCurrTool( sOrigTool) end
return bChanged
return nChanged
end
--------------------------------------------------------------------------------------------------------
@@ -1278,9 +1316,9 @@ end
function SpecAdjustCarriages( WorkTab)
--EgtOutLog( ' --->>> CNT=' .. EgtIf( EMC.CNT, '1', '_'))
local bChangedTool = ChangedTool( EMC.MCHID)
-- Aggiorno la posizione dei rulli per eventuale cambio utensile
if ChangedTool( EMC.MCHID) then
if bChangedTool ~= 0 then
WorkTab.dV1PosI = ParkV1
WorkTab.dV2PosI = ParkV2
end
@@ -1289,15 +1327,24 @@ function SpecAdjustCarriages( WorkTab)
if WorkTab.dY1DeltaI then
local dY1DeltaLim = MinJoin + WorkTab.dV1PosI - WorkTab.dV2PosI + 2 * AGG_V + EMC.HCING + EMC.HOVM + EgtIf( EMC.CNT == 1, AggLoad, 0)
if WorkTab.dY1DeltaI <= dY1DeltaLim or ( WorkTab.dY1DeltaMaxF and WorkTab.dY1DeltaMaxF <= dY1DeltaLim) then
bCloseV = true
bCloseV = true
end
end
if WorkTab.dY2DeltaI then
local dY2DeltaLim = MinJoin + WorkTab.dV1PosI - WorkTab.dV2PosI + 2 * AGG_V
if EMC.LB - WorkTab.dY2DeltaI <= dY2DeltaLim or ( WorkTab.dY2DeltaMinF and EMC.LB - WorkTab.dY2DeltaMinF <= dY2DeltaLim) then
bCloseV = true
bCloseV = true
end
end
-- se ho cambiato modo di prendere utensile, forzo chiusura
if bChangedTool == 2 then
bCloseV = true
end
-- se i pezzi del cliente sono molto storti, si forza la chiusura per evitare che vada a sbattere. Se parametro non presente, si chiude solo se necessario
if ForceToCloseRollersGate then
bCloseV = true
end
WorkTab.bCloseV = bCloseV
-- |POSIZIONO Y1| **[A]**
@@ -1614,7 +1661,7 @@ local function PosY1FromY2B( TabI, vCmd)
end
-- questo movimento serve solo a gestire (in modo complesso) il caso [ri]
MaxDispl( TabI, vCmd, 'M4')
else
else
-- **[rp]** = raggiungo il punto medio Y1New dell'intervallo
EmitComment( vCmd, '[Y1B-rp] ')
if not SpecTestSomeMoveInCmds( vCmd) and not EMC.Y2DELTA then
@@ -1715,7 +1762,7 @@ local function PosY1Y2A( TabI, vCmd)
PosY1FromY2A( TabI, vCmd)
bXW = false
end
else
else
-- in **accentramento**
-- sempre se intervallo per Y2 raggiungibile in una sola fase
if ( TabI.dTPosI + TabI.dY2DeltaMinF) - TabI.MaxY2V2 < TabI.dY1PosI - TabI.MyMinY1V1 then
@@ -1810,7 +1857,7 @@ local function PosY1Y2B( TabI, vCmd)
end
end
nCnt = nCnt + 1
if nCnt > 5 then return end
if nCnt > 10 then return end
until ( not bXW)
-- chiusura/parcheggio dei trascinatori in funzioni chiamanti
local dY1Delta = TabI.dY1PosI - TabI.dTPosI
@@ -1874,7 +1921,6 @@ local function PosY2Y1A( TabI, vCmd)
MaxDispl( TabI, vCmd, 'M1')
end
end
until ( not bXW)
-- chiusura/parcheggio dei trascinatori in funzioni chiamanti
local dY1Delta = TabI.dY1PosI - TabI.dTPosI
@@ -1949,7 +1995,7 @@ local function PosY2Y1B( TabI, vCmd)
end
end
nCnt = nCnt + 1
if nCnt > 5 then return end
if nCnt > 10 then return end
until ( not bXW)
-- la chiusura delle morse è fatta sopra
local dY1Delta = TabI.dY1PosI - TabI.dTPosI
@@ -2117,8 +2163,8 @@ function SpecAdjustCarrB1( WorkTab)
if not SpecTestSomeMoveInCmds( vCmd) then
table.insert( vCmd, { 3, 'Y1', dY1PosI, 'Y2', dY2PosI, 'T', WorkTab.dTPosI, EMC.CNT})
end
table.insert( vCmd, { 11, 1}) -- chiudo Y1
table.insert( vCmd, { 12, 1}) -- Chiudo Y2
table.insert( vCmd, { 11, 1}) -- chiudo Y1
-- imposto i nuovi parametri di aggancio
table.insert( vCmd, { 21, dY1DeltaF, dY2DeltaF})
EgtOutLog( ' Y1DeltaF=' .. EgtNumToString( dY1DeltaF) .. ' Y2DeltaF=' .. EgtNumToString( dY2DeltaF), 1)
@@ -2189,8 +2235,8 @@ function SpecAdjustCarrB2( WorkTab)
if not SpecTestSomeMoveInCmds( vCmd) then
table.insert( vCmd, { 3, 'Y1', dY1PosI, 'Y2', dY2PosI, 'T', WorkTab.dTPosI, EMC.CNT})
end
table.insert( vCmd, { 11, 1}) -- chiudo Y1
table.insert( vCmd, { 12, 1}) -- Chiudo Y2
table.insert( vCmd, { 11, 1}) -- chiudo Y1
-- imposto i nuovi parametri di aggancio
table.insert( vCmd, { 21, dY1DeltaF, dY2DeltaF})
EgtOutLog( ' Y1DeltaF=' .. EgtNumToString( dY1DeltaF) .. ' Y2DeltaF=' .. EgtNumToString( dY2DeltaF), 1)
@@ -2250,7 +2296,7 @@ function SpecAdjustCarrC( WorkTab)
WorkTab.dY1DeltaMaxF = EMC.LB - ( MinJoin + MyTCING)
-- se Y1 deve accentrarsi
if WorkTab.dY1DeltaI > WorkTab.dY1DeltaMaxF then
WorkTab.dY1DeltaMinF = EMC.LB - 2 * MinJoin + MyTCING
WorkTab.dY1DeltaMinF = EMC.LB - 2 * MinJoin - MyTCING
end
end
-- posizioni obiettivo dei carrelli al centro dei rispettivi intervalli di validità
+36
View File
@@ -0,0 +1,36 @@
REM Compilazione degli script macchina Egaltech 2024.02.22
REM Per togliere info di debug aggiungere flag -s prima del nome del file di input
REM Compilazione 32 bit e copia file da non compilare
@echo off
REM chiedo all'utente la versione da assegnare alla macchina da compilare
set /p "machineVersion=Inserisci versione: "
REM variabili per costruire i percorsi delle cartelle
set "machineName=Essetre-PF1250MAX"
set "deployFolder=C:\MachinesDeploy"
set "machinePath=%deployFolder%\%machineName%\"
set "fullPathSource=%deployFolder%\%machineName%\%machineVersion%\%machineName%"
set "fullPathZip=%deployFolder%\%machineName%\%machineVersion%"
REM elimino eventuale cartella esistente
rmdir /s /Q %fullPathZip%
REM copio i sorgenti nel percorso di destinazione
ROBOCOPY . %fullPathSource%\ /E /XF "Compile.bat" /XF ".gitignore" /XD ".git" /XF "UpdateLog.txt"
REM copio i sorgenti nel percorso temporaneo per i compilati
ROBOCOPY . %fullPathSource%\bin\%machineName%\ /E /XF "Compile.bat" /XF ".gitignore" /XD ".git" /XF "UpdateLog.txt" /XD ".vscode"
REM copio i file compilati nel percorso temporaneo per i compilati
\EgtProg\Dll32\luac54 -o %fullPathSource%\bin\%machineName%\Common-PF1250.mlpe -s Common-PF1250.mlpe
\EgtProg\Dll32\luac54 -o %fullPathSource%\bin\%machineName%\Common-PF1250.mlse -s Common-PF1250.mlse
\EgtProg\Dll32\luac54 -o %fullPathSource%\bin\%machineName%\Common-PF1250.TPA.mlpe -s Common-PF1250.TPA.mlpe
REM comprimo i file compilati in uno zip pronto per essere distribuito
tar.exe acvf %fullPathZip%\%machineName%.zip -C %fullPathSource%\bin\ %machineName%\*.*
REM elimino il percorso temporaneo
rmdir /s /Q %fullPathSource%\bin\
Binary file not shown.
-4
View File
@@ -20,8 +20,6 @@ H11.1=Standard.nge
H11.1:MILL_NOTIP=MillNoTip.nge
H12.1=Saw.nge
H13.1=ChainSaw.nge
H14.1=Standard.nge
H14.1:MILL_NOTIP=MillNoTip.nge
H16.1=Saw.nge
H21.1=Standard.nge
H21.1:MILL_NOTIP=MillNoTip.nge
@@ -53,8 +51,6 @@ H11=6608
H12=6615
; Chainsaw
H13=6616
; 5 axis head
H14=6608
; 5 axis second saw
H16=6623
; Second 5 axis bottom head
+187 -78
View File
@@ -1,18 +1,70 @@
-- Descrizione macchina Essetre-PF1250MAX by EgalWare s.r.l. 2023/12/07
-- Descrizione macchina Essetre-PF1250MAX by EgalWare s.r.l. 2024/03/28
-- 2023/12/07 ver 2.5l1 Prima versione. Derivata da PF1250 ver 2.5l4
-- 2023/12/15 ver 2.5l2 Corretti vari offset in simulazione
-- 2023/12/18 ver 2.5l3 Ultimata gestione aggregato lama da sotto
-- Spostato alcune funzioni proprie del C.U. nel MLDE (per post-proc common)
-- Spostato magazzini sotto traversa ( di 200mm) come da modifica meccanica
-- 2023/12/20 ver 2.6a1 Prima versione con post Common-PF1250
-- Invertiti magazzini mortasatrice-truciolatore e adeguati solidi di collisione
-- Abbassata testa 2 di 300mm
-- Parcheggio motosega portato a -1700mm
-- In BeamData aggiunta GetSawBlockedAxis per fissare asse bloccato per aggregato lama sotto.
-- Costanti MinForzaPinze e MaxForzaPinze portati in mlde/Ts3data (erano hardcoded - Common)
-- Aggiunto variabile 'WriteAllCoordsOnFirstM101' e allineamento con 2.6a1 common
-- 2023/12/20 ver 2.6a2 Allineamento con Common-PF1250 v.2.6a2
-- 2024/01/22 ver 2.6a3 Migliorata preselezione utensile
-- Rimosse funzioni ribaltamento pezzo
-- Allineamento con Common-PF1250 v.2.6a3
-- In BeamData aggiunta la funzione GetBlockedAxis che sostituisce le altre (GetChainSawBlockedAxis e GetSawBlockedAxis)
-- 2024/01/25 ver 2.6a4 Allineamento con Common 2.6a4
-- 2024/02/09 ver 2.6b1 Corretto errore in definizione testa H22
-- In BeamData migliorata funzione GetBlockedAxis
-- 2024/02/12 ver 2.6b2 Allineamento con common 2.6b2
-- 2024/02/20 ver 2.6b3 Allineamento con common 2.6b3
-- 2024/02/26 ver 2.6b4 Allineamento con common ver. 2.6b4; in mlde aggiunte chiamate EgtAddToPackagePath
-- 2024/02/29 ver 2.6c1 Allineamento con common ver. 2.6c1
-- 2024/03/04 ver 2.6c2 Modificato log con nome macchina
-- Allineamento con common ver. 2.6c2
-- 2024/03/05 ver 2.6c3 Corretto portautensile Standard_LC_108.
-- 2024/03/12 ver 2.6c4 Allineamento con common ver. 2.6c3
-- 2024/03/14 ver 2.6c5 Allineamento con common ver. 2.6c4
-- Aggiunto nuovo tipo di lavorazione: Predrill
-- 2024/03/14 ver 2.6c6 Predrill: aggiunta lavorazione tipo 'Predrill_H2' per testa sotto
-- 2024/03/26 ver 2.6c7 Aggiunto variabile 'ParkLongB1' posizione parcheggio per punte lunghe
-- Modificate collisioni traversa. Ora non comprende carro X1 che ha il proprio
-- Allineamento con common ver. 2.6c5
-- 2024/03/26 ver 2.6c8 Aggiunta lettura nuovi parametri offset per lama su aggregato testa sotto
-- 2024/03/28 ver 2.6c9 Correzioni per pezzi lunghi fino a 30 metri.
-- 2024/04/12 ver 2.6d1 Allineamento con common ver. 2.6d1
-- Aggiunto parametro ForceToCloseRollersGate
-- 2024/04/23 ver 2.6d2 Allineamento con common ver. 2.6d2
-- Aggiunta variabile MaxZ1Blade e relativa gestione
-- Aggiunto solido collisione in NGE
-- 2024/04/24 ver 2.6d3 Aggiunta simulazione macchina tipo "corsa corta" e "corsa lunga"
-- 2024/04/24 ver 2.6d4 In simulazione aggiunti solidi griglie vicino TC margherita con relativo controllo collisione
-- Intestazioni
require( 'EmtGenerator')
EgtEnableDebug( false)
PP_VER = '2.5l3'
PP_VER = '2.6d4'
MIN_MACH_VER = '2.5k1'
MACH_NAME = 'Essetre-PF1250MAX'
EgtOutLog ( '** Essetre-PF1500rl '..PP_VER..' (MinMach '.. MIN_MACH_VER ..') **', 1)
-- Carico i dati globali
local sMachDir = EgtGetCurrMachineDir()
-- Elimino direttori altre macchine e imposto direttorio macchina corrente per ricerca librerie
EgtRemoveBaseMachineDirFromPackagePath()
EgtAddToPackagePath( sMachDir .. '\\Beam\\?.lua')
EgtAddToPackagePath( sMachDir .. '\\?.lua')
INFO_STD_PP = require( 'Version')
-- prendo la versione kernel minima necessaria piu' nuova tra macchina e script comuni
if INFO_STD_PP.MIN_MACH_VER_PP_COMMON > MIN_MACH_VER then
MIN_MACH_VER = INFO_STD_PP.MIN_MACH_VER_PP_COMMON
end
EgtOutLog ( '** ' .. MACH_NAME..' '..PP_VER..' ** ( '..INFO_STD_PP.NAME..': '..INFO_STD_PP.VERSION..' - MinMach: '.. MIN_MACH_VER ..') **', 1)
-- Parametri macchina
NumericalControl = 'TPA' -- NUM o TPA
@@ -66,7 +118,8 @@ SawB2Offs = 0
MinX1 = 0
MaxX1 = 3300
MinZ1 = -1850
MaxZ1 = -100
MaxZ1 = -50
MaxZ1Blade = -100
MinC1 = -275
MaxC1 = 275
MinB1 = -127
@@ -75,18 +128,23 @@ MinB1b = -119
MaxB1b = 119
ParkX1 = 250
ParkTc2X1 = 3100
ParkZ1 = -535
ParkZ1 = -525
ParkC1 = -90
ParkB1 = -90
ParkCSawX1 = 1500
ParkCSawZ1 = -200
ParkCSawX1 = 1700
ParkCSawZ1 = -100
ParkCSaw0Z1 = -400
ParkCSawC1 = -90
ParkCSaw0C1 = 0
ParkCSawB1 = 0
LongTool = 400
MinLengthLongCSaw = 580 -- gestione speciale per motosega molto lunga. Lunghezza al di sopra della quale è considerata motosega lunga
ParkLongCSawZ1 = -50 -- gestione speciale per motosega molto lunga. Parcheggio asse Z
ParkLongCSawC1 = 0 -- gestione speciale per motosega molto lunga. Parcheggio asse C
ParkLongCSawB1 = -90 -- gestione speciale per motosega molto lunga. Parcheggio asse B
LongTool = 390
ParkLongTc1C1 = 0
ParkLongTc2C1 = -180
ParkLongB1 = 0
MinZ1ToChangeH2 = -1400
MinX2 = -2760
MaxX2 = 0
@@ -107,7 +165,7 @@ ParkSawX2 = MinX2
ParkSawZ2 = 0
ParkSaw0Z2 = 0
ParkSawC2 = -90
ParkSaw0C2 = 0
ParkSaw0C2 = -90
ParkSawB2 = 0
MinDistToolX1X2 = 40
TurnerOffs = 120.0
@@ -116,25 +174,30 @@ DeltaTabY = 2550
DeltaTabZ = -1428 + MillOffs -- per TPA : -1128.0 + MillOffs -- per NUM : -1258
DeltaRulliTraveZ = -1203
DimTabY = 1400
DimTabX = 24000
DimTabX = 34000
Delta2TabY = -1185.9
Delta2TabZ = 393 - Mill2Offs -- per TPA : 378.0 - Mill2Offs -- per NUM : 223
Delta2TabZ = 693 - Mill2Offs -- per TPA : 378.0 - Mill2Offs -- per NUM : 223
Head2X = 0
Head2Y = DeltaTabY - Delta2TabY
Head2Z = DeltaTabZ - Delta2TabZ
DefTcPos1 = 'T1'
DefTcPos2 = 'T300'
DefTcPos2 = 'T220'
CoeffVM = 0.5
MinForzaPinze = 400 -- [Kgf]
MaxForzaPinze = 1000 -- [Kgf]
Tc2Active = true -- magazzino prima sega a catena
SecondSaw = true -- seconda lama su aggregato su TC3 presente
SecondChain = true -- magazzino seconda sega a catena
TcSpecialTools = true -- magarzzino per utensili speciali. In genere truciolatore
TcAggreBladeUnder = true -- lama su aggregato per testa da sotto
EmitAccClamps = true
WriteAllCoordsOnFirstM101 = true
ForceToCloseRollersGate = false
-- Aggiornamento con dati da TechnoEssetre7
local sTs3Data = EgtGetStringFromIni( 'Beam', 'DATA_DIR', "C:\\TechnoEssetre7\\EgtData", EgtGetIniFile()).."\\Essetre-PF1250MAX.data"
local sDataBeam = EgtGetSourceDir().."\\Beam\\Ts3Data.lua"
local sDataWall = EgtGetSourceDir().."\\Wall\\Ts3Data.lua"
local sDataBeam = sMachDir.."\\Beam\\Ts3Data.lua"
local sDataWall = sMachDir.."\\Wall\\Ts3Data.lua"
if EgtExistsFile( sTs3Data) then
EgtCopyFile( sTs3Data, sDataBeam)
EgtCopyFile( sTs3Data, sDataWall)
@@ -149,8 +212,10 @@ if EgtExistsFile( sDataBeam) then
--NumericalControl = EgtIf( Machine.Offsets.TIPO_CN == 0, 'NUM', 'TPA')
if Machine.Offsets.X1_POS then MinX1 = -Machine.Offsets.X1_POS end
if Machine.Offsets.X1_NEG then MaxX1 = -Machine.Offsets.X1_NEG end
if Machine.Offsets.PARK_X1 then ParkX1 = Machine.Offsets.PARK_X1 end
if Machine.Offsets.Z1_NEG then MinZ1 = Machine.Offsets.Z1_NEG end
if Machine.Offsets.Z1_POS then MaxZ1 = min( MaxZ1, Machine.Offsets.Z1_POS) end
if Machine.Offsets.Z1_POS_LAMA then MaxZ1Blade = min( MaxZ1Blade, Machine.Offsets.Z1_POS_LAMA) end
if Machine.Offsets.PARK_Z1 then ParkZ1 = Machine.Offsets.PARK_Z1 end
if Machine.Offsets.C1_NEG then MinC1 = Machine.Offsets.C1_NEG end
if Machine.Offsets.C1_POS then MaxC1 = Machine.Offsets.C1_POS end
@@ -160,9 +225,11 @@ if EgtExistsFile( sDataBeam) then
if Machine.Offsets.B1_POS1 then MaxB1b = Machine.Offsets.B1_POS1 end
if Machine.Offsets.X2_NEG then MinX2 = Machine.Offsets.X2_NEG end
if Machine.Offsets.X2_POS then MaxX2 = Machine.Offsets.X2_POS end
if Machine.Offsets.PARK_X2 then ParkX2 = Machine.Offsets.PARK_X2 end
if Machine.Offsets.Z2_POS then MinZ2 = -Machine.Offsets.Z2_POS end
if Machine.Offsets.Z2_NEG then MaxZ2 = -Machine.Offsets.Z2_NEG end
if Machine.Offsets.PARK_Z2 then ParkZ2 = -Machine.Offsets.PARK_Z2 end
if Machine.Offsets.PARK_Z2_INLAV then ParkInLavZ2 = -Machine.Offsets.PARK_Z2_INLAV end
if Machine.Offsets.C2_NEG then MinC2 = Machine.Offsets.C2_NEG end
if Machine.Offsets.C2_POS then MaxC2 = Machine.Offsets.C2_POS end
if Machine.Offsets.B2_NEG then MinB2 = Machine.Offsets.B2_NEG end
@@ -183,10 +250,12 @@ if EgtExistsFile( sDataBeam) then
if Machine.Offsets.DIST_UNLOAD then UnloadT = Machine.Offsets.DIST_UNLOAD end
if Machine.Offsets.PIVOT_T1 then MillOffs = Machine.Offsets.PIVOT_T1 end
if Machine.Offsets.PIVOT_T2 then Mill2Offs = Machine.Offsets.PIVOT_T2 end
if Machine.Offsets.OFFSETCLAMAT1 then SawC1Offs = Machine.Offsets.OFFSETCLAMAT1 end
if Machine.Offsets.OFFSETBLAMAT1 then SawB1Offs = Machine.Offsets.OFFSETBLAMAT1 end
if Machine.Offsets.OFFSETCLAMAT2 then Saw2C1Offs = Machine.Offsets.OFFSETCLAMAT2 end
if Machine.Offsets.OFFSETBLAMAT2 then Saw2B1Offs = Machine.Offsets.OFFSETBLAMAT2 end
if Machine.Offsets.OFFSETCLAMAT1 then SawC1Offs= Machine.Offsets.OFFSETCLAMAT1 end
if Machine.Offsets.OFFSETBLAMAT1 then SawB1Offs= Machine.Offsets.OFFSETBLAMAT1 end
if Machine.Offsets.OFFSETCLAMAT2 then Saw2C1Offs= Machine.Offsets.OFFSETCLAMAT2 end
if Machine.Offsets.OFFSETBLAMAT2 then Saw2B1Offs= Machine.Offsets.OFFSETBLAMAT2 end
if Machine.Offsets.OFFSETCLAMAUNDER then SawUnderC2Offs= Machine.Offsets.OFFSETCLAMAUNDER end
if Machine.Offsets.OFFSETBLAMAUNDER then SawUnderB2Offs= Machine.Offsets.OFFSETBLAMAUNDER end
if Machine.Offsets.OFFSETXT1 then DeltaTabY = -Machine.Offsets.OFFSETXT1 end
if Machine.Offsets.OFFSETZT1 then DeltaTabZ = Machine.Offsets.OFFSETZT1 + MillOffs end
if Machine.Offsets.OFFSETXT2 then Delta2TabY = Machine.Offsets.OFFSETXT2 end
@@ -197,8 +266,13 @@ if EgtExistsFile( sDataBeam) then
if Machine.Offsets.SAWOFFSZ then SawOffsZ = Machine.Offsets.SAWOFFSZ end
if Machine.Offsets.SAW2OFFSX then Saw2OffsX = Machine.Offsets.SAW2OFFSX end
if Machine.Offsets.SAW2OFFSZ then Saw2OffsZ = Machine.Offsets.SAW2OFFSZ end
if Machine.Offsets.SAWUNDEROFFSY then SawUnderOffsY = Machine.Offsets.SAWUNDEROFFSY end
if Machine.Offsets.SAWUNDEROFFSZ then SawUnderOffsZ = Machine.Offsets.SAWUNDEROFFSZ end
if Machine.Offsets.DEFTCPOS1 then DefTcPos1 = ( 'T' .. Machine.Offsets.DEFTCPOS1) end
if Machine.Offsets.DEFTCPOS2 then DefTcPos2 = ( 'T' .. Machine.Offsets.DEFTCPOS2) end
if Machine.Offsets.MINPRESS then MinForzaPinze = Machine.Offsets.MINPRESS end
if Machine.Offsets.MAXPRESS then MaxForzaPinze = Machine.Offsets.MAXPRESS end
if Machine.Offsets.CHIUDI_PINZE_2_3_SCAMBIO then ForceToCloseRollersGate = Machine.Offsets.CHIUDI_PINZE_2_3_SCAMBIO == 1 end
-- aggiustamenti
MinY1 = MinV1 + MinDeltaYV
MaxY1 = MaxMchY1
@@ -209,6 +283,7 @@ if EgtExistsFile( sDataBeam) then
ParkV2 = MinV2
ParkY2 = ParkV2 - MinDeltaYV
UnloadSmT = UnloadT - 300
MaxZ1Blade = min( MaxZ1Blade, MaxZ1)
Head2Y = DeltaTabY - Delta2TabY
Head2Z = DeltaTabZ - Delta2TabZ
ParkCSawZ1 = min( ParkCSawZ1, MaxZ1)
@@ -225,9 +300,11 @@ EmtGeneral {
ExitMaxAdjust = 300,
ExitMaxRotAdj = 0.5,
AngDeltaMinForHome = 80,
Special = 'Essetre-PF1250.mlse',
Processor = 'Essetre-PF1250.mlpe'}
local sBaseAux = {'BASE/SOLID', 'BASE/CONVOYER', 'BASE/COLLISION', 'BASE/TC1', 'BASE/TCR', 'BASE/TC3'}
Special = 'Common-PF1250.mlse',
Processor = 'Common-PF1250.mlpe'}
-- in base alla corsa macchina, si carica la rulliera di carico/scarico appropriata
local sGeomConvoyer = EgtIf( MaxY1 > 6500, '_8M', '_5M')
local sBaseAux = {'BASE/SOLID', 'BASE/CONVOYER'..sGeomConvoyer, 'BASE/COLLISION', 'BASE/TC1', 'BASE/TCR', 'BASE/TC3'}
if Tc2Active then table.insert( sBaseAux, 5, 'BASE/TC2') end
if TcSpecialTools then table.insert( sBaseAux, 'BASE/TC4') end
if SecondChain then table.insert( sBaseAux, 'BASE/TC5') end
@@ -247,7 +324,7 @@ local X1Id = EmtAxis {
Home = ParkX1,
Invert = true,
Geo = 'X1_AXIS/GEO',
Aux = 'X1_AXIS/SOLID'}
Aux = {'X1_AXIS/SOLID', 'X1_AXIS/COLLISION'}}
-- *** Testa 1 ***
EmtAxis {
Name = 'Z1',
@@ -311,23 +388,6 @@ local H12Id = EmtHead {
Geo = 'H12_HEAD/GEO'}
EgtSetInfo( H12Id, 'ZEXTRA', '160,60')
EgtSetInfo( H12Id, 'ZMAXONROT', '1,190')
-- Utensili speciali
if TcSpecialTools then
local H14Id = EmtHead {
Name = 'H14',
Parent = 'B1',
HSet = 'H11',
Type = MCH_HT.STD,
Pos = Point3d(0,0,0),
TDir = Z_AX(),
ADir = -Y_AX(),
Rot1W = 0.2,
Rot2Stroke = { MinB1, MaxB1},
OthColl = {'B1/SOLID', 'C1/SOLID'},
Geo = 'H14_HEAD/GEO'}
EgtSetInfo( H14Id, 'ZEXTRA', '160,60')
EgtSetInfo( H14Id, 'ZMAXONROT', '1,190')
end
-- Lama 2
if SecondSaw then
local H16Id = EmtHead {
@@ -429,10 +489,10 @@ EmtAxis {
Home = 0,
Geo = 'A2_AXIS/GEO'}
local vtMoveZ2 = Vector3d( 0, 0, Head2Z + 1481.0)
local vtMoveZ2 = Vector3d( 0, 0, Head2Z + 1781.0)
EgtMove( EgtGetFirstNameInGroup( Z2Id, 'SOLID'), vtMoveZ2, GDB_RT.GLOB)
EgtMove( EgtGetFirstNameInGroup( Z2Id, 'COLLISION'), vtMoveZ2, GDB_RT.GLOB)
local vtMoveX2 = Vector3d( 0, Head2Y - 3735.9, Head2Z + 1481.0)
local vtMoveX2 = Vector3d( 0, Head2Y - 3735.9, Head2Z + 1781.0)
EgtMove( EgtGetFirstNameInGroup( X2Id, 'SOLID'), vtMoveX2, GDB_RT.GLOB)
EgtMove( EgtGetFirstNameInGroup( X2Id, 'COLLISION'), vtMoveX2, GDB_RT.GLOB)
EgtMove( EgtGetFirstNameInGroup( C2Id, 'SOLID'), vtMoveX2, GDB_RT.GLOB)
@@ -467,10 +527,8 @@ if TcAggreBladeUnder then
Rot2Stroke = { MinB2b, MaxB2b},
OthColl = {'B2/SOLID', 'C2/SOLID'},
Geo = 'H22_HEAD/GEO'}
EgtSetInfo( H21Id, 'ABOVE', '0')
EgtSetInfo( H21Id, 'ZHOMEDOWN', '1')
EgtSetInfo( H22Id, 'ZEXTRA', '160,60')
EgtSetInfo( H22Id, 'ZMAXONROT', '1,190')
EgtSetInfo( H22Id, 'ABOVE', '0')
EgtSetInfo( H22Id, 'ZHOMEDOWN', '1')
end
-- *** Carrelli ***
-- Morse
@@ -583,7 +641,7 @@ EmtAxis {
Type = MCH_AT.LINEAR,
Dir = - X_AX(),
Pos = Point3d(0.0,2450.0,-958.0),
Stroke = {-20000, 20000},
Stroke = {-40000, 5000},
Home = LoadT,
Geo = 'T_AXIS/GEO'}
EmtTable {
@@ -762,7 +820,7 @@ if Tc2Active then
ADir = X_AX(),
Geo = 'BASE/T30'}
end
local ptTc3 = Point3d( 680, 529, -200.8 + ( DeltaTabZ - DeltaRulliTraveZ + 55))
local ptTc3 = Point3d( 600, 529, -200.8 + ( DeltaTabZ - DeltaRulliTraveZ + 55))
EmtTcPos {
Name = 'T101',
Parent = 'Base',
@@ -770,22 +828,22 @@ EmtTcPos {
TDir = -X_AX(),
ADir = Z_AX(),
Geo = 'BASE/T101'}
local ptTc4 = Point3d( 650, 909, -115 + ( DeltaTabZ - DeltaRulliTraveZ + 55))
EmtTcPos {
Name = 'T121',
Parent = 'Base',
Pos = ptTc4,
TDir = Z_AX(),
ADir = X_AX(),
Geo = 'BASE/T121'}
local ptTc5 = Point3d( 650, 1249, -200.8 + ( DeltaTabZ - DeltaRulliTraveZ + 55))
local ptTc4 = Point3d( 750, 909, -200.8 + ( DeltaTabZ - DeltaRulliTraveZ + 55))
EmtTcPos {
Name = 'T111',
Parent = 'Base',
Pos = ptTc5,
Pos = ptTc4,
TDir = -X_AX(),
ADir = Z_AX(),
Geo = 'BASE/T111'}
local ptTc5 = Point3d( 750, 1309, -115 + ( DeltaTabZ - DeltaRulliTraveZ + 55))
EmtTcPos {
Name = 'T121',
Parent = 'Base',
Pos = ptTc5,
TDir = Z_AX(),
ADir = X_AX(),
Geo = 'BASE/T121'}
local ptTcS = Point3d( -1, -22.3, -1723 + ( DeltaTabZ - DeltaRulliTraveZ + 55))
EmtTcPos {
Name = 'T201',
@@ -881,13 +939,14 @@ EgtMove( EgtGetFirstNameInGroup( BaseId, 'SIGN') or GDB_ID.NULL, vtMovB, GDB_RT.
EgtMove( EgtGetFirstNameInGroup( BaseId, 'TC1') or GDB_ID.NULL, vtMovB, GDB_RT.GLOB)
EgtMove( EgtGetFirstNameInGroup( BaseId, 'TC2') or GDB_ID.NULL, vtMovB, GDB_RT.GLOB)
EgtMove( EgtGetFirstNameInGroup( BaseId, 'TC3') or GDB_ID.NULL, vtMovB, GDB_RT.GLOB)
EgtMove( EgtGetFirstNameInGroup( BaseId, 'TC4') or GDB_ID.NULL, vtMovB, GDB_RT.GLOB)
EgtMove( EgtGetFirstNameInGroup( BaseId, 'TC5') or GDB_ID.NULL, vtMovB, GDB_RT.GLOB)
if TcSpecialTools then EgtMove( EgtGetFirstNameInGroup( BaseId, 'TC4') or GDB_ID.NULL, vtMovB, GDB_RT.GLOB) end
if SecondChain then EgtMove( EgtGetFirstNameInGroup( BaseId, 'TC5') or GDB_ID.NULL, vtMovB, GDB_RT.GLOB) end
EgtMove( EgtGetFirstNameInGroup( BaseId, 'TCR') or GDB_ID.NULL, vtMovB, GDB_RT.GLOB)
EgtMove( EgtGetFirstNameInGroup( BaseId, 'TCS') or GDB_ID.NULL, vtMovB, GDB_RT.GLOB)
if TcSpecialTools then EgtMove( EgtGetFirstNameInGroup( BaseId, 'TCS') or GDB_ID.NULL, vtMovB, GDB_RT.GLOB) end
EgtMove( EgtGetFirstNameInGroup( X1Id, 'SOLID'), vtMovB, GDB_RT.GLOB)
EgtMove( EgtGetFirstNameInGroup( X1Id, 'COLLISION'), vtMovB, GDB_RT.GLOB)
local vtMove = Vector3d( 0, ( DeltaTabY - 2550.0), ( DeltaTabZ + 1258.0))
EgtMove( EgtGetFirstNameInGroup( BaseId, 'CONVOYER'), vtMove, GDB_RT.GLOB)
EgtMove( EgtGetFirstNameInGroup( BaseId, 'CONVOYER'..sGeomConvoyer), vtMove, GDB_RT.GLOB)
EgtMove( EgtGetFirstNameInGroup( Y1Id, 'SOLID'), vtMove, GDB_RT.GLOB)
EgtMove( EgtGetFirstNameInGroup( PY1Id, 'SOLID'), vtMove, GDB_RT.GLOB)
EgtMove( EgtGetFirstNameInGroup( Y2Id, 'SOLID'), vtMove, GDB_RT.GLOB)
@@ -900,6 +959,8 @@ EgtMove( EgtGetFirstNameInGroup( V2Id, 'SOLID'), vtMove, GDB_RT.GLOB)
EgtMove( EgtGetFirstNameInGroup( V2Id, 'COLLISION'), vtMove, GDB_RT.GLOB)
EgtMove( EgtGetFirstNameInGroup( PV2Id, 'SOLID'), vtMove, GDB_RT.GLOB)
EgtMove( EgtGetFirstNameInGroup( QV2Id, 'SOLID'), vtMove, GDB_RT.GLOB)
local vtMoveColl = Vector3d( 0, 0, MaxZ1Blade)
EgtMove( EgtGetFirstNameInGroup( EgtGetFirstNameInGroup( BaseId, 'COLLISION'), 'CEIL'), vtMoveColl, GDB_RT.GLOB)
-- Assegno identificativi alle spie delle morse
PY1LightId = EgtGetFirstNameInGroup( EgtGetFirstNameInGroup( Y1Id, 'SOLID') or GDB_ID.NULL, 'Light')
@@ -913,13 +974,14 @@ PY2LightId = EgtGetFirstNameInGroup( EgtGetFirstNameInGroup( Y2Id, 'SOLID') or G
---------------------------------------------------------------------
function OnSetHead()
-- se testa H11 (fresa)
if EMC.HEAD == 'H11' or EMC.HEAD == 'H14' then
if EMC.HEAD == 'H11' then
local nTc = GetTcForTopHeadTool( EMC.TCPOS)
if nTc ~= 2 then
EmtModifyAxisHome( 'X1', ParkX1)
else
EmtModifyAxisHome( 'X1', ParkTc2X1)
end
EmtModifyAxisStroke( 'Z1', {MinZ1, MaxZ1})
if EMC.TOTLEN < LongTool then
EmtModifyAxisHome( 'Z1', ParkZ1)
EmtModifyAxisStroke( 'C1', {MinC1, MaxC1})
@@ -934,13 +996,14 @@ function OnSetHead()
EmtModifyAxisStroke( 'C1', { ParkLongTc2C1 - 20, ParkLongTc2C1 + 20})
EmtModifyAxisHome( 'C1', ParkLongTc2C1)
end
EmtModifyAxisHome( 'B1', ParkB1)
EmtModifyAxisHome( 'B1', ParkLongB1)
end
EmtModifyAxisDirection( 'B1', X_AX())
-- se testa H12 (lama)
elseif EMC.HEAD == 'H12' then
EmtModifyAxisHome( 'X1', ParkX1)
EmtModifyAxisHome( 'Z1', ParkZ1)
EmtModifyAxisStroke( 'Z1', {MinZ1, MaxZ1Blade})
EmtModifyAxisStroke( 'C1', {MinC1, MaxC1})
EmtModifyAxisHome( 'C1', ParkC1)
EmtModifyAxisHome( 'B1', ParkB1)
@@ -949,15 +1012,12 @@ function OnSetHead()
elseif EMC.HEAD == 'H13' then
-- aggiustamenti per distanza
local dDist = EgtIf( EMC.DIST and abs( EMC.DIST) > 1, EMC.DIST, ChSawLen)
EmtModifyExitPosition( EMC.HEAD, EMC.EXIT, Point3d( 0, 0, -dDist))
local vtMove = Point3d( 0, 0, -dDist) - Point3d( EMC.EXITPOS)
local ExitId = EgtGetFirstNameInGroup( EgtGetHeadId( EMC.HEAD), 'T'..tostring( EMC.EXIT))
EgtMove( ExitId, vtMove)
-- recupero valore asse A bloccato
local sVal = EgtGetMachiningParam( MCH_MP.BLOCKEDAXIS)
CSawPosA = tonumber( sVal:sub( 4) or '')
EmtModifyExitPosition( EMC.HEAD, EMC.EXIT or 1, Point3d( 0, 0, -dDist))
-- recupero il valore dell'asse virtuale bloccato A
local CSawPosA = GetCurrChainSawingVirtualAxis()
EmtModifyAxisHome( 'X1', ParkCSawX1)
EmtModifyAxisHome( 'Z1', GetChainSawZHomeFromVirtualAxis( CSawPosA))
EmtModifyAxisStroke( 'Z1', {MinZ1, MaxZ1})
EmtModifyAxisStroke( 'C1', {MinC1, MaxC1})
EmtModifyAxisHome( 'C1', GetChainSawCHomeFromVirtualAxis( CSawPosA))
EmtModifyAxisHome( 'B1', ParkCSawB1)
@@ -966,10 +1026,22 @@ function OnSetHead()
elseif EMC.HEAD == 'H16' then
EmtModifyAxisHome( 'X1', ParkTc2X1)
EmtModifyAxisHome( 'Z1', ParkZ1)
EmtModifyAxisStroke( 'Z1', {MinZ1, MaxZ1Blade})
EmtModifyAxisStroke( 'C1', {MinC1, MaxC1})
EmtModifyAxisHome( 'C1', ParkC1)
EmtModifyAxisHome( 'B1', ParkB1)
EmtModifyAxisDirection( 'B1', Vector3d( cos( Saw2C1Offs), sin( Saw2C1Offs), 0))
-- se testa H21 (fresa sotto)
elseif EMC.HEAD == 'H21' then
EmtModifyAxisHome( 'C2', ParkC2)
EmtModifyAxisDirection( 'B2', X_AX())
-- se testa H22 (lama su aggregato sotto)
elseif EMC.HEAD == 'H22' then
-- recupero valore asse A2 bloccato
local sVal = EgtGetMachiningParam( MCH_MP.BLOCKEDAXIS) or 'A2=0'
local SawUnderPosA2 = tonumber( sVal:sub( 4) or '') or 0
EmtModifyAxisHome( 'C2', GetSawCHomeFromVirtualAxis( SawUnderPosA2))
EmtModifyAxisDirection( 'B2', Vector3d( cos( SawUnderC2Offs), -sin( SawUnderC2Offs), 0))
end
end
@@ -991,7 +1063,7 @@ end
---------------------------------------------------------------------
function GetHeadSet( sHead)
if sHead == 'H11' or sHead == 'H12' or sHead == 'H13' or sHead == 'H14' or sHead == 'H16' then
if sHead == 'H11' or sHead == 'H12' or sHead == 'H13' or sHead == 'H16' then
return 1
elseif sHead == 'H21' or sHead == 'H22' then
return 2
@@ -1025,6 +1097,36 @@ function GetHeadSetFromTcPos( sTcPos)
return 0, 0
end
---------------------------------------------------------------------
-- Funzione che ritorna il nome della testa in base alla posizione utensile (ATT: deve rispecchiare il setup)
function GetAdjHeadFromTcPos( nHeadSet, sTcPos)
if nHeadSet == 1 then
-- seconda lama
if SecondSaw and sTcPos == 'T21' then
return 'H16'
-- utensili speciali
elseif TcSpecialTools and sTcPos == 'T121' then
return 'H11'
-- motoseghe
elseif sTcPos == 'T101' or sTcPos == 'T111' then
return 'H13'
-- utensili standard o prima lama
else
return EgtIf( sTcPos == 'T1', 'H12', 'H11')
end
elseif nHeadSet == 2 then
-- lama su aggregato da sotto
if TcAggreBladeUnder and sTcPos == 'T201' then
return 'H22'
-- utensili standard da sotto
else
return 'H21'
end
else
return ''
end
end
---------------------------------------------------------------------
---------------------------------------------------------------------
-- Funzione che riconosce testa per sega a catena
function HeadIsChainSaw( sHead)
@@ -1034,10 +1136,10 @@ end
---------------------------------------------------------------------
-- Funzione che calcola la posizione Home di Z per la sega a catena dal valore dell'asse virtuale
function GetChainSawZHomeFromVirtualAxis( dPosA)
-- se A=0 -> T101 -> HomeZ = -400
-- se A1=0 -> T101 -> HomeZ = -400
if abs( dPosA) < 0.1 then
return ParkCSaw0Z1
-- altrimenti A=-90 -> T102 o A=90 -> T104 -> HomeZ = -100
-- altrimenti A1=-90 -> T102 o A=90 -> T104 -> HomeZ = -100
else
return ParkCSawZ1
end
@@ -1046,10 +1148,10 @@ end
---------------------------------------------------------------------
-- Funzione che calcola l'angolo Home di C per la sega a catena dal valore dell'asse virtuale
function GetChainSawCHomeFromVirtualAxis( dPosA)
-- se A=0 -> T101 -> HomeC = 0
-- se A1=0 -> T101 -> HomeC = 0
if abs( dPosA) < 0.1 then
return ParkCSaw0C1
-- altrimenti A=90 -> T104 -> HomeC = -90
-- altrimenti A1=90 -> T104 -> HomeC = -90
else
return ParkCSawC1
end
@@ -1058,10 +1160,10 @@ end
---------------------------------------------------------------------
-- Funzione che calcola l'angolo Home di C per la lama su aggregato dal valore dell'asse virtuale
function GetSawCHomeFromVirtualAxis( dPosA)
-- se A1=0 -> 201 -> HomeC = 0
-- se A2=0 -> 201 -> HomeC = -90
if abs( dPosA) < 0.1 then
return ParkSaw0C2
-- altrimenti A1=90 -> T204 -> HomeC = -90
-- altrimenti A2=90 -> T204 -> HomeC = -90
else
return ParkSawC2
end
@@ -1071,7 +1173,7 @@ function GetSawCHomeFromVirtualAxis( dPosA)
-- Funzione che ritorna ZExtra partendo dalla testa e dall'angolo verticale
function GetZExtra( sHead, dAngV)
-- se testa standard
if sHead == 'H11' or sHead == 'H14' then
if sHead == 'H11' then
if abs( dAngV) < 30.1 then
return 400
elseif abs( dAngV) < 45.1 then
@@ -1137,6 +1239,13 @@ function GetPY2Light()
return ( EgtGetInfo( PY2LightId, 'On') == '1')
end
---------------------------------------------------------------------
function GetCurrChainSawingVirtualAxis()
-- recupero il valore dell'asse virtuale bloccato A
local sVal = EgtGetMachiningParam( MCH_MP.BLOCKEDAXIS) or 'A1=0'
local dPosA = tonumber( sVal:sub( 4)) or 0
return dPosA
end
---------------------------------------------------------------------
-- Funzione per resettare tutte le attivazioni della macchina
+3 -3
View File
@@ -31,8 +31,8 @@ local GS = {}
local PositionTable = {}
local bTc2Active = ( EgtGetFirstNameInGroup( EgtGetBaseId( 'Base'), 'TC2') ~= nil)
local SecondSaw = ( EgtGetHeadId( 'H16') ~= nil)
local SecondChain = ( EgtGetFirstNameInGroup( EgtGetBaseId( 'Base'), 'TC5') ~= nil)
local TcSpecialTools = ( EgtGetHeadId( 'H14') ~= nil)
local SecondChain = ( EgtGetFirstNameInGroup( EgtGetBaseId( 'Base'), 'TC4') ~= nil)
local TcSpecialTools = ( EgtGetFirstNameInGroup( EgtGetBaseId( 'Base'), 'TC5') ~= nil)
local TcAggreBladeUnder = ( EgtGetFirstNameInGroup( EgtGetBaseId( 'Base'), 'TCS') ~= nil)
local bFullOpt = bTc2Active and SecondSaw and SecondChain and TcSpecialTools and TcAggreBladeUnder -- se ha tutti gli optional attivati
@@ -52,7 +52,7 @@ if bFullOpt then
{Pos = "Pos13", TcPos = "T13", Head = "H11", Group = "G1"},
{Pos = "Pos14", TcPos = "T101", Head = "H13", Group = "G2"}, -- motosega
{Pos = "Pos15", TcPos = "T111", Head = "H13", Group = "G2"}, -- motosega 2
{Pos = "Pos16", TcPos = "T121", Head = "H14", Group = "G2"}, -- utensile speciale
{Pos = "Pos16", TcPos = "T121", Head = "H11", Group = "G2"}, -- utensile speciale
{Pos = "Pos17", TcPos = "T21", Head = "H16", Group = "G3"}, -- TC 2
{Pos = "Pos18", TcPos = "T22", Head = "H11", Group = "G3"},
{Pos = "Pos19", TcPos = "T23", Head = "H11", Group = "G3"},
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
+85
View File
@@ -0,0 +1,85 @@
==== Common_PF1250 Update Log ====
Versione 2.6d2 (23/04/2024)
- (MLDE-GEN) Aggiunto parametro 'IS_TEST_MACHINE' FACOLTATIVO. Se non esiste o 'false' è macchina standard, se 'true' è una macchina utilizzata per i test Egalware interni
- (GEN) Chiamando la macchina con un nome che termini con '.TEST' si abilita come macchina per test interni, equivalente a settare 'IS_TEST_MACHINE' (che comunque rimane)
- (SIM-GEN) Modificato movimenti testa sotto. Prima si muove in quota 'ParkMchY2' e poi va alla coordinata di lavoro ruotando gli assi
- (SIM) Per lavorazioni in doppio, viene subito scritta la quota Z. La generazione era già corretta. Ticket#1377
- (GEN) Ripristinato movimento iniziale testa sopra assieme alle pinze. Spostato comando wait dopo primo movimento testa. Ticket#1730
- (MLDE-SIM-GEN) Aggiunto parametro MaxZ1Blade per differenziare Z massima aggregato lama e altri utensili.
- (SIM) Aggiunto controllo con solido di collisione per verificare di non salire oltre il massimo
- (SIM) Corretta simulazione scambio testa 3 -> testa 1
Versione 2.6d1 (09/04/2024)
- (GEN) Corretto impostazione piano G24 con testa da sotto con aggregato
- (SIM-GEN) Corretta posizione prelievo/parcheggio se lama su aggregato da sotto
- (MLDE-SIM-GEN) Aggiunta variabile FACOLTATIVA 'ForceToCloseRollersGate' ( che legge la variabile da TS3 'CHIUDI_PINZE_2_3_SCAMBIO') in mlde per forzare chiusura paratie rulli
durante scambio pinze per facilitare passaggio pezzi molto storti. Se non presente chiude solo se necessario.
- (GEN) Corretta scrittura lista utensili iniziale M992 per doppia motosega e aggregato lama sotto
- (SIM-GEN) Corretto movimento punte lunghe
- (GEN) Corretto adeguamento speed per aggregato lama da sotto con coefficiente moltiplicativo
- (SIM-GEN) Aumentato numero riposizionamenti possibili a 10 ( per pezzi molto lunghi non bastava il valore precedente: 5)
- (GEN) Corretto posizionamento assi in home se primo utensile punta lunga
Versione 2.6c5 (26/03/2024)
- (SIM) Corretto primo movimento in rapido della lavorazione per testa sotto. Ora allineata a generazione
- (SIM-GEN) Aggiunta gestione parametro "SECDIST". Distanza di sicurezza tra paratia con rulli e utensile/testa. Parametro da inserire nelle note utensile
- (MLDE-SIM) Modificate collisioni traversa. Ora non comprende carro X1, il quale ha il proprio oggetto di collisione
Versione 2.6c4 (14/03/2024)
- (SIM) Miglioramento visualizzazione spigoli VMILL alla fine della simulazione. Funzione: EgtVolZmapSetShowEdges. N.B.= serve CAM5 2.6c2 NON OBBLIGATORIO
- (GEN) Modifica controlli a preselezione utensile. Margine ridotto da 400m a 200mm.
- (GEN) Corretto controllo preselezione testa H1 quando H2 in lavoro
Versione 2.6c3 (12/03/2024)
- (SIM-GEN) Migliorata gestione movimenti con lama su aggregato su testa sotto
Versione 2.6c2 (04/03/2024)
- (GEN) I commenti iniziali si scrivono in modo standard, per poterli commentare nella macchina di test
- (MLDE-GEN) Aggiunta variabile 'MACH_NAME' in MLDE con nome macchina
Versione 2.6c1 (29/02/2024)
- (SIM) Gestione rimozione VMILL per tagli a cubetti Zig-Zag
Versione 2.6b4 (23/02/2024)
- (MLDE-SIM-GEN) EgtAddToPackagePath spostato in mlde
Versione 2.6b3 (20/02/2024)
- (SIM) Aggiunta funzioni "OnSimulInit" e "OnSimulExit" per orientare vista corretta in caso di macchina con carico destro. N.B.= serve CAM5 2.6b4 NON OBBLIGATORIO
- (SIM-GEN) "BeamData" caricato come libreria con 'require' anziché come file con 'dofile'
Versione 2.6b2 (15/02/2024)
- (SIM-GEN) Primo movimento in X per testa 2 a SafeX2 anziché a ParkX2
Versione 2.6b1 (07/02/2024)
- (MLDE-SIM-GEN) Inserito parametro 'MinLengthLongCSaw' per gestione motosega molto lunga
- (MLDE) funzione 'GetCurrChainSawingVirtualAxis' spostata in MLDE
Versione 2.6a5 (31/01/2024)
- (SIM) Migliorata simulazione apertura/chiusura morse in caso di separazione
- (SIM-GEN) Migliorata gestione movimenti con motosega e adeguato simulazione
- (GEN) Corretta scrittura assi in caso di 'WriteAllCoordsOnFirstM101' per testa 2
- (SIM-GEN) Caricamento BeamData come local
Versione 2.6a4 (25/01/2024)
- (SIM-GEN) Corretto movimento in caso di cambio assi rotanti tra due lavorazioni
- (GEN) Corretta emissione coordinate assi in caso di 'WriteAllCoordsOnFirstM101'
Versione 2.6a3 (22/01/2024)
- (SIM-GEN) Correzione gestione apertura/chiusura rulli sul fine barra (#1630) e in generale
- (GEN) Modificato flag 'EmitRapidInG0' in 'EmitRapidInG1' per decidere se scrivere G1 anziché G0. Se flag a nil, scrive i rapidi in G0
- (SIM) Correzione movimenti pinze prima di separazione
Versione 2.6a2 (19/01/2024)
- (GEN) Corretta inversione coordinata X per Lama su aggregato da sotto
- (SIM) Se modalità 'WriteAllCoordsOnFirstM101', oltre alla X si scive quota di parcheggio assi B2 e C2 come in generazione
- (SIM-GEN) Tolta gestione rotazione pezzo (di derivazione PF), in macchina non è previsto ribaltamento
- (GEN) Migliorata gestione preselezione utensile
- (MLDE-GEN) Aggiunto flag 'EmitRapidInG0' per decidere se scrivere G0 anziché G1. Se flag a nil, scrive i rapidi in G1
Versione 2.6a1 (09/01/2024)
- Prima versione post-proc comune tra macchine PF1250 e PF1500
- (SIM-GEN) Corretto movimento testa 2 in ToolDesel e movimento controllo collisione
- (GEN) Tolta testa H14 per utensili speciali. Si utilizza H11 per frese standard
- (MLDE-GEN) Costanti 'MinForzaPinze' e 'MaxForzaPinze' portati in mlde/Ts3data (erano hardcoded)
- (MLDE-SIM-GEN) Aggiunto parametro 'WriteAllCoordsOnFirstM101' per decidere se stampare tutti gli assi sulla prima M101
+10
View File
@@ -0,0 +1,10 @@
-- Version.lua by EgalWare s.r.l. 2024/01/22
-- Gestione della versione dei file comuni post-processori macchine PF1250 e PF1500 di Essetre
local InfoCommon_STD_PP = {
NAME = 'Common_PF1250', -- nome script PP standard
VERSION = '2.6d2', -- versione script
MIN_MACH_VER_PP_COMMON = '2.5k1' -- versione minima kernel
}
return InfoCommon_STD_PP
+1 -1
View File
@@ -37,7 +37,7 @@ local WallData = {
-- Aggiornamento con dati da TechnoEssetre7
local sTs3Data = EgtGetStringFromIni( 'Wall', 'DATA_DIR', "C:\\TechnoEssetre7\\EgtData", EgtGetIniFile()).."\\Essetre-PF1250.data"
local sData = EgtGetSourceDir().."\\Ts3Data.lua"
local sData = EgtGetCurrMachineDir().."\\Wall\\Ts3Data.lua"
if EgtExistsFile( sTs3Data) then
EgtCopyFile( sTs3Data, sData)
local sTs3DataOld = sTs3Data..'.old'