LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Frequency domain of Xbee data

Hello, this is the first time I have used the forum so please be gentle.

 

I have adapted a Vi to interpret a data packet from an Xbee wireless module. I have successfully interpreted the 'analogue' portion of the incoming packet and displayed it in the form of a chart depicting the time domain signal.

 

However, as hard as I try, I have had absolutely no success when attempting to display that exact same signal by means of frequency domain analysis.

 

I have attached a picture of the Vi in the hope that someone may be able to help. I appreciate any comments, thank-you.

 

Xbee time domain analysis.jpg

0 Kudos
Message 1 of 8
(4,019 Views)

Can you please post your xbee data & describe bit more about how you want to see it in both domains.

0 Kudos
Message 2 of 8
(4,003 Views)

Hi, thankyou for your reply. The Xbee module transmits a packet of data containing 22 bytes. The value of '7E' signifies the start byte of the data packet which I am using to index the other bytes.

 

At this point I am only interested in the 20th and 21st byte which denotes the Most Significant Byte & Least Significant Byte of a analogue sample. I have added these two bytes together and have successfully plotted them by means of the chart depicted in the Vi.

 

I desperately wish to use a chartto display the same value by means of spectral analysis so I can see what frequency components exist at certain amplitudes.

 

My analogue sample represents a vibration signal.

 

I hope this makes sence and appreciate your interest!

 

James

0 Kudos
Message 3 of 8
(3,982 Views)

photo.jpg

 

This is what the data packet looks like with a byte on each line. The bytes are depicted as decimals values here but are actually HEX in reality.

0 Kudos
Message 4 of 8
(3,975 Views)

I have tried many things. the closest i can get is to get a FFT graph where the amplitude along the side varies but no plot / line shows on the graph. I only need to identify frequencies below 20 Hz. The time domain graph works fine (maybe slow).

 

Please, if anyone can help, it would be so appreciated. I have been working on this for so long and cannot make anymore progress.

 

James

0 Kudos
Message 5 of 8
(3,928 Views)

I'm no expert and I can't look at your latest vi as I only have access to LabVIEW 2010, but judging from your diagram I see no timing information being collected. In your diagram the waveform chart looks like it is just using a default timing. How fast are you collecting these samples? You need to create (recreate) the waveform using your samples,dT and the build waveform primitive.

 

Hope this helps.

Now Using LabVIEW 2019SP1 and TestStand 2019
0 Kudos
Message 6 of 8
(3,922 Views)

Thanks for the reply. Im very new to labview. 

 

I have constructed a waveform as shown in my diagram. "waveform chart 2" shows the signal in the time domain.

 

 

Is this what you meant? The Xbee samples analogue values @ 1k samples per second, but this may be not 100% acurate after transmission of the data. I think I will be able to tweak the accuracy of the system using a known waveform at the input and adjusting the sampling until the output is satisfactory.

 

Now. It can be seen that I have attempted to get a graph to depict the frequenct components of the newly created waveform but the "result" graph returns no results??? all that i see is a change in the amplitude numbers @ the side of the graph but no plot??? Im guessing this is not the correct method to achieve frequency analysis.

 

Any thoughts?

 

 

Thanks again!!!!!

 

James

0 Kudos
Message 7 of 8
(3,906 Views)

Sorry, doesnt seem like my picture has shown up.

 

 

 

 

I have further attempted to display the frequency data, but no matter the signal. the frequency plot remains @ zero??

0 Kudos
Message 8 of 8
(3,894 Views)