07-05-2016 03:25 AM
Dear all,
I have a little problem regarding with the drawing of one signal I am acquiring. I pick the signal correctly and I write to file correctly, but I am unable to see continuously the signal in a digital graph, I can only see one sample, and I would like to see the evolution of the signal in the time, like I can see in an oscilloscope,I am acquiring a square signal with FPGA and passed to the host by one FIFO. Here is a picture of my host.vi.
Thanks in advance.
Miguel.
07-05-2016 03:36 AM
Hi Miguel,
when you want to see more than just one sample you need to collect them! (Use AppendWaveform in your case.)
Basic knowledge:
- a chart has it's internal buffer to keep a history of samples
- a graph has no internal buffer and only displays the data you wire to it
07-05-2016 04:30 AM
Dear GerdW,
Thank you for your quick response. I have done what you said but i cannot see the clock correctly in my chart. It continues changing but I do not see it like "writting over all the graph"it continues like before. Neither changing the history length 😕
07-05-2016 04:43 AM
Hi Miguel,
and where do you actually collect your data? Did you THINK DATAFLOW for your VI?
All you do is appending some data to "nothing", resulting in a waveform with just the appended data inside.
Collecting some data means appending new data to previoulsy collected data!
Have you done the basic lessons for LabVIEW? They are offered for free at NIs website!
You need to use a shift register to collect some data…
07-05-2016 05:03 AM
Hi,
Of course I have done those courses, but I have not explained well the problem, because with your idea I see more samples, of course, but it is not drawn like a continuous clock.
No matter, if I find the solution I will post it
07-05-2016 06:06 AM - edited 07-05-2016 06:06 AM
07-05-2016 08:20 AM
Is it possible you are confusing Graphs (where you plot "everything at once", so need to create and maintain an evolving set of data to plot) with Charts (which, like an oscilloscope, take new points in at the left and they scroll off to the right)?
You only posted pictures of your code, so I couldn't examine it in detail. It is much easier to understand your code and possible problems with it if you attach the VI itself.
Bob Schor
07-05-2016 09:19 AM
Dear Bob,
That is exactly what I wanted. Here is my code including the fpga code.
I want to test if the fpga can read a signal and return in other port (it does),and at the same time read a clock and show it in the host in parallel. The idea is to encrease what it might do, but this is the basis. I have been able to see something quite similar treating with de data of the FIFO directly, but with the schema I followed not all the periods have the same duty cycle or in other case the signal started in zero and continued since then , so the cicles were thiner each time. I have taken some ideas of the example of the NI6585 acquisition given by Labview; but that example only gave one period.
Thanks.
Miguel.
07-05-2016 09:20 AM
**I have changed the monitor to chart treating with the data output directly**
07-05-2016 10:01 AM
My apologies, I didn't realize you were working with a Digital Graph (there is no Digital Chart), thus the need to maintain an ever-growing array of points to plot.
However, this being LabVIEW, it is possible to Have Your Cake and Eat It, Too. Here's a little VI that every 100 msec (10 Hz) creates 10 random Booleans (by generating a Random number and seeing if it is >0.5). This is exported as an Array of Booleans to use as you see fit. However, I also create an array of Dbls as follows:
Here it is as a LabVIEW Snippet. You can see that it makes a nice scrolling Digital Chart. You'll save, of course, the Digital Sample, but if you just want to view it, you may like the Chart.
Note that to get the Chart to plot "square" representations, you need to adjust the "Interpolation Style" of the plots. If you have multiple channels, it might be easier to set these using a Property of the Chart and a For loop over the Channels (you only need to do this once, before you start plotting). I did it "by hand" ...
Bob Schor