07-24-2015 01:00 AM - edited 07-24-2015 01:03 AM
Hey everyone! I'm having trouble merging a signal I get through serial communication from arduino with a simulated sine wave.. I'm using a simple Merge Signals function. I will want to use these 2 waveforms to find the phase difference.. But I'm unable to merge these two signal to either a waveform graph or chart.
The signal I get from serial communication outputs to a waveform chart and I was actually thinking whether it is possible to display it on a waveform graph? Because, I can't display the signal to a waveform graph.. If I can display the signal on a waveform graph, I can get the 2 waveforms to display on the waveform graph.
How can I solve this?
07-24-2015 01:41 AM - edited 07-24-2015 01:43 AM
Hi lamela,
from your other thread you should have learned to provide not just FP images, but also exmple code as VI or snippet!
What kind of help do you expect, when you just show an image of a graph (left) and chart (right) with an empty graph in between?
The signal I get from serial communication outputs to a waveform chart
No, it does not output a chart! You are the one who uses a chart to display that signal!
Please use correct wording!
I was actually thinking whether it is possible to display it on a waveform graph?
Yes, that's possible.
LabVIEW comes with a lot of example VIs. And there are also examples showing how to use charts and graphs!
07-24-2015 01:46 AM - edited 07-24-2015 01:47 AM
Hi! Thanks for your reply!
But if I use a waveform graph for the input signal, it won't show anything on the graph.
07-24-2015 01:58 AM - edited 07-24-2015 02:00 AM
Hi lamela,
I think I already recommended NOT to use DDT for such simple VIs…
Easy solution for your problem: change the plot properties of your 2nd graph to show points and lines. Then you will see you are already displaying two plots in this graph!
Example:
(I replaced your whole loop by a RND() function.)
More advanced (and probably wanted) solution: build a "real" plot by collecting your data in an array in the loop.
Again: please use the example finder in LabVIEW to learn about such basic stuff!
07-24-2015 04:28 AM
Ok, but it does not show both the waveform on the graph? I was thinking to use like strings to waveform but I could not find a way to do it.
What other alternatives can be use to merge both the signals?
Thank you!
07-24-2015 04:49 AM
07-26-2015 11:06 PM
Hmm.. I've tried a couple of conversion to array like string to byte array and etc.. I want to store the changing numeric to array so it won't just keep updating the array, then I can display it on the waveform graph. Do you think this will work? What should I do?
07-27-2015 01:36 AM
Hi lamela,
I've tried a couple of conversion to array like string to byte array and etc.
How are these conversions related to any "data storage issue"?
What should I do?
At first you should NOT post just images of your front panel.
Nobody can tell you what's wrong, when you don't show your BD or VI!
Attach your current VI!
07-27-2015 01:47 AM - edited 07-27-2015 01:49 AM
Ok, I built the array from the string conversion but it doesn't store the value in the array, it just keeps changing. Also if I use string to byte array conversion, how do I change it to numeric value to plot on the waveform graph?
07-27-2015 01:54 AM - edited 07-27-2015 01:56 AM
Hi lamela,
you still don't be able to build an array and store data from previous iterations!
I built the array from the string conversion
Yes, you built an array from your string conversion.
BUT: you built it from just one value of the current iteration. Where do you store those values to keep them for next iterations?
Learn about using shift registers: This is explained in the beginner courses offered for FREE on NIs website!
Learn about using autoindexing: This is explained in the beginner courses offered for FREE on NIs website!
(And get rid of that DDT wire.)
but it doesn't store the value in the array, it just keeps changing.
Yes, that's how you programmed it!
Also if I use string to byte array conversion, how do I change it to numeric value to plot on the waveform graph?
I don't see the point in this question. When you have a byte array you can immediately show it on your graph…