Our online shopping is experiencing intermittent service disruptions.

Support teams are actively working on the resolution.

LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Waveform Graph wont register any information

Hi. Im new to Labview. Im trying to get a waveform graph to register info im feeding it but for some reason, I cant get anything to show on the graph. I have to keep it on while loop. Im sure its an easy solution but ive spent hours with no avail. Any info welcome please

 

 

Labview issues.PNG

0 Kudos
Message 1 of 6
(332 Views)

Dataflow dictates that no data can leave the loop until the loop has completed. If you need to display the data, your graph terminal belongs inside the loop. You can built your data in a shift register or feedback node starting with an empty array. (Ultimately, you'll run out of memory if you let it grow forever).

 

altenbach_0-1710459960435.png

 

0 Kudos
Message 2 of 6
(330 Views)

Do you understand the difference between a Waveform Chart and a Waveform Graph? 

 

A Chart assumes that single points (plotted as Y) arrive at uniformly-spaced time, represented as evenly-spaced X distances, which is why Charts are usually used to show (like an oscilloscope) data as it is evolving with time (which is why it often is placed inside a While Loop so it "sees" the data points as they are being gathered).

 

A Graph, on the other hand, plots whatever 2-D X/Y data you give it.  While if you choose to provide only "Y" data, LabVIEW will assume that the X values are evenly spaced, as would be the case if they represented "time samples".

 

I recommend that you create a "data generator" (say, the random-number generator) inside a While loop and wire the output into both a Chart and a Graph.  I also recommend you put a 100 ms "Wait (ms)" function inside the loop so you can see the plots "evolve".  The first thing you'll notice is that Charts can accept a scalar, while Graphs need an Array.  Figure out how to build an Array inside the While loop and run this routine a few times (be sure to run it long enough that the plot "fills" the Chart and see how the Chart and Graph differ when this happens.  Stop the While loop and run it again, and notice another difference between Charts and Graphs.

 

[This illustrates a great "Engineering" way to learn LabVIEW -- build a little circuit and see what it does.  Hmm, almost makes you a "scientist", doing an experiment ...]

 

Bob Schor

0 Kudos
Message 3 of 6
(289 Views)

You accidentally made Plot 0 invisible. Go to the graph properties and make it visible again:

 

pincpanter_0-1710491259240.png

 

Paolo
-------------------
LV 7.1, 2011, 2017, 2019, 2021
Message 4 of 6
(262 Views)

Paolo. Thanks a million. Really easy but the time i spent was ridiculous. Really apricate it 

0 Kudos
Message 5 of 6
(216 Views)

@EDiddle wrote:

Paolo. Thanks a million. Really easy but the time i spent was ridiculous. Really apricate it 


The main problem that the solution took longer than expected was one or more of the following:

 

  • You only attached pictures of the front panel and block diagram instead of attaching the VI. We tend to focus on debugging the diagram,
  • It is hard to squint and see that the little square in the plot legend is greyed out. When looking at typical beginner code our brains assumes that most items are at the default. You must have manually changed the plot visibility for unknown reasons, but if you did that, you should have remembered to change it back. Deleting the graph and placing a new one would have fixed your problem too.
  • Your diagram had glaring dataflow problems. While there are sometimes good reasons in edge cases, It is very rare that any sane programmer would auto-index on a toplevel while loop (There is a good reason that this is only the default for FOR loops!). In your case, your graph would show stale data from the previous run until the loop is stopped, confusing the user (unless you change the execution properties to clear indicators when called, which is not the default)
  • Data stored inside an auto-indexing output tunnel is not accessible if the VI is aborted and thus permanently lost. if you build the graph data in a shift register, you have at least all data acquired so far.
  • There should not be any coercion dots in such simple code.

 

Just some general comments. Good luck with your learning progress! 😄

0 Kudos
Message 6 of 6
(207 Views)