Mbwblue Auslesebeispiel Mit Mbt1Receiverlib - Michael MBWBLUE Mode D'emploi

Table des Matières

Publicité

Les langues disponibles

Les langues disponibles

MBWBLUE Auslesebeispiel mit MBT1ReceiverLib

Die MBT1ReceiverLib ist eine Softwarebibliothek welche Funktionen für das Lesen
und Parametrieren der MBT1 Geräte enthält, unter anderem auch für den
MBWBLUE. Die unten aufgelisteten Beispiele zeigen, wie der MBWBLUE
ausgelesen werden kann und wie über die externe serielle Schnittstelle kommuniziert
wird.
Sub MBWBLUEReading()
'*********************************************************************************************************************
MBT1COM = 12
'*********************************************************************************************************************
For RowCounter = 1 To 50
For LineCounter = 1 To 200
Cells(LineCounter, RowCounter) = ""
Next LineCounter
Next RowCounter
Cells(1, 4) = "Running"
'*********************************************************************************************************************
Set MBWBLUE = CreateObject("MBT1ReceiverLib.MBT1Receiver.1") 'invoke MBT1ReceiverLib software module
'*********************************************************************************************************************
MBWBLUE.RadioPasskey(1) = "FFFFFFFFFFFFFFFF"
MBWBLUE.RadioPasskey(2) = "FFFFFFFFFFFFFFFF"
MBWBLUE.RadioPasskey(3) = "FFFFFFFFFFFFFFFF"
MBWBLUE.RadioPasskey128(1) = "FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF" 'Set 128 bit radio deciphering pass key 1 (if available)
MBWBLUE.RadioPasskey128(2) = "FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF" 'Set 128 bit radio deciphering pass key 2 (if available)
MBWBLUE.RadioPasskey128(3) = "FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF" 'Set 128 bit radio deciphering pass key 3 (if available)
'**********************************************************************************************************************
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
'**********************************************************************************************************************
Cells(4, 1) = "Reception Time"
Cells(4, 2) = "Manufacturer"
Cells(4, 3) = "Address"
Cells(4, 4) = "Signal Strengh [%]"
Cells(4, 5) = "Generation"
Cells(4, 6) = "Medium"
Cells(4, 7) = "CI Field"
Cells(4, 8) = "Transmission Count"
Cells(4, 9) = "Status"
Cells(4, 10) = "Signature"
For Counter = 1 To 15
CellStr = "Value "
CellStr = CellStr + Str(Counter)
Cells(4, ((Counter * 2) + 9)) = CellStr
CellStr = "Unit "
CellStr = CellStr + Str(Counter)
Cells(4, ((Counter * 2) + 10)) = CellStr
Next Counter
TelegramRow = 5
StartTime = Now
'MBWBLUE device is given the virtual COM port number COM12
'change this value according to your COM port
'clear all cells
'general settings
'set 64 bit radio deciphering pass key 1 (if available)
'set 64 bit radio deciphering pass key 2 (if available)
'set 64 bit radio deciphering pass key 3 (if available)
'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
MBWBLUE
77

Publicité

Table des Matières
loading

Produits Connexes pour Michael MBWBLUE

Table des Matières