completata gestione GCodes modalità multipath

This commit is contained in:
Samuele E. Locatelli
2017-06-29 15:09:11 +02:00
parent d7b55ef336
commit 6fe74a631d
3 changed files with 2325 additions and 2344 deletions
@@ -1065,13 +1065,20 @@ Namespace CNC
''' <param name="maxProc"></param>
''' <param name="GCodeCurr">Vettore codici attivi correnti</param>
''' <returns></returns>
Public Function getPathGCodeMod(maxProc As Integer, ByRef GCodeCurr As String()) As Boolean
Public Function getPathGCodeMod(maxProc As Integer, ByRef GCodeCurr As String(,)) As Boolean
' RIFERIMENTO:
' txt Giuseppe
' SynumerikOperate_net, pg 52
' Parameter manual NC, pg 401
ReDim itemRead(0)
itemRead(0) = New Item("/Channel/SelectedFunctions/ncFktAct[u1,1,#64]") ' leggo TUTTI i 64 gruppi...
' preparo memorie
Dim maxGruppi As Int16
maxGruppi = 64
ReDim itemRead(maxProc - 1)
For i As Integer = 0 To maxProc - 1
itemRead(i) = New Item("/Channel/SelectedFunctions/ncFktAct[u" & i + 1 & ",1,#" & maxGruppi & "]") ' leggo TUTTI i gruppi...
Next i
'lettura
Do
Try
m_DataSvcRW.Read(itemRead)
@@ -1084,8 +1091,10 @@ Namespace CNC
Loop
' faccio copia valori!
For i As Integer = 0 To 63
GCodeCurr(i) = itemRead(0).Value(i)
For i As Integer = 0 To maxGruppi - 1
For j As Integer = 0 To maxProc - 1
GCodeCurr(j, i) = itemRead(j).Value(i)
Next j
Next i
' chiudo!
+17 -45
View File
@@ -971,55 +971,16 @@ namespace MTC_Adapter
{
base.getPath();
string[] vettGCod = new string[64];
string[,] vettGCod = new string[2, 64];
// recupero vettore generale G MODE
inizio = DateTime.Now;
SIEMENS_ref.getPathGCodeMod(1, ref vettGCod);
SIEMENS_ref.getPathGCodeMod(2, ref vettGCod);
if (utils.CRB("recTime")) TimingData.addResult("R-GCodModal", DateTime.Now.Subtract(inizio).Ticks);
string GCodAttivi = vettGCod[0];
#if false
string GCodAttivi = "";
GCodAttivi += string.Format("[{0}]", vettGCodes.gcd0.code);
GCodAttivi += string.Format("[{0}]", vettGCodes.gcd1.code);
GCodAttivi += string.Format("[{0}]", vettGCodes.gcd2.code);
GCodAttivi += string.Format("[{0}]", vettGCodes.gcd3.code);
GCodAttivi += string.Format("[{0}]", vettGCodes.gcd4.code);
GCodAttivi += string.Format("[{0}]", vettGCodes.gcd5.code);
GCodAttivi += string.Format("[{0}]", vettGCodes.gcd6.code);
GCodAttivi += string.Format("[{0}]", vettGCodes.gcd7.code);
GCodAttivi += string.Format("[{0}]", vettGCodes.gcd8.code);
GCodAttivi += string.Format("[{0}]", vettGCodes.gcd9.code);
GCodAttivi += string.Format("[{0}]", vettGCodes.gcd10.code);
GCodAttivi += string.Format("[{0}]", vettGCodes.gcd11.code);
GCodAttivi += string.Format("[{0}]", vettGCodes.gcd12.code);
GCodAttivi += string.Format("[{0}]", vettGCodes.gcd13.code);
GCodAttivi += string.Format("[{0}]", vettGCodes.gcd14.code);
GCodAttivi += string.Format("[{0}]", vettGCodes.gcd15.code);
GCodAttivi += string.Format("[{0}]", vettGCodes.gcd16.code);
GCodAttivi += string.Format("[{0}]", vettGCodes.gcd17.code);
GCodAttivi += string.Format("[{0}]", vettGCodes.gcd18.code);
GCodAttivi += string.Format("[{0}]", vettGCodes.gcd19.code);
GCodAttivi += string.Format("[{0}]", vettGCodes.gcd20.code);
GCodAttivi += string.Format("[{0}]", vettGCodes.gcd21.code);
GCodAttivi += string.Format("[{0}]", vettGCodes.gcd22.code);
GCodAttivi += string.Format("[{0}]", vettGCodes.gcd23.code);
GCodAttivi += string.Format("[{0}]", vettGCodes.gcd24.code);
GCodAttivi += string.Format("[{0}]", vettGCodes.gcd25.code);
GCodAttivi += string.Format("[{0}]", vettGCodes.gcd26.code);
GCodAttivi += string.Format("[{0}]", vettGCodes.gcd27.code);
inizio = DateTime.Now;
vettGCodes = SIEMENS_ref.getPathGCode1Shot();
if (utils.CRB("recTime")) TimingData.addResult("R-GCodOneShot", DateTime.Now.Subtract(inizio).Ticks);
if (vettGCodes.gcd0.flag > 0) GCodAttivi += string.Format("[{0}]", vettGCodes.gcd0.code);
if (vettGCodes.gcd1.flag > 0) GCodAttivi += string.Format("[{0}]", vettGCodes.gcd1.code);
if (vettGCodes.gcd2.flag > 0) GCodAttivi += string.Format("[{0}]", vettGCodes.gcd2.code);
if (vettGCodes.gcd3.flag > 0) GCodAttivi += string.Format("[{0}]", vettGCodes.gcd3.code);
inizio = DateTime.Now;
CMSCncLib.Focas1.ODB5AXMAN vettTTCoord = SIEMENS_ref.getPathTTCoord();
if (utils.CRB("recTime")) TimingData.addResult("R-TTCoord", DateTime.Now.Subtract(inizio).Ticks);
@@ -1034,8 +995,20 @@ namespace MTC_Adapter
sb_2 = new StringBuilder();
sb_3 = new StringBuilder();
// copio gcodes!
string GCodAttivi = "";
for (int j = 0; j < 64; j++)
{
// SOLO se è diverso da vuoto...
if (vettGCod[i, j] != "")
{
GCodAttivi += string.Format("[{0}]", vettGCod[i, j]);
}
}
vettPath[i].mPathCodG_Act.Value = GCodAttivi;
sb_3.AppendLine(string.Format("Path {0}, GCodes: {1}", i + 1, GCodAttivi));
#if false
vettPath[i].mPathCodG_Act.Value = GCodAttivi;
vettPath[i].mPathPosActX.Value = ((decimal)vettTTCoord.data1) / utils.CRI("fattdecimale");
vettPath[i].mPathPosActY.Value = ((decimal)vettTTCoord.data2) / utils.CRI("fattdecimale");
@@ -1049,7 +1022,6 @@ namespace MTC_Adapter
vettPath[i].mPathActiveAxes.Value = "";
sb_2.AppendLine(string.Format("Path {0}, PROG: {1}", i + 1, vettPath[i].mPathCurrProg.Value));
sb_3.AppendLine(string.Format("Path {0}, GCodes: {1}", i + 1, GCodAttivi));
sb_3.AppendLine(string.Format("Path {0}, Asse 1: {1:N3}", i + 1, ((decimal)vettTTCoord.data1) / utils.CRI("fattdecimale")));
sb_3.AppendLine(string.Format("Path {0}, Asse 2: {1:N3}", i + 1, ((decimal)vettTTCoord.data2) / utils.CRI("fattdecimale")));
+2293 -2293
View File
File diff suppressed because it is too large Load Diff