laatzen/Pruef2000/source/modTurbo2e.bas
2021-10-01 11:11:04 +02:00

61 lines
1.7 KiB
QBasic

Attribute VB_Name = "modTurbo2e"
'Public Function Turbo2GetSchlossOffen(EinbauplatzNr As Integer, blnOffen As Boolean) As Long
' Dim ComPort As Integer
' ComPort = val(g_App.Settings.getUSComPort(EinbauplatzNr))
'
' Set objSensusIFInterface = New SensusIF2.Interface
' objSensusIFInterface.CommPortNr = ComPort
' objSensusIFInterface.PortInit
'
' USGetSchlossOffen = modIECCOM.GetSchloss(ComPort, blnOffen)
'
'End Function
'End Function
Public Function Turbo2ePing(EinbauplatzNr As Integer) As Boolean
Dim objSensusIFInterface As SensusIF2.Interface
Dim lngSuccess As Long
Dim strVersion As String
Dim comport As Long
comport = Val(g_App.Settings.getUSComPort(EinbauplatzNr))
Set objSensusIFInterface = New SensusIF2.Interface
objSensusIFInterface.CommPortNr = comport
objSensusIFInterface.DebugWindowsIsVisible = False
objSensusIFInterface.PortInit
lngSuccess = objSensusIFInterface.GetVersion(strVersion)
If lngSuccess = 1 Then
Turbo2ePing = True
End If
End Function
Public Function getTurbo2FabNr(EinbauplatzNr As Integer) As String
Dim objSensusIFInterface As SensusIF2.Interface
Dim lngSuccess As Long
Dim strFabnr As String
Dim comport As Integer
comport = Val(g_App.Settings.getUSComPort(EinbauplatzNr))
Set objSensusIFInterface = New SensusIF2.Interface
objSensusIFInterface.CommPortNr = comport
objSensusIFInterface.DebugWindowsIsVisible = False
objSensusIFInterface.PortInit
getTurbo2FabNr = 0
lngSuccess = objSensusIFInterface.GetFactoryID(strFabnr)
If lngSuccess = 1 Then
getTurbo2FabNr = strFabnr
Else
getTurbo2FabNr = ""
End If
End Function