Aggiunta speed assi (da capire...)

This commit is contained in:
Samuele E. Locatelli
2016-05-17 13:58:14 +02:00
parent 8461743d04
commit 59538d23fe
3 changed files with 34 additions and 0 deletions
Binary file not shown.
@@ -638,6 +638,34 @@ Namespace CNC
End Function
Public Function getAllAxisSpeed() As Focas1.ODBSPEED
Dim nPathIdx As Integer
Dim nNumAxisRead As Integer
Dim nReturn As Integer
Dim szAssi() As String = {String.Empty}
Dim speedAssi As Focas1.ODBSPEED
'leggo il numero del processo attivo
nPathIdx = GetActivePath()
'leggo num max assi dal cn
nNumAxisRead = Focas1.MAX_AXIS
If Is30Series Then
' leggo tutto!!!
nReturn = Focas1.cnc_rdspeed(nLibHandle(nPathIdx), -1, speedAssi)
If F_CheckRetError_Cnc(nReturn, "cnc_rdspeed RefreshAxisSpeed CNC.FANUC.CMS_CncLib") Then
Throw New CmsNcException("ERR cnc_rdspeed RefreshAxisSpeed CNC.FANUC.CMS_CncLib")
End If
End If
Return speedAssi
End Function
''' <summary>
''' Legge o scrive Byte da MEMORIE PLC
+6
View File
@@ -597,6 +597,10 @@ namespace MTC_Sim
CMSCncLib.Focas1.ODBPOS posAssi = FANUC_ref.getAllAxisPos();
if (utils.CRB("recTime")) TimingData.addResult("R-AXIS_POS", DateTime.Now.Subtract(inizio).Ticks);
inizio = DateTime.Now;
CMSCncLib.Focas1.ODBSPEED speedAssi = FANUC_ref.getAllAxisSpeed();
if (utils.CRB("recTime")) TimingData.addResult("R-AXIS_SPEED", DateTime.Now.Subtract(inizio).Ticks);
// fare: salvataggio assi...
StringBuilder sb = new StringBuilder();
sb.AppendLine(string.Format("Asse {0}: PosAct:{1:N3}, ToGo:{2:N3}{3}", posAssi.p1.abs.name, (double)(posAssi.p1.abs.data) / Math.Pow(10, posAssi.p1.abs.dec), posAssi.p1.dist.name, (double)(posAssi.p1.dist.data) / Math.Pow(10, posAssi.p1.dist.dec), Environment.NewLine));
@@ -605,6 +609,8 @@ namespace MTC_Sim
sb.AppendLine(string.Format("Asse {0}: PosAct:{1:N3}, ToGo:{2:N3}{3}", posAssi.p4.abs.name, (double)(posAssi.p4.abs.data) / Math.Pow(10, posAssi.p4.abs.dec), posAssi.p4.dist.name, (double)(posAssi.p4.dist.data) / Math.Pow(10, posAssi.p4.dist.dec), Environment.NewLine));
sb.AppendLine(string.Format("Asse {0}: PosAct:{1:N3}, ToGo:{2:N3}{3}", posAssi.p5.abs.name, (double)(posAssi.p5.abs.data) / Math.Pow(10, posAssi.p5.abs.dec), posAssi.p5.dist.name, (double)(posAssi.p5.dist.data) / Math.Pow(10, posAssi.p5.dist.dec), Environment.NewLine));
sb.AppendLine(string.Format("Asse {0}: PosAct:{1:N3}, ToGo:{2:N3}{3}", posAssi.p6.abs.name, (double)(posAssi.p6.abs.data) / Math.Pow(10, posAssi.p6.abs.dec), posAssi.p6.dist.name, (double)(posAssi.p6.dist.data) / Math.Pow(10, posAssi.p6.dist.dec), Environment.NewLine));
sb.AppendLine(string.Format("{0} {1}", speedAssi.actf.name, speedAssi.actf.data));
sb.AppendLine(string.Format("{0} {1}", speedAssi.acts.name, speedAssi.acts.data));
parentForm.showMessage(sb.ToString());
}