LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Bluetooth DAQ VI - Converting output from BT device

Hi,

 

I am currrently experimenting using a bluetooth daq device to acquire data from instruments and display the outputs in labview. Attached is a trial VI i have been using

 

I have 2 problems with the attached VI.

 

1. When I stop the VI running, I can't run it again for a few minutes. If i try I get error code 56 source Bluetooth open connection. If I wait a few minutes and run again, it is fine.

 

2. The bt DAQ device acquires signals with a 16-bit accuracy in the range of 0- +5VDC. A value of 0x0000 represents 0 Volts, a value of 0xFFFF represents 5 Volts.

Full ASCII mode data flows in the following character displayable HEX format: - SSSS 1111 2222 3333 4444 \n\r

SSSS is a sequence number, starts at 1, rolls at 0xFFFF.

 

I have the problem of displaying this as 0 to 5 volts on my front panel as I am unsure how to convert back.

 

Any help with these issues would be appreciated.

 

Thanks

0 Kudos
Message 1 of 3
(2,834 Views)

Hello jamie310382,

 

As I am not able to run your code I can only suggest a few things, but I would like a little clarification on what we are working towards.

If I understand this correctly, you will be reading out data from the Bluetooth connection via the Bluetooth Read function. This will come in at four elements at a time and then you need to display the number that this represents and scale it to 5V. Is this right?

 

I have put together an example for manipulating your string for now, so let me know if this helps.

 

Kind Regards,

Michael S.
Applications Engineer
NI UK & Ireland

0 Kudos
Message 2 of 3
(2,775 Views)

Hello jamie310382,

 

Did you get a chance to have a look at my example VI?

I believe that the Scan From String function would best suit your requirement at this stage, but if you have other concerns, then please post back and I will try to help as best I can.

 

I hope this finds you well!

 

Kind Regards,

Michael S.
Applications Engineer
NI UK & Ireland

0 Kudos
Message 3 of 3
(2,730 Views)