Merge remote-tracking branch 'origin/develop' into develop
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>
|
||||
|
||||
@@ -2609,12 +2609,18 @@ namespace MTC_Adapter
|
||||
// cicl su path x leggere le velocità dell'UnOp
|
||||
for (int i = 0; i < numUnOp; i++)
|
||||
{
|
||||
// leggo valore Codice
|
||||
locSpeedRate = BitConverter.ToUInt16(unOpSpeedMem, 2 * i);
|
||||
|
||||
// leggo valore Codice
|
||||
locSpeedRate = BitConverter.ToUInt16(unOpSpeedMem, 2 * i);
|
||||
// leggo 41° byte = indice 40 + 2*i x le var del carico UnOp
|
||||
UnOpLoad = unOpSpeedMem[40 + i];
|
||||
|
||||
// eventuale fix bigEndian...
|
||||
if (hasBigEndian)
|
||||
{
|
||||
locSpeedRate = Endian.SwapUInt16((ushort)locSpeedRate);
|
||||
}
|
||||
|
||||
vettUnOp[i].mUnOpSpeed.Value = locSpeedRate;
|
||||
vettUnOp[i].mUnOpLoad.Value = UnOpLoad;
|
||||
vettUnOp[i].mUnOpSpeedOverr.Value = SpeedRateOver;
|
||||
|
||||
@@ -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...
|
||||
@@ -763,7 +788,7 @@ namespace MTC_Adapter
|
||||
|
||||
// da gestire instance = PATH!!! 1/2, x cui raddoppia i messaggi...
|
||||
|
||||
string codAllarme = string.Format("P{0}:S{1} | {2} | {3}", allarme.Instance+1, allarme.Source.Name, allarme.Id, allarme.Message);
|
||||
string codAllarme = string.Format("P{0}:S{1}:{2}:{3}", allarme.Instance + utils.CRI("SiemensBaseCountPath"), allarme.Source.Name, allarme.Id, allarme.Message);
|
||||
#if false
|
||||
// se ho asse accodo ad asse altrimenti no...
|
||||
if (allarme.axis == 0)
|
||||
|
||||
@@ -45,7 +45,7 @@
|
||||
<!--<add key ="ipPLC" value="192.168.214.1" />-->
|
||||
<!--CMS PROD-->
|
||||
<!--<add key ="ipPLC" value="192.168.139.1" />-->
|
||||
<add key ="ipPLC" value="192.168.157.2" />
|
||||
<add key ="ipPLC" value="192.168.214.1" />
|
||||
|
||||
<add key="recTime" value="true"/>
|
||||
<add key="verbose" value="true"/>
|
||||
@@ -79,6 +79,8 @@
|
||||
<add key="AnalogDataFilePath" value="AnalogData.map"/>
|
||||
<add key="StatusListFilePath" value="StatusList.map"/>
|
||||
<add key="SubModeListFilePath" value="SubModeList.map"/>
|
||||
<!--GEstione path siemens-->
|
||||
<add key="SiemensBaseCountPath" value="0"/>
|
||||
<!--conf gestione "semplificata" accesso a tutta la memoria ogni volta-->
|
||||
<!--conf x CMS-->
|
||||
<add key="procIotMem" value="false"/>
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<AdapterConf xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
|
||||
<Version>1</Version>
|
||||
<NomeAdapt>ADAPTER_OSAI</NomeAdapt>
|
||||
<TipoAdapt>OSAI</TipoAdapt>
|
||||
<NomeAdapt>ADAPTER_SIEMENS</NomeAdapt>
|
||||
<TipoAdapt>SIEMENS</TipoAdapt>
|
||||
<ContOreMaccOn>0</ContOreMaccOn>
|
||||
<ContOreMaccLav>0</ContOreMaccLav>
|
||||
<ContSlittaTast>0</ContSlittaTast>
|
||||
@@ -83,10 +83,6 @@
|
||||
<ident>Path_01</ident>
|
||||
<dataRefList />
|
||||
</element>
|
||||
<element>
|
||||
<ident>Path_02</ident>
|
||||
<dataRefList />
|
||||
</element>
|
||||
</Path>
|
||||
<UnOp>
|
||||
<element>
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -1,7 +1 @@
|
||||
# Commenti con cancelletto, struttura un variabile per riga, tipo chiave|valore (occhio che il separatore è configurato da .cofig come "testCharSep"); spazi e tabulazioni dovrei trimmarli in acquisizione (qui inseriti per comodità di lettura)
|
||||
001|Axis_01_Load |NUM
|
||||
002|Axis_02_Load |NUM
|
||||
003|Axis_03_Load |NUM
|
||||
004|Axis_04_Load |NUM
|
||||
005|Axis_05_Load |NUM
|
||||
006|Axis_06_Load |NUM
|
||||
# Commenti con cancelletto, struttura un variabile per riga, tipo chiave|valore (occhio che il separatore è configurato da .cofig come "testCharSep"); spazi e tabulazioni dovrei trimmarli in acquisizione (qui inseriti per comodità di lettura)
|
||||
@@ -21,8 +21,8 @@
|
||||
020|VacAct_02_Count |COUNT
|
||||
021|Lubro_01_Num |COUNT
|
||||
022|SlittaTastatore_Count |COUNT
|
||||
023|ProtMagazzino_01_Count |COUNT
|
||||
024|ProtMagazzino_02_Count |COUNT
|
||||
023|SlittaMagazzino_01_Count |COUNT
|
||||
024|ProtMagazzino_01_Count |COUNT
|
||||
025|UnOp_01_NumCambiUT |COUNT
|
||||
026|Axis_01_AccTime |COUNT
|
||||
027|Axis_02_AccTime |COUNT
|
||||
|
||||
Binary file not shown.
Reference in New Issue
Block a user