primo commit

This commit is contained in:
luca.mazzoleni
2024-09-19 16:58:39 +02:00
commit ad4df02300
106 changed files with 12749 additions and 0 deletions
+309
View File
@@ -0,0 +1,309 @@
variables:
VERS_MAIN: '1.0'
MACH_NAME: ''
MACH_NAME_TEST: ''
MANUFACTURER: ''
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_SHARE_H: '\\10.74.82.252\team drives'
NET_USERQ: 'steamw\egalware'
NET_USER_SERVICES: 'steamw\services'
MACH_VERS: '0.0.0.0'
TEMP_PATH: 'C:\MachinesDeploy'
MACHINES_PATH_R: 'R:\EgtData\Machines'
DEST_MACHINES_PATH_R: 'R:\EgtData\Machines\zTestYAML'
DEST_MACHINES_PATH_H: 'H:\'
SRC_PATH: ''
BASE_PATH: ''
TEST_PATH: ''
URL_VERSIONS_LOG: "https://liman.egalware.com/ELM.API/api/release/save"
MACH_VERS_NUM: '0.0.0.0'
CRITICAL_STRING: "#critical#"
#Note compilazione LUA:
# lua54 -o bin\$FileName -s $FileName: -o = output, -s = NON include i debug symbols
# 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 "-----------------------"
$customerPathR = $env:DEST_MACHINES_PATH_R + "\" + $env:MANUFACTURER
ROBOCOPY /MIR "$env:SRC_PATH" "$customerPathR\$env:MACH_NAME\" /XD "bin"
ROBOCOPY "$env:TEST_PATH" "$customerPathR\$env:MACH_NAME_TEST\" /E /XD "bin"
ROBOCOPY /MIR "$env:BASE_PATH" "$customerPathR\Deploy\$env:MACH_NAME\$env:MACH_VERS\" /XD "bin" /XD "$env:MACH_NAME_TEST"
SLEEP 2
net use R: /delete
# helper copia script verso drive condiviso
.ReplicaStor01: &ReplicaStor01
- |
net use H: /delete
SLEEP 2
net use H: $env:NET_SHARE_H /u:$env:NET_USER_SERVICES $SRVCS_PASSWD
echo "-----------------------"
echo " Copia macchina su stor01"
echo "-----------------------"
SLEEP 2
$customerPathH = $env:DEST_MACHINES_PATH_H + "\" + $env:MANUFACTURER + "\test"
echo $customerPathH
$destinationPath = "$customerPathH\$env:MACH_NAME" + "\"
echo $destinationPath
# ROBOCOPY "$env:BASE_PATH" "$destinationPath\" *.zip
SLEEP 2
net use H: /delete
# helper copia script verso cartella di rete R:\ per develop
.ReplicaR_DEV: &ReplicaR_DEV
- |
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 "-----------------------"
$customerPathR = $env:DEST_MACHINES_PATH_R + "\" + $env:MANUFACTURER
ROBOCOPY /MIR "$env:BASE_PATH" "$customerPathR\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 * -Include( "*.mlpe", "*.mlse")
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 e costruttore
.machName-fix: &machName-fix
- |
echo "-----------------------"
echo " Recupero nome macchina e costruttore"
echo "-----------------------"
$fileName = dir *.mlde
$env:MACH_NAME = $fileName.BaseName
echo $fileName.BaseName
$env:MACH_NAME_TEST = $env:MACH_NAME + ".TEST"
$comp = $fileName.BaseName -split "-"
echo $comp
$env:MANUFACTURER = $comp[0]
Write-Output $env:MANUFACTURER
# helper calcolo versione
.version-fix: &version-fix
- |
echo "-----------------------"
echo " Calcolo versione"
echo "-----------------------"
# calcolo versione formato stringa
$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 formato stringa
Write-Output $env:MACH_VERS
# calcolo versione formato numerico
$fPath = "$env:MACH_NAME.mlde";
$vLine = Select-String -path $fPath -Pattern '^PP_NVER';
$comp = $vLine -split "=";
$env:MACH_VERS_NUM = $comp[1].Replace("'","").Trim()
# display versione formato numerico
Write-Output $env:MACH_VERS_NUM
# helper calcolo versione se develop
.version-fix_DEV: &version-fix_DEV
- |
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 invio notifica a log versioni online (LiMan)
.SendToVersionsLog: &SendToVersionsLog
- |
echo "-----------------------"
echo " Invio versione a log online"
echo "-----------------------"
$tags = ""
# se critico scrive tag
if ( $CI_COMMIT_MESSAGE | Select-String -Pattern $env:CRITICAL_STRING) {
$tags = "CRITICAL"
}
$body =
@{
codInst = "EgalWare"
codApp = $env:MACH_NAME
uplAppId = "UpdateManager"
masterKey = $LiMan_Key
tipo = "Machine"
versNum = $env:MACH_VERS_NUM
versText = $env:MACH_VERS
releaseDate = (Get-Date).toString("yyyy-MM-ddTHH:mm:ss.fffZ")
relTags = $tags
}
$jsonBody = ConvertTo-Json -InputObject $body
echo $jsonBody
Invoke-WebRequest -Method Post -URI $env:URL_VERSIONS_LOG -ContentType "application/json" -Body $jsonBody -UseBasicParsing
# helper esecuzione test
.RunTest: &RunTest
- |
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
- *ReplicaStor01
- *SendToVersionsLog
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
+211
View File
@@ -0,0 +1,211 @@
-- BeamData.lua by Egaltech s.r.l. 2024/03/28
-- Raccolta dati generali per Travi
EgtOutLog( ' FAST-BeamData started', 1)
-- Tabella per definizione modulo
local BeamData = {
GO_FAST = 0, -- flag abilitazione modalità veloce (0=no, 1=carrelli, 2=anche cambio utensili)
RIGHT_LOAD = false, -- flag carico da destra
ROT90 = false, -- flag abilitazione rotazione 90 gradi
MIN_WIDTH = 40, -- larghezza minima del grezzo
MIN_HEIGHT = 40, -- altezza minima del grezzo
MAX_WIDTH = 240, -- larghezza massima del grezzo
MAX_HEIGHT = 625, -- altezza massima del grezzo
MAX_WIDTH2 = 305, -- seconda larghezza massima del grezzo
MAX_HEIGHT2 = 625, -- altezza massima per seconda larghezza massima del grezzo
LEN_SHORT_PART = 1200, -- lunghezza massima pezzo corto
LEN_VERY_SHORT_PART = 400, -- lunghezza massima pezzo molto corto (molto probabile lo scarico a caduta)
MAX_RAW = 30000, -- massima lunghezza grezzo (deve essere minore di LenTable - RAW_OFFSET)
STD_RAW = 14000, -- lunghezza standard della barra di grezzo
OVM_HEAD = 10, -- sovramateriale testa
OVM_MID = 5.4, -- sovramateriale intermedio (spessore lama)
MINRAW_S = 750, -- minimo grezzo in coda scaricabile per sezioni piccole
MINRAW_L = 1070, -- minimo grezzo in coda scaricabile per sezioni grandi
MAX_LEN_SCRAP = 270, -- massima lunghezza scarto di coda
MAX_LEN_SCRAP_START = 270, -- massima lunghezza scarto di testa
MAX_DIM_HTCUT = 200, -- larghezza massima taglio di testa o coda
MAX_DIM_HTCUT_HBEAM = 180, -- larghezza massima taglio di testa o coda con trave alta
MIN_DIM_HBEAM = 380, -- altezza minima di trave alta
MAX_DIM_DICE = 155, -- dimensione trasversale massima cubetto
MAX_LEN_DICE = 400, -- lunghezza massima cubetto
COLL_SIC = 5, -- distanza di sicurezza per collisioni
CUT_SIC = 20, -- distanza di sicurezza per tagli
CUT_EXTRA = 5, -- affondamento extra standard per tagli di lama e fresature
CUT_EXTRA_MIN = 1, -- affondamento extra ridotto per tagli di lama e fresature
NZ_MINA = -0.6, -- componente limite in Z normale di una faccia (-36.8deg)
NZ_MINB = -0.4, -- componente limite in Z normale di un insieme di facce (-23deg)
DRILL_TOL = 0.2, -- tolleranza tra diametro foro e diametro punta
DRILL_VZ_MIN = -0.51, -- componente limite in Z del versore di un foro
DRILL_VX_MAX = 0.867, -- componente limite in X del versore di un foro sulle facce laterali
DRILL_OVERLAP = 5, -- sovrapposizione tra due mezze forature
MILL_OVERLAP = 5, -- sovrapposizione tra due mezze fresature
MAX_DIST_HTFEA = 50.0, -- massima distanza di feature da testa o coda per essere considerata tale
MAX_LEN_HTFEA = 2000.0, -- massima lunghezza di feature di testa o coda
LONGCUT_ENDLEN = 600, -- lunghezza lavoro estremi iniziale e finale (std=600)
LONGCUT_MAXLEN = 1200, -- lunghezza massima sezione di taglio longitudinale
MAX_LEN_RIDGELAP_FROM_BOTTOM = 141, -- massima lunghezza ridgelap lavorabile da sotto
MAX_LEN_RIDGELAP_FROM_BOTTOM_HBEAM = 96, -- massima lunghezza ridgelap lavorabile da sotto con trave alta
DIM_TO_CENTER_STRIP = 0, -- larghezza minima trave per inseriemento codolo nel centro del trave; 0 = automatico
DIM_STRIP = -1, -- dimensione codolo sostegno parti lasciate su contorno libero o archi (-1 = da Q...)
DIM_STRIP_SMALL = 1, -- dimensione codolo piccolo (quando le parti sostenute sono sicuramente sulla parte sopra del pezzo)
RAWCOL = { 255, 160, 32, 30}, -- colore del grezzo
RAW_OFFSET = 2000, -- spostamento grezzo rimanente dopo split
VICE_MINH = 110, -- altezza minima della morsa
VICE_MAXH = 370, -- altezza massima zona pinzaggio orizzontale
ENABLE_TOOL_BETWEEN_VICES = false, -- abilita calcolo pinze permettendo di avere l'utensile tra di esse (ovviamente lontano da bordi in Y)
OFFSET_DRILL_TENON = 0, -- offset fori su tenoni verso base degli stessi (0=non fare)
USER_HOLE_DIAM = 0, -- diametro foro per L20
MAX_TOOL_LEN_FOR_HOR_MACH = 311, -- massima lunghezza utensile per poter fare forature (fresature) oltre i 10 gradi dalla verticale
DRILL_VZ_MIN_LONG_TOOL = 0.984, -- componente limite per lavorazioni con punta lunga
MAX_TOOL_LEN_BACK_HOR_MACH = 250, -- massima lunghezza utensile per poter eseguire lavorazioni (forature/svuotature) da dietro (faccia 4)
MAX_HEIGHT_ROT_B_ABOVE = 500, -- massima altezza della trave che permette di ruotare l'asse B sopra la stessa senza collisioni
KIOTP = 3, -- coefficiente moltiplicativo per attacco/uscita lama tangente anzichè perpendicolare
MAXDIAM_POCK_CORNER = 30, -- diametro massimo utensile ammesso per tasche con angoli interni
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)
HEAD_DIM_FOR_BH = 190, -- dimensione di ingombro della testa per block haus
MAX_LEN_BH_FROM_BOTTOM = 195, -- massima lunghezza lavorabile da un lato di block haus da sotto
MAX_DIST_BH_FROM_BOTTOM = 395, -- massima distanza tra naso mandrino e sopra della trave senza collisione
BH_MACHINE = false, -- flag che indica la tipologia di macchina configurata BlockHaus
ANG_TRASM = false, -- presenza rinvio angolare per lavorazioni da sotto
PRECUT_HEAD = true, -- flag abilitazione pretaglio grezzo a zero in testa
PRECUT_TAIL = true, -- flag abilitazione pretaglio grezzo a zero in coda
MIN_HEIGHT_ADDED_CUTS = 400, -- altezza minima pezzo per effettuare tagli orizzontali aggiuntivi in testa e coda
}
-- Aggiornamento con dati da TechnoEssetre7
local sTs3Data = EgtGetStringFromIni( 'Beam', 'DATA_DIR', "C:\\TechnoEssetre7\\EgtData", EgtGetIniFile()).."\\Essetre-Fast.data"
local sData = EgtGetCurrMachineDir().."\\Beam\\Ts3Data.lua"
if EgtExistsFile( sTs3Data) then
EgtCopyFile( sTs3Data, sData)
local sTs3DataOld = sTs3Data..'.old'
EgtEraseFile( sTs3DataOld)
EgtRenameFile( sTs3Data, sTs3DataOld)
end
if EgtExistsFile( sData) then
local Machine = dofile( sData)
if Machine then
if Machine.Offsets then
BeamData.ANG_TRASM = ( Machine.Offsets.SECSUP and Machine.Offsets.SECSUP >= 3)
BeamData.BH_MACHINE = ( Machine.Offsets.BLOCKHAUS == 1)
BeamData.MINRAW_S = max( BeamData.MINRAW_S, Machine.Offsets.MINRAW_S or BeamData.MINRAW_S)
BeamData.MINRAW_L = max( BeamData.MINRAW_L, Machine.Offsets.MINRAW_L or BeamData.MINRAW_L)
BeamData.CUT_EXTRA = Machine.Offsets.CUT_EXTRA or BeamData.CUT_EXTRA
BeamData.CUT_EXTRA_MIN = Machine.Offsets.CUT_EXTRA_MIN or BeamData.CUT_EXTRA_MIN
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
if Machine.Offsets.PRECUT_HEAD_DISABLE then BeamData.PRECUT_HEAD = ( Machine.Offsets.PRECUT_HEAD_DISABLE == 0) end
if Machine.Offsets.PRECUT_TAIL_DISABLE then BeamData.PRECUT_TAIL = ( Machine.Offsets.PRECUT_TAIL_DISABLE == 0) end
if Machine.Offsets.MIN_HEIGHT_ADDED_CUTS then BeamData.MIN_HEIGHT_ADDED_CUTS = min( Machine.Offsets.MIN_HEIGHT_ADDED_CUTS, BeamData.MIN_HEIGHT_ADDED_CUTS) end
end
if Machine.Trave then
BeamData.MIN_WIDTH = Machine.Trave.XMIN or BeamData.MIN_WIDTH
BeamData.MIN_HEIGHT = Machine.Trave.ZMIN or BeamData.MIN_HEIGHT
BeamData.MAX_WIDTH = Machine.Trave.XMAX or BeamData.MAX_WIDTH
BeamData.MAX_HEIGHT = Machine.Trave.ZMAX or BeamData.MAX_HEIGHT
end
if Machine.User then
BeamData.OFFSET_DRILL_TENON = Machine.User.L040_OFFSET_P1 or BeamData.OFFSET_DRILL_TENON
if Machine.User.OPTIMIZATIONS_ENABLE_SLICES_F5 == 1 then
BeamData.MAX_LEN_SCRAP = Machine.User.OPTIMIZATIONS_LENGTH_SLICES or BeamData.MAX_LEN_SCRAP
else
BeamData.MAX_LEN_SCRAP = 100000
end
if Machine.User.OPTIMIZATIONS_ENABLE_SLICES_F6 == 1 then
BeamData.MAX_LEN_SCRAP_START = Machine.User.OPTIMIZATIONS_LENGTH_SLICES or BeamData.MAX_LEN_SCRAP_START
else
BeamData.MAX_LEN_SCRAP_START = 100000
end
BeamData.USER_HOLE_DIAM = Machine.User.L020_DIAM_HOLE or BeamData.USER_HOLE_DIAM
BeamData.ENABLE_TOOL_BETWEEN_VICES = ( Machine.User.ENABLE_TOOL_BETWEEN_VICES == 1) or BeamData.ENABLE_TOOL_BETWEEN_VICES
end
end
end
---------------------------------------------------------------------
local function GetMaxLenRidgeLapFromBottom( dHRaw)
if dHRaw < BeamData.MIN_DIM_HBEAM then
return BeamData.MAX_LEN_RIDGELAP_FROM_BOTTOM + 0.01
else
return BeamData.MAX_LEN_RIDGELAP_FROM_BOTTOM_HBEAM + 0.01
end
end
BeamData.GetMaxLenRidgeLapFromBottom = GetMaxLenRidgeLapFromBottom
---------------------------------------------------------------------
local function GetBlockedAxis( sHead, nToolType, sBlockedAxis)
-- lama
if nToolType == MCH_TY.SAW_STD or nToolType == MCH_TY.SAW_FLAT then
return ''
-- sega a catena
elseif nToolType == MCH_TY.MORTISE_STD then
if sHead == 'H3' then
if sBlockedAxis == 'parallel' then
return 'A=0'
elseif sBlockedAxis == 'perpendicular' then
return 'A=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 ''
end
end
BeamData.GetBlockedAxis = GetBlockedAxis
---------------------------------------------------------------------
local function GetChainSawInitAngs( vtN, vtO)
if vtN:getY() > 0 and vtO:getX() > 0 then
return 'C=0'
else
return ''
end
end
BeamData.GetChainSawInitAngs = GetChainSawInitAngs
---------------------------------------------------------------------
local function GetSetupInfo( sHead)
local SetupInfo = {}
-- dati comuni
SetupInfo.bIsCSymmetric = false
SetupInfo.dCAxisEncumbrance = 180
SetupInfo.bToolOnAggregate = false
-- testa 5 assi da sopra
if sHead == 'H1' then
SetupInfo.bIsTopHead = true
SetupInfo.bIsBottomHead = not SetupInfo.bIsTopHead
SetupInfo.dMaxNegativeAngle = sin( -45)
-- lama su testa 5 assi da sopra
elseif sHead == 'H2' then
SetupInfo.bIsTopHead = true
SetupInfo.bIsBottomHead = not SetupInfo.bIsTopHead
SetupInfo.dMaxNegativeAngle = sin( -45)
-- motosega
elseif sHead == 'H3' then
SetupInfo.bIsTopHead = true
SetupInfo.bIsBottomHead = not SetupInfo.bIsTopHead
SetupInfo.dMaxNegativeAngle = 0
-- rinvio angolare 90° (considerato come fosse una testa da sotto)
elseif sHead == 'H5' then
SetupInfo.bToolOnAggregate = true
SetupInfo.bIsBottomHead = true
SetupInfo.bIsTopHead = not SetupInfo.bIsBottomHead
SetupInfo.dMaxPositiveAngle = 0
end
return SetupInfo
end
BeamData.GetSetupInfo = GetSetupInfo
---------------------------------------------------------------------
return BeamData
+9
View File
@@ -0,0 +1,9 @@
-- %TABLE_NAME%.lua by Egaltech s.r.l. %DATE_TIME%
-- Gestione dati lavorazioni per Travi
-- Tabella per definizione modulo
local %TABLE_NAME% = {
}
---------------------------------------------------------------------
return %TABLE_NAME%
+15
View File
@@ -0,0 +1,15 @@
-- CutData.lua by Egaltech s.r.l. 20/03/2023 09:48:29
-- Gestione dati lavorazioni per Travi
-- Tabella per definizione modulo
local CutData = {
{ On = true, Name = 'MiSideInvSaw620', Type = 'HeadSide'},
{ On = true, Name = 'MiSideSaw620', Type = 'TailSide'},
{ On = true, Name = 'MiSideInvSaw600', Type = 'HeadSide'},
{ On = true, Name = 'MiSideSaw600', Type = 'TailSide'},
{ On = true, Name = 'MiSideInvSaw620_H1', Type = 'HeadSide'},
{ On = true, Name = 'MiSideSaw620_H1', Type = 'TailSide'}
}
---------------------------------------------------------------------
return CutData
+27
View File
@@ -0,0 +1,27 @@
-- DrillData.lua by Egaltech s.r.l. 06/11/2023 13:29:15
-- Gestione dati lavorazioni per Travi
-- Tabella per definizione modulo
local DrillData = {
{ On = true, Name = 'DrillD05_4', Type = 'Drill'},
{ On = true, Name = 'DrillD06', Type = 'Drill'},
{ On = true, Name = 'DrillD08', Type = 'Drill'},
{ On = true, Name = 'DrillD08_Long', Type = 'Drill'},
{ On = true, Name = 'DrillD10', Type = 'Drill'},
{ On = true, Name = 'DrillD12', Type = 'Drill'},
{ On = true, Name = 'DrillD12_Long', Type = 'Drill'},
{ On = true, Name = 'DrillD14', Type = 'Drill'},
{ On = true, Name = 'DrillD16', Type = 'Drill'},
{ On = true, Name = 'DrillD18', Type = 'Drill'},
{ On = true, Name = 'DrillD18_Short', Type = 'Drill'},
{ On = true, Name = 'DrillD20', Type = 'Drill'},
{ On = true, Name = 'DrillD20_AT', Type = 'Drill_AT'},
{ On = true, Name = 'DrillD25', Type = 'Drill'},
{ On = true, Name = 'DrillD38', Type = 'AngleDrill'},
{ On = true, Name = 'DrillPockD20', Type = 'Pocket'},
{ On = true, Name = 'DrillPockD25', Type = 'Pocket'},
{ On = true, Name = 'DrillPockD20_AT', Type = 'Pocket_AT'}
}
---------------------------------------------------------------------
return DrillData
+30
View File
@@ -0,0 +1,30 @@
-- GetTs3Data.lua by Egaltech s.r.l. 2022/04/07
-- Recupero dati da file Ts3Data.lua di macchina
-- Intestazioni
require( 'EgtBase')
_ENV = EgtProtectGlobal()
EgtEnableDebug( false)
-- Per test
--GTSD = {}
--GTSD.TS3PATH = 'Essetre-FAST\\Ts3Data.lua'
local sLog = 'GetTs3Data : ' .. GTSD.TS3PATH
EgtOutLog( sLog)
if EgtExistsFile( GTSD.TS3PATH) then
local Machine = dofile( GTSD.TS3PATH)
-- Assegno valori di interesse
Offsets = Machine.Offsets
_G.Offsets = Offsets
Trave = Machine.Trave
_G.Trave = Trave
User = Machine.User
_G.User = User
end
-- Tutto ok
GTSD.ERR = 0
EgtOutLog( ' +++ GetTs3Data completed')
+54
View File
@@ -0,0 +1,54 @@
; PIndex = Type, PName, Default, Description
; Type : d=double, l=length, s=string
[1]
Name=Offsets
1=l,YCARICO,-1460.0,YCARICO
2=l,YSCARICO,1700.0,YSCARICO
3=l,OFFSETRIB,150.0,OFFSETRIB
4=l,PARKYY,480,PARKYY
5=l,PARKVV,-480,PARKVV
6=l,PIVOTFRESA,-177.0,PIVOTFRESA
7=l,PIVOTLAMA,242.0,PIVOTLAMA
8=l,OFFSETX,-900.0,OFFSETX
9=l,OFFSETZ,-1015.0,OFFSETZ
10=l,MIN_X,-1350,MIN_X
11=l,MAX_X,0,MAX_X
12=l,MIN_Y,110,MIN_Y
13=l,MAX_Y,3735,MAX_Y
14=l,MIN_Z,-1350,MIN_Z
15=l,MAX_Z,0,MAX_Z
16=d,MIN_B,-180,MIN_B
17=d,MAX_B,360,MAX_B
18=d,MIN_C,-360,MIN_C
19=d,MAX_C,360,MAX_C
20=l,MIN_V,-3735,MIN_V
21=l,MAX_V,-110,MAX_V
22=d,TIPO_CN,2,TIPO_CN
23=d,OFFSETCLAMA,0,OFFSETCLAMA
24=d,OFFSETBLAMA,0,OFFSETBLAMA
25=d,RIBCAR,0,RIBCAR
26=d,SECSUP,3,SECSUP
27=d,BLOCKHAUS,1,Blockhaus Configuration
28=l,NOULOAD,0,Max Unload Length (0=no limits)
29=l,OFFSETX_RINV_1,150,OFFSETX_RINV_1
30=l,OFFSETZ_RINV_1,347,OFFSETZ_RINV_1
31=l,OFFSETX_RINV_2,150,OFFSETX_RINV_2
32=l,OFFSETZ_RINV_2,347,OFFSETZ_RINV_2
33=l,MIN_JOIN_SS,100,MIN_JOIN_SS
[2]
Name=Trave
1=l,XMIN,29,XMIN
2=l,XMAX,305,XMAX
3=l,ZMIN,20,ZMIN
4=l,ZMAX,625,ZMAX
[3]
Name=User
1=d,OPTIMIZATIONS_ENABLE_SLICES_F5,1,ENABLE_SLICES_ON_END
2=d,OPTIMIZATIONS_ENABLE_SLICES_F6,1,ENABLE_SLICES_ON_START
3=d,OPTIMIZATIONS_LENGTH_SLICES,100,SLICES_LENGTH
4=l,L020_DIAM_HOLE,20,L020_HOLE_DIAM
5=l,L040_OFFSET_P1,0,L040_ON_TENON_OFFSET
6=d,ENABLE_TOOL_BETWEEN_VICES,0,ENABLE_TOOL_BETWEEN_VICES
+46
View File
@@ -0,0 +1,46 @@
[Cut]
1=HeadSide
2=TailSide
[Drill]
1=Drill
2=Drill_AT
3=Pocket
4=Pocket_AT
5=AngleDrill
6=Predrill
[Milling]
1=Prof
2=FreeContour
3=Tenon
4=DtTenon
5=DtMortise
6=DtMortise_AT
7=BirdsMouth
8=Chamfer
9=Mark
10=Text
11=Text_AT
12=Decor01
13=Long2Cut
14=Long2CutDown
15=LongSmallCut
16=BHSideMill
17=CleanCorner
18=ProfTCone
19=Long2CutSide
20=SmallToolContour
21=AntiSplintMillCut
[Pocketing]
1=Pocket
2=Pocket_AT
3=OpenPocket
4=OpenPocket_AT
5=Mortise
6=Mortise_AT
[Sawing]
1=Sawing
2=Mortising
+39
View File
@@ -0,0 +1,39 @@
-- MillingData.lua by Egaltech s.r.l. 16/02/2024 14:27:51
-- Gestione dati lavorazioni per Travi
-- Tabella per definizione modulo
local MillingData = {
{ On = true, Name = 'Profiling25x130', Type = 'Prof'},
{ On = true, Name = 'FreeCont25x130', Type = 'FreeContour'},
{ On = true, Name = 'FreeCont20x50', Type = 'FreeContour'},
{ On = true, Name = 'Mill_Tenon100x150', Type = 'Tenon'},
{ On = true, Name = 'Mill_Tenon100x60', Type = 'Tenon'},
{ On = true, Name = 'Mill_DtTen60x130', Type = 'DtTenon'},
{ On = true, Name = 'Mill_DtMrt60x130', Type = 'DtMortise'},
{ On = true, Name = 'Mill_DtMrt60x39_AT', Type = 'DtMortise_AT'},
{ On = false, Name = 'Mill_DtMrt40x120r', Type = 'DtMortise'},
{ On = true, Name = 'Mill_DtMrt35x130', Type = 'DtMortise'},
{ On = true, Name = 'Milling100x60', Type = 'BirdsMouth'},
{ On = false, Name = 'Chamfer25x130', Type = 'Chamfer'},
{ On = true, Name = 'Milling100x60', Type = 'Chamfer'},
{ On = true, Name = 'Text45x40', Type = 'Mark'},
{ On = true, Name = 'TextPenna', Type = 'Text'},
{ On = true, Name = 'TextPenna_AT', Type = 'Text_AT'},
{ On = true, Name = 'Text45x40', Type = 'Decor01'},
{ On = true, Name = 'Mill_L2C100x60', Type = 'Long2Cut'},
{ On = true, Name = 'Mill_L2CD25x130', Type = 'Long2CutDown'},
{ On = false, Name = 'Mill_L2CD100x60', Type = 'Long2CutDown'},
{ On = true, Name = 'Mill_L2CD25x130', Type = 'Long2CutSide'},
{ On = true, Name = 'Mill_L2CD100x60', Type = 'Long2CutSide'},
{ On = true, Name = 'Milling25x130', Type = 'LongSmallCut'},
{ On = true, Name = 'Milling240x20x195', Type = 'BHSideMill'},
{ On = true, Name = 'MillOnSideBH', Type = 'BHSideMill'},
{ On = true, Name = 'FreeCont25x130', Type = 'SmallToolContour'},
{ On = true, Name = 'Milling10x50', Type = 'SmallToolContour'},
{ On = true, Name = 'Milling25x130', Type = 'AntiSplintMillCut'},
{ On = true, Name = 'Clean35x40', Type = 'CleanCorner'},
{ On = true, Name = 'Mill_DTCone125x160', Type = 'ProfTCone'}
}
---------------------------------------------------------------------
return MillingData
+3
View File
@@ -0,0 +1,3 @@
[BEAM]
StartOffset=10
Offset=5.4
+22
View File
@@ -0,0 +1,22 @@
-- PocketingData.lua by Egaltech s.r.l. 06/11/2023 12:45:01
-- Gestione dati lavorazioni per Travi
-- Tabella per definizione modulo
local PocketingData = {
{ On = true, Name = 'Svuot100x60', Type = 'OpenPocket'},
{ On = false, Name = 'Svuot100x150', Type = 'OpenPocket'},
{ On = true, Name = 'Svuot60x80', Type = 'OpenPocket'},
{ On = false, Name = 'Svuot35x70', Type = 'OpenPocket'},
{ On = true, Name = 'Svuot20x50', Type = 'OpenPocket'},
{ On = true, Name = 'Svuot25x130', Type = 'OpenPocket'},
{ On = true, Name = 'Svuot20x100_AT', Type = 'OpenPocket_AT'},
{ On = false, Name = 'Svuot35x70', Type = 'Pocket'},
{ On = true, Name = 'Svuot20x50', Type = 'Pocket'},
{ On = true, Name = 'Svuot25x130', Type = 'Pocket'},
{ On = true, Name = 'Svuot20x100_AT', Type = 'Pocket_AT'},
{ On = true, Name = 'Mortiser38.89x130', Type = 'Mortise'},
{ On = true, Name = 'Svuot20x100_AT', Type = 'Mortise_AT'}
}
---------------------------------------------------------------------
return PocketingData
+11
View File
@@ -0,0 +1,11 @@
-- SawingData.lua by Egaltech s.r.l. 31/07/2022 20:04:48
-- Gestione dati lavorazioni per Travi
-- Tabella per definizione modulo
local SawingData = {
{ On = true, Name = 'TaglioCatena', Type = 'Sawing'},
{ On = true, Name = 'Mortasatura', Type = 'Mortising'}
}
---------------------------------------------------------------------
return SawingData
+53
View File
@@ -0,0 +1,53 @@
local Offsets = {
YCARICO=-1456.85,
YSCARICO=1700,
OFFSETRIB=200,
PARKYY=480,
PARKVV=-480,
PIVOTFRESA=-176.965,
PIVOTLAMA=241.61,
OFFSETX=-900.45,
OFFSETZ=-1011.4,
MIN_X=-1350,
MAX_X=0,
MIN_Y=110,
MAX_Y=3735,
MIN_Z=-1350,
MAX_Z=0,
MIN_B=-180,
MAX_B=360,
MIN_C=-360,
MAX_C=360,
MIN_V=-3735,
MAX_V=-110,
TIPO_CN=1,
OFFSETCLAMA=0,
OFFSETBLAMA=0,
RIBCAR=0,
SECSUP=0,
BLOCKHAUS=0,
NOULOAD=0,
OFFSETX_RINV_1=150,
OFFSETZ_RINV_1=346.965,
OFFSETX_RINV_2=150,
OFFSETZ_RINV_2=346.965,
MIN_JOIN_SS = 200,
}
local Trave = {
XMIN=30,
XMAX=300,
ZMIN=30,
ZMAX=625,
}
local User = {
OPTIMIZATIONS_ENABLE_SLICES_F5=1,
OPTIMIZATIONS_ENABLE_SLICES_F6=1,
OPTIMIZATIONS_LENGTH_SLICES=100,
L020_DIAM_HOLE=14,
L040_OFFSET_P1=0,
}
local Machine = { Offsets=Offsets, Trave=Trave, User=User}
return Machine
+57
View File
@@ -0,0 +1,57 @@
local Offsets = {
YCARICO=-1456.85,
YSCARICO=1700,
OFFSETRIB=200,
PARKYY=480,
PARKVV=-480,
PIVOTFRESA=-176.965,
PIVOTLAMA=241.61,
OFFSETX=-900.45,
OFFSETZ=-1011.4,
MIN_X=-1350,
MAX_X=0,
MIN_Y=110,
MAX_Y=3735,
MIN_Z=-1350,
MAX_Z=0,
MIN_B=-180,
MAX_B=360,
MIN_C=-360,
MAX_C=360,
MIN_V=-3735,
MAX_V=-110,
TIPO_CN=1,
OFFSETCLAMA=0,
OFFSETBLAMA=0,
RIBCAR=0,
SECSUP=0,
BLOCKHAUS=0,
NOULOAD=0,
OFFSETX_RINV_1=150,
OFFSETZ_RINV_1=346.965,
OFFSETX_RINV_2=150,
OFFSETZ_RINV_2=346.965,
MIN_JOIN_SS=100,
PRECUT_HEAD_DISABLE=0,
PRECUT_TAIL_DISABLE=0,
MIN_HEIGHT_ADDED_CUTS=400
}
local Trave = {
XMIN=30,
XMAX=300,
ZMIN=30,
ZMAX=625,
}
local User = {
OPTIMIZATIONS_ENABLE_SLICES_F5=1,
OPTIMIZATIONS_ENABLE_SLICES_F6=1,
OPTIMIZATIONS_LENGTH_SLICES=100,
L020_DIAM_HOLE=14,
L040_OFFSET_P1=0,
ENABLE_TOOL_BETWEEN_VICES=0,
}
local Machine = { Offsets=Offsets, Trave=Trave, User=User}
return Machine
+1635
View File
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
+1788
View File
File diff suppressed because it is too large Load Diff
+1568
View File
File diff suppressed because it is too large Load Diff
+3855
View File
File diff suppressed because it is too large Load Diff
+38
View File
@@ -0,0 +1,38 @@
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-FAST"
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"
REM copio i file compilati nel percorso temporaneo per i compilati
\EgtProg\Dll32\luac54 -o %fullPathSource%\bin\%machineName%\Common-FAST.mlpe -s Common-FAST.mlpe
\EgtProg\Dll32\luac54 -o %fullPathSource%\bin\%machineName%\Common-FAST.mlse -s Common-FAST.mlse
\EgtProg\Dll32\luac54 -o %fullPathSource%\bin\%machineName%\Common-FAST.NUM.mlpe -s Common-FAST.NUM.mlpe
\EgtProg\Dll32\luac54 -o %fullPathSource%\bin\%machineName%\Common-FAST.NUM_PLUS.mlpe -s Common-FAST.NUM_PLUS.mlpe
\EgtProg\Dll32\luac54 -o %fullPathSource%\bin\%machineName%\Common-FAST.TPA.mlpe -s Common-FAST.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\
BIN
View File
Binary file not shown.
+50
View File
@@ -0,0 +1,50 @@
; Commento per evitare BOM con UTF-8
;Index = Type, Description, Default Value
; Type : b=boolean, d=double, l=lenght, s=string
[Drilling]
[Sawing]
[Milling]
0=d,MaxElev,0
1=d,OutRaw,0
2=d,SideElev,0
3=d,TrimExt,0
4=sr,VtFaceUse,0,0,0
[Pocketing]
0=d,MaxElev,0
1=b,Open,0
2=d,OpenMinSave,0
3=d,OpenOutRaw,0
4=d,MaxOptSize,0
[Mortising]
0=d,MaxElev,0
[Chiseling]
[SawRoughing]
[SawFinishing]
[GenMachining]
0=l,LinTol,0.1
1=l,MaxLen,2
2=s,Type,ZigZag
3=d,SideAng,90
4=l,Step,10
5=l,OffsProj,0
6=l,LiTang,0
7=l,LiOrth,0
8=l,LiElev,0
9=l,LoTang,0
10=l,LoOrth,0
11=l,LoElev,0
12=b,DirFromGuide,1
[SurfRoughing]
[SurfFinishing]
0=b,SkipMaxDown,1
Binary file not shown.
Binary file not shown.
+101
View File
@@ -0,0 +1,101 @@
; Commento per evitare BOM con UTF-8
[General]
Material=Beam
NCType=1 ; 1=Tpa, 2=Num Flexium
Flow=2 ; 1=one by one, 2=continuous
[Axes]
; 1 = Type, Id, Name
; Type => l=linear;r=rotational
1=l,0,X
2=l,1,Y
3=l,2,Z
4=r,3,C
5=r,4,B
[MainVariables]
; 1 = Name, Variable Path, ReadType, Type
; ReadType => o=one time;c=continuous
; Type => plc;cn
;1=AsseX, 0.TESTA.X, c, plc
;2=AsseY, 0.ENTRATA.Y, c, plc
;3=AsseZ, 0.TESTA.Z, c, plc
;4=AsseB, 0.TESTA.B, c, plc
1=P_Prod, 0.FUNM.E81295, c, plc
2=P_Machgroup, 0.FUNM.E81296, c, plc
3=P_Part, 0.FUNM.E81297, c, plc
4=P_State, 0.FUNM.E81298, c, plc
5=Reset_State, 0.FUNM.E80048, c, plc
6=V1, 0.ENTRATA.V01NextPiece, c, plc
7=V2, 0.ENTRATA.V02NextPiece, c, plc
8=V3, 0.ENTRATA.V03NextPiece, c, plc
9=V4, 0.ENTRATA.V04NextPiece, c, plc
10=V5, 0.ENTRATA.V05NextPiece, c, plc
11=V6, 0.ENTRATA.V06NextPiece, c, plc
12=V7, 0.ENTRATA.V07NextPiece, c, plc
13=V8, 0.ENTRATA.V08NextPiece, c, plc
14=V9, 0.ENTRATA.V09NextPiece, c, plc
15=V10, 0.ENTRATA.V10NextPiece, c, plc
[Tools]
Drillbit=1
Sawblade=1
Mill=1
Mortise=1
Chisel=0
DrillMaker=MakeWoodDrill.lua
SawbladeMaker=MakeSawblade.lua
MillMaker=MakeWoodCylMill.lua
MortiseMaker=MakeMortise.lua
ChiselMaker=MakeChisel.lua
Active=1
[ToolHolder]
H1.1=Standard.nge
H1.1:MILL_NOTIP=MillNoTip.nge
H2.1=Saw.nge
H3.1=ChainSaw.nge
H5.1=AngTransm.nge
H5.2=AngTransm.nge
H6.1=AngTransm.nge
H6.2=AngTransm.nge
[Machinings]
Drilling=1
Sawing=1
Milling=1
Pocketing=1
Mortising=1
Chiseling=0
SawRoughing=0
SawFinishing=0
GenMachining=0
SurfFinishing=0
[Machining]
InitScript=InitMach.lua
ExitScript=ExitMach.lua
[Disposition]
;InitScript=InitDisp.lua
[Heads]
; 5 axis head
H1=6608
; 5 axis saw
H2=6615
; Chainsaw
H3=6616
; Angular transmission
H5=6603
[SetUp]
Default=Standard
[Estimations]
Enable=1
WinPlace=0,458,74,669,933
[VMill]
Enable=1
Save=0
+662
View File
@@ -0,0 +1,662 @@
-- Descrizione macchina Essetre-FAST by EgalTech s.r.l. 2024/03/28
-- 2021/12/29 DS ver 2.3l4 Per NUM non va considerato MillOffs negli offset in Z.
-- 2022/01/27 DS ver 2.4a2 Modifiche per tagli testa/coda su pezzi alti.
-- 2022/02/10 DS ver 2.4a3 Ridotto di 10mm pinzaggio con pezzi alti ma sottili.
-- 2022/02/26 DS ver 2.4b1 Aggiunta verifica collisioni spalle per sega a catena.
-- 2022/03/19 DS ver 2.4c1 Unificazione con BH.
-- 2022/05/24 DS ver 2.4e1 Corretto carico utensile punta lunga su T111.
-- 2022/05/24 DS ver 2.4e2 Corretto scarico utensile punta lunga su T111.
-- 2022/06/16 DS ver 2.4f1 Per Rinvio Angolare SecondSupport >= 3, se 2 è Mortiser. Aggiunta gestione Dist per seghe a catena e mortasatrici.
-- 2022/07/22 DS ver.2.4g2 Modifiche per ribaltamento pezzo con molto scarto iniziale.
-- 2022/07/29 DS ver.2.4g3 Migliorata modellazione testa con solidi per collisione.
-- 2022/08/17 DS ver 2.4h1 Correzione nuova gestione distanza di sega a catena.
-- 2022/08/24 DS ver 2.4h2 Correzioni per rinvio angolare (Angular Transmission).
-- 2022/09/20 DS ver 2.4i1 Aggiunta gestione NUM FlexiumPlus (NUM_PLUS).
-- 2022/10/22 DS ver 2.4j3 Ottimizzazioni per NUM FlexiumPlus.
-- 2022/11/09 DS ver 2.4k1 Per Num e NumPlus ora E30033 è ST (dim. verticale) e E30036 è HT (dim. orizzontale).
-- 2022/12/05 DS ver 2.4l1 In OnLinear di genera CN per Num e NumPlus eliminato recupero sovramateriale di testa EMT.X_OFF dopo riutilizzo EMT.L1o.
-- 2023/01/23 DS Ver.2.5a2 In simulazione corretta visualizzazione Sega a catena.
-- 2023/02/09 DS Ver.2.5b1 Correzioni NumPlus per parametri G115 e EG2/EG3 al cambio orientazione sega a catena.
-- 2023/03/20 DS Ver.2.5c1 Inserita gestione fresa BH al posto della lama.
-- 2023/07/26 DS ver.2.5g1 Per NUM e NUM_PLUS aggiunta gestione rotazione in alto su pezzi alti (G101 EH1) come per TPA in versione 2.3f2.
-- 2023/07/26 DS ver.2.5g2 Per NUM e NUM_PLUS tolta segnalazione errore rotazione a Zmax per pezzi alti non gestita (era su EMT.FLAG == 5).
-- 2023/07/27 DS ver.2.5g3 Il parametro di cui alle modifiche precedenti ora viene emesso solo se anche EMT.FLAG2==1.
-- 2023/08/17 DS ver 2.5h2 Possibilità di nuova gestione SawCOffs e SawBOffs con flag NewBCOffs.
-- 2023/08/22 DS ver 2.5h3 Eliminata nuova gestione di 2.5h2 perchè inclinando la direzione utensile rispetto al primo rotante limitava le direzioni raggiungibili.
-- 2023/09/29 ver 2.5i1 In BeamData e mlde aggiunta la lettura di alcuni parametri da Ts3Data.
-- 2023/10/18 DS ver 2.5j1 Con SpliRot ora si assegna da primo movimento di M111/G111 a EE/P8 il corretto valore 2.
-- 2023/10/19 DS ver 2.5j2 Per NUM_PLUS correzione per scarico con pezzo dopo oppure passando da Y a V per eliminare ET2 e scommentare ET2004.
-- 2023/10/21 DS ver 2.5j3 Gestione caso speciale di rotazione dopo separazione senza lavorazioni sul posizionamento finale.
-- 2023/11/04 DS ver 2.5k1 Eliminata testa H4. Aggiunta visualizzazione rinvio su TC.Aggiunta gestione MIN_MACH_VER per simulazione e generazione.
-- 2023/12/13 AV ver.2.5l1 Piccola correzione per errore digitazione variabile in calcolo riposizionamento carrelli (SpecAdjustCarrB3)
-- Corretto segno di una variabile in calcolo posizionamento carrelli
-- 2023/12/15 AV ver.2.5l2 Migliorato calcolo stima tempi di lavorazione
-- 2024/01/19 DS ver 2.6a1 Piccola modifica per direzione preferenziale rinvio da sotto (per evitare di accedere dal lato della barra).
-- 2024/01/29 DS ver 2.6a2 In portautensili per mortasa e sega a catena aggiunti ingombri dello stesso.
-- 2024/02/09 LM ver 2.6b1 In BeamData aggiunta funzione GetBlockedAxis che sostituisce la GetChainSawBlockedAxis.
-- 2024/02/23 AV ver 2.6c1 Prima versione con post-processore common
-- Allineamento con common ver. 2.6c1
-- 2024/02/23 AV ver 2.6c2 Rimossa chiamata funzione EgtGetSourceDir
-- Allineamento con common ver. 2.6c2
-- 2024/02/23 AV ver 2.6c3 Allineamento con common ver. 2.6c3
-- 2024/02/27 AV ver 2.6c4 Allineamento con common ver. 2.6c4. Aggiunto parametro 'SafeXRotAxes' per rotazione motosega con pezzi alti
-- 2024/02/29 AV ver 2.6c5 Allineamento con common ver. 2.6c5
-- 2024/03/04 AV ver 2.6c6 Modificato log con nome macchina
-- Allineamento con common ver. 2.6c6
-- 2024/03/09 DS ver 2.6c7 Migliorie alla geometria macchina e suo caricamento.
-- 2024/03/12 AV ver 2.6c8 Allineamento con common ver. 2.6c7.
-- 2024/03/28 DS ver 2.6c9 Modificata posizione supporto rinvio.
-- 2024/03/28 AV ver 2.6d1 Allineamento con common ver. 2.6c8
-- 2024/04/15 AV ver 2.6d2 Allineamento con common ver. 2.6d1
-- 2024/04/18 AV ver 2.6d3 Allineamento con common ver. 2.6d2
-- 2024/04/30 AV ver 2.6e1 Allineamento con common ver. 2.6e1
-- Aggiunta variabile WoodDensity per gestione WOOD_DENSITY
-- 2024/05/06 AV ver 2.6e2 Allineamento con common ver. 2.6e2
-- 2024/05/06 AV ver 2.6e3 Allineamento con common ver. 2.6e3
-- Aggiunte variabili MinJoin(xx) per gestione MIN_JOIN_(xx)
-- 2024/06/03 AV ver 2.6f1 Aggiunta funzione GetSetupInfo a BeamData per nuovo automatismo
-- 2024/06/13 LM ver 2.6f2 Aggiunta lettura NewTopC da offset Ts3
-- 2024/06/13 AV ver 2.6f3_Dev Per controllo NUM, se arco maggiore di 99999mm, si approssima con una retta.
-- 2024/07/03 AV ver 2.6g1 Allineamento con common ver. 2.6g1
-- 2024/07/04 LM ver 2.6g2 In MachData.ini aggiunto MIN_JOIN_SS
-- 2024/09/02 AV ver 2.6i1 Allineamento con common ver. 2.6i1, Rimossi file "Common-"
-- 2024/09/02 AV ver 2.6i2 Corretto file YML per compilare file "Common_"
-- 2024/09/05 LM ver 2.6i3 In BeamData aggiunte costanti MIN_HEIGHT_ADDED_CUTS, PRECUT_HEAD, PRECUT_TAIL
-- 2024/09/06 LM ver 2.6i4 In BeamData le costanti sopra sono configurabili anche da offsets Ts3v7
-- 2024/09/16 AV ver 2.6i5 Allineamento con common ver. 2.6i2
require( 'EmtGenerator')
EgtEnableDebug( false)
PP_VER = '2.6i10'
PP_NVER = '2.6.9.10'
MIN_MACH_VER = '2.5k1'
MACH_NAME = 'Essetre-FAST'
-- 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')
local BD = require( 'BeamData')
local INFO_STD_PP = require( 'Version')
-- prendo la versione kernel minima necessaria più 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 o NUM_PLUS
MinX = 0
MaxX = 1350
MinZ = -1350
MaxZ = 0
MinB = -180
MaxB = 360
MinC = -360
MaxC = 360
MinY = 110.0
MaxY = 3760.0
ParkY = 480.0
MinV = -3760.0
MaxV = -110.0
ParkV = -480.0
LoadT = 1454.2
UnloadT = -1700
MaxOpen = 305
MillOffs = 177.35
SawOffs = -242.68
SawBOffs = 0
SawCOffs = 0
ChSawLen = 90.0
AngTr1Offs = 170
AngTr1Len = 150
TurnerOffs = 200.0
DeltaTabY = 898.0
DeltaTabZ = -1017.8 + MillOffs -- per TPA : -1013.3 + MillOffs -- per NUM : -838.4
DimTabY = 400
DimTabX = 34000
LenToPress = 900
StartRotation = true
AutomaticRotation = true
AutoRotMinLen = 2600
DefTcPos = 'T2'
SecondSupport = 0
SpecialBH = false
MaxUnloadLen = 0
BeamHeightForFixRot = 9999 -- per abilitare assegnare 500
CoeffVM = 0.5
NewTopC = true
SafeXRotAxes = 150
-- leggo e aggiorno con parametri da BeamData
if BD then
BeamHeightForFixRot = BD.MAX_HEIGHT_ROT_B_ABOVE or BeamHeightForFixRot
end
-- Aggiornamento con dati da TechnoEssetre7
local sTs3Data = EgtGetStringFromIni( 'Beam', 'DATA_DIR', "C:\\TechnoEssetre7\\EgtData", EgtGetIniFile()).."\\Essetre-Fast.data"
local sData = sMachDir .. "\\Beam\\Ts3Data.lua"
if EgtExistsFile( sTs3Data) then
EgtCopyFile( sTs3Data, sData)
local sTs3DataOld = sTs3Data..'.old'
EgtEraseFile( sTs3DataOld)
EgtRenameFile( sTs3Data, sTs3DataOld)
end
if EgtExistsFile( sData) then
local Machine = dofile( sData)
if Machine then
if Machine.Offsets then
if Machine.Offsets.TIPO_CN == 0 then
NumericalControl = 'NUM'
elseif Machine.Offsets.TIPO_CN == 2 then
NumericalControl = 'NUM_PLUS'
else
NumericalControl = 'TPA'
end
if Machine.Offsets.MAX_X then MinX = - Machine.Offsets.MAX_X end
if Machine.Offsets.MIN_X then MaxX = - Machine.Offsets.MIN_X end
if Machine.Offsets.MIN_Z then MinZ = Machine.Offsets.MIN_Z end
if Machine.Offsets.MAX_Z then MaxZ = Machine.Offsets.MAX_Z end
if Machine.Offsets.MIN_B then MinB = Machine.Offsets.MIN_B end
if Machine.Offsets.MAX_B then MaxB = Machine.Offsets.MAX_B end
if Machine.Offsets.MIN_C then MinC = Machine.Offsets.MIN_C end
if Machine.Offsets.MAX_C then MaxC = Machine.Offsets.MAX_C end
MinY = Machine.Offsets.MIN_Y or Machine.Offsets.MINY or MinY
MaxY = Machine.Offsets.MAX_Y or Machine.Offsets.MAXY or MaxY
ParkY = Machine.Offsets.PARKYY or ParkY
MinV = Machine.Offsets.MIN_V or Machine.Offsets.MINV or MinV
MaxV = Machine.Offsets.MAX_V or Machine.Offsets.MAXV or MaxV
ParkV = Machine.Offsets.PARKVV or ParkV
if Machine.Offsets.YCARICO then LoadT = - Machine.Offsets.YCARICO end
if Machine.Offsets.YSCARICO then UnloadT = - Machine.Offsets.YSCARICO end
if Machine.Offsets.PIVOTFRESA then MillOffs = - Machine.Offsets.PIVOTFRESA end
if Machine.Offsets.PIVOTLAMA then SawOffs = - Machine.Offsets.PIVOTLAMA end
if Machine.Offsets.OFFSETBLAMA then SawBOffs = Machine.Offsets.OFFSETBLAMA end
if Machine.Offsets.OFFSETCLAMA then SawCOffs = Machine.Offsets.OFFSETCLAMA end
if Machine.Offsets.OFFSETZ_RINV_1 then AngTr1Offs = Machine.Offsets.OFFSETZ_RINV_1 - EgtIf( NumericalControl == 'TPA', MillOffs, 0) end
AngTr1Len = Machine.Offsets.OFFSETX_RINV_1 or AngTr1Len
--if Machine.Offsets.OFFSETZ_RINV_2 then AngTr2Offs = Machine.Offsets.OFFSETZ_RINV_2 - EgtIf( NumericalControl == 'TPA', MillOffs, 0) end
--AngTr2Len = Machine.Offsets.OFFSETX_RINV_2 or AngTr2Len
TurnerOffs = Machine.Offsets.OFFSETRIB or TurnerOffs
if Machine.Offsets.OFFSETX then DeltaTabY = - Machine.Offsets.OFFSETX end
if Machine.Offsets.OFFSETZ then DeltaTabZ = Machine.Offsets.OFFSETZ + EgtIf( NumericalControl == 'TPA', MillOffs, 0) end
if Machine.Offsets.SECSUP then SecondSupport = Machine.Offsets.SECSUP end
if Machine.Offsets.BLOCKHAUS then SpecialBH = ( Machine.Offsets.BLOCKHAUS == 1) end
if Machine.Offsets.RIB_AUTO then AutomaticRotation = ( Machine.Offsets.RIB_AUTO == 1) end
if Machine.Offsets.NOULOAD then MaxUnloadLen = Machine.Offsets.NOULOAD end
if Machine.Offsets.DEFTCPOS then DefTcPos = ( 'T' .. Machine.Offsets.DEFTCPOS) end
if Machine.Offsets.WOOD_DENSITY then WoodDensity = Machine.Offsets.WOOD_DENSITY end
if Machine.Offsets.MIN_JOIN_VV then MinJoinVV = Machine.Offsets.MIN_JOIN_VV end
if Machine.Offsets.MIN_JOIN_SS then MinJoinSS = Machine.Offsets.MIN_JOIN_SS end
if Machine.Offsets.MIN_JOIN_LS then MinJoinLS = Machine.Offsets.MIN_JOIN_LS end
if Machine.Offsets.MIN_JOIN_SL then MinJoinSL = Machine.Offsets.MIN_JOIN_SL end
if Machine.Offsets.MIN_JOIN_LL then MinJoinLL = Machine.Offsets.MIN_JOIN_LL end
if Machine.Offsets.NEWTOPC then NewTopC = ( Machine.Offsets.NEWTOPC == 1) end
end
end
end
if SpecialBH then SecondSupport = 0 end
EmtGeneral {
File='Essetre-FAST.nge',
Offset = Vector3d( 0, 1150.16, -1500.0),
AxisMaxAdjust = 30,
AxisMaxRotAdj = 0.5,
ExitMaxAdjust = 30,
ExitMaxRotAdj = 0.5,
AngDeltaMinForHome = 165,
Special = 'Common_FAST.mlse',
Processor = 'Common_FAST.mlpe'}
local BaseId = EmtBase {
Name = 'Base',
Geo='BASE/GEO',
Aux={'BASE/SOLID', 'BASE/TC', 'BASE/SIGN', 'BASE/COLLISION'}}
local XId = EmtAxis {
Name = 'X',
Parent = 'Base',
Invert = true,
Type = MCH_AT.LINEAR,
Dir = Y_AX(),
Pos = Point3d( -639.5, 372.66, 945.7),
Stroke = {MinX, MaxX},
Home = 0,
Geo = 'X_AXIS/GEO',
Aux = 'X_AXIS/SOLID'}
EmtAxis {
Name = 'Z',
Parent = 'X',
Type = MCH_AT.LINEAR,
Dir = Z_AX(),
Pos = Point3d( -19.25, -113.54, 790.0),
Stroke = {MinZ, MaxZ},
Home = MaxZ,
Geo = 'Z_AXIS/GEO',
Aux = {'Z_AXIS/SOLID', 'Z_AXIS/COLLISION'}}
local CId = EmtAxis {
Name = 'C',
Parent = 'Z',
Type = MCH_AT.ROTARY,
Dir = Z_AX(),
Pos = Point3d( 0, 0, 0),
Stroke = {MinC, MaxC},
Home = 0,
Geo = 'C_AXIS/GEO',
Aux = {'C_AXIS/SOLID', 'C_AXIS/COLLISION'}}
if NewTopC then
local vtMove = Vector3d( 65,0,0)
local SolidArmId = EgtGetFirstNameInGroup( EgtGetFirstNameInGroup( CId, 'SOLID'), 'ARM')
if EgtSurfTmMoveFacet then
EgtSurfTmMoveFacet( SolidArmId, 11, vtMove, GDB_RT.GLOB)
else
EgtSurfTmMoveVertex( SolidArmId, 23, EgtSurfTmGetVertex( SolidArmId, 23, GDB_RT.GLOB) + vtMove, GDB_RT.GLOB)
EgtSurfTmMoveVertex( SolidArmId, 25, EgtSurfTmGetVertex( SolidArmId, 25, GDB_RT.GLOB) + vtMove, GDB_RT.GLOB)
EgtSurfTmMoveVertex( SolidArmId, 35, EgtSurfTmGetVertex( SolidArmId, 35, GDB_RT.GLOB) + vtMove, GDB_RT.GLOB)
EgtSurfTmMoveVertex( SolidArmId, 36, EgtSurfTmGetVertex( SolidArmId, 36, GDB_RT.GLOB) + vtMove, GDB_RT.GLOB)
end
local CollTopId = EgtGetFirstNameInGroup( EgtGetFirstNameInGroup( CId, 'COLLISION'), 'TOP')
EgtMove( CollTopId, vtMove, GDB_RT.GLOB)
EgtSetName( CollTopId, 'BOX')
else
local CollTopId = EgtGetFirstNameInGroup( EgtGetFirstNameInGroup( CId, 'COLLISION'), 'TOP')
EgtSetName( CollTopId, 'BOX')
end
EmtAxis {
Name = 'B',
Parent = 'C',
Type = MCH_AT.ROTARY,
Dir = X_AX(),
Pos = Point3d( 0, 0, MillOffs),
Stroke = {MinB, MaxB},
Home = 0,
Geo = 'B_AXIS/GEO',
Aux = {'B_AXIS/SOLID', 'B_AXIS/COLLISION'}}
-- Frese
local H1Id = EmtHead {
Name = 'H1',
Parent = 'B',
HSet = 'H1',
Type = MCH_HT.STD,
Pos = Point3d( 0, 0, 0),
TDir = Z_AX(),
ADir = X_AX(),
Rot1W = 2,
OthColl = {'H2', 'B/SOLID', 'C/SOLID'},
Geo = 'H1_HEAD/GEO'}
EgtSetInfo( H1Id, 'ZMAXONROT', '1,60')
if BeamHeightForFixRot < 1000 then
EgtSetInfo( H1Id, 'ROTATZMAX', '1')
end
-- Lama
local H2Id = EmtHead {
Name = 'H2',
Parent = 'B',
HSet = 'H2',
Type = MCH_HT.STD,
Pos = Point3d( 0, 0, ( MillOffs - SawOffs)),
TDir = VectorFromRotated( -Z_AX(), X_AX(), -SawBOffs),
ADir = X_AX(),
Rot1W = 0.2,
OthColl = {'H1', 'H3', 'B/SOLID', 'C/SOLID'},
Geo = 'H2_HEAD/GEO'}
EgtSetInfo( H2Id, 'ZMAXONROT', '1,5')
if BeamHeightForFixRot < 1000 then
EgtSetInfo( H2Id, 'ROTATZMAX', '1')
end
-- Sega a catena
EmtAxis {
Name = 'A',
Parent = 'B',
Token = '**',
Type = MCH_AT.ROTARY,
Dir = Z_AX(),
Pos = Point3d( 0, 0, 0),
Stroke = { 0, 270},
Home = 0,
Geo = 'A_AXIS/GEO'}
local H3Id = EmtHead {
Name = 'H3',
Parent = 'A',
HSet = 'H1',
Type = MCH_HT.STD,
Pos = Point3d( 0, 0, -ChSawLen),
TDir = X_AX(),
ADir = Z_AX(),
Rot1W = 0.2,
SolCh = MCH_SCC.ADIR_NEAR,
OthColl = {'H2', 'B/SOLID', 'C/SOLID'},
Geo = 'H3_HEAD/GEO'}
EgtSetInfo( H3Id, 'ZMAXONROT', '1,5')
if BeamHeightForFixRot < 1000 then
EgtSetInfo( H3Id, 'ROTATZMAX', '1')
end
-- Eventuale rinvio angolare
if SecondSupport >= 3 then
local H5Id = EmtHead {
Name = 'H5',
Parent = 'B',
HSet = 'H1',
Type = MCH_HT.MULTI,
ExitNbr = 2,
Pos1 = Point3d( 0, -AngTr1Len, -AngTr1Offs),
TDir1 = Y_AX(),
Pos2 = Point3d( 0, AngTr1Len, -AngTr1Offs),
TDir2 = -Y_AX(),
ADir = Z_AX(),
Rot1W = 0.2,
Rot2Stroke = { -120, 120},
OthColl = { 'H2', 'B/SOLID', 'C/SOLID'},
Geo = 'H5_HEAD/GEO',
Aux = {'H5_HEAD/SOLID', 'H5_HEAD/COLLISION'}}
EgtSetInfo( H5Id, 'AGB_TYPE', 2)
EgtSetInfo( H5Id, 'AGB_DMAX', 240)
EgtSetInfo( H5Id, 'AGB_ENCH', 44)
EgtSetInfo( H5Id, 'AGB_ENCV', 380)
EgtSetInfo( H5Id, 'AGB_MDIR', X_AX())
EgtSetInfo( H5Id, 'ZMAXONROT', '1,15')
end
-- Morse
local YId = EmtAxis {
Name = 'Y',
Parent = 'Base',
Type = MCH_AT.LINEAR,
Dir = -X_AX(),
Pos = Point3d( -953.0, 111.75, 1450.0),
Stroke = { MinY, MaxY},
Home = ParkY,
Geo = 'Y_AXIS/GEO',
Aux = {'Y_AXIS/SOLID', 'Y_AXIS/COLLISION'}}
local PYId = EmtAxis {
Name = 'PY',
Parent = 'Y',
Type = MCH_AT.LINEAR,
Dir = -Y_AX(),
Pos = Point3d( -904.0, -276.5, 1449.0),
Stroke = { 0, MaxOpen},
Home = MaxOpen,
Geo = 'PY_AXIS/GEO',
Aux = {'PY_AXIS/SOLID', 'PY_AXIS/COLLISION'}}
local VId = EmtAxis {
Name = 'V',
Parent = 'Base',
Type = MCH_AT.LINEAR,
Dir = -X_AX(),
Pos = Point3d( 953.0, 111.75, 1450.0),
Stroke = { MinV, MaxV},
Home = ParkV,
Geo = 'V_AXIS/GEO',
Aux = {'V_AXIS/SOLID', 'V_AXIS/COLLISION'}}
local PVId = EmtAxis {
Name = 'PV',
Parent = 'V',
Type = MCH_AT.LINEAR,
Dir = -Y_AX(),
Pos = Point3d( 904.0, -276.5, 1449.0),
Stroke = { 0, MaxOpen},
Home = MaxOpen,
Geo = 'PV_AXIS/GEO',
Aux = {'PV_AXIS/SOLID', 'PV_AXIS/COLLISION'}}
EmtAxis {
Name = 'T',
Parent = 'Base',
--Token = '**',
Type = MCH_AT.LINEAR,
Dir = - X_AX(),
Pos = Point3d( 0, 613.16, -830.037),
Stroke = { -30000, 30000},
Home = LoadT,
Geo = 'T_AXIS/GEO'}
EmtTable {
Name = 'Tab',
Parent = 'T',
Type = MCH_TT.FLAT,
Ref1 = Point3d( -DimTabX, DeltaTabY - DimTabY, DeltaTabZ),
Scale = { DimTabX / 20000, DimTabY / 400, 1},
Geo = 'TABLE/GEO',
Aux = 'TABLE/SOLID'}
-- ToolChanger
EmtTcPos {
Name = 'T1',
Parent = 'Base',
Pos = Point3d( 523.8, 88.0, 172.5),
TDir = -X_AX(),
ADir = -Y_AX(),
Geo = 'BASE/T1'}
EmtTcPos {
Name = 'T2',
Parent = 'Base',
Pos = Point3d( 523.8, 88.0, 67.5),
TDir = -X_AX(),
ADir = -Y_AX(),
Geo = 'BASE/T2'}
EmtTcPos {
Name = 'T3',
Parent = 'Base',
Pos = Point3d( 523.8, 88.0, -37.5),
TDir = -X_AX(),
ADir = -Y_AX(),
Geo = 'BASE/T3'}
EmtTcPos {
Name = 'T4',
Parent = 'Base',
Pos = Point3d( 523.8, 88.0, -142.5),
TDir = -X_AX(),
ADir = -Y_AX(),
Geo = 'BASE/T4'}
EmtTcPos {
Name = 'T5',
Parent = 'Base',
Pos = Point3d( 523.8, 88.0, -247.5),
TDir = -X_AX(),
ADir = -Y_AX(),
Geo = 'BASE/T5'}
EmtTcPos {
Name = 'T6',
Parent = 'Base',
Pos = Point3d( 523.8, 88.0, -352.5),
TDir = -X_AX(),
ADir = -Y_AX(),
Geo = 'BASE/T6'}
EmtTcPos {
Name = 'T7',
Parent = 'Base',
Pos = Point3d( 523.8, 88.0, -457.5),
TDir = -X_AX(),
ADir = -Y_AX(),
Geo = 'BASE/T7'}
EmtTcPos {
Name = 'T8',
Parent = 'Base',
Pos = Point3d( 523.8, 88.0, -562.5),
TDir = -X_AX(),
ADir = -Y_AX(),
Geo = 'BASE/T8'}
EmtTcPos {
Name = 'T9',
Parent = 'Base',
Pos = Point3d( 523.8, 88.0, -667.5),
TDir = -X_AX(),
ADir = -Y_AX(),
Geo = 'BASE/T9'}
EmtTcPos {
Name = 'T10',
Parent = 'Base',
Pos = Point3d( 523.8, 88.0, -772.5),
TDir = -X_AX(),
ADir = -Y_AX(),
Geo = 'BASE/T10'}
EmtTcPos {
Name = 'T11',
Parent = 'Base',
Pos = Point3d( 523.8, 88.0, -877.5),
TDir = -X_AX(),
ADir = -Y_AX(),
Geo = 'BASE/T11'}
if not SpecialBH then
EmtTcPos {
Name = 'T101',
Parent = 'Base',
Pos = Point3d( -510.4, 113.2, -160.8),
TDir = X_AX(),
ADir = Z_AX(),
Geo = 'BASE/T101'}
else
EmtTcPos {
Name = 'T101',
Parent = 'Base',
Pos = Point3d( -510.4, 113.2, -1160.8),
TDir = X_AX(),
ADir = Z_AX(),
Geo = 'BASE/T101S'}
end
if SecondSupport == 1 then
-- supporto per punta
EmtTcPos {
Name = 'T111',
Parent = 'Base',
Pos = Point3d( -510.4, 113.2, -329.8),
TDir = Z_AX(),
ADir = X_AX(),
Geo = 'BASE/T111'}
elseif SecondSupport == 2 then
-- supporto per mortasatrice
local TcpSsId = EmtTcPos {
Name = 'T111',
Parent = 'Base',
Pos = Point3d( -510.4, 113.2, -430.8),
TDir = X_AX(),
ADir = Z_AX(),
Geo = 'BASE/T111M'}
EgtSetInfo( TcpSsId, 'Mortiser', true)
elseif SecondSupport == 3 then
-- supporto per rinvio angolare
local TcpSsId = EmtTcPos {
Name = 'T91',
Parent = 'Base',
ExitNbr = 2,
Pos1 = Point3d( -710.4-150, 113.2, -329.8-170),
TDir1 = X_AX(),
Pos2 = Point3d( -710.4+150, 113.2, -329.8-170),
TDir2 = -X_AX(),
ADir = Z_AX(),
Geo = 'BASE/T91',
Aux = 'BASE/T91_HS'}
end
if SpecialBH then
EmtTcPos {
Name = 'T111',
Parent = 'Base',
Pos = Point3d( -810.4, 113.2, -329.8),
TDir = Y_AX(),
ADir = X_AX(),
Geo = 'BASE/T111S'}
end
-- Aggiusto posizioni geometriche
local vtMove = Vector3d( 0, ( DeltaTabY - 913.16), ( DeltaTabZ + 830.037))
local vtMoveX = Vector3d( 0, 0, ( DeltaTabZ + 830.037))
EgtMove( EgtGetFirstNameInGroup( BaseId, 'SOLID'), vtMove, GDB_RT.GLOB)
EgtMove( EgtGetFirstNameInGroup( BaseId, 'TC'), vtMove, GDB_RT.GLOB)
EgtMove( EgtGetFirstNameInGroup( BaseId, 'SIGN'), vtMove, GDB_RT.GLOB)
EgtMove( EgtGetFirstNameInGroup( BaseId, 'COLLISION'), vtMove, GDB_RT.GLOB)
EgtMove( EgtGetFirstNameInGroup( YId, 'SOLID'), vtMove, GDB_RT.GLOB)
EgtMove( EgtGetFirstNameInGroup( YId, 'COLLISION'), vtMove, GDB_RT.GLOB)
EgtMove( EgtGetFirstNameInGroup( PYId, 'SOLID'), vtMove, GDB_RT.GLOB)
EgtMove( EgtGetFirstNameInGroup( PYId, 'COLLISION'), vtMove, GDB_RT.GLOB)
EgtMove( EgtGetFirstNameInGroup( VId, 'SOLID'), vtMove, GDB_RT.GLOB)
EgtMove( EgtGetFirstNameInGroup( VId, 'COLLISION'), vtMove, GDB_RT.GLOB)
EgtMove( EgtGetFirstNameInGroup( PVId, 'SOLID'), vtMove, GDB_RT.GLOB)
EgtMove( EgtGetFirstNameInGroup( PVId, 'COLLISION'), vtMove, GDB_RT.GLOB)
EgtMove( EgtGetFirstNameInGroup( XId, 'SOLID'), vtMoveX, GDB_RT.GLOB)
-- Assegno identificativi alle spie delle morse
PYLightId = EgtGetFirstNameInGroup( EgtGetFirstNameInGroup( PYId, 'SOLID') or GDB_ID.NULL, 'Light')
PVLightId = EgtGetFirstNameInGroup( EgtGetFirstNameInGroup( PVId, 'SOLID') or GDB_ID.NULL, 'Light')
---------------------------------------------------------------------
-- Funzioni richiamate per modificare i dati macchina in casi particolari
--function OnSetTable()
--end
---------------------------------------------------------------------
function OnSetHead()
-- se testa lama
if EMC.HEAD == 'H2' then
EmtModifyAxisDirection( 'B', VectorFromRotated( X_AX(), Z_AX(), -SawCOffs))
-- altrimenti
else
EmtModifyAxisDirection( 'B', X_AX())
if EMC.HEAD == 'H3' then
local dDist = EgtIf( EMC.DIST and abs( EMC.DIST) > 1, EMC.DIST, ChSawLen)
EmtModifyExitPosition( EMC.HEAD, EMC.EXIT, Point3d( 0, 0, -dDist))
if not EMC.VER or EMC.VER < '2.5h2' then
local vtMove = Point3d( 0, 0, -dDist) - Point3d( EMC.EXITPOS)
local ExitId = EgtGetFirstNameInGroup( EgtGetHeadId( EMC.HEAD), 'T'..tostring( EMC.EXIT))
EgtMove( ExitId, vtMove)
end
end
end
end
---------------------------------------------------------------------
-- Funzione per impostare spia stato morsa carrello Y
function SetPYLight( bClosed)
if not PYLightId then return end
EgtSetColor( PYLightId, EgtIf( bClosed, 'RED', 'LIME'))
if bClosed then
EgtSetInfo( PYLightId, 'On', '1')
else
EgtRemoveInfo( PYLightId, 'On')
end
end
---------------------------------------------------------------------
-- Funzione per leggere lo stato della morsa carrello Y
function GetPYLight()
if not PYLightId then return false end
return ( EgtGetInfo( PYLightId, 'On') == '1')
end
---------------------------------------------------------------------
-- Funzione per impostare spia stato morsa carrello V
function SetPVLight( bClosed)
if not PVLightId then return end
EgtSetColor( PVLightId, EgtIf( bClosed, 'RED', 'LIME'))
if bClosed then
EgtSetInfo( PVLightId, 'On', '1')
else
EgtRemoveInfo( PVLightId, 'On')
end
end
---------------------------------------------------------------------
-- Funzione per leggere lo stato della morsa carrello V
function GetPVLight()
if not PVLightId then return false end
return ( EgtGetInfo( PVLightId, 'On') == '1')
end
---------------------------------------------------------------------
-- Funzione per resettare tutte le attivazioni della macchina
function OnResetMachine()
EmtUnlinkAllRawPartsFromGroups()
EmtUnlinkAllFixturesFromGroups()
SetPYLight( false)
SetPVLight( false)
-- nascondo Vmill
local nRawId = EgtGetFirstRawPart()
while nRawId do
local nVmId = EgtGetFirstNameInGroup( nRawId, 'VMill')
local nId = EgtGetFirstInGroup( nRawId)
while nId do
EgtSetStatus( nId, EgtIf( nId ~= nVmId, GDB_ST.ON, GDB_ST.OFF))
nId = EgtGetNext( nId)
end
nRawId = EgtGetNextRawPart( nRawId)
end
EgtSetStatus( EgtGetFirstNameInGroup( GDB_ID.ROOT, 'VMill') or GDB_ID.NULL, GDB_ST.OFF)
end
+36
View File
@@ -0,0 +1,36 @@
-- 2018/11/21 17:30:00
-- Machining Exit for Essetre-FAST machine
-- Intestazioni
require( 'EgtBase')
_ENV = EgtProtectGlobal()
EgtEnableDebug( false)
--------------------------------------------------------------------------------
-- *** Uscita da Lavorazioni ***
-- Nascondo il pezzo così marcato e le geometrie aggiunte, visualizzo il Box
local function ProcessPart( PartId)
-- visualizzo il Box
EgtSetStatus( EgtGetFirstNameInGroup( PartId, 'Box') or GDB_ID.NULL, GDB_ST.ON)
end
-- Disabilito segnalazione modifica progetto
local bEnMod = EgtGetEnableModified()
EgtDisableModified()
-- Processo i pezzi nella radice (già chiusi tutti i gruppi di lavoro)
local PartId = EgtGetFirstPart()
while PartId do
ProcessPart( PartId)
PartId = EgtGetNextPart( PartId)
end
EgtZoom( SCE_ZM.ALL, false)
-- Ripristino segnalazione modifica progetto
if bEnMod then
EgtEnableModified()
end
MACH.ERR = 0
+44
View File
@@ -0,0 +1,44 @@
-- 2018/11/21 16:30:00
-- Machining Init for Essetre-FAST machine
-- Intestazioni
require( 'EgtBase')
_ENV = EgtProtectGlobal()
EgtEnableDebug( false)
--------------------------------------------------------------------------------
-- *** Ingresso in Lavorazioni ***
-- Rendo visibile il pezzo e le geometrie aggiunte, nascondo il Box
local function ProcessPart( PartId)
-- nascondo il Box
EgtSetStatus( EgtGetFirstNameInGroup( PartId, 'Box') or GDB_ID.NULL, GDB_ST.OFF)
end
-- Disabilito segnalazione modifica progetto
local bEnMod = EgtGetEnableModified()
EgtDisableModified()
-- Processo i pezzi nella radice
local PartId = EgtGetFirstPart()
while PartId do
ProcessPart( PartId)
PartId = EgtGetNextPart( PartId)
end
-- Processo i pezzi già nei gruppi di lavoro (quando appena lanciata Process)
local GhostId = EgtGetFirstGhostPart()
while GhostId do
local PartId = EgtGetInfo( GhostId, GDB_SI.SOURCE, 'i')
if PartId then
ProcessPart( PartId)
end
GhostId = EgtGetNextGhostPart( GhostId)
end
-- Ripristino segnalazione modifica progetto
if bEnMod then
EgtEnableModified()
end
MACH.ERR = 0
+212
View File
@@ -0,0 +1,212 @@
-- Gestione attrezzaggio per Essetre-FAST - 2022/06/16
-- Intestazioni
require( 'EgtBase')
_ENV = EgtProtectGlobal()
EgtEnableDebug( false)
-- Tavola di passaggio valori
local STU = {}
STU.TUUID = ""
STU.TCPOS = ""
STU.HEAD = ""
STU.GROUP = ""
STU.POS = ""
STU.EXIT = 0
STU.INDEX = 0
STU.HEAD1 = ""
STU.HEAD2 = ""
STU.ISVALID = false
STU.ERR = 0
_G.STU = STU
local INVALIDPOS = ""
local POS = "Pos"
-- Geom Set
local GS = {}
-- Configurazione posizioni
local PositionTable={{Pos = "Pos1", TcPos = "T1", Head = "H1", Group = "G1"},
{Pos = "Pos2", TcPos = "T2", Head = "H1", Group = "G1"},
{Pos = "Pos3", TcPos = "T3", Head = "H1", Group = "G1"},
{Pos = "Pos4", TcPos = "T4", Head = "H1", Group = "G1"},
{Pos = "Pos5", TcPos = "T5", Head = "H1", Group = "G1"},
{Pos = "Pos6", TcPos = "T6", Head = "H1", Group = "G1"},
{Pos = "Pos7", TcPos = "T7", Head = "H1", Group = "G1"},
{Pos = "Pos8", TcPos = "T8", Head = "H1", Group = "G1"},
{Pos = "Pos9", TcPos = "T9", Head = "H1", Group = "G1"},
{Pos = "Pos10", TcPos = "T10", Head = "H1", Group = "G1"},
{Pos = "Pos11", TcPos = "T11", Head = "H1", Group = "G1"},
{Pos = "Pos12", TcPos = "T42", Head = "H2", Group = "G1"},
{Pos = "Pos13", TcPos = "T101", Head = "H3", Group = "G2"}}
local SecSuppId = EgtGetTcPosId( 'T111')
if SecSuppId then
local bMortiser = EgtGetInfo( SecSuppId, 'Mortiser', 'b')
if bMortiser then
table.insert( PositionTable, {Pos = "Pos14", TcPos = "T111", Head = "H3", Group = "G2"})
else
table.insert( PositionTable, {Pos = "Pos14", TcPos = "T111", Head = "H1", Group = "G2"})
end
end
if EgtGetHeadId( 'H5') then
table.insert( PositionTable, {Pos = "Pos14", TcPos = "T91", Head = "H5", Group = "G2"})
end
local UsePositionHead = true
local function IsInGeomSet( ToolHead, PosHead)
for GsIndex = 1, #GS do
local bToolHead = false
local bPosHead = false
for HIndex = 1, #GS[GsIndex] do
if GS[GsIndex][HIndex] == ToolHead then
bToolHead = true
elseif GS[GsIndex][HIndex] == PosHead then
bPosHead = true
end
if bToolHead and bPosHead then
return true
end
end
if bToolHead and bPosHead then
return true
end
end
return false
end
function STU.IsCompatibleHeads()
STU.ISVALID = false
if IsInGeomSet(STU.HEAD1, STU.HEAD2) then
STU.ISVALID = true
else
STU.ISVALID = false
end
end
function STU.GetValidHeadExitForPos()
-- se TUUID non valido restituisco errore
local ToolName = EgtTdbGetToolFromUUID( STU.TUUID)
if ToolName == nill then
STU.ERR = 1
return
end
EgtTdbSetCurrTool( ToolName)
local CurrToolHead = EgtTdbGetCurrToolParam( MCH_TP.HEAD)
STU.EXIT = EgtTdbGetCurrToolParam( MCH_TP.EXIT)
-- recupero testa predefinita per la posizione corrente
local CurrPosHead
for i = 1, #PositionTable do
if PositionTable[i].TcPos == STU.TCPOS then
CurrPosHead = PositionTable[i].Head
break
end
end
-- verifico se la testa è quella della posizione predefinita
if CurrPosHead == CurrToolHead then
STU.HEAD = CurrToolHead
STU.ERR = 0
return
-- verifico se la testa è compatibile con quella della posizione predefinita
elseif IsInGeomSet( CurrToolHead, CurrPosHead) then
if UsePositionHead then
STU.HEAD = CurrPosHead
STU.ERR = 0
return
else
STU.HEAD = CurrToolHead
STU.ERR = 0
return
end
-- la testa non è compatibile con quella della posizione predefinita
else
STU.HEAD = INVALIDPOS
STU.ERR = 0
return
end
end
function STU.IsValidTcPosFromHead()
STU.ISVALID = false
for i = 1, #PositionTable do
if PositionTable[i].TcPos == STU.TCPOS then
if PositionTable[i].Head == STU.HEAD then
STU.ISVALID = true
STU.ERR = 0
return
elseif IsInGeomSet(PositionTable[i].Head, STU.HEAD) then
STU.ISVALID = true
STU.ERR = 0
return
end
STU.ISVALID = false
STU.ERR = 0
return
end
end
end
function STU.GetTcPosHeadGroupFromPos()
for i = 1, #PositionTable do
if PositionTable[i].Pos == (POS .. tostring(STU.INDEX)) then
STU.TCPOS = PositionTable[i].TcPos
STU.HEAD = PositionTable[i].Head
STU.GROUP = PositionTable[i].Group
STU.ERR = 0
return
end
end
STU.TCPOS = INVALIDPOS
STU.HEAD = INVALIDPOS
STU.GROUP = INVALIDPOS
STU.ERR = 1
end
function STU.GetPosFromTcPos()
for i = 1, #PositionTable do
if PositionTable[i].TcPos == STU.TCPOS then
STU.POS = PositionTable[i].Pos
STU.ERR = 0
return
end
end
STU.POS = INVALIDPOS
STU.ERR = 1
end
function STU.GetGroupFromTcPos()
for i = 1, #PositionTable do
if PositionTable[i].TcPos == STU.TCPOS then
STU.GROUP = PositionTable[i].Group
STU.ERR = 0
return
end
end
STU.GROUP = INVALIDPOS
STU.ERR = 1
end
function STU.GetHeadFromPos()
for i = 1, #PositionTable do
if PositionTable[i].Pos == (POS .. tostring(STU.INDEX)) then
STU.HEAD = PositionTable[i].Head
STU.ERR = 0
return
end
end
STU.HEAD = INVALIDPOS
STU.ERR = 1
end
function STU.GetTcPosFromPos()
for i = 1, #PositionTable do
if PositionTable[i].Pos == (POS .. tostring(STU.INDEX)) then
STU.TCPOS = PositionTable[i].TcPos
STU.ERR = 0
return
end
end
STU.TCPOS = INVALIDPOS
STU.ERR = 1
end
Binary file not shown.

After

Width:  |  Height:  |  Size: 9.8 KiB

+15
View File
@@ -0,0 +1,15 @@
; Commento per evitare BOM con UTF-8
[General]
Pos1=T1;H1;1/D077C810-A58B-41DE-A3F5-D2187EBB1B67/Fresa100x60
Pos2=T2;H1;1/0A54F32E-C48D-45DB-8502-953CA94FD7A0/Fresa25x130
Pos3=T3;H1;1/877C9B3A-9078-42B6-808D-5ED5CF5C505B/Fresa20x50
Pos4=T4;H1;1/5BC80CC4-B497-4509-981C-C7593EC1279F/FresaDT35x130
Pos5=T5;H1;1/E49D40F3-E08A-4053-AA30-BF9FECCDA6FC/Fresa240x20x195
Pos6=T6;H1;1/9EA5B450-B81B-4B8F-860B-C3B8D48310F3/Fresa30x160
Pos7=T7;H1;1/0150315A-41DF-4916-AC88-338C1EF375EF/Penna
Pos8=T8;H1;1/A9E87E22-71BF-44F9-B72A-4623BD96AA32/PuntaD06
Pos9=T9;H1;1/0147ED47-EB5D-44D6-9CE2-5282B484B5BD/Smusso45x40
Pos10=T10;H1;1/0C3199C0-5E96-4512-A06B-EECE879330BF/Fresa10x50
Pos11=T11;H1;1/57898FF3-0FCA-4185-B40F-2318E501260A/PuntaD18
Pos12=T42;H2;1/6CB00A83-DDCD-49E6-A301-E1A0482615CA/Lama620
Pos13=T101;H3;1/A6CFDA65-DABB-441E-990A-776B5C24C2E4/ChainSaw
+15
View File
@@ -0,0 +1,15 @@
; Commento per evitare BOM con UTF-8
[General]
Pos1=T1;H1;1/D077C810-A58B-41DE-A3F5-D2187EBB1B67/Fresa100x60
Pos2=T2;H1;1/0A54F32E-C48D-45DB-8502-953CA94FD7A0/Fresa25x130
Pos3=T3;H1;1/877C9B3A-9078-42B6-808D-5ED5CF5C505B/Fresa20x50
Pos4=T4;H1;1/E7F6A2BB-1F66-48B9-9561-496231C33403/FresaDT60x146
Pos5=T5;H1;1/0147ED47-EB5D-44D6-9CE2-5282B484B5BD/Smusso45x40
Pos6=T6
Pos7=T7
Pos8=T8;H1;1/B5B974EF-D18A-45DE-9842-05B91639BE91/PuntaD14
Pos9=T9;H1;1/BD98DE4D-F741-4A38-980C-DD188BBE3988/Fresa34x175
Pos10=T10;H1;1/82505C4D-26F2-4197-824F-25129D782E2D/PuntaD20
Pos11=T11;H1;1/57898FF3-0FCA-4185-B40F-2318E501260A/PuntaD18
Pos12=T42;H2;1/6CB00A83-DDCD-49E6-A301-E1A0482615CA/Lama620
Pos13=T101;H3;1/A6CFDA65-DABB-441E-990A-776B5C24C2E4/ChainSaw
Binary file not shown.
BIN
View File
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
BIN
View File
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
+41
View File
@@ -0,0 +1,41 @@
; Commento per evitare BOM con UTF-8
; Index, Type, Description, Value
; Index = 0,1,..,n
; Type : d=double, l=lenght, s=string, b=boolean, dr=double recalc, sr= string recalc, lr=lenght recalc, br=boolean recalc, th=toolholder
; Description : STEP, SIDESTEP, ...
[DRILL_STD]
0=th,TH,
1=d,STEP
2=s,DOUBLE
[SAW_STD]
0=th,TH,
1=d,STEP
2=d,SIDESTEP
3=b,LONGCUT
[SAW_FLAT]
0=th,TH,
1=d,STEP
2=d,SIDESTEP
3=b,LONGCUT
[MILL_STD]
0=th,TH,
1=d,STEP
2=d,SIDESTEP
3=d,SIDEDEPTH
4=s,DOUBLE
[MILL_NOTIP]
0=th,TH,
1=d,STEP
2=d,SIDESTEP
3=d,SIDEDEPTH
4=s,DOUBLE
[MORTISE_STD]
0=b,MORTISE
1=d,STEP
2=d,SIDESTEP
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
BIN
View File
Binary file not shown.

Some files were not shown because too many files have changed in this diff Show More