LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Digital waveform continuosly graph

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.

0 Kudos
Message 1 of 12
(5,350 Views)

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

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 2 of 12
(5,346 Views)

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 😕

Download All
0 Kudos
Message 3 of 12
(5,341 Views)

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…

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 4 of 12
(5,336 Views)

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

0 Kudos
Message 5 of 12
(5,326 Views)

Hi Miguel,

 

how to collect data in an array:

check.png

Just a basic example…

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 6 of 12
(5,321 Views)

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

0 Kudos
Message 7 of 12
(5,305 Views)

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.

Download All
0 Kudos
Message 8 of 12
(5,293 Views)

**I have changed the monitor to chart treating with the data output directly**

0 Kudos
Message 9 of 12
(5,292 Views)

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:

  1. Use Boolean to (0,1) to make it 0 or 1.
  2. Multiply by 0.7 (so there will be a little space between plots).
  3. Add the index, "i", as an offset (so Plot 0 is on the bottom, Plot 1 starts from 1, Plot 2 starts from 2, etc.).
  4. Export these 10 numbers as an array.
  5. Make a 2D array out of them (since the Chart will treat a 1-by-10 array as "1 point, 10 channels") and wire it to a Waveform Chart.

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" ...

Pseudo-Digital Chart.png

Bob Schor 

Message 10 of 12
(5,283 Views)