LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Need Guidance On Data Acquisition Using Bluetooth of an Accelerometer

Hello everyone. I am completely new to LabVIEW and I have a few questions to ask.

 

So here is what I am trying to do. I have accelerometers connected to a microcontroller board (SK40C from Cytron, details are here) using PIC16F877A. Then, the output of the microcontroller is connected to a bluetooth module transmitter (SKKCA-21 from Cytron also, details are here). And from here, the data are transmitted to a laptop for LabVIEW data acquisition. My aim is convert the voltage into acceleration, display graphs and possibly storage of data.

 

I have searched through the forum and I got a little bit confuse of where I should start. These are a few question I want to ask:

 

1) What are the additional software/hardware that I need ? Because I read about this VISA and DAQ thingy which I'm don't quite understand about it.

2) Can anyone provide a step by step guide on what I should start with ? I am very very new to LabVIEW and time is abit of a constrain to me.

 

Thanks in advance for the help. Hope to hear some replies soon 😄

 

0 Kudos
Message 1 of 12
(3,979 Views)

The DAQ "thingy" is for use when using NI data acquisition boards. VISA is used to communicate with instruments/devices over a serial port, TCP/IP, GPIB, and sometimes USB.

 

Based on a brief look at the documentation, it appears that the transmitter connects to a computer via a USB cable. The USB driver creates a virtual COM port, so the computer should see a serial port. You can then communicate with the transmitter using VISA and treat the trasmitter as a serial port device.

 

You should first try talking to it using another terminal program. On Windows HyperTerminal is your best bet. This is to make sure you've installed all the required software and you can talk to it before getting into LabVIEW. Once you've been able to talk to it with (for example) HyperTerminal, then open up the serial port examples and try sending the same commands. You will need to determine from the documentation for the transmitter whether you need to append a special character, such as a carriage return or linefeed (or both) when sending commands, and whether the device ends its messages with a special character (such as a carriage return or linefeed). You should also read over the numerous articles in this page: http://zone.ni.com/devzone/cda/tut/p/id/4370

Message 2 of 12
(3,969 Views)

Hi smercurio_fc, thanks for the reply. So VISA is a software used for communication with the devices over a serial port am I right ? If I'm using a bluetooth module transmission, do I still need this ?

 

I have tried serial communication using HyperTerminal and it works. But then my communication method is using Bluetooth. Although I thought this might be a backup plan in case the Bluetooth doesn't work :(.

 

Thanks again.

0 Kudos
Message 3 of 12
(3,960 Views)

 


@Simon_Fong wrote:

Hi smercurio_fc, thanks for the reply. So VISA is a software used for communication with the devices over a serial port am I right ?


 

Yes.

 


If I'm using a bluetooth module transmission, do I still need this ?

If you want to talk to the transmitter over the Bluetooth then it sounds like you want to be emulating computer "B" as shown on page 12 of the manual. It's not clear to me how you connect the transmitter to your microcontroller, but as I said, I haven't read the manual in greate detail.you would need to use the Bluetooth VIs that ship with LabVIEW. There's also an example that ships with LabVIEW. There's also this brief KB article: http://zone.ni.com/devzone/cda/tut/p/id/3260, and lots of other links that you can find by searching for "bluetooth labview" in the NI search box.

 

0 Kudos
Message 4 of 12
(3,952 Views)

Hello again,

 

I tried out the Simple Bluetooth Server.vi in the LabVIEW examples and I got this Error 1.

 

LabVIEW:  An input parameter is invalid. For example if the input is a path, the path might contain a character not allowed by the OS such as ? or @.

 

I wonder what's wrong and if you could help me in this @.@

 

Thanks.

0 Kudos
Message 5 of 12
(3,904 Views)

How is the bluetooth device connected to your computer? Is bluetooth hardware built in or connected via USB?

0 Kudos
Message 6 of 12
(3,900 Views)

Umm I didn't connect anything. I just switched on my Bluetooth in my laptop. I'm just trying out the examples in LabVIEW. Few weeks ago I tried and it works. Somehow now I try it again I got this Error 1. Any ideas? 

0 Kudos
Message 7 of 12
(3,890 Views)

I just wanted to make sure, as a VISA call would work if the Bluetooth was hooked up via USB/serial or in older version of LabView.

 

 

 

Is it highlighting a particular block or control as being the cause of the problem? It sounds like you may have put invalid data into a control either manually from typing or from the wires connected to it.

 

 

If you open the example from example finder and try to run that, does it crash? If so, you may have accidentally changed the file and saved it in a broken state previously. Also, make sure to select under the front panel's edit menu, Reinitialize to Default Values just to make sure you get default data in there.

0 Kudos
Message 8 of 12
(3,881 Views)

I'm actually running the examples from LabVIEW itself as you have said. Both Simple Bluetooth Server and Simple Bluetooth Client. I have not try to build my own server yet because I'm very new to LabView. Just trying out the examples.

 

Messed up the example files huh ? I actually re-installed my LabVIEW and tried it again but it didn't work. Unless the library files were not removed during uninstallation. Umm is there anywhere I can redownload the examples' VI files ?

0 Kudos
Message 9 of 12
(3,878 Views)

 

Hello everyone. I'm stuck again. Can anyone provide me a VI for Bluetooth Discovery and how it works ? Been trying whole day and couldn't get anything..

 

Thanks 😕

0 Kudos
Message 10 of 12
(3,835 Views)