Namespace CNC

  Public Class Runtime
    Public Shared NC As CMSCncLib.CNC.CNC


    Public Shared Sub CreateNC(tipoNC As CNC.NcType, ipTarget As String)
      '************ Istanzio l'oggetto NC *****************       
      Dim exStr As String
      Try

        Select Case tipoNC

          Case NC_FANUC
            Dim ipFanuc As String
            Dim portIpFanuc As String
            Dim CncScreenHssb As String

            ' imposto IP da chiamata
            ipFanuc = ipTarget

            portIpFanuc = "8193"
            CncScreenHssb = "0"
            NC = New FANUC(0, ipFanuc, portIpFanuc, CncScreenHssb)

          Case NC_OSAI
            NC = New OSAI_OPEN(ipTarget)

#If SIEMENS Then
          Case NC_SIEMENS
            NC = New SIEMENS
#End If
        End Select

      Catch ex As Exception
        exStr = ex.Message
      End Try

    End Sub

  End Class

End Namespace