Aggiunta lettura codici G Modali (ok SIM)
This commit is contained in:
Binary file not shown.
@@ -729,6 +729,36 @@ Namespace CNC
|
||||
|
||||
End Function
|
||||
|
||||
Public Function getPathGCode() As Focas1.ODBGCD
|
||||
' RIFERIMENTO:
|
||||
' C:\Users\samuele.STEAMWAREWIN\Documents\VisualStudioProjects\CMS_orig\A02B-0207-K737_04.20\Document\SpecE\Misc\cnc_rdgcode.htm
|
||||
|
||||
Dim nPathIdx As Integer
|
||||
Dim nNumAxisRead As Integer
|
||||
Dim nReturn As Integer
|
||||
|
||||
Dim actGCode As Focas1.ODBGCD
|
||||
' inizializzo
|
||||
actGCode = New Focas1.ODBGCD
|
||||
|
||||
'leggo il numero del processo attivo
|
||||
nPathIdx = GetActivePath()
|
||||
'leggo num max assi dal cn
|
||||
nNumAxisRead = Focas1.MAX_AXIS
|
||||
|
||||
If Is30Series Then
|
||||
|
||||
' leggo tutto!!! 0-27 (28 elementi)
|
||||
nReturn = Focas1.cnc_rdgcode(nLibHandle(nPathIdx), -1, 1, 28, actGCode)
|
||||
|
||||
If F_CheckRetError_Cnc(nReturn, "cnc_rdgcode RefreshPathGCode CNC.FANUC.CMS_CncLib") Then
|
||||
Throw New CmsNcException("ERR cnc_rdgcode RefreshPathGCode CNC.FANUC.CMS_CncLib")
|
||||
End If
|
||||
End If
|
||||
|
||||
Return actGCode
|
||||
|
||||
End Function
|
||||
|
||||
Public Function getSpindleSpeed() As Focas1.ODBSPEED
|
||||
' RIFERIMENTO:
|
||||
|
||||
@@ -652,8 +652,47 @@ namespace MTC_Sim
|
||||
{
|
||||
base.getPath();
|
||||
|
||||
// recupero dati
|
||||
// recupero dati feedrate
|
||||
DateTime inizio = DateTime.Now;
|
||||
FeedRate = FANUC_ref.getGlobalFeedrate().data;
|
||||
if (utils.CRB("recTime")) TimingData.addResult("R{0}-FEEDRATE", DateTime.Now.Subtract(inizio).Ticks);
|
||||
|
||||
|
||||
|
||||
// recupero vettore generale G MODE
|
||||
inizio = DateTime.Now;
|
||||
CMSCncLib.Focas1.ODBGCD vettGCodes = FANUC_ref.getPathGCode();
|
||||
if (utils.CRB("recTime")) TimingData.addResult("R{0}-GCodesArray", DateTime.Now.Subtract(inizio).Ticks);
|
||||
|
||||
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);
|
||||
|
||||
// FARE!! per ora solo 1 path...
|
||||
int numPath = 1;
|
||||
@@ -661,6 +700,8 @@ namespace MTC_Sim
|
||||
for (int i = 0; i < numPath; i++)
|
||||
{
|
||||
vettPath[i].mPathFeed.Value = FeedRate;
|
||||
vettPath[i].mPathCodG_Act.Value = GCodAttivi;
|
||||
|
||||
//vettPath[i].mPathFeedOver.Value = PtData.PathFeedrateOver;
|
||||
//vettPath[i].mPathRapidOver.Value = PtData.PathRapidOver;
|
||||
//vettPath[i].mPathPosActX.Value = PtData.PathPosAct.x;
|
||||
@@ -669,11 +710,8 @@ namespace MTC_Sim
|
||||
//vettPath[i].mPathPosActI.Value = PtData.PathPosAct.i;
|
||||
//vettPath[i].mPathPosActJ.Value = PtData.PathPosAct.j;
|
||||
//vettPath[i].mPathPosActK.Value = PtData.PathPosAct.k;
|
||||
//vettPath[i].mPathType.Value = PtData.PathType;
|
||||
//vettPath[i].mPathPartId.Value = PtData.PartId;
|
||||
//vettPath[i].mPathPartCount.Value = PtData.pzTot;
|
||||
//vettPath[i].mPathRunMode.Value = PtData.RunMode;
|
||||
//vettPath[i].mPathExeMode.Value = PtData.ExeMode;
|
||||
//vettPath[i].mPathCurrProg.Value = PtData.ProgramName;
|
||||
//vettPath[i].mPathCurrProgRowNum.Value = PtData.ProgrRow;
|
||||
//vettPath[i].mPathActiveAxes.Value = PtData.ActiveAxes;
|
||||
|
||||
@@ -16,6 +16,7 @@ OK 10) riallineamento simulatore generico
|
||||
OK 13) completare gestione BIT di semaforo
|
||||
OK 14) completare gestione strobe (x i bit "non qualificati")
|
||||
OK 15) decodifica corretta livello allarme (WARNING/FAULT)
|
||||
16) lettura codici G del path con cnc_rdgcode
|
||||
|
||||
|
||||
99) completamento funzioni con librerie fanuc native
|
||||
|
||||
Reference in New Issue
Block a user