Update con note x feed/speed che NON vanno
This commit is contained in:
@@ -894,6 +894,21 @@ Namespace CNC
|
||||
|
||||
#Region "Funzioni specifiche IOT"
|
||||
|
||||
''' <summary>
|
||||
''' Struttura dati FeedSpeed
|
||||
''' </summary>
|
||||
Public Structure FeedSpeedData
|
||||
''' <summary>
|
||||
''' Valore Feed
|
||||
''' </summary>
|
||||
Public Feed As Single
|
||||
''' <summary>
|
||||
''' Valore Speed
|
||||
''' </summary>
|
||||
Public Speed As Single
|
||||
|
||||
End Structure
|
||||
|
||||
''' <summary>
|
||||
''' Struttura dati asse
|
||||
''' </summary>
|
||||
@@ -1111,6 +1126,52 @@ Namespace CNC
|
||||
|
||||
End Function
|
||||
|
||||
''' <summary>
|
||||
''' recupera valori feed/speed
|
||||
''' </summary>
|
||||
''' <param name="maxProc"></param>
|
||||
''' <returns></returns>
|
||||
Public Function getAllNcInfo(maxProc As Integer) As FeedSpeedData
|
||||
|
||||
' RIFERIMENTO:
|
||||
' SynumerikOperate_net, pg 52
|
||||
' Parameter manual NC, pg 21
|
||||
' /Channel/MachineAxis/actFeedRate[u1, 0]
|
||||
|
||||
' 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?!?
|
||||
|
||||
'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 As FeedSpeedData
|
||||
|
||||
answ.Feed = UIntegerToSingle(itemRead(0).Value(0))
|
||||
|
||||
Return answ
|
||||
|
||||
End Function
|
||||
|
||||
''' <summary>
|
||||
''' procedura per risposta alla segnalazione di allarmi...
|
||||
''' </summary>
|
||||
|
||||
@@ -538,6 +538,31 @@ namespace MTC_Adapter
|
||||
/// </summary>
|
||||
public override void readGlobalData()
|
||||
{
|
||||
// 2017.11.20 tentato di recuperare il dato ma pare ci siano solo info x singolo asse, la DB21 SEMBRA promettente ma lato S7 abbiamo verificato con Adimar che nON E? usata nella DBW158 e seg.. x popolare dati di FEEDRATE/SPEEDRATE...
|
||||
#if true
|
||||
// Parameter manual NC... pag 790:
|
||||
/*
|
||||
* Leggendo questo:
|
||||
* "The extended address of the F function contains an identifier with the following meaning:
|
||||
– 0: Path feedrate
|
||||
– 1 - 31: Machine axis number for feedrate for positioning axes
|
||||
*
|
||||
* SEMBREREBBE che leggere u1,0 significhi leggere per INTERO path non x un singolo asse...
|
||||
* --> pag 21--> leggo /Channel/MachineAxis/actFeedRate[u1, 0]
|
||||
* */
|
||||
// leggo dati globali...
|
||||
parentForm.commPlcActive = true;
|
||||
inizio = DateTime.Now;
|
||||
var fsData = SIEMENS_ref.getAllNcInfo(currAdpConf.nPath);
|
||||
if (utils.CRB("recTime")) TimingData.addResult("R-NcInfo", DateTime.Now.Subtract(inizio).Ticks);
|
||||
parentForm.commPlcActive = false;
|
||||
|
||||
// recupero speed e feed...
|
||||
FeedRate = Convert.ToInt32(fsData.Feed);
|
||||
//SpeedRate = Convert.ToInt32(allNcData.realspeed);
|
||||
#endif
|
||||
|
||||
|
||||
// cercare funzione!!!
|
||||
#if false
|
||||
// leggo dati globali...
|
||||
|
||||
Binary file not shown.
Reference in New Issue
Block a user