hexagon logo

Request machine events to help

Who can help me to explain the the Machine in DistanceToClosestCAD events how to use? Thank you!
Parents
  • Public WithEvents PartEvents As pcdlrn.PartProgram
    Public WithEvents MachineEvents As pcdlrn.Machine
    Public WithEvents AppMeasureEvents As pcdlrn.ApplicationObjectEvents

    Private Sub Form_Load()

    Set PCDMISApp = CreateObject("PCDLRN.Application")

    Set AppMeasureEvents = PCDMISApp.ApplicationEvents
    Set PartEvents = PCDMISApp.ActivePartProgram
    Set MachineEvents = PCDMISApp.ActivePartProgram.ActiveMachine

    End Sub


    Private Sub MachineEvents_Command(ByVal Code As Long)

    List8.AddItem ("Machine Command : " + Str$(Code))
    List8.TopIndex = List8.NewIndex

    End Sub

    Private Sub MachineEvents_DistanceToClosestCAD(ByVal dX As Double, ByVal dY As Double, ByVal dZ As Double, ByVal T As Double, ByVal tol As Double)

    List8.AddItem ("Machine Distance To ClosestCad : " + Str$(dX) + "-" + Str$(dY) + "-" + Str$(dZ) + "-" + Str$(T) + "--" + Str$(tol))
    List8.TopIndex = List8.NewIndex

    End Sub

    Private Sub MachineEvents_DistanceToTarget(ByVal dX As Double, ByVal dY As Double, ByVal dZ As Double, ByVal T As Double, ByVal tol As Double)

    List8.AddItem ("Machine Distance To Target : " + Str$(dX) + "-" + Str$(dY) + "-" + Str$(dZ) + "-" + Str$(T) + "--" + Str$(tol))
    List8.TopIndex = List8.NewIndex

    End Sub

    Private Sub MachineEvents_ErrorMsg(ByVal Msg As String, ByVal ErrorType As Long)

    List8.AddItem ("Machine ErrorMsg : " + Msg)
    List8.TopIndex = List8.NewIndex

    End Sub

    Private Sub MachineEvents_ExecuteHit(ByVal X As Double, ByVal Y As Double, ByVal Z As Double, ByVal I As Double, ByVal J As Double, ByVal K As Double)

    List8.AddItem ("Machine Execute Hit : " + Str$(X) + "-" + Str$(Y) + "-" + Str$(Z) + "-" + Str$(I) + "-" + Str$(J) + "-" + Str$(K))
    List8.TopIndex = List8.NewIndex

    End Sub

    Private Sub MachineEvents_ExecuteManualScanHit(ByVal X As Double, ByVal Y As Double, ByVal Z As Double, ByVal I As Double, ByVal J As Double, ByVal K As Double)

    List8.AddItem ("Machine Manual Scan Hit : " + Str$(X) + "-" + Str$(Y) + "-" + Str$(Z) + "-" + Str$(I) + "-" + Str$(J) + "-" + Str$(K))
    List8.TopIndex = List8.NewIndex

    End Sub

    Private Sub MachineEvents_FeatureID(ByVal fid As String)

    List8.AddItem ("Machine FeatureID : " + fid)
    List8.TopIndex = List8.NewIndex

    End Sub

    Private Sub MachineEvents_FeatureType(ByVal ftype As String)

    List8.AddItem ("Machine Feature Type : " + ftype)
    List8.TopIndex = List8.NewIndex

    End Sub

    Private Sub MachineEvents_LearnHit(ByVal X As Double, ByVal Y As Double, ByVal Z As Double, ByVal I As Double, ByVal J As Double, ByVal K As Double)

    List8.AddItem ("Machine Learn Hit : " + Str$(X) + "-" + Str$(Y) + "-" + Str$(Z) + "-" + Str$(I) + "-" + Str$(J) + "-" + Str$(K))
    List8.TopIndex = List8.NewIndex

    End Sub

    Private Sub MachineEvents_Readout(ByVal X As Double, ByVal Y As Double, ByVal Z As Double, ByVal I As Double, ByVal J As Double, ByVal K As Double)

    List8.AddItem ("Machine ReadOut : " + Str$(X) + "-" + Str$(Y) + "-" + Str$(Z) + "-" + Str$(I) + "-" + Str$(J) + "-" + Str$(K))
    List8.TopIndex = List8.NewIndex

    End Sub

    Private Sub MachineEvents_RMS(ByVal RMS As Double)

    List8.AddItem ("Machine Events RMS : " + Trim$(Str$(RMS)))
    List8.TopIndex = List8.NewIndex


    End Sub
Reply
  • Public WithEvents PartEvents As pcdlrn.PartProgram
    Public WithEvents MachineEvents As pcdlrn.Machine
    Public WithEvents AppMeasureEvents As pcdlrn.ApplicationObjectEvents

    Private Sub Form_Load()

    Set PCDMISApp = CreateObject("PCDLRN.Application")

    Set AppMeasureEvents = PCDMISApp.ApplicationEvents
    Set PartEvents = PCDMISApp.ActivePartProgram
    Set MachineEvents = PCDMISApp.ActivePartProgram.ActiveMachine

    End Sub


    Private Sub MachineEvents_Command(ByVal Code As Long)

    List8.AddItem ("Machine Command : " + Str$(Code))
    List8.TopIndex = List8.NewIndex

    End Sub

    Private Sub MachineEvents_DistanceToClosestCAD(ByVal dX As Double, ByVal dY As Double, ByVal dZ As Double, ByVal T As Double, ByVal tol As Double)

    List8.AddItem ("Machine Distance To ClosestCad : " + Str$(dX) + "-" + Str$(dY) + "-" + Str$(dZ) + "-" + Str$(T) + "--" + Str$(tol))
    List8.TopIndex = List8.NewIndex

    End Sub

    Private Sub MachineEvents_DistanceToTarget(ByVal dX As Double, ByVal dY As Double, ByVal dZ As Double, ByVal T As Double, ByVal tol As Double)

    List8.AddItem ("Machine Distance To Target : " + Str$(dX) + "-" + Str$(dY) + "-" + Str$(dZ) + "-" + Str$(T) + "--" + Str$(tol))
    List8.TopIndex = List8.NewIndex

    End Sub

    Private Sub MachineEvents_ErrorMsg(ByVal Msg As String, ByVal ErrorType As Long)

    List8.AddItem ("Machine ErrorMsg : " + Msg)
    List8.TopIndex = List8.NewIndex

    End Sub

    Private Sub MachineEvents_ExecuteHit(ByVal X As Double, ByVal Y As Double, ByVal Z As Double, ByVal I As Double, ByVal J As Double, ByVal K As Double)

    List8.AddItem ("Machine Execute Hit : " + Str$(X) + "-" + Str$(Y) + "-" + Str$(Z) + "-" + Str$(I) + "-" + Str$(J) + "-" + Str$(K))
    List8.TopIndex = List8.NewIndex

    End Sub

    Private Sub MachineEvents_ExecuteManualScanHit(ByVal X As Double, ByVal Y As Double, ByVal Z As Double, ByVal I As Double, ByVal J As Double, ByVal K As Double)

    List8.AddItem ("Machine Manual Scan Hit : " + Str$(X) + "-" + Str$(Y) + "-" + Str$(Z) + "-" + Str$(I) + "-" + Str$(J) + "-" + Str$(K))
    List8.TopIndex = List8.NewIndex

    End Sub

    Private Sub MachineEvents_FeatureID(ByVal fid As String)

    List8.AddItem ("Machine FeatureID : " + fid)
    List8.TopIndex = List8.NewIndex

    End Sub

    Private Sub MachineEvents_FeatureType(ByVal ftype As String)

    List8.AddItem ("Machine Feature Type : " + ftype)
    List8.TopIndex = List8.NewIndex

    End Sub

    Private Sub MachineEvents_LearnHit(ByVal X As Double, ByVal Y As Double, ByVal Z As Double, ByVal I As Double, ByVal J As Double, ByVal K As Double)

    List8.AddItem ("Machine Learn Hit : " + Str$(X) + "-" + Str$(Y) + "-" + Str$(Z) + "-" + Str$(I) + "-" + Str$(J) + "-" + Str$(K))
    List8.TopIndex = List8.NewIndex

    End Sub

    Private Sub MachineEvents_Readout(ByVal X As Double, ByVal Y As Double, ByVal Z As Double, ByVal I As Double, ByVal J As Double, ByVal K As Double)

    List8.AddItem ("Machine ReadOut : " + Str$(X) + "-" + Str$(Y) + "-" + Str$(Z) + "-" + Str$(I) + "-" + Str$(J) + "-" + Str$(K))
    List8.TopIndex = List8.NewIndex

    End Sub

    Private Sub MachineEvents_RMS(ByVal RMS As Double)

    List8.AddItem ("Machine Events RMS : " + Trim$(Str$(RMS)))
    List8.TopIndex = List8.NewIndex


    End Sub
Children
No Data