OmagCUT :
- Migliorie comunicazione Flexium - Cambio Font
This commit is contained in:
+8
-1
@@ -74,7 +74,14 @@
|
||||
<TextBlock Name="NCErrorMessages" Grid.ColumnSpan="3" FontSize="22" Width="1000"
|
||||
TextWrapping="Wrap" Margin="136,395,136,91"/>
|
||||
<TextBlock Name="PLCErrorMessages" Grid.ColumnSpan="3" FontSize="22" Height="35" Width="1000" Margin="136,590,136,51"/>
|
||||
<ListBox Name="ErrorLstBx" Grid.Column="1" ItemTemplate="{DynamicResource DataTemplateItem}" Margin="0,0,0,281" />
|
||||
<ListBox Name="ErrorLstBx" Grid.Column="1"
|
||||
Margin="0,0,0,281" >
|
||||
<ListBox.ItemTemplate>
|
||||
<DataTemplate>
|
||||
<TextBlock Text="{Binding}" />
|
||||
</DataTemplate>
|
||||
</ListBox.ItemTemplate>
|
||||
</ListBox>
|
||||
|
||||
</Grid>
|
||||
|
||||
|
||||
@@ -202,6 +202,8 @@ Public Class CNCommunication
|
||||
'End If
|
||||
End If
|
||||
|
||||
Dim b As Boolean = m_CN.Is_G26_active() '!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
|
||||
|
||||
End Sub
|
||||
|
||||
End Class
|
||||
|
||||
+2
-2
@@ -49,9 +49,9 @@
|
||||
|
||||
End Sub
|
||||
|
||||
Public Overrides Sub MDI_command()
|
||||
Public Overrides Function MDI_command() As Short
|
||||
|
||||
End Sub
|
||||
End Function
|
||||
|
||||
Public Overrides Sub ReadEls_Add_Parameter(sz_var As String, n_par As Short)
|
||||
|
||||
|
||||
+11
-4
@@ -104,7 +104,7 @@
|
||||
|
||||
Public MustOverride Sub DVariables_WriteVariables2(sz_parameters As String, sz_values As String)
|
||||
|
||||
Public MustOverride Sub MDI_command()
|
||||
Public MustOverride Function MDI_command() As Short
|
||||
|
||||
Public MustOverride Function ActivateProgram(n_part_program As Integer) As Int16
|
||||
|
||||
@@ -132,9 +132,10 @@
|
||||
|
||||
Public MustOverride Function DTool_set_read_range(n_start As Short, n_stop As Short) As Short
|
||||
|
||||
Public MustOverride Function DTool_write_tool(n_tool_number As Short, Length_X As Double, Radius As Double, TipRadius_Z As Double, _
|
||||
DLength_X As Double, DTipRadius_Z As Double, _
|
||||
nDirection As Short, nType As Short, nH As Integer) As Short
|
||||
Public MustOverride Function DTool_write_tool(n_tool_number As Short, Length_X As Double, Radius As Double, TipRadius_Z As Double, _
|
||||
DLength_X As Double, DTipRadius_Z As Double, _
|
||||
nDirection As Short, nType As Short, nH As Integer) As Short
|
||||
|
||||
Public Overridable Function get_free_memory(n_zone As Int16) As Long
|
||||
End Function
|
||||
|
||||
@@ -148,7 +149,13 @@
|
||||
End Function
|
||||
|
||||
|
||||
Public Overridable Function Is_G24_active() As Boolean
|
||||
Return False
|
||||
End Function
|
||||
|
||||
Public Overridable Function Is_G26_active() As Boolean
|
||||
Return False
|
||||
End Function
|
||||
|
||||
#End Region
|
||||
|
||||
|
||||
@@ -215,7 +215,7 @@ Public Class CadCutPageUC
|
||||
bOk = bOk AndAlso (m_MainWindow.m_CNCommunication.m_CN.Download_NC_prog(m_MainWindow.GetCncDir() & "\CadCut.xpi", "%900.0") = 0)
|
||||
bOk = bOk AndAlso (m_MainWindow.m_CNCommunication.m_CN.Start_Transfer_NC_prog() = 0)
|
||||
' Attesa opportuna
|
||||
System.Threading.Thread.Sleep(5000)
|
||||
System.Threading.Thread.Sleep(100)
|
||||
' Attivazione programma
|
||||
bOk = bOk AndAlso (m_MainWindow.m_CNCommunication.m_CN.ActivateProgram(900) = 0)
|
||||
' Modalità automatica
|
||||
|
||||
@@ -69,7 +69,7 @@ Namespace Num
|
||||
|
||||
Dim WithEvents objDTool As FXServer.DTool
|
||||
|
||||
|
||||
Dim WithEvents objDFunctionsG As FXServer.DFunctionsG
|
||||
|
||||
'FXLib
|
||||
Dim WithEvents objSystemFunctions As FXLib.SystemFunctions
|
||||
@@ -81,6 +81,14 @@ Namespace Num
|
||||
|
||||
#End Region
|
||||
|
||||
#Region " local const"
|
||||
Private Const TIMEOUT As Short = 99
|
||||
Private Const SLEEPTIME As Short = 10
|
||||
Private Const SHORTSLEEPCOUNT As Short = 20
|
||||
Private Const LONGSLEEPCOUNT As Short = 40
|
||||
|
||||
#End Region
|
||||
|
||||
#Region " local var"
|
||||
|
||||
Private n_dTool_range_start As Short = 1
|
||||
@@ -92,6 +100,18 @@ Namespace Num
|
||||
Private AplStatus As Short
|
||||
|
||||
Private ExceptStatus As Short
|
||||
Private bSetModeDone As Boolean = False
|
||||
Private nSetModeResult As Short
|
||||
Private bDownloadFailed As Boolean = False
|
||||
Private bBytesTransfer As Boolean = False
|
||||
Private nDownloadErrorSeq As Integer
|
||||
Private nDownloadErrorReason As Integer
|
||||
|
||||
Private lTransferedBytes As Long
|
||||
|
||||
Private l_Gcodes_1 As ULong
|
||||
Private l_Gcodes_2 As ULong
|
||||
Private l_current_Gcodes As ULong
|
||||
|
||||
#End Region
|
||||
|
||||
@@ -151,6 +171,11 @@ Namespace Num
|
||||
SaveCurrProj.Show()
|
||||
System.Threading.Thread.Sleep(2000) ' 2 sec wait
|
||||
SaveCurrProj.Close()
|
||||
|
||||
' lancio della lettura delle variabili PLC
|
||||
|
||||
Call set_Read_PLC_var()
|
||||
|
||||
End If
|
||||
|
||||
sz_versionRTS = objDRunTimeSystem.GetVersionRTS
|
||||
@@ -257,7 +282,15 @@ Namespace Num
|
||||
|
||||
'objDVariables.WriteVariables(objDGroupManager.Handle, Paras, Valus)
|
||||
|
||||
'
|
||||
|
||||
'Initialize FXServer class DPlcVariables
|
||||
|
||||
objDPlcVariables = New FXServer.DPlcVariables
|
||||
|
||||
objDPlcVariables.Flag = 3 ' flag = priority 3 = 0.3 sec
|
||||
objDPlcVariables.Init(objDGroupManager.Handle)
|
||||
|
||||
|
||||
'Initialize FXServer class DInterpo
|
||||
'
|
||||
objDInterpo = New FXServer.DInterpo
|
||||
@@ -266,7 +299,6 @@ Namespace Num
|
||||
|
||||
'Initialize FXServer class DReadSpindleComplete
|
||||
|
||||
|
||||
' Only available with FX Server >= 3.9
|
||||
' objDReadSpindleComplete.ValueChanged2 += new FXServer.IDReadSpindleCompleteEvents_ValueChanged2EventHandler(objDReadSpindleComplete_ValueChanged2);
|
||||
|
||||
@@ -280,6 +312,11 @@ Namespace Num
|
||||
n_ret = objDTool.Init(objDGroupManager.Handle)
|
||||
|
||||
|
||||
' Initialize FXServer class DFunctionsG
|
||||
|
||||
objDFunctionsG = New FXServer.DFunctionsG()
|
||||
objDFunctionsG.Init(objDGroupManager.Handle)
|
||||
|
||||
' Initialize FXLib SystemFunctions object
|
||||
|
||||
'objSystemFunctions = New FXLib.SystemFunctions()
|
||||
@@ -360,6 +397,10 @@ Namespace Num
|
||||
System.Runtime.InteropServices.Marshal.ReleaseComObject(objDVariables)
|
||||
objDVariables = Nothing
|
||||
|
||||
System.Runtime.InteropServices.Marshal.ReleaseComObject(objDPlcVariables)
|
||||
objDPlcVariables = Nothing
|
||||
|
||||
|
||||
System.Runtime.InteropServices.Marshal.ReleaseComObject(objDInterpo)
|
||||
objDInterpo = Nothing
|
||||
|
||||
@@ -389,6 +430,27 @@ Namespace Num
|
||||
MessageBox.Show("CloseFxObjects")
|
||||
End Sub
|
||||
|
||||
Private Sub set_Read_PLC_var()
|
||||
|
||||
Dim sz_var_names As New ArrayList
|
||||
Dim n_ret As Short
|
||||
|
||||
sz_var_names.Add("Application.IOCONFIG_GLOBALS.Flexium_NCK.RCNC.General.Mode") ' modo 0:AUTO;1:SEQ;2:MDI;3:RAPIDO;4:SERCH;5:EDIT;6:TEST;7:MANUALE;
|
||||
sz_var_names.Add("Application.IOCONFIG_GLOBALS.Flexium_NCK.RCNC.General.JogIncrement") ' Tipo man. 0:0.1 u; 1:1 u; 2:10 u; 3:100 u; 4:1 mm; 5:10 mm; 6:ILL; 8:HANDWEEL; 9:0.01 u; 10:0.001 u;
|
||||
sz_var_names.Add("Application.IOCONFIG_GLOBALS.Flexium_NCK.WCNC.Channel[1].FeedOveride") ' Potenziom. Feed = *0.47059
|
||||
'sz_var_names.Add("Application.GVL_HMI_OMAG.HMI_Vel_prog") ' FEED
|
||||
'sz_var_names.Add("Application.GVL_HMI_OMAG.HMI_LabRPM") ' Speed
|
||||
'sz_var_names.Add("Application.GVL_HMI_OMAG.HMI_LabAmper") ' Ampère = *0.01
|
||||
'sz_var_names.Add("Application.GVL_HMI_OMAG.HMI_LabRPM") ' segnaposto per la speed override
|
||||
|
||||
n_ret = objDPlcVariables.ReadVariables(sz_var_names.ToArray())
|
||||
|
||||
If n_ret <> 0 Then
|
||||
MsgBox("Errore 3 ReadVariables: " & n_ret.ToString)
|
||||
End If
|
||||
|
||||
End Sub
|
||||
|
||||
#End Region
|
||||
|
||||
|
||||
@@ -481,7 +543,11 @@ Namespace Num
|
||||
|
||||
' ' ------->> FXServer Event GeneralFunctions CncModeWritten
|
||||
|
||||
Private Sub objDGeneralFunction_CncModeWritten(nErrorcode As Short) Handles objDGeneralFunctions.CncModeWritten
|
||||
Private Sub objDGeneralFunction_CncModeWritten2(nHandle As Integer, nErrorcode As Short) Handles objDGeneralFunctions.CncModeWritten2
|
||||
|
||||
bSetModeDone = True
|
||||
nSetModeResult = nErrorcode
|
||||
|
||||
End Sub
|
||||
|
||||
' ' ------->> FXServer Event GeneralFunctions VariableWritten
|
||||
@@ -508,6 +574,8 @@ Namespace Num
|
||||
|
||||
Private Sub objDFileTransfer_Completed(l_Handle As Integer) Handles objDFileTransfer.Completed
|
||||
|
||||
bSetModeDone = True
|
||||
|
||||
End Sub
|
||||
|
||||
' ' ------->> FXServer Event DFileTransfer TransferStarted
|
||||
@@ -520,12 +588,21 @@ Namespace Num
|
||||
|
||||
Private Sub objDFileTransfer_Failed(l_Handle As Integer, n_seq As Short, n_reason As Short) Handles objDFileTransfer.Failed
|
||||
|
||||
bDownloadFailed = True
|
||||
nDownloadErrorSeq = n_seq
|
||||
nDownloadErrorReason = n_reason
|
||||
End Sub
|
||||
|
||||
' ' ------->> FXServer Event DFileTransfer BytesTransfered
|
||||
|
||||
Private Sub objDFileTransfer_BytesTransfered(l_Handle As Integer, l_bytes As Integer) Handles objDFileTransfer.BytesTransfered
|
||||
|
||||
If l_bytes > 0 Then
|
||||
bBytesTransfer = True
|
||||
Else
|
||||
bBytesTransfer = False
|
||||
End If
|
||||
lTransferedBytes += l_bytes
|
||||
End Sub
|
||||
|
||||
|
||||
@@ -827,6 +904,80 @@ Namespace Num
|
||||
|
||||
#End Region
|
||||
|
||||
#Region "-- FXServer -- DPlcVariables EVENTS"
|
||||
|
||||
'Private Sub objDPlcVariables_AbortReadVariables() Handles objDPlcVariables.AbortReadVariables
|
||||
'End Sub
|
||||
|
||||
'Private Sub objDPlcVariables_InvalidReadList(nErrorCode As Short) Handles objDPlcVariables.InvalidReadList
|
||||
'End Sub
|
||||
|
||||
'Private Sub objDPlcVariables_ReadOnceInvalidReadList(lHandle As Integer, nErrorCode As Short) Handles objDPlcVariables.ReadOnceInvalidReadList
|
||||
'End Sub
|
||||
|
||||
Private Sub objDPlcVariables_ReadOnceVariablesChanged(lHandle As Integer, value As Object) Handles objDPlcVariables.ReadOnceVariablesChanged
|
||||
End Sub
|
||||
|
||||
Private Sub objDPlcVariables_ReadVariablesChanged(vtArrayIndex As Object, vtArrayValues As Object) Handles objDPlcVariables.ReadVariablesChanged
|
||||
|
||||
Dim n As Short, ni As Short
|
||||
|
||||
Dim index() As Object
|
||||
Dim values() As Object
|
||||
|
||||
index = vtArrayIndex
|
||||
values = vtArrayValues
|
||||
|
||||
For n = 0 To index.Length - 1
|
||||
|
||||
ni = CInt(index(n))
|
||||
|
||||
Select Case ni
|
||||
|
||||
Case 0 ' modo 0:AUTO;1:SEQ;2:MDI;3:RAPIDO;4:SERCH;5:EDIT;6:TEST;7:MANUALE;
|
||||
|
||||
|
||||
|
||||
Case 1 ' Tipo man. 0:0.1 u; 1:1 u; 2:10 u; 3:100 u; 4:1 mm; 5:10 mm; 6:ILL; 8:HANDWEEL; 9:0.01 u; 10:0.001 u;
|
||||
|
||||
|
||||
|
||||
Case 2 ' Potenziom. Feed = *0.47059
|
||||
|
||||
d_DInterpo_Feed_override = CDbl(CLng(values(n))) * 0.47059
|
||||
|
||||
|
||||
Case 3 ' FEED
|
||||
|
||||
'd_DInterpo_Prog_Feed = CDbl(CLng(values(n))) ' d_DInterpo_Prog_Feed
|
||||
|
||||
Case 4 ' Speed
|
||||
|
||||
Case 5 ' Ampère = *0.01
|
||||
|
||||
Case 6 ' Potenziom. speed = ????????????
|
||||
|
||||
|
||||
|
||||
End Select
|
||||
|
||||
b_feed_override_changed = True
|
||||
|
||||
Next
|
||||
|
||||
End Sub
|
||||
|
||||
Private Sub objDPlcVariables_Symbols(Name As Object, TypeId As Object, TypeName As Object, size As Object, Access As Object) Handles objDPlcVariables.Symbols
|
||||
End Sub
|
||||
|
||||
'Private Sub objDPlcVariables_VariablesWritten(nErrorCode As Integer) Handles objDPlcVariables.VariablesWritten
|
||||
'End Sub
|
||||
|
||||
Private Sub objDPlcVariables_VariablesWritten2(lHandle As Integer, nErrorCode As Integer) Handles objDPlcVariables.VariablesWritten2
|
||||
End Sub
|
||||
|
||||
#End Region
|
||||
|
||||
#Region "-- FXServer -- DInterpo EVENTS"
|
||||
'
|
||||
' ' ------->> FXServer Event DInterpo MemorySize
|
||||
@@ -845,9 +996,9 @@ Namespace Num
|
||||
d_DInterpo_values(n) = CDbl(CLng(values(n)))
|
||||
Next
|
||||
|
||||
d_DInterpo_Prog_Feed = d_DInterpo_values(3)
|
||||
d_DInterpo_Feed_override = d_DInterpo_values(4)
|
||||
b_feed_override_changed = True
|
||||
'd_DInterpo_Prog_Feed = d_DInterpo_values(3) ' !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
|
||||
'd_DInterpo_Feed_override = d_DInterpo_values(4)
|
||||
'b_feed_override_changed = True
|
||||
End Sub
|
||||
|
||||
#End Region
|
||||
@@ -992,6 +1143,25 @@ Namespace Num
|
||||
|
||||
#End Region
|
||||
|
||||
#Region "-- FXServer -- DFunctionsG EVENTS"
|
||||
|
||||
' ' ------->> FXServer Event DFunctionsG GFunctionsChanged
|
||||
|
||||
Private Sub objDFunctionsG_GFunctionsChanged(vtArrayValue As Object) Handles objDFunctionsG.GFunctionsChanged
|
||||
|
||||
' Read the change of the G codes
|
||||
|
||||
Dim values() As Object
|
||||
|
||||
values = vtArrayValue
|
||||
|
||||
l_Gcodes_1 = CLng(values(0))
|
||||
l_Gcodes_2 = CLng(values(1))
|
||||
l_current_Gcodes = CLng(values(2))
|
||||
|
||||
End Sub
|
||||
|
||||
#End Region
|
||||
|
||||
#Region "-- FXServer -- DNumDirectory EVENTS"
|
||||
'
|
||||
@@ -1003,20 +1173,17 @@ Namespace Num
|
||||
|
||||
#Region "-- FXServer -- DMdiCommand EVENTS"
|
||||
|
||||
'
|
||||
' ------->> FXServer Event DMdiCommand CommandWritten
|
||||
'
|
||||
Private Sub objDMdiCommand_CommandWritten(retVal As Short) Handles objDMdiCommand.CommandWritten
|
||||
|
||||
'throw new NotImplementedException();
|
||||
Private Sub objDMdiCommand_CommandWritten(nErrorcode As Short) Handles objDMdiCommand.CommandWritten
|
||||
|
||||
If retVal <> 0 Then
|
||||
MessageBox.Show("Error CommandWritten :" + " " + retVal.ToString())
|
||||
End If
|
||||
bSetModeDone = True
|
||||
nSetModeResult = nErrorcode
|
||||
|
||||
sz_ManualDataInput = ""
|
||||
sz_ManualDataInput = "" 'Azzero stringa MDI
|
||||
|
||||
End Sub
|
||||
|
||||
#End Region
|
||||
|
||||
#Region "-- FXLog -- ErrorHandler EVENTS"
|
||||
@@ -1240,17 +1407,32 @@ Namespace Num
|
||||
|
||||
End Sub
|
||||
|
||||
Public Overrides Sub MDI_command()
|
||||
Public Overrides Function MDI_command() As Short
|
||||
|
||||
Dim nTimeOut As Integer = 0
|
||||
bSetModeDone = False
|
||||
|
||||
Dim n_ret As Int16 = objDMdiCommand.ExecuteCommand(sz_ManualDataInput)
|
||||
|
||||
If n_ret <> 0 Then
|
||||
|
||||
MessageBox.Show("Error Execute MDI Command :" + " " + n_ret.ToString())
|
||||
|
||||
MsgBox("Error Execute MDI Command : " + n_ret.ToString())
|
||||
Return n_ret
|
||||
End If
|
||||
|
||||
End Sub
|
||||
While Not bSetModeDone And nTimeOut < SHORTSLEEPCOUNT
|
||||
System.Threading.Thread.Sleep(SLEEPTIME)
|
||||
nTimeOut += 1
|
||||
End While
|
||||
If Not bSetModeDone Then
|
||||
MsgBox("Errore eseguo comando MDI: " & TIMEOUT)
|
||||
Return TIMEOUT 'Errore di timeout
|
||||
End If
|
||||
If nSetModeResult <> 0 Then
|
||||
MsgBox("Errore 2 eseguo comando MDI: " & nSetModeResult)
|
||||
End If
|
||||
Return nSetModeResult
|
||||
|
||||
End Function
|
||||
'
|
||||
' Activate program
|
||||
' returns 0 = OK ; > 0 error
|
||||
@@ -1306,10 +1488,24 @@ Namespace Num
|
||||
|
||||
Public Overrides Function DGeneralFunctions_WriteCncMode(nmode As Short) As Int16
|
||||
|
||||
Dim nHandle As Integer = 57 'Numero a caso
|
||||
Dim ngroup0 As Short = 0
|
||||
Dim nTimeOut As Integer = 0
|
||||
bSetModeDone = False
|
||||
objDGeneralFunctions.WriteCncMode2(nHandle, nmode, ngroup0)
|
||||
While Not bSetModeDone And nTimeOut < SHORTSLEEPCOUNT
|
||||
System.Threading.Thread.Sleep(SLEEPTIME)
|
||||
nTimeOut += 1
|
||||
End While
|
||||
If Not bSetModeDone Then
|
||||
MsgBox("Errore cambio modalità in MDI: " & TIMEOUT)
|
||||
Return TIMEOUT 'Errore di timeout
|
||||
End If
|
||||
If nSetModeResult <> 0 Then
|
||||
MsgBox("Errore 2 cambio modalità in MDI: " & nSetModeResult)
|
||||
End If
|
||||
Return nSetModeResult
|
||||
|
||||
Call objDGeneralFunctions.WriteCncMode(nmode, ngroup0)
|
||||
Return 0
|
||||
End Function
|
||||
|
||||
Public Overrides Function Write_var_1(sz_par As String, lvalue As Long) As Int16
|
||||
@@ -1327,6 +1523,7 @@ Namespace Num
|
||||
'
|
||||
Public Overrides Function Download_NC_prog(sz_PC_filename As String, sz_NC_filename As String) As Int16
|
||||
|
||||
|
||||
Dim n_ret As Short
|
||||
Dim n_FileDelete As Short = 1, n_IgnoreMsgZone As Short = 0
|
||||
|
||||
@@ -1334,7 +1531,10 @@ Namespace Num
|
||||
|
||||
n_ret = objDFileTransfer.FileDownload2(lHandle, sz_NC_filename, sz_PC_filename, "", n_FileDelete, n_IgnoreMsgZone)
|
||||
|
||||
If n_ret <> 0 Then MessageBox.Show("Error: FileDownload2 error : " & n_ret.ToString())
|
||||
If n_ret <> 0 Then
|
||||
MsgBox("Error: FileDownload2 error : " + n_ret.ToString())
|
||||
End If
|
||||
|
||||
Return n_ret
|
||||
|
||||
End Function
|
||||
@@ -1367,12 +1567,38 @@ Namespace Num
|
||||
|
||||
Public Overrides Function Start_Transfer_NC_prog() As Int16
|
||||
|
||||
Dim nTimeOut As Integer = 0
|
||||
Dim n_ret As Short
|
||||
|
||||
bSetModeDone = False
|
||||
bDownloadFailed = False
|
||||
nDownloadErrorSeq = 0
|
||||
nDownloadErrorReason = 0
|
||||
|
||||
n_ret = objDFileTransfer.StartTransfer()
|
||||
|
||||
If n_ret <> 0 Then MessageBox.Show("Error: StartTransfer error : " & n_ret.ToString())
|
||||
Return n_ret
|
||||
If n_ret <> 0 Then
|
||||
MsgBox("Error: StartTransfer error : " + n_ret.ToString())
|
||||
Return n_ret
|
||||
End If
|
||||
|
||||
While Not bDownloadFailed And nTimeOut < LONGSLEEPCOUNT And Not bSetModeDone
|
||||
If bBytesTransfer Then
|
||||
nTimeOut = 0
|
||||
bBytesTransfer = False
|
||||
End If
|
||||
System.Threading.Thread.Sleep(SLEEPTIME)
|
||||
nTimeOut += 1
|
||||
End While
|
||||
If bDownloadFailed Then
|
||||
MsgBox("Errore download file: " & nDownloadErrorSeq & " " & nDownloadErrorReason)
|
||||
Return nDownloadErrorSeq
|
||||
End If
|
||||
If nTimeOut >= LONGSLEEPCOUNT Then
|
||||
MsgBox("Errore download file: Timeout")
|
||||
Return nDownloadErrorSeq
|
||||
End If
|
||||
Return nDownloadErrorSeq
|
||||
|
||||
End Function
|
||||
|
||||
@@ -1404,6 +1630,13 @@ Namespace Num
|
||||
|
||||
End Function
|
||||
|
||||
Public Overrides Function Is_G24_active() As Boolean
|
||||
Return ((l_Gcodes_2 And &H800000) <> 0)
|
||||
End Function
|
||||
|
||||
Public Overrides Function Is_G26_active() As Boolean
|
||||
Return ((l_Gcodes_2 And &H100) <> 0)
|
||||
End Function
|
||||
|
||||
#End Region
|
||||
|
||||
|
||||
+8
-6
@@ -553,15 +553,17 @@ Namespace Num
|
||||
|
||||
End Sub
|
||||
|
||||
Public Overrides Sub MDI_command()
|
||||
Public Overrides Function MDI_command() As Short
|
||||
|
||||
Dim nret As Int16 = set_MDI_command(sz_ManualDataInput)
|
||||
Dim nret As Int16 = set_MDI_command(sz_ManualDataInput)
|
||||
|
||||
If nret <> 0 Then
|
||||
MessageBox.Show("Error Execute MDI Command :" + " " + nret.ToString())
|
||||
End If
|
||||
If nret <> 0 Then
|
||||
MessageBox.Show("Error Execute MDI Command :" + " " + nret.ToString())
|
||||
End If
|
||||
|
||||
End Sub
|
||||
Return nret
|
||||
|
||||
End Function
|
||||
'
|
||||
' Activate program
|
||||
' returns 0 = OK ; > 0 error
|
||||
|
||||
@@ -79,8 +79,8 @@ Public Class MachineButtonsUC
|
||||
EgtLuaResetGlobVar("CmdString")
|
||||
EgtLuaResetGlobVar("CMD")
|
||||
|
||||
m_CN.DGeneralFunctions_WriteCncMode(2) ' Modalità MDI
|
||||
System.Threading.Thread.Sleep(150)
|
||||
Dim nResult As Short
|
||||
nResult = m_CN.DGeneralFunctions_WriteCncMode(2) ' Modalità MDI
|
||||
m_CN.sz_ManualDataInput = CmdString
|
||||
m_CN.MDI_command()
|
||||
System.Threading.Thread.Sleep(150)
|
||||
@@ -89,7 +89,7 @@ Public Class MachineButtonsUC
|
||||
System.Threading.Thread.Sleep(150)
|
||||
m_CN.DGeneralFunctions_CycleStart()
|
||||
End If
|
||||
m_CN.DGeneralFunctions_WriteCncMode(7) ' Modalità manuale
|
||||
nResult = m_CN.DGeneralFunctions_WriteCncMode(7) ' Modalità manuale
|
||||
|
||||
End Sub
|
||||
|
||||
|
||||
+12
-7
@@ -2,7 +2,10 @@
|
||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
xmlns:local="clr-namespace:OmagCUT"
|
||||
Title="MainWindow" Height="1024" Width="1280" Loaded="Window_Loaded" Background="Gray" ResizeMode="NoResize" WindowStyle="None" Initialized="Window_Initialized" PreviewMouseDown="MainWindow_PreviewMouseDown" KeyDown="MainWindow_KeyDown" Unloaded="MainWindow_Unloaded" ContentRendered="Window_ContentRendered">
|
||||
Title="MainWindow" Height="1024" Width="1280" Loaded="Window_Loaded" Background="Gray" ResizeMode="NoResize"
|
||||
WindowStyle="None" Initialized="Window_Initialized" PreviewMouseDown="MainWindow_PreviewMouseDown"
|
||||
KeyDown="MainWindow_KeyDown" Unloaded="MainWindow_Unloaded" ContentRendered="Window_ContentRendered"
|
||||
FontFamily="./Resources/Fonts/#Century Gothic">
|
||||
|
||||
<!-- Chiamata al Dictionary -->
|
||||
<Window.Resources>
|
||||
@@ -44,12 +47,14 @@
|
||||
<ColumnDefinition Width="1*"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
|
||||
<ToggleButton Name="WorkInProgressBtn" Grid.Column="0" FontSize="20" FontWeight="Bold" />
|
||||
<ToggleButton Name="DirectCutBtn" Grid.Column="1" FontSize="20" FontWeight="Bold" />
|
||||
<ToggleButton Name="CadCutBtn" Grid.Column="2" FontSize="20" FontWeight="Bold" />
|
||||
<ToggleButton Name="FrameCutBtn" Grid.Column="3" FontSize="20" FontWeight="Bold" />
|
||||
<ToggleButton Name="MachineBtn" Grid.Column="4" FontSize="20" FontWeight="Bold" />
|
||||
<ToggleButton Name="OptionsBtn" Grid.Column="5" FontSize="20" FontWeight="Bold" />
|
||||
<ToggleButton Name="WorkInProgressBtn" Grid.Column="0" FontSize="20" >
|
||||
<TextBlock Name="WorkInProgressTxBl" TextWrapping="Wrap" TextAlignment="Center" />
|
||||
</ToggleButton>
|
||||
<ToggleButton Name="DirectCutBtn" Grid.Column="1" FontSize="20" />
|
||||
<ToggleButton Name="CadCutBtn" Grid.Column="2" FontSize="20" />
|
||||
<ToggleButton Name="FrameCutBtn" Grid.Column="3" FontSize="20" />
|
||||
<ToggleButton Name="MachineBtn" Grid.Column="4" FontSize="20" />
|
||||
<ToggleButton Name="OptionsBtn" Grid.Column="5" FontSize="20" />
|
||||
|
||||
|
||||
</Grid>
|
||||
|
||||
+1
-1
@@ -288,7 +288,7 @@ Class MainWindow
|
||||
Next
|
||||
|
||||
'Imposto i messaggi letti dal file dei messaggi
|
||||
WorkInProgressBtn.Content = EgtMsg(MSG_GENERAL + 1)
|
||||
WorkInProgressTxBl.Text = EgtMsg(MSG_GENERAL + 1)
|
||||
DirectCutBtn.Content = EgtMsg(MSG_GENERAL + 2)
|
||||
CadCutBtn.Content = EgtMsg(MSG_GENERAL + 3)
|
||||
FrameCutBtn.Content = EgtMsg(MSG_GENERAL + 4)
|
||||
|
||||
+1
-1
@@ -9,7 +9,7 @@
|
||||
</Window.Resources>
|
||||
|
||||
<!-- Definizione della MissingKeyWindow -->
|
||||
<Border BorderBrush="Black" BorderThickness="1">
|
||||
<Border Style="{StaticResource CustomBorder}">
|
||||
|
||||
<!-- ** Definizione della Grid della MissingKeyWindow ** -->
|
||||
<Grid Name="MissingKeyGrid">
|
||||
|
||||
@@ -413,6 +413,7 @@
|
||||
<LastGenOutput>Settings.Designer.vb</LastGenOutput>
|
||||
</None>
|
||||
<AppDesigner Include="My Project\" />
|
||||
<Resource Include="Resources\Fonts\gothic.ttf" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Resource Include="Resources\AvantiVeloce.png" />
|
||||
|
||||
Binary file not shown.
+1
-1
@@ -59,7 +59,7 @@
|
||||
<Button Name="MDIConfirmBtn" Grid.Column="12" Content="ConfirmMDI" />
|
||||
|
||||
<UniformGrid Grid.Column="13" Rows="2">
|
||||
<TextBox Name="MDITxBx" TextWrapping="Wrap" Text="G52F1000S1000X1000Y1000Z1000C200B200"
|
||||
<TextBox Name="MDITxBx" TextWrapping="Wrap" Text="G24+ XYZ P1/0/0 Q0/1/0 R0/0/1"
|
||||
Style="{StaticResource Keyboard}"/>
|
||||
<TextBox Name="DULoadTxBx" Style="{StaticResource Keyboard}" Text="900.0" />
|
||||
</UniformGrid>
|
||||
|
||||
Reference in New Issue
Block a user