Created
July 6, 2016 08:35
-
-
Save luc4leone/13449bbdd478001a387c138f60bba4db to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
' CICLO TACCHE --------------------------------------------------------------------------------------------------------- | |
strNotches = "" | |
Dim dvNotches As New DataView(gdtSegment) | |
dvNotches.RowFilter = "IdPattern = " & shtCSVPattern & " AND SegType = 10" | |
dvNotches.Sort = "SegSeq" | |
For Each drNotch As DataRowView In dvNotches | |
strNotches = strNotches & Hex8(10) & "," 'tipo operazione | |
strNotches = strNotches & Hex8(2) & "," 'numero righe | |
strNotches = strNotches & Hex8(100) & "," 'velocità percent. | |
strNotches = strNotches & Hex8(0) & "," | |
strNotches = strNotches & Hex8(0) & "," | |
strNotches = strNotches & Hex8(0) & "," | |
strNotches = strNotches & Hex8(0) & "," | |
strNotches = strNotches & Hex8(0) & vbCrLf | |
lngCSVX = Math.Round(drNotch("X1") / 10, 0) 'modifica per la versione a SISTEMA CENTESIMALE, al PLC mandiamo ancora valori in decimi di mm --- 08/06/2015 | |
lngCSVY = Math.Round(drNotch("Y1") / 10, 0) 'modifica per la versione a SISTEMA CENTESIMALE, al PLC mandiamo ancora valori in decimi di mm --- 08/06/2015 | |
shtCSVDegree = drNotch("Degree") * 10 | |
strNotches = strNotches & Hex8(lngCSVX) & "," 'X | |
strNotches = strNotches & Hex8(lngCSVY) & "," 'Y | |
strNotches = strNotches & Hex8(shtCSVDegree) & "," 'Z | |
strNotches = strNotches & Hex8(0) & "," | |
strNotches = strNotches & Hex8(100) & "," 'rampa decelerazione ' ??????? | |
strNotches = strNotches & Hex8(0) & "," | |
strNotches = strNotches & Hex8(0) & "," | |
strNotches = strNotches & Hex8(0) & vbCrLf | |
lngCSVX = Math.Round(drNotch("X2") / 10, 0) 'modifica per la versione a SISTEMA CENTESIMALE, al PLC mandiamo ancora valori in decimi di mm --- 08/06/2015 | |
lngCSVY = Math.Round(drNotch("Y2") / 10, 0) 'modifica per la versione a SISTEMA CENTESIMALE, al PLC mandiamo ancora valori in decimi di mm --- 08/06/2015 | |
shtCSVDegree = drNotch("Degree") * 10 | |
strNotches = strNotches & Hex8(lngCSVX) & "," 'X | |
strNotches = strNotches & Hex8(lngCSVY) & "," 'Y | |
strNotches = strNotches & Hex8(shtCSVDegree) & "," 'Z | |
strNotches = strNotches & Hex8(0) & "," | |
strNotches = strNotches & Hex8(100) & "," 'rampa decelerazione | |
strNotches = strNotches & Hex8(0) & "," | |
strNotches = strNotches & Hex8(0) & "," | |
strNotches = strNotches & Hex8(0) & vbCrLf | |
lngDmCount = lngDmCount + 48 | |
Next | |
dvNotches.Dispose() | |
dvNotches = Nothing | |
' CICLO FORI ------------------------------------------------------------------------------------------------------------ | |
strHoles = "" | |
Dim shtIndexHole As Short | |
'1° ciclo di fori con il 1° Trapano | |
If gshtDrillNbr > 0 Then | |
Dim dvHoles As New DataView(gdtSegment) | |
dvHoles.RowFilter = "IdPattern = " & shtCSVPattern & " AND SegType = 20" | |
dvHoles.Sort = "SegSeq" | |
For Each drHole As DataRowView In dvHoles | |
For shtIndexHole = 1 To gshtRepeatHole | |
If gshtForceDrill = 2 Then 'se forzo i fori con il 2° trapano | |
strHoles = strHoles & Hex8(22) & "," 'tipo operazione | |
Else | |
strHoles = strHoles & Hex8(12) & "," 'tipo operazione | |
End If | |
strHoles = strHoles & Hex8(1) & "," 'numero righe | |
strHoles = strHoles & Hex8(100) & "," 'velocità percentuale | |
strHoles = strHoles & Hex8(0) & "," | |
strHoles = strHoles & Hex8(0) & "," | |
strHoles = strHoles & Hex8(0) & "," | |
strHoles = strHoles & Hex8(0) & "," | |
strHoles = strHoles & Hex8(0) & vbCrLf | |
lngCSVX = Math.Round(drHole("X1") / 10, 0) 'modifica per la versione a SISTEMA CENTESIMALE, al PLC mandiamo ancora valori in decimi di mm --- 08/06/2015 | |
lngCSVY = Math.Round(drHole("Y1") / 10, 0) 'modifica per la versione a SISTEMA CENTESIMALE, al PLC mandiamo ancora valori in decimi di mm --- 08/06/2015 | |
strHoles = strHoles & Hex8(lngCSVX) & "," 'X | |
strHoles = strHoles & Hex8(lngCSVY) & "," 'Y | |
strHoles = strHoles & Hex8(0) & "," | |
strHoles = strHoles & Hex8(0) & "," | |
strHoles = strHoles & Hex8(0) & "," | |
strHoles = strHoles & Hex8(0) & "," | |
strHoles = strHoles & Hex8(0) & "," | |
strHoles = strHoles & Hex8(0) & vbCrLf | |
lngDmCount = lngDmCount + 32 | |
Next | |
Next | |
dvHoles.Dispose() | |
End If | |
'2° ciclo di fori con il 2° Trapano - trapano Opzionale (fustella) | |
If gshtDrillNbr > 1 Or gshtForceDrill = 1 Then | |
Dim dvHoles As New DataView(gdtSegment) | |
dvHoles.RowFilter = "IdPattern = " & shtCSVPattern & " AND SegType = 21" | |
dvHoles.Sort = "SegSeq" | |
For Each drHole As DataRowView In dvHoles | |
For shtIndexHole = 1 To gshtRepeatHole | |
If gshtForceDrill = 1 Then 'se forzo i fori con il primo trapano | |
strHoles = strHoles & Hex8(12) & "," 'tipo operazione | |
Else | |
strHoles = strHoles & Hex8(22) & "," 'tipo operazione | |
End If | |
strHoles = strHoles & Hex8(1) & "," 'numero righe | |
strHoles = strHoles & Hex8(100) & "," 'velocità percent. | |
strHoles = strHoles & Hex8(0) & "," | |
strHoles = strHoles & Hex8(0) & "," | |
strHoles = strHoles & Hex8(0) & "," | |
strHoles = strHoles & Hex8(0) & "," | |
strHoles = strHoles & Hex8(0) & vbCrLf | |
lngCSVX = Math.Round(drHole("X1") / 10, 0) 'modifica per la versione a SISTEMA CENTESIMALE, al PLC mandiamo ancora valori in decimi di mm --- 08/06/2015 | |
lngCSVY = Math.Round(drHole("Y1") / 10, 0) 'modifica per la versione a SISTEMA CENTESIMALE, al PLC mandiamo ancora valori in decimi di mm --- 08/06/2015 | |
strHoles = strHoles & Hex8(lngCSVX) & "," 'X | |
strHoles = strHoles & Hex8(lngCSVY) & "," 'Y | |
strHoles = strHoles & Hex8(0) & "," | |
strHoles = strHoles & Hex8(0) & "," | |
strHoles = strHoles & Hex8(0) & "," | |
strHoles = strHoles & Hex8(0) & "," | |
strHoles = strHoles & Hex8(0) & "," | |
strHoles = strHoles & Hex8(0) & vbCrLf | |
lngDmCount = lngDmCount + 32 | |
Next | |
Next | |
dvHoles.Dispose() | |
End If | |
' INIZIO SAGOMA --------------------------------------------------------------------------------------------------------------------------- | |
strBody = "" | |
Dim dvBody As New DataView(gdtSegment) | |
dvBody.RowFilter = "IdPattern = " & shtCSVPattern & " AND (SegType < 10 OR SegType = 11 OR SegType = 13 OR SegType = 14 OR SegType = 35)" | |
dvBody.Sort = "SegSeq" | |
For Each drBody As DataRowView In dvBody | |
lngCSVX = Math.Round(drBody("X2") / 10, 0) 'modifica per la versione a SISTEMA CENTESIMALE, al PLC mandiamo ancora valori in decimi di mm --- 08/06/2015 | |
lngCSVY = Math.Round(drBody("Y2") / 10, 0) 'modifica per la versione a SISTEMA CENTESIMALE, al PLC mandiamo ancora valori in decimi di mm --- 08/06/2015 | |
shtCSVDegree = drBody("Degree") * 10 | |
'in alcuni casi devo FORZATAMENTE rifare la testata dell'azione | |
If drBody("SegType") = 6 And shtStepCountType6 = 3 Then GoTo SectionHead | |
If drBody("SegType") = 4 Or drBody("SegType") = 11 Or drBody("SegType") = 13 Or drBody("SegType") = 14 Then GoTo SectionHead | |
If shtLastSegType <> drBody("SegType") Or shtFlagSection <> drBody("SectionNum") Then | |
SectionHead: | |
If drBody("SegType") = 6 Then shtStepCountType6 = 0 | |
strBody = strBody & Hex8(drBody("SegType")) & "," 'tipo operazione | |
strBody = strBody & Hex8(drBody("SectionSeq")) & "," 'numero righe | |
strBody = strBody & Hex8(drBody("SectionSpeed")) & "," 'velocità percent. | |
If drBody("SegType") = 6 Then 'senso di rotazione | |
If shtCSVLastDegree > (drBody("Degree") * 10) And Math.Abs(shtCSVLastDegree - (drBody("Degree") * 10)) < 180 Then | |
strBody = strBody & Hex8(1) & "," 'scrivo rotaz oraria | |
Else | |
strBody = strBody & Hex8(-1) & "," 'scrivo rotaz antioraria | |
End If | |
Else | |
strBody = strBody & Hex8(0) & "," | |
End If | |
strBody = strBody & Hex8(Math.Round(drBody("SectionLength") / 10, 0)) & "," 'lunghezza dell'intero tratto (solo per tipo = 2); modifica per la versione a SISTEMA CENTESIMALE, al PLC mandiamo ancora valori in decimi di mm --- 08/06/2015 | |
strBody = strBody & Hex8(0) & "," | |
strBody = strBody & Hex8(0) & "," | |
strBody = strBody & Hex8(0) & vbCrLf | |
lngDmCount = lngDmCount + 16 | |
End If | |
'conto a che punto del 6 sono per rifare la testata ogni volta | |
If drBody("SegType") = "6" Then shtStepCountType6 = shtStepCountType6 + 1 | |
strBody = strBody & Hex8(lngCSVX) & "," 'X | |
strBody = strBody & Hex8(lngCSVY) & "," 'Y | |
strBody = strBody & Hex8(shtCSVDegree) & "," 'Z | |
' modifica del 07-05-2013 richiesta da Arnaldo: mettere, se si è in prossimità, e si sta derapando, i gradi di derapaggio. -> Togliere i gradi relativi (Arnaldo dice che non li usa) | |
''strBody = strBody & Hex8(drBody("SectionRelatDegree") * 10) & "," 'Z relativa (nella sezione) | |
' modifica del 13-05-2015: Arnaldo dopo la versione 103.2 somma algebricamente il grado da me dato con la deviazione di prossimità per trovare la tangenza nel calcolo. (evitiamo doppia deriva) | |
If drBody("Proximity") = 1 Then 'se sto derapando a causa delle prossimità | |
sngProximityDegree = drBody("Degree") - drBody("OldDegree") | |
If Math.Abs(sngProximityDegree) > 180 And sngProximityDegree > 0 Then | |
sngProximityDegree = sngProximityDegree - 360 | |
ElseIf Math.Abs(sngProximityDegree) > 180 And sngProximityDegree < 0 Then | |
sngProximityDegree = sngProximityDegree + 360 | |
End If | |
strBody = strBody & Hex8(sngProximityDegree * 10) & "," 'inserisco qua il valore di derapaggio | |
Else | |
strBody = strBody & Hex8(0) & "," 'era utilizzata per la la Z relativa (nella sezione) | |
End If | |
strBody = strBody & Hex8(drBody("PercRamp")) & "," 'rampa | |
strBody = strBody & Hex8(drBody("RelatDegree") * 10) & "," 'Z relativa (intera sagoma) | |
strBody = strBody & Hex8(drBody("Proximity")) & "," ' 1 se sono in prossimità | |
strBody = strBody & Hex8(Math.Round(drBody("CurveRadius") / 10, 0)) & vbCrLf 'raggio della curva (se sono in curva); modifica per la versione a SISTEMA CENTESIMALE, al PLC mandiamo ancora valori in decimi di mm --- 08/06/2015 | |
lngDmCount = lngDmCount + 16 | |
If drBody("SegType") = 11 Or drBody("SegType") = 13 Or drBody("SegType") = 14 Then 'solo nella caso della TaccaOnFly | |
strBody = strBody & Hex8(lngCSVLastX) & "," 'X | |
strBody = strBody & Hex8(lngCSVLastY) & "," 'Y | |
strBody = strBody & Hex8(shtCSVLastDegree) & "," 'Z | |
strBody = strBody & Hex8(shtCSVLastRelatDegree) & "," 'Z relativa all'inizio della sezione | |
strBody = strBody & Hex8(drBody("PercRamp")) & "," 'rampa | |
strBody = strBody & Hex8(drBody("RelatDegree") * 10) & "," 'Z relativo alla partenza della sagoma | |
strBody = strBody & Hex8(0) & "," | |
strBody = strBody & Hex8(0) & vbCrLf | |
lngDmCount = lngDmCount + 16 | |
End If | |
shtLastSegType = drBody("SegType") : shtFlagSection = drBody("SectionNum") | |
lngCSVLastX = lngCSVX : lngCSVLastY = lngCSVY : shtCSVLastDegree = shtCSVDegree : shtCSVLastRelatDegree = shtCSVRelatDegree | |
shtStepCount = shtStepCount + 1 | |
Next | |
dvBody.Dispose() | |
' TAGLI LATERALI ------------------------------------------------------------------------------------------------------------- | |
Dim dvLatCuts As New DataView(gdtSegment) | |
dvLatCuts.RowFilter = "IdPattern = " & shtCSVPattern & " AND SegType = 15" | |
dvLatCuts.Sort = "SegSeq" | |
strLatCuts = "" | |
For Each drLatCut As DataRowView In dvLatCuts | |
strLatCuts = strLatCuts & Hex8(15) & "," 'tipo operazione | |
strLatCuts = strLatCuts & Hex8(1) & "," 'numero righe | |
strLatCuts = strLatCuts & Hex8(100) & "," 'velocità percent. | |
strLatCuts = strLatCuts & Hex8(0) & "," | |
strLatCuts = strLatCuts & Hex8(0) & "," | |
strLatCuts = strLatCuts & Hex8(0) & "," | |
strLatCuts = strLatCuts & Hex8(0) & "," | |
strLatCuts = strLatCuts & Hex8(0) & vbCrLf | |
lngCSVX = Math.Round(drLatCut("X2") / 10, 0) 'modifica per la versione a SISTEMA CENTESIMALE, al PLC mandiamo ancora valori in decimi di mm --- 08/06/2015 | |
lngCSVY = Math.Round(drLatCut("Y2") / 10, 0) 'modifica per la versione a SISTEMA CENTESIMALE, al PLC mandiamo ancora valori in decimi di mm --- 08/06/2015 | |
shtCSVDegree = drLatCut("Degree") * 10 | |
strLatCuts = strLatCuts & Hex8(lngCSVX) & "," 'X | |
strLatCuts = strLatCuts & Hex8(lngCSVY) & "," 'Y | |
strLatCuts = strLatCuts & Hex8(shtCSVDegree) & "," 'Z | |
strLatCuts = strLatCuts & Hex8(0) & "," | |
strLatCuts = strLatCuts & Hex8(0) & "," | |
strLatCuts = strLatCuts & Hex8(0) & "," | |
strLatCuts = strLatCuts & Hex8(0) & "," | |
strLatCuts = strLatCuts & Hex8(0) & vbCrLf | |
lngDmCount = lngDmCount + 32 | |
Next | |
dvLatCuts.Dispose() | |
' SFRIDI INTERNI ------------------------------------------------------------------------------------------------------------- | |
Dim dvInternalCuts As New DataView(gdtSegment) | |
dvInternalCuts.RowFilter = "IdPattern = " & shtCSVPattern & " AND SegType = 16" | |
dvInternalCuts.Sort = "SegSeq" | |
strInternalCuts = "" | |
For Each drInternalCuts As DataRowView In dvInternalCuts | |
strInternalCuts = strInternalCuts & Hex8(16) & "," 'tipo operazione | |
strInternalCuts = strInternalCuts & Hex8(1) & "," 'numero righe | |
strInternalCuts = strInternalCuts & Hex8(100) & "," 'velocità percent. | |
strInternalCuts = strInternalCuts & Hex8(0) & "," | |
strInternalCuts = strInternalCuts & Hex8(0) & "," | |
strInternalCuts = strInternalCuts & Hex8(0) & "," | |
strInternalCuts = strInternalCuts & Hex8(0) & "," | |
strInternalCuts = strInternalCuts & Hex8(0) & vbCrLf | |
lngCSVX = Math.Round(drInternalCuts("X1") / 10, 0) 'modifica per la versione a SISTEMA CENTESIMALE, al PLC mandiamo ancora valori in decimi di mm --- 08/06/2015 | |
lngCSVY = Math.Round(drInternalCuts("Y1") / 10, 0) 'modifica per la versione a SISTEMA CENTESIMALE, al PLC mandiamo ancora valori in decimi di mm --- 08/06/2015 | |
shtCSVDegree = drInternalCuts("Degree") * 10 | |
strInternalCuts = strInternalCuts & Hex8(lngCSVX) & "," 'X | |
strInternalCuts = strInternalCuts & Hex8(lngCSVY) & "," 'Y | |
strInternalCuts = strInternalCuts & Hex8(shtCSVDegree) & "," 'Z | |
strInternalCuts = strInternalCuts & Hex8(0) & "," | |
strInternalCuts = strInternalCuts & Hex8(0) & "," | |
strInternalCuts = strInternalCuts & Hex8(0) & "," | |
strInternalCuts = strInternalCuts & Hex8(0) & "," | |
strInternalCuts = strInternalCuts & Hex8(0) & vbCrLf | |
lngCSVX = Math.Round(drInternalCuts("X2") / 10, 0) 'modifica per la versione a SISTEMA CENTESIMALE, al PLC mandiamo ancora valori in decimi di mm --- 08/06/2015 | |
lngCSVY = Math.Round(drInternalCuts("Y2") / 10, 0) 'modifica per la versione a SISTEMA CENTESIMALE, al PLC mandiamo ancora valori in decimi di mm --- 08/06/2015 | |
shtCSVDegree = drInternalCuts("Degree") * 10 | |
strInternalCuts = strInternalCuts & Hex8(lngCSVX) & "," 'X | |
strInternalCuts = strInternalCuts & Hex8(lngCSVY) & "," 'Y | |
strInternalCuts = strInternalCuts & Hex8(shtCSVDegree) & "," 'Z | |
strInternalCuts = strInternalCuts & Hex8(0) & "," | |
strInternalCuts = strInternalCuts & Hex8(0) & "," | |
strInternalCuts = strInternalCuts & Hex8(0) & "," | |
strInternalCuts = strInternalCuts & Hex8(0) & "," | |
strInternalCuts = strInternalCuts & Hex8(0) & vbCrLf | |
lngDmCount = lngDmCount + 48 | |
Next | |
dvInternalCuts.Dispose() | |
' FINE SAGOMA ------------------------------------------------------------------------------------------------------------- | |
strEndPattern = "" | |
strEndPattern = strEndPattern & Hex8(40) & "," ' comando fine sagoma | |
strEndPattern = strEndPattern & Hex8(1) & "," | |
strEndPattern = strEndPattern & "0000,0000,0000,0000,0000,0000,0000,0000,0000,0000,0000,0000" & vbCrLf | |
lngDmCount = lngDmCount + 16 | |
' TESTATA -------------------------------------------------------------------------------------------------------- | |
lngDmCount = lngDmCount + 112 ' 7 righe (scrivo infine la testata e calcolo prima il n° dei dati perchè li dichiaro preventivamente [2° riga]) | |
strHead = "" | |
strHead = strHead & Hex8(shtSeqCSVPattern) & "," ' Seq sagoma (numero progressivo) | |
strHead = strHead & Hex8(lngDmCount) & "," ' Numero dati | |
If gblnDoubleTubolar = True Then | |
strHead = strHead & Hex8(Math.Round(glng1stTubolarWidth / 10, 0)) & "," 'modifica per la versione a SISTEMA CENTESIMALE, al PLC mandiamo ancora valori in decimi di mm --- 08/06/2015 | |
Else | |
strHead = strHead & Hex8(Math.Round(glngMaxWidth / 10, 0)) & "," ' Altezza del piazzamento (mm/10); modifica per la versione a SISTEMA CENTESIMALE, al PLC mandiamo ancora valori in decimi di mm --- 08/06/2015 | |
End If | |
If gblnDoubleTubolar = True Then | |
strHead = strHead & Hex8(Math.Round(glng1stTubolarLength / 10, 0)) & "," 'modifica per la versione a SISTEMA CENTESIMALE, al PLC mandiamo ancora valori in decimi di mm --- 08/06/2015 | |
Else | |
strHead = strHead & Hex8(Math.Round(glngMaxLength / 10, 0)) & "," ' Lunghezza del piazzamento (mm/10); modifica per la versione a SISTEMA CENTESIMALE, al PLC mandiamo ancora valori in decimi di mm --- 08/06/2015 | |
End If | |
strHead = strHead & Hex8(Math.Min(gshtPercCuttingSpeed * glngMaxSpeed / 100, 400000)) & "," ' velocità di taglio (mm/10 per minuto) | |
strHead = strHead & Hex8(gshtRampType) & "," 'Tipo rampa (1,2,3) | |
strHead = strHead & Hex8(0) & "," | |
strHead = strHead & Hex8(gshtCuttingVacuumMBar) & vbCrLf ' Aspirazione taglio (milliBar) | |
strHead = strHead & Hex8(gshtCuttingVacuumMVolts) & "," ' Aspirazione taglio (milliVolts) | |
strHead = strHead & Hex8(gshtMBarPressorFoot) & "," ' valvola pressostatica piattello (milliBar) | |
strHead = strHead & Hex8(Math.Round(glng2ndTubolarWidth / 10, 0)) & "," ' Altezza del 2° piazzamento (mm/10); 'modifica per la versione a SISTEMA CENTESIMALE, al PLC mandiamo ancora valori in decimi di mm --- 08/06/2015 | |
strHead = strHead & Hex8(gshtPRSpeedPerc) & "," ' rallentamento prossimità (%) | |
strHead = strHead & Hex8(Math.Round(glng2ndTubolarLength / 10, 0)) & "," ' Lunghezza del 2° piazzamento (mm/10); modifica per la versione a SISTEMA CENTESIMALE, al PLC mandiamo ancora valori in decimi di mm --- 08/06/2015 | |
strHead = strHead & Hex8(gshtBladeTimeToMaxSpeed) & "," ' Tempo che impiega la lama ad arrivare al 100% | |
strHead = strHead & Hex8(gshtTimeToStart) & "," ' Tempo di attesa prima di iniziare un tratto | |
strHead = strHead & Hex8(gshtTimeToEnd) & vbCrLf ' Tempo di attesa per finire un tratto | |
strHead = strHead & Hex8(gshtSharpenTime) & "," ' Tempo affilatura in milliSec | |
strHead = strHead & Hex8(gshtSharpenSpeed) & "," 'Velocità affilatura % | |
strHead = strHead & Hex8(lngXMinRelative) & "," 'X Minima Prossime sagome (PRO ECLIPSE) | |
strHead = strHead & Hex8(gshtDrillTime) & "," ' Tempo di fortura in millisec | |
strHead = strHead & Hex8(IIf(gblnDrillWarmup = True, 1, 0)) & "," ' Risc punta Si/No | |
strHead = strHead & Hex8(gshtDrillWarmupTime) & "," ' Tempo resistenza | |
strHead = strHead & Hex8(gshtPercBladeRpm) & "," ' Numero giri lama % (30 / 130) | |
strHead = strHead & Hex8(Math.Round((gintMaxLengthSegment + gshtBladeLength) / 10, 0)) & vbCrLf 'massima lunghezza assoluta segmento ( + massima lunghezza lama); modifica per la versione a SISTEMA CENTESIMALE, al PLC mandiamo ancora valori in decimi di mm --- 08/06/2015 | |
strHead = strHead & Hex8(gshtCoolerType) & "," ' raffreddamento 0:NO; 1:Solo freddo; 2: freddo + APR | |
strHead = strHead & Hex8(0) & "," 'allineamento attivato si/no (per ora è NO di default) | |
strHead = strHead & Hex8(Math.Round(gintWindow / 10, 0)) & "," ' traslazione massima teorica (finestra di taglio massima) - gintMaxMarkerWindowSize; modifica per la versione a SISTEMA CENTESIMALE, al PLC mandiamo ancora valori in decimi di mm --- 08/06/2015 | |
strHead = strHead & Hex8(Math.Round(lngNextWindowMinX / 10, 0)) & "," ' minima X finestra successiva; modifica per la versione a SISTEMA CENTESIMALE, al PLC mandiamo ancora valori in decimi di mm --- 08/06/2015 | |
strHead = strHead & Hex8(IIf(gblnAutomShift = True, 1, 0)) & "," ' traslazione automatica SI/NO | |
strHead = strHead & Hex8(gshtShiftingVacuumMVolts) & "," ' aspirazione in milliVoltsd in traslazione | |
strHead = strHead & Hex8(gshtCurvePercDecel) & "," 'rallentamento in curva in % | |
strHead = strHead & Hex8(0) & vbCrLf ' Alza lama in tacca a V | |
strHead = strHead & Hex8(Math.Round(gshtBladeOvercut / 10, 0)) & "," ' valore croce; modifica per la versione a SISTEMA CENTESIMALE, al PLC mandiamo ancora valori in decimi di mm --- 08/06/2015 | |
strHead = strHead & Hex8(gshtCleverBladeAccDec) & "," ' accel decel lama intelligente | |
strHead = strHead & Hex8(gshtCoolingPause) & "," ' pausa di raffreddamento in affilatura | |
strHead = strHead & Hex8(gshtPressorOnAngles) & "," ' mB piattello su angoli e tacche | |
strHead = strHead & Hex8(0) & "," ' Y minima della finestra (utilizzata da quando si fa allineamento singolo) | |
strHead = strHead & Hex8(gshtCleverBladeLimit1) & "," ' sensibilità lama intelligente | |
strHead = strHead & Hex8(gshtCleverBladeLimit2) & "," ' rallentamento rispetto a lama intelligente in % | |
strHead = strHead & Hex8(shtFirstPattInWindow) & vbCrLf 'numero della prima sagoma nella finestra di taglio | |
' SPOSTA TAPPETO ------------------------------------------------------------------------------------------------------ | |
strHead = strHead & Hex8(20) & "," 'tipo avanzamento | |
strHead = strHead & Hex8(1) & "," '1 solo passo | |
strHead = strHead & Hex8(0) & "," | |
strHead = strHead & Hex8(0) & "," | |
strHead = strHead & Hex8(0) & "," | |
strHead = strHead & Hex8(0) & "," | |
strHead = strHead & Hex8(0) & "," | |
strHead = strHead & Hex8(0) & vbCrLf | |
strHead = strHead & Hex8(Math.Round(lngWindowMinX / 10, 0)) & "," 'valore asse W (minima X finestra corrente); modifica per la versione a SISTEMA CENTESIMALE, al PLC mandiamo ancora valori in decimi di mm --- 08/06/2015 | |
strHead = strHead & Hex8(0) & "," | |
strHead = strHead & Hex8(0) & "," | |
strHead = strHead & Hex8(0) & "," | |
strHead = strHead & Hex8(0) & "," | |
strHead = strHead & Hex8(0) & "," | |
strHead = strHead & Hex8(0) & "," | |
strHead = strHead & Hex8(0) & vbCrLf | |
strCSVFileName = Application.StartupPath & "\OUTPUT\CSV\SAGO-" & PadLeft(shtSeqCSVPattern, 4, "0") & ".CSV" | |
Dim srSagoCSV As IO.StreamWriter = New IO.StreamWriter(strCSVFileName) | |
If gblnNotchAfter = False Then 'Testata -> tacche -> fori -> Perimetro -> Tagli laterali -> Chiusura | |
srSagoCSV.WriteLine(strHead & strNotches & strHoles & strBody & strInternalCuts & strLatCuts & strEndPattern) | |
ElseIf gblnNotchAfter = True Then 'Testata -> fori -> Perimetro -> Tacche (solo tipo 10) ->Tagli laterali -> Chiusura | |
srSagoCSV.WriteLine(strHead & strHoles & strBody & strNotches & strInternalCuts & strLatCuts & strEndPattern) | |
End If |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment