Michael MBWBLUE Mode D'emploi page 52

Table des Matières

Publicité

Les langues disponibles

Les langues disponibles

'**********************************************************************************************************************
Do
DoEvents
TelegramStr = MBWBLUE.NextRadioTelegram
If Left(TelegramStr, 2) <> "FF" Then
TelValuesValid = MBWBLUE.RADExtractDecipherValid(TelegramStr)
MBWBLUE.TelegramInterpret Mid(TelegramStr, 17, 500), TelValuesValid
Cells(TelegramRow, 1) = MBWBLUE.RADExtractRecTime(TelegramStr)
Cells(TelegramRow, 2) = MBWBLUE.RADManufacturer
Cells(TelegramRow, 3) = MBWBLUE.RADDeviceAddress
Cells(TelegramRow, 4) = MBWBLUE.RADExtractSignalStrength(TelegramStr)
Cells(TelegramRow, 5) = MBWBLUE.RADGeneration
Cells(TelegramRow, 6) = MBWBLUE.RADMedium
Cells(TelegramRow, 7) = MBWBLUE.RADCIField
Cells(TelegramRow, 8) = MBWBLUE.RADTransCount
Cells(TelegramRow, 9) = MBWBLUE.RADStatus
Cells(TelegramRow, 10) = MBWBLUE.RADSignature 'read the different values of the telegram header
NumberOfValues = MBWBLUE.RADNumberOfDatarecords 'read the different meter counts
For Counter = 1 To NumberOfValues
Cells(TelegramRow, ((Counter * 2) + 9)) = MBWBLUE.RADDatarecordValue(Counter)
Cells(TelegramRow, ((Counter * 2) + 10)) = MBWBLUE.RADDatarecordUnit(Counter)
Next Counter
TelegramRow = TelegramRow + 1
End If
Loop While Now < StartTime + TimeValue("0:00:15")
'**********************************************************************************************************************
MBWBLUE.CommunicationThreadBreak = 1
MBWBLUEReadingEnd:
Cells(1, 4) = "Stopped"
End Sub
Sub MBWBLUExtSerial()
'*********************************************************************************************************************
MBT1COM = 12
'*********************************************************************************************************************
Set MBWBLUE = CreateObject("MBT1ReceiverLib.MBT1Receiver.1") 'invoke MBT1ReceiverLib software module
'**********************************************************************************************************************
MBWBLUE.CurrentCOMPort = MBT1COM
MBWBLUE.ReadParameter
Do
DoEvents
Loop While MBWBLUE.CommunicationThreadRuns <> 0
Cells(1, 1) = "MBWBLUE"
Cells(1, 2) = MBWBLUE.SerialNumber
Cells(2, 1) = "Firmware"
Cells(2, 2) = MBWBLUE.FirmwareVersion
If MBWBLUE.SerialNumber = "" Then
Cells(3, 1) = "No MBT1Device connected"
GoTo MBWBLUEReadingEnd
End If
'**********************************************************************************************************************
SRequest = "1040FE3E16"
MBWBLUE.BlueExtSerSendData 3, 2, 4, SRequest
Do
DoEvents
Loop While MBWBLUE.CommunicationThreadRuns <> 0
Cells(4, 1) = MBWBLUE.BlueExtSerRecData
MBWBLUEReadingEnd:
Cells(1, 4) = "Stopped"
End Sub
52
'read out the MBWBLUE device for 15 seconds and display all values
'if the telegram string contains FF there is no telegram available
'get the deciphering successful flag
'interpret the telegram and its meter counts
'read the MBWBLUE device for 15 seconds
'Stop radio telegram reading
'MBWBLUE device is given the virtual COM port number COM12
'change this value according to your COM port
'set the virtual COM port for the MBWBLUE
'check the Bluetooth manager for the correct setting
'start with reading the parameter
'print out serial number of MBWBLUE device
'print out firmware version of MBWBLUE device
'if the serial number is empty there is no device connected
'Initialize external serial interface and send a request command
'Wait until the external serial interface request has finished
'Print out received data
MBWBLUE

Publicité

Table des Matières
loading

Produits Connexes pour Michael MBWBLUE

Table des Matières