05-20-2017 02:25 AM
I am inputting an external signal that changes every 1 second.
I am simulating that by "signal simulator".
Now, I want to have each "1 second" portion of the signal in an independent XY graph (or any other graph).
My attempt: use shift registers and save the whole signal in an array, so that each 1 second is in one row. Then plot each row on XY graph. But that did not work with me. It only shows the first row.
05-20-2017 11:22 AM
Some suggestions that will help both you and people who try to understand your code:
I've taken the liberty of rewriting your code to illustrate what I just said. You'll still see only one plot (for the reasons I explained), but I told you how to see all three. I also hope you see that this version is a simpler and more direct example. This is a LabVIEW 2016 "snippet" -- I think you are running LabVIEW 2013, so you won't be able to "drag and drop" this into your Block Diagram, but it should be simple enough for you to recreate it "from scratch".
Bob Schor
P.S. -- simulating "an external signal that changes every 1 second" with "a signal that is identical every 1 second" can lead you astray ...
05-20-2017 01:16 PM
Firstly, let me thank you for your reply and for your important notes, as they are really helpful. I appreciate that you wrote the code again for me.
Regarding the dynamic data, I am using this simulator because I will be having DAQ.
To be more specific and accurate, this DAQ will show some SEQUENTIAL readings separated by a known time interval (say 1 second). I want to display all these readings, but each of them in a separate graph.
05-21-2017 07:51 AM
@abdAllaHefny wrote:
Regarding the dynamic data, I am using this simulator because I will be having DAQ.
DAQmx is really very simple, very straight-forward, much easier to use and understand than the Dreaded DAQ Assistant and its Evil Twin, the Dynamic Data Wire, both of which are designed for the "Quick Fix, No Thinking Required". Have you ever tried building a Task in MAX or in your Project (right-click My Computer in Project Explorer, choose New, NI-DAQmx Task, and follow directions)? Have you read the tutorial material on DAQmx, including the excellent White Paper "Learn 10 Functions in NI-DAQmx ..." (a Web Search will show you videos, PDFs, the original Documentation, and others)?
If you are working with Sampled Data, Arrays and Waveforms are (at least, for me) much more convenient and transparent than Dynamic Data Wires, and also make for much "neater" (and hence comprehendable) Block Diagrams. They also tend to work the first time (or require a modest "tweak", like the occasional Transpose 2D Array ...).
Bob Schor
05-21-2017 09:16 AM
I do not have except to thank you gain for your helpful instructions.
Fortunately, I found I way to do what I have told you about previously.
Thanks again!
I attached the file. If that can help somebody visiting this topic.