LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Waveform keeps moving up

Hi Dennis_Knutson,

 

My apologies on uploading a photo instead of a screenshot, that's because our waveform has been very inconsistent at the moment. That photo was actually our best waveform that we had so far.

 

Context Help only tells me that data out from Bluetooth Read VI is string format only, it did not specify whether it is a ASCII or some other type of string that we can do conversion on.

 

According to my friend who is the Arduino coder, the range of adc values is between 0 to 255. As for the LabVIEW, I have taken up your suggestion on using VISA Read to display the indicator and I was surprised that the bluetooth connection actually work once, due to our past experiences of failed connection using the COM Port. Currently the values it displays are from 0 to 150 max, does that mean anything such as its data type? If so please kindly tell us what it could be and perhaps tell us the appropriate conversion to get the waveform proper.

 

Thanks!

0 Kudos
Message 11 of 26
(2,237 Views)
First you say that the arduino is sending data as floating
0 Kudos
Message 12 of 26
(2,218 Views)
Sorry.

First you say the arduino is sending floating points (i.e. 1.2345) and now you said they are integers. The help I was referring to was the decimal string to number. This is only appropriate if you receive integers.
0 Kudos
Message 13 of 26
(2,212 Views)

@choliszt wrote:

It is amplitude sir


I did not ask what the name was, that's irrelevant. I wanted to know what the range of values are. Are these drifts a very small percentage of the singnal or is drifting all over the place? We cannot see the marker values on your blurry photograph.

 

All we need is a list of receved string values. Leave everything else out of the program and just accumulate them into a string array, then attach it here.

0 Kudos
Message 14 of 26
(2,200 Views)

Hi Dennis,

 

In response to your question of whether it is an integer or float, we have discussed for a bit and are thinking it should be an integer. Could you verify if this is true? We use AnalogRead.

 

The following is the description: https://www.arduino.cc/en/Reference/AnalogRead Reads the value from the specified analog pin. The Arduino board contains a 6 channel (8 channels on the Mini and Nano, 16 on the Mega), 10-bit analog to digital converter. This means that it will map input voltages between 0 and 5 volts into integer values between 0 and 1023. This yields a resolution between readings of: 5 volts / 1024 units or, .0049 volts (4.9 mV) per unit. The input range and resolution can be changed using analogReference().

 

So from the fact that it is 0 to 1023, it should be integer?

0 Kudos
Message 15 of 26
(2,179 Views)

Hi Altenbach,

 

Attached is my file on that I did as you instructed. I removed the misc stuff and formed an array of strings using the data we receive from the Bluetooth. From your question earlier about range, it ranges from -50V to 50V, which again I wonder why there is a negative value when Arduino only transfers data from which are positive voltage. 

 

Also, earlier you raised a question about using TCP. We are using Students' edition and whenever we try to get the Bluetooth Read function it already has the word TCP in the icon. We tried on the school's computer (which does not have bluetooth connection itself) that is the full version and it does show BT on the icon. Does using BT really help? Are BT and TCP really incompatible? If it is really the case we might have to borrow a laptop from someone with the full version.

 

If you could help us with the VI attached that would be great! =D

0 Kudos
Message 16 of 26
(2,171 Views)
If your arduino code does not scale it to floating point, then you are receiving integers.
0 Kudos
Message 17 of 26
(2,159 Views)

Hi Altenbach, any luck? Do you think the TCP instead of BT on the icon is the problem?

 

 

0 Kudos
Message 18 of 26
(2,128 Views)

 I see, thanks Dennis!

0 Kudos
Message 19 of 26
(2,126 Views)

@choliszt wrote:

If you could help us with the VI attached that would be great! =D


The string array is empty. After it contains data, you need to make the current values default before saving.

0 Kudos
Message 20 of 26
(2,115 Views)