LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Problem with zooming in two different signals with different sample rates

Hi,

 

I have two different measurement signals, and I only want a small part of the signal, so I want to zoom in the signal.

I managed to zoom in the signal and get the output of that signal, but my signals have different sample rates, so when I zoom, the zoom is not correct.

So I think that from one data input, I only have a few data points, where from the other, I have a lot of data. The block signal is the proble, that signal is not displayed right in the zoomed signal. 

I wanted to try to make an array where the array would add the signal if the time from both signals was the same (see for loop in vi). So, LabVIEW is building a vi and checking if time 1 is the same as time 2, when it is the same it should add the corresponding value to the array. When it is not true, it should add the last added value to the array. For example is time from one data file is 10 and from the other file 10 as well, then it should, for example add a 4 in a new column in the array, when after that time 1 is not the same as time 2 it should add the last value (4) until the time matches again.

I hope it is clear what I'm trying to do, I don't know if it is necessary in this case to get the zoomed signal right, but I thought it might work, but I couldn't get it to work.

 

After this, I want to be able to export the data in which I zoomed, but that is not a problem at the moment.

 

I hope you understand my problem, otherwise please ask me.

 

Thank you! 

 

Download All
0 Kudos
Message 1 of 4
(3,145 Views)

Hello,

 

I am Ed from National Instruments Applications Engineering. I am happy to assist you with your query.

 

So, I made a start into implementing a methodology to achieve what it is you need, however I found that only 1 item was correctly populated to the array. Upon further inspection I discovered that this is because there is only one moment in which both recordings are made at the same time. A workaround would be to reduce the accuracy of the time comparison however this may not be suitable for your application.

 

May I ask as to the methodology of synchronisation you used to make your recordings?

 

Would reducing the accuracy of the time comparison be suitable or is this unacceptable to your application requirements?

 

I hope that this is helpful and you are successful in your application.

 

Best regards,

 

Ed

0 Kudos
Message 2 of 4
(3,088 Views)

Hi Ed, 

 

Thank your for answer!

For both recordings I used the High resolution relative seconds vi, one is from a bluetooth IMU sensor which I'm live streaming in LabVIEW, the other one is from my testing protocol.

Both these recordings, I am trying to synchronize. 

It is acceptable to reduce the accuracy of the recordings to be able to pair the signals.

 

Thank you

0 Kudos
Message 3 of 4
(3,076 Views)

Hello,

 

Using High resolution relative seconds is not a methodology of synchronisation but of acquiring current time, hence the data is not synchronised and thereby time is only equal at one point during the acquisition for both the samples.

 

This being the case you could either:

 

1. Re-record your data with synchronisation so that time is equal at the intervals where the frequencies will produce a matching time.

 

2. Adjust the methodology of comparing the times to include an error margin sufficient enough to provide more data points with matching/similar time.

 

If you would prefer to do case 1, I have linked some documents below which should provide some insight into getting started with synchronised acquisition.

 

1. https://www.ni.com/en/support/documentation/supplemental/09/timing-and-synchronization-systems.html

 

2. https://www.ni.com/en/shop/labview/timing-and-synchronization-in-ni-labview.html

 

3. https://www.ni.com/en/support/documentation/supplemental/06/timing-and-synchronization-features-of-n...

 

For case 2, to get you started I have attached the VI which I began to create (please keep in mind this is not intended as a full example). You will need to modify this with the implementation to case 2, it should illustrate the issue I saw, to you quite well which is that the data is not synchronised between one another.

 

I hope that this is helpful and you are successful in your application.

 

Best regards,

 

Ed

 

 

0 Kudos
Message 4 of 4
(3,034 Views)