update stato on--> active
This commit is contained in:
@@ -894,6 +894,39 @@ Namespace CNC
|
||||
|
||||
#Region "Funzioni specifiche IOT"
|
||||
|
||||
|
||||
|
||||
''' <summary>
|
||||
''' Struttura dati Posizione XYZ IJK
|
||||
''' </summary>
|
||||
Public Structure PosizLav
|
||||
''' <summary>
|
||||
''' Valore X
|
||||
''' </summary>
|
||||
Public X As Single
|
||||
''' <summary>
|
||||
''' Valore Y
|
||||
''' </summary>
|
||||
Public Y As Single
|
||||
''' <summary>
|
||||
''' Valore Z
|
||||
''' </summary>
|
||||
Public Z As Single
|
||||
''' <summary>
|
||||
''' Valore I
|
||||
''' </summary>
|
||||
Public I As Single
|
||||
''' <summary>
|
||||
''' Valore J
|
||||
''' </summary>
|
||||
Public J As Single
|
||||
''' <summary>
|
||||
''' Valore K
|
||||
''' </summary>
|
||||
Public K As Single
|
||||
|
||||
End Structure
|
||||
|
||||
''' <summary>
|
||||
''' Struttura dati FeedSpeed
|
||||
''' </summary>
|
||||
@@ -1187,6 +1220,57 @@ Namespace CNC
|
||||
|
||||
End Function
|
||||
|
||||
'aaIwCorr
|
||||
|
||||
''' <summary>
|
||||
''' recupera valori posizione xyz ijk
|
||||
''' </summary>
|
||||
''' <param name="maxProc"></param>
|
||||
''' <returns></returns>
|
||||
Public Function getPathTTCoord(maxProc As Integer) As PosizLav()
|
||||
|
||||
' RIFERIMENTO:
|
||||
' SynumerikOperate_net, pg 52
|
||||
' Parameter manual NC, pg 21
|
||||
' /Channel/State/actFeedRateIpo[u1] pg315
|
||||
|
||||
|
||||
ReDim itemRead(0)
|
||||
'itemRead(0) = New Item("/Channel/GeometricAxis/actToolEdgeCenterPos[u1,1,6]") 'pg 315
|
||||
'itemRead(0) = New Item("/Channel/State/acToolOAct[u1,1,6]") 'pg 306 versori 0 0 1 0 0 1?
|
||||
'itemRead(0) = New Item("/Channel/State/pToolO[u1,1,6]") 'pg 343
|
||||
'itemRead(0) = New Item("/Channel/State/acIwStat[u1,1]") 'pg 290 nada
|
||||
itemRead(0) = New Item("/Channel/State/acIwStat[u1,2]") 'pg 290 nada
|
||||
' cmdFeedRateIpo pg 329
|
||||
'itemRead(1) = New Item("DB21.DBW158:[36]") 'funzioni estese?!?
|
||||
|
||||
'lettura
|
||||
Do
|
||||
Try
|
||||
m_DataSvcRW.Read(itemRead)
|
||||
Exit Do
|
||||
Catch ex As DataSvcBusyException
|
||||
Debug.Print(ex.Message)
|
||||
Catch ex As DataSvcException
|
||||
Throw New CmsNcException("ERR GetStaticData CNC.SIEMENS DataSvcException", ex)
|
||||
End Try
|
||||
Loop
|
||||
|
||||
Dim answ(maxProc) As PosizLav
|
||||
|
||||
For i As Integer = 0 To maxProc - 1
|
||||
answ(i).X = 0 ' Convert.ToSingle(itemRead(0).Value)
|
||||
answ(i).Y = 0 ' Convert.ToSingle(itemRead(0).Value)
|
||||
answ(i).Z = 0 ' Convert.ToSingle(itemRead(0).Value)
|
||||
answ(i).I = 0 ' Convert.ToSingle(itemRead(0).Value)
|
||||
answ(i).J = 0 ' Convert.ToSingle(itemRead(0).Value)
|
||||
answ(i).K = 0 ' Convert.ToSingle(itemRead(0).Value)
|
||||
Next i
|
||||
|
||||
Return answ
|
||||
|
||||
End Function
|
||||
|
||||
''' <summary>
|
||||
''' recupera valori feed/speed
|
||||
''' </summary>
|
||||
@@ -1197,21 +1281,13 @@ Namespace CNC
|
||||
' RIFERIMENTO:
|
||||
' SynumerikOperate_net, pg 52
|
||||
' Parameter manual NC, pg 21
|
||||
' /Channel/MachineAxis/actFeedRate[u1, 0]
|
||||
' /Channel/State/actFeedRateIpo[u1] pg315
|
||||
|
||||
' preparo memorie
|
||||
'ReDim itemRead(maxProc - 1)
|
||||
'For i As Integer = 0 To maxProc - 1
|
||||
' 'itemRead(i) = New Item("/Channel/MachineAxis/actFeedRate[u" & i + 1 & ",1]") ' leggo FEED!
|
||||
' itemRead(i) = New Item("DB21.DBW158:[36]") 'funzioni estese?!?
|
||||
'Next i
|
||||
|
||||
ReDim itemRead(0)
|
||||
itemRead(0) = New Item("DB21.DBW158:[36]") 'funzioni estese?!?
|
||||
'itemRead(1) = New Item("DB22.DBW158:[36]") 'funzioni estese?!?
|
||||
'itemRead(2) = New Item("DB23.DBW158:[36]") 'funzioni estese?!?
|
||||
'itemRead(3) = New Item("DB24.DBW158:[36]") 'funzioni estese?!?
|
||||
'itemRead(4) = New Item("DB25.DBW158:[36]") 'funzioni estese?!?
|
||||
itemRead(0) = New Item("/Channel/State/cmdFeedRateIpo[u1]") 'pg 315
|
||||
' cmdFeedRateIpo pg 329
|
||||
'itemRead(1) = New Item("DB21.DBW158:[36]") 'funzioni estese?!?
|
||||
|
||||
'lettura
|
||||
Do
|
||||
@@ -1227,7 +1303,7 @@ Namespace CNC
|
||||
|
||||
Dim answ As FeedSpeedData
|
||||
|
||||
answ.Feed = UIntegerToSingle(itemRead(0).Value(0))
|
||||
answ.Feed = Convert.ToSingle(itemRead(0).Value)
|
||||
|
||||
Return answ
|
||||
|
||||
|
||||
@@ -1785,8 +1785,8 @@ namespace MTC_Adapter
|
||||
// avvio!
|
||||
mAdapter.Start();
|
||||
|
||||
// setto status a ON
|
||||
mStatus.Value = "ON";
|
||||
// setto status a ACTIVE
|
||||
mStatus.Value = "ACTIVE";
|
||||
|
||||
// resetto running flag...
|
||||
adpCommAct = false;
|
||||
|
||||
@@ -981,12 +981,11 @@ namespace MTC_Adapter
|
||||
SIEMENS_ref.getPathGCodeMod(currAdpConf.nPath, ref vettGCod);
|
||||
if (utils.CRB("recTime")) TimingData.addResult("R-GCodModal", DateTime.Now.Subtract(inizio).Ticks);
|
||||
|
||||
|
||||
// NON sappiamo cosa misura... NON leggo
|
||||
#if false
|
||||
|
||||
inizio = DateTime.Now;
|
||||
CMSCncLib.Focas1.ODB5AXMAN vettTTCoord = SIEMENS_ref.getPathTTCoord();
|
||||
if (utils.CRB("recTime")) TimingData.addResult("R-TTCoord", DateTime.Now.Subtract(inizio).Ticks);
|
||||
inizio = DateTime.Now;
|
||||
SIEMENS.PosizLav[] vettTTCoord = SIEMENS_ref.getPathTTCoord(currAdpConf.nPath);
|
||||
if (utils.CRB("recTime")) TimingData.addResult("R-TTCoord", DateTime.Now.Subtract(inizio).Ticks);
|
||||
#endif
|
||||
|
||||
// ciclo su path
|
||||
@@ -1011,15 +1010,18 @@ namespace MTC_Adapter
|
||||
|
||||
vettPath[i].mPathCodG_Act.Value = GCodAttivi;
|
||||
sb_3.AppendLine(string.Format("Path {0}, GCodes: {1}", i + 1, GCodAttivi));
|
||||
|
||||
// nON leggo
|
||||
#if false
|
||||
vettPath[i].mPathPosActX.Value = ((decimal)vettTTCoord[i].X);// / utils.CRI("fattdecimale");
|
||||
vettPath[i].mPathPosActY.Value = ((decimal)vettTTCoord[i].Y);// / utils.CRI("fattdecimale");
|
||||
vettPath[i].mPathPosActZ.Value = ((decimal)vettTTCoord[i].Z);// / utils.CRI("fattdecimale");
|
||||
vettPath[i].mPathPosActI.Value = ((decimal)vettTTCoord[i].I);// / utils.CRI("fattdecimale");
|
||||
vettPath[i].mPathPosActJ.Value = ((decimal)vettTTCoord[i].J);// / utils.CRI("fattdecimale");
|
||||
vettPath[i].mPathPosActK.Value = ((decimal)vettTTCoord[i].K);// / utils.CRI("fattdecimale");
|
||||
#endif
|
||||
|
||||
vettPath[i].mPathPosActX.Value = ((decimal)vettTTCoord.data1) / utils.CRI("fattdecimale");
|
||||
vettPath[i].mPathPosActY.Value = ((decimal)vettTTCoord.data2) / utils.CRI("fattdecimale");
|
||||
vettPath[i].mPathPosActZ.Value = ((decimal)vettTTCoord.data3) / utils.CRI("fattdecimale");
|
||||
vettPath[i].mPathPosActI.Value = ((decimal)vettTTCoord.c1) / utils.CRI("fattdecimale");
|
||||
vettPath[i].mPathPosActJ.Value = ((decimal)vettTTCoord.c2) / utils.CRI("fattdecimale");
|
||||
vettPath[i].mPathPosActK.Value = "0"; // è 5 assi...nullo...
|
||||
|
||||
#if false
|
||||
// 2017.01.16 da rivedere
|
||||
vettPath[i].mPathCurrProgRowNum.Value = "";
|
||||
vettPath[i].mPathActiveAxes.Value = "";
|
||||
|
||||
Reference in New Issue
Block a user