Compare commits

...

23 Commits

Author SHA1 Message Date
andrea.villa c082727044 Alla linea con EA75 e EA76 si scrive ET1 2024-07-25 15:36:53 +02:00
andrea.villa 496e5fdc07 Corretta scrittura ISO per parcheggiare morsa 3 dopo ribaltamento. Da testare 2024-07-25 09:23:03 +02:00
andrea.villa 0882e41e4b Merge remote-tracking branch 'origin/master' into develop 2024-07-25 09:21:32 +02:00
andrea.villa 3ec3c830e9 FixDeployAndCompile01 2024-07-23 09:24:34 +02:00
andrea.villa 9d5a62bc7c - Gestione pezzi fino a 30 metri
- Allineamento con common ver. 2.6g4
2024-07-22 15:51:50 +02:00
andrea.villa 4d41b6bcbf Allineamento con common ver. 2.6g3 2024-07-17 16:01:50 +02:00
andrea.villa 016554b0f5 Allineamento con common ver. 2.6g2 2024-07-16 08:04:09 +02:00
andrea.villa b0bc0b134e Tolta chiamata debug 2024-07-10 16:03:35 +02:00
andrea.villa 2a0d801451 Merge branch 'master' of https://gitlab.steamware.net/egalware-machines/essetre/Essetre-PF 2024-07-10 15:58:55 +02:00
andrea.villa 4842975059 Allineamento con common ver. 2.6g1 2024-07-10 15:58:52 +02:00
luca.mazzoleni f0e0e2ffe9 ripristino a 2.6f1 2024-07-01 12:24:24 +02:00
luca.mazzoleni 2ff1f440ca Merge branch 'develop' 2024-07-01 12:17:03 +02:00
luca.mazzoleni 80faa3876b Merge branch 'test' into develop 2024-07-01 12:16:12 +02:00
luca.mazzoleni 94a7611036 - modifica LimX1PlRotSaw 2024-07-01 12:11:43 +02:00
luca.mazzoleni 1587b11099 - aggiunto NestingData
- modifica LimX1PlRotSaw
2024-07-01 12:08:19 +02:00
andrea.villa 3fbc3e8f79 Modificato 'LimX1PlRotSaw' a 1970mm 2024-06-03 12:41:25 +02:00
andrea.villa 08ee1dffaf - Aggiunta funzione GetSetupInfo a BeamData per nuovo automatismo
- Allineamento con common ver. 2.6f1
2024-06-03 12:31:55 +02:00
andrea.villa 1ec9cb3721 - Allineamento con common ver. 2.6e1
- Aggiunta variabile WoodDensity per gestione WOOD_DENSITY
2024-04-30 17:13:21 +02:00
luca.mazzoleni 63820acf65 Merge branch 'develop' 2024-04-16 17:05:52 +02:00
luca.mazzoleni 479c28778b in yaml aggiunta copia in R anche per develop (senza versione) 2024-04-16 17:05:42 +02:00
luca.mazzoleni 6a6cc28be1 Merge branch 'develop' 2024-04-16 15:08:20 +02:00
luca.mazzoleni 23bcf23f07 yaml lanciato solo per master 2024-04-16 15:08:07 +02:00
luca.mazzoleni acbfb66e00 aggiunto yaml per compilazione e copia su R 2024-04-16 13:23:17 +02:00
13 changed files with 483 additions and 61 deletions
+239
View File
@@ -0,0 +1,239 @@
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 di Common*"
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"
}
echo "-----------------------"
echo " FINE Compilazione"
echo "-----------------------"
# 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
+36 -1
View File
@@ -14,7 +14,7 @@ local BeamData = {
MAX_HEIGHT = 800, -- altezza massima del grezzo
LEN_SHORT_PART = 1200, -- lunghezza massima pezzo piccolo
LEN_VERY_SHORT_PART = 400, -- lunghezza massima pezzo molto corto (molto probabile lo scarico a caduta)
MAX_RAW = 20000, -- massima lunghezza grezzo (deve essere minore di LenTable - RAW_OFFSET)
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.0, -- sovramateriale intermedio (spessore lama)
@@ -206,5 +206,40 @@ local function GetChainSawInitAngs( vtN, vtO, nInd)
end
BeamData.GetChainSawInitAngs = GetChainSawInitAngs
---------------------------------------------------------------------
local function GetSetupInfo( sHead)
local SetupInfo = {}
-- dati comuni
SetupInfo.bIsCSymmetric = true
SetupInfo.dCAxisEncumbrance = 180
SetupInfo.bToolOnAggregate = false
-- testa 5 assi da sopra
if sHead == 'H11' or sHead == 'H21' then
SetupInfo.bIsTopHead = true
SetupInfo.bIsBottomHead = not SetupInfo.bIsTopHead
SetupInfo.dMaxNegativeAngle = sin( -45)
-- lama su testa 5 assi da sopra
elseif sHead == 'H12' or sHead == 'H22' then
SetupInfo.bIsTopHead = true
SetupInfo.bIsBottomHead = not SetupInfo.bIsTopHead
SetupInfo.dMaxNegativeAngle = sin( -45)
-- motosega 1
elseif sHead == 'H13' or sHead == 'H23' then
SetupInfo.bIsTopHead = true
SetupInfo.bIsBottomHead = not SetupInfo.bIsTopHead
SetupInfo.dMaxNegativeAngle = 0
-- motosega 2
elseif sHead == 'H15' then
SetupInfo.bIsBottomHead = true
SetupInfo.bIsTopHead = not SetupInfo.bIsBottomHead
SetupInfo.dMaxPositiveAngle = 0
end
return SetupInfo
end
BeamData.GetSetupInfo = GetSetupInfo
---------------------------------------------------------------------
return BeamData
+2
View File
@@ -8,6 +8,8 @@
2=Drill_H2
3=Pocket
4=Pocket_H2
5=Predrill
6=Predrill_H2
[Milling]
1=Prof
+3
View File
@@ -0,0 +1,3 @@
[BEAM]
StartOffset=10
Offset=0
+61 -43
View File
@@ -28,6 +28,9 @@ function OnStart()
--EMT.Ft = 'F' -- token per feed
--EMT.St = 'S' -- token per speed
EMT.FMAXPINZE = 102000 -- feed massima pinze
-- utensili default
EMT.PREVTCPOS_H1 = DefTcPos1
EMT.PREVTCPOS_H2 = DefTcPos2
end
---------------------------------------------------------------------
@@ -44,7 +47,7 @@ function OnProgramStart()
EmtOutput( '%' .. EgtNumToString( nPattId,-1))
-- aggiungo prefisso per commentae commenti iniziali se la macchina è utilizzata per fare i test
local sPrefixCommentLine = '' ; if IS_TEST_MACHINE then sPrefixCommentLine = '//' end
local sPrefixCommentLine = '' ; if IS_TEST_MACHINE or EgtEndsWith( EgtGetCurrMachineDir(), '.TEST') then sPrefixCommentLine = '//' end
if EMT.INFO then
EmtOutput( sPrefixCommentLine..'('..EMT.INFO..')')
@@ -439,7 +442,7 @@ function OnMachiningStart()
-- gestione eventuale lavorazione in doppio
local nDouType = EgtGetValInNotes( EMT.MCHUSERNOTES, 'DOUBLE', 'i')
if nDouType == 2 or nDouType == 3 then
local sDouTool = EgtGetValInNotes( EMT.TUSERNOTES, 'DOUBLE', 's') or ''
local sDouTool = EgtGetValInNotes( EMT.MCHUSERNOTES, 'TOOLDOUBLE', 's') or EgtGetValInNotes( EMT.TUSERNOTES, 'DOUBLE', 's') or ''
local sOldTool = EgtTdbGetCurrToolParam( MCH_TP.NAME)
if EgtTdbSetCurrTool( sDouTool) and EgtTdbGetCurrToolParam( MCH_TP.ACTIVE) then
-- salvo dati
@@ -599,6 +602,20 @@ function OnMachiningEnd()
EMT.PREVTOOL = EMT.TOOL
EMT.PREVHEAD = EMT.HEAD
EMT.PREVTCPOS = EMT.TCPOS
-- salvo anche utlimo utensile su testa
local nHSet = GetHeadSet( EMT.HEAD)
if nHSet == 1 then
EMT.PREVTOOL_H1 = EMT.TOOL
EMT.PREVHEAD_H1 = EMT.HEAD
EMT.PREVTCPOS_H1 = EMT.TCPOS
EMT.PREVHOMEX_H1 = EgtGetAxisHomePos( 'X1')
elseif nHSet == 2 then
EMT.PREVTOOL_H2 = EMT.TOOL
EMT.PREVHEAD_H2 = EMT.HEAD
EMT.PREVTCPOS_H2 = EMT.TCPOS
EMT.PREVHOMEX_H2 = EgtGetAxisHomePos( 'X2')
end
if EMT.DOU_TYPE and not EMT.ZMAX then EMT.DOU_TO_ZMAX = true end
EMT.DOU_TYPE = nil
end
@@ -858,11 +875,11 @@ function OnRapid()
-- se motosega configurata per lavorazioni di fianco o circa orizzontale
if dPosA == 0 or abs( EMT.R2) < 10 then
EmitMoveDataHead( 1, { X=EMT.L2, C=EMT.R1, S=Speed})
EmitMoveDataHead( 1, { X=EMT.L2, Z=ParkCSawZ1, B=ParkCSawB1, C=EMT.R1, S=Speed})
EmitMoveDataHead( 1, { Z=EMT.L3, B=EMT.R2, S=Speed})
-- se circa verticale
else
EmitMoveDataHead( 1, { X=EMT.L2, C=EMT.R1, S=Speed})
EmitMoveDataHead( 1, { X=EMT.L2, Z=ParkCSawZ1, B=ParkCSawB1, C=EMT.R1, S=Speed})
EmitMoveDataHead( 1, { Z=EMT.L3, B=EMT.R2, S=Speed})
end
end
@@ -925,11 +942,11 @@ function OnRapid()
-- se motosega configurata per lavorazioni di fianco o circa orizzontale
if dPosA == 0 or abs( EMT.R2) < 10 then
EmitMoveDataHead( 1, { X=EMT.L2, C=EMT.R1, S=Speed})
EmitMoveDataHead( 1, { X=EMT.L2, Z=ParkCSawZ1, B=ParkCSawB1, C=EMT.R1, S=Speed})
EmitMoveDataHead( 1, { Z=EMT.L3, B=EMT.R2, S=Speed})
-- se circa verticale
else
EmitMoveDataHead( 1, { X=EMT.L2, C=EMT.R1, S=Speed})
EmitMoveDataHead( 1, { X=EMT.L2, Z=ParkCSawZ1, B=ParkCSawB1, C=EMT.R1, S=Speed})
EmitMoveDataHead( 1, { Z=EMT.L3, B=EMT.R2, S=Speed})
end
@@ -977,13 +994,13 @@ function OnRapid()
EmitMoveWaitHead( 2)
EmitMoveWaitChars( EgtIf( bOnlyCharY, 1, 3))
-- se motosega configurata per lavorazioni di fianco o circa orizzontale
-- se motosega configurata per lavorazioni di fianco o circa orizzontale. Dopo attesa movimento carrelli si devono scrivere tutti gli assi.
if dPosA == 0 or abs( EMT.R2) < 10 then
EmitMoveDataHead( 2, { X=EMT.L2, C=EMT.R1, S=Speed})
EmitMoveDataHead( 2, { X=EMT.L2, Z=ParkCSawZ2, B=ParkCSawB2, C=EMT.R1, S=Speed})
EmitMoveDataHead( 2, { Z=EMT.L3, B=EMT.R2, S=Speed})
-- se circa verticale
else
EmitMoveDataHead( 2, { X=EMT.L2, C=EMT.R1, S=Speed})
EmitMoveDataHead( 2, { X=EMT.L2, Z=ParkCSawZ2, B=ParkCSawB2, C=EMT.R1, S=Speed})
EmitMoveDataHead( 2, { Z=EMT.L3, B=EMT.R2, S=Speed})
end
end
@@ -1064,42 +1081,42 @@ function OnRapid()
EMT.AUXCMD = {}
-- se necessario posizionamento in home (sono sicuramente già a Zmax)
if EMT.TO_XHOME then
-- se precedente non era sega a catena, vado in home con quella
if not HeadIsChainSaw( EMT.PREVHEAD) then
local nPrevHSet = GetHeadSet( EMT.PREVHEAD)
if nPrevHSet == 1 then
local nHSet = GetHeadSet( EMT.HEAD)
local nPrevHSet = GetHeadSet( EMT.PREVHEAD)
-- se successivo non è sega a catena e la testa è la stessa, vado in home con utensile succesivo
if not HeadIsChainSaw( EMT.HEAD) and nHSet == nPrevHSet then
if nHSet == 1 then
local HomeX1 = EgtGetAxisHomePos( 'X1')
EmitMoveDataHead( 1, { X=-HomeX1, Z=MaxZ1, B=ParkB1, C=ParkC1, TPos='0'})
EmitMoveDataHead( 1, { X=-HomeX1, Z=MaxZ1, B=ParkB1, C=ParkC1})
EmitMoveStartHead( 1, 'EA1')
else
local HomeX2 = EgtGetAxisHomePos( 'X2')
EmitMoveDataHead( 2, { X=-HomeX2, Z=MaxZ2, B=ParkB2, C=ParkC2, TPos='0'})
EmitMoveDataHead( 2, { X=-HomeX2, Z=MaxZ2, B=ParkB2, C=ParkC2})
EmitMoveStartHead( 2, 'EA1')
end
-- altrimenti la deposito e vado in home speciale
else
-- se successivo non è sega a catena, ne lancio il carico
if not HeadIsChainSaw( EMT.HEAD) then
if nHSet == 1 then
if not HeadIsChainSaw( EMT.PREVHEAD) then
if nPrevHSet == 1 then
local HomeX1 = EgtGetAxisHomePos( 'X1')
EmitMoveDataHead( 1, { X=-HomeX1, Z=MaxZ1, B=HomeR2, C=HomeR1})
EmitMoveDataHead( 1, { X=-EMT.PREVHOMEX_H1, Z=MaxZ1, B=ParkB1, C=ParkC1, TPos=AdjustTcPos( false, EMT.PREVTCPOS_H1)})
EmitMoveStartHead( 1, 'EA1')
else
local HomeX2 = EgtGetAxisHomePos( 'X2')
EmitMoveDataHead( 2, { X=-HomeX2, Z=MaxZ2, B=HomeR2, C=HomeR1})
EmitMoveDataHead( 2, { X=-EMT.PREVHOMEX_H2, Z=MaxZ2, B=ParkB2, C=ParkC2, TPos=AdjustTcPos( false, EMT.PREVTCPOS_H2)})
EmitMoveStartHead( 2, 'EA1')
end
-- altrimenti deposito e mi metto in posizione sicura
else
if GetHeadTCSet( EMT.HEAD, EMT.TCPOS) == 'Head1_TC1' or GetHeadTCSet( EMT.HEAD, EMT.TCPOS) == 'Head1_TC2' then
EmitMoveDataHead( 1, { X=-ParkCSawX1S, Z=MaxZ1, B=HomeR2, C=HomeR1, TPos='0'})
if GetHeadTCSet( EMT.PREVHEAD, EMT.PREVTCPOS) == 'Head1_TC1' or GetHeadTCSet( EMT.PREVHEAD, EMT.PREVTCPOS) == 'Head1_TC2' then
EmitMoveDataHead( 1, { X=-ParkCSawX1S, Z=MaxZ1, B=HomeR2, C=HomeR1, TPos='50'})
EmitMoveStartHead( 1, 'EA1')
else
EmitMoveDataHead( 2, { X=-ParkCSawX2S, Z=MaxZ2, B=HomeR2, C=HomeR1, TPos='0'})
EmitMoveDataHead( 2, { X=-ParkCSawX2S, Z=MaxZ2, B=HomeR2, C=HomeR1, TPos='50'})
EmitMoveStartHead( 2, 'EA1')
end
end
end
EMT.TO_XHOME = nil
EMT.L3pp = nil
PrevR1 = HomeR1
@@ -1122,7 +1139,7 @@ function OnRapid()
EmitMoveDataChars( EMT.MDCHAR[i])
end
if #EMT.MDCHAR > 0 then
local nMoveType = EgtIf( EMT.POSTROT or EMT.RELOAD, 1, 3)
local nMoveType = EgtIf( EMT.RELOAD, 1, 3)
EmitMoveStartChars( nMoveType)
EmitMoveWaitChars( nMoveType)
end
@@ -1589,7 +1606,7 @@ end
function CalcDinamicaPinze( dH, dS, dL)
local MinTempoAcc = 0.3 -- [s]
local MaxTempoAcc = 4.0 -- [s]
local KgMtCubo= 550 -- densità legno [Kg / metro cubo]
local KgMtCubo= WoodDensity or 550 -- densità legno [Kg / metro cubo]
local Massa = ( dH * dS * dL * KgMtCubo ) / 1e9 -- massa [Kg]
local FMaxPinze = EMT.FMAXPINZE -- Feed massima pinze [mm/min]
local ForzaAttrito = 350 * 9.8 * 0.2 -- Forza chiusura pinze [Kgf] * g * Coeff_Attrito -> [N]
@@ -2161,15 +2178,15 @@ function PreparePostRotation( sCmd, nInd)
-- se dichiarazione inizio riposizionamento carrelli
if Cmd[2] == 'CARR_MOVE' then
EMT.POSTROT = false
table.insert( EMT.MDCHAR, { Start=1})
table.insert( EMT.MDCHAR, { Wait=1})
table.insert( EMT.MDCHAR, { Start=3})
table.insert( EMT.MDCHAR, { Wait=3})
end
elseif Cmd[1] == '1' then
-- non interessa
elseif Cmd[1] == '2' then
if Cmd[2] == 'Y1' then
-- tolgo eventuale sovramateriale presente sul pezzo in posizione iniziale (la misura laser è ora col finito)
local MDChar = { Y1=tonumber(Cmd[3])-EMT.HOVM, IniStatY1=75, V1=ParkV1, V2=ParkV2, FinStatY1=-1, BeamVise=0, Aux=' (E80058=0)', MovType=1}
local MDChar = { Y1=tonumber(Cmd[3])-EMT.HOVM, IniStatY1=75, V1=ParkV1, V2=ParkV2, FinStatY1=-1, FinStatV1=-1, BeamVise=0, Aux=' (E80058=0)', MovType=1}
table.insert( EMT.MDCHAR, MDChar)
EMT.V1POS = ParkV1
EMT.V2POS = ParkV2
@@ -2200,7 +2217,7 @@ function PreparePostRotation( sCmd, nInd)
EMT.Y2DELTA = nY2Delta
end
if not FindReadHeadWithLaser( EMT.MDCHAR) then
local MDChar = { Y1=LoadT, IniStatY1=76, FinStatY1=EMT.FSY1, BeamVise=0, MovType=1}
local MDChar = { Y1=LoadT, IniStatY1=76, FinStatY1=EMT.FSY1, BeamVise=0, MovType=3}
table.insert( EMT.MDCHAR, MDChar)
EMT.TPOS = LoadT
end
@@ -2566,7 +2583,7 @@ function EmitZmax( bReset, bEnd, bXhome, PrevR1, PrevR2, bSplitCut, bUsePrevDelt
EmitMoveDataHead( 1, MovH)
EmitMoveDataHead( 1, { Z=dSafeZ1, B=dSafeB1})
if EMT.SB > 650 and abs( EMT.R3) < 0.1 then
EmitMoveDataHead( 1, { Z=ParkCSawZ1, B=ParkB1})
EmitMoveDataHead( 1, { Z=ParkCSawZ1})
end
EmitMoveDataHead( 1, { X=-dSafeX1, C=dSafeC1})
if bXhome then
@@ -2607,7 +2624,7 @@ function EmitZmax( bReset, bEnd, bXhome, PrevR1, PrevR2, bSplitCut, bUsePrevDelt
EmitMoveDataHead( 1, MovH)
EmitMoveDataHead( 1, { Z=dSafeZ1, B=dSafeB1})
if EMT.SB > 650 and abs( EMT.R3) < 0.1 then
EmitMoveDataHead( 1, { Z=ParkCSawZ1, B=ParkB1})
EmitMoveDataHead( 1, { Z=ParkCSawZ1})
end
EmitMoveDataHead( 1, { X=-dSafeX1, C=dSafeC1})
if bXhome then
@@ -2660,7 +2677,7 @@ function EmitZmax( bReset, bEnd, bXhome, PrevR1, PrevR2, bSplitCut, bUsePrevDelt
EmitMoveDataHead( 2, MovH)
EmitMoveDataHead( 2, { Z=dSafeZ2, B=dSafeB2})
if EMT.SB > 650 and abs( EMT.R3) < 0.1 then
EmitMoveDataHead( 2, { Z=ParkCSawZ2, B=ParkB2})
EmitMoveDataHead( 2, { Z=ParkCSawZ2})
end
EmitMoveDataHead( 2, { X=-dSafeX2, C=dSafeC2})
if bXhome then
@@ -2867,11 +2884,11 @@ function PreselectNextDiffHead( nMchId, sHead)
local sNextTcPos = EgtTdbGetCurrToolParam( MCH_TP.TCPOS)
-- se testa attuale da caricare è sega a catena, mando l'altra prima in HomeX (per evitare possibili collisioni) e poi lancio preselezione
if sHead == 'H13' and EMT.PREVHEAD ~= 'H13' then
EmitMoveDataHead( 2, { X=-ParkX2, Z=MaxZ2, B=ParkB2, C=ParkC2, TPos='0'})
EmitMoveDataHead( 2, { X=-ParkX2, Z=MaxZ2, B=ParkB2, C=ParkC2, TPos=AdjustTcPos( false, EMT.PREVTCPOS_H2)})
EmitMoveStartHead( 2)
EmitMoveWaitHead( 2)
elseif sHead == 'H23' and EMT.PREVHEAD ~= 'H23' then
EmitMoveDataHead( 1, { X=-ParkX1, Z=MaxZ1, B=ParkB1, C=ParkC1, TPos='0'})
EmitMoveDataHead( 1, { X=-ParkX1, Z=MaxZ1, B=ParkB1, C=ParkC1, TPos=AdjustTcPos( false, EMT.PREVTCPOS_H1)})
EmitMoveStartHead( 1)
EmitMoveWaitHead( 1)
end
@@ -2904,15 +2921,16 @@ function PreselectNextDiffHead( nMchId, sHead)
-- mi assicuro che l'altra testa sia in parcheggio
if nHSet == 1 then
-- non può essere la sega a catena
EmitMoveDataHead( 2, { X=-ParkX2, Z=MaxZ2, B=ParkB2, C=ParkC2, TPos='0'})
EmitMoveStartHead( 2)
if EMT.PREVHEAD == 'H23' and EMT.PREVHEAD ~= EMT.HEAD then
EmitMoveWaitHead( 2)
if EMT.PREVHEAD_H2 ~= 'H23' then
EmitMoveDataHead( 2, { X=-ParkX2, Z=MaxZ2, B=ParkB2, C=ParkC2, TPos=AdjustTcPos( false, EMT.PREVTCPOS_H2)})
EmitMoveStartHead( 2)
end
else
-- va bene per frese e lama
EmitMoveDataHead( 1, { X=-ParkX1, Z=MaxZ1, B=ParkB1, C=ParkC1, TPos='0'})
EmitMoveStartHead( 1)
-- non può essere la sega a catena
if EMT.PREVHEAD_H1 ~= 'H13' and EMT.PREVHEAD_H1 ~= 'H15' then
EmitMoveDataHead( 1, { X=-ParkX1, Z=MaxZ1, B=ParkB1, C=ParkC1, TPos=AdjustTcPos( false, EMT.PREVTCPOS_H1)})
EmitMoveStartHead( 1)
end
end
end
end
+4 -4
View File
@@ -152,7 +152,7 @@ function OnSimulStart()
local nId = EgtGetFirstNameInGroup( EgtGetFirstNameInGroup( nGrpId, McdData[i].Sub), McdData[i].Name)
if nId then
table.insert( EMT.MCODET, nId)
EgtOutLog( 'Element ' .. McdData[i].Grp .. '/' .. McdData[i].Sub .. '/' .. McdData[i].Name .. ' is ok', 4)
EgtOutLog( 'Element ' .. McdData[i].Grp .. '/' .. McdData[i].Sub .. '/' .. McdData[i].Name .. ' (' .. tostring( nId) .. ') is ok', 4)
else
nMcdNullCnt = nMcdNullCnt + 1
EgtOutLog( 'Element ' .. McdData[i].Grp .. '/' .. McdData[i].Sub .. '/' .. McdData[i].Name .. ' is null', 4)
@@ -1574,7 +1574,7 @@ function ExecMoveZmax( bMchSplit, btoXHome)
else
SimulMoveAxes( 'Z1', HomeZ, MCH_SIM_STEP.RAPID, 'B1', HomeB, MCH_SIM_STEP.COLLROT)
if EMT.SB > 650 and abs( EMT.R3) < 0.1 then
SimulMoveAxes( 'Z1', ParkCSawZ1, MCH_SIM_STEP.RAPID, 'B1', ParkB1, MCH_SIM_STEP.COLLROT)
SimulMoveAxis( 'Z1', ParkCSawZ1, MCH_SIM_STEP.RAPID)
end
SimulMoveAxes( 'X1', HomeX, MCH_SIM_STEP.RAPID, 'C1', HomeC, MCH_SIM_STEP.COLLROT)
end
@@ -1598,7 +1598,7 @@ function ExecMoveZmax( bMchSplit, btoXHome)
else
SimulMoveAxes( 'Z1', HomeZ, MCH_SIM_STEP.RAPID, 'B1', HomeB, MCH_SIM_STEP.COLLROT)
if EMT.SB > 650 and abs( EMT.R3) < 0.1 then
SimulMoveAxes( 'Z1', ParkCSawZ1, MCH_SIM_STEP.RAPID, 'B1', ParkB1, MCH_SIM_STEP.COLLROT)
SimulMoveAxis( 'Z1', ParkCSawZ1, MCH_SIM_STEP.RAPID)
end
if btoXHome then
EgtUnloadTool( EMT.HEAD, 1)
@@ -1633,7 +1633,7 @@ function ExecMoveZmax( bMchSplit, btoXHome)
else
SimulMoveAxes( 'Z2', HomeZ, MCH_SIM_STEP.RAPID, 'B2', HomeB, MCH_SIM_STEP.COLLROT)
if EMT.SB > 650 and abs( EMT.R3) < 0.1 then
SimulMoveAxes( 'Z2', ParkCSawZ2, MCH_SIM_STEP.RAPID, 'B2', ParkB2, MCH_SIM_STEP.COLLROT)
SimulMoveAxis( 'Z2', ParkCSawZ2, MCH_SIM_STEP.RAPID)
end
SimulMoveAxes( 'X2', HomeX, MCH_SIM_STEP.RAPID, 'C2', HomeC, MCH_SIM_STEP.COLLROT)
end
+7 -7
View File
@@ -1829,7 +1829,7 @@ local function MaxDispl( TabI, vCmd, sType)
-- allontano (Y1+T) e (Y2)
dY1a = MaxY1
dY2a = MinY2
dTa = ( MaxY1 - TabI.dY1PosI) + dTa
dTa = ( dY1a - TabI.dY1PosI) + dTa
-- **[M2]** = allontanamento dei trascinatori con Y2 in presa
elseif sType == 'M2' then
EmitComment( vCmd, '[M2]')
@@ -1840,7 +1840,7 @@ local function MaxDispl( TabI, vCmd, sType)
-- allontano (Y2+T) e (Y1)
dY1a = MaxY1
dY2a = MinY2
dTa = ( MinY2 - TabI.dY2PosI) + dTa
dTa = ( dY2a - TabI.dY2PosI) + dTa
-- **[M3]** = accentramento dei trascinatori con Y1 in presa
elseif sType == 'M3' then
EmitComment( vCmd, '[M3]')
@@ -1850,7 +1850,7 @@ local function MaxDispl( TabI, vCmd, sType)
-- accentro (Y1+T) e (Y2)
dY1a = TabI.MyMinY1V1
dY2a = TabI.MaxY2V2
dTa = ( TabI.MyMinY1V1 - TabI.dY1PosI) + dTa
dTa = ( dY1a - TabI.dY1PosI) + dTa
-- **[M4]** = accentramento dei trascinatori con Y2 in presa
elseif sType == 'M4' then
EmitComment( vCmd, '[M4]')
@@ -1861,7 +1861,7 @@ local function MaxDispl( TabI, vCmd, sType)
-- accentro (Y2+T) e (Y1)
dY1a = TabI.MyMinY1V1
dY2a = TabI.MaxY2V2
dTa = ( TabI.MaxY2V2 - TabI.dY2PosI) + dTa
dTa = ( dY2a - TabI.dY2PosI) + dTa
end
--
table.insert( vCmd, { 3, 'Y1', dY1a, 'Y2', dY2a, 'T', dTa, EMC.CNT})
@@ -2187,7 +2187,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
@@ -2326,7 +2326,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
@@ -2398,7 +2398,7 @@ function SpecAdjustCarrA( WorkTab)
dY1DeltaF = PosY1Y2B( TabValI, vCmd)
else
--[A(1)A] **ALLONTANAMENTO** (dall'origine) del trascinatore Y1
EmitComment( vCmd, '[AY1A]')
EmitComment( vCmd, '[A-Y1A]')
dY1DeltaF = PosY1Y2A( TabValI, vCmd)
end
-- chiudo Y1
+14 -4
View File
@@ -55,12 +55,21 @@
-- 2024/03/28 ver 2.6d1 Allineamento con common ver. 2.6d1
-- 2024/04/12 ver 2.6d2 Allineamento con common ver. 2.6d2
-- Aggiunto parametro ForceToCloseRollersGate
-- 2024/04/30 ver 2.6e1 Allineamento con common ver. 2.6e1
-- Aggiunta variabile WoodDensity per gestione WOOD_DENSITY
-- 2024/06/03 ver 2.6f1 Aggiunta funzione GetSetupInfo a BeamData per nuovo automatismo
-- Allineamento con common ver. 2.6f1
-- 2024/07/10 ver 2.6g1 Allineamento con common ver. 2.6g1
-- 2024/07/16 ver 2.6g2 Allineamento con common ver. 2.6g2
-- 2024/07/17 ver 2.6g3 Allineamento con common ver. 2.6g3
-- 2024/07/22 ver 2.6g4 Gestione pezzi fino a 30 metri
-- Allineamento con common ver. 2.6g4
-- Intestazioni
require( 'EmtGenerator')
EgtEnableDebug( false)
PP_VER = '2.6d2'
PP_VER = '2.6g4_DEV'
MIN_MACH_VER = '2.5k1'
MACH_NAME = 'Essetre-PF'
@@ -145,7 +154,7 @@ ParkZ1 = -535
ParkC1 = 90
ParkB1 = 90
LimX1RotSaw = 800
LimX1PlRotSaw = 1920
LimX1PlRotSaw = 1970
MinX2 = 0
MaxX2 = 2035
MinZ2 = -1550
@@ -178,7 +187,7 @@ DeltaTabZ = -1060.0 -- per TPA la quota è dal centro di rotazione (va aggi
DeltaRulliTraveZ = 980
DeltaRulliTappetoZ = -485
DimTabY = 500
DimTabX = 24000
DimTabX = 30000
Delta2TabY = 1550.0
Delta2TabZ = -1060.0 -- per TPA la quota è dal centro di rotazione (va aggiunto MillOffs)
Head2X = 0
@@ -278,6 +287,7 @@ if EgtExistsFile( sData) then
if Machine.Offsets.DEFTCPOS2 then DefTcPos2 = ( 'T' .. Machine.Offsets.DEFTCPOS2) end
if Machine.Offsets.COEFF_STIMATEMPI and Machine.Offsets.COEFF_STIMATEMPI > 0 then EstimationRapidMultiplier = Machine.Offsets.COEFF_STIMATEMPI end
if Machine.Offsets.CHIUDI_PINZE_2_3_SCAMBIO then ForceToCloseRollersGate = Machine.Offsets.CHIUDI_PINZE_2_3_SCAMBIO == 1 end
if Machine.Offsets.WOOD_DENSITY then WoodDensity = Machine.Offsets.WOOD_DENSITY end
-- aggiustamenti
MinY1 = MinV1 + MinDeltaYV
MaxY1 = MaxMchY1
@@ -639,7 +649,7 @@ EmtAxis {
Type = MCH_AT.LINEAR,
Dir = - X_AX(),
Pos = Point3d(0.0,2450.0,-958.0),
Stroke = {-20000, 20000},
Stroke = {-30000, 30000},
Home = LoadT,
Geo = 'T_AXIS/GEO'}
EmtTable {
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
+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
+25 -1
View File
@@ -1,7 +1,31 @@
==== Common_ONE-PF Update Log ====
Versione 2.6-- (--/--/2024)
- (SIM-GEN) Se motosega allineata ad asse B per tagli di fianco, corretto movimento che manda testa a parcheggio. Pezzi più alti di 650 va solo in Zmax. Ticket#1943
- (GEN) Corretta scrittura ISO per parcheggiare morsa 3 dopo ribaltamento. Ticket#1922,#1733
Versione 2.6g4 (19/07/2024)
- (SIM-GEN) Aumentato numero iterazioni per scambio carrelli (da 5 a 10), per pezzi lunghi 30m.
Versione 2.6g3 (17/07/2024)
- (GEN) Correzione modifica precedente (2.6g2). Con lama precedente e motosega successiva, andava a parcheggio con lama alla quota della motosega. Ticket#1880
Versione 2.6g2 (16/07/2024)
- (GEN) Per preselezione o movimenti in home, non si scrive più 'ET0' perchè non è più supportato. Ticket#1926
Versione 2.6g1 (10/07/2024)
- (GEN) Se prima lavorazione con motosega, dopo G151 di attesa carrelli si ribadiscono tutti gli assi. Ticket#1924
Versione 2.6f1 (03/06/2024)
- (GEN) Aggiunta possibilità di scrivere nome utensile doppio anche in lavorazione con parametro "TOOLDOUBLE". Note sulla lavorazione hanno precedenza su note utensile.
Versione 2.6e1 (30/04/2024)
- (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) In log collisioni, si scrive anche ID del gruppo per facilitare riconoscimento in caso di collisione
- (MLDE-GEN) Gestione facoltativa parametro WOOD_DENSITY settabile in Ts3. In MLDE, mettere il valore di WOOD_DENSITY nella nostra variabile 'WoodDensity'.
Versione 2.6d2 (12/04/2024)
- (MLDE-SIM-GEN) Aggiunta variabile FACOLTATIVA 'ForceToCloseRollersGate' ( che legge la variabile da TS3 'CHIUDI_RULLI_SCAMBIO') in mlde per forzare chiusura paratie rulli
- (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.
Versione 2.6d1 (28/03/2024)
+1 -1
View File
@@ -3,7 +3,7 @@
local InfoCommon_STD_PP = {
NAME = 'Common_ONE-PF', -- nome script PP standard
VERSION = '2.6d2', -- versione script
VERSION = '2.6--DEV', -- versione script
MIN_MACH_VER_PP_COMMON = '2.5k1' -- versione minima kernel
}