From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How to plot 2 signal in the same graph but different frequency?

Hi!!

 

 

I have 2 sensor, motion and EMG.. I want to plot both of the signal (after processing) in the graph (real-time)..

The frequency of motion sensor is 128 Hz and for EMG sensor 800 Hz..

When I'm trying to plot (motion and emg) in the same graph, the signal from EMG (red line) not smoothly and very different with motion sensor..

I'm trying to resample that signla but, it's not working..

 

Can you help me?

 

 

thank youu

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

Hello puutrii, have you tried using a Merge Signal VI in order to be able to display both signal in the same graph? Or have you tried displaying them in different graph indicators to check that your data is getting acquired correctly? Since they have different frequencies it might be a good idea to try this 2 option if you haven’t done it yet.

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

hi puutrii,

this topic would be easier with some sample data.

 

I'm trying to resample that signla but, it's not working..

which of the two signals did you try to resample?

which resampling method did you try?

 

Regards,
Alex

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

Akardo14 

 

Yes, I trying to use merge signal before...  but signal from emg signal didn't appear in the graph (using merge signal figure)..

I'm showing motion and emg signal in different graph, it's work..

But I need to show both of signal in one graph to compare between motion and emg signals (fig1)

Download All
0 Kudos
Message 4 of 8
(4,694 Views)

alexderjuengere

 

It's the real-time system.. So, when I plug the usb sensor in the laptop, after that I'm doing some processing from both of signal and show in the graph..
I'm trying to resampling from emg signal and using resample waveform vi...

0 Kudos
Message 5 of 8
(4,692 Views)

Hello puutrii, for what I could see on the LabVIEW help, if you use Waveform Graphs, the plots must be evenly sampled measurements. Is there a posibility that you can put both of the waves on the same frequency and see if that helps you out? As for the Waveform chart: "...  is a special type of numeric indicator that displays one or more plots of data typically acquired at a constant rate..." this is taken from the LabVIEW help as well, so we actually end up in the same situation.

Therefore, I would recommend trying to put both signals at the same frequency or showing them on separate graphs and compare them that way. 

Also, another thing you could try if you can't do any of these, is to use the graph palette that can be accessed by right-clicking the graph, and checking the Graph Palette (when the vi is not running). This will give you a little bar under the graph. There is a Symbol that looks like a Magnifying Glass, inside that tab, there are several options to zoom in the graph in run time, this way you can zoom on a specific part of the graph you are interested and should be able to help you do your analysis correctly. 

0 Kudos
Message 6 of 8
(4,667 Views)

Hello Akardo14,,

 

The problem is I must put in the same graph and both of the signal must be shown correctly when the program running...

For the frequency, I can't change because its frequency from that sensor.. I think, for to change the frequency maybe I can resampling that signal.. Is it true?
But still not working when I'm trying to resampling..

.. Smiley Sad

0 Kudos
Message 7 of 8
(4,634 Views)

If the traces must be on the same chart and you can't sample at the same frequency, you can try stacking two chart controls, making parts of the top one transparent. Then you can use property nodes to force the x axis to cover the same range. 

 

Or you can use and XY Graph and build an x array for each plot. The XY Graph will allow you to have arbitrarily spaced x values for each plot.

_____________
Creator of the BundleMagic plugin for LabVIEW!
0 Kudos
Message 8 of 8
(4,613 Views)